From 689ebcf616b19294c5e96413ad6dee9c96060f0e Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Thu, 9 Jun 2016 19:47:57 +0100 Subject: [PATCH] bump --- dist/k-frame.js | 740 ++++++++++++++++++++++---------------------- dist/k-frame.min.js | 28 +- package.json | 1 + 3 files changed, 391 insertions(+), 378 deletions(-) diff --git a/dist/k-frame.js b/dist/k-frame.js index 99e074d5..0869bbf4 100644 --- a/dist/k-frame.js +++ b/dist/k-frame.js @@ -386,6 +386,12 @@ var config = sceneEl.getAttribute('firebase'); var self = this; + if (!(config instanceof Object)) { + config = AFRAME.utils.styleParser.parse(config); + } + + if (!config) { return; } + this.firebase = firebase.initializeApp(config); this.database = firebase.database(); @@ -445,6 +451,7 @@ // Components. Object.keys(data).forEach(function setComponent (componentName) { + if (componentName === 'parentId') { return; } entity.setAttribute(componentName, data[componentName]); }); @@ -460,6 +467,7 @@ var entity = this.entities[id]; Object.keys(components).forEach(function setComponent (componentName) { + if (componentName === 'parentId') { return; } entity.setAttribute(componentName, components[componentName]); }); }, @@ -555,7 +563,9 @@ init: function () { var el = this.el; var system = el.sceneEl.systems.firebase; - system.registerBroadcast(el, this.data.components); + if (this.data.components.length) { + system.registerBroadcast(el, this.data.components); + } } }); @@ -579,8 +589,8 @@ /* 6 */ /***/ function(module, exports) { - /* WEBPACK VAR INJECTION */(function(global) {/*! @license Firebase v3.0.3 - Build: 3.0.3-rc.1 + /* WEBPACK VAR INJECTION */(function(global) {/*! @license Firebase v3.0.4 + Build: 3.0.4-rc.3 Terms: https://developers.google.com/terms */ (function() { var h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,l=function(){h.Symbol||(h.Symbol=aa);l=function(){}},ba=0,aa=function(a){return"jscomp_symbol_"+a+ba++},m=function(){l();h.Symbol.iterator||(h.Symbol.iterator=h.Symbol("iterator"));m=function(){}},ca=function(){var a=["next","error","complete"];m();if(a[h.Symbol.iterator])return a[h.Symbol.iterator]();var b=0;return{next:function(){return b==a.length?{done:!0}:{done:!1,value:a[b++]}}}},p=function(){return{done:!0, value:void 0}},q=function(a,b){a instanceof String&&(a=String(a));var c=0;l();m();var d={},e=(d.next=function(){if(c"}),c=this.W+": "+c+" ("+this.V+"/"+a+").";a=new R(a,c);for(var d in b)b.hasOwnProperty(d)&&"_"!==d.slice(-1)&&(a[d]=b[d]);return a};O.all=function(a){return new O(function(b,c){var d=a.length,e=[];if(d)for(var f=function(a,c){d--;e[a]=c;0==d&&b(e)},k=function(a){c(a)},g=0,n;g"}),c=this.W+": "+c+" ("+a+").",c=new R(a,c),d;for(d in b)b.hasOwnProperty(d)&&"_"!==d.slice(-1)&&(c[d]=b[d]);return c};O.all=function(a){return new O(function(b,c){var d=a.length,e=[];if(d)for(var f=function(a,c){d--;e[a]=c;0==d&&b(e)},k=function(a){c(a)},g=0,n;g/g,ra=/"/g,sa=/'/g,ta=/\x00/g,ua=/[\x00&<>"']/,u=function(a,b){return-1!=a.indexOf(b)},va=function(a,b){return ab?1:0};var wa=function(a,b){b.unshift(a);t.call(this,ma.apply(null,b));b.shift()};r(wa,t);wa.prototype.name="AssertionError"; + 1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},la=Date.now||function(){return+new Date},r=function(a,b){function c(){}c.prototype=b.prototype;a.zc=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ae=function(a,c,f){for(var g=Array(arguments.length-2),h=2;h/g,ra=/"/g,sa=/'/g,ta=/\x00/g,ua=/[\x00&<>"']/,u=function(a,b){return-1!=a.indexOf(b)},va=function(a,b){return ab?1:0};var wa=function(a,b){b.unshift(a);t.call(this,ma.apply(null,b));b.shift()};r(wa,t);wa.prototype.name="AssertionError"; var xa=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new wa(""+e,f||[]);},v=function(a,b,c){a||xa("",null,b,Array.prototype.slice.call(arguments,2))},ya=function(a,b){throw new wa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},za=function(a,b,c){ga(a)||xa("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Aa=function(a,b,c){n(a)||xa("Expected string but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments, 2));return a},Ba=function(a,b,c){p(a)||xa("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Ca=Array.prototype.indexOf?function(a,b,c){v(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:n(a)?a.charAt(b):a[b]},Ia=function(a,b){return 0<=Ca(a,b)},Ka=function(a,b){var c=Ca(a,b),d;(d=0<=c)&&Ja(a,c);return d},Ja=function(a,b){v(null!=a.length);return 1==Array.prototype.splice.call(a,b,1).length},La=function(a,b){var c=0;Da(a,function(d,e){b.call(void 0,d,e,a)&&Ja(a,e)&&c++})},Ma=function(a){return Array.prototype.concat.apply(Array.prototype, - arguments)},Na=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},Oa=function(a){var b=a.length;if(0parseFloat(kb)){jb=String(mb);break a}}jb=kb} - var nb=jb,ob={},z=function(a){var b;if(!(b=ob[a])){b=0;for(var c=na(String(nb)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f>4);64!=g&&(b(f<<4&240|g>>2),64!=h&&b(g<<6&192|h))}},vb=function(){if(!rb){rb={};sb={};for(var a=0;65>a;a++)rb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a), - sb[rb[a]]=a,62<=a&&(sb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}};var xb=function(){this.Pb="";this.wd=wb};xb.prototype.ic=!0;xb.prototype.gc=function(){return this.Pb};xb.prototype.toString=function(){return"Const{"+this.Pb+"}"};var yb=function(a){if(a instanceof xb&&a.constructor===xb&&a.wd===wb)return a.Pb;ya("expected object of type Const, got '"+a+"'");return"type_error:Const"},wb={};var A=function(){this.aa="";this.vd=zb};A.prototype.ic=!0;A.prototype.gc=function(){return this.aa};A.prototype.toString=function(){return"SafeUrl{"+this.aa+"}"}; - var Ab=function(a){if(a instanceof A&&a.constructor===A&&a.vd===zb)return a.aa;ya("expected object of type SafeUrl, got '"+a+"' of type "+ca(a));return"type_error:SafeUrl"},Bb=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i,Db=function(a){if(a instanceof A)return a;a=a.ic?a.gc():String(a);Bb.test(a)||(a="about:invalid#zClosurez");return Cb(a)},zb={},Cb=function(a){var b=new A;b.aa=a;return b};Cb("about:blank");var Fb=function(){this.aa="";this.ud=Eb};Fb.prototype.ic=!0;Fb.prototype.gc=function(){return this.aa};Fb.prototype.toString=function(){return"SafeHtml{"+this.aa+"}"};var Gb=function(a){if(a instanceof Fb&&a.constructor===Fb&&a.ud===Eb)return a.aa;ya("expected object of type SafeHtml, got '"+a+"' of type "+ca(a));return"type_error:SafeHtml"},Eb={};Fb.prototype.Zd=function(a){this.aa=a;return this};var Hb=function(a,b){var c;c=b instanceof A?b:Db(b);a.href=Ab(c)};var Ib=function(a){Ib[" "](a);return a};Ib[" "]=ba;var Jb=!y||9<=Number(qb),Kb=y&&!z("9");!hb||z("528");gb&&z("1.9b")||y&&z("8")||db&&z("9.5")||hb&&z("528");gb&&!z("8")||y&&z("9");var Lb=function(){this.ra=this.ra;this.Gb=this.Gb};Lb.prototype.ra=!1;Lb.prototype.isDisposed=function(){return this.ra};Lb.prototype.Ga=function(){if(this.Gb)for(;this.Gb.length;)this.Gb.shift()()};var Mb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Na=!1;this.gd=!0};Mb.prototype.preventDefault=function(){this.defaultPrevented=!0;this.gd=!1};var Nb=function(a,b){Mb.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ub=this.state=null;a&&this.init(a,b)};r(Nb,Mb); - Nb.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(gb){var f;a:{try{Ib(e.nodeName);f=!0;break a}catch(g){}f=!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=hb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=hb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX: - a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.ub=a;a.defaultPrevented&& - this.preventDefault()};Nb.prototype.preventDefault=function(){Nb.yc.preventDefault.call(this);var a=this.ub;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Kb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Ob="closure_listenable_"+(1E6*Math.random()|0),Pb=0;var Qb=function(a,b,c,d,e){this.listener=a;this.Ib=null;this.src=b;this.type=c;this.rb=!!d;this.zb=e;this.key=++Pb;this.Pa=this.qb=!1},Rb=function(a){a.Pa=!0;a.listener=null;a.Ib=null;a.src=null;a.zb=null};var Sb=function(a){this.src=a;this.v={};this.pb=0};Sb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.v[f];a||(a=this.v[f]=[],this.pb++);var g=Tb(a,b,d,e);-1e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(m){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,g=e.length-1;!c.Na&&0<=g;g--){c.currentTarget=e[g];var h=kc(e[g],f,!0,c),d=d&&h}for(g=0;!c.Na&&g>>0),Zb=function(a){v(a,"Listener can not be null.");if(p(a))return a;v(a.handleEvent,"An object listener must have handleEvent method.");a[lc]||(a[lc]=function(b){return a.handleEvent(b)});return a[lc]};var mc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;var nc=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},qc=function(a){var b=[];oc(new pc,a,b);return b.join("")},pc=function(){this.Lb=void 0},oc=function(a,b,c){if(null== - b)c.push("null");else{if("object"==typeof b){if(ea(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;fa){var b=Cc[a];if(b)return b}b=new B([a|0],0>a?-1:0);-128<=a&&128>a&&(Cc[a]=b);return b},E=function(a){if(isNaN(a)||!isFinite(a))return C;if(0>a)return D(E(-a));for(var b=[],c=1,d=0;a>=c;d++)b[d]=a/c|0,c*=4294967296;return new B(b,0)},Ec=function(a,b){if(0==a.length)throw Error("number format error: empty string");var c=b||10;if(2>c||36g?(g=E(Math.pow(c,g)),e=e.multiply(g).add(E(h))):(e=e.multiply(d),e=e.add(E(h)))}return e},C=Dc(0),Fc=Dc(1),Gc=Dc(16777216),Hc=function(a){if(-1==a.g)return-Hc(D(a));for(var b=0,c=1,d=0;da||36>>0).toString(a),c=e;if(F(c))return f+d;for(;6>f.length;)f="0"+f;d=""+f+d}}; - var G=function(a,b){return 0>b?0:b>>16)+(G(this,e)>>>16)+(G(a,e)>>>16),d=g>>>16,f=f&65535,g=g&65535;c[e]=g<<16|f}return new B(c,c[c.length-1]&-2147483648?-1:0)};var Kc=function(a,b){return a.add(D(b))}; - B.prototype.multiply=function(a){if(F(this)||F(a))return C;if(-1==this.g)return-1==a.g?D(this).multiply(D(a)):D(D(this).multiply(a));if(-1==a.g)return D(this.multiply(D(a)));if(0>this.compare(Gc)&&0>a.compare(Gc))return E(Hc(this)*Hc(a));for(var b=this.h.length+a.h.length,c=[],d=0;d<2*b;d++)c[d]=0;for(d=0;d>>16,g=G(this,d)&65535,h=G(a,e)>>>16,m=G(a,e)&65535;c[2*d+2*e]+=g*m;Lc(c,2*d+2*e);c[2*d+2*e+1]+=f*m;Lc(c,2*d+2*e+1);c[2*d+2*e+1]+= - g*h;Lc(c,2*d+2*e+1);c[2*d+2*e+2]+=f*h;Lc(c,2*d+2*e+2)}for(d=0;d>>16,a[b]&=65535},Jc=function(a,b){if(F(b))throw Error("division by zero");if(F(a))return C;if(-1==a.g)return-1==b.g?Jc(D(a),D(b)):D(Jc(D(a),b));if(-1==b.g)return D(Jc(a,D(b)));if(30=d.compare(a);)c=c.shiftLeft(1),d=d.shiftLeft(1);for(var e=Mc(c,1),f=Mc(d,1),g,d=Mc(d,2),c=Mc(c,2);!F(d);)g=f.add(d),0>=g.compare(a)&&(e=e.add(c), - f=g),d=Mc(d,1),c=Mc(c,1);return e}c=C;for(d=a;0<=d.compare(b);){e=Math.max(1,Math.floor(Hc(d)/Hc(b)));f=Math.ceil(Math.log(e)/Math.LN2);f=48>=f?1:Math.pow(2,f-48);g=E(e);for(var h=g.multiply(b);-1==h.g||0>5;a%=32;for(var c=this.h.length+b+(0>>32-a:G(this,e-b);return new B(d,this.g)};var Mc=function(a,b){for(var c=b>>5,d=b%32,e=a.h.length-c,f=[],g=0;g>>d|G(a,g+c+1)<<32-d:G(a,g+c);return new B(f,a.g)};var Oc=function(a,b){this.cb=a;this.ea=b};Oc.prototype.tb=function(a){return this.ea==a.ea&&this.cb.tb(Ya(a.cb))}; - var Rc=function(a){try{var b;if(b=0==a.lastIndexOf("[",0)){var c=a.length-1;b=0<=c&&a.indexOf("]",c)==c}return b?new Pc(a.substring(1,a.length-1)):new Qc(a)}catch(d){return null}},Qc=function(a){var b=C;if(a instanceof B){if(0!=a.g||0>a.compare(C)||0e||255>>=8;return this.va=b.join(".")}; - var Pc=function(a){var b=C;if(a instanceof B){if(0!=a.g||0>a.compare(C)||0>>16&65535).toString(16));d.push((a&65535).toString(16));Ja(c,c.length-1);Pa(c,d);a=c.join(":")}d=a.split("::");if(2e)c=[];else{for(var f=[],g=0;ge.compare(C)||0>>16).toString(16));a.push(d.toString(16))}for(var c=b=-1,e=d=0,f=0;fd&&(d=e,b=c)):(c=-1,e=0);0parseFloat(jb)){ib=String(lb);break a}}ib=jb} + var mb=ib,nb={},z=function(a){var b;if(!(b=nb[a])){b=0;for(var c=na(String(mb)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f>4);64!=g&&(b(f<<4&240|g>>2),64!=h&&b(g<<6&192|h))}},ub=function(){if(!qb){qb={};rb={};for(var a=0;65>a;a++)qb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a), + rb[qb[a]]=a,62<=a&&(rb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}};var wb=function(){this.Qb="";this.xd=vb};wb.prototype.jc=!0;wb.prototype.hc=function(){return this.Qb};wb.prototype.toString=function(){return"Const{"+this.Qb+"}"};var xb=function(a){if(a instanceof wb&&a.constructor===wb&&a.xd===vb)return a.Qb;ya("expected object of type Const, got '"+a+"'");return"type_error:Const"},vb={};var A=function(){this.aa="";this.wd=yb};A.prototype.jc=!0;A.prototype.hc=function(){return this.aa};A.prototype.toString=function(){return"SafeUrl{"+this.aa+"}"}; + var zb=function(a){if(a instanceof A&&a.constructor===A&&a.wd===yb)return a.aa;ya("expected object of type SafeUrl, got '"+a+"' of type "+ca(a));return"type_error:SafeUrl"},Ab=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i,Cb=function(a){if(a instanceof A)return a;a=a.jc?a.hc():String(a);Ab.test(a)||(a="about:invalid#zClosurez");return Bb(a)},yb={},Bb=function(a){var b=new A;b.aa=a;return b};Bb("about:blank");var Eb=function(){this.aa="";this.vd=Db};Eb.prototype.jc=!0;Eb.prototype.hc=function(){return this.aa};Eb.prototype.toString=function(){return"SafeHtml{"+this.aa+"}"};var Fb=function(a){if(a instanceof Eb&&a.constructor===Eb&&a.vd===Db)return a.aa;ya("expected object of type SafeHtml, got '"+a+"' of type "+ca(a));return"type_error:SafeHtml"},Db={};Eb.prototype.$d=function(a){this.aa=a;return this};var Gb=function(a,b){var c;c=b instanceof A?b:Cb(b);a.href=zb(c)};var Hb=function(a){Hb[" "](a);return a};Hb[" "]=ba;var Ib=!y||9<=Number(pb),Jb=y&&!z("9");!gb||z("528");fb&&z("1.9b")||y&&z("8")||cb&&z("9.5")||gb&&z("528");fb&&!z("8")||y&&z("9");var Kb=function(){this.ra=this.ra;this.Hb=this.Hb};Kb.prototype.ra=!1;Kb.prototype.isDisposed=function(){return this.ra};Kb.prototype.Ga=function(){if(this.Hb)for(;this.Hb.length;)this.Hb.shift()()};var Lb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Oa=!1;this.gd=!0};Lb.prototype.preventDefault=function(){this.defaultPrevented=!0;this.gd=!1};var Mb=function(a,b){Lb.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.vb=this.state=null;a&&this.init(a,b)};r(Mb,Lb); + Mb.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(fb){var f;a:{try{Hb(e.nodeName);f=!0;break a}catch(g){}f=!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=gb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=gb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX: + a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.vb=a;a.defaultPrevented&& + this.preventDefault()};Mb.prototype.preventDefault=function(){Mb.zc.preventDefault.call(this);var a=this.vb;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Jb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Nb="closure_listenable_"+(1E6*Math.random()|0),Ob=0;var Pb=function(a,b,c,d,e){this.listener=a;this.Jb=null;this.src=b;this.type=c;this.sb=!!d;this.Ab=e;this.key=++Ob;this.Qa=this.rb=!1},Qb=function(a){a.Qa=!0;a.listener=null;a.Jb=null;a.src=null;a.Ab=null};var Rb=function(a){this.src=a;this.v={};this.qb=0};Rb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.v[f];a||(a=this.v[f]=[],this.qb++);var g=Sb(a,b,d,e);-1e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(m){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,g=e.length-1;!c.Oa&&0<=g;g--){c.currentTarget=e[g];var h=jc(e[g],f,!0,c),d=d&&h}for(g=0;!c.Oa&&g>>0),Yb=function(a){v(a,"Listener can not be null.");if(p(a))return a;v(a.handleEvent,"An object listener must have handleEvent method.");a[kc]||(a[kc]=function(b){return a.handleEvent(b)});return a[kc]};var lc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;var mc=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},pc=function(a){var b=[];nc(new oc,a,b);return b.join("")},oc=function(){this.Mb=void 0},nc=function(a,b,c){if(null== + b)c.push("null");else{if("object"==typeof b){if(ea(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;fa){var b=Bc[a];if(b)return b}b=new B([a|0],0>a?-1:0);-128<=a&&128>a&&(Bc[a]=b);return b},E=function(a){if(isNaN(a)||!isFinite(a))return C;if(0>a)return D(E(-a));for(var b=[],c=1,d=0;a>=c;d++)b[d]=a/c|0,c*=4294967296;return new B(b,0)},Dc=function(a,b){if(0==a.length)throw Error("number format error: empty string");var c=b||10;if(2>c||36g?(g=E(Math.pow(c,g)),e=e.multiply(g).add(E(h))):(e=e.multiply(d),e=e.add(E(h)))}return e},C=Cc(0),Ec=Cc(1),Fc=Cc(16777216),Gc=function(a){if(-1==a.g)return-Gc(D(a));for(var b=0,c=1,d=0;da||36>>0).toString(a),c=e;if(Ic(c))return f+d;for(;6>f.length;)f="0"+f;d=""+f+d}}; + var F=function(a,b){return 0>b?0:b>>16)+(F(this,e)>>>16)+(F(a,e)>>>16),d=g>>>16,f=f&65535,g=g&65535;c[e]=g<<16|f}return new B(c,c[c.length-1]&-2147483648?-1:0)};var Kc=function(a,b){return a.add(D(b))}; + B.prototype.multiply=function(a){if(Ic(this)||Ic(a))return C;if(-1==this.g)return-1==a.g?D(this).multiply(D(a)):D(D(this).multiply(a));if(-1==a.g)return D(this.multiply(D(a)));if(0>this.compare(Fc)&&0>a.compare(Fc))return E(Gc(this)*Gc(a));for(var b=this.h.length+a.h.length,c=[],d=0;d<2*b;d++)c[d]=0;for(d=0;d>>16,g=F(this,d)&65535,h=F(a,e)>>>16,m=F(a,e)&65535;c[2*d+2*e]+=g*m;Lc(c,2*d+2*e);c[2*d+2*e+1]+=f*m;Lc(c,2*d+2*e+1);c[2*d+2*e+ + 1]+=g*h;Lc(c,2*d+2*e+1);c[2*d+2*e+2]+=f*h;Lc(c,2*d+2*e+2)}for(d=0;d>>16,a[b]&=65535},Jc=function(a,b){if(Ic(b))throw Error("division by zero");if(Ic(a))return C;if(-1==a.g)return-1==b.g?Jc(D(a),D(b)):D(Jc(D(a),b));if(-1==b.g)return D(Jc(a,D(b)));if(30=d.compare(a);)c=c.shiftLeft(1),d=d.shiftLeft(1);for(var e=Mc(c,1),f=Mc(d,1),g,d=Mc(d,2),c=Mc(c,2);!Ic(d);)g=f.add(d),0>=g.compare(a)&&(e=e.add(c), + f=g),d=Mc(d,1),c=Mc(c,1);return e}c=C;for(d=a;0<=d.compare(b);){e=Math.max(1,Math.floor(Gc(d)/Gc(b)));f=Math.ceil(Math.log(e)/Math.LN2);f=48>=f?1:Math.pow(2,f-48);g=E(e);for(var h=g.multiply(b);-1==h.g||0>5;a%=32;for(var c=this.h.length+b+(0>>32-a:F(this,e-b);return new B(d,this.g)};var Mc=function(a,b){for(var c=b>>5,d=b%32,e=a.h.length-c,f=[],g=0;g>>d|F(a,g+c+1)<<32-d:F(a,g+c);return new B(f,a.g)};var Oc=function(a,b){this.eb=a;this.ea=b};Oc.prototype.ub=function(a){return this.ea==a.ea&&this.eb.ub(Va(a.eb))}; + var Rc=function(a){try{var b;if(b=0==a.lastIndexOf("[",0)){var c=a.length-1;b=0<=c&&a.indexOf("]",c)==c}return b?new Pc(a.substring(1,a.length-1)):new Qc(a)}catch(d){return null}},Qc=function(a){var b=C;if(a instanceof B){if(0!=a.g||0>a.compare(C)||0e||255>>=8;return this.va=b.join(".")}; + var Pc=function(a){var b=C;if(a instanceof B){if(0!=a.g||0>a.compare(C)||0>>16&65535).toString(16));d.push((a&65535).toString(16));Ja(c,c.length-1);Pa(c,d);a=c.join(":")}d=a.split("::");if(2e)c=[];else{for(var f=[],g=0;ge.compare(C)||0>>16).toString(16));a.push(d.toString(16))}for(var c=b=-1,e=d=0,f=0;fd&&(d=e,b=c)):(c=-1,e=0);0=b.Yb&&b.cancel())}this.Zc?this.Zc.call(this.Hc,this):this.wc=!0;this.Ia||Id(this,new Jd)}};Hd.prototype.Gc=function(a,b){this.Xb=!1;Kd(this,a,b)}; - var Kd=function(a,b,c){a.Ia=!0;a.ca=c;a.$a=!b;Ld(a)},Nd=function(a){if(a.Ia){if(!a.wc)throw new Md;a.wc=!1}};Hd.prototype.callback=function(a){Nd(this);Od(a);Kd(this,!0,a)};var Id=function(a,b){Nd(a);Od(b);Kd(a,!1,b)},Od=function(a){v(!(a instanceof Hd),"An execution sequence may not be initiated with a blocking Deferred.")},Qd=function(a,b){Pd(a,null,b,void 0)},Pd=function(a,b,c,d){v(!a.Ac,"Blocking Deferreds can not be re-used");a.Mb.push([b,c,d]);a.Ia&&Ld(a)}; - Hd.prototype.then=function(a,b,c){var d,e,f=new H(function(a,b){d=a;e=b});Pd(this,d,function(a){a instanceof Jd?f.cancel():e(a)});return f.then(a,b,c)};ld(Hd); - var Rd=function(a){return Fa(a.Mb,function(a){return p(a[1])})},Ld=function(a){if(a.Rb&&a.Ia&&Rd(a)){var b=a.Rb,c=Sd[b];c&&(l.clearTimeout(c.ab),delete Sd[b]);a.Rb=0}a.l&&(a.l.Yb--,delete a.l);for(var b=a.ca,d=c=!1;a.Mb.length&&!a.Xb;){var e=a.Mb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.$a?g:f)try{var h=f.call(e||a.Hc,b);void 0!==h&&(a.$a=a.$a&&(h==b||h instanceof Error),a.ca=b=h);if(md(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.Xb=!0}catch(m){b=m,a.$a=!0,Rd(a)||(c=!0)}}a.ca=b;d&& - (h=q(a.Gc,a,!0),d=q(a.Gc,a,!1),b instanceof Hd?(Pd(b,h,d),b.Ac=!0):b.then(h,d));c&&(b=new Td(b),Sd[b.ab]=b,a.Rb=b.ab)},Md=function(){t.call(this)};r(Md,t);Md.prototype.message="Deferred has already fired";Md.prototype.name="AlreadyCalledError";var Jd=function(){t.call(this)};r(Jd,t);Jd.prototype.message="Deferred was canceled";Jd.prototype.name="CanceledError";var Td=function(a){this.ab=l.setTimeout(q(this.ue,this),0);this.D=a}; - Td.prototype.ue=function(){v(Sd[this.ab],"Cannot throw an error that is not scheduled.");delete Sd[this.ab];throw this.D;};var Sd={};var Yd=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={hd:d,ob:void 0},f=new Hd(Ud,e),g=null,h=null!=b.timeout?b.timeout:5E3;0++d,"infinite loop")}c=this.yd;d=a.type||a;if(n(a))a=new Mb(a,c);else if(a instanceof Mb)a.target=a.target||c;else{var e=a;a=new Mb(d,c);$a(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Na&&0<=g;g--)f=a.currentTarget=b[g],e=$d(f,d,!0,a)&&e;a.Na||(f=a.currentTarget=c,e=$d(f,d,!0,a)&&e,a.Na||(e=$d(f,d,!1,a)&&e));if(b)for(g=0;!a.Na&&g=a.length)throw ae;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},de=function(a,b){if(fa(a))try{w(a,b,void 0)}catch(c){if(c!==ae)throw c;}else{a=ce(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==ae)throw c;}}};var ee=function(a,b){this.P={};this.m=[];this.ea=this.i=0;var c=arguments.length;if(12*this.i&&fe(this),!0):!1}; - var fe=function(a){if(a.i!=a.m.length){for(var b=0,c=0;b=d.m.length)throw ae;var e=d.m[b++];return a?e:d.P[e]};return e}; - var ge=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var ie=function(a){if(a.J&&"function"==typeof a.J)return a.J();if(n(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d=se(this).value)for(p(b)&&(b=b()),a=new le(a,String(b),this.ee),c&&(a.Jc=c),c="log:"+a.de,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.Pc)for(var e=0,f;f=b.Pc[e];e++)f(d);c=c.getParent()}}; - var te={},ue=null,ve=function(a){ue||(ue=new ne(""),te[""]=ue,ue.kd(qe));var b;if(!(b=te[a])){b=new ne(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=ve(a.substr(0,c));c.Zb||(c.Zb={});c.Zb[d]=b;b.l=c;te[a]=b}return b};var K=function(a,b){a&&a.log(re,b,void 0)};var we=function(a,b,c){if(p(a))c&&(a=q(a,c));else if(a&&"function"==typeof a.handleEvent)a=q(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647b)throw Error("Bad port number "+b);a.Ma=b}else a.Ma=null},Re=function(a,b,c){M(a);a.ka=c?Te(b,!0):b},Se=function(a,b,c){M(a);b instanceof N?(a.S=b,a.S.vc(a.F)):(c||(b=Ue(b,Ze)),a.S=new N(b,0,a.F))},O=function(a,b,c){M(a);a.S.set(b,c)},M=function(a){if(a.$d)throw Error("Tried to modify a read-only Uri");}; - Ne.prototype.vc=function(a){this.F=a;this.S&&this.S.vc(a);return this}; - var $e=function(a,b){var c=new Ne(null,void 0);Oe(c,"https");a&&Pe(c,a);b&&Re(c,b);return c},Te=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ue=function(a,b,c){return n(a)?(a=encodeURI(a).replace(b,af),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},af=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Ve=/[#\/\?@]/g,Xe=/[\#\?:]/g,We=/[\#\?]/g,Ze=/[\#\?@]/g,Ye=/#/g,N=function(a,b,c){this.i=this.j=null;this.C=a||null; - this.F=!!c},bf=function(a){a.j||(a.j=new ee,a.i=0,a.C&&ze(a.C,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))},df=function(a){var b=je(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new N(null,0,void 0);a=ie(a);for(var d=0;d=b.Zb&&b.cancel())}this.$c?this.$c.call(this.Ic,this):this.xc=!0;this.Ia||Hd(this,new Id)}};Gd.prototype.Hc=function(a,b){this.Yb=!1;Jd(this,a,b)}; + var Jd=function(a,b,c){a.Ia=!0;a.ca=c;a.ab=!b;Kd(a)},Md=function(a){if(a.Ia){if(!a.xc)throw new Ld;a.xc=!1}};Gd.prototype.callback=function(a){Md(this);Nd(a);Jd(this,!0,a)};var Hd=function(a,b){Md(a);Nd(b);Jd(a,!1,b)},Nd=function(a){v(!(a instanceof Gd),"An execution sequence may not be initiated with a blocking Deferred.")},Pd=function(a,b){Od(a,null,b,void 0)},Od=function(a,b,c,d){v(!a.Bc,"Blocking Deferreds can not be re-used");a.Nb.push([b,c,d]);a.Ia&&Kd(a)}; + Gd.prototype.then=function(a,b,c){var d,e,f=new G(function(a,b){d=a;e=b});Od(this,d,function(a){a instanceof Id?f.cancel():e(a)});return f.then(a,b,c)};ld(Gd); + var Qd=function(a){return Fa(a.Nb,function(a){return p(a[1])})},Kd=function(a){if(a.Sb&&a.Ia&&Qd(a)){var b=a.Sb,c=Rd[b];c&&(l.clearTimeout(c.bb),delete Rd[b]);a.Sb=0}a.l&&(a.l.Zb--,delete a.l);for(var b=a.ca,d=c=!1;a.Nb.length&&!a.Yb;){var e=a.Nb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.ab?g:f)try{var h=f.call(e||a.Ic,b);void 0!==h&&(a.ab=a.ab&&(h==b||h instanceof Error),a.ca=b=h);if(md(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.Yb=!0}catch(m){b=m,a.ab=!0,Qd(a)||(c=!0)}}a.ca=b;d&& + (h=q(a.Hc,a,!0),d=q(a.Hc,a,!1),b instanceof Gd?(Od(b,h,d),b.Bc=!0):b.then(h,d));c&&(b=new Sd(b),Rd[b.bb]=b,a.Sb=b.bb)},Ld=function(){t.call(this)};r(Ld,t);Ld.prototype.message="Deferred has already fired";Ld.prototype.name="AlreadyCalledError";var Id=function(){t.call(this)};r(Id,t);Id.prototype.message="Deferred was canceled";Id.prototype.name="CanceledError";var Sd=function(a){this.bb=l.setTimeout(q(this.ve,this),0);this.D=a}; + Sd.prototype.ve=function(){v(Rd[this.bb],"Cannot throw an error that is not scheduled.");delete Rd[this.bb];throw this.D;};var Rd={};var Xd=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={hd:d,pb:void 0},f=new Gd(Td,e),g=null,h=null!=b.timeout?b.timeout:5E3;0++d,"infinite loop")}c=this.zd;d=a.type||a;if(n(a))a=new Lb(a,c);else if(a instanceof Lb)a.target=a.target||c;else{var e=a;a=new Lb(d,c);Za(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Oa&&0<=g;g--)f=a.currentTarget=b[g],e=Zd(f,d,!0,a)&&e;a.Oa||(f=a.currentTarget=c,e=Zd(f,d,!0,a)&&e,a.Oa||(e=Zd(f,d,!1,a)&&e));if(b)for(g=0;!a.Oa&&g=a.length)throw $d;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},ce=function(a,b){if(fa(a))try{w(a,b,void 0)}catch(c){if(c!==$d)throw c;}else{a=be(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==$d)throw c;}}};var de=function(a,b){this.P={};this.m=[];this.ea=this.i=0;var c=arguments.length;if(12*this.i&&ee(this),!0):!1}; + var ee=function(a){if(a.i!=a.m.length){for(var b=0,c=0;b=d.m.length)throw $d;var e=d.m[b++];return a?e:d.P[e]};return e}; + var fe=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var he=function(a){if(a.J&&"function"==typeof a.J)return a.J();if(n(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d=re(this).value)for(p(b)&&(b=b()),a=new ke(a,String(b),this.fe),c&&(a.Kc=c),c="log:"+a.ee,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.Qc)for(var e=0,f;f=b.Qc[e];e++)f(d);c=c.getParent()}}; + var se={},te=null,ue=function(a){te||(te=new me(""),se[""]=te,te.kd(pe));var b;if(!(b=se[a])){b=new me(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=ue(a.substr(0,c));c.$b||(c.$b={});c.$b[d]=b;b.l=c;se[a]=b}return b};var K=function(a,b){a&&a.log(qe,b,void 0)};var ve=function(a,b,c){if(p(a))c&&(a=q(a,c));else if(a&&"function"==typeof a.handleEvent)a=q(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647b)throw Error("Bad port number "+b);a.Na=b}else a.Na=null},Qe=function(a,b,c){M(a);a.ka=c?Se(b,!0):b},Re=function(a,b,c){M(a);b instanceof N?(a.S=b,a.S.wc(a.F)):(c||(b=Te(b,Ye)),a.S=new N(b,0,a.F))},O=function(a,b,c){M(a);a.S.set(b,c)},M=function(a){if(a.ae)throw Error("Tried to modify a read-only Uri");}; + Me.prototype.wc=function(a){this.F=a;this.S&&this.S.wc(a);return this}; + var Ze=function(a,b){var c=new Me(null,void 0);Ne(c,"https");a&&Oe(c,a);b&&Qe(c,b);return c},Se=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Te=function(a,b,c){return n(a)?(a=encodeURI(a).replace(b,$e),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},$e=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Ue=/[#\/\?@]/g,We=/[\#\?:]/g,Ve=/[\#\?]/g,Ye=/[\#\?@]/g,Xe=/#/g,N=function(a,b,c){this.i=this.j=null;this.C=a||null; + this.F=!!c},af=function(a){a.j||(a.j=new de,a.i=0,a.C&&ye(a.C,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))},cf=function(a){var b=ie(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new N(null,0,void 0);a=he(a);for(var d=0;d")&&(d=d.replace(qa,">")),-1!=d.indexOf('"')&&(d=d.replace(ra,""")),-1!=d.indexOf("'")&&(d=d.replace(sa,"'")),-1!=d.indexOf("\x00")&&(d=d.replace(ta,"�"))),d='',Aa(yb(c),"must provide justification"),v(!/^[\s\xa0]*$/.test(yb(c)),"must provide non-empty justification"),m.document.write(Gb((new Fb).Zd(d))),m.document.close())):m=c.open(Ab(e),f,m);if(m)try{m.focus()}catch(S){}return m}, - gf=function(a){return new H(function(b){var c=function(){xe(2E3).then(function(){if(!a||a.closed)b();else return c()})};return c()})},hf=function(){var a=null;return(new H(function(b){"complete"==l.document.readyState?b():(a=function(){b()},fc(window,"load",a))})).I(function(b){hc(window,"load",a);throw b;})},jf=function(){var a=navigator.userAgent,b=a.toLowerCase();if(u(b,"opera/")||u(b,"opr/")||u(b,"opios/"))return"Opera";if(u(b,"msie")||u(b,"trident/"))return"IE";if(u(b,"edge/"))return"Edge";if(u(b, - "firefox/"))return"Firefox";if(u(b,"silk/"))return"Silk";if(u(b,"safari/")&&!u(b,"chrome/"))return"Safari";if(!u(b,"chrome/")&&!u(b,"crios/")||u(b,"edge/")){if((a=a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==a.length)return a[1]}else return"Chrome";return"Other"},kf=function(a){return jf()+"/JsCore/"+a},lf=function(a){a=a.split(".");for(var b=l,c=0;c")&&(d=d.replace(qa,">")),-1!=d.indexOf('"')&&(d=d.replace(ra,""")),-1!=d.indexOf("'")&&(d=d.replace(sa,"'")),-1!=d.indexOf("\x00")&&(d=d.replace(ta,"�"))),d='',Aa(xb(c),"must provide justification"),v(!/^[\s\xa0]*$/.test(xb(c)),"must provide non-empty justification"),m.document.write(Fb((new Eb).$d(d))),m.document.close())):m=c.open(zb(e),f,m);if(m)try{m.focus()}catch(T){}return m}, + ff=function(a){return new G(function(b){var c=function(){we(2E3).then(function(){if(!a||a.closed)b();else return c()})};return c()})},gf=function(){var a=null;return(new G(function(b){"complete"==l.document.readyState?b():(a=function(){b()},ec(window,"load",a))})).I(function(b){gc(window,"load",a);throw b;})},hf=function(){var a=navigator.userAgent,b=a.toLowerCase();if(u(b,"opera/")||u(b,"opr/")||u(b,"opios/"))return"Opera";if(u(b,"msie")||u(b,"trident/"))return"IE";if(u(b,"edge/"))return"Edge";if(u(b, + "firefox/"))return"Firefox";if(u(b,"silk/"))return"Silk";if(u(b,"safari/")&&!u(b,"chrome/"))return"Safari";if(!u(b,"chrome/")&&!u(b,"crios/")||u(b,"edge/")){if((a=a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==a.length)return a[1]}else return"Chrome";return"Other"},jf=function(a){return hf()+"/JsCore/"+a},kf=function(a){a=a.split(".");for(var b=l,c=0;c=c.length)throw ae;var d=Aa(c.key(b++));if(a)return d;d=c.getItem(d);if(!n(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};k.key=function(a){return this.H.key(a)};var Lg=function(){var a=null;try{a=window.localStorage||null}catch(b){}this.H=a};r(Lg,Jg);var Mg=function(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.H=a};r(Mg,Jg);var Ng="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),U=function(a,b){return{name:a||"",U:"a valid string",optional:!!b,V:n}},Og=function(a){return{name:a||"",U:"a valid object",optional:!1,V:ha}},Pg=function(a,b){return{name:a||"",U:"a function",optional:!!b,V:p}},Qg=function(){return{name:"",U:"null",optional:!1,V:da}},Rg=function(){return{name:"credential",U:"a valid credential",optional:!1,V:function(a){return!(!a||!a.xb)}}},Sg=function(){return{name:"authProvider",U:"a valid Auth provider", - optional:!1,V:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}},Tg=function(a,b,c,d){return{name:c||"",U:a.U+" or "+b.U,optional:!!d,V:function(c){return a.V(c)||b.V(c)}}};var Vg=function(a,b){for(var c in b){var d=b[c].name;a[d]=Ug(d,a[c],b[c].b)}},V=function(a,b,c,d){a[b]=Ug(b,c,d)},Ug=function(a,b,c){if(!c)return b;var d=Wg(a);a=function(){var a=Array.prototype.slice.call(arguments),e;a:{e=Array.prototype.slice.call(a);var h;h=0;for(var m=!1,S=0;S=c.length)throw $d;var d=Aa(c.key(b++));if(a)return d;d=c.getItem(d);if(!n(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};k.key=function(a){return this.H.key(a)};var Lg=function(){var a=null;try{a=window.localStorage||null}catch(b){}this.H=a};r(Lg,Jg);var Mg=function(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.H=a};r(Mg,Jg);var Ng="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),U=function(a,b){return{name:a||"",U:"a valid string",optional:!!b,V:n}},Og=function(a){return{name:a||"",U:"a valid object",optional:!1,V:ha}},Pg=function(a,b){return{name:a||"",U:"a function",optional:!!b,V:p}},Qg=function(){return{name:"",U:"null",optional:!1,V:da}},Rg=function(){return{name:"credential",U:"a valid credential",optional:!1,V:function(a){return!(!a||!a.yb)}}},Sg=function(){return{name:"authProvider",U:"a valid Auth provider", + optional:!1,V:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}},Tg=function(a,b,c,d){return{name:c||"",U:a.U+" or "+b.U,optional:!!d,V:function(c){return a.V(c)||b.V(c)}}};var Vg=function(a,b){for(var c in b){var d=b[c].name;a[d]=Ug(d,a[c],b[c].b)}},V=function(a,b,c,d){a[b]=Ug(b,c,d)},Ug=function(a,b,c){if(!c)return b;var d=Wg(a);a=function(){var a=Array.prototype.slice.call(arguments),e;a:{e=Array.prototype.slice.call(a);var h;h=0;for(var m=!1,T=0;Th||h>=Ng.length)throw new Q("internal-error","Argument validator received an unsupported number of arguments.");e=Ng[h]+" argument "+(e.name?'"'+e.name+'" ':"")+"must be "+e.U+".";break a}e=null}}if(e)throw new Q("argument-error",d+" failed: "+e);return b.apply(this,a)};for(var e in b)a[e]=b[e];for(e in b.prototype)a.prototype[e]= - b.prototype[e];return a},Wg=function(a){a=a.split(".");return a[a.length-1]};var $g=function(a,b,c){var d=(this.qa=firebase.SDK_VERSION||null)?kf(this.qa):null;this.c=new T(b,null,d);this.bd=Xg(this.c);this.ha=a;this.u=b;this.W=c;this.nb=[];this.Tc=!1;this.zd=q(this.Md,this);this.lb=new Yg;this.dd=new Zg;this.Ta={};this.Ta.unknown=this.lb;this.Ta.signInViaRedirect=this.lb;this.Ta.linkViaRedirect=this.lb;this.Ta.signInViaPopup=this.dd;this.Ta.linkViaPopup=this.dd},Xg=function(a){var b=window.location.href;return ag(a).then(function(a){a:{for(var d=(b instanceof Ne?b.clone(): - new Ne(b,void 0)).ia,e=0;ethis.Ha-3E4?this.ba?mh(this,{grant_type:"refresh_token",refresh_token:this.ba}):I(null):I({accessToken:this.Ea,expirationTime:this.Ha,refreshToken:this.ba})};var nh=function(a,b,c,d,e){of(this,{uid:a,displayName:d||null,photoURL:e||null,email:c||null,providerId:b})},oh=function(a,b){Mb.call(this,a);for(var c in b)this[c]=b[c]};r(oh,Mb); - var W=function(a,b,c){this.M=[];this.u=a.apiKey;this.W=a.appName;this.ha=a.authDomain||null;a=firebase.SDK_VERSION?kf(firebase.SDK_VERSION):null;this.c=new T(this.u,null,a);this.oa=new jh(this.c);ph(this,b.idToken);lh(this.oa,b);P(this,"refreshToken",this.oa.ba);qh(this,c||{});J.call(this);this.Hb=!1;this.ha&&(this.o=hh(this.ha,this.u,this.W));this.Nb=[]};r(W,J); - var ph=function(a,b){a.Vc=b;P(a,"_lat",b)},rh=function(a,b){La(a.Nb,function(a){return a==b})},sh=function(a){for(var b=[],c=0;cthis.Ha-3E4?this.ba?mh(this,{grant_type:"refresh_token",refresh_token:this.ba}):H(null):H({accessToken:this.Ea,expirationTime:this.Ha,refreshToken:this.ba})};var nh=function(a,b,c,d,e){of(this,{uid:a,displayName:d||null,photoURL:e||null,email:c||null,providerId:b})},oh=function(a,b){Lb.call(this,a);for(var c in b)this[c]=b[c]};r(oh,Lb); + var W=function(a,b,c){this.M=[];this.u=a.apiKey;this.W=a.appName;this.ha=a.authDomain||null;a=firebase.SDK_VERSION?jf(firebase.SDK_VERSION):null;this.c=new S(this.u,null,a);this.oa=new jh(this.c);ph(this,b.idToken);lh(this.oa,b);P(this,"refreshToken",this.oa.ba);qh(this,c||{});J.call(this);this.Ib=!1;this.ha&&lf()&&(this.o=hh(this.ha,this.u,this.W));this.Ob=[]};r(W,J); + var ph=function(a,b){a.Wc=b;P(a,"_lat",b)},rh=function(a,b){La(a.Ob,function(a){return a==b})},sh=function(a){for(var b=[],c=0;ce;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.N[0];c=a.N[1];for(var h=a.N[2],k=a.N[3],m=a.N[4],l,e=0;80>e;e++)40>e?20>e?(f=k^c&(h^k),l=1518500249):(f=c^h^k,l=1859775393):60>e?(f=c&h|k&(c|h),l=2400959708):(f=c^h^k,l=3395469782),f=(b<< + function ka(a,b){function c(){}c.prototype=b.prototype;a.Fg=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Cg=function(a,c,f){for(var h=Array(arguments.length-2),k=2;ke;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.N[0];c=a.N[1];for(var h=a.N[2],k=a.N[3],m=a.N[4],l,e=0;80>e;e++)40>e?20>e?(f=k^c&(h^k),l=1518500249):(f=c^h^k,l=1859775393):60>e?(f=c&h|k&(c|h),l=2400959708):(f=c^h^k,l=3395469782),f=(b<< 5|b>>>27)+f+m+l+d[e]&4294967295,m=k,k=h,h=(c<<30|c>>>2)&4294967295,c=b,b=f;a.N[0]=a.N[0]+b&4294967295;a.N[1]=a.N[1]+c&4294967295;a.N[2]=a.N[2]+h&4294967295;a.N[3]=a.N[3]+k&4294967295;a.N[4]=a.N[4]+m&4294967295} ma.prototype.update=function(a,b){if(null!=a){p(b)||(b=a.length);for(var c=b-this.Ya,d=0,e=this.Wd,f=this.ac;dparseFloat(a))?String(b):a})();var Ya=null,Za=null,$a=null;function ab(a,b){if(!ea(a))throw Error("encodeByteArray takes an array as a parameter");bb();for(var c=b?Za:Ya,d=[],e=0;e>2,f=(f&3)<<4|k>>4,k=(k&15)<<2|l>>6,l=l&63;m||(l=64,h||(k=64));d.push(c[u],c[f],c[k],c[l])}return d.join("")} function bb(){if(!Ya){Ya={};Za={};$a={};for(var a=0;65>a;a++)Ya[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),Za[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a),$a[Za[a]]=a,62<=a&&($a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a)]=a)}};function cb(a){n.setTimeout(function(){throw a;},0)}var db; function eb(){var a=n.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&-1==v.indexOf("Presto")&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=r(function(a){if(("*"==d||a.origin== - d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&-1==v.indexOf("Trident")&&-1==v.indexOf("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(p(c.next)){c=c.next;var a=c.Ke;c.Ke=null;a()}};return function(a){d.next={Ke:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b= + d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&-1==v.indexOf("Trident")&&-1==v.indexOf("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(p(c.next)){c=c.next;var a=c.Le;c.Le=null;a()}};return function(a){d.next={Le:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b= document.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){n.setTimeout(a,0)}};function fb(a,b){gb||hb();ib||(gb(),ib=!0);jb.push(new kb(a,b))}var gb;function hb(){if(n.Promise&&n.Promise.resolve){var a=n.Promise.resolve();gb=function(){a.then(lb)}}else gb=function(){var a=lb;!ga(n.setImmediate)||n.Window&&n.Window.prototype&&n.Window.prototype.setImmediate==n.setImmediate?(db||(db=eb()),db(a)):n.setImmediate(a)}}var ib=!1,jb=[];[].push(function(){ib=!1;jb=[]}); - function lb(){for(;jb.length;){var a=jb;jb=[];for(var b=0;bc&&(e=0===c?"none":"no more than "+c);if(e)throw Error(a+" failed: Was called with "+d+(1===d?" argument.":" arguments.")+" Expects "+e+".");}function Db(a,b,c){var d="";switch(b){case 1:d=c?"first":"First";break;case 2:d=c?"second":"Second";break;case 3:d=c?"third":"Third";break;case 4:d=c?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?");}return a=a+" failed: "+(d+" argument ")} - function A(a,b,c,d){if((!d||p(c))&&!ga(c))throw Error(Db(a,b,d)+"must be a valid function.");}function Eb(a,b,c){if(p(c)&&(!ha(c)||null===c))throw Error(Db(a,b,!0)+"must be a valid context object.");};function Fb(a){var b=[];Cb(a,function(a,d){da(d)?Ja(d,function(d){b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))}):b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))});return b.length?"&"+b.join("&"):""};var Gb=n.Promise||mb;mb.prototype["catch"]=mb.prototype.xg;function Hb(){var a=this;this.reject=this.resolve=null;this.ra=new Gb(function(b,c){a.resolve=b;a.reject=c})}function Ib(a,b){return function(c,d){c?a.reject(c):a.resolve(d);ga(b)&&(Jb(a.ra),1===b.length?b(c):b(c,d))}}function Jb(a){a.then(void 0,aa)};function Kb(a,b){if(!a)throw Lb(b);}function Lb(a){return Error("Firebase Database ("+firebase.SDK_VERSION+") INTERNAL ASSERT FAILED: "+a)};function Mb(a){for(var b=[],c=0,d=0;d=e&&(e-=55296,d++,Kb(de?b[c++]=e:(2048>e?b[c++]=e>>6|192:(65536>e?b[c++]=e>>12|224:(b[c++]=e>>18|240,b[c++]=e>>12&63|128),b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b}function Nb(a){for(var b=0,c=0;cd?b++:2048>d?b+=2:55296<=d&&56319>=d?(b+=4,c++):b+=3}return b};function Ob(a){return"undefined"!==typeof JSON&&p(JSON.parse)?JSON.parse(a):za(a)}function B(a){if("undefined"!==typeof JSON&&p(JSON.stringify))a=JSON.stringify(a);else{var b=[];Ba(new Aa,a,b);a=b.join("")}return a};function Pb(a,b){this.committed=a;this.snapshot=b};function Qb(a){this.se=a;this.Bd=[];this.Rb=0;this.Yd=-1;this.Gb=null}function Rb(a,b,c){a.Yd=b;a.Gb=c;a.Yd");return a};function ic(a,b){this.xf={};this.Vc=new jc(a);this.va=b;var c=1E4+2E4*Math.random();setTimeout(r(this.pf,this),Math.floor(c))}ic.prototype.pf=function(){var a=this.Vc.get(),b={},c=!1,d;for(d in a)0c&&(e=0===c?"none":"no more than "+c);if(e)throw Error(a+" failed: Was called with "+d+(1===d?" argument.":" arguments.")+" Expects "+e+".");}function Db(a,b,c){var d="";switch(b){case 1:d=c?"first":"First";break;case 2:d=c?"second":"Second";break;case 3:d=c?"third":"Third";break;case 4:d=c?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?");}return a=a+" failed: "+(d+" argument ")} + function A(a,b,c,d){if((!d||p(c))&&!ga(c))throw Error(Db(a,b,d)+"must be a valid function.");}function Eb(a,b,c){if(p(c)&&(!ha(c)||null===c))throw Error(Db(a,b,!0)+"must be a valid context object.");};function Fb(a){var b=[];Cb(a,function(a,d){da(d)?Ja(d,function(d){b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))}):b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))});return b.length?"&"+b.join("&"):""};var Gb=n.Promise||mb;mb.prototype["catch"]=mb.prototype.yg;function Hb(){var a=this;this.reject=this.resolve=null;this.ra=new Gb(function(b,c){a.resolve=b;a.reject=c})}function Ib(a,b){return function(c,d){c?a.reject(c):a.resolve(d);ga(b)&&(Jb(a.ra),1===b.length?b(c):b(c,d))}}function Jb(a){a.then(void 0,aa)};function Kb(a,b){if(!a)throw Lb(b);}function Lb(a){return Error("Firebase Database ("+firebase.SDK_VERSION+") INTERNAL ASSERT FAILED: "+a)};function Mb(a){for(var b=[],c=0,d=0;d=e&&(e-=55296,d++,Kb(de?b[c++]=e:(2048>e?b[c++]=e>>6|192:(65536>e?b[c++]=e>>12|224:(b[c++]=e>>18|240,b[c++]=e>>12&63|128),b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b}function Nb(a){for(var b=0,c=0;cd?b++:2048>d?b+=2:55296<=d&&56319>=d?(b+=4,c++):b+=3}return b};function Ob(a){return"undefined"!==typeof JSON&&p(JSON.parse)?JSON.parse(a):za(a)}function B(a){if("undefined"!==typeof JSON&&p(JSON.stringify))a=JSON.stringify(a);else{var b=[];Ba(new Aa,a,b);a=b.join("")}return a};function Pb(a,b){this.committed=a;this.snapshot=b};function Qb(a){this.te=a;this.Bd=[];this.Rb=0;this.Yd=-1;this.Gb=null}function Rb(a,b,c){a.Yd=b;a.Gb=c;a.Yd");return a};function ic(a,b){this.yf={};this.Vc=new jc(a);this.va=b;var c=1E4+2E4*Math.random();setTimeout(r(this.qf,this),Math.floor(c))}ic.prototype.qf=function(){var a=this.Vc.get(),b={},c=!1,d;for(d in a)0>4);64!=k&&(d.push(h<<4&240|k>>2),64!=m&&d.push(k<<6&192|m))}if(8192>d.length)b=String.fromCharCode.apply(null,d);else{a="";for(c=0;ca.ac?a.update(a.zd,56-a.ac):a.update(a.zd,a.Ya-(a.ac-56));for(var d=a.Ya-1;56<=d;d--)a.Wd[d]=c&255,c/=256;na(a,a.Wd);for(d=c=0;5>d;d++)for(var e=24;0<=e;e-=8)b[c]=a.N[d]>>e&255,++c;return ab(b)} function Zc(a){for(var b="",c=0;ca?c.push(a.substring(d,a.length)):c.push(a.substring(d,d+b));return c}function ld(a,b){if(da(a))for(var c=0;ca,a=Math.abs(a),a>=Math.pow(2,-1022)?(d=Math.min(Math.floor(Math.log(a)/Math.LN2),1023),c=d+1023,d=Math.round(a*Math.pow(2,52-d)-Math.pow(2,52))):(c=0,d=Math.round(a/Math.pow(2,-1074))));e=[];for(a=52;a;--a)e.push(d%2?1:0),d=Math.floor(d/2);for(a=11;a;--a)e.push(c%2?1:0),c=Math.floor(c/2);e.push(b?1:0);e.reverse();b=e.join("");c="";for(a=0;64>a;a+=8)d=parseInt(b.substr(a,8),2).toString(16),1===d.length&& - (d="0"+d),c+=d;return c.toLowerCase()}var nd=/^-?\d{1,10}$/;function hd(a){return nd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function Tb(a){try{a()}catch(b){setTimeout(function(){O("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function od(a,b,c){Object.defineProperty(a,b,{get:c})};function pd(a){var b={};try{var c=a.split(".");Ob(Xc(c[0])||"");b=Ob(Xc(c[1])||"");delete b.d}catch(d){}a=b;return"object"===typeof a&&!0===x(a,"admin")};var qd=null;"undefined"!==typeof MozWebSocket?qd=MozWebSocket:"undefined"!==typeof WebSocket&&(qd=WebSocket);function rd(a,b,c,d){this.Zd=a;this.f=bd(this.Zd);this.frames=this.Ac=null;this.qb=this.rb=this.Ee=0;this.Xa=oc(b);a={v:"5"};"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(a.r="f");c&&(a.s=c);d&&(a.ls=d);this.Le=hc(b,"websocket",a)}var td; - rd.prototype.open=function(a,b){this.kb=b;this.fg=a;this.f("Websocket connecting to "+this.Le);this.xc=!1;Xb.set("previous_websocket_failure",!0);try{this.La=new qd(this.Le)}catch(c){this.f("Error instantiating WebSocket.");var d=c.message||c.data;d&&this.f(d);this.fb();return}var e=this;this.La.onopen=function(){e.f("Websocket connected.");e.xc=!0};this.La.onclose=function(){e.f("Websocket connection was disconnected.");e.La=null;e.fb()};this.La.onmessage=function(a){if(null!==e.La)if(a=a.data,e.qb+= - a.length,lc(e.Xa,"bytes_received",a.length),ud(e),null!==e.frames)vd(e,a);else{a:{H(null===e.frames,"We already have a frame buffer");if(6>=a.length){var b=Number(a);if(!isNaN(b)){e.Ee=b;e.frames=[];a=null;break a}}e.Ee=1;e.frames=[]}null!==a&&vd(e,a)}};this.La.onerror=function(a){e.f("WebSocket error. Closing connection.");(a=a.message||a.data)&&e.f(a);e.fb()}};rd.prototype.start=function(){}; - rd.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1parseFloat(b[1])&&(a=!0)}return!a&&null!==qd&&!td};rd.responsesRequiredToBeHealthy=2;rd.healthyTimeout=3E4;g=rd.prototype;g.sd=function(){Xb.remove("previous_websocket_failure")};function vd(a,b){a.frames.push(b);if(a.frames.length==a.Ee){var c=a.frames.join("");a.frames=null;c=Ob(c);a.fg(c)}} + (d="0"+d),c+=d;return c.toLowerCase()}var nd=/^-?\d{1,10}$/;function hd(a){return nd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function Tb(a){try{a()}catch(b){setTimeout(function(){O("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function od(a,b,c){Object.defineProperty(a,b,{get:c})};function pd(a){var b={};try{var c=a.split(".");Ob(Xc(c[0])||"");b=Ob(Xc(c[1])||"");delete b.d}catch(d){}a=b;return"object"===typeof a&&!0===x(a,"admin")};var qd=null;"undefined"!==typeof MozWebSocket?qd=MozWebSocket:"undefined"!==typeof WebSocket&&(qd=WebSocket);function rd(a,b,c,d){this.Zd=a;this.f=bd(this.Zd);this.frames=this.Ac=null;this.qb=this.rb=this.Fe=0;this.Xa=oc(b);a={v:"5"};"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(a.r="f");c&&(a.s=c);d&&(a.ls=d);this.Me=hc(b,"websocket",a)}var td; + rd.prototype.open=function(a,b){this.kb=b;this.gg=a;this.f("Websocket connecting to "+this.Me);this.xc=!1;Xb.set("previous_websocket_failure",!0);try{this.La=new qd(this.Me)}catch(c){this.f("Error instantiating WebSocket.");var d=c.message||c.data;d&&this.f(d);this.fb();return}var e=this;this.La.onopen=function(){e.f("Websocket connected.");e.xc=!0};this.La.onclose=function(){e.f("Websocket connection was disconnected.");e.La=null;e.fb()};this.La.onmessage=function(a){if(null!==e.La)if(a=a.data,e.qb+= + a.length,lc(e.Xa,"bytes_received",a.length),ud(e),null!==e.frames)vd(e,a);else{a:{H(null===e.frames,"We already have a frame buffer");if(6>=a.length){var b=Number(a);if(!isNaN(b)){e.Fe=b;e.frames=[];a=null;break a}}e.Fe=1;e.frames=[]}null!==a&&vd(e,a)}};this.La.onerror=function(a){e.f("WebSocket error. Closing connection.");(a=a.message||a.data)&&e.f(a);e.fb()}};rd.prototype.start=function(){}; + rd.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1parseFloat(b[1])&&(a=!0)}return!a&&null!==qd&&!td};rd.responsesRequiredToBeHealthy=2;rd.healthyTimeout=3E4;g=rd.prototype;g.sd=function(){Xb.remove("previous_websocket_failure")};function vd(a,b){a.frames.push(b);if(a.frames.length==a.Fe){var c=a.frames.join("");a.frames=null;c=Ob(c);a.gg(c)}} g.send=function(a){ud(this);a=B(a);this.rb+=a.length;lc(this.Xa,"bytes_sent",a.length);a=kd(a,16384);1h.status){try{b=Ob(h.responseText)}catch(c){O("Failed to parse JSON response for "+f+": "+h.responseText)}d(null, b)}else 401!==h.status&&404!==h.status&&O("Got unsuccessful REST response for "+f+" Status: "+h.status),d(h.status);d=null}};h.open("GET",f,!0);h.send()})};function Cd(a,b,c){this.type=Dd;this.source=a;this.path=b;this.children=c}Cd.prototype.Nc=function(a){if(this.path.e())return a=this.children.subtree(new L(a)),a.e()?null:a.value?new Zb(this.source,C,a.value):new Cd(this.source,C,a);H(J(this.path)===a,"Can't get a merge for a child not on the path of the operation");return new Cd(this.source,D(this.path),this.children)};Cd.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"};function Ed(){this.hb={}} - function Fd(a,b){var c=b.type,d=b.Za;H("child_added"==c||"child_changed"==c||"child_removed"==c,"Only child changes supported for tracking");H(".priority"!==d,"Only non-priority child changes can be tracked.");var e=x(a.hb,d);if(e){var f=e.type;if("child_added"==c&&"child_removed"==f)a.hb[d]=new I("child_changed",b.Ma,d,e.Ma);else if("child_removed"==c&&"child_added"==f)delete a.hb[d];else if("child_removed"==c&&"child_changed"==f)a.hb[d]=new I("child_removed",e.pe,d);else if("child_changed"==c&& - "child_added"==f)a.hb[d]=new I("child_added",b.Ma,d);else if("child_changed"==c&&"child_changed"==f)a.hb[d]=new I("child_changed",b.Ma,d,e.pe);else throw Wc("Illegal combination of changes: "+b+" occurred after "+e);}else a.hb[d]=b};function Gd(a){this.W=a;this.g=a.n.g}function Hd(a,b,c,d){var e=[],f=[];Ja(b,function(b){"child_changed"===b.type&&a.g.nd(b.pe,b.Ma)&&f.push(new I("child_moved",b.Ma,b.Za))});Id(a,e,"child_removed",b,d,c);Id(a,e,"child_added",b,d,c);Id(a,e,"child_moved",f,d,c);Id(a,e,"child_changed",b,d,c);Id(a,e,Gc,b,d,c);return e}function Id(a,b,c,d,e,f){d=Ka(d,function(a){return a.type===c});Sa(d,r(a.Mf,a));Ja(d,function(c){var d=Jd(a,c,f);Ja(e,function(e){e.rf(c.type)&&b.push(e.createEvent(d,a.W))})})} - function Jd(a,b,c){"value"!==b.type&&"child_removed"!==b.type&&(b.Dd=c.Xe(b.Za,b.Ma,a.g));return b}Gd.prototype.Mf=function(a,b){if(null==a.Za||null==b.Za)throw Wc("Should only compare child_ events.");return this.g.compare(new K(a.Za,a.Ma),new K(b.Za,b.Ma))};function Kd(a,b){this.Sd=a;this.Kf=b}function Ld(a){this.V=a} - Ld.prototype.gb=function(a,b,c,d){var e=new Ed,f;if(b.type===$b)b.source.ee?c=Md(this,a,b.path,b.Ja,c,d,e):(H(b.source.Ue,"Unknown source."),f=b.source.De||Ic(a.u())&&!b.path.e(),c=Nd(this,a,b.path,b.Ja,c,d,f,e));else if(b.type===Dd)b.source.ee?c=Od(this,a,b.path,b.children,c,d,e):(H(b.source.Ue,"Unknown source."),f=b.source.De||Ic(a.u()),c=Pd(this,a,b.path,b.children,c,d,f,e));else if(b.type===Qd)if(b.Id)if(b=b.path,null!=c.mc(b))c=a;else{f=new Bc(c,a,d);d=a.O.j();if(b.e()||".priority"===J(b))Hc(a.u())? + function Fd(a,b){var c=b.type,d=b.Za;H("child_added"==c||"child_changed"==c||"child_removed"==c,"Only child changes supported for tracking");H(".priority"!==d,"Only non-priority child changes can be tracked.");var e=x(a.hb,d);if(e){var f=e.type;if("child_added"==c&&"child_removed"==f)a.hb[d]=new I("child_changed",b.Ma,d,e.Ma);else if("child_removed"==c&&"child_added"==f)delete a.hb[d];else if("child_removed"==c&&"child_changed"==f)a.hb[d]=new I("child_removed",e.qe,d);else if("child_changed"==c&& + "child_added"==f)a.hb[d]=new I("child_added",b.Ma,d);else if("child_changed"==c&&"child_changed"==f)a.hb[d]=new I("child_changed",b.Ma,d,e.qe);else throw Wc("Illegal combination of changes: "+b+" occurred after "+e);}else a.hb[d]=b};function Gd(a){this.W=a;this.g=a.n.g}function Hd(a,b,c,d){var e=[],f=[];Ja(b,function(b){"child_changed"===b.type&&a.g.nd(b.qe,b.Ma)&&f.push(new I("child_moved",b.Ma,b.Za))});Id(a,e,"child_removed",b,d,c);Id(a,e,"child_added",b,d,c);Id(a,e,"child_moved",f,d,c);Id(a,e,"child_changed",b,d,c);Id(a,e,Gc,b,d,c);return e}function Id(a,b,c,d,e,f){d=Ka(d,function(a){return a.type===c});Sa(d,r(a.Nf,a));Ja(d,function(c){var d=Jd(a,c,f);Ja(e,function(e){e.sf(c.type)&&b.push(e.createEvent(d,a.W))})})} + function Jd(a,b,c){"value"!==b.type&&"child_removed"!==b.type&&(b.Dd=c.Ye(b.Za,b.Ma,a.g));return b}Gd.prototype.Nf=function(a,b){if(null==a.Za||null==b.Za)throw Wc("Should only compare child_ events.");return this.g.compare(new K(a.Za,a.Ma),new K(b.Za,b.Ma))};function Kd(a,b){this.Sd=a;this.Lf=b}function Ld(a){this.V=a} + Ld.prototype.gb=function(a,b,c,d){var e=new Ed,f;if(b.type===$b)b.source.ee?c=Md(this,a,b.path,b.Ja,c,d,e):(H(b.source.Ve,"Unknown source."),f=b.source.Ee||Ic(a.u())&&!b.path.e(),c=Nd(this,a,b.path,b.Ja,c,d,f,e));else if(b.type===Dd)b.source.ee?c=Od(this,a,b.path,b.children,c,d,e):(H(b.source.Ve,"Unknown source."),f=b.source.Ee||Ic(a.u()),c=Pd(this,a,b.path,b.children,c,d,f,e));else if(b.type===Qd)if(b.Id)if(b=b.path,null!=c.mc(b))c=a;else{f=new Bc(c,a,d);d=a.O.j();if(b.e()||".priority"===J(b))Hc(a.u())? b=c.Ba(Ec(a)):(b=a.u().j(),H(b instanceof P,"serverChildren would be complete if leaf node"),b=c.sc(b)),b=this.V.za(d,b,e);else{var h=J(b),k=c.rc(h,a.u());null==k&&Cc(a.u(),h)&&(k=d.R(h));b=null!=k?this.V.F(d,h,k,D(b),f,e):a.O.j().Fa(h)?this.V.F(d,h,F,D(b),f,e):d;b.e()&&Hc(a.u())&&(d=c.Ba(Ec(a)),d.J()&&(b=this.V.za(b,d,e)))}d=Hc(a.u())||null!=c.mc(C);c=Rd(a,b,d,this.V.Qa())}else c=Sd(this,a,b.path,b.Pb,c,d,e);else if(b.type===bc)d=b.path,b=a.u(),f=b.j(),h=b.ea||d.e(),c=Td(this,new Ud(a.O,new Dc(f, h,b.Tb)),d,c,Ac,e);else throw Wc("Unknown operation type: "+b.type);e=sa(e.hb);d=c;b=d.O;b.ea&&(f=b.j().J()||b.j().e(),h=Vd(a),(0=this.g.compare(this.Uc,a)&&0>=this.g.compare(a,this.wc)};g.F=function(a,b,c,d,e,f){this.matches(new K(b,c))||(c=F);return this.he.F(a,b,c,d,e,f)}; g.za=function(a,b,c){b.J()&&(b=F);var d=b.ob(this.g),d=d.ga(F),e=this;b.P(N,function(a,b){e.matches(new K(a,b))||(d=d.U(a,F))});return this.he.za(a,d,c)};g.ga=function(a){return a};g.Qa=function(){return!0};g.Vb=function(){return this.he};function he(a){this.sa=new ce(a);this.g=a.g;H(a.xa,"Only valid if limit has been set");this.oa=a.oa;this.Jb=!ie(a)}g=he.prototype;g.F=function(a,b,c,d,e,f){this.sa.matches(new K(b,c))||(c=F);return a.R(b).ca(c)?a:a.Fb()=this.g.compare(this.sa.Uc,f):0>=this.g.compare(f,this.sa.wc))d=d.U(f.name,f.S),e++;else break}}else{d=b.ob(this.g);d=d.ga(F);var k,m,l;if(this.Jb){b=d.Ye(this.g);k=this.sa.wc;m=this.sa.Uc;var u=ke(this.g);l=function(a,b){return u(b,a)}}else b=d.Xb(this.g),k=this.sa.Uc, + g.za=function(a,b,c){var d;if(b.J()||b.e())d=F.ob(this.g);else if(2*this.oa=this.g.compare(this.sa.Uc,f):0>=this.g.compare(f,this.sa.wc))d=d.U(f.name,f.S),e++;else break}}else{d=b.ob(this.g);d=d.ga(F);var k,m,l;if(this.Jb){b=d.Ze(this.g);k=this.sa.wc;m=this.sa.Uc;var u=ke(this.g);l=function(a,b){return u(b,a)}}else b=d.Xb(this.g),k=this.sa.Uc, m=this.sa.wc,l=ke(this.g);for(var e=0,z=!1;0=l(k,f)&&(z=!0),(h=z&&e=l(f,m))?e++:d=d.U(f.name,F)}return this.sa.Vb().za(a,d,c)};g.ga=function(a){return a};g.Qa=function(){return!0};g.Vb=function(){return this.sa.Vb()}; function je(a,b,c,d,e,f){var h;if(a.Jb){var k=ke(a.g);h=function(a,b){return k(b,a)}}else h=ke(a.g);H(b.Fb()==a.oa,"");var m=new K(c,d),l=a.Jb?le(b,a.g):me(b,a.g),u=a.sa.matches(m);if(b.Fa(c)){for(var z=b.R(c),l=e.fe(a.g,l,a.Jb);null!=l&&(l.name==c||b.Fa(l.name));)l=e.fe(a.g,l,a.Jb);e=null==l?1:h(l,m);if(u&&!d.e()&&0<=e)return null!=f&&Fd(f,new I("child_changed",d,c,z)),b.U(c,d);null!=f&&Fd(f,new I("child_removed",z,c));b=b.U(c,F);return null!=l&&a.sa.matches(l)?(null!=f&&Fd(f,new I("child_added", - l.S,l.name)),b.U(l.name,l.S)):b}return d.e()?b:u&&0<=h(l,m)?(null!=f&&(Fd(f,new I("child_removed",l.S,l.name)),Fd(f,new I("child_added",d,c))),b.U(c,d).U(l.name,F)):b};function Uc(a,b){this.B=a;H(p(this.B)&&null!==this.B,"LeafNode shouldn't be created with null/undefined value.");this.aa=b||F;ne(this.aa);this.Eb=null}var oe=["object","boolean","number","string"];g=Uc.prototype;g.J=function(){return!0};g.C=function(){return this.aa};g.ga=function(a){return new Uc(this.B,a)};g.R=function(a){return".priority"===a?this.aa:F};g.Q=function(a){return a.e()?this:".priority"===J(a)?this.aa:F};g.Fa=function(){return!1};g.Xe=function(){return null}; + l.S,l.name)),b.U(l.name,l.S)):b}return d.e()?b:u&&0<=h(l,m)?(null!=f&&(Fd(f,new I("child_removed",l.S,l.name)),Fd(f,new I("child_added",d,c))),b.U(c,d).U(l.name,F)):b};function Uc(a,b){this.B=a;H(p(this.B)&&null!==this.B,"LeafNode shouldn't be created with null/undefined value.");this.aa=b||F;ne(this.aa);this.Eb=null}var oe=["object","boolean","number","string"];g=Uc.prototype;g.J=function(){return!0};g.C=function(){return this.aa};g.ga=function(a){return new Uc(this.B,a)};g.R=function(a){return".priority"===a?this.aa:F};g.Q=function(a){return a.e()?this:".priority"===J(a)?this.aa:F};g.Fa=function(){return!1};g.Ye=function(){return null}; g.U=function(a,b){return".priority"===a?this.ga(b):b.e()&&".priority"!==a?this:F.U(a,b).ga(this.aa)};g.F=function(a,b){var c=J(a);if(null===c)return b;if(b.e()&&".priority"!==c)return this;H(".priority"!==c||1===Wd(a),".priority must be the last token in a path");return this.U(c,F.F(D(a),b))};g.e=function(){return!1};g.Fb=function(){return 0};g.P=function(){return!1};g.H=function(a){return a&&!this.C().e()?{".value":this.Ea(),".priority":this.C().H()}:this.Ea()}; g.hash=function(){if(null===this.Eb){var a="";this.aa.e()||(a+="priority:"+pe(this.aa.H())+":");var b=typeof this.B,a=a+(b+":"),a="number"===b?a+md(this.B):a+this.B;this.Eb=Yc(a)}return this.Eb};g.Ea=function(){return this.B};g.tc=function(a){if(a===F)return 1;if(a instanceof P)return-1;H(a.J(),"Unknown node type");var b=typeof a.B,c=typeof this.B,d=Ia(oe,b),e=Ia(oe,c);H(0<=d,"Unknown leaf type: "+b);H(0<=e,"Unknown leaf type: "+c);return d===e?"object"===c?0:this.Bdocument.domain="'+document.domain+'";\x3c/script>');a=""+a+"";try{this.Ga.ib.open(),this.Ga.ib.write(a),this.Ga.ib.close()}catch(f){E("frame writing exception"),f.stack&&E(f.stack),E(f)}} Pe.prototype.close=function(){this.Ud=!1;if(this.Ga){this.Ga.ib.body.innerHTML="";var a=this;setTimeout(function(){null!==a.Ga&&(document.body.removeChild(a.Ga),a.Ga=null)},Math.floor(0))}var b=this.kb;b&&(this.kb=null,b())}; - function Se(a){if(a.Ud&&a.Kd&&a.ue.count()<(0=a.Qc[0].Qe.length+30+c.length){var e=a.Qc.shift(),c=c+"&seg"+d+"="+e.sg+"&ts"+d+"="+e.yg+"&d"+d+"="+e.Qe;d++}else break;Te(a,b+c,a.$d);return!0}return!1}function Te(a,b,c){function d(){a.ue.remove(c);Se(a)}a.ue.add(c,1);var e=setTimeout(d,Math.floor(25E3));Re(a,b,function(){clearTimeout(e);d()})} - function Re(a,b,c){setTimeout(function(){try{if(a.Kd){var d=a.Ga.ib.createElement("script");d.type="text/javascript";d.async=!0;d.src=b;d.onload=d.onreadystatechange=function(){var a=d.readyState;a&&"loaded"!==a&&"complete"!==a||(d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),c())};d.onerror=function(){E("Long-poll script failed to load: "+b);a.Kd=!1;a.close()};a.Ga.ib.body.appendChild(d)}}catch(e){}},Math.floor(1))};function Ue(a){Ve(this,a)}var We=[Me,rd];function Ve(a,b){var c=rd&&rd.isAvailable(),d=c&&!(Xb.af||!0===Xb.get("previous_websocket_failure"));b.zg&&(c||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),d=!0);if(d)a.Wc=[rd];else{var e=a.Wc=[];ld(We,function(a,b){b&&b.isAvailable()&&e.push(b)})}}function Xe(a){if(0=a.Qc[0].Re.length+30+c.length){var e=a.Qc.shift(),c=c+"&seg"+d+"="+e.tg+"&ts"+d+"="+e.zg+"&d"+d+"="+e.Re;d++}else break;Te(a,b+c,a.$d);return!0}return!1}function Te(a,b,c){function d(){a.ve.remove(c);Se(a)}a.ve.add(c,1);var e=setTimeout(d,Math.floor(25E3));Re(a,b,function(){clearTimeout(e);d()})} + function Re(a,b,c){setTimeout(function(){try{if(a.Kd){var d=a.Ga.ib.createElement("script");d.type="text/javascript";d.async=!0;d.src=b;d.onload=d.onreadystatechange=function(){var a=d.readyState;a&&"loaded"!==a&&"complete"!==a||(d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),c())};d.onerror=function(){E("Long-poll script failed to load: "+b);a.Kd=!1;a.close()};a.Ga.ib.body.appendChild(d)}}catch(e){}},Math.floor(1))};function Ue(a){Ve(this,a)}var We=[Me,rd];function Ve(a,b){var c=rd&&rd.isAvailable(),d=c&&!(Xb.bf||!0===Xb.get("previous_websocket_failure"));b.Ag&&(c||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),d=!0);if(d)a.Wc=[rd];else{var e=a.Wc=[];ld(We,function(a,b){b&&b.isAvailable()&&e.push(b)})}}function Xe(a){if(0=a.uf?(a.f("Secondary connection is healthy."),a.Cb=!0,a.D.sd(),a.D.start(),a.f("sending client ack on secondary"),a.D.send({t:"c",d:{t:"a",d:{}}}),a.f("Ending transmission on primary"),a.I.send({t:"c",d:{t:"n",d:{}}}),a.Xc=a.D,df(a)):(a.f("sending ping on secondary."),a.D.send({t:"c",d:{t:"p",d:{}}}))}Ye.prototype.wd=function(a){ff(this);this.se(a)};function ff(a){a.Cb||(a.we--,0>=a.we&&(a.f("Primary connection is healthy."),a.Cb=!0,a.I.sd()))} - function cf(a,b){a.D=new b("c:"+a.id+":"+a.Me++,a.M,a.wf);a.uf=b.responsesRequiredToBeHealthy||0;a.D.open($e(a,a.D),af(a,a.D));setTimeout(function(){a.D&&(a.f("Timed out trying to upgrade."),a.D.close())},Math.floor(6E4))}function bf(a,b,c){a.f("Realtime connection established.");a.I=b;a.L=1;a.Mc&&(a.Mc(c,a.wf),a.Mc=null);0===a.we?(a.f("Primary connection is healthy."),a.Cb=!0):setTimeout(function(){gf(a)},Math.floor(5E3))} + function $e(a,b){return function(c){if(2!=a.L)if(b===a.Rc){var d=id("t",c);c=id("d",c);if("c"==d){if(d=id("t",c),"d"in c)if(c=c.d,"h"===d){var d=c.ts,e=c.v,f=c.h;a.xf=c.s;gc(a.M,f);0==a.L&&(a.I.start(),bf(a,a.I,d),"5"!==e&&O("Protocol version mismatch detected"),c=a.zf,(c=1=a.wf?(a.f("Secondary connection is healthy."),a.Cb=!0,a.D.sd(),a.D.start(),a.f("sending client ack on secondary"),a.D.send({t:"c",d:{t:"a",d:{}}}),a.f("Ending transmission on primary"),a.I.send({t:"c",d:{t:"n",d:{}}}),a.Xc=a.D,df(a)):(a.f("sending ping on secondary."),a.D.send({t:"c",d:{t:"p",d:{}}}))}Ye.prototype.wd=function(a){ff(this);this.te(a)};function ff(a){a.Cb||(a.xe--,0>=a.xe&&(a.f("Primary connection is healthy."),a.Cb=!0,a.I.sd()))} + function cf(a,b){a.D=new b("c:"+a.id+":"+a.Ne++,a.M,a.xf);a.wf=b.responsesRequiredToBeHealthy||0;a.D.open($e(a,a.D),af(a,a.D));setTimeout(function(){a.D&&(a.f("Timed out trying to upgrade."),a.D.close())},Math.floor(6E4))}function bf(a,b,c){a.f("Realtime connection established.");a.I=b;a.L=1;a.Mc&&(a.Mc(c,a.xf),a.Mc=null);0===a.xe?(a.f("Primary connection is healthy."),a.Cb=!0):setTimeout(function(){gf(a)},Math.floor(5E3))} function gf(a){a.Cb||1!==a.L||(a.f("sending ping on primary."),jf(a,{t:"c",d:{t:"p",d:{}}}))}function jf(a,b){if(1!==a.L)throw"Connection is not connected";a.Xc.send(b)}Ye.prototype.close=function(){2!==this.L&&(this.f("Closing realtime connection."),this.L=2,ef(this),this.ja&&(this.ja(),this.ja=null))};function ef(a){a.f("Shutting down all connections");a.I&&(a.I.close(),a.I=null);a.D&&(a.D.close(),a.D=null);a.md&&(clearTimeout(a.md),a.md=null)};function L(a,b){if(1==arguments.length){this.o=a.split("/");for(var c=0,d=0;d=a.o.length?null:a.o[a.Z]}function Wd(a){return a.o.length-a.Z}function D(a){var b=a.Z;b=this.o.length)return null;for(var a=[],b=this.Z;b=this.o.length};g.ca=function(a){if(Wd(this)!==Wd(a))return!1;for(var b=this.Z,c=a.Z;b<=this.o.length;b++,c++)if(this.o[b]!==a.o[c])return!1;return!0}; - g.contains=function(a){var b=this.Z,c=a.Z;if(Wd(this)>Wd(a))return!1;for(;bWd(a))return!1;for(;b10485760/3&&10485760f;f++)b[f]=Math.floor(64*Math.random());for(f=0;12>f;f++)c+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(b[f]);H(20===c.length,"nextPushId: Length should be 20."); + c=new Hb;Lf(this.ta,this.qa,a,Ib(c,b));return c.ra};V.prototype.update=V.prototype.update;function Mf(a){H(da(a)&&0f;f++)b[f]=Math.floor(64*Math.random());for(f=0;12>f;f++)c+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(b[f]);H(20===c.length,"nextPushId: Length should be 20."); return c}}();function Rf(a,b){this.Oa=a;this.ba=b?b:Sf}g=Rf.prototype;g.Ra=function(a,b){return new Rf(this.Oa,this.ba.Ra(a,b,this.Oa).Y(null,null,!1,null,null))};g.remove=function(a){return new Rf(this.Oa,this.ba.remove(a,this.Oa).Y(null,null,!1,null,null))};g.get=function(a){for(var b,c=this.ba;!c.e();){b=this.Oa(a,c.key);if(0===b)return c.value;0>b?c=c.left:0c?d=d.left:0e)a=this.ke?a.left:a.right;else if(0===e){this.Sa.push(a);break}else this.Sa.push(a),a=this.ke?a.right:a.left} - function R(a){if(0===a.Sa.length)return null;var b=a.Sa.pop(),c;c=a.Hd?a.Hd(b.key,b.value):{key:b.key,value:b.value};if(a.ke)for(b=b.left;!b.e();)a.Sa.push(b),b=b.right;else for(b=b.right;!b.e();)a.Sa.push(b),b=b.left;return c}function Vf(a){if(0===a.Sa.length)return null;var b;b=a.Sa;b=b[b.length-1];return a.Hd?a.Hd(b.key,b.value):{key:b.key,value:b.value}}function Wf(a,b,c,d,e){this.key=a;this.value=b;this.color=null!=c?c:!0;this.left=null!=d?d:Sf;this.right=null!=e?e:Sf}g=Wf.prototype; + g.Xb=function(a){return new Uf(this.ba,null,this.Oa,!1,a)};g.Yb=function(a,b){return new Uf(this.ba,a,this.Oa,!1,b)};g.$b=function(a,b){return new Uf(this.ba,a,this.Oa,!0,b)};g.Ze=function(a){return new Uf(this.ba,null,this.Oa,!0,a)};function Uf(a,b,c,d,e){this.Hd=e||null;this.le=d;this.Sa=[];for(e=1;!a.e();)if(e=b?c(a.key,b):1,d&&(e*=-1),0>e)a=this.le?a.left:a.right;else if(0===e){this.Sa.push(a);break}else this.Sa.push(a),a=this.le?a.right:a.left} + function R(a){if(0===a.Sa.length)return null;var b=a.Sa.pop(),c;c=a.Hd?a.Hd(b.key,b.value):{key:b.key,value:b.value};if(a.le)for(b=b.left;!b.e();)a.Sa.push(b),b=b.right;else for(b=b.right;!b.e();)a.Sa.push(b),b=b.left;return c}function Vf(a){if(0===a.Sa.length)return null;var b;b=a.Sa;b=b[b.length-1];return a.Hd?a.Hd(b.key,b.value):{key:b.key,value:b.value}}function Wf(a,b,c,d,e){this.key=a;this.value=b;this.color=null!=c?c:!0;this.left=null!=d?d:Sf;this.right=null!=e?e:Sf}g=Wf.prototype; g.Y=function(a,b,c,d,e){return new Wf(null!=a?a:this.key,null!=b?b:this.value,null!=c?c:this.color,null!=d?d:this.left,null!=e?e:this.right)};g.count=function(){return this.left.count()+1+this.right.count()};g.e=function(){return!1};g.ia=function(a){return this.left.ia(a)||a(this.key,this.value)||this.right.ia(a)};function Xf(a){return a.left.e()?a:Xf(a.left)}g.Hc=function(){return Xf(this).key};g.fc=function(){return this.right.e()?this.key:this.right.fc()}; g.Ra=function(a,b,c){var d,e;e=this;d=c(a,e.key);e=0>d?e.Y(null,null,null,e.left.Ra(a,b,c),null):0===d?e.Y(null,b,null,null,null):e.Y(null,null,null,null,e.right.Ra(a,b,c));return Yf(e)};function Zf(a){if(a.left.e())return Sf;a.left.fa()||a.left.left.fa()||(a=$f(a));a=a.Y(null,null,null,Zf(a.left),null);return Yf(a)} g.remove=function(a,b){var c,d;c=this;if(0>b(a,c.key))c.left.e()||c.left.fa()||c.left.left.fa()||(c=$f(c)),c=c.Y(null,null,null,c.left.remove(a,b),null);else{c.left.fa()&&(c=ag(c));c.right.e()||c.right.fa()||c.right.left.fa()||(c=bg(c),c.left.left.fa()&&(c=ag(c),c=bg(c)));if(0===b(a,c.key)){if(c.right.e())return Sf;d=Xf(c.right);c=c.Y(d.key,d.value,null,null,Zf(c.right))}c=c.Y(null,null,null,null,c.right.remove(a,b))}return Yf(c)};g.fa=function(){return this.color}; @@ -938,49 +950,49 @@ function bg(a){return a.Y(null,null,!a.color,a.left.Y(null,null,!a.left.color,null,null),a.right.Y(null,null,!a.right.color,null,null))}function dg(){}g=dg.prototype;g.Y=function(){return this};g.Ra=function(a,b){return new Wf(a,b,null)};g.remove=function(){return this};g.count=function(){return 0};g.e=function(){return!0};g.ia=function(){return!1};g.Hc=function(){return null};g.fc=function(){return null};g.fa=function(){return!1};var Sf=new dg;function P(a,b,c){this.k=a;(this.aa=b)&&ne(this.aa);a.e()&&H(!this.aa||this.aa.e(),"An empty node cannot have a priority");this.zb=c;this.Eb=null}g=P.prototype;g.J=function(){return!1};g.C=function(){return this.aa||F};g.ga=function(a){return this.k.e()?this:new P(this.k,a,this.zb)};g.R=function(a){if(".priority"===a)return this.C();a=this.k.get(a);return null===a?F:a};g.Q=function(a){var b=J(a);return null===b?this:this.R(b).Q(D(a))};g.Fa=function(a){return null!==this.k.get(a)}; g.U=function(a,b){H(b,"We should always be passing snapshot nodes");if(".priority"===a)return this.ga(b);var c=new K(a,b),d,e;b.e()?(d=this.k.remove(a),c=Ie(this.zb,c,this.k)):(d=this.k.Ra(a,b),c=Ge(this.zb,c,this.k));e=d.e()?F:this.aa;return new P(d,e,c)};g.F=function(a,b){var c=J(a);if(null===c)return b;H(".priority"!==J(a)||1===Wd(a),".priority must be the last token in a path");var d=this.R(c).F(D(a),b);return this.U(c,d)};g.e=function(){return this.k.e()};g.Fb=function(){return this.k.count()}; var eg=/^(0|[1-9]\d*)$/;g=P.prototype;g.H=function(a){if(this.e())return null;var b={},c=0,d=0,e=!0;this.P(N,function(f,h){b[f]=h.H(a);c++;e&&eg.test(f)?d=Math.max(d,Number(f)):e=!1});if(!a&&e&&d<2*c){var f=[],h;for(h in b)f[h]=b[h];return f}a&&!this.C().e()&&(b[".priority"]=this.C().H());return b};g.hash=function(){if(null===this.Eb){var a="";this.C().e()||(a+="priority:"+pe(this.C().H())+":");this.P(N,function(b,c){var d=c.hash();""!==d&&(a+=":"+b+":"+d)});this.Eb=""===a?"":Yc(a)}return this.Eb}; - g.Xe=function(a,b,c){return(c=fg(this,c))?(a=Tf(c,new K(a,b)))?a.name:null:Tf(this.k,a)};function le(a,b){var c;c=(c=fg(a,b))?(c=c.Hc())&&c.name:a.k.Hc();return c?new K(c,a.k.get(c)):null}function me(a,b){var c;c=(c=fg(a,b))?(c=c.fc())&&c.name:a.k.fc();return c?new K(c,a.k.get(c)):null}g.P=function(a,b){var c=fg(this,a);return c?c.ia(function(a){return b(a.name,a.S)}):this.k.ia(b)};g.Xb=function(a){return this.Yb(a.Ic(),a)}; - g.Yb=function(a,b){var c=fg(this,b);if(c)return c.Yb(a,function(a){return a});for(var c=this.k.Yb(a.name,Nc),d=Vf(c);null!=d&&0>b.compare(d,a);)R(c),d=Vf(c);return c};g.Ye=function(a){return this.$b(a.Gc(),a)};g.$b=function(a,b){var c=fg(this,b);if(c)return c.$b(a,function(a){return a});for(var c=this.k.$b(a.name,Nc),d=Vf(c);null!=d&&0b.compare(d,a);)R(c),d=Vf(c);return c};g.Ze=function(a){return this.$b(a.Gc(),a)};g.$b=function(a,b){var c=fg(this,b);if(c)return c.$b(a,function(a){return a});for(var c=this.k.$b(a.name,Nc),d=Vf(c);null!=d&&0=a)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.me(a),this.Oc)}; - g.ne=function(a){y("Query.limitToLast",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.ne(a),this.Oc)}; - g.jg=function(a){y("Query.orderByChild",1,1,arguments.length);if("$key"===a)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===a)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===a)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Hf("Query.orderByChild",a);sg(this,"Query.orderByChild");var b=new L(a);if(b.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead."); - b=new te(b);b=De(this.n,b);qg(b);return new X(this.w,this.path,b,!0)};g.kg=function(){y("Query.orderByKey",0,0,arguments.length);sg(this,"Query.orderByKey");var a=De(this.n,ae);qg(a);return new X(this.w,this.path,a,!0)};g.lg=function(){y("Query.orderByPriority",0,0,arguments.length);sg(this,"Query.orderByPriority");var a=De(this.n,N);qg(a);return new X(this.w,this.path,a,!0)}; - g.mg=function(){y("Query.orderByValue",0,0,arguments.length);sg(this,"Query.orderByValue");var a=De(this.n,ze);qg(a);return new X(this.w,this.path,a,!0)};g.Nd=function(a,b){y("Query.startAt",0,2,arguments.length);Af("Query.startAt",a,this.path,!0);Gf("Query.startAt",b);var c=this.n.Nd(a,b);rg(c);qg(c);if(this.n.ka)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");p(a)||(b=a=null);return new X(this.w,this.path,c,this.Oc)}; + g.jg=function(a,b){function c(k){f&&(f=!1,e.Jc(a,c),b&&b.call(d.Pa,k),h.resolve(k))}y("Query.once",1,4,arguments.length);Ff("Query.once",a,!1);A("Query.once",2,b,!0);var d=tg("Query.once",arguments[2],arguments[3]),e=this,f=!0,h=new Hb;Jb(h.ra);this.hc(a,c,function(b){e.Jc(a,c);d.cancel&&d.cancel.call(d.Pa,b);h.reject(b)});return h.ra}; + g.ne=function(a){y("Query.limitToFirst",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.ne(a),this.Oc)}; + g.oe=function(a){y("Query.limitToLast",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.oe(a),this.Oc)}; + g.kg=function(a){y("Query.orderByChild",1,1,arguments.length);if("$key"===a)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===a)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===a)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Hf("Query.orderByChild",a);sg(this,"Query.orderByChild");var b=new L(a);if(b.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead."); + b=new te(b);b=De(this.n,b);qg(b);return new X(this.w,this.path,b,!0)};g.lg=function(){y("Query.orderByKey",0,0,arguments.length);sg(this,"Query.orderByKey");var a=De(this.n,ae);qg(a);return new X(this.w,this.path,a,!0)};g.mg=function(){y("Query.orderByPriority",0,0,arguments.length);sg(this,"Query.orderByPriority");var a=De(this.n,N);qg(a);return new X(this.w,this.path,a,!0)}; + g.ng=function(){y("Query.orderByValue",0,0,arguments.length);sg(this,"Query.orderByValue");var a=De(this.n,ze);qg(a);return new X(this.w,this.path,a,!0)};g.Nd=function(a,b){y("Query.startAt",0,2,arguments.length);Af("Query.startAt",a,this.path,!0);Gf("Query.startAt",b);var c=this.n.Nd(a,b);rg(c);qg(c);if(this.n.ka)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");p(a)||(b=a=null);return new X(this.w,this.path,c,this.Oc)}; g.fd=function(a,b){y("Query.endAt",0,2,arguments.length);Af("Query.endAt",a,this.path,!0);Gf("Query.endAt",b);var c=this.n.fd(a,b);rg(c);qg(c);if(this.n.na)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new X(this.w,this.path,c,this.Oc)}; - g.Pf=function(a,b){y("Query.equalTo",1,2,arguments.length);Af("Query.equalTo",a,this.path,!1);Gf("Query.equalTo",b);if(this.n.ka)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Nd(a,b).fd(a,b)}; + g.Qf=function(a,b){y("Query.equalTo",1,2,arguments.length);Af("Query.equalTo",a,this.path,!1);Gf("Query.equalTo",b);if(this.n.ka)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Nd(a,b).fd(a,b)}; g.toString=function(){y("Query.toString",0,0,arguments.length);for(var a=this.path,b="",c=a.Z;c=b&&$g(h,c.path)?d=!1:c.path.contains(h.path)&&(e=!0));f--}if(d){if(e)this.T=ah(this.la,bh,C),this.Cc=0f.Cc,"Stacking an older write on top of newer ones");p(h)||(h=!0);f.la.push({path:b,Ja:c,Zc:d,visible:h});h&&(f.T=Og(f.T,b,c));f.Cc=d;return e?Bh(a,new Zb(Jg,b,c)):[]}function Ch(a,b,c,d){var e=a.lb;H(d>e.Cc,"Stacking an older merge on top of newer ones");e.la.push({path:b,children:c,Zc:d,visible:!0});e.T=Pg(e.T,b,c);e.Cc=d;c=xg(c);return Bh(a,new Cd(Jg,b,c))} + function rh(a,b,c){E("Auth token revoked: "+b+"/"+c);a.pb=null;a.de=!0;a.Ia.close();"invalid_token"===b&&(a.ke++,3<=a.ke&&(a.Va=3E4,O("Provided authentication credentials are invalid. This usually indicates your FirebaseApp instance was not initialized correctly. Make sure your apiKey and databaseURL match the values provided for your app at https://console.firebase.google.com/, or if you're using a service account, make sure it's authorized to access the specified databaseURL and is from the correct project.")))} + function wh(a){qh(a);t(a.$,function(b){t(b,function(b){oh(a,b)})});for(var b=0;bf.Cc,"Stacking an older write on top of newer ones");p(h)||(h=!0);f.la.push({path:b,Ja:c,Zc:d,visible:h});h&&(f.T=Og(f.T,b,c));f.Cc=d;return e?Bh(a,new Zb(Jg,b,c)):[]}function Ch(a,b,c,d){var e=a.lb;H(d>e.Cc,"Stacking an older merge on top of newer ones");e.la.push({path:b,children:c,Zc:d,visible:!0});e.T=Pg(e.T,b,c);e.Cc=d;c=xg(c);return Bh(a,new Cd(Jg,b,c))} function Dh(a,b,c){c=c||!1;var d=Zg(a.lb,b);if(a.lb.Ed(b)){var e=Q;null!=d.Ja?e=e.set(C,!0):Cb(d.children,function(a,b){e=e.set(new L(a),b)});return Bh(a,new Ig(d.path,e,c))}return[]}function Eh(a,b,c){c=xg(c);return Bh(a,new Cd(Lg,b,c))}function Fh(a,b,c,d){d=Gh(a,d);if(null!=d){var e=Hh(d);d=e.path;e=e.Ib;b=T(d,b);c=new Zb(new Kg(!1,!0,e,!0),b,c);return Ih(a,d,c)}return[]} function Jh(a,b,c,d){if(d=Gh(a,d)){var e=Hh(d);d=e.path;e=e.Ib;b=T(d,b);c=xg(c);c=new Cd(new Kg(!1,!0,e,!0),b,c);return Ih(a,d,c)}return[]} - zh.prototype.Ob=function(a,b){var c=a.path,d=null,e=!1;Eg(this.wa,c,function(a,b){var f=T(a,c);d=d||b.jb(f);e=e||null!=Vg(b)});var f=this.wa.get(c);f?(e=e||null!=Vg(f),d=d||f.jb(C)):(f=new Ug,this.wa=this.wa.set(c,f));var h;null!=d?h=!0:(h=!1,d=F,Hg(this.wa.subtree(c),function(a,b){var c=b.jb(C);c&&(d=d.U(a,c))}));var k=null!=Xg(f,a);if(!k&&!S(a.n)){var m=Kh(a);H(!(m in this.jc),"View does not exist, but we have a tag");var l=Lh++;this.jc[m]=l;this.Ce["_"+l]=m}h=f.Ob(a,b,new ch(c,this.lb),d,h);k|| + zh.prototype.Ob=function(a,b){var c=a.path,d=null,e=!1;Eg(this.wa,c,function(a,b){var f=T(a,c);d=d||b.jb(f);e=e||null!=Vg(b)});var f=this.wa.get(c);f?(e=e||null!=Vg(f),d=d||f.jb(C)):(f=new Ug,this.wa=this.wa.set(c,f));var h;null!=d?h=!0:(h=!1,d=F,Hg(this.wa.subtree(c),function(a,b){var c=b.jb(C);c&&(d=d.U(a,c))}));var k=null!=Xg(f,a);if(!k&&!S(a.n)){var m=Kh(a);H(!(m in this.jc),"View does not exist, but we have a tag");var l=Lh++;this.jc[m]=l;this.De["_"+l]=m}h=f.Ob(a,b,new ch(c,this.lb),d,h);k|| e||(f=Xg(f,a),h=h.concat(Mh(this,a,f)));return h}; - zh.prototype.mb=function(a,b,c){var d=a.path,e=this.wa.get(d),f=[];if(e&&("default"===a.ya()||null!=Xg(e,a))){f=e.mb(a,b,c);e.e()&&(this.wa=this.wa.remove(d));e=f.qg;f=f.Rf;b=-1!==Pa(e,function(a){return S(a.n)});var h=Cg(this.wa,d,function(a,b){return null!=Vg(b)});if(b&&!h&&(d=this.wa.subtree(d),!d.e()))for(var d=Nh(d),k=0;k>>0),fa=0,ga=function(a,b,c){return a.call.apply(a.bind, arguments)},ha=function(a,b,c){if(!a)throw Error();if(2h&&(h*=2);var c;1===v?(v=2,c=0):c=1E3*(h+Math.random());e(c)}}function g(a){Sb||(Sb=!0,O||(null!==l?(a||(v=2),clearTimeout(l),e(0)):a||(v=1)))}var h=1,l=null,B=!1,v=0,O=!1,Sb=!1;e(0);setTimeout(function(){B=!0;g(!0)},c);return g};var ka="https://firebasestorage.googleapis.com";var w=function(a,b){this.code="storage/"+a;this.message="Firebase Storage: "+b;this.serverResponse=null;this.name="FirebaseError"};u(w,Error); - var la=function(){return new w("unknown","An unknown error occurred, please check the error payload for server response.")},ma=function(){return new w("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again.")},na=function(a){return new w("unauthorized","User does not have permission to access '"+a+"'.")},oa=function(){return new w("canceled","User canceled the upload/download.")},pa=function(a,b,c){return new w("invalid-argument","Invalid argument in `"+ - b+"` at index "+a+": "+c)},qa=function(){return new w("app-deleted","The Firebase app was deleted.")};var ra=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])},sa=function(a){var b={};ra(a,function(a,d){b[a]=d});return b};var x=function(a,b,c,d){this.l=a;this.f={};this.i=b;this.b={};this.c="";this.N=c;this.g=this.a=null;this.h=[200];this.j=d};var ta={STATE_CHANGED:"state_changed"},ua={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},va=function(a){switch(a){case "running":case "pausing":case "canceling":return"running";case "paused":return"paused";case "success":return"success";case "canceled":return"canceled";case "error":return"error";default:return"error"}};var y=function(a){return n(a)&&null!==a},wa=function(a){return"string"===typeof a||a instanceof String};var xa=function(a,b,c){this.f=c;this.c=a;this.g=b;this.b=0;this.a=null};xa.prototype.get=function(){var a;0b?1:0};var Na=function(a,b){this.a=a;this.b=b};Na.prototype.clone=function(){return new Na(this.a,this.b)};var z=function(a,b){this.bucket=a;this.path=b},Oa=function(a){var b=encodeURIComponent;return"/b/"+b(a.bucket)+"/o/"+b(a.path)},Pa=function(a){for(var b=null,c=[{ja:/^gs:\/\/([A-Za-z0-9.\-]+)(\/(.*))?$/i,aa:{bucket:1,path:3},ia:function(a){"/"===a.path.charAt(a.path.length-1)&&(a.path=a.path.slice(0,-1))}},{ja:/^https?:\/\/firebasestorage\.googleapis\.com\/v[A-Za-z0-9_]+\/b\/([A-Za-z0-9.\-]+)\/o(\/([^?#]*).*)?$/i,aa:{bucket:1,path:3},ia:function(a){a.path=decodeURIComponent(a.path)}}],d=0;dc?Math.max(0,a.length+c):c;if(q(a))return q(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:q(a)?a.charAt(b):a[b]},lb=function(a){if("array"!=p(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},mb=function(a,b){b=eb(a,b);var c;if(c=0<=b)C(null!=a.length),Array.prototype.splice.call(a,b,1);return c},nb=function(a){var b= - a.length;if(0=this.o()){for(var c=this.a,d=0;d>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c};k=Fb.prototype;k.w=function(){for(var a=this.a,b=[],c=a.length,d=0;dh&&(h*=2);var c;1===w?(w=2,c=0):c=1E3*(h+Math.random());e(c)}}function g(a){Sb||(Sb=!0,N||(null!==l?(a||(w=2),clearTimeout(l),e(0)):a||(w=1)))}var h=1,l=null,B=!1,w=0,N=!1,Sb=!1;e(0);setTimeout(function(){B=!0;g(!0)},c);return g};var ka="https://firebasestorage.googleapis.com";var v=function(a,b){this.code="storage/"+a;this.message="Firebase Storage: "+b;this.serverResponse=null;this.name="FirebaseError"};u(v,Error);var la=function(){return new v("unknown","An unknown error occurred, please check the error payload for server response.")},ma=function(){return new v("canceled","User canceled the upload/download.")},na=function(a,b,c){return new v("invalid-argument","Invalid argument in `"+b+"` at index "+a+": "+c)},oa=function(){return new v("app-deleted","The Firebase app was deleted.")};var pa=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])},qa=function(a){var b={};pa(a,function(a,d){b[a]=d});return b};var x=function(a,b,c,d){this.l=a;this.f={};this.i=b;this.b={};this.c="";this.N=c;this.g=this.a=null;this.h=[200];this.j=d};var ra={STATE_CHANGED:"state_changed"},sa={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},ta=function(a){switch(a){case "running":case "pausing":case "canceling":return"running";case "paused":return"paused";case "success":return"success";case "canceled":return"canceled";case "error":return"error";default:return"error"}};var y=function(a){return n(a)&&null!==a},ua=function(a){return"string"===typeof a||a instanceof String};var va=function(a,b,c){this.f=c;this.c=a;this.g=b;this.b=0;this.a=null};va.prototype.get=function(){var a;0b?1:0};var Ka=function(a,b){this.a=a;this.b=b};Ka.prototype.clone=function(){return new Ka(this.a,this.b)};var z=function(a,b){this.bucket=a;this.path=b},La=function(a){var b=encodeURIComponent;return"/b/"+b(a.bucket)+"/o/"+b(a.path)},Ma=function(a){for(var b=null,c=[{ja:/^gs:\/\/([A-Za-z0-9.\-]+)(\/(.*))?$/i,aa:{bucket:1,path:3},ia:function(a){"/"===a.path.charAt(a.path.length-1)&&(a.path=a.path.slice(0,-1))}},{ja:/^https?:\/\/firebasestorage\.googleapis\.com\/v[A-Za-z0-9_]+\/b\/([A-Za-z0-9.\-]+)\/o(\/([^?#]*).*)?$/i,aa:{bucket:1,path:3},ia:function(a){a.path=decodeURIComponent(a.path)}}],d=0;dc?Math.max(0,a.length+c):c;if(q(a))return q(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:q(a)?a.charAt(b):a[b]},ib=function(a){if("array"!=p(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},jb=function(a,b){b=bb(a,b);var c;if(c=0<=b)C(null!=a.length),Array.prototype.splice.call(a,b,1);return c},kb=function(a){var b= + a.length;if(0=this.o()){for(var c=this.a,d=0;d>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c};k=Cb.prototype;k.w=function(){for(var a=this.a,b=[],c=a.length,d=0;dparseFloat(Yb)){Xb=String($b);break a}}Xb=Yb} - var ac=Xb,bc={},G=function(a){var b;if(!(b=bc[a])){b=0;for(var c=La(String(ac)).split("."),d=La(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&fparseFloat(Vb)){Ub=String(Xb);break a}}Ub=Vb} + var Yb=Ub,Zb={},G=function(a){var b;if(!(b=Zb[a])){b=0;for(var c=Ia(String(Yb)).split("."),d=Ia(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f2*a.c&&nc(a),!0):!1},nc=function(a){if(a.c!=a.a.length){for(var b=0,c=0;b=d.a.length)throw Ob;var e=d.a[b++];return a?e:d.b[e]};return e};var pc=function(a,b){sb.call(this,a?a.type:"");this.c=this.a=this.target=null;if(a){this.type=a.type;this.target=a.target||a.srcElement;this.a=b;if((b=a.relatedTarget)&&Ub)try{Ja(b.nodeName)}catch(c){}this.c=a;a.defaultPrevented&&this.b()}};u(pc,sb);pc.prototype.b=function(){pc.G.b.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,lc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var H=function(a,b){this.a=0;this.i=void 0;this.c=this.b=this.f=null;this.g=this.h=!1;if(a!=ba)try{var c=this;a.call(b,function(a){qc(c,2,a)},function(a){try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}qc(c,3,a)})}catch(d){qc(this,3,d)}},rc=function(){this.next=this.f=this.c=this.a=this.b=null;this.g=!1};rc.prototype.reset=function(){this.f=this.c=this.a=this.b=null;this.g=!1}; - var sc=new xa(function(){return new rc},function(a){a.reset()},100),tc=function(a,b,c){var d=sc.get();d.a=a;d.c=b;d.f=c;return d},uc=function(a){if(a instanceof H)return a;var b=new H(ba);qc(b,2,a);return b},vc=function(a){return new H(function(b,c){c(a)})}; - H.prototype.then=function(a,b,c){null!=a&&Wa(a,"opt_onFulfilled should be a function.");null!=b&&Wa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return wc(this,r(a)?a:null,r(b)?b:null,c)};Ha(H);H.prototype.l=function(a,b){return wc(this,null,a,b)}; - var yc=function(a,b){a.b||2!=a.a&&3!=a.a||xc(a);C(null!=b.a);a.c?a.c.next=b:a.b=b;a.c=b},wc=function(a,b,c,d){var e=tc(null,null,null);e.b=new H(function(a,g){e.a=b?function(c){try{var e=b.call(d,c);a(e)}catch(B){g(B)}}:a;e.c=c?function(b){try{var e=c.call(d,b);a(e)}catch(B){g(B)}}:g});e.b.f=a;yc(a,e);return e.b};H.prototype.s=function(a){C(1==this.a);this.a=0;qc(this,2,a)};H.prototype.m=function(a){C(1==this.a);this.a=0;qc(this,3,a)}; - var qc=function(a,b,c){if(0==a.a){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.a=1;var d;a:{var e=c,f=a.s,g=a.m;if(e instanceof H)null!=f&&Wa(f,"opt_onFulfilled should be a function."),null!=g&&Wa(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),yc(e,tc(f||ba,g||null,a)),d=!0;else if(Ia(e))e.then(f,g,a),d=!0;else{if(da(e))try{var h=e.then;if(r(h)){zc(e,h,f,g,a);d=!0;break a}}catch(l){g.call(a,l);d=!0;break a}d=!1}}d|| - (a.i=c,a.a=b,a.f=null,xc(a),3!=b||Ac(a,c))}},zc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},h=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,h)}catch(l){h(l)}},xc=function(a){a.h||(a.h=!0,hc(a.j,a))},Bc=function(a){var b=null;a.b&&(b=a.b,a.b=b.next,b.next=null);a.b||(a.c=null);null!=b&&C(null!=b.a);return b}; - H.prototype.j=function(){for(var a;a=Bc(this);){var b=this.a,c=this.i;if(3==b&&a.c&&!a.g){var d;for(d=this;d&&d.g;d=d.f)d.g=!1}if(a.b)a.b.f=null,Cc(a,b,c);else try{a.g?a.a.call(a.f):Cc(a,b,c)}catch(e){Dc.call(null,e)}ya(sc,a)}this.h=!1};var Cc=function(a,b,c){2==b?a.a.call(a.f,c):a.c&&a.c.call(a.f,c)},Ac=function(a,b){a.g=!0;hc(function(){a.g&&Dc.call(null,b)})},Dc=Lb;var Fc=function(a){this.a=new mc;if(a){a=Jb(a);for(var b=a.length,c=0;cd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode= - -1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.a;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;0<=e;e--){b.a=d[e];var f=Wc(d[e],a,!0,b),c=c&&f}for(e=0;e>>0),Lc=function(a){C(a,"Listener can not be null.");if(r(a))return a;C(a.handleEvent,"An object listener must have handleEvent method."); - a[Xc]||(a[Xc]=function(b){return a.handleEvent(b)});return a[Xc]};var I=function(a,b){D.call(this);this.l=a||0;this.c=b||10;if(this.l>this.c)throw Error("[goog.structs.Pool] Min can not be greater than max");this.a=new Hb;this.b=new Fc;this.i=null;this.S()};u(I,D);I.prototype.W=function(){var a=ia();if(!(null!=this.i&&0>a-this.i)){for(var b;0this.c&&02*a.c&&kc(a),!0):!1},kc=function(a){if(a.c!=a.a.length){for(var b=0,c=0;b=d.a.length)throw Lb;var e=d.a[b++];return a?e:d.b[e]};return e};var mc=function(a,b){pb.call(this,a?a.type:"");this.c=this.a=this.target=null;if(a){this.type=a.type;this.target=a.target||a.srcElement;this.a=b;if((b=a.relatedTarget)&&Qb)try{Ga(b.nodeName)}catch(c){}this.c=a;a.defaultPrevented&&this.b()}};u(mc,pb);mc.prototype.b=function(){mc.G.b.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ic)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var H=function(a,b){this.a=0;this.i=void 0;this.c=this.b=this.f=null;this.g=this.h=!1;if(a!=ba)try{var c=this;a.call(b,function(a){nc(c,2,a)},function(a){try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}nc(c,3,a)})}catch(d){nc(this,3,d)}},oc=function(){this.next=this.f=this.c=this.a=this.b=null;this.g=!1};oc.prototype.reset=function(){this.f=this.c=this.a=this.b=null;this.g=!1}; + var pc=new va(function(){return new oc},function(a){a.reset()},100),qc=function(a,b,c){var d=pc.get();d.a=a;d.c=b;d.f=c;return d},rc=function(a){if(a instanceof H)return a;var b=new H(ba);nc(b,2,a);return b},sc=function(a){return new H(function(b,c){c(a)})}; + H.prototype.then=function(a,b,c){null!=a&&Sa(a,"opt_onFulfilled should be a function.");null!=b&&Sa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return tc(this,r(a)?a:null,r(b)?b:null,c)};Ea(H);H.prototype.l=function(a,b){return tc(this,null,a,b)}; + var vc=function(a,b){a.b||2!=a.a&&3!=a.a||uc(a);C(null!=b.a);a.c?a.c.next=b:a.b=b;a.c=b},tc=function(a,b,c,d){var e=qc(null,null,null);e.b=new H(function(a,g){e.a=b?function(c){try{var e=b.call(d,c);a(e)}catch(B){g(B)}}:a;e.c=c?function(b){try{var e=c.call(d,b);a(e)}catch(B){g(B)}}:g});e.b.f=a;vc(a,e);return e.b};H.prototype.s=function(a){C(1==this.a);this.a=0;nc(this,2,a)};H.prototype.m=function(a){C(1==this.a);this.a=0;nc(this,3,a)}; + var nc=function(a,b,c){if(0==a.a){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.a=1;var d;a:{var e=c,f=a.s,g=a.m;if(e instanceof H)null!=f&&Sa(f,"opt_onFulfilled should be a function."),null!=g&&Sa(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),vc(e,qc(f||ba,g||null,a)),d=!0;else if(Fa(e))e.then(f,g,a),d=!0;else{if(da(e))try{var h=e.then;if(r(h)){wc(e,h,f,g,a);d=!0;break a}}catch(l){g.call(a,l);d=!0;break a}d=!1}}d|| + (a.i=c,a.a=b,a.f=null,uc(a),3!=b||xc(a,c))}},wc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},h=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,h)}catch(l){h(l)}},uc=function(a){a.h||(a.h=!0,ec(a.j,a))},yc=function(a){var b=null;a.b&&(b=a.b,a.b=b.next,b.next=null);a.b||(a.c=null);null!=b&&C(null!=b.a);return b}; + H.prototype.j=function(){for(var a;a=yc(this);){var b=this.a,c=this.i;if(3==b&&a.c&&!a.g){var d;for(d=this;d&&d.g;d=d.f)d.g=!1}if(a.b)a.b.f=null,zc(a,b,c);else try{a.g?a.a.call(a.f):zc(a,b,c)}catch(e){Ac.call(null,e)}wa(pc,a)}this.h=!1};var zc=function(a,b,c){2==b?a.a.call(a.f,c):a.c&&a.c.call(a.f,c)},xc=function(a,b){a.g=!0;ec(function(){a.g&&Ac.call(null,b)})},Ac=Ib;var Cc=function(a){this.a=new jc;if(a){a=Gb(a);for(var b=a.length,c=0;cd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode= + -1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.a;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;0<=e;e--){b.a=d[e];var f=Tc(d[e],a,!0,b),c=c&&f}for(e=0;e>>0),Ic=function(a){C(a,"Listener can not be null.");if(r(a))return a;C(a.handleEvent,"An object listener must have handleEvent method."); + a[Uc]||(a[Uc]=function(b){return a.handleEvent(b)});return a[Uc]};var I=function(a,b){D.call(this);this.l=a||0;this.c=b||10;if(this.l>this.c)throw Error("[goog.structs.Pool] Min can not be greater than max");this.a=new Eb;this.b=new Cc;this.i=null;this.S()};u(I,D);I.prototype.W=function(){var a=ia();if(!(null!=this.i&&0>a-this.i)){for(var b;0this.c&&0=ld(this).value)for(r(b)&&(b=b()),a=new Aa(a,String(b),this.f),c&&(a.a=c),c="log:"+a.b,m.console&&(m.console.timeStamp?m.console.timeStamp(c):m.console.markTimeline&&m.console.markTimeline(c)),m.msWriteProfilerMark&&m.msWriteProfilerMark(c),c=this;c;)c=c.a}; - var md={},nd=null,od=function(a){nd||(nd=new gd(""),md[""]=nd,nd.c=jd);var b;if(!(b=md[a])){b=new gd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=od(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;md[a]=b}return b};var J=function(){D.call(this);this.b=new yb(this);this.ma=this;this.I=null};u(J,D);J.prototype[Xa]=!0;J.prototype.removeEventListener=function(a,b,c,d){Tc(this,a,b,c,d)}; - var K=function(a,b){Mc(a);var c,d=a.I;if(d){c=[];for(var e=1;d;d=d.I)c.push(d),C(1E3>++e,"infinite loop")}a=a.ma;d=b.type||b;q(b)?b=new sb(b,a):b instanceof sb?b.target=b.target||a:(e=b,b=new sb(d,a),Ga(b,e));var e=!0,f;if(c)for(var g=c.length-1;0<=g;g--)f=b.a=c[g],e=pd(f,d,!0,b)&&e;f=b.a=a;e=pd(f,d,!0,b)&&e;e=pd(f,d,!1,b)&&e;if(c)for(g=0;g=f)c=void 0;else{if(1==f)lb(e);else{e[0]=e.pop();for(var e=0,d=d.a,f=d.length,g=d[e];e>1;){var h=2*e+1,l=2*e+2,h=lg.a)break;d[e]=d[h];e=h}d[e]=g}c=c.b}c.apply(this,[b])}else break}}; - k.Y=function(a){L.G.Y.call(this,a);this.$()};k.S=function(){L.G.S.call(this);this.$()};k.A=function(){L.G.A.call(this);m.clearTimeout(void 0);this.f.clear();this.f=null};var M=function(a,b){a&&a.log(kd,b,void 0)};var qd=function(a,b,c){if(r(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647g||429===g?(f=7===b.J,Zc(b),a(!1,new Ld(!1,null,f))):(f=0<=eb(d.I,g),a(!0,new Ld(f,b)))})})}function c(a,b){var c=d.l;a=d.s;var h=b.c;if(b.b)try{var l=d.v(h,Gd(h));n(l)?c(l):c()}catch(B){a(B)}else null!==h?(b=la(),l=Gd(h),b.serverResponse=l,d.j?a(d.j(h,b)):a(b)):(b=b.a?d.h?qa():oa():new w("retry-limit-exceeded","Max retry time for operation exceeded, please try again."), - a(b));Zc(h)}var d=a;a.i?c(0,new Ld(!1,null,!0)):a.f=ja(b,c,a.K)};Kd.prototype.a=function(){return this.C};Kd.prototype.b=function(a){this.i=!0;this.h=a||!1;null!==this.f&&(0,this.f)(!1);null!==this.c&&yd(this.c)};var Md=function(a,b,c){var d=Ra(a.f),d=a.l+d,e=a.b?sa(a.b):{};null!==b&&0b&&(b+=a.size),0>b&&(b=0),0>c&&(c+=a.size),cb.length?b:xb(b)};a.push(b);b=new S("size");b.a=function(a,b){return y(b)?+b:b};a.push(b);a.push(new S("timeCreated"));a.push(new S("updated"));a.push(new S("md5Hash",null,!0));a.push(new S("cacheControl", - null,!0));a.push(new S("contentDisposition",null,!0));a.push(new S("contentEncoding",null,!0));a.push(new S("contentLanguage",null,!0));a.push(new S("contentType",null,!0));a.push(new S("metadata","customMetadata",!0));a.push(new S("downloadTokens","downloadURLs",!1,function(a,b){if(!(wa(b)&&0l;l++)h+=Math.random().toString().slice(2);g["Content-Type"]="multipart/related; boundary="+h;e=le(b,d,e);l=Yd(e,c);d=Nd("--"+h+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+l+"\r\n--"+h+"\r\nContent-Type: "+e.contentType+"\r\n\r\n",d,"\r\n--"+h+"--");a=new x(ka+"/v0"+f,"POST",ge(a,c),a.b);a.f={name:e.fullPath};a.b=g;a.c=d;a.a=ie(b);return a},ne=function(a,b,c,d){this.a=a;this.total=b;this.b=!!c;this.c=d||null},oe=function(a, - b){var c;try{c=Hd(a,"X-Goog-Upload-Status")}catch(d){fe(!1)}a=0<=eb(b||["active"],c);fe(a);return c},pe=function(a,b,c,d,e){var f="/b/"+encodeURIComponent(b.bucket)+"/o",g=le(b,d,e);e={name:g.fullPath};f=ka+"/v0"+f;d={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":d.size,"X-Goog-Upload-Header-Content-Type":g.contentType,"Content-Type":"application/json; charset=utf-8"};c=Yd(g,c);a=new x(f,"POST",function(a){oe(a);var b;try{b=Hd(a,"X-Goog-Upload-URL")}catch(c){fe(!1)}fe(wa(b)); - return b},a.b);a.f=e;a.b=d;a.c=c;a.a=ie(b);return a},qe=function(a,b,c,d){a=new x(c,"POST",function(a){var b=oe(a,["active","final"]),c;try{c=Hd(a,"X-Goog-Upload-Size-Received")}catch(h){fe(!1)}a=c;isFinite(a)&&(a=String(a));a=q(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN;fe(!isNaN(a));return new ne(a,d.size,"final"===b)},a.b);a.b={"X-Goog-Upload-Command":"query"};a.a=ie(b);return a},re=function(a,b,c,d,e,f){var g=new ne(0,0);f?(g.a=f.a,g.total=f.total):(g.a=0,g.total=d.size);if(d.size!== - g.total)throw new w("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var h=f=g.total-g.a,h=Math.min(h,262144),l=g.a;f={"X-Goog-Upload-Command":h===f?"upload, finalize":"upload","X-Goog-Upload-Offset":g.a};l=Od(d,l,l+h);if(null===l)throw new w("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.");c=new x(c,"POST",function(a,c){var f=oe(a,["active","final"]),l=g.a+h,Cd=d.size,Va;"final"===f?Va=ge(b,e)(a,c):Va=null;return new ne(l, - Cd,"final"===f,Va)},b.b);c.b=f;c.c=l;c.g=null;c.a=ie(a);return c};var W=function(a,b,c,d,e,f){this.K=a;this.c=b;this.i=c;this.f=e;this.h=f||null;this.l=d;this.j=0;this.B=this.s=!1;this.v=[];this.R=262144c&&Be(a)}, - V=function(a,b){if(a.b!==b)switch(b){case "canceling":a.b=b;null!==a.a&&a.a.b();break;case "pausing":a.b=b;null!==a.a&&a.a.b();break;case "running":var c="paused"===a.b;a.b=b;c&&(Be(a),te(a));break;case "paused":a.b=b;Be(a);break;case "canceled":a.g=oa();a.b=b;Be(a);break;case "error":a.b=b;Be(a);break;case "success":a.b=b,Be(a)}},se=function(a){switch(a.b){case "pausing":V(a,"paused");break;case "canceling":V(a,"canceled");break;case "running":te(a)}}; - W.prototype.C=function(){return new A(this.j,this.f.size,va(this.b),this.h,this,this.K)}; - W.prototype.I=function(a,b,c,d){function e(a){try{g(a);return}catch(b){}try{if(h(a),!(n(a.next)||n(a.error)||n(a.complete)))throw"";}catch(b){throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";}}function f(a){return function(b,c,d){null!==a&&T("on",a,arguments);var e=new Qa(b,c,d);Ce(l,e);return function(){mb(l.v,e)}}}var g=ee().a,h=de(null,!0).a;T("on",[ae(function(){if("state_changed"!==a)throw"Expected one of the event types: [state_changed].";}),de(e,!0), - ee(),ee()],arguments);var l=this,B=[de(function(a){if(null===a)throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";e(a)}),ee(),ee()];return n(b)||n(c)||n(d)?f(null)(b,c,d):f(B)}; - var Ce=function(a,b){a.v.push(b);De(a,b)},Be=function(a){var b=nb(a.v);fb(b,function(b){De(a,b)})},De=function(a,b){switch(va(a.b)){case "running":case "paused":null!==b.next&&Gc(b.next.bind(b,a.C()))();break;case "success":null!==b.a&&Gc(b.a.bind(b))();break;case "canceled":case "error":null!==b.error&&Gc(b.error.bind(b,a.g))();break;default:null!==b.error&&Gc(b.error.bind(b,a.g))()}}; - W.prototype.M=function(){T("resume",[],arguments);var a="paused"===this.b||"pausing"===this.b;a&&V(this,"running");return a};W.prototype.L=function(){T("pause",[],arguments);var a="running"===this.b;a&&V(this,"pausing");return a};W.prototype.H=function(){T("cancel",[],arguments);var a="running"===this.b||"pausing"===this.b;a&&V(this,"canceling");return a};var X=function(a,b){this.b=a;if(b)this.a=b instanceof z?b:Pa(b);else if(a=a.bucket(),null!==a)this.a=new z(a,"");else throw new w("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");};X.prototype.toString=function(){T("toString",[],arguments);return"gs://"+this.a.bucket+"/"+this.a.path};var Ee=function(a,b){return new X(a,b)};k=X.prototype; - k.ga=function(a){T("child",[ae()],arguments);var b=wb(this.a.path,a);return Ee(this.b,new z(this.a.bucket,b))};k.Fa=function(){var a;a=this.a.path;if(0==a.length)a=null;else{var b=a.lastIndexOf("/");a=-1===b?"":a.slice(0,b)}return null===a?null:Ee(this.b,new z(this.a.bucket,a))};k.Ha=function(){return Ee(this.b,new z(this.a.bucket,""))};k.pa=function(){return this.a.bucket};k.Aa=function(){return this.a.path};k.Ea=function(){return xb(this.a.path)};k.Ja=function(){return this.b.i}; - k.ua=function(a,b){T("put",[be(),new U(Zd,!0)],arguments);Fe(this,"put");return new W(this,this.b,this.a,Wd(),a,b)};k.delete=function(){T("delete",[],arguments);Fe(this,"delete");var a=this;return Td(this.b).then(function(b){var c=ke(a.b,a.a);return R(a.b,c,b).a()})};k.ha=function(){T("getMetadata",[],arguments);Fe(this,"getMetadata");var a=this;return Td(this.b).then(function(b){var c=je(a.b,a.a,Wd());return R(a.b,c,b).a()})}; - k.va=function(a){T("updateMetadata",[new U(Zd,void 0)],arguments);Fe(this,"updateMetadata");var b=this;return Td(this.b).then(function(c){var d=b.b,e=b.a,f=a,g=Wd(),h=Oa(e),h=ka+"/v0"+h,f=Yd(f,g),d=new x(h,"PATCH",ge(d,g),d.c);d.b={"Content-Type":"application/json; charset=utf-8"};d.c=f;d.a=he(e);return R(b.b,d,c).a()})}; - k.ta=function(){T("getDownloadURL",[],arguments);Fe(this,"getDownloadURL");return this.ha().then(function(a){a=a.downloadURLs[0];if(y(a))return a;throw new w("no-download-url","The given file does not have any download URLs.");})};var Fe=function(a,b){if(""===a.a.path)throw new w("invalid-root-operation","The operation '"+b+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");};var Y=function(a){this.a=new Sd(a,function(a,c){return new X(a,c)},Md,this);this.b=a;this.c=new Ge(this)};k=Y.prototype;k.wa=function(a){T("ref",[ae(function(a){if(/^[A-Za-z]+:\/\//.test(a))throw"Expected child path but got a URL, use refFromURL instead.";},!0)],arguments);var b=new X(this.a);return n(a)?b.ga(a):b}; - k.xa=function(a){T("refFromURL",[ae(function(a){if(!/^[A-Za-z]+:\/\//.test(a))throw"Expected full URL but got a child path, use ref instead.";try{Pa(a)}catch(c){throw"Expected valid full URL but got an invalid one.";}},!1)],arguments);return new X(this.a,a)};k.Ca=function(){return this.a.b};k.za=function(a){T("setMaxUploadRetryTime",[ce()],arguments);this.a.b=a};k.Ba=function(){return this.a.c};k.ya=function(a){T("setMaxOperationRetryTime",[ce()],arguments);this.a.c=a};k.oa=function(){return this.b}; - k.la=function(){return this.c};var Ge=function(a){this.a=a};Ge.prototype.delete=function(){var a=this.a.a;a.g=!0;a.a=null;a.h.clear()};var Z=function(a,b,c){Object.defineProperty(a,b,{get:c})};X.prototype.toString=X.prototype.toString;X.prototype.child=X.prototype.ga;X.prototype.put=X.prototype.ua;X.prototype["delete"]=X.prototype.delete;X.prototype.getMetadata=X.prototype.ha;X.prototype.updateMetadata=X.prototype.va;X.prototype.getDownloadURL=X.prototype.ta;Z(X.prototype,"parent",X.prototype.Fa);Z(X.prototype,"root",X.prototype.Ha);Z(X.prototype,"bucket",X.prototype.pa);Z(X.prototype,"fullPath",X.prototype.Aa); - Z(X.prototype,"name",X.prototype.Ea);Z(X.prototype,"storage",X.prototype.Ja);Y.prototype.ref=Y.prototype.wa;Y.prototype.refFromURL=Y.prototype.xa;Z(Y.prototype,"maxOperationRetryTime",Y.prototype.Ba);Y.prototype.setMaxOperationRetryTime=Y.prototype.ya;Z(Y.prototype,"maxUploadRetryTime",Y.prototype.Ca);Y.prototype.setMaxUploadRetryTime=Y.prototype.za;Z(Y.prototype,"app",Y.prototype.oa);Z(Y.prototype,"INTERNAL",Y.prototype.la);Ge.prototype["delete"]=Ge.prototype.delete; + var Yc=function(a,b){this.c=[];this.m=b||null;this.a=this.h=!1;this.b=void 0;this.j=this.g=!1;this.f=0;this.i=null;this.s=0};Yc.prototype.l=function(a,b){this.g=!1;this.h=!0;this.b=b;this.a=!a;Zc(this)};var $c=function(a,b,c){C(!a.j,"Blocking Deferreds can not be re-used");a.c.push([b,c,void 0]);a.h&&Zc(a)};Yc.prototype.then=function(a,b,c){var d,e,f=new H(function(a,b){d=a;e=b});$c(this,d,function(a){e(a)});return f.then(a,b,c)};Ea(Yc); + var ad=function(a){return fb(a.c,function(a){return r(a[1])})},Zc=function(a){if(a.f&&a.h&&ad(a)){var b=a.f,c=bd[b];c&&(m.clearTimeout(c.a),delete bd[b]);a.f=0}a.i&&(a.i.s--,delete a.i);for(var b=a.b,d=c=!1;a.c.length&&!a.g;){var e=a.c.shift(),f=e[0],g=e[1],e=e[2];if(f=a.a?g:f)try{var h=f.call(e||a.m,b);n(h)&&(a.a=a.a&&(h==b||h instanceof Error),a.b=b=h);if(Fa(b)||"function"===typeof m.Promise&&b instanceof m.Promise)d=!0,a.g=!0}catch(l){b=l,a.a=!0,ad(a)||(c=!0)}}a.b=b;d&&(h=t(a.l,a,!0),d=t(a.l,a, + !1),b instanceof Yc?($c(b,h,d),b.j=!0):b.then(h,d));c&&(b=new cd(b),bd[b.a]=b,a.f=b.a)},cd=function(a){this.a=m.setTimeout(t(this.c,this),0);this.b=a};cd.prototype.c=function(){C(bd[this.a],"Cannot throw an error that is not scheduled.");delete bd[this.a];throw this.b;};var bd={};var dd=function(a){this.f=a;this.b=this.c=this.a=null},ed=function(a,b){this.name=a;this.value=b};ed.prototype.toString=function(){return this.name};var fd=new ed("SEVERE",1E3),gd=new ed("CONFIG",700),hd=new ed("FINE",500),id=function(a){if(a.c)return a.c;if(a.a)return id(a.a);Ra("Root logger has no level set.");return null}; + dd.prototype.log=function(a,b,c){if(a.value>=id(this).value)for(r(b)&&(b=b()),a=new ya(a,String(b),this.f),c&&(a.a=c),c="log:"+a.b,m.console&&(m.console.timeStamp?m.console.timeStamp(c):m.console.markTimeline&&m.console.markTimeline(c)),m.msWriteProfilerMark&&m.msWriteProfilerMark(c),c=this;c;)c=c.a}; + var jd={},kd=null,ld=function(a){kd||(kd=new dd(""),jd[""]=kd,kd.c=gd);var b;if(!(b=jd[a])){b=new dd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=ld(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;jd[a]=b}return b};var J=function(){D.call(this);this.b=new vb(this);this.ma=this;this.I=null};u(J,D);J.prototype[Ta]=!0;J.prototype.removeEventListener=function(a,b,c,d){Qc(this,a,b,c,d)}; + var K=function(a,b){Jc(a);var c,d=a.I;if(d){c=[];for(var e=1;d;d=d.I)c.push(d),C(1E3>++e,"infinite loop")}a=a.ma;d=b.type||b;q(b)?b=new pb(b,a):b instanceof pb?b.target=b.target||a:(e=b,b=new pb(d,a),Da(b,e));var e=!0,f;if(c)for(var g=c.length-1;0<=g;g--)f=b.a=c[g],e=md(f,d,!0,b)&&e;f=b.a=a;e=md(f,d,!0,b)&&e;e=md(f,d,!1,b)&&e;if(c)for(g=0;g=f)c=void 0;else{if(1==f)ib(e);else{e[0]=e.pop();for(var e=0,d=d.a,f=d.length,g=d[e];e>1;){var h=2*e+1,l=2*e+2,h=lg.a)break;d[e]=d[h];e=h}d[e]=g}c=c.b}c.apply(this,[b])}else break}}; + k.Z=function(a){L.G.Z.call(this,a);this.$()};k.S=function(){L.G.S.call(this);this.$()};k.A=function(){L.G.A.call(this);m.clearTimeout(void 0);this.f.clear();this.f=null};var M=function(a,b){a&&a.log(hd,b,void 0)};var nd=function(a,b,c){if(r(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647g||429===g?(f=7===b.J,Wc(b),a(!1,new Id(!1,null,f))):(f=0<=bb(d.I,g),a(!0,new Id(f,b)))})})}function c(a,b){var c=d.l;a=d.s;var h=b.c;if(b.b)try{var l=d.v(h,Dd(h));n(l)?c(l):c()}catch(B){a(B)}else null!==h?(b=la(),l=Dd(h),b.serverResponse=l,d.j?a(d.j(h,b)):a(b)):(b=b.a?d.h?oa():ma():new v("retry-limit-exceeded","Max retry time for operation exceeded, please try again."), + a(b));Wc(h)}var d=a;a.i?c(0,new Id(!1,null,!0)):a.f=ja(b,c,a.K)};Hd.prototype.a=function(){return this.C};Hd.prototype.b=function(a){this.i=!0;this.h=a||!1;null!==this.f&&(0,this.f)(!1);null!==this.c&&vd(this.c)};var Jd=function(a,b,c){var d=Oa(a.f),d=a.l+d,e=a.b?qa(a.b):{};null!==b&&0b&&(b+=a.size),0>b&&(b=0),0>c&&(c+=a.size),cb.length?b:ub(b)};a.push(b);b=new S("size");b.a=function(a,b){return y(b)?+b:b};a.push(b);a.push(new S("timeCreated"));a.push(new S("updated"));a.push(new S("md5Hash",null,!0));a.push(new S("cacheControl", + null,!0));a.push(new S("contentDisposition",null,!0));a.push(new S("contentEncoding",null,!0));a.push(new S("contentLanguage",null,!0));a.push(new S("contentType",null,!0));a.push(new S("metadata","customMetadata",!0));a.push(new S("downloadTokens","downloadURLs",!1,function(a,b){if(!(ua(b)&&0l;l++)h+=Math.random().toString().slice(2);g["Content-Type"]="multipart/related; boundary="+h;e=ie(b,d,e);l=Vd(e,c);d=Kd("--"+h+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ + l+"\r\n--"+h+"\r\nContent-Type: "+e.contentType+"\r\n\r\n",d,"\r\n--"+h+"--");a=new x(ka+"/v0"+f,"POST",de(a,c),a.b);a.f={name:e.fullPath};a.b=g;a.c=d;a.a=ee(b);return a},ke=function(a,b,c,d){this.a=a;this.total=b;this.b=!!c;this.c=d||null},le=function(a,b){var c;try{c=Ed(a,"X-Goog-Upload-Status")}catch(d){ce(!1)}a=0<=bb(b||["active"],c);ce(a);return c},me=function(a,b,c,d,e){var f="/b/"+encodeURIComponent(b.bucket)+"/o",g=ie(b,d,e);e={name:g.fullPath};f=ka+"/v0"+f;d={"X-Goog-Upload-Protocol":"resumable", + "X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":d.size,"X-Goog-Upload-Header-Content-Type":g.contentType,"Content-Type":"application/json; charset=utf-8"};c=Vd(g,c);a=new x(f,"POST",function(a){le(a);var b;try{b=Ed(a,"X-Goog-Upload-URL")}catch(c){ce(!1)}ce(ua(b));return b},a.b);a.f=e;a.b=d;a.c=c;a.a=ee(b);return a},ne=function(a,b,c,d){a=new x(c,"POST",function(a){var b=le(a,["active","final"]),c;try{c=Ed(a,"X-Goog-Upload-Size-Received")}catch(h){ce(!1)}a=c;isFinite(a)&&(a=String(a)); + a=q(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN;ce(!isNaN(a));return new ke(a,d.size,"final"===b)},a.b);a.b={"X-Goog-Upload-Command":"query"};a.a=ee(b);return a},oe=function(a,b,c,d,e,f){var g=new ke(0,0);f?(g.a=f.a,g.total=f.total):(g.a=0,g.total=d.size);if(d.size!==g.total)throw new v("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var h=f=g.total-g.a,h=Math.min(h,262144),l=g.a;f={"X-Goog-Upload-Command":h===f?"upload, finalize":"upload", + "X-Goog-Upload-Offset":g.a};l=Ld(d,l,l+h);if(null===l)throw new v("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.");c=new x(c,"POST",function(a,c){var f=le(a,["active","final"]),l=g.a+h,Ad=d.size,Va;"final"===f?Va=de(b,e)(a,c):Va=null;return new ke(l,Ad,"final"===f,Va)},b.b);c.b=f;c.c=l;c.g=null;c.a=ee(a);return c};var W=function(a,b,c,d,e,f){this.K=a;this.c=b;this.i=c;this.f=e;this.h=f||null;this.l=d;this.j=0;this.B=this.s=!1;this.v=[];this.R=262144c&&ye(a)}, + V=function(a,b){if(a.b!==b)switch(b){case "canceling":a.b=b;null!==a.a&&a.a.b();break;case "pausing":a.b=b;null!==a.a&&a.a.b();break;case "running":var c="paused"===a.b;a.b=b;c&&(ye(a),qe(a));break;case "paused":a.b=b;ye(a);break;case "canceled":a.g=ma();a.b=b;ye(a);break;case "error":a.b=b;ye(a);break;case "success":a.b=b,ye(a)}},pe=function(a){switch(a.b){case "pausing":V(a,"paused");break;case "canceling":V(a,"canceled");break;case "running":qe(a)}}; + W.prototype.C=function(){return new A(this.j,this.f.size,ta(this.b),this.h,this,this.K)}; + W.prototype.I=function(a,b,c,d){function e(a){try{g(a);return}catch(b){}try{if(h(a),!(n(a.next)||n(a.error)||n(a.complete)))throw"";}catch(b){throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";}}function f(a){return function(b,c,d){null!==a&&T("on",a,arguments);var e=new Na(b,c,d);ze(l,e);return function(){jb(l.v,e)}}}var g=be().a,h=ae(null,!0).a;T("on",[Yd(function(){if("state_changed"!==a)throw"Expected one of the event types: [state_changed].";}),ae(e,!0), + be(),be()],arguments);var l=this,B=[ae(function(a){if(null===a)throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";e(a)}),be(),be()];return n(b)||n(c)||n(d)?f(null)(b,c,d):f(B)}; + var ze=function(a,b){a.v.push(b);Ae(a,b)},ye=function(a){var b=kb(a.v);cb(b,function(b){Ae(a,b)})},Ae=function(a,b){switch(ta(a.b)){case "running":case "paused":null!==b.next&&Dc(b.next.bind(b,a.C()))();break;case "success":null!==b.a&&Dc(b.a.bind(b))();break;case "canceled":case "error":null!==b.error&&Dc(b.error.bind(b,a.g))();break;default:null!==b.error&&Dc(b.error.bind(b,a.g))()}}; + W.prototype.M=function(){T("resume",[],arguments);var a="paused"===this.b||"pausing"===this.b;a&&V(this,"running");return a};W.prototype.L=function(){T("pause",[],arguments);var a="running"===this.b;a&&V(this,"pausing");return a};W.prototype.H=function(){T("cancel",[],arguments);var a="running"===this.b||"pausing"===this.b;a&&V(this,"canceling");return a};var X=function(a,b){this.b=a;if(b)this.a=b instanceof z?b:Ma(b);else if(a=a.bucket(),null!==a)this.a=new z(a,"");else throw new v("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");};X.prototype.toString=function(){T("toString",[],arguments);return"gs://"+this.a.bucket+"/"+this.a.path};var Be=function(a,b){return new X(a,b)};k=X.prototype; + k.ga=function(a){T("child",[Yd()],arguments);var b=tb(this.a.path,a);return Be(this.b,new z(this.a.bucket,b))};k.Fa=function(){var a;a=this.a.path;if(0==a.length)a=null;else{var b=a.lastIndexOf("/");a=-1===b?"":a.slice(0,b)}return null===a?null:Be(this.b,new z(this.a.bucket,a))};k.Ha=function(){return Be(this.b,new z(this.a.bucket,""))};k.pa=function(){return this.a.bucket};k.Aa=function(){return this.a.path};k.Ea=function(){return ub(this.a.path)};k.Ja=function(){return this.b.i}; + k.ua=function(a,b){T("put",[Zd(),new U(Wd,!0)],arguments);Ce(this,"put");return new W(this,this.b,this.a,Td(),a,b)};k.delete=function(){T("delete",[],arguments);Ce(this,"delete");var a=this;return Qd(this.b).then(function(b){var c=he(a.b,a.a);return R(a.b,c,b).a()})};k.ha=function(){T("getMetadata",[],arguments);Ce(this,"getMetadata");var a=this;return Qd(this.b).then(function(b){var c=ge(a.b,a.a,Td());return R(a.b,c,b).a()})}; + k.va=function(a){T("updateMetadata",[new U(Wd,void 0)],arguments);Ce(this,"updateMetadata");var b=this;return Qd(this.b).then(function(c){var d=b.b,e=b.a,f=a,g=Td(),h=La(e),h=ka+"/v0"+h,f=Vd(f,g),d=new x(h,"PATCH",de(d,g),d.c);d.b={"Content-Type":"application/json; charset=utf-8"};d.c=f;d.a=fe(e);return R(b.b,d,c).a()})}; + k.ta=function(){T("getDownloadURL",[],arguments);Ce(this,"getDownloadURL");return this.ha().then(function(a){a=a.downloadURLs[0];if(y(a))return a;throw new v("no-download-url","The given file does not have any download URLs.");})};var Ce=function(a,b){if(""===a.a.path)throw new v("invalid-root-operation","The operation '"+b+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");};var Y=function(a){this.a=new Pd(a,function(a,c){return new X(a,c)},Jd,this);this.b=a;this.c=new De(this)};k=Y.prototype;k.wa=function(a){T("ref",[Yd(function(a){if(/^[A-Za-z]+:\/\//.test(a))throw"Expected child path but got a URL, use refFromURL instead.";},!0)],arguments);var b=new X(this.a);return n(a)?b.ga(a):b}; + k.xa=function(a){T("refFromURL",[Yd(function(a){if(!/^[A-Za-z]+:\/\//.test(a))throw"Expected full URL but got a child path, use ref instead.";try{Ma(a)}catch(c){throw"Expected valid full URL but got an invalid one.";}},!1)],arguments);return new X(this.a,a)};k.Ca=function(){return this.a.b};k.za=function(a){T("setMaxUploadRetryTime",[$d()],arguments);this.a.b=a};k.Ba=function(){return this.a.c};k.ya=function(a){T("setMaxOperationRetryTime",[$d()],arguments);this.a.c=a};k.oa=function(){return this.b}; + k.la=function(){return this.c};var De=function(a){this.a=a};De.prototype.delete=function(){var a=this.a.a;a.g=!0;a.a=null;a.h.clear()};var Z=function(a,b,c){Object.defineProperty(a,b,{get:c})};X.prototype.toString=X.prototype.toString;X.prototype.child=X.prototype.ga;X.prototype.put=X.prototype.ua;X.prototype["delete"]=X.prototype.delete;X.prototype.getMetadata=X.prototype.ha;X.prototype.updateMetadata=X.prototype.va;X.prototype.getDownloadURL=X.prototype.ta;Z(X.prototype,"parent",X.prototype.Fa);Z(X.prototype,"root",X.prototype.Ha);Z(X.prototype,"bucket",X.prototype.pa);Z(X.prototype,"fullPath",X.prototype.Aa); + Z(X.prototype,"name",X.prototype.Ea);Z(X.prototype,"storage",X.prototype.Ja);Y.prototype.ref=Y.prototype.wa;Y.prototype.refFromURL=Y.prototype.xa;Z(Y.prototype,"maxOperationRetryTime",Y.prototype.Ba);Y.prototype.setMaxOperationRetryTime=Y.prototype.ya;Z(Y.prototype,"maxUploadRetryTime",Y.prototype.Ca);Y.prototype.setMaxUploadRetryTime=Y.prototype.za;Z(Y.prototype,"app",Y.prototype.oa);Z(Y.prototype,"INTERNAL",Y.prototype.la);De.prototype["delete"]=De.prototype.delete; Y.prototype.capi_=function(a){ka=a};W.prototype.on=W.prototype.I;W.prototype.resume=W.prototype.M;W.prototype.pause=W.prototype.L;W.prototype.cancel=W.prototype.H;Z(W.prototype,"snapshot",W.prototype.C);Z(A.prototype,"bytesTransferred",A.prototype.qa);Z(A.prototype,"totalBytes",A.prototype.La);Z(A.prototype,"state",A.prototype.Ia);Z(A.prototype,"metadata",A.prototype.Da);Z(A.prototype,"downloadURL",A.prototype.sa);Z(A.prototype,"task",A.prototype.Ka);Z(A.prototype,"ref",A.prototype.Ga); - ta.STATE_CHANGED="state_changed";ua.RUNNING="running";ua.PAUSED="paused";ua.SUCCESS="success";ua.CANCELED="canceled";ua.ERROR="error";H.prototype["catch"]=H.prototype.l;H.prototype.then=H.prototype.then; - (function(){function a(a){return new Y(a)}var b={TaskState:ua,TaskEvent:ta,Storage:Y,Reference:X};if(window.firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();})(); + ra.STATE_CHANGED="state_changed";sa.RUNNING="running";sa.PAUSED="paused";sa.SUCCESS="success";sa.CANCELED="canceled";sa.ERROR="error";H.prototype["catch"]=H.prototype.l;H.prototype.then=H.prototype.then; + (function(){function a(a){return new Y(a)}var b={TaskState:sa,TaskEvent:ra,Storage:Y,Reference:X};if(window.firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();})(); /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) @@ -1397,6 +1407,8 @@ var warn = debug('components:look-at:warn'); var isCoordinate = coordinates.isCoordinate; + delete AFRAME.components['look-at']; + /** * Look-at component. * diff --git a/dist/k-frame.min.js b/dist/k-frame.min.js index a0da871c..894a1cfa 100644 --- a/dist/k-frame.min.js +++ b/dist/k-frame.min.js @@ -1,15 +1,15 @@ -!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),n(2),n(3),n(4),n(7),n(8),n(9),n(10),n(11)},function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerSystem("audio-visualizer",{init:function(){this.analysers={},this.context=new AudioContext},getOrCreateAnalyser:function(t){var e=this.context,n=this.analysers,i=e.createAnalyser(),r=t.src,o=r.getAttribute("src");return new Promise(function(a){r.addEventListener("canplay",function(){if(n[o])return void a(n[o]);var s=e.createMediaElementSource(r);s.connect(i),i.connect(e.destination),i.smoothingTimeConstant=t.smoothingTimeConstant,i.fftSize=t.fftSize,n[o]=i,a(n[o])})})}}),AFRAME.registerComponent("audio-visualizer",{schema:{fftSize:{"default":2048},smoothingTimeConstant:{"default":.8},src:{type:"selector"},unique:{"default":!1}},init:function(){this.analyser=null,this.spectrum=null},update:function(){function t(t){e.analyser=t,e.spectrum=new Uint8Array(e.analyser.frequencyBinCount),e.el.emit("audio-analyser-ready",{analyser:t})}var e=this,n=this.data,i=this.system;n.src&&(n.unique?i.createAnalyser(n).then(t):i.getOrCreateAnalyser(n).then(t))},tick:function(){this.analyser&&this.analyser.getByteFrequencyData(this.spectrum)}}),AFRAME.registerComponent("audio-visualizer-kick",{dependencies:["audio-visualizer"],schema:{decay:{"default":.02},frequency:{"default":[0,10]},threshold:{"default":.3}},init:function(){this.currentThreshold=this.data.threshold,this.kicking=!1},tick:function(){var t=this.data,e=this.el;if(e.components["audio-visualizer"].spectrum){var n=this.maxAmplitude(t.frequency);if(n>this.currentThreshold&&n>t.threshold){if(this.kicking)return;this.kicking=!0,e.emit("audio-visualizer-kick-start",{currentThreshold:this.currentThreshold,magnitude:n})}else this.currentThreshold-=t.decay,this.kicking&&(this.kicking=!1,e.emit("audio-visualizer-kick-end",{currentThreshold:this.currentThreshold,magnitude:n}))}},maxAmplitude:function(t){var e=0,n=this.el.components["audio-visualizer"].spectrum;if(!t.length)return t=i;i++)n[i]>e&&(e=n[i]);return e}})},function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("entity-generator",{schema:{mixin:{"default":""},num:{"default":10}},init:function(){for(var t=this.data,e=0;ethis.currentThreshold&&n>t.threshold){if(this.kicking)return;this.kicking=!0,e.emit("audio-visualizer-kick-start",{currentThreshold:this.currentThreshold,magnitude:n})}else this.currentThreshold-=t.decay,this.kicking&&(this.kicking=!1,e.emit("audio-visualizer-kick-end",{currentThreshold:this.currentThreshold,magnitude:n}))}},maxAmplitude:function(t){var e=0,n=this.el.components["audio-visualizer"].spectrum;if(!t.length)return t=i;i++)n[i]>e&&(e=n[i]);return e}})},function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("entity-generator",{schema:{mixin:{"default":""},num:{"default":10}},init:function(){for(var t=this.data,e=0;et||t>1342177279)throw new RangeError("Invalid count value");t|=0;for(var n="";t;)1&t&&(n+=e),(t>>>=1)&&(e+=e);return n},y=function(t){v(this,"codePointAt");var e=String(this),n=e.length;if(t=Number(t)||0,t>=0&&n>t){t|=0;var i=e.charCodeAt(t);return 55296>i||i>56319||t+1===n?i:(t=e.charCodeAt(t+1),56320>t||t>57343?i:1024*(i-55296)+t+9216)}},q=function(t,e){return e=void 0===e?0:e,m(t,"includes"),v(this,"includes"),-1!==String(this).indexOf(t,e)},w=function(t,e){e=void 0===e?0:e,m(t,"startsWith"),v(this,"startsWith");var n=String(this);t+="";var i=n.length,r=t.length;e=Math.max(0,Math.min(0|e,n.length));for(var o=0;r>o&&i>e;)if(n[e++]!=t[o++])return!1;return o>=r},x=function(t,e){m(t,"endsWith"),v(this,"endsWith");var n=String(this);t+="",void 0===e&&(e=n.length),e=Math.max(0,Math.min(0|e,n.length));for(var i=t.length;i>0&&e>0;)if(n[--e]!=t[--i])return!1;return 0>=i};String.prototype.endsWith||(String.prototype.endsWith=x),String.prototype.startsWith||(String.prototype.startsWith=w),String.prototype.includes||(String.prototype.includes=q),String.prototype.codePointAt||(String.prototype.codePointAt=y),String.prototype.repeat||(String.prototype.repeat=b),g("values",function(){return p(this,function(t,e){return e})}),g("keys",function(){return p(this,function(t){return t})}),g("entries",function(){return p(this,function(t,e){return[t,e]})});var E=this,k=function(){},T=function(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e},A=function(t){return"function"==T(t)},S=function(t,e,n){return t.call.apply(t.bind,arguments)},_=function(t,e,n){if(!t)throw Error();if(2"}),n=this.W+": "+n+" ("+this.V+"/"+t+").";t=new vt(t,n);for(var i in e)e.hasOwnProperty(i)&&"_"!==i.slice(-1)&&(t[i]=e[i]);return t},tt.all=function(t){return new tt(function(e,n){var i=t.length,r=[];if(i)for(var o,a=function(t,n){i--,r[t]=n,0==i&&e(r)},s=function(t){n(t)},l=0;l/g,ra=/"/g,sa=/'/g,ta=/\x00/g,ua=/[\x00&<>"']/,u=function(t,e){return-1!=t.indexOf(e)},va=function(t,e){return e>t?-1:t>e?1:0},wa=function(e,n){n.unshift(e),t.call(this,ma.apply(null,n)),n.shift()};r(wa,t),wa.prototype.name="AssertionError";var xa=function(t,e,n,i){var r="Assertion failed";if(n)var r=r+(": "+n),o=i;else t&&(r+=": "+t,o=e);throw new wa(""+r,o||[])},v=function(t,e,n){t||xa("",null,e,Array.prototype.slice.call(arguments,2))},ya=function(t,e){throw new wa("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))},za=function(t,e,n){return ga(t)||xa("Expected number but got %s: %s.",[ca(t),t],e,Array.prototype.slice.call(arguments,2)),t},Aa=function(t,e,i){return n(t)||xa("Expected string but got %s: %s.",[ca(t),t],e,Array.prototype.slice.call(arguments,2)),t},Ba=function(t,e,n){p(t)||xa("Expected function but got %s: %s.",[ca(t),t],e,Array.prototype.slice.call(arguments,2))},Ca=Array.prototype.indexOf?function(t,e,n){return v(null!=t.length),Array.prototype.indexOf.call(t,e,n)}:function(t,e,i){if(i=null==i?0:0>i?Math.max(0,t.length+i):i,n(t))return n(e)&&1==e.length?t.indexOf(e,i):-1;for(;ia;a++)a in o&&e.call(i,o[a],a,t)},Da=function(t,e){for(var i=n(t)?t.split(""):t,r=t.length-1;r>=0;--r)r in i&&e.call(void 0,i[r],r,t)},Ea=Array.prototype.map?function(t,e,n){return v(null!=t.length),Array.prototype.map.call(t,e,n)}:function(t,e,i){for(var r=t.length,o=Array(r),a=n(t)?t.split(""):t,s=0;r>s;s++)s in a&&(o[s]=e.call(i,a[s],s,t));return o},Fa=Array.prototype.some?function(t,e,n){return v(null!=t.length),Array.prototype.some.call(t,e,n)}:function(t,e,i){for(var r=t.length,o=n(t)?t.split(""):t,a=0;r>a;a++)if(a in o&&e.call(i,o[a],a,t))return!0;return!1},Ha=function(t){var e;t:{e=Ga;for(var i=t.length,r=n(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&e.call(void 0,r[o],o,t)){e=o;break t}e=-1}return 0>e?null:n(t)?t.charAt(e):t[e]},Ia=function(t,e){return 0<=Ca(t,e)},Ka=function(t,e){var n,i=Ca(t,e);return(n=i>=0)&&Ja(t,i),n},Ja=function(t,e){return v(null!=t.length),1==Array.prototype.splice.call(t,e,1).length},La=function(t,e){var n=0;Da(t,function(i,r){e.call(void 0,i,r,t)&&Ja(t,r)&&n++})},Ma=function(t){return Array.prototype.concat.apply(Array.prototype,arguments)},Na=function(t){return Array.prototype.concat.apply(Array.prototype,arguments)},Oa=function(t){var e=t.length;if(e>0){for(var n=Array(e),i=0;e>i;i++)n[i]=t[i];return n}return[]},Pa=function(t,e){for(var n=1;na;a++)t[r+a]=i[a]}else t.push(i)}},Qa=function(t,e){for(var n in t)e.call(void 0,t[n],n,t)},Ra=function(t){var e,n=[],i=0;for(e in t)n[i++]=t[e];return n},Sa=function(t){var e,n=[],i=0;for(e in t)n[i++]=e;return n},Ta=function(t){return null!==t&&"withCredentials"in t},Ua=function(t){for(var e in t)return!1;return!0},Va=function(t,e){for(var n in t)if(!(n in e)||t[n]!==e[n])return!1;for(n in e)if(!(n in t))return!1;return!0},Ya=function(t){var e,n={};for(e in t)n[e]=t[e];return n},Za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),$a=function(t,e){for(var n,i,r=1;rparseFloat(kb)){jb=String(mb);break t}}jb=kb}var nb=jb,ob={},z=function(t){var e;if(!(e=ob[t])){e=0;for(var n=na(String(nb)).split("."),i=na(String(t)).split("."),r=Math.max(n.length,i.length),o=0;0==e&&r>o;o++){var a=n[o]||"",s=i[o]||"",l=RegExp("(\\d*)(\\D*)","g"),u=RegExp("(\\d*)(\\D*)","g");do{var c=l.exec(a)||["","",""],h=u.exec(s)||["","",""];if(0==c[0].length&&0==h[0].length)break;e=va(0==c[1].length?0:parseInt(c[1],10),0==h[1].length?0:parseInt(h[1],10))||va(0==c[2].length,0==h[2].length)||va(c[2],h[2])}while(0==e)}e=ob[t]=e>=0}return e},pb=l.document,qb=pb&&y?ib()||("CSS1Compat"==pb.compatMode?parseInt(nb,10):5):void 0,rb=null,sb=null,ub=function(t){var e="";return tb(t,function(t){e+=String.fromCharCode(t)}),e},tb=function(t,e){function n(e){for(;i>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}},vb=function(){if(!rb){rb={},sb={};for(var t=0;65>t;t++)rb[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),sb[rb[t]]=t,t>=62&&(sb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}},xb=function(){this.Pb="",this.wd=wb};xb.prototype.ic=!0,xb.prototype.gc=function(){return this.Pb},xb.prototype.toString=function(){return"Const{"+this.Pb+"}"};var yb=function(t){return t instanceof xb&&t.constructor===xb&&t.wd===wb?t.Pb:(ya("expected object of type Const, got '"+t+"'"),"type_error:Const")},wb={},A=function(){this.aa="",this.vd=zb};A.prototype.ic=!0,A.prototype.gc=function(){return this.aa},A.prototype.toString=function(){return"SafeUrl{"+this.aa+"}"};var Ab=function(t){return t instanceof A&&t.constructor===A&&t.vd===zb?t.aa:(ya("expected object of type SafeUrl, got '"+t+"' of type "+ca(t)),"type_error:SafeUrl")},Bb=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i,Db=function(t){return t instanceof A?t:(t=t.ic?t.gc():String(t),Bb.test(t)||(t="about:invalid#zClosurez"),Cb(t))},zb={},Cb=function(t){var e=new A;return e.aa=t,e};Cb("about:blank");var Fb=function(){this.aa="",this.ud=Eb};Fb.prototype.ic=!0,Fb.prototype.gc=function(){return this.aa},Fb.prototype.toString=function(){return"SafeHtml{"+this.aa+"}"};var Gb=function(t){return t instanceof Fb&&t.constructor===Fb&&t.ud===Eb?t.aa:(ya("expected object of type SafeHtml, got '"+t+"' of type "+ca(t)),"type_error:SafeHtml")},Eb={};Fb.prototype.Zd=function(t){return this.aa=t,this};var Hb=function(t,e){var n;n=e instanceof A?e:Db(e),t.href=Ab(n)},Ib=function(t){return Ib[" "](t),t};Ib[" "]=ba;var Jb=!y||9<=Number(qb),Kb=y&&!z("9");!hb||z("528"),gb&&z("1.9b")||y&&z("8")||db&&z("9.5")||hb&&z("528"),gb&&!z("8")||y&&z("9");var Lb=function(){this.ra=this.ra,this.Gb=this.Gb};Lb.prototype.ra=!1,Lb.prototype.isDisposed=function(){return this.ra},Lb.prototype.Ga=function(){if(this.Gb)for(;this.Gb.length;)this.Gb.shift()()};var Mb=function(t,e){this.type=t,this.currentTarget=this.target=e,this.defaultPrevented=this.Na=!1,this.gd=!0};Mb.prototype.preventDefault=function(){this.defaultPrevented=!0,this.gd=!1};var Nb=function(t,e){Mb.call(this,t?t.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.ub=this.state=null,t&&this.init(t,e)};r(Nb,Mb),Nb.prototype.init=function(t,e){var n=this.type=t.type,i=t.changedTouches?t.changedTouches[0]:null;this.target=t.target||t.srcElement,this.currentTarget=e;var r=t.relatedTarget;if(r){if(gb){var o;t:{try{Ib(r.nodeName),o=!0;break t}catch(a){}o=!1}o||(r=null)}}else"mouseover"==n?r=t.fromElement:"mouseout"==n&&(r=t.toElement);this.relatedTarget=r,null===i?(this.offsetX=hb||void 0!==t.offsetX?t.offsetX:t.layerX,this.offsetY=hb||void 0!==t.offsetY?t.offsetY:t.layerY,this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=t.button,this.keyCode=t.keyCode||0,this.charCode=t.charCode||("keypress"==n?t.keyCode:0),this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.state=t.state,this.ub=t,t.defaultPrevented&&this.preventDefault()},Nb.prototype.preventDefault=function(){Nb.yc.preventDefault.call(this);var t=this.ub;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Kb)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var Ob="closure_listenable_"+(1e6*Math.random()|0),Pb=0,Qb=function(t,e,n,i,r){this.listener=t,this.Ib=null,this.src=e,this.type=n,this.rb=!!i,this.zb=r,this.key=++Pb,this.Pa=this.qb=!1},Rb=function(t){t.Pa=!0,t.listener=null,t.Ib=null,t.src=null,t.zb=null},Sb=function(t){this.src=t,this.v={},this.pb=0};Sb.prototype.add=function(t,e,n,i,r){var o=t.toString();t=this.v[o],t||(t=this.v[o]=[],this.pb++);var a=Tb(t,e,i,r);return a>-1?(e=t[a],n||(e.qb=!1)):(e=new Qb(e,this.src,o,!!i,r),e.qb=n,t.push(e)),e},Sb.prototype.remove=function(t,e,n,i){if(t=t.toString(),!(t in this.v))return!1;var r=this.v[t];return e=Tb(r,e,n,i),e>-1?(Rb(r[e]),Ja(r,e),0==r.length&&(delete this.v[t],this.pb--),!0):!1};var Ub=function(t,e){var n=e.type;n in t.v&&Ka(t.v[n],e)&&(Rb(e),0==t.v[n].length&&(delete t.v[n],t.pb--))};Sb.prototype.ec=function(t,e,n,i){t=this.v[t.toString()];var r=-1;return t&&(r=Tb(t,e,n,i)),r>-1?t[r]:null};var Tb=function(t,e,n,i){for(var r=0;ri.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(a){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=n.currentTarget;o;o=o.parentNode)i.push(o);for(var o=t.type,s=i.length-1;!n.Na&&s>=0;s--){n.currentTarget=i[s];var u=kc(i[s],o,!0,n),r=r&&u}for(s=0;!n.Na&&s>>0),Zb=function(t){return v(t,"Listener can not be null."),p(t)?t:(v(t.handleEvent,"An object listener must have handleEvent method."),t[lc]||(t[lc]=function(e){return t.handleEvent(e)}),t[lc])},mc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/,nc=function(a){if(a=String(a),/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a)},qc=function(t){var e=[];return oc(new pc,t,e),e.join("")},pc=function(){this.Lb=void 0},oc=function(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(ea(e)){var i=e;e=i.length,n.push("[");for(var r="",o=0;e>o;o++)n.push(r),r=i[o],oc(t,t.Lb?t.Lb.call(i,String(o),r):r,n),r=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){n.push("{"),o="";for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r=e[i],"function"!=typeof r&&(n.push(o),rc(i,n),n.push(":"),oc(t,t.Lb?t.Lb.call(e,i,r):r,n),o=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":rc(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}},sc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\x0B":"\\u000b"},tc=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,rc=function(t,e){ -e.push('"',t.replace(tc,function(t){var e=sc[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),sc[t]=e),e}),'"')},uc=function(){};uc.prototype.Bc=null;var vc=function(t){return t.Bc||(t.Bc=t.Uc())},wc,xc=function(){};r(xc,uc),xc.prototype.$b=function(){var t=yc(this);return t?new ActiveXObject(t):new XMLHttpRequest},xc.prototype.Uc=function(){var t={};return yc(this)&&(t[0]=!0,t[1]=!0),t};var yc=function(t){if(!t.Qc&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n=0;i--){var r=0|t[i];n&&r==e||(this.h[i]=r,n=!1)}},Cc={},Dc=function(t){if(t>=-128&&128>t){var e=Cc[t];if(e)return e}return e=new B([0|t],0>t?-1:0),t>=-128&&128>t&&(Cc[t]=e),e},E=function(t){if(isNaN(t)||!isFinite(t))return C;if(0>t)return D(E(-t));for(var e=[],n=1,i=0;t>=n;i++)e[i]=t/n|0,n*=4294967296;return new B(e,0)},Ec=function(t,e){if(0==t.length)throw Error("number format error: empty string");var n=e||10;if(2>n||n>36)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return D(Ec(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var i=E(Math.pow(n,8)),r=C,o=0;oa?(a=E(Math.pow(n,a)),r=r.multiply(a).add(E(s))):(r=r.multiply(i),r=r.add(E(s)))}return r},C=Dc(0),Fc=Dc(1),Gc=Dc(16777216),Hc=function(t){if(-1==t.g)return-Hc(D(t));for(var e=0,n=1,i=0;it||t>36)throw Error("radix out of range: "+t);if(F(this))return"0";if(-1==this.g)return"-"+D(this).toString(t);for(var e=E(Math.pow(t,6)),n=this,i="";;){var r=Jc(n,e),n=Kc(n,r.multiply(e)),o=((0>>0).toString(t),n=r;if(F(n))return o+i;for(;6>o.length;)o="0"+o;i=""+o+i}};var G=function(t,e){return 0>e?0:e=0?n:4294967296+n},F=function(t){if(0!=t.g)return!1;for(var e=0;en;n++)if(G(this,n)!=G(t,n))return!1;return!0},B.prototype.compare=function(t){return t=Kc(this,t),-1==t.g?-1:F(t)?0:1};var D=function(t){for(var e=t.h.length,n=[],i=0;e>i;i++)n[i]=~t.h[i];return new B(n,~t.g).add(Fc)};B.prototype.add=function(t){for(var e=Math.max(this.h.length,t.h.length),n=[],i=0,r=0;e>=r;r++){var o=i+(65535&G(this,r))+(65535&G(t,r)),a=(o>>>16)+(G(this,r)>>>16)+(G(t,r)>>>16),i=a>>>16,o=65535&o,a=65535&a;n[r]=a<<16|o}return new B(n,-2147483648&n[n.length-1]?-1:0)};var Kc=function(t,e){return t.add(D(e))};B.prototype.multiply=function(t){if(F(this)||F(t))return C;if(-1==this.g)return-1==t.g?D(this).multiply(D(t)):D(D(this).multiply(t));if(-1==t.g)return D(this.multiply(D(t)));if(0>this.compare(Gc)&&0>t.compare(Gc))return E(Hc(this)*Hc(t));for(var e=this.h.length+t.h.length,n=[],i=0;2*e>i;i++)n[i]=0;for(i=0;i>>16,a=65535&G(this,i),s=G(t,r)>>>16,l=65535&G(t,r);n[2*i+2*r]+=a*l,Lc(n,2*i+2*r),n[2*i+2*r+1]+=o*l,Lc(n,2*i+2*r+1),n[2*i+2*r+1]+=a*s,Lc(n,2*i+2*r+1),n[2*i+2*r+2]+=o*s,Lc(n,2*i+2*r+2)}for(i=0;e>i;i++)n[i]=n[2*i+1]<<16|n[2*i];for(i=e;2*e>i;i++)n[i]=0;return new B(n,0)};var Lc=function(t,e){for(;(65535&t[e])!=t[e];)t[e+1]+=t[e]>>>16,t[e]&=65535},Jc=function(t,e){if(F(e))throw Error("division by zero");if(F(t))return C;if(-1==t.g)return-1==e.g?Jc(D(t),D(e)):D(Jc(D(t),e));if(-1==e.g)return D(Jc(t,D(e)));if(30=i.compare(t);)n=n.shiftLeft(1),i=i.shiftLeft(1);for(var r,o=Mc(n,1),a=Mc(i,1),i=Mc(i,2),n=Mc(n,2);!F(i);)r=a.add(i),0>=r.compare(t)&&(o=o.add(n),a=r),i=Mc(i,1),n=Mc(n,1);return o}for(n=C,i=t;0<=i.compare(e);){o=Math.max(1,Math.floor(Hc(i)/Hc(e))),a=Math.ceil(Math.log(o)/Math.LN2),a=48>=a?1:Math.pow(2,a-48),r=E(o);for(var s=r.multiply(e);-1==s.g||0r;r++)i[r]=G(t,r)|G(e,r);return new B(i,t.g|e.g)};B.prototype.shiftLeft=function(t){var e=t>>5;t%=32;for(var n=this.h.length+e+(t>0?1:0),i=[],r=0;n>r;r++)i[r]=t>0?G(this,r-e)<>>32-t:G(this,r-e);return new B(i,this.g)};var Mc=function(t,e){for(var n=e>>5,i=e%32,r=t.h.length-n,o=[],a=0;r>a;a++)o[a]=i>0?G(t,a+n)>>>i|G(t,a+n+1)<<32-i:G(t,a+n);return new B(o,t.g)},Oc=function(t,e){this.cb=t,this.ea=e};Oc.prototype.tb=function(t){return this.ea==t.ea&&this.cb.tb(Ya(t.cb))};var Rc=function(t){try{var e;if(e=0==t.lastIndexOf("[",0)){var n=t.length-1;e=n>=0&&t.indexOf("]",n)==n}return e?new Pc(t.substring(1,t.length-1)):new Qc(t)}catch(i){return null}},Qc=function(t){var e=C;if(t instanceof B){if(0!=t.g||0>t.compare(C)||0r||r>255||1!=n[i].length&&0==n[i].lastIndexOf("0",0))throw Error("In "+t+", octet "+i+" is not valid");r=E(r),e=Nc(e.shiftLeft(8),r)}}Oc.call(this,e,4)};r(Qc,Oc);var Tc=/^[0-9.]*$/,Sc=Kc(Fc.shiftLeft(32),Fc);Qc.prototype.toString=function(){if(this.va)return this.va;for(var t=Ic(this.cb,0),e=[],n=3;n>=0;n--)e[n]=String(255&t),t>>>=8;return this.va=e.join(".")};var Pc=function(t){var e=C;if(t instanceof B){if(0!=t.g||0>t.compare(C)||0>>16&65535).toString(16)),i.push((65535&t).toString(16)),Ja(n,n.length-1),Pa(n,i),t=n.join(":")}if(i=t.split("::"),2r)n=[];else{for(var o=[],a=0;r>a;a++)o[a]="0";n=Na(n,o,i)}}if(8!=n.length)throw Error(t+" is not a valid IPv6 address");for(i=0;ir.compare(C)||0=0;e--){var n=Ic(this.cb,e),i=65535&n;t.push((n>>>16).toString(16)),t.push(i.toString(16))}for(var n=e=-1,r=i=0,o=0;oi&&(i=r,e=n)):(n=-1,r=0);return i>0&&(e+i==t.length&&t.push(""),t.splice(e,i,""),0==e&&(t=[""].concat(t))),this.va=t.join(":")},!gb&&!y||y&&9<=Number(qb)||gb&&z("1.9.1"),y&&z("9");var Yc=function(t,e){Qa(e,function(e,n){"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Xc.hasOwnProperty(n)?t.setAttribute(Xc[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})},Xc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Zc=function(t,e,n){this.ae=n,this.Cd=t,this.le=e,this.Fb=0,this.Ab=null};Zc.prototype.get=function(){var t;return 01)));a=a.next)r||(o=a);r&&(0==n.A&&1==i?zd(n,e):(o?(i=o,v(n.X),v(null!=i),i.next==n.Fa&&(n.Fa=i),i.next=i.next.next):Ad(n),Bd(n,r,3,e)))}t.l=null}else nd(t,3,e)},xd=function(t,e){t.X||2!=t.A&&3!=t.A||Cd(t),v(null!=e.wa),t.Fa?t.Fa.next=e:t.X=e,t.Fa=e},wd=function(t,e,n,i){var r=rd(null,null,null);return r.child=new H(function(t,o){r.wa=e?function(n){try{var r=e.call(i,n);t(r)}catch(a){o(a)}}:t,r.La=n?function(e){try{var r=n.call(i,e);void 0===r&&e instanceof od?o(e):t(r)}catch(a){o(a)}}:o}),r.child.l=t,xd(t,r),r.child};H.prototype.ve=function(t){v(1==this.A),this.A=0,nd(this,2,t)},H.prototype.we=function(t){v(1==this.A),this.A=0,nd(this,3,t)};var nd=function(t,e,n){0==t.A&&(t==n&&(e=3,n=new TypeError("Promise cannot resolve to itself")),t.A=1,td(n,t.ve,t.we,t)||(t.ca=n,t.A=e,t.l=null,Cd(t),3!=e||n instanceof od||Dd(t,n)))},td=function(t,e,n,i){if(t instanceof H)return null!=e&&Ba(e,"opt_onFulfilled should be a function."),null!=n&&Ba(n,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),xd(t,rd(e||ba,n||null,i)),!0;if(md(t))return t.then(e,n,i),!0;if(ha(t))try{var r=t.then;if(p(r))return Ed(t,r,e,n,i),!0}catch(o){return n.call(i,o),!0}return!1},Ed=function(t,e,n,i,r){var o=!1,a=function(t){o||(o=!0,n.call(r,t))},s=function(t){o||(o=!0,i.call(r,t))};try{e.call(t,a,s)}catch(l){s(l)}},Cd=function(t){t.cc||(t.cc=!0,jd(t.Gd,t))},Ad=function(t){var e=null;return t.X&&(e=t.X,t.X=e.next,e.next=null),t.X||(t.Fa=null),null!=e&&v(null!=e.wa),e};H.prototype.Gd=function(){for(var t;t=Ad(this);)Bd(this,t,this.A,this.ca);this.cc=!1};var Bd=function(t,e,n,i){if(3==n&&e.La&&!e.Wa)for(;t&&t.yb;t=t.l)t.yb=!1;if(e.child)e.child.l=null,Fd(e,n,i);else try{e.Wa?e.wa.call(e.context):Fd(e,n,i)}catch(r){Gd.call(null,r)}qd.put(e)},Fd=function(t,e,n){2==e?t.wa.call(t.context,n):t.La&&t.La.call(t.context,n)},Dd=function(t,e){t.yb=!0,jd(function(){t.yb&&Gd.call(null,e)})},Gd=$c,od=function(e){t.call(this,e)};r(od,t),od.prototype.name="cancel";var Hd=function(t,e){this.Mb=[],this.Zc=t,this.Hc=e||null,this.$a=this.Ia=!1,this.ca=void 0,this.wc=this.Ac=this.Xb=!1,this.Rb=0,this.l=null,this.Yb=0};Hd.prototype.cancel=function(t){if(this.Ia)this.ca instanceof Hd&&this.ca.cancel();else{if(this.l){var e=this.l;delete this.l,t?e.cancel(t):(e.Yb--,0>=e.Yb&&e.cancel())}this.Zc?this.Zc.call(this.Hc,this):this.wc=!0,this.Ia||Id(this,new Jd)}},Hd.prototype.Gc=function(t,e){this.Xb=!1,Kd(this,t,e)};var Kd=function(t,e,n){t.Ia=!0,t.ca=n,t.$a=!e,Ld(t)},Nd=function(t){if(t.Ia){if(!t.wc)throw new Md;t.wc=!1}};Hd.prototype.callback=function(t){Nd(this),Od(t),Kd(this,!0,t)};var Id=function(t,e){Nd(t),Od(e),Kd(t,!1,e)},Od=function(t){v(!(t instanceof Hd),"An execution sequence may not be initiated with a blocking Deferred.")},Qd=function(t,e){Pd(t,null,e,void 0)},Pd=function(t,e,n,i){v(!t.Ac,"Blocking Deferreds can not be re-used"),t.Mb.push([e,n,i]),t.Ia&&Ld(t)};Hd.prototype.then=function(t,e,n){var i,r,o=new H(function(t,e){i=t,r=e});return Pd(this,i,function(t){t instanceof Jd?o.cancel():r(t)}),o.then(t,e,n)},ld(Hd);var Rd=function(t){return Fa(t.Mb,function(t){return p(t[1])})},Ld=function(t){if(t.Rb&&t.Ia&&Rd(t)){var e=t.Rb,n=Sd[e];n&&(l.clearTimeout(n.ab),delete Sd[e]),t.Rb=0}t.l&&(t.l.Yb--,delete t.l);for(var e=t.ca,i=n=!1;t.Mb.length&&!t.Xb;){var r=t.Mb.shift(),o=r[0],a=r[1],r=r[2];if(o=t.$a?a:o)try{var s=o.call(r||t.Hc,e);void 0!==s&&(t.$a=t.$a&&(s==e||s instanceof Error),t.ca=e=s),(md(e)||"function"==typeof l.Promise&&e instanceof l.Promise)&&(i=!0,t.Xb=!0)}catch(u){e=u,t.$a=!0,Rd(t)||(n=!0)}}t.ca=e,i&&(s=q(t.Gc,t,!0),i=q(t.Gc,t,!1),e instanceof Hd?(Pd(e,s,i),e.Ac=!0):e.then(s,i)),n&&(e=new Td(e),Sd[e.ab]=e,t.Rb=e.ab)},Md=function(){t.call(this)};r(Md,t),Md.prototype.message="Deferred has already fired",Md.prototype.name="AlreadyCalledError";var Jd=function(){t.call(this)};r(Jd,t),Jd.prototype.message="Deferred was canceled",Jd.prototype.name="CanceledError";var Td=function(t){this.ab=l.setTimeout(q(this.ue,this),0),this.D=t};Td.prototype.ue=function(){throw v(Sd[this.ab],"Cannot throw an error that is not scheduled."),delete Sd[this.ab],this.D};var Sd={},Yd=function(t){var e={},n=e.document||document,i=document.createElement("SCRIPT"),r={hd:i,ob:void 0},o=new Hd(Ud,r),a=null,s=null!=e.timeout?e.timeout:5e3;return s>0&&(a=window.setTimeout(function(){Vd(i,!0),Id(o,new Wd(1,"Timeout reached for loading script "+t))},s),r.ob=a),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Vd(i,e.Be||!1,a),o.callback(null))},i.onerror=function(){Vd(i,!0,a),Id(o,new Wd(0,"Error while loading script "+t))},r=e.attributes||{},$a(r,{type:"text/javascript",charset:"UTF-8",src:t}),Yc(i,r),Xd(n).appendChild(i),o},Xd=function(t){var e=t.getElementsByTagName("HEAD");return e&&0!=e.length?e[0]:t.documentElement},Ud=function(){if(this&&this.hd){var t=this.hd;t&&"SCRIPT"==t.tagName&&Vd(t,!0,this.ob)}},Vd=function(t,e,n){null!=n&&l.clearTimeout(n),t.onload=ba,t.onerror=ba,t.onreadystatechange=ba,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)},Wd=function(e,n){var i="Jsloader error (code #"+e+")";n&&(i+=": "+n),t.call(this,i),this.code=e};r(Wd,t);var J=function(){Lb.call(this),this.O=new Sb(this),this.yd=this,this.lc=null};r(J,Lb),J.prototype[Ob]=!0,J.prototype.addEventListener=function(t,e,n,i){Yb(this,t,e,n,i)},J.prototype.removeEventListener=function(t,e,n,i){hc(this,t,e,n,i)},J.prototype.dispatchEvent=function(t){Zd(this);var e,i=this.lc;if(i){e=[];for(var r=1;i;i=i.lc)e.push(i),v(1e3>++r,"infinite loop")}if(i=this.yd,r=t.type||t,n(t))t=new Mb(t,i);else if(t instanceof Mb)t.target=t.target||i;else{var o=t;t=new Mb(r,i),$a(t,o)}var a,o=!0;if(e)for(var s=e.length-1;!t.Na&&s>=0;s--)a=t.currentTarget=e[s],o=$d(a,r,!0,t)&&o;if(t.Na||(a=t.currentTarget=i,o=$d(a,r,!0,t)&&o,t.Na||(o=$d(a,r,!1,t)&&o)),e)for(s=0;!t.Na&&s=t.length)throw ae;if(e in t)return t[e++];e++}},n}throw Error("Not implemented")},de=function(t,e){if(fa(t))try{w(t,e,void 0)}catch(n){if(n!==ae)throw n}else{t=ce(t);try{for(;;)e.call(void 0,t.next(),void 0,t)}catch(n){if(n!==ae)throw n}}},ee=function(t,e){this.P={},this.m=[],this.ea=this.i=0;var n=arguments.length;if(n>1){if(n%2)throw Error("Uneven number of arguments");for(var i=0;n>i;i+=2)this.set(arguments[i],arguments[i+1])}else t&&this.addAll(t)};k=ee.prototype,k.wb=function(){return this.i},k.J=function(){fe(this);for(var t=[],e=0;e2*this.i&&fe(this),!0):!1};var fe=function(t){if(t.i!=t.m.length){for(var e=0,n=0;e=i.m.length)throw ae;var r=i.m[e++];return t?r:i.P[r]},r};var ge=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},ie=function(t){if(t.J&&"function"==typeof t.J)return t.J();if(n(t))return t.split("");if(fa(t)){for(var e=[],i=t.length,r=0;i>r;r++)e.push(t[r]);return e}return Ra(t)},je=function(t){if(t.Y&&"function"==typeof t.Y)return t.Y();if(!t.J||"function"!=typeof t.J){if(fa(t)||n(t)){var e=[];t=t.length;for(var i=0;t>i;i++)e.push(i);return e}return Sa(t)}},ke=function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(fa(t)||n(t))w(t,e,void 0);else for(var i=je(t),r=ie(t),o=r.length,a=0;o>a;a++)e.call(void 0,r[a],i&&i[a],t)},le=function(t,e,n,i,r){this.reset(t,e,n,i,r)};le.prototype.Jc=null;var me=0;le.prototype.reset=function(t,e,n,i,r){"number"==typeof r||me++,i||la(),this.gb=t,this.de=e,delete this.Jc},le.prototype.kd=function(t){this.gb=t};var ne=function(t){this.ee=t,this.Pc=this.Zb=this.gb=this.l=null},oe=function(t,e){this.name=t,this.value=e};oe.prototype.toString=function(){return this.name};var pe=new oe("SEVERE",1e3),qe=new oe("CONFIG",700),re=new oe("FINE",500);ne.prototype.getParent=function(){return this.l},ne.prototype.kd=function(t){this.gb=t};var se=function(t){return t.gb?t.gb:t.l?se(t.l):(ya("Root logger has no level set."),null)};ne.prototype.log=function(t,e,n){if(t.value>=se(this).value)for(p(e)&&(e=e()),t=new le(t,String(e),this.ee),n&&(t.Jc=n),n="log:"+t.de,l.console&&(l.console.timeStamp?l.console.timeStamp(n):l.console.markTimeline&&l.console.markTimeline(n)),l.msWriteProfilerMark&&l.msWriteProfilerMark(n),n=this;n;){e=n;var i=t;if(e.Pc)for(var r,o=0;r=e.Pc[o];o++)r(i);n=n.getParent()}};var te={},ue=null,ve=function(t){ue||(ue=new ne(""),te[""]=ue,ue.kd(qe));var e;if(!(e=te[t])){e=new ne(t);var n=t.lastIndexOf("."),i=t.substr(n+1),n=ve(t.substr(0,n));n.Zb||(n.Zb={}),n.Zb[i]=e,e.l=n,te[t]=e}return e},K=function(t,e){t&&t.log(re,e,void 0)},we=function(t,e,n){if(p(t))n&&(t=q(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=q(t.handleEvent,t)}return 2147483647=0?(r=n[i].substring(0,o),a=n[i].substring(o+1)):r=n[i],e(r,a?decodeURIComponent(a.replace(/\+/g," ")):"")}},L=function(t){J.call(this),this.headers=new ee,this.Vb=t||null,this.ga=!1,this.Ub=this.a=null,this.fb=this.Wc=this.Cb="",this.ua=this.jc=this.Bb=this.bc=!1,this.Sa=0,this.Qb=null,this.fd="",this.Sb=this.ke=this.ye=!1};r(L,J);var Ae=L.prototype,Be=ve("goog.net.XhrIo");Ae.L=Be;var Ce=/^https?$/i,De=["POST","PUT"];L.prototype.send=function(t,e,n,i){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Cb+"; newUri="+t);e=e?e.toUpperCase():"GET",this.Cb=t,this.fb="",this.Wc=e,this.bc=!1,this.ga=!0,this.a=this.Vb?this.Vb.$b():wc.$b(),this.Ub=vc(this.Vb?this.Vb:wc),this.a.onreadystatechange=q(this.ad,this),this.ke&&"onprogress"in this.a&&(this.a.onprogress=q(function(t){this.$c(t,!0)},this),this.a.upload&&(this.a.upload.onprogress=q(this.$c,this)));try{K(this.L,Ee(this,"Opening Xhr")),this.jc=!0,this.a.open(e,String(t),!0),this.jc=!1}catch(r){return K(this.L,Ee(this,"Error opening Xhr: "+r.message)),void this.D(5,r)}t=n||"";var o=this.headers.clone();i&&ke(i,function(t,e){o.set(e,t)}),i=Ha(o.Y()),n=l.FormData&&t instanceof l.FormData,!Ia(De,e)||i||n||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.fd&&(this.a.responseType=this.fd),Ta(this.a)&&(this.a.withCredentials=this.ye);try{Fe(this),0e)throw Error("Bad port number "+e);t.Ma=e}else t.Ma=null},Re=function(t,e,n){M(t),t.ka=n?Te(e,!0):e},Se=function(t,e,n){M(t),e instanceof N?(t.S=e,t.S.vc(t.F)):(n||(e=Ue(e,Ze)),t.S=new N(e,0,t.F))},O=function(t,e,n){M(t),t.S.set(e,n)},M=function(t){if(t.$d)throw Error("Tried to modify a read-only Uri")};Ne.prototype.vc=function(t){return this.F=t,this.S&&this.S.vc(t),this};var $e=function(t,e){var n=new Ne(null,void 0);return Oe(n,"https"),t&&Pe(n,t),e&&Re(n,e),n},Te=function(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""},Ue=function(t,e,i){return n(t)?(t=encodeURI(t).replace(e,af),i&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null},af=function(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)},Ve=/[#\/\?@]/g,Xe=/[\#\?:]/g,We=/[\#\?]/g,Ze=/[\#\?@]/g,Ye=/#/g,N=function(t,e,n){this.i=this.j=null,this.C=t||null,this.F=!!n},bf=function(t){t.j||(t.j=new ee,t.i=0,t.C&&ze(t.C,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n); -}))},df=function(t){var e=je(t);if("undefined"==typeof e)throw Error("Keys are undefined");var n=new N(null,0,void 0);t=ie(t);for(var i=0;i0?a:0,left:s>0?s:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1};i&&(r.target=i),navigator.userAgent&&-1!=navigator.userAgent.indexOf("Firefox/")&&(n=n||"http://localhost");var l,o=n||"about:blank";(i=r)||(i={}),n=window,r=o instanceof A?o:Db("undefined"!=typeof o.href?o.href:String(o)),o=i.target||o.target,a=[];for(l in i)switch(l){case"width":case"height":case"top":case"left":a.push(l+"="+i[l]);break;case"target":case"noreferrer":break;default:a.push(l+"="+(i[l]?1:0))}if(l=a.join(","),(x("iPhone")&&!x("iPod")&&!x("iPad")||x("iPad")||x("iPod"))&&n.navigator&&n.navigator.standalone&&o&&"_self"!=o?(l=n.document.createElement("A"),r=r instanceof A?r:Db(r),l.href=Ab(r),l.setAttribute("target",o),i.noreferrer&&l.setAttribute("rel","noreferrer"),i=document.createEvent("MouseEvent"),i.initMouseEvent("click",!0,!0,n,1),l.dispatchEvent(i),l={}):i.noreferrer?(l=n.open("",o,l),i=Ab(r),l&&(fb&&u(i,";")&&(i="'"+i.replace(/'/g,"%27")+"'"),l.opener=null,n=new xb,n.Pb="b/12014412, meta tag with sanitized URL",ua.test(i)&&(-1!=i.indexOf("&")&&(i=i.replace(oa,"&")),-1!=i.indexOf("<")&&(i=i.replace(pa,"<")),-1!=i.indexOf(">")&&(i=i.replace(qa,">")),-1!=i.indexOf('"')&&(i=i.replace(ra,""")),-1!=i.indexOf("'")&&(i=i.replace(sa,"'")),-1!=i.indexOf("\x00")&&(i=i.replace(ta,"�"))),i='',Aa(yb(n),"must provide justification"),v(!/^[\s\xa0]*$/.test(yb(n)),"must provide non-empty justification"),l.document.write(Gb((new Fb).Zd(i))),l.document.close())):l=n.open(Ab(r),o,l),l)try{l.focus()}catch(c){}return l},gf=function(t){return new H(function(e){var n=function(){xe(2e3).then(function(){return t&&!t.closed?n():void e()})};return n()})},hf=function(){var t=null;return new H(function(e){"complete"==l.document.readyState?e():(t=function(){e()},fc(window,"load",t))}).I(function(e){throw hc(window,"load",t),e})},jf=function(){var t=navigator.userAgent,e=t.toLowerCase();return u(e,"opera/")||u(e,"opr/")||u(e,"opios/")?"Opera":u(e,"msie")||u(e,"trident/")?"IE":u(e,"edge/")?"Edge":u(e,"firefox/")?"Firefox":u(e,"silk/")?"Silk":u(e,"safari/")&&!u(e,"chrome/")?"Safari":!u(e,"chrome/")&&!u(e,"crios/")||u(e,"edge/")?(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":"Chrome"},kf=function(t){return jf()+"/JsCore/"+t},lf=function(t){t=t.split(".");for(var e=l,n=0;n9?t=q(t.re,t):(Of||(Of=new H(function(t,e){Pf(t,e)})),t=q(t.qe,t)),t(e,n,i,r,o,a)};T.prototype.re=function(t,e,n,i,r,o){var a,s=new L(this.Bd);o&&(s.Sa=Math.max(0,o),a=setTimeout(function(){s.dispatchEvent("timeout")},o)),$b(s,"complete",function(){a&&clearTimeout(a);var t=null;try{var n;n=this.a?nc(this.a.responseText):void 0,t=n||null}catch(i){t=null}e&&e(t)}),gc(s,"ready",function(){a&&clearTimeout(a),this.ra||(this.ra=!0,this.Ga())}),gc(s,"timeout",function(){a&&clearTimeout(a),this.ra||(this.ra=!0,this.Ga()),e&&e(null)}),s.send(t,n,i,r)};var Rf="__fcb"+Math.floor(1e6*Math.random()).toString(),Pf=function(t,e){((window.gapi||{}).client||{}).request?t():(l[Rf]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))},Qd(Yd("//apis.google.com/js/client.js?onload="+Rf),function(){e(Error("CORS_UNSUPPORTED"))}))};T.prototype.qe=function(t,e,n,i,r){var o=this;Of.then(function(){window.gapi.client.setApiKey(o.u);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:i,headers:r,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})}).I(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})};var Tf=function(t,e){return new H(function(n,i){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?Qf(t,t.ne+"?key="+encodeURIComponent(t.u),function(t){t?t.error?i(Sf(t)):t.access_token&&t.refresh_token?n(t):i(new Q("internal-error")):i(new Q("network-request-failed"))},"POST",df(e).toString(),t.oe,t.pe):i(new Q("internal-error"))})},Uf=function(t){var e,n={};for(e in t)null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return qc(n)},Vf=function(t,e,n,i,r){var o=t.Jd+e+"?key="+encodeURIComponent(t.u);return r&&(o+="&cb="+la().toString()),new H(function(e,r){Qf(t,o,function(t){t?t.error?r(Sf(t)):e(t):r(new Q("network-request-failed"))},n,Uf(i),t.Lc,t.Kd)})},Wf=function(t){if(!mc.test(t.email))throw new Q("invalid-email")},Xf=function(t){"email"in t&&Wf(t)},Zf=function(t,e){return R(t,Yf,{identifier:e,continueUri:window.location.href}).then(function(t){return t.allProviders||[]})},ag=function(t){return R(t,$f,{}).then(function(t){return t.authorizedDomains||[]})},bg=function(t){if(!t.idToken)throw new Q("internal-error")};T.prototype.signInAnonymously=function(){return R(this,cg,{})},T.prototype.updateEmail=function(t,e){return R(this,dg,{idToken:t,email:e})},T.prototype.updatePassword=function(t,e){return R(this,Hf,{idToken:t,password:e})};var eg={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};T.prototype.updateProfile=function(t,e){var n={idToken:t},i=[];return Qa(eg,function(t,r){var o=e[r];null===o?i.push(t):r in e&&(n[r]=o)}),i.length&&(n.deleteAttribute=i),R(this,dg,n)},T.prototype.sendPasswordResetEmail=function(t){return R(this,fg,{requestType:"PASSWORD_RESET",email:t})},T.prototype.sendEmailVerification=function(t){return R(this,gg,{requestType:"VERIFY_EMAIL",idToken:t})};var ig=function(t,e,n){return R(t,hg,{idToken:e,deleteProvider:n})},jg=function(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new Q("internal-error")},kg=function(t){if(t.needConfirmation)throw(t&&t.email?new Lf(t.email,Kf(t),t.message):null)||new Q("account-exists-with-different-credential");if(!t.idToken)throw new Q("internal-error")},xf=function(t,e){return R(t,lg,e)},mg=function(t){if(!t.oobCode)throw new Q("invalid-action-code")};T.prototype.confirmPasswordReset=function(t,e){return R(this,ng,{oobCode:t,newPassword:e})},T.prototype.checkActionCode=function(t){return R(this,og,{oobCode:t})},T.prototype.applyActionCode=function(t){return R(this,pg,{oobCode:t})};var pg={endpoint:"setAccountInfo",w:mg,Ra:"email"},og={endpoint:"resetPassword",w:mg,la:function(t){if(!mc.test(t.email))throw new Q("internal-error")}},qg={endpoint:"signupNewUser",w:function(t){if(Wf(t),!t.password)throw new Q("weak-password")},la:bg,ma:!0},Yf={endpoint:"createAuthUri"},rg={endpoint:"deleteAccount",Qa:["idToken"]},hg={endpoint:"setAccountInfo",Qa:["idToken","deleteProvider"],w:function(t){if(!ea(t.deleteProvider))throw new Q("internal-error")}},sg={endpoint:"getAccountInfo"},gg={endpoint:"getOobConfirmationCode",Qa:["idToken","requestType"],w:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new Q("internal-error")},Ra:"email"},fg={endpoint:"getOobConfirmationCode",Qa:["requestType"],w:function(t){if("PASSWORD_RESET"!=t.requestType)throw new Q("internal-error");Wf(t)},Ra:"email"},$f={Ad:!0,endpoint:"getProjectConfig",Sd:"GET"},ng={endpoint:"resetPassword",w:mg,Ra:"email"},dg={endpoint:"setAccountInfo",Qa:["idToken"],w:Xf,ma:!0},Hf={endpoint:"setAccountInfo",Qa:["idToken"],w:function(t){if(Xf(t),!t.password)throw new Q("weak-password")},la:bg,ma:!0},cg={endpoint:"signupNewUser",la:bg,ma:!0},lg={endpoint:"verifyAssertion",w:jg,la:kg,ma:!0},zf={endpoint:"verifyAssertion",w:function(t){if(jg(t),!t.idToken)throw new Q("internal-error")},la:kg,ma:!0},tg={endpoint:"verifyCustomToken",w:function(t){if(!t.token)throw new Q("invalid-custom-token")},la:bg,ma:!0},Gf={endpoint:"verifyPassword",w:function(t){if(Wf(t),!t.password)throw new Q("wrong-password")},la:bg,ma:!0},R=function(t,e,n){if(!qf(n,e.Qa))return sd(new Q("internal-error"));var i,r=e.Sd||"POST";return I(n).then(e.w).then(function(){return e.ma&&(n.returnSecureToken=!0),Vf(t,e.endpoint,r,n,e.Ad||!1)}).then(function(t){return i=t}).then(e.la).then(function(){if(!e.Ra)return i;if(!(e.Ra in i))throw new Q("internal-error");return i[e.Ra]})},Sf=function(t){var e;e=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"";var n={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(e=n[e]?new Q(n[e]):null)return e;if(t=t.error&&t.error.message||"",e={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",EMAIL_NOT_FOUND:"user-not-found",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",CORS_UNSUPPORTED:"cors-unsupported"},e[t])return new Q(e[t]);e={TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed"};for(var i in e)if(0===t.indexOf(i))return new Q(e[i]);return new Q("internal-error")},ug=function(t){this.G=t};ug.prototype.value=function(){return this.G},ug.prototype.ld=function(t){return this.G.style=t,this};var vg=function(t){this.G=t||{}};vg.prototype.value=function(){return this.G},vg.prototype.ld=function(t){return this.G.style=t,this};var xg=function(t){this.xe=t,this.hc=null,this.he=wg(this)},yg,zg=function(t){var e=new vg;return e.G.where=document.body,e.G.url=t.xe,e.G.messageHandlersFilter=lf("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),e.G.attributes=e.G.attributes||{},new ug(e.G.attributes).ld({position:"absolute",top:"-100px",width:"1px",height:"1px"}),e.G.dontclear=!0,e},wg=function(t){return Ag().then(function(){return new H(function(e){lf("gapi.iframes.getContext")().open(zg(t).value(),function(n){t.hc=n,t.hc.restyle({setHideOnLeave:!1}),e()})})})},Bg=function(t,e){t.he.then(function(){t.hc.register("authEvent",e,lf("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})},Cg="__iframefcb"+Math.floor(1e6*Math.random()).toString(),Ag=function(){return yg?yg:yg=new H(function(t,e){var n=function(){lf("gapi.load")("gapi.iframes",function(){t()})};lf("gapi.iframes.Iframe")?t():lf("gapi.load")?n():(l[Cg]=function(){lf("gapi.load")?n():e()},Qd(Yd("//apis.google.com/js/api.js?onload="+Cg),function(){e()}))})},Eg=function(t,e,n,i){this.ha=t,this.u=e,this.W=n,i=this.qa=i||null,t=$e(t,"/__/auth/iframe"),O(t,"apiKey",e),O(t,"appName",n),i&&O(t,"v",i),this.Ud=t.toString(),this.Vd=new xg(this.Ud),this.Wb=[],Dg(this)},Fg=function(t,e,n,i,r,o,a,s,l){return t=$e(t,"/__/auth/handler"),O(t,"apiKey",e),O(t,"appName",n),O(t,"authType",i),O(t,"providerId",r),o&&o.length&&O(t,"scopes",o.join(",")),a&&O(t,"redirectUrl",a),s&&O(t,"eventId",s),l&&O(t,"v",l),t.toString()},Dg=function(t){Bg(t.Vd,function(e){var n={};if(e&&e.authEvent){var i=!1;if(e=e.authEvent||{},e.type){if(n=e.error)var r=(n=e.error)&&(n.name||n.code),n=r?new Q(r.substring(5),n.message):null;e=new uf(e.type,e.eventId,e.urlResponse,e.sessionId,n)}else e=null;for(n=0;n=i.length)throw ae;var r=Aa(i.key(e++));if(t)return r;if(r=i.getItem(r),!n(r))throw"Storage mechanism: Invalid value was encountered";return r},r},k.key=function(t){return this.H.key(t)};var Lg=function(){var t=null;try{t=window.localStorage||null}catch(e){}this.H=t};r(Lg,Jg);var Mg=function(){var t=null;try{t=window.sessionStorage||null}catch(e){}this.H=t};r(Mg,Jg);var Ng="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),U=function(t,e){return{name:t||"",U:"a valid string",optional:!!e,V:n}},Og=function(t){return{name:t||"",U:"a valid object",optional:!1,V:ha}},Pg=function(t,e){return{name:t||"",U:"a function",optional:!!e,V:p}},Qg=function(){return{name:"",U:"null",optional:!1,V:da}},Rg=function(){return{name:"credential",U:"a valid credential",optional:!1,V:function(t){return!(!t||!t.xb)}}},Sg=function(){return{name:"authProvider",U:"a valid Auth provider",optional:!1,V:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}},Tg=function(t,e,n,i){return{name:n||"",U:t.U+" or "+e.U,optional:!!i,V:function(n){return t.V(n)||e.V(n)}}},Vg=function(t,e){for(var n in e){var i=e[n].name;t[i]=Ug(i,t[n],e[n].b)}},V=function(t,e,n,i){t[e]=Ug(e,n,i)},Ug=function(t,e,n){if(!n)return e;var i=Wg(t);t=function(){var t,r=Array.prototype.slice.call(arguments);t:{t=Array.prototype.slice.call(r);var o;o=0;for(var a=!1,s=0;so||o>=Ng.length)throw new Q("internal-error","Argument validator received an unsupported number of arguments.");t=Ng[o]+" argument "+(t.name?'"'+t.name+'" ':"")+"must be "+t.U+".";break t}t=null}}if(t)throw new Q("argument-error",i+" failed: "+t);return e.apply(this,r)};for(var r in e)t[r]=e[r];for(r in e.prototype)t.prototype[r]=e.prototype[r];return t},Wg=function(t){return t=t.split("."),t[t.length-1]},$g=function(t,e,n){var i=(this.qa=firebase.SDK_VERSION||null)?kf(this.qa):null;this.c=new T(e,null,i),this.bd=Xg(this.c),this.ha=t,this.u=e,this.W=n,this.nb=[],this.Tc=!1,this.zd=q(this.Md,this),this.lb=new Yg,this.dd=new Zg,this.Ta={},this.Ta.unknown=this.lb,this.Ta.signInViaRedirect=this.lb,this.Ta.linkViaRedirect=this.lb,this.Ta.signInViaPopup=this.dd,this.Ta.linkViaPopup=this.dd},Xg=function(t){var e=window.location.href;return ag(t).then(function(t){t:{for(var n=(e instanceof Ne?e.clone():new Ne(e,void 0)).ia,i=0;ithis.Ha-3e4?this.ba?mh(this,{grant_type:"refresh_token",refresh_token:this.ba}):I(null):I({accessToken:this.Ea,expirationTime:this.Ha,refreshToken:this.ba})};var nh=function(t,e,n,i,r){of(this,{uid:t,displayName:i||null,photoURL:r||null,email:n||null,providerId:e})},oh=function(t,e){Mb.call(this,t);for(var n in e)this[n]=e[n]};r(oh,Mb);var W=function(t,e,n){this.M=[],this.u=t.apiKey,this.W=t.appName,this.ha=t.authDomain||null,t=firebase.SDK_VERSION?kf(firebase.SDK_VERSION):null,this.c=new T(this.u,null,t),this.oa=new jh(this.c),ph(this,e.idToken),lh(this.oa,e),P(this,"refreshToken",this.oa.ba),qh(this,n||{}),J.call(this),this.Hb=!1,this.ha&&(this.o=hh(this.ha,this.u,this.W)),this.Nb=[]};r(W,J);var ph=function(t,e){t.Vc=e,P(t,"_lat",e)},rh=function(t,e){La(t.Nb,function(t){return t==e})},sh=function(t){for(var e=[],n=0;no;o++)i+=".";try{var a=nc(ub(i));if(a.sub&&a.iss&&a.aud&&a.exp){n=new vf(a);break t}}catch(s){}}n=null}if(!n||e.uid!=n.be)throw new Q("user-mismatch");return Dh(e,t),e.reload()}))};var Fh=function(t,e){return Ah(t).then(function(){return Ia(wh(t),e)?sh(t).then(function(){throw new Q("provider-already-linked")}):void 0})};k=W.prototype,k.link=function(t){var e=this;return this.f(Fh(this,t.provider).then(function(){return e.getToken()}).then(function(n){return t.Xc(e.c,n)}).then(q(this.Kc,this)))},k.Kc=function(t){Dh(this,t);var e=this;return this.reload().then(function(){return e})},k.updateEmail=function(t){var e=this;return this.f(this.getToken().then(function(n){return e.c.updateEmail(n,t)}).then(function(t){return Dh(e,t),e.reload()}))},k.updatePassword=function(t){var e=this;return this.f(this.getToken().then(function(n){return e.c.updatePassword(n,t)}).then(function(t){return Dh(e,t),e.reload()}))},k.updateProfile=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return vh(this);var e=this;return this.f(this.getToken().then(function(n){return e.c.updateProfile(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Dh(e,t),zh(e,"displayName",t.displayName||null),zh(e,"photoURL",t.photoUrl||null),sh(e)}).then(uh))},k.unlink=function(t){var e=this;return this.f(Ah(this).then(function(n){return Ia(wh(e),t)?ig(e.c,n,[t]).then(function(t){var n={};return w(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),w(wh(e),function(t){n[t]||xh(e,t)}),sh(e)}):sh(e).then(function(){throw new Q("no-such-provider")})}))},k["delete"]=function(){var t=this;return this.f(this.getToken().then(function(e){return R(t.c,rg,{idToken:e})}).then(function(){t.dispatchEvent(new oh("userDeleted"))})).then(function(){Ch(t)})},k.Ec=function(t,e){return!!("linkViaPopup"==t&&(this.$||null)==e&&this.R||"linkViaRedirect"==t&&(this.Jb||null)==e)},k.Ba=function(t,e,n,i){"linkViaPopup"==t&&i==(this.$||null)&&(n&&this.xa?this.xa(n):e&&!n&&this.R&&this.R(e),this.ya&&(this.ya.cancel(),this.ya=null),delete this.R,delete this.xa)},k.Za=function(t,e){return"linkViaPopup"==t&&e==(this.$||null)||"linkViaRedirect"==t&&(this.Jb||null)==e?q(this.Hd,this):null},k.vb=function(){return this.uid+":::"+Math.floor(1e9*Math.random()).toString()},k.linkWithPopup=function(t){var e=this,n=sf(t.providerId),i=ff(n&&n.kb,n&&n.jb),r=this.vb(),n=Fh(this,t.providerId).then(function(){return sh(e)}).then(function(){return e.Ja(),e.getToken()}).then(function(){return dh(e.o,i,"linkViaPopup",t,r)}).then(function(t){return new H(function(n,i){e.Ba("linkViaPopup",null,new Q("cancelled-popup-request"),e.$||null),e.R=n,e.xa=i,e.$=r,e.ya=fh(e,"linkViaPopup",t,r)})}).then(function(t){return i&&(i||window).close(),t}).I(function(t){throw i&&(i||window).close(),t});return this.f(n)},k.linkWithRedirect=function(t){var e=this,n=null,i=this.vb(),r=Fh(this,t.providerId).then(function(){return e.Ja(),e.getToken()}).then(function(){return e.Jb=i,sh(e)}).then(function(t){return e.za&&(t=e.u+":"+e.W,t=Gh(e.za,Hh,e.N(),t)),t}).then(function(){return eh(e.o,"linkViaRedirect",t,i)}).I(function(t){if(n=t,e.za)return Ih(e.za,Hh,e.u+":"+e.W);throw n}).then(function(){if(n)throw n});return this.f(r)},k.Ja=function(){if(this.o&&this.Hb)return this.o;if(this.o&&!this.Hb)throw new Q("internal-error");throw new Q("auth-domain-config-required")},k.Hd=function(t,e){var n=this,i=null,r=this.getToken().then(function(i){return R(n.c,zf,{requestUri:t,sessionId:e,idToken:i})}).then(function(t){return i=Kf(t),n.Kc(t)}).then(function(t){return{user:t,credential:i}});return this.f(r)},k.sendEmailVerification=function(){var t=this;return this.f(this.getToken().then(function(e){return t.c.sendEmailVerification(e)}).then(function(e){return t.email!=e?t.reload():void 0}).then(function(){}))};var Ch=function(t){for(var e=0;er;r++)i[r]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(r=0;16>r;r++)i[r]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(r=16;80>r;r++){var o=i[r-3]^i[r-8]^i[r-14]^i[r-16];i[r]=4294967295&(o<<1|o>>>31)}e=t.N[0],n=t.N[1];for(var a,s=t.N[2],l=t.N[3],u=t.N[4],r=0;80>r;r++)40>r?20>r?(o=l^n&(s^l),a=1518500249):(o=n^s^l,a=1859775393):60>r?(o=n&s|l&(n|s),a=2400959708):(o=n^s^l,a=3395469782),o=(e<<5|e>>>27)+o+u+a+i[r]&4294967295,u=l,l=s,s=4294967295&(n<<30|n>>>2),n=e,e=o;t.N[0]=t.N[0]+e&4294967295,t.N[1]=t.N[1]+n&4294967295,t.N[2]=t.N[2]+s&4294967295,t.N[3]=t.N[3]+l&4294967295,t.N[4]=t.N[4]+u&4294967295}function t(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function oa(t,e){var n,i={};for(n in t)i[n]=e.call(void 0,t[n],n,t);return i}function pa(t,e){for(var n in t)if(!e.call(void 0,t[n],n,t))return!1;return!0}function qa(t){var e,n=0;for(e in t)n++;return n}function ra(t){for(var e in t)return e}function sa(t){var e,n=[],i=0;for(e in t)n[i++]=t[e];return n}function ta(t){var e,n=[],i=0;for(e in t)n[i++]=e;return n}function ua(t,e){for(var n in t)if(t[n]==e)return!0;return!1}function va(t,e,n){for(var i in t)if(e.call(n,t[i],i,t))return i}function wa(t,e){var n=va(t,e,void 0);return n&&t[n]}function xa(t){for(var e in t)return!1;return!0}function ya(t){var e,n={};for(e in t)n[e]=t[e];return n}function za(a){if(a=String(a),/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a)}function Aa(){this.Fd=void 0}function Ba(t,e,n){switch(typeof e){case"string":Ca(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?e:"null");break;case"boolean":n.push(e);break;case"undefined":n.push("null");break;case"object":if(null==e){n.push("null");break}if(da(e)){var i=e.length;n.push("[");for(var r="",o=0;i>o;o++)n.push(r),r=e[o],Ba(t,t.Fd?t.Fd.call(e,String(o),r):r,n),r=",";n.push("]");break}n.push("{"),i="";for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r=e[o],"function"!=typeof r&&(n.push(i),Ca(o,n),n.push(":"),Ba(t,t.Fd?t.Fd.call(e,o,r):r,n),i=","));n.push("}");break;case"function":break;default:throw Error("Unknown type: "+typeof e)}}function Ca(t,e){e.push('"',t.replace(Ea,function(t){if(t in Da)return Da[t];var e=t.charCodeAt(0),n="\\u";return 16>e?n+="000":256>e?n+="00":4096>e&&(n+="0"),Da[t]=n+e.toString(16)}),'"')}function Ha(t){if(Error.captureStackTrace)Error.captureStackTrace(this,Ha);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function Oa(t,e){var n=Pa(t,e,void 0);return 0>n?null:q(t)?t.charAt(n):t[n]}function Pa(t,e,n){for(var i=t.length,r=q(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&e.call(n,r[o],o,t))return o;return-1}function Qa(t,e){var n=Ia(t,e);n>=0&&w.splice.call(t,n,1)}function Ra(t,e,n){return 2>=arguments.length?w.slice.call(t,e):w.slice.call(t,e,n)}function Sa(t,e){t.sort(e||Ta)}function Ta(t,e){return t>e?1:e>t?-1:0}function ab(t,e){if(!ea(t))throw Error("encodeByteArray takes an array as a parameter");bb();for(var n=e?Za:Ya,i=[],r=0;r>2,o=(3&o)<<4|s>>4,s=(15&s)<<2|u>>6,u=63&u;l||(u=64,a||(s=64)),i.push(n[c],n[o],n[s],n[u])}return i.join("")}function bb(){if(!Ya){Ya={},Za={},$a={};for(var t=0;65>t;t++)Ya[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Za[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t),$a[Za[t]]=t,t>=62&&($a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)]=t)}}function cb(t){n.setTimeout(function(){throw t},0)}function eb(){var t=n.MessageChannel;if("undefined"==typeof t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&-1==v.indexOf("Presto")&&(t=function(){var t=document.createElement("iframe");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow,t=e.document;t.open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host,t=r(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this);e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),"undefined"!=typeof t&&-1==v.indexOf("Trident")&&-1==v.indexOf("MSIE")){var e=new t,i={},o=i;return e.port1.onmessage=function(){if(p(i.next)){i=i.next;var t=i.Ke;i.Ke=null,t()}},function(t){o.next={Ke:t},o=o.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("script")?function(t){var e=document.createElement("script");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}}function fb(t,e){gb||hb(),ib||(gb(),ib=!0),jb.push(new kb(t,e))}function hb(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve();gb=function(){t.then(lb)}}else gb=function(){var t=lb;!ga(n.setImmediate)||n.Window&&n.Window.prototype&&n.Window.prototype.setImmediate==n.setImmediate?(db||(db=eb()),db(t)):n.setImmediate(t)}}function lb(){for(;jb.length;){var t=jb;jb=[];for(var e=0;e=0&&r>1));a++);o>=0&&(n.L==nb&&1==r?ub(n,e):(r=n.Ca.splice(o,1)[0],vb(n,r,sb,e)))}t.Ha=null}else pb(t,sb,e)}function wb(t,e){t.Ca&&t.Ca.length||t.L!=qb&&t.L!=sb||xb(t),t.Ca||(t.Ca=[]),t.Ca.push(e)}function tb(t,e,n,i){var r={m:null,ff:null,hf:null};return r.m=new mb(function(t,o){r.ff=e?function(n){try{var r=e.call(i,n);t(r)}catch(a){o(a)}}:t,r.hf=n?function(e){try{var r=n.call(i,e);!p(r)&&e instanceof rb?o(e):t(r)}catch(a){o(a)}}:o}),r.m.Ha=t,wb(t,r),r.m}function pb(t,e,n){if(t.L==nb){if(t==n)e=sb,n=new TypeError("Promise cannot resolve to itself");else{var i;if(n)try{i=!!n.$goog_Thenable}catch(r){i=!1}else i=!1;if(i)return t.L=1,void n.then(t.Af,t.Bf,t);if(ha(n))try{var o=n.then;if(ga(o))return void yb(t,n,o)}catch(a){e=sb,n=a}}t.sf=n,t.L=e,t.Ha=null,xb(t),e!=sb||n instanceof rb||zb(t,n)}}function yb(t,e,n){function i(e){o||(o=!0,t.Bf(e))}function r(e){o||(o=!0,t.Af(e))}t.L=1;var o=!1;try{n.call(e,r,i)}catch(a){i(a)}}function xb(t){t.be||(t.be=!0,fb(t.Sf,t))}function vb(t,e,n,i){if(n==qb)e.ff(i);else{if(e.m)for(;t&&t.jd;t=t.Ha)t.jd=!1;e.hf(i)}}function zb(t,e){t.jd=!0,fb(function(){t.jd&&Ab.call(null,e)})}function rb(t){Ha.call(this,t)}function Bb(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}function Cb(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function y(t,e,n,i){var r;if(e>i?r="at least "+e:i>n&&(r=0===n?"none":"no more than "+n),r)throw Error(t+" failed: Was called with "+i+(1===i?" argument.":" arguments.")+" Expects "+r+".")}function Db(t,e,n){var i="";switch(e){case 1:i=n?"first":"First";break;case 2:i=n?"second":"Second";break;case 3:i=n?"third":"Third";break;case 4:i=n?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?")}return t=t+" failed: "+(i+" argument ")}function A(t,e,n,i){if((!i||p(n))&&!ga(n))throw Error(Db(t,e,i)+"must be a valid function.")}function Eb(t,e,n){if(p(n)&&(!ha(n)||null===n))throw Error(Db(t,e,!0)+"must be a valid context object.")}function Fb(t){var e=[];return Cb(t,function(t,n){da(n)?Ja(n,function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""}function Hb(){var t=this;this.reject=this.resolve=null,this.ra=new Gb(function(e,n){t.resolve=e,t.reject=n})}function Ib(t,e){return function(n,i){n?t.reject(n):t.resolve(i),ga(e)&&(Jb(t.ra),1===e.length?e(n):e(n,i))}}function Jb(t){t.then(void 0,aa)}function Kb(t,e){if(!t)throw Lb(e)}function Lb(t){return Error("Firebase Database ("+firebase.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)}function Mb(t){for(var e=[],n=0,i=0;i=55296&&56319>=r&&(r-=55296,i++,Kb(ir?e[n++]=r:(2048>r?e[n++]=r>>6|192:(65536>r?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return e}function Nb(t){for(var e=0,n=0;ni?e++:2048>i?e+=2:i>=55296&&56319>=i?(e+=4,n++):e+=3}return e}function Ob(t){return"undefined"!=typeof JSON&&p(JSON.parse)?JSON.parse(t):za(t)}function B(t){if("undefined"!=typeof JSON&&p(JSON.stringify))t=JSON.stringify(t);else{var e=[];Ba(new Aa,t,e),t=e.join("")}return t}function Pb(t,e){this.committed=t,this.snapshot=e}function Qb(t){this.se=t,this.Bd=[],this.Rb=0,this.Yd=-1,this.Gb=null}function Rb(t,e,n){t.Yd=e,t.Gb=n,t.Yd>4),64!=s&&(i.push(a<<4&240|s>>2),64!=l&&i.push(s<<6&192|l))}if(8192>i.length)e=String.fromCharCode.apply(null,i);else{for(t="",n=0;nt.ac?t.update(t.zd,56-t.ac):t.update(t.zd,t.Ya-(t.ac-56));for(var i=t.Ya-1;i>=56;i--)t.Wd[i]=255&n,n/=256;for(na(t,t.Wd),i=n=0;5>i;i++)for(var r=24;r>=0;r-=8)e[n]=t.N[i]>>r&255,++n;return ab(e)}function Zc(t){for(var e="",n=0;n=0&&(r=a.substring(0,s-1),a=a.substring(s+2)),s=a.indexOf("/"),-1===s&&(s=a.length),e=a.substring(0,s),o="",a=a.substring(s).split("/"),s=0;s=0&&(i="https"===r||"wss"===r)}return"firebase"===t&&dd(e+" is no longer supported. Please use .firebaseio.com instead"),n&&"undefined"!=n||dd("Cannot parse Firebase url. Please use https://.firebaseio.com"),i||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&O("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."),{kc:new fc(e,i,n,"ws"===r||"wss"===r),path:new L(o)}}function fd(t){return fa(t)&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)}function gd(t){if("complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}function Lc(t,e){if(t===e)return 0;if("[MIN_NAME]"===t||"[MAX_NAME]"===e)return-1;if("[MIN_NAME]"===e||"[MAX_NAME]"===t)return 1;var n=hd(t),i=hd(e);return null!==n?null!==i?0==n-i?t.length-e.length:n-i:-1:null!==i?1:e>t?-1:1}function id(t,e){if(e&&t in e)return e[t];throw Error("Missing required key ("+t+") in object: "+B(e))}function jd(t){if("object"!=typeof t||null===t)return B(t);var e,n=[];for(e in t)n.push(e);n.sort(),e="{";for(var i=0;it?n.push(t.substring(i,t.length)):n.push(t.substring(i,i+e));return n}function ld(e,n){if(da(e))for(var i=0;it,t=Math.abs(t),t>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023),n=i+1023,i=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,i=Math.round(t/Math.pow(2,-1074)))),r=[],t=52;t;--t)r.push(i%2?1:0),i=Math.floor(i/2);for(t=11;t;--t)r.push(n%2?1:0),n=Math.floor(n/2);for(r.push(e?1:0),r.reverse(),e=r.join(""),n="",t=0;64>t;t+=8)i=parseInt(e.substr(t,8),2).toString(16),1===i.length&&(i="0"+i),n+=i;return n.toLowerCase()}function hd(t){return nd.test(t)&&(t=Number(t),t>=-2147483648&&2147483647>=t)?t:null}function Tb(t){try{t()}catch(e){setTimeout(function(){throw O("Exception was thrown by user callback.",e.stack||""),e},Math.floor(0))}}function od(t,e,n){Object.defineProperty(t,e,{get:n})}function pd(t){var e={};try{var n=t.split(".");Ob(Xc(n[0])||""),e=Ob(Xc(n[1])||""),delete e.d}catch(i){}return t=e,"object"==typeof t&&!0===x(t,"admin")}function rd(t,e,n,i){this.Zd=t,this.f=bd(this.Zd),this.frames=this.Ac=null,this.qb=this.rb=this.Ee=0,this.Xa=oc(e),t={v:"5"},"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f"),n&&(t.s=n),i&&(t.ls=i),this.Le=hc(e,"websocket",t)}function vd(t,e){if(t.frames.push(e),t.frames.length==t.Ee){var n=t.frames.join("");t.frames=null,n=Ob(n),t.fg(n)}}function ud(t){clearInterval(t.Ac),t.Ac=setInterval(function(){t.La&&wd(t,"0"),ud(t)},Math.floor(45e3))}function wd(t,e){try{t.La.send(e)}catch(n){t.f("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(r(t.fb,t),0)}}function xd(t,e,n){this.f=bd("p:rest:"),this.M=t,this.Hb=e,this.Vd=n,this.$={}}function yd(t,e){return p(e)?"tag$"+e:(H(zd(t.n),"should have a tag if it's not a default query."),t.path.toString())}function Bd(t,e,n,i){n=n||{},n.format="export",t.Vd.getToken(!1).then(function(r){(r=r&&r.accessToken)&&(n.auth=r);var o=(t.M.Sc?"https://":"http://")+t.M.host+e+"?"+Fb(n);t.f("Sending REST request for "+o);var a=new XMLHttpRequest;a.onreadystatechange=function(){if(i&&4===a.readyState){t.f("REST Response for "+o+" received. status:",a.status,"response:",a.responseText);var e=null;if(200<=a.status&&300>a.status){try{e=Ob(a.responseText)}catch(n){O("Failed to parse JSON response for "+o+": "+a.responseText)}i(null,e)}else 401!==a.status&&404!==a.status&&O("Got unsuccessful REST response for "+o+" Status: "+a.status),i(a.status);i=null}},a.open("GET",o,!0),a.send()})}function Cd(t,e,n){this.type=Dd,this.source=t,this.path=e,this.children=n}function Ed(){this.hb={}}function Fd(t,e){var n=e.type,i=e.Za;H("child_added"==n||"child_changed"==n||"child_removed"==n,"Only child changes supported for tracking"),H(".priority"!==i,"Only non-priority child changes can be tracked.");var r=x(t.hb,i);if(r){var o=r.type;if("child_added"==n&&"child_removed"==o)t.hb[i]=new I("child_changed",e.Ma,i,r.Ma);else if("child_removed"==n&&"child_added"==o)delete t.hb[i];else if("child_removed"==n&&"child_changed"==o)t.hb[i]=new I("child_removed",r.pe,i);else if("child_changed"==n&&"child_added"==o)t.hb[i]=new I("child_added",e.Ma,i);else{if("child_changed"!=n||"child_changed"!=o)throw Wc("Illegal combination of changes: "+e+" occurred after "+r);t.hb[i]=new I("child_changed",e.Ma,i,r.pe)}}else t.hb[i]=e}function Gd(t){this.W=t,this.g=t.n.g}function Hd(t,e,n,i){var r=[],o=[];return Ja(e,function(e){"child_changed"===e.type&&t.g.nd(e.pe,e.Ma)&&o.push(new I("child_moved",e.Ma,e.Za))}),Id(t,r,"child_removed",e,i,n),Id(t,r,"child_added",e,i,n),Id(t,r,"child_moved",o,i,n),Id(t,r,"child_changed",e,i,n),Id(t,r,Gc,e,i,n),r}function Id(t,e,n,i,o,a){i=Ka(i,function(t){return t.type===n}),Sa(i,r(t.Mf,t)),Ja(i,function(n){var i=Jd(t,n,a);Ja(o,function(r){r.rf(n.type)&&e.push(r.createEvent(i,t.W))})})}function Jd(t,e,n){return"value"!==e.type&&"child_removed"!==e.type&&(e.Dd=n.Xe(e.Za,e.Ma,t.g)),e}function Kd(t,e){this.Sd=t,this.Kf=e}function Ld(t){this.V=t}function Td(t,e,n,i,r,o){var a=e.O;if(null!=i.mc(n))return e;var s;if(n.e())H(Hc(e.u()),"If change path is empty, we must have complete server data"),Ic(e.u())?(r=Ec(e),i=i.sc(r instanceof P?r:F)):i=i.Ba(Ec(e)),o=t.V.za(e.O.j(),i,o);else{var l=J(n);if(".priority"==l)H(1==Wd(n),"Can't have a priority with additional path components"),o=a.j(),s=e.u().j(),i=i.$c(n,o,s),o=null!=i?t.V.ga(o,i):a.j();else{var u=D(n);Cc(a,l)?(s=e.u().j(),i=i.$c(n,a.j(),s),i=null!=i?a.j().R(l).F(u,i):a.j().R(l)):i=i.rc(l,e.u()),o=null!=i?t.V.F(a.j(),l,i,u,r,o):a.j()}}return Rd(e,o,a.ea||n.e(),t.V.Qa())}function Nd(t,e,n,i,r,o,a,s){var l=e.u();if(a=a?t.V:t.V.Vb(),n.e())i=a.za(l.j(),i,null);else if(a.Qa()&&!l.Tb)i=l.j().F(n,i),i=a.za(l.j(),i,null);else{var u=J(n);if(!Jc(l,n)&&1=0?(null!=o&&Fd(o,new I("child_changed",i,n,h)),e.U(n,i)):(null!=o&&Fd(o,new I("child_removed",h,n)),e=e.U(n,F),null!=u&&t.sa.matches(u)?(null!=o&&Fd(o,new I("child_added",u.S,u.name)),e.U(u.name,u.S)):e)}return i.e()?e:c&&0<=a(u,l)?(null!=o&&(Fd(o,new I("child_removed",u.S,u.name)),Fd(o,new I("child_added",i,n))),e.U(n,i).U(u.name,F)):e}function Uc(t,e){this.B=t,H(p(this.B)&&null!==this.B,"LeafNode shouldn't be created with null/undefined value."),this.aa=e||F,ne(this.aa),this.Eb=null}function qe(){}function ke(t){return r(t.compare,t)}function te(t){H(!t.e()&&".priority"!==J(t),"Can't create PathIndex with empty path or .priority key"),this.cc=t}function ve(){}function we(){}function xe(){}function Ae(){this.Sb=this.na=this.Lb=this.ka=this.xa=!1,this.oa=0,this.oc="",this.ec=null,this.Ab="",this.bc=null,this.yb="",this.g=N}function ie(t){return""===t.oc?t.ka:"l"===t.oc}function ee(t){return H(t.ka,"Only valid if start has been set"),t.ec}function de(t){return H(t.ka,"Only valid if start has been set"),t.Lb?t.Ab:"[MIN_NAME]"}function ge(t){return H(t.na,"Only valid if end has been set"),t.bc}function fe(t){return H(t.na,"Only valid if end has been set"),t.Sb?t.yb:"[MAX_NAME]"}function Ce(t){var e=new Ae;return e.xa=t.xa,e.oa=t.oa,e.ka=t.ka,e.ec=t.ec,e.Lb=t.Lb,e.Ab=t.Ab,e.na=t.na,e.bc=t.bc,e.Sb=t.Sb,e.yb=t.yb,e.g=t.g,e}function De(t,e){var n=Ce(t);return n.g=e,n}function Ee(t){var e={};if(t.ka&&(e.sp=t.ec,t.Lb&&(e.sn=t.Ab)),t.na&&(e.ep=t.bc,t.Sb&&(e.en=t.yb)),t.xa){e.l=t.oa;var n=t.oc;""===n&&(n=ie(t)?"l":"r"),e.vf=n}return t.g!==N&&(e.i=t.g.toString()),e}function S(t){return!(t.ka||t.na||t.xa)}function zd(t){return S(t)&&t.g==N}function Ad(t){var e={};if(zd(t))return e;var n;return t.g===N?n="$priority":t.g===ze?n="$value":t.g===ae?n="$key":(H(t.g instanceof te,"Unrecognized index type!"),n=t.g.toString()),e.orderBy=B(n),t.ka&&(e.startAt=B(t.ec),t.Lb&&(e.startAt+=","+B(t.Ab))),t.na&&(e.endAt=B(t.bc),t.Sb&&(e.endAt+=","+B(t.yb))),t.xa&&(ie(t)?e.limitToFirst=t.oa:e.limitToLast=t.oa),e}function Fe(t,e){this.od=t,this.dc=e}function Ge(t,e,n){var i=oa(t.od,function(i,r){var o=x(t.dc,r);if(H(o,"Missing index implementation for "+r),i===re){if(o.yc(e.S)){for(var a=[],s=n.Xb(Nc),l=R(s);l;)l.name!=e.name&&a.push(l),l=R(s);return a.push(e),He(a,ke(o))}return re}return o=n.get(e.name),a=i,o&&(a=a.remove(new K(e.name,o))),a.Ra(e,e.S)});return new Fe(i,t.dc)}function Ie(t,e,n){var i=oa(t.od,function(t){if(t===re)return t;var i=n.get(e.name);return i?t.remove(new K(e.name,i)):t});return new Fe(i,t.dc)}function Ke(){this.set={}}function Le(e,n){t(e.set,function(t,e){n(e,t)})}function Me(t,e,n,i){this.Zd=t,this.f=bd(t),this.kc=e,this.qb=this.rb=0,this.Xa=oc(e),this.zf=n,this.xc=!1,this.Db=i,this.Yc=function(t){return hc(e,"long_polling",t)}}function Qe(t,e){var n=B(e).length;t.qb+=n,lc(t.Xa,"bytes_received",n)}function Pe(t,e,n,i){if(this.Yc=i,this.kb=n,this.ue=new Ke,this.Qc=[],this.$d=Math.floor(1e8*Math.random()),this.Kd=!0,this.Qd=Vc(),window["pLPCommand"+this.Qd]=t,window["pRTLPCB"+this.Qd]=e,t=document.createElement("iframe"),t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||E("No IE domain setting required")}catch(r){t.src="javascript:void((function(){document.open();document.domain='"+document.domain+"';document.close();})())"}t.contentDocument?t.ib=t.contentDocument:t.contentWindow?t.ib=t.contentWindow.document:t.document&&(t.ib=t.document),this.Ga=t,t="",this.Ga.src&&"javascript:"===this.Ga.src.substr(0,11)&&(t=''),t=""+t+"";try{this.Ga.ib.open(),this.Ga.ib.write(t),this.Ga.ib.close()}catch(o){E("frame writing exception"),o.stack&&E(o.stack),E(o)}}function Se(t){if(t.Ud&&t.Kd&&t.ue.count()<(0=t.Qc[0].Qe.length+30+n.length;){var r=t.Qc.shift(),n=n+"&seg"+i+"="+r.sg+"&ts"+i+"="+r.yg+"&d"+i+"="+r.Qe;i++}return Te(t,e+n,t.$d),!0}return!1}function Te(t,e,n){function i(){t.ue.remove(n),Se(t)}t.ue.add(n,1);var r=setTimeout(i,Math.floor(25e3));Re(t,e,function(){clearTimeout(r),i()})}function Re(t,e,n){setTimeout(function(){try{if(t.Kd){var i=t.Ga.ib.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){E("Long-poll script failed to load: "+e),t.Kd=!1,t.close()},t.Ga.ib.body.appendChild(i)}}catch(r){}},Math.floor(1))}function Ue(t){Ve(this,t)}function Ve(t,e){var n=rd&&rd.isAvailable(),i=n&&!(Xb.af||!0===Xb.get("previous_websocket_failure"));if(e.zg&&(n||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),i=!0),i)t.Wc=[rd];else{var r=t.Wc=[];ld(We,function(t,e){e&&e.isAvailable()&&r.push(e)})}}function Xe(t){if(00&&(t.md=setTimeout(function(){t.md=null,t.Cb||(t.I&&102400=t.uf?(t.f("Secondary connection is healthy."),t.Cb=!0,t.D.sd(),t.D.start(),t.f("sending client ack on secondary"),t.D.send({t:"c",d:{t:"a",d:{}}}),t.f("Ending transmission on primary"),t.I.send({t:"c",d:{t:"n",d:{}}}),t.Xc=t.D,df(t)):(t.f("sending ping on secondary."),t.D.send({t:"c",d:{t:"p",d:{}}}))}function ff(t){t.Cb||(t.we--,0>=t.we&&(t.f("Primary connection is healthy."),t.Cb=!0,t.I.sd()))}function cf(t,e){t.D=new e("c:"+t.id+":"+t.Me++,t.M,t.wf),t.uf=e.responsesRequiredToBeHealthy||0,t.D.open($e(t,t.D),af(t,t.D)),setTimeout(function(){t.D&&(t.f("Timed out trying to upgrade."),t.D.close())},Math.floor(6e4))}function bf(t,e,n){t.f("Realtime connection established."),t.I=e,t.L=1,t.Mc&&(t.Mc(n,t.wf),t.Mc=null),0===t.we?(t.f("Primary connection is healthy."),t.Cb=!0):setTimeout(function(){gf(t)},Math.floor(5e3))}function gf(t){t.Cb||1!==t.L||(t.f("sending ping on primary."),jf(t,{t:"c",d:{t:"p",d:{}}}))}function jf(t,e){if(1!==t.L)throw"Connection is not connected";t.Xc.send(e)}function ef(t){t.f("Shutting down all connections"),t.I&&(t.I.close(),t.I=null),t.D&&(t.D.close(),t.D=null),t.md&&(clearTimeout(t.md),t.md=null)}function L(t,e){if(1==arguments.length){this.o=t.split("/");for(var n=0,i=0;i=t.o.length?null:t.o[t.Z]}function Wd(t){return t.o.length-t.Z}function D(t){var e=t.Z;return e10485760/3&&10485760n?i=i.left:n>0&&(r=i,i=i.right)}throw Error("Attempted to find predecessor key for a nonexistent key. What gives?")}function Uf(t,e,n,i,r){for(this.Hd=r||null,this.ke=i,this.Sa=[],r=1;!t.e();)if(r=e?n(t.key,e):1,i&&(r*=-1),0>r)t=this.ke?t.left:t.right;else{if(0===r){this.Sa.push(t);break}this.Sa.push(t),t=this.ke?t.right:t.left}}function R(t){if(0===t.Sa.length)return null;var e,n=t.Sa.pop();if(e=t.Hd?t.Hd(n.key,n.value):{key:n.key,value:n.value},t.ke)for(n=n.left;!n.e();)t.Sa.push(n),n=n.right;else for(n=n.right;!n.e();)t.Sa.push(n),n=n.left;return e}function Vf(t){if(0===t.Sa.length)return null;var e;return e=t.Sa,e=e[e.length-1],t.Hd?t.Hd(e.key,e.value):{key:e.key,value:e.value}}function Wf(t,e,n,i,r){this.key=t,this.value=e,this.color=null!=n?n:!0,this.left=null!=i?i:Sf,this.right=null!=r?r:Sf}function Xf(t){return t.left.e()?t:Xf(t.left)}function Zf(t){return t.left.e()?Sf:(t.left.fa()||t.left.left.fa()||(t=$f(t)),t=t.Y(null,null,null,Zf(t.left),null),Yf(t))}function Yf(t){return t.right.fa()&&!t.left.fa()&&(t=cg(t)),t.left.fa()&&t.left.left.fa()&&(t=ag(t)),t.left.fa()&&t.right.fa()&&(t=bg(t)),t}function $f(t){return t=bg(t),t.right.left.fa()&&(t=t.Y(null,null,null,null,ag(t.right)),t=cg(t),t=bg(t)),t}function cg(t){return t.right.Y(null,null,t.color,t.Y(null,null,!0,null,t.right.left),null)}function ag(t){return t.left.Y(null,null,t.color,null,t.Y(null,null,!0,t.left.right,null))}function bg(t){return t.Y(null,null,!t.color,t.left.Y(null,null,!t.left.color,null,null),t.right.Y(null,null,!t.right.color,null,null))}function dg(){}function P(t,e,n){this.k=t,(this.aa=e)&&ne(this.aa),t.e()&&H(!this.aa||this.aa.e(),"An empty node cannot have a priority"),this.zb=n,this.Eb=null}function le(t,e){var n;return n=(n=fg(t,e))?(n=n.Hc())&&n.name:t.k.Hc(),n?new K(n,t.k.get(n)):null}function me(t,e){var n;return n=(n=fg(t,e))?(n=n.fc())&&n.name:t.k.fc(),n?new K(n,t.k.get(n)):null}function fg(t,e){return e===ae?null:t.zb.get(e.toString())}function M(e,n){if(null===e)return F;var i=null;if("object"==typeof e&&".priority"in e?i=e[".priority"]:"undefined"!=typeof n&&(i=n),H(null===i||"string"==typeof i||"number"==typeof i||"object"==typeof i&&".sv"in i,"Invalid priority type found: "+typeof i),"object"==typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!=typeof e||".sv"in e)return new Uc(e,M(i));if(e instanceof Array){var r=F,o=e;return t(o,function(t,e){if(Bb(o,e)&&"."!==e.substring(0,1)){var n=M(t);!n.J()&&n.e()||(r=r.U(e,n))}}),r.ga(M(i))}var a=[],s=!1,l=e;if(Cb(l,function(t){if("string"!=typeof t||"."!==t.substring(0,1)){var e=M(l[t]);e.e()||(s=s||!e.C().e(),a.push(new K(t,e)))}}),0==a.length)return F; -var u=He(a,Kc,function(t){return t.name},Mc);if(s){var c=He(a,ke(N));return new P(u,M(i),new Fe({".priority":c},{".priority":N}))}return new P(u,M(i),Je)}function hg(t){this.count=parseInt(Math.log(t+1)/gg,10),this.Pe=this.count-1,this.Jf=t+1&parseInt(Array(this.count+1).join("1"),2)}function ig(t){var e=!(t.Jf&1<o.Cc,"Stacking an older write on top of newer ones"),p(a)||(a=!0),o.la.push({path:e,Ja:n,Zc:i,visible:a}),a&&(o.T=Og(o.T,e,n)),o.Cc=i,r?Bh(t,new Zb(Jg,e,n)):[]}function Ch(t,e,n,i){var r=t.lb;return H(i>r.Cc,"Stacking an older merge on top of newer ones"),r.la.push({path:e,children:n,Zc:i,visible:!0}),r.T=Pg(r.T,e,n),r.Cc=i,n=xg(n),Bh(t,new Cd(Jg,e,n))}function Dh(t,e,n){n=n||!1;var i=Zg(t.lb,e);if(t.lb.Ed(e)){var r=Q;return null!=i.Ja?r=r.set(C,!0):Cb(i.children,function(t,e){r=r.set(new L(t),e)}),Bh(t,new Ig(i.path,r,n))}return[]}function Eh(t,e,n){return n=xg(n),Bh(t,new Cd(Lg,e,n))}function Fh(t,e,n,i){if(i=Gh(t,i),null!=i){var r=Hh(i);return i=r.path,r=r.Ib,e=T(i,e),n=new Zb(new Kg(!1,!0,r,!0),e,n),Ih(t,i,n)}return[]}function Jh(t,e,n,i){if(i=Gh(t,i)){var r=Hh(i);return i=r.path,r=r.Ib,e=T(i,e),n=xg(n),n=new Cd(new Kg(!1,!0,r,!0),e,n),Ih(t,i,n)}return[]}function Nh(e){return Ag(e,function(e,n,i){if(n&&null!=Vg(n))return[Vg(n)];var r=[];return n&&(r=Wg(n)),t(i,function(t){r=r.concat(t)}),r})}function Rh(t,e){for(var n=0;ni;){if(0==o)for(;n>=i;)na(this,t,i),i+=this.Ya;if(q(t)){for(;e>i;)if(r[o]=t.charCodeAt(i),++o,++i,o==this.Ya){na(this,r),o=0;break}}else for(;e>i;)if(r[o]=t[i],++o,++i,o==this.Ya){na(this,r),o=0;break}}this.ac=o,this.Pd+=e}};var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,v;t:{var Fa=n.navigator;if(Fa){var Ga=Fa.userAgent;if(Ga){v=Ga;break t}}v=""}ka(Ha,Error),Ha.prototype.name="CustomError";var w=Array.prototype,Ia=w.indexOf?function(t,e,n){return w.indexOf.call(t,e,n)}:function(t,e,n){if(n=null==n?0:0>n?Math.max(0,t.length+n):n,q(t))return q(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in r&&e.call(n,r[o],o,t)},Ka=w.filter?function(t,e,n){return w.filter.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=[],o=0,a=q(t)?t.split(""):t,s=0;i>s;s++)if(s in a){var l=a[s];e.call(n,l,s,t)&&(r[o++]=l)}return r},La=w.map?function(t,e,n){return w.map.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=Array(i),o=q(t)?t.split(""):t,a=0;i>a;a++)a in o&&(r[a]=e.call(n,o[a],a,t));return r},Ma=w.reduce?function(t,e,n,i){for(var o=[],a=1,s=arguments.length;s>a;a++)o.push(arguments[a]);return i&&(o[0]=r(e,i)),w.reduce.apply(t,o)}:function(t,e,n,i){var r=n;return Ja(t,function(n,o){r=e.call(i,r,n,o,t)}),r},Na=w.every?function(t,e,n){return w.every.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=q(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&!e.call(n,r[o],o,t))return!1;return!0},Ua=-1!=v.indexOf("Opera")||-1!=v.indexOf("OPR"),Va=-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE"),Wa=-1!=v.indexOf("Gecko")&&-1==v.toLowerCase().indexOf("webkit")&&!(-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE")),Xa=-1!=v.toLowerCase().indexOf("webkit");!function(){var t,e="";return Ua&&n.opera?(e=n.opera.version,ga(e)?e():e):(Wa?t=/rv\:([^\);]+)(\)|;)/:Va?t=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Xa&&(t=/WebKit\/(\S+)/),t&&(e=(e=t.exec(v))?e[1]:""),Va&&(t=(t=n.document)?t.documentMode:void 0,t>parseFloat(e))?String(t):e)}();var Ya=null,Za=null,$a=null,db,gb,ib=!1,jb=[];[].push(function(){ib=!1,jb=[]});var nb=0,qb=2,sb=3;mb.prototype.then=function(t,e,n){return tb(this,ga(t)?t:null,ga(e)?e:null,n)},mb.prototype.then=mb.prototype.then,mb.prototype.$goog_Thenable=!0,g=mb.prototype,g.xg=function(t,e){return tb(this,null,t,e)},g.cancel=function(t){this.L==nb&&fb(function(){var e=new rb(t);ub(this,e)},this)},g.Af=function(t){this.L=nb,pb(this,qb,t)},g.Bf=function(t){this.L=nb,pb(this,sb,t)},g.Sf=function(){for(;this.Ca&&this.Ca.length;){var t=this.Ca;this.Ca=null;for(var e=0;e"),t},ic.prototype.pf=function(){var t,e=this.Vc.get(),n={},i=!1;for(t in e)0=t.length){var e=Number(t);if(!isNaN(e)){r.Ee=e,r.frames=[],t=null;break t}}r.Ee=1,r.frames=[]}null!==t&&vd(r,t)}},this.La.onerror=function(t){r.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&r.f(t),r.fb()}},rd.prototype.start=function(){},rd.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1parseFloat(e[1])&&(t=!0)}return!t&&null!==qd&&!td},rd.responsesRequiredToBeHealthy=2,rd.healthyTimeout=3e4,g=rd.prototype,g.sd=function(){Xb.remove("previous_websocket_failure")},g.send=function(t){ud(this),t=B(t),this.rb+=t.length,lc(this.Xa,"bytes_sent",t.length),t=kd(t,16384),1=this.g.compare(this.Uc,t)&&0>=this.g.compare(t,this.wc)},g.F=function(t,e,n,i,r,o){return this.matches(new K(e,n))||(n=F),this.he.F(t,e,n,i,r,o)},g.za=function(t,e,n){e.J()&&(e=F);var i=e.ob(this.g),i=i.ga(F),r=this;return e.P(N,function(t,e){r.matches(new K(t,e))||(i=i.U(t,F))}),this.he.za(t,i,n)},g.ga=function(t){return t},g.Qa=function(){return!0},g.Vb=function(){return this.he},g=he.prototype,g.F=function(t,e,n,i,r,o){return this.sa.matches(new K(e,n))||(n=F),t.R(e).ca(n)?t:t.Fb()=this.g.compare(this.sa.Uc,a):0>=this.g.compare(a,this.sa.wc)))break;i=i.U(a.name,a.S),r++}}else{i=e.ob(this.g),i=i.ga(F);var s,l,u;if(this.Jb){e=i.Ye(this.g),s=this.sa.wc,l=this.sa.Uc;var c=ke(this.g);u=function(t,e){return c(e,t)}}else e=i.Xb(this.g),s=this.sa.Uc,l=this.sa.wc,u=ke(this.g);for(var r=0,h=!1;0=u(s,a)&&(h=!0),(o=h&&r=u(a,l))?r++:i=i.U(a.name,F)}return this.sa.Vb().za(t,i,n)},g.ga=function(t){return t},g.Qa=function(){return!0},g.Vb=function(){return this.sa.Vb()};var oe=["object","boolean","number","string"];g=Uc.prototype,g.J=function(){return!0},g.C=function(){return this.aa},g.ga=function(t){return new Uc(this.B,t)},g.R=function(t){return".priority"===t?this.aa:F},g.Q=function(t){return t.e()?this:".priority"===J(t)?this.aa:F},g.Fa=function(){return!1},g.Xe=function(){return null},g.U=function(t,e){return".priority"===t?this.ga(e):e.e()&&".priority"!==t?this:F.U(t,e).ga(this.aa)},g.F=function(t,e){var n=J(t);return null===n?e:e.e()&&".priority"!==n?this:(H(".priority"!==n||1===Wd(t),".priority must be the last token in a path"),this.U(n,F.F(D(t),e)))},g.e=function(){return!1},g.Fb=function(){return 0},g.P=function(){return!1},g.H=function(t){return t&&!this.C().e()?{".value":this.Ea(),".priority":this.C().H()}:this.Ea()},g.hash=function(){if(null===this.Eb){var t="";this.aa.e()||(t+="priority:"+pe(this.aa.H())+":");var e=typeof this.B,t=t+(e+":"),t="number"===e?t+md(this.B):t+this.B;this.Eb=Yc(t)}return this.Eb},g.Ea=function(){return this.B},g.tc=function(t){if(t===F)return 1;if(t instanceof P)return-1;H(t.J(),"Unknown node type");var e=typeof t.B,n=typeof this.B,i=Ia(oe,e),r=Ia(oe,n);return H(i>=0,"Unknown leaf type: "+e),H(r>=0,"Unknown leaf type: "+n),i===r?"object"===n?0:this.B=this.o.length)return null;for(var t=[],e=this.Z;e=this.o.length},g.ca=function(t){if(Wd(this)!==Wd(t))return!1;for(var e=this.Z,n=t.Z;e<=this.o.length;e++,n++)if(this.o[e]!==t.o[n])return!1;return!0},g.contains=function(t){var e=this.Z,n=t.Z;if(Wd(this)>Wd(t))return!1;for(;e0){for(var r=Array(i),o=0;i>o;o++)r[o]=n[o];n=r}else n=[];for(i=0;i=0;o--)r[o]="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(n%64),n=Math.floor(n/64);if(H(0===n,"Cannot push at time == 0"),n=r.join(""),i){for(o=11;o>=0&&63===e[o];o--)e[o]=0;e[o]++}else for(o=0;12>o;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return H(20===n.length,"nextPushId: Length should be 20."),n}}();g=Rf.prototype,g.Ra=function(t,e){return new Rf(this.Oa,this.ba.Ra(t,e,this.Oa).Y(null,null,!1,null,null))},g.remove=function(t){return new Rf(this.Oa,this.ba.remove(t,this.Oa).Y(null,null,!1,null,null))},g.get=function(t){for(var e,n=this.ba;!n.e();){if(e=this.Oa(t,n.key),0===e)return n.value;0>e?n=n.left:e>0&&(n=n.right)}return null},g.e=function(){return this.ba.e()},g.count=function(){return this.ba.count()},g.Hc=function(){return this.ba.Hc()},g.fc=function(){return this.ba.fc()},g.ia=function(t){return this.ba.ia(t)},g.Xb=function(t){return new Uf(this.ba,null,this.Oa,!1,t)},g.Yb=function(t,e){return new Uf(this.ba,t,this.Oa,!1,e)},g.$b=function(t,e){return new Uf(this.ba,t,this.Oa,!0,e)},g.Ye=function(t){return new Uf(this.ba,null,this.Oa,!0,t)},g=Wf.prototype,g.Y=function(t,e,n,i,r){return new Wf(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=i?i:this.left,null!=r?r:this.right)},g.count=function(){return this.left.count()+1+this.right.count()},g.e=function(){return!1},g.ia=function(t){return this.left.ia(t)||t(this.key,this.value)||this.right.ia(t)},g.Hc=function(){return Xf(this).key},g.fc=function(){return this.right.e()?this.key:this.right.fc()},g.Ra=function(t,e,n){var i,r;return r=this,i=n(t,r.key),r=0>i?r.Y(null,null,null,r.left.Ra(t,e,n),null):0===i?r.Y(null,e,null,null,null):r.Y(null,null,null,null,r.right.Ra(t,e,n)),Yf(r)},g.remove=function(t,e){var n,i;if(n=this,0>e(t,n.key))n.left.e()||n.left.fa()||n.left.left.fa()||(n=$f(n)),n=n.Y(null,null,null,n.left.remove(t,e),null);else{if(n.left.fa()&&(n=ag(n)),n.right.e()||n.right.fa()||n.right.left.fa()||(n=bg(n),n.left.left.fa()&&(n=ag(n),n=bg(n))),0===e(t,n.key)){if(n.right.e())return Sf;i=Xf(n.right),n=n.Y(i.key,i.value,null,null,Zf(n.right))}n=n.Y(null,null,null,null,n.right.remove(t,e))}return Yf(n)},g.fa=function(){return this.color},g=dg.prototype,g.Y=function(){return this},g.Ra=function(t,e){return new Wf(t,e,null)},g.remove=function(){return this},g.count=function(){return 0},g.e=function(){return!0},g.ia=function(){return!1},g.Hc=function(){return null},g.fc=function(){return null},g.fa=function(){return!1};var Sf=new dg;g=P.prototype,g.J=function(){return!1},g.C=function(){return this.aa||F},g.ga=function(t){return this.k.e()?this:new P(this.k,t,this.zb)},g.R=function(t){return".priority"===t?this.C():(t=this.k.get(t),null===t?F:t)},g.Q=function(t){var e=J(t);return null===e?this:this.R(e).Q(D(t))},g.Fa=function(t){return null!==this.k.get(t)},g.U=function(t,e){if(H(e,"We should always be passing snapshot nodes"),".priority"===t)return this.ga(e);var n,i,r=new K(t,e);return e.e()?(n=this.k.remove(t),r=Ie(this.zb,r,this.k)):(n=this.k.Ra(t,e),r=Ge(this.zb,r,this.k)),i=n.e()?F:this.aa,new P(n,i,r)},g.F=function(t,e){var n=J(t);if(null===n)return e;H(".priority"!==J(t)||1===Wd(t),".priority must be the last token in a path");var i=this.R(n).F(D(t),e);return this.U(n,i)},g.e=function(){return this.k.e()},g.Fb=function(){return this.k.count()};var eg=/^(0|[1-9]\d*)$/;g=P.prototype,g.H=function(t){if(this.e())return null;var e={},n=0,i=0,r=!0;if(this.P(N,function(o,a){e[o]=a.H(t),n++,r&&eg.test(o)?i=Math.max(i,Number(o)):r=!1}),!t&&r&&2*n>i){var o,a=[];for(o in e)a[o]=e[o];return a}return t&&!this.C().e()&&(e[".priority"]=this.C().H()),e},g.hash=function(){if(null===this.Eb){var t="";this.C().e()||(t+="priority:"+pe(this.C().H())+":"),this.P(N,function(e,n){var i=n.hash();""!==i&&(t+=":"+e+":"+i)}),this.Eb=""===t?"":Yc(t)}return this.Eb},g.Xe=function(t,e,n){return(n=fg(this,n))?(t=Tf(n,new K(t,e)))?t.name:null:Tf(this.k,t)},g.P=function(t,e){var n=fg(this,t);return n?n.ia(function(t){return e(t.name,t.S)}):this.k.ia(e)},g.Xb=function(t){return this.Yb(t.Ic(),t)},g.Yb=function(t,e){var n=fg(this,e);if(n)return n.Yb(t,function(t){return t});for(var n=this.k.Yb(t.name,Nc),i=Vf(n);null!=i&&0>e.compare(i,t);)R(n),i=Vf(n);return n},g.Ye=function(t){return this.$b(t.Gc(),t)},g.$b=function(t,e){var n=fg(this,e);if(n)return n.$b(t,function(t){return t});for(var n=this.k.$b(t.name,Nc),i=Vf(n);null!=i&&0=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.me(t),this.Oc)},g.ne=function(t){if(y("Query.limitToLast",1,1,arguments.length),!fa(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.ne(t),this.Oc)},g.jg=function(t){if(y("Query.orderByChild",1,1,arguments.length),"$key"===t)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Hf("Query.orderByChild",t),sg(this,"Query.orderByChild");var e=new L(t);if(e.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");return e=new te(e),e=De(this.n,e),qg(e),new X(this.w,this.path,e,!0)},g.kg=function(){y("Query.orderByKey",0,0,arguments.length),sg(this,"Query.orderByKey");var t=De(this.n,ae);return qg(t),new X(this.w,this.path,t,!0)},g.lg=function(){y("Query.orderByPriority",0,0,arguments.length),sg(this,"Query.orderByPriority");var t=De(this.n,N);return qg(t),new X(this.w,this.path,t,!0)},g.mg=function(){y("Query.orderByValue",0,0,arguments.length),sg(this,"Query.orderByValue");var t=De(this.n,ze);return qg(t),new X(this.w,this.path,t,!0)},g.Nd=function(t,e){y("Query.startAt",0,2,arguments.length),Af("Query.startAt",t,this.path,!0),Gf("Query.startAt",e);var n=this.n.Nd(t,e);if(rg(n),qg(n),this.n.ka)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return p(t)||(e=t=null),new X(this.w,this.path,n,this.Oc)},g.fd=function(t,e){y("Query.endAt",0,2,arguments.length),Af("Query.endAt",t,this.path,!0),Gf("Query.endAt",e);var n=this.n.fd(t,e);if(rg(n),qg(n),this.n.na)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new X(this.w,this.path,n,this.Oc)},g.Pf=function(t,e){if(y("Query.equalTo",1,2,arguments.length),Af("Query.equalTo",t,this.path,!1),Gf("Query.equalTo",e),this.n.ka)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Nd(t,e).fd(t,e)},g.toString=function(){y("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.Z;nt?-1:1});g=vg.prototype,g.e=function(){return null===this.value&&this.children.e()},g.subtree=function(t){if(t.e())return this;var e=this.children.get(J(t));return null!==e?e.subtree(D(t)):Q},g.set=function(t,e){if(t.e())return new vg(e,this.children);var n=J(t),i=(this.children.get(n)||Q).set(D(t),e),n=this.children.Ra(n,i);return new vg(this.value,n)},g.remove=function(t){if(t.e())return this.children.e()?Q:new vg(null,this.children);var e=J(t),n=this.children.get(e);return n?(t=n.remove(D(t)),e=t.e()?this.children.remove(e):this.children.Ra(e,t),null===this.value&&e.e()?Q:new vg(this.value,e)):this},g.get=function(t){if(t.e())return this.value;var e=this.children.get(J(t));return e?e.get(D(t)):null};var Q=new vg(null);vg.prototype.toString=function(){var t={};return Yd(this,function(e,n){t[e.toString()]=n.toString()}),B(t)},Ig.prototype.Nc=function(t){return this.path.e()?null!=this.Pb.value?(H(this.Pb.children.e(),"affectedTree should not have overlapping affected paths."),this):(t=this.Pb.subtree(new L(t)),new Ig(C,t,this.Id)):(H(J(this.path)===t,"operationForChild called for unrelated child."),new Ig(D(this.path),this.Pb,this.Id))},Ig.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" ack write revert="+this.Id+" affectedTree="+this.Pb+")"};var $b=0,Dd=1,Qd=2,bc=3,Jg=new Kg(!0,!1,null,!1),Lg=new Kg(!1,!0,null,!1);Kg.prototype.toString=function(){return this.ee?"user":this.De?"server(queryID="+this.Ib+")":"server"};var Ng=new Mg(new vg(null));Mg.prototype.Ed=function(t){return t.e()?Ng:(t=$d(this.X,t,Q),new Mg(t))},Mg.prototype.e=function(){return this.X.e()},Mg.prototype.apply=function(t){return Tg(C,this.X,t)},g=Ug.prototype,g.e=function(){return xa(this.Aa)},g.gb=function(e,n,i){var r=e.source.Ib;if(null!==r)return r=x(this.Aa,r),H(null!=r,"SyncTree gave us an op for an invalid query."),r.gb(e,n,i);var o=[];return t(this.Aa,function(t){o=o.concat(t.gb(e,n,i))}),o},g.Ob=function(t,e,n,i,r){var o=t.ya(),a=x(this.Aa,o);if(!a){var a=n.Ba(r?i:null),s=!1;a?s=!0:(a=i instanceof P?n.sc(i):F,s=!1),a=new kg(t,new Ud(new Dc(a,s,!1),new Dc(i,r,!1))),this.Aa[o]=a}return a.Ob(e),ng(a,e)},g.mb=function(e,n,i){var r=e.ya(),o=[],a=[],s=null!=Vg(this);if("default"===r){var l=this;t(this.Aa,function(t,e){a=a.concat(t.mb(n,i)),t.e()&&(delete l.Aa[e],S(t.W.n)||o.push(t.W))})}else{var u=x(this.Aa,r);u&&(a=a.concat(u.mb(n,i)),u.e()&&(delete this.Aa[r],S(u.W.n)||o.push(u.W)))}return s&&null==Vg(this)&&o.push(new U(e.w,e.path)),{qg:o,Rf:a}},g.jb=function(e){var n=null;return t(this.Aa,function(t){n=n||t.jb(e)}),n},g=Yg.prototype,g.Ed=function(e){var n=Pa(this.la,function(t){return t.Zc===e});H(n>=0,"removeWrite called with nonexistent writeId.");var i=this.la[n];this.la.splice(n,1);for(var r=i.visible,o=!1,a=this.la.length-1;r&&a>=0;){var s=this.la[a];s.visible&&(a>=n&&$g(s,i.path)?r=!1:i.path.contains(s.path)&&(o=!0)),a--}if(r){if(o)this.T=ah(this.la,bh,C),this.Cc=0r;r++)e+=" ";console.log(e+i)}}},g.Be=function(t){lc(this.Xa,t),this.wg.xf[t]=!0},g.f=function(t){var e="";this.Ua&&(e=this.Ua.id+":"),E(e,arguments)},uf.prototype.eb=function(){for(var t in this.nb)this.nb[t].eb()},uf.prototype.lc=function(){for(var t in this.nb)this.nb[t].lc()},uf.prototype.ce=function(t){this.Df=t},ba(uf),uf.prototype.interrupt=uf.prototype.eb,uf.prototype.resume=uf.prototype.lc;var Z={};if(Z.pc=kh,Z.DataConnection=Z.pc,kh.prototype.vg=function(t,e){this.ua("q",{p:t},e)},Z.pc.prototype.simpleListen=Z.pc.prototype.vg,kh.prototype.Of=function(t,e){this.ua("echo",{d:t},e)},Z.pc.prototype.echo=Z.pc.prototype.Of,kh.prototype.interrupt=kh.prototype.eb,Z.Gf=Ye,Z.RealTimeConnection=Z.Gf,Ye.prototype.sendRequest=Ye.prototype.ua,Ye.prototype.close=Ye.prototype.close,Z.$f=function(t){var e=kh.prototype.put;return kh.prototype.put=function(n,i,r,o){p(o)&&(o=t()),e.call(this,n,i,r,o)},function(){kh.prototype.put=e}},Z.hijackHash=Z.$f,Z.Ff=fc,Z.ConnectionTarget=Z.Ff,Z.ya=function(t){return t.ya()},Z.queryIdentifier=Z.ya,Z.cg=function(t){return t.w.Ua.$},Z.listens=Z.cg,Z.ce=function(t){uf.Wb().ce(t)},Z.forceRestClient=Z.ce,Z.Context=uf,ka(U,X),g=U.prototype,g.getKey=function(){return y("Firebase.key",0,0,arguments.length),this.path.e()?null:Xd(this.path)},g.m=function(t){if(y("Firebase.child",1,1,arguments.length),fa(t))t=String(t);else if(!(t instanceof L))if(null===J(this.path)){var e=t;e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),Hf("Firebase.child",e)}else Hf("Firebase.child",t);return new U(this.w,this.path.m(t))},g.getParent=function(){y("Firebase.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new U(this.w,t)},g.Xf=function(){y("Firebase.ref",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},g.Nf=function(){return this.w.$a},g.set=function(t,e){y("Firebase.set",1,2,arguments.length),If("Firebase.set",this.path),Af("Firebase.set",t,this.path,!1),A("Firebase.set",2,e,!0);var n=new Hb;return this.w.Kb(this.path,t,null,Ib(n,e)),n.ra},g.update=function(t,e){if(y("Firebase.update",1,2,arguments.length),If("Firebase.update",this.path),da(t)){for(var n={},i=0;i>>0),h=0,f=function(t,e,n){return t.call.apply(t.bind,arguments)},d=function(t,e,n){if(!t)throw Error();if(2s&&(s*=2);var n;1===c?(c=2,n=0):n=1e3*(s+Math.random()),r(n)}}function a(t){f||(f=!0,h||(null!==l?(t||(c=2),clearTimeout(l),r(0)):t||(c=1)))}var s=1,l=null,u=!1,c=0,h=!1,f=!1;return r(0),setTimeout(function(){u=!0,a(!0)},n),a},b="https://firebasestorage.googleapis.com",y=function(t,e){this.code="storage/"+t,this.message="Firebase Storage: "+e,this.serverResponse=null,this.name="FirebaseError"};v(y,Error);var q=function(){return new y("unknown","An unknown error occurred, please check the error payload for server response.")},w=function(){return new y("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again.")},x=function(t){return new y("unauthorized","User does not have permission to access '"+t+"'.")},E=function(){return new y("canceled","User canceled the upload/download.")},k=function(t,e,n){return new y("invalid-argument","Invalid argument in `"+e+"` at index "+t+": "+n)},T=function(){return new y("app-deleted","The Firebase app was deleted.")},A=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},S=function(t){var e={};return A(t,function(t,n){e[t]=n}),e},_=function(t,e,n,i){this.l=t,this.f={},this.i=e,this.b={},this.c="",this.N=n,this.g=this.a=null,this.h=[200],this.j=i},I={STATE_CHANGED:"state_changed"},R={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},O=function(t){switch(t){case"running":case"pausing":case"canceling":return"running";case"paused":return"paused";case"success":return"success";case"canceled":return"canceled";case"error":return"error";default:return"error"}},C=function(t){return i(t)&&null!==t},M=function(t){return"string"==typeof t||t instanceof String},F=function(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null};F.prototype.get=function(){var t;return 0t?-1:t>e?1:0},J=function(t,e){this.a=t,this.b=e};J.prototype.clone=function(){return new J(this.a,this.b)};var Y=function(t,e){this.bucket=t,this.path=e},Z=function(t){var e=encodeURIComponent;return"/b/"+e(t.bucket)+"/o/"+e(t.path)},$=function(t){for(var e=null,n=[{ja:/^gs:\/\/([A-Za-z0-9.\-]+)(\/(.*))?$/i,aa:{bucket:1,path:3},ia:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path=t.path.slice(0,-1))}},{ja:/^https?:\/\/firebasestorage\.googleapis\.com\/v[A-Za-z0-9_]+\/b\/([A-Za-z0-9.\-]+)\/o(\/([^?#]*).*)?$/i,aa:{bucket:1,path:3},ia:function(t){t.path=decodeURIComponent(t.path)}}],i=0;in?Math.max(0,t.length+n):n,s(t))return s(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in r&&e.call(n,r[o],o,t)},yt=Array.prototype.filter?function(t,e,n){return ot(null!=t.length),Array.prototype.filter.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=[],o=0,a=s(t)?t.split(""):t,l=0;i>l;l++)if(l in a){var u=a[l];e.call(n,u,l,t)&&(r[o++]=u)}return r},qt=Array.prototype.map?function(t,e,n){return ot(null!=t.length),Array.prototype.map.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=Array(i),o=s(t)?t.split(""):t,a=0;i>a;a++)a in o&&(r[a]=e.call(n,o[a],a,t));return r},wt=Array.prototype.some?function(t,e,n){return ot(null!=t.length),Array.prototype.some.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=s(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&e.call(n,r[o],o,t))return!0;return!1},xt=function(t){var e;t:{e=Hn;for(var n=t.length,i=s(t)?t.split(""):t,r=0;n>r;r++)if(r in i&&e.call(void 0,i[r],r,t)){e=r;break t}e=-1}return 0>e?null:s(t)?t.charAt(e):t[e]},Et=function(t){if("array"!=o(t))for(var e=t.length-1;e>=0;e--)delete t[e];t.length=0},kt=function(t,e){e=mt(t,e);var n;return(n=e>=0)&&(ot(null!=t.length),Array.prototype.splice.call(t,e,1)),n},Tt=function(t){var e=t.length;if(e>0){for(var n=Array(e),i=0;e>i;i++)n[i]=t[i];return n}return[]},At=new F(function(){return new _t},function(t){t.reset()},100),St=function(){var t=we,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e},_t=function(){this.next=this.b=this.a=null};_t.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},_t.prototype.reset=function(){this.next=this.b=this.a=null};var It=function(t,e){this.type=t,this.a=this.target=e,this.ka=!0};It.prototype.b=function(){this.ka=!1};var Rt,Ot=function(t,e,n,i,r){this.listener=t,this.a=null,this.src=e,this.type=n,this.U=!!i,this.N=r,++ht,this.O=this.T=!1},Ct=function(t){t.O=!0,t.listener=null,t.a=null,t.src=null,t.N=null},Mt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Ft=function(t,e){return e=yt(e.split("/"),function(t){return 0-1?(t=e[s],i||(t.T=!1)):(t=new Ot(n,t.src,a,!!r,o),t.T=i,e.push(t)),t},jt=function(t,e){var n=e.type;n in t.a&&kt(t.a[n],e)&&(Ct(e),0==t.a[n].length&&(delete t.a[n],t.b--))},Dt=function(t,e,n,i){for(var r=0;r=this.o()){for(var n=this.a,i=0;i0&&(i=e-1>>1,t[i].a>n.a);)t[e]=t[i],e=i;t[e]=n};t=Bt.prototype,t.w=function(){for(var t=this.a,e=[],n=t.length,i=0;n>i;i++)e.push(t[i].b);return e},t.D=function(){for(var t=this.a,e=[],n=t.length,i=0;n>i;i++)e.push(t[i].a);return e},t.clone=function(){return new Bt(this)},t.o=function(){return this.a.length},t.F=function(){return 0==this.a.length},t.clear=function(){Et(this.a)};var Kt=function(){this.b=[],this.a=[]},Qt=function(t){return 0==t.b.length&&(t.b=t.a,t.b.reverse(),t.a=[]),t.b.pop()};Kt.prototype.o=function(){return this.b.length+this.a.length},Kt.prototype.F=function(){return 0==this.b.length&&0==this.a.length},Kt.prototype.clear=function(){this.b=[],this.a=[]},Kt.prototype.w=function(){for(var t=[],e=this.b.length-1;e>=0;--e)t.push(this.b[e]);for(var n=this.a.length,e=0;n>e;++e)t.push(this.a[e]);return t};var Vt,zt=function(t){if(t.w&&"function"==typeof t.w)return t.w();if(s(t))return t.split("");if(a(t)){for(var e=[],n=t.length,i=0;n>i;i++)e.push(t[i]);return e}return D(t)},Gt=function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(a(t)||s(t))bt(t,e,void 0);else{var n;if(t.D&&"function"==typeof t.D)n=t.D();else if(t.w&&"function"==typeof t.w)n=void 0;else if(a(t)||s(t)){n=[];for(var i=t.length,r=0;i>r;r++)n.push(r)}else n=U(t);for(var i=zt(t),r=i.length,o=0;r>o;o++)e.call(void 0,i[o],n&&n[o],t)}},Jt=function(t){n.setTimeout(function(){throw t},0)},Yt=function(){var t=n.MessageChannel;if("undefined"==typeof t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!pt("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow,t=e.document;t.open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host,t=p(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this);e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),"undefined"!=typeof t&&!pt("Trident")&&!pt("MSIE")){var e=new t,r={},o=r;return e.port1.onmessage=function(){if(i(r.next)){r=r.next;var t=r.ea;r.ea=null,t()}},function(t){o.next={ea:t},o=o.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}},Zt="StopIteration"in n?n.StopIteration:{message:"StopIteration",stack:""},$t=function(){};$t.prototype.next=function(){throw Zt},$t.prototype.X=function(){return this};var te=function(){Bt.call(this)};v(te,Bt);var ee,ne=pt("Opera"),ie=pt("Trident")||pt("MSIE"),re=pt("Edge"),oe=pt("Gecko")&&!(-1!=ut.toLowerCase().indexOf("webkit")&&!pt("Edge"))&&!(pt("Trident")||pt("MSIE"))&&!pt("Edge"),ae=-1!=ut.toLowerCase().indexOf("webkit")&&!pt("Edge"),se=function(){var t=n.document;return t?t.documentMode:void 0};t:{var le="",ue=function(){var t=ut;return oe?/rv\:([^\);]+)(\)|;)/.exec(t):re?/Edge\/([\d\.]+)/.exec(t):ie?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):ae?/WebKit\/(\S+)/.exec(t):ne?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(ue&&(le=ue?ue[1]:""),ie){var ce=se();if(null!=ce&&ce>parseFloat(le)){ee=String(ce);break t}}ee=le}var he,fe,de=ee,pe={},ge=function(t){var e;if(!(e=pe[t])){e=0;for(var n=z(String(de)).split("."),i=z(String(t)).split("."),r=Math.max(n.length,i.length),o=0;0==e&&r>o;o++){var a=n[o]||"",s=i[o]||"",l=/(\d*)(\D*)/g,u=/(\d*)(\D*)/g;do{var c=l.exec(a)||["","",""],h=u.exec(s)||["","",""];if(0==c[0].length&&0==h[0].length)break;e=G(0==c[1].length?0:parseInt(c[1],10),0==h[1].length?0:parseInt(h[1],10))||G(0==c[2].length,0==h[2].length)||G(c[2],h[2])}while(0==e)}e=pe[t]=e>=0}return e},ve=n.document,me=ve&&ie?se()||("CSS1Compat"==ve.compatMode?parseInt(de,10):5):void 0,be=function(t,e){he||ye(),qe||(he(),qe=!0);var n=we,i=At.get();i.set(t,e),n.b?n.b.next=i:(ot(!n.a),n.a=i),n.b=i},ye=function(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve(void 0);he=function(){t.then(xe)}}else he=function(){var t=xe;!l(n.setImmediate)||n.Window&&n.Window.prototype&&!pt("Edge")&&n.Window.prototype.setImmediate==n.setImmediate?(Vt||(Vt=Yt()),Vt(t)):n.setImmediate(t)}},qe=!1,we=new function(){this.b=this.a=null},xe=function(){for(var t;t=St();){try{t.a.call(t.b)}catch(e){Jt(e)}P(At,t)}qe=!1};(fe=!ie)||(fe=9<=Number(me));var Ee=fe,ke=ie&&!ge("9");!ae||ge("528"),oe&&ge("1.9b")||ie&&ge("8")||ne&&ge("9.5")||ae&&ge("528"),oe&&!ge("8")||ie&&ge("9");var Te=function(t,e){this.b={},this.a=[],this.f=this.c=0;var n=arguments.length;if(n>1){if(n%2)throw Error("Uneven number of arguments");for(var i=0;n>i;i+=2)this.set(arguments[i],arguments[i+1])}else if(t){t instanceof Te?(n=t.D(),i=t.w()):(n=U(t),i=D(t));for(var r=0;r2*t.c&&Se(t),!0):!1},Se=function(t){if(t.c!=t.a.length){for(var e=0,n=0;e=i.a.length)throw Zt;var r=i.a[e++];return t?r:i.b[r]},r};var _e=function(t,e){if(It.call(this,t?t.type:""),this.c=this.a=this.target=null,t){if(this.type=t.type,this.target=t.target||t.srcElement,this.a=e,(e=t.relatedTarget)&&oe)try{Q(e.nodeName); -}catch(n){}this.c=t,t.defaultPrevented&&this.b()}};v(_e,It),_e.prototype.b=function(){_e.G.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,ke)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var Ie=function(t,e){if(this.a=0,this.i=void 0,this.c=this.b=this.f=null,this.g=this.h=!1,t!=r)try{var n=this;t.call(e,function(t){Le(n,2,t)},function(t){try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Le(n,3,t)})}catch(i){Le(this,3,i)}},Re=function(){this.next=this.f=this.c=this.a=this.b=null,this.g=!1};Re.prototype.reset=function(){this.f=this.c=this.a=this.b=null,this.g=!1};var Oe=new F(function(){return new Re},function(t){t.reset()},100),Ce=function(t,e,n){var i=Oe.get();return i.a=t,i.c=e,i.f=n,i},Me=function(t){if(t instanceof Ie)return t;var e=new Ie(r);return Le(e,2,t),e},Fe=function(t){return new Ie(function(e,n){n(t)})};Ie.prototype.then=function(t,e,n){return null!=t&&st(t,"opt_onFulfilled should be a function."),null!=e&&st(e,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Ne(this,l(t)?t:null,l(e)?e:null,n)},X(Ie),Ie.prototype.l=function(t,e){return Ne(this,null,t,e)};var Pe=function(t,e){t.b||2!=t.a&&3!=t.a||De(t),ot(null!=e.a),t.c?t.c.next=e:t.b=e,t.c=e},Ne=function(t,e,n,i){var r=Ce(null,null,null);return r.b=new Ie(function(t,o){r.a=e?function(n){try{var r=e.call(i,n);t(r)}catch(a){o(a)}}:t,r.c=n?function(e){try{var r=n.call(i,e);t(r)}catch(a){o(a)}}:o}),r.b.f=t,Pe(t,r),r.b};Ie.prototype.s=function(t){ot(1==this.a),this.a=0,Le(this,2,t)},Ie.prototype.m=function(t){ot(1==this.a),this.a=0,Le(this,3,t)};var Le=function(t,e,n){if(0==t.a){t==n&&(e=3,n=new TypeError("Promise cannot resolve to itself")),t.a=1;var i;t:{var o=n,a=t.s,s=t.m;if(o instanceof Ie)null!=a&&st(a,"opt_onFulfilled should be a function."),null!=s&&st(s,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Pe(o,Ce(a||r,s||null,t)),i=!0;else if(K(o))o.then(a,s,t),i=!0;else{if(u(o))try{var c=o.then;if(l(c)){je(o,c,a,s,t),i=!0;break t}}catch(h){s.call(t,h),i=!0;break t}i=!1}}i||(t.i=n,t.a=e,t.f=null,De(t),3!=e||We(t,n))}},je=function(t,e,n,i,r){var o=!1,a=function(t){o||(o=!0,n.call(r,t))},s=function(t){o||(o=!0,i.call(r,t))};try{e.call(t,a,s)}catch(l){s(l)}},De=function(t){t.h||(t.h=!0,be(t.j,t))},Ue=function(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.c=null),null!=e&&ot(null!=e.a),e};Ie.prototype.j=function(){for(var t;t=Ue(this);){var e=this.a,n=this.i;if(3==e&&t.c&&!t.g){var i;for(i=this;i&&i.g;i=i.f)i.g=!1}if(t.b)t.b.f=null,He(t,e,n);else try{t.g?t.a.call(t.f):He(t,e,n)}catch(r){Be.call(null,r)}P(Oe,t)}this.h=!1};var He=function(t,e,n){2==e?t.a.call(t.f,n):t.c&&t.c.call(t.f,n)},We=function(t,e){t.g=!0,be(function(){t.g&&Be.call(null,e)})},Be=Jt,Xe=function(t){if(this.a=new Te,t){t=zt(t);for(var e=t.length,n=0;e>n;n++){var i=t[n];this.a.set(Ke(i),i)}}},Ke=function(t){var e=typeof t;return"object"==e&&t||"function"==e?"o"+(t[c]||(t[c]=++h)):e.substr(0,1)+t};t=Xe.prototype,t.o=function(){return this.a.o()},t.clear=function(){this.a.clear()},t.F=function(){return this.a.F()},t.w=function(){return this.a.w()},t.clone=function(){return new Xe(this)},t.X=function(){return this.a.X(!1)};var Qe=function(t){return function(){var e=[];Array.prototype.push.apply(e,arguments),Me(!0).then(function(){t.apply(null,e)})}},Ve="closure_lm_"+(1e6*Math.random()|0),ze={},Ge=0,Je=function(t,e,n,i,r){if("array"==o(e)){for(var a=0;a-1&&(Ct(a[n]),ot(null!=a.length),Array.prototype.splice.call(a,n,1),0==a.length&&(delete t.a[e],t.b--)))):t&&(t=sn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=Dt(e,n,!!i,r)),(n=t>-1?e[t]:null)&&en(n))},en=function(t){if("number"!=typeof t&&t&&!t.O){var e=t.src;if(e&&e[ct])jt(e.b,t);else{var n=t.type,i=t.a;e.removeEventListener?e.removeEventListener(n,i,t.U):e.detachEvent&&e.detachEvent(nn(n),i),Ge--,(n=sn(e))?(jt(n,t),0==n.b&&(n.src=null,e[Ve]=null)):Ct(t)}}},nn=function(t){return t in ze?ze[t]:ze[t]="on"+t},rn=function(t,e,n,i){var r=!0;if((t=sn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;ti.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(a){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=e.a;o;o=o.parentNode)i.push(o);for(t=t.type,o=i.length-1;o>=0;o--){e.a=i[o];var s=rn(i[o],t,!0,e),r=r&&s}for(o=0;o>>0),un=function(t){return ot(t,"Listener can not be null."),l(t)?t:(ot(t.handleEvent,"An object listener must have handleEvent method."),t[ln]||(t[ln]=function(e){return t.handleEvent(e)}),t[ln])},cn=function(t,e){if(lt.call(this),this.l=t||0,this.c=e||10,this.l>this.c)throw Error("[goog.structs.Pool] Min can not be greater than max");this.a=new Kt,this.b=new Xe,this.i=null,this.S()};v(cn,lt),cn.prototype.W=function(){var t=g();if(!(null!=this.i&&0>t-this.i)){for(var e;0this.c&&0=kn(this).value)for(l(e)&&(e=e()),t=new L(t,String(e),this.f),i&&(t.a=i),i="log:"+t.b,n.console&&(n.console.timeStamp?n.console.timeStamp(i):n.console.markTimeline&&n.console.markTimeline(i)),n.msWriteProfilerMark&&n.msWriteProfilerMark(i),i=this;i;)i=i.a};var Tn={},An=null,Sn=function(t){An||(An=new yn(""),Tn[""]=An,An.c=xn);var e;if(!(e=Tn[t])){e=new yn(t);var n=t.lastIndexOf("."),i=t.substr(n+1),n=Sn(t.substr(0,n));n.b||(n.b={}),n.b[i]=e,e.a=n,Tn[t]=e}return e},_n=function(){lt.call(this),this.b=new Nt(this),this.ma=this,this.I=null};v(_n,lt),_n.prototype[ct]=!0,_n.prototype.removeEventListener=function(t,e,n,i){tn(this,t,e,n,i)};var In=function(t,e){On(t);var n,i=t.I;if(i){n=[];for(var r=1;i;i=i.I)n.push(i),ot(1e3>++r,"infinite loop")}t=t.ma,i=e.type||e,s(e)?e=new It(e,t):e instanceof It?e.target=e.target||t:(r=e,e=new It(i,t),B(e,r));var o,r=!0;if(n)for(var a=n.length-1;a>=0;a--)o=e.a=n[a],r=Rn(o,i,!0,e)&&r;if(o=e.a=t,r=Rn(o,i,!0,e)&&r,r=Rn(o,i,!1,e)&&r,n)for(a=0;a=o)n=void 0;else{if(1==o)Et(r);else{r[0]=r.pop();for(var r=0,i=i.a,o=i.length,a=i[r];o>>1>r;){var s=2*r+1,l=2*r+2,s=o>l&&i[l].aa.a)break;i[r]=i[s],r=s}i[r]=a}n=n.b}n.apply(this,[e])}},t.Y=function(t){Cn.G.Y.call(this,t),this.$()},t.S=function(){Cn.G.S.call(this),this.$()},t.A=function(){Cn.G.A.call(this),n.clearTimeout(void 0),this.f.clear(),this.f=null};var Mn=function(t,e){t&&t.log(En,e,void 0)},Fn=function(t,e,i){if(l(t))i&&(t=p(t,i));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=p(t.handleEvent,t)}return 2147483647=500&&600>o||429===o?(i=7===e.J,hn(e),t(!1,new ri(!1,null,i))):(i=0<=mt(r.I,o),t(!0,new ri(i,e)))})})}function n(t,e){var n=r.l;t=r.s;var o=e.c;if(e.b)try{var a=r.v(o,Zn(o));i(a)?n(a):n()}catch(s){t(s)}else null!==o?(e=q(),a=Zn(o),e.serverResponse=a,t(r.j?r.j(o,e):e)):(e=e.a?r.h?T():E():new y("retry-limit-exceeded","Max retry time for operation exceeded, please try again."),t(e));hn(o)}var r=t;t.i?n(0,new ri(!1,null,!0)):t.f=m(e,n,t.K)};ii.prototype.a=function(){return this.C},ii.prototype.b=function(t){this.i=!0,this.h=t||!1,null!==this.f&&(0,this.f)(!1),null!==this.c&&Xn(this.c)};var ai=function(t,e,n){var i=et(t.f),i=t.l+i,r=t.b?S(t.b):{};return null!==e&&0e&&(e+=t.size),0>e&&(e=0),0>n&&(n+=t.size),e>n&&(n=e),t.slice(e,n-e)):t.slice(e,n):null},ui=function(t){this.c=Fe(t)};ui.prototype.a=function(){return this.c},ui.prototype.b=function(){};var ci=function(){this.a={},this.b=Number.MIN_SAFE_INTEGER},hi=function(t,e){function n(){delete r.a[i]}var i=t.b;t.b++,t.a[i]=e;var r=t;e.a().then(n,n)};ci.prototype.clear=function(){A(this.a,function(t,e){e&&e.b(!0)}),this.a={}};var fi=function(t,e,n,i){this.a=t,this.f=null,null!==this.a&&(t=this.a.options,C(t)?this.f=t.storageBucket||null:this.f=null),this.l=e,this.j=n,this.i=i,this.c=12e4,this.b=6e4,this.h=new ci,this.g=!1},di=function(t){return null!==t.a&&C(t.a.INTERNAL)&&C(t.a.INTERNAL.getToken)?t.a.INTERNAL.getToken().then(function(t){return C(t)?t.accessToken:null},function(){return null}):Me(null)};fi.prototype.bucket=function(){if(this.g)throw T();return this.f};var pi=function(t,e,n){return t.g?new ui(T()):(e=t.j(e,n,null===t.a),hi(t.h,e),e)},gi=function(t,e){return e},vi=function(t,e,n,i){this.c=t,this.b=e||t,this.f=!!n,this.a=i||gi},mi=null,bi=function(){if(mi)return mi;var t=[];t.push(new vi("bucket")),t.push(new vi("generation")),t.push(new vi("metageneration")),t.push(new vi("name","fullPath",!0));var e=new vi("name");return e.a=function(t,e){return!M(e)||2>e.length?e:Pt(e)},t.push(e),e=new vi("size"),e.a=function(t,e){return C(e)?+e:e},t.push(e),t.push(new vi("timeCreated")),t.push(new vi("updated")),t.push(new vi("md5Hash",null,!0)),t.push(new vi("cacheControl",null,!0)),t.push(new vi("contentDisposition",null,!0)),t.push(new vi("contentEncoding",null,!0)),t.push(new vi("contentLanguage",null,!0)),t.push(new vi("contentType",null,!0)),t.push(new vi("metadata","customMetadata",!0)),t.push(new vi("downloadTokens","downloadURLs",!1,function(t,e){if(!(M(e)&&0r;r++){var o=e[r];o.f&&(n[o.c]=t[o.b])}return JSON.stringify(n)},wi=function(t){if(!t||"object"!=typeof t)throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e&&"object"!=typeof n)throw"Expected object for 'customMetadata' mapping."}},xi=function(t,e,n){for(var i=e.length,r=e.length,o=0;o=0))throw"Expected a number 0 or greater."})},_i=function(t,e){return new Ei(function(e){if(!(null===e||C(e)&&e instanceof Object))throw"Expected an Object.";C(t)&&t(e)},e)},Ii=function(){return new Ei(function(t){if(null!==t&&!l(t))throw"Expected a Function."},!0)},Ri=function(t){if(!t)throw q()},Oi=function(t,e){return function(n,i){t:{var r;try{r=JSON.parse(i)}catch(o){n=null;break t}n=u(r)?r:null}if(null===n)n=null;else{i={type:"file"},r=e.length;for(var a=0;r>a;a++){var s=e[a];i[s.b]=s.a(i,n[s.c])}yi(i,t),n=i}return Ri(null!==n),n}},Ci=function(t){return function(e,n){return e=404===Yn(e)?new y("object-not-found","Object '"+t.path+"' does not exist."):401===Yn(e)?w():403===Yn(e)?x(t.path):n,e.serverResponse=n.serverResponse,e}},Mi=function(t){return function(e,n){return e=401===Yn(e)?w():403===Yn(e)?x(t.path):n,e.serverResponse=n.serverResponse,e}},Fi=function(t,e,n){var i=Z(e);return t=new _(b+"/v0"+i,"GET",Oi(t,n),t.c),t.a=Ci(e),t},Pi=function(t,e){var n=Z(e);return t=new _(b+"/v0"+n,"DELETE",function(){},t.c),t.h=[200,204],t.a=Ci(e),t},Ni=function(t,e,n){return n=n?S(n):{},n.fullPath=t.path,n.size=e.size,n.contentType||(n.contentType=e&&e.type||"application/octet-stream"),n},Li=function(t,e,n,i,r){var o,a="/b/"+encodeURIComponent(e.bucket)+"/o",s={"X-Goog-Upload-Protocol":"multipart"};o="";for(var l=0;2>l;l++)o+=Math.random().toString().slice(2);return s["Content-Type"]="multipart/related; boundary="+o,r=Ni(e,i,r),l=qi(r,n),i=si("--"+o+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+l+"\r\n--"+o+"\r\nContent-Type: "+r.contentType+"\r\n\r\n",i,"\r\n--"+o+"--"),t=new _(b+"/v0"+a,"POST",Oi(t,n),t.b),t.f={name:r.fullPath},t.b=s,t.c=i,t.a=Mi(e),t},ji=function(t,e,n,i){this.a=t,this.total=e,this.b=!!n,this.c=i||null},Di=function(t,e){var n;try{n=$n(t,"X-Goog-Upload-Status")}catch(i){Ri(!1)}return t=0<=mt(e||["active"],n),Ri(t),n},Ui=function(t,e,n,i,r){var o="/b/"+encodeURIComponent(e.bucket)+"/o",a=Ni(e,i,r);return r={name:a.fullPath},o=b+"/v0"+o,i={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":i.size,"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},n=qi(a,n),t=new _(o,"POST",function(t){Di(t);var e;try{e=$n(t,"X-Goog-Upload-URL")}catch(n){Ri(!1)}return Ri(M(e)),e},t.b),t.f=r,t.b=i,t.c=n,t.a=Mi(e),t},Hi=function(t,e,n,i){return t=new _(n,"POST",function(t){var e,n=Di(t,["active","final"]);try{e=$n(t,"X-Goog-Upload-Size-Received")}catch(r){Ri(!1)}return t=e,isFinite(t)&&(t=String(t)),t=s(t)?/^\s*-?0x/i.test(t)?parseInt(t,16):parseInt(t,10):NaN,Ri(!isNaN(t)),new ji(t,i.size,"final"===n)},t.b),t.b={"X-Goog-Upload-Command":"query"},t.a=Mi(e),t},Wi=function(t,e,n,i,r,o){var a=new ji(0,0);if(o?(a.a=o.a,a.total=o.total):(a.a=0,a.total=i.size),i.size!==a.total)throw new y("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var s=o=a.total-a.a,s=Math.min(s,262144),l=a.a;if(o={"X-Goog-Upload-Command":s===o?"upload, finalize":"upload","X-Goog-Upload-Offset":a.a},l=li(i,l,l+s),null===l)throw new y("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.");return n=new _(n,"POST",function(t,n){var o,l=Di(t,["active","final"]),u=a.a+s,c=i.size;return o="final"===l?Oi(e,r)(t,n):null,new ji(u,c,"final"===l,o)},e.b),n.b=o,n.c=l,n.g=null,n.a=Mi(t),n},Bi=function(t,e,n,i,r,o){this.K=t,this.c=e,this.i=n,this.f=r,this.h=o||null,this.l=i,this.j=0,this.B=this.s=!1,this.v=[],this.R=262144n&&er(t)},Zi=function(t,e){if(t.b!==e)switch(e){case"canceling":t.b=e,null!==t.a&&t.a.b();break;case"pausing":t.b=e,null!==t.a&&t.a.b();break;case"running":var n="paused"===t.b;t.b=e,n&&(er(t),Xi(t));break;case"paused":t.b=e,er(t);break;case"canceled":t.g=E(),t.b=e,er(t);break;case"error":t.b=e,er(t);break;case"success":t.b=e,er(t)}},$i=function(t){switch(t.b){case"pausing":Zi(t,"paused");break;case"canceling":Zi(t,"canceled");break;case"running":Xi(t)}};Bi.prototype.C=function(){return new nt(this.j,this.f.size,O(this.b),this.h,this,this.K)},Bi.prototype.I=function(t,e,n,r){function o(t){try{return void s(t)}catch(e){}try{if(l(t),!(i(t.next)||i(t.error)||i(t.complete)))throw""}catch(e){throw"Expected a function or an Object with one of `next`, `error`, `complete` properties."}}function a(t){return function(e,n,i){null!==t&&xi("on",t,arguments);var r=new tt(e,n,i);return tr(u,r),function(){kt(u.v,r)}}}var s=Ii().a,l=_i(null,!0).a;xi("on",[Ti(function(){if("state_changed"!==t)throw"Expected one of the event types: [state_changed]."}),_i(o,!0),Ii(),Ii()],arguments);var u=this,c=[_i(function(t){if(null===t)throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";o(t)}),Ii(),Ii()];return i(e)||i(n)||i(r)?a(null)(e,n,r):a(c)};var tr=function(t,e){t.v.push(e),nr(t,e)},er=function(t){var e=Tt(t.v);bt(e,function(e){nr(t,e)})},nr=function(t,e){switch(O(t.b)){case"running":case"paused":null!==e.next&&Qe(e.next.bind(e,t.C()))();break;case"success":null!==e.a&&Qe(e.a.bind(e))();break;case"canceled":case"error":null!==e.error&&Qe(e.error.bind(e,t.g))();break;default:null!==e.error&&Qe(e.error.bind(e,t.g))()}};Bi.prototype.M=function(){xi("resume",[],arguments);var t="paused"===this.b||"pausing"===this.b;return t&&Zi(this,"running"),t},Bi.prototype.L=function(){xi("pause",[],arguments);var t="running"===this.b;return t&&Zi(this,"pausing"),t},Bi.prototype.H=function(){xi("cancel",[],arguments);var t="running"===this.b||"pausing"===this.b;return t&&Zi(this,"canceling"),t};var ir=function(t,e){if(this.b=t,e)this.a=e instanceof Y?e:$(e);else{if(t=t.bucket(),null===t)throw new y("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");this.a=new Y(t,"")}};ir.prototype.toString=function(){return xi("toString",[],arguments),"gs://"+this.a.bucket+"/"+this.a.path};var rr=function(t,e){return new ir(t,e)};t=ir.prototype,t.ga=function(t){xi("child",[Ti()],arguments);var e=Ft(this.a.path,t);return rr(this.b,new Y(this.a.bucket,e))},t.Fa=function(){var t;if(t=this.a.path,0==t.length)t=null;else{var e=t.lastIndexOf("/");t=-1===e?"":t.slice(0,e)}return null===t?null:rr(this.b,new Y(this.a.bucket,t))},t.Ha=function(){return rr(this.b,new Y(this.a.bucket,""))},t.pa=function(){return this.a.bucket},t.Aa=function(){return this.a.path},t.Ea=function(){return Pt(this.a.path)},t.Ja=function(){return this.b.i},t.ua=function(t,e){return xi("put",[Ai(),new Ei(wi,!0)],arguments),or(this,"put"),new Bi(this,this.b,this.a,bi(),t,e)},t["delete"]=function(){xi("delete",[],arguments),or(this,"delete");var t=this;return di(this.b).then(function(e){var n=Pi(t.b,t.a);return pi(t.b,n,e).a()})},t.ha=function(){xi("getMetadata",[],arguments),or(this,"getMetadata");var t=this;return di(this.b).then(function(e){var n=Fi(t.b,t.a,bi());return pi(t.b,n,e).a()})},t.va=function(t){xi("updateMetadata",[new Ei(wi,void 0)],arguments),or(this,"updateMetadata");var e=this;return di(this.b).then(function(n){var i=e.b,r=e.a,o=t,a=bi(),s=Z(r),s=b+"/v0"+s,o=qi(o,a),i=new _(s,"PATCH",Oi(i,a),i.c);return i.b={"Content-Type":"application/json; charset=utf-8"},i.c=o,i.a=Ci(r),pi(e.b,i,n).a()})},t.ta=function(){return xi("getDownloadURL",[],arguments),or(this,"getDownloadURL"),this.ha().then(function(t){if(t=t.downloadURLs[0],C(t))return t;throw new y("no-download-url","The given file does not have any download URLs.")})};var or=function(t,e){if(""===t.a.path)throw new y("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').")},ar=function(t){this.a=new fi(t,function(t,e){return new ir(t,e)},ai,this),this.b=t,this.c=new sr(this)};t=ar.prototype,t.wa=function(t){xi("ref",[Ti(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments);var e=new ir(this.a);return i(t)?e.ga(t):e},t.xa=function(t){return xi("refFromURL",[Ti(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{$(t)}catch(e){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new ir(this.a,t)},t.Ca=function(){return this.a.b},t.za=function(t){xi("setMaxUploadRetryTime",[Si()],arguments),this.a.b=t},t.Ba=function(){return this.a.c},t.ya=function(t){xi("setMaxOperationRetryTime",[Si()],arguments),this.a.c=t},t.oa=function(){return this.b},t.la=function(){return this.c};var sr=function(t){this.a=t};sr.prototype["delete"]=function(){var t=this.a.a;t.g=!0,t.a=null,t.h.clear()};var lr=function(t,e,n){Object.defineProperty(t,e,{get:n})};ir.prototype.toString=ir.prototype.toString,ir.prototype.child=ir.prototype.ga,ir.prototype.put=ir.prototype.ua,ir.prototype["delete"]=ir.prototype["delete"],ir.prototype.getMetadata=ir.prototype.ha,ir.prototype.updateMetadata=ir.prototype.va,ir.prototype.getDownloadURL=ir.prototype.ta,lr(ir.prototype,"parent",ir.prototype.Fa),lr(ir.prototype,"root",ir.prototype.Ha),lr(ir.prototype,"bucket",ir.prototype.pa),lr(ir.prototype,"fullPath",ir.prototype.Aa),lr(ir.prototype,"name",ir.prototype.Ea),lr(ir.prototype,"storage",ir.prototype.Ja),ar.prototype.ref=ar.prototype.wa,ar.prototype.refFromURL=ar.prototype.xa,lr(ar.prototype,"maxOperationRetryTime",ar.prototype.Ba),ar.prototype.setMaxOperationRetryTime=ar.prototype.ya,lr(ar.prototype,"maxUploadRetryTime",ar.prototype.Ca),ar.prototype.setMaxUploadRetryTime=ar.prototype.za,lr(ar.prototype,"app",ar.prototype.oa), -lr(ar.prototype,"INTERNAL",ar.prototype.la),sr.prototype["delete"]=sr.prototype["delete"],ar.prototype.capi_=function(t){b=t},Bi.prototype.on=Bi.prototype.I,Bi.prototype.resume=Bi.prototype.M,Bi.prototype.pause=Bi.prototype.L,Bi.prototype.cancel=Bi.prototype.H,lr(Bi.prototype,"snapshot",Bi.prototype.C),lr(nt.prototype,"bytesTransferred",nt.prototype.qa),lr(nt.prototype,"totalBytes",nt.prototype.La),lr(nt.prototype,"state",nt.prototype.Ia),lr(nt.prototype,"metadata",nt.prototype.Da),lr(nt.prototype,"downloadURL",nt.prototype.sa),lr(nt.prototype,"task",nt.prototype.Ka),lr(nt.prototype,"ref",nt.prototype.Ga),I.STATE_CHANGED="state_changed",R.RUNNING="running",R.PAUSED="paused",R.SUCCESS="success",R.CANCELED="canceled",R.ERROR="error",Ie.prototype["catch"]=Ie.prototype.l,Ie.prototype.then=Ie.prototype.then,function(){function t(t){return new ar(t)}var e={TaskState:R,TaskEvent:I,Storage:ar,Reference:ir};if(!(window.firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("storage",t,e)}()}()}).call(exports,function(){return this}())},function(t,e){function n(t,e,n){for(var i=[],r=Math.ceil(e/t.columns),o=0;r>o;o++)for(var a=0;ar;r++){var o=r*(2*Math.PI)/e;i.push([n.x+t.radius*Math.cos(o),n.y,n.z+t.radius*Math.sin(o)])}return i}function r(t,e,i){return t.columns=e,n(t,e,i)}function o(t,e,n){return l([[1,0,0],[0,1,0],[0,0,1],[-1,0,0],[0,-1,0],[0,0,-1]],n,t.radius/2)}function a(t,e,n){var i=(1+Math.sqrt(5))/2,r=1/i,o=2-i,a=-1*r,s=-1*o;return l([[-1,o,0],[-1,s,0],[0,-1,o],[0,-1,s],[0,1,o],[0,1,s],[1,o,0],[1,s,0],[r,r,r],[r,r,a],[r,a,r],[r,a,a],[o,0,1],[o,0,-1],[a,r,r],[a,r,a],[a,a,r],[a,a,a],[s,0,1],[s,0,-1]],n,t.radius/2)}function s(t,e,n){var i=Math.sqrt(3),r=-1/Math.sqrt(3),o=2*Math.sqrt(2/3);return l([[0,0,i+r],[-1,0,r],[1,0,r],[0,o,0]],n,t.radius/2)}function l(t,e,n){return e=[e.x,e.y,e.z],t.map(function(t){return t.map(function(t,i){return t*n+e[i]})})}function u(t,e){t.forEach(function(t,n){var i=e[n];t.setAttribute("position",{x:i[0],y:i[1],z:i[2]})})}AFRAME.registerComponent("layout",{schema:{columns:{"default":1,min:0,"if":{type:["box"]}},margin:{"default":1,min:0,"if":{type:["box","line"]}},radius:{"default":1,min:0,"if":{type:["circle","cube","dodecahedron","pyramid"]}},type:{"default":"line",oneOf:["box","circle","cube","dodecahedron","line","pyramid"]}},init:function(){var t=this,e=this.el,n=n=[];this.children=e.getChildEntities(),this.children.forEach(function(t){n.push(t.getComputedAttribute("position"))}),e.addEventListener("child-attached",function(e){t.children.push(e.detail.el),t.update()})},update:function(t){var e,l,c=this.children,h=this.data,f=this.el,d=c.length,p=f.getComputedAttribute("position");switch(h.type){case"box":e=n;break;case"circle":e=i;break;case"cube":e=o;break;case"dodecahedron":e=a;break;case"pyramid":e=s;break;default:e=r}l=e(h,d,p),u(c,l)},remove:function(){el.removeEventListener("child-attached",this.childAttachedCallback),u(children,this.initialPositions)}}),t.exports.getBoxPositions=n,t.exports.getCirclePositions=i,t.exports.getLinePositions=r,t.exports.getCubePositions=o,t.exports.getDodecahedronPositions=a,t.exports.getPyramidPositions=s},function(t,e){var n=AFRAME.utils.debug,i=AFRAME.utils.coordinates,r=n("components:look-at:warn"),o=i.isCoordinate;AFRAME.registerComponent("look-at",{schema:{"default":"",parse:function(t){return o(t)||"object"==typeof t?i.parse(t):t},stringify:function(t){return"object"==typeof t?i.stringify(t):t}},init:function(){this.target3D=null,this.vector=new THREE.Vector3},update:function(){var t,e=this,n=e.data,i=e.el.object3D;return!n||"object"==typeof n&&!Object.keys(n).length?e.remove():"object"==typeof n?i.lookAt(new THREE.Vector3(n.x,n.y,n.z)):(t=e.el.sceneEl.querySelector(n),t?t.hasLoaded?e.beginTracking(t):t.addEventListener("loaded",function(){e.beginTracking(t)}):void r('"'+n+'" does not point to a valid entity to look-at'))},tick:function(t){var e=this.target3D;return e?this.el.object3D.lookAt(this.vector.setFromMatrixPosition(e.matrixWorld)):void 0},beginTracking:function(t){this.target3D=t.object3D}})},function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("random-color",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:1,y:1,z:1},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("material","color","#"+new THREE.Color(Math.random()*e.x+n.x,Math.random()*e.y+n.y,Math.random()*e.z+n.z).getHexString())}}),AFRAME.registerComponent("random-position",{schema:{min:{"default":{x:-10,y:-10,z:-10},type:"vec3"},max:{"default":{x:10,y:10,z:10},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("position",{x:Math.random()*(e.x-n.x)+n.x,y:Math.random()*(e.y-n.y)+n.y,z:Math.random()*(e.z-n.z)+n.z})}}),AFRAME.registerComponent("random-spherical-position",{schema:{radius:{"default":10},startX:{"default":0},lengthX:{"default":360},startY:{"default":0},lengthY:{"default":360},startZ:{"default":0},lengthZ:{"default":360}},update:function(){var t=this.data,e=THREE.Math.degToRad(Math.random()*t.lengthX+t.startX),n=THREE.Math.degToRad(Math.random()*t.lengthY+t.startY);THREE.Math.degToRad(Math.random()*t.lengthZ+t.startZ);this.el.setAttribute("position",{x:t.radius*Math.cos(e)*Math.sin(n),y:t.radius*Math.sin(e)*Math.sin(n),z:t.radius*Math.cos(n)})}}),AFRAME.registerComponent("random-rotation",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:360,y:360,z:360},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("rotation",{x:Math.random()*e.x+n.x,y:Math.random()*e.y+n.y,z:Math.random()*e.z+n.z})}}),AFRAME.registerComponent("random-scale",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:2,y:2,z:2},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("scale",{x:Math.random()*e.x+n.x,y:Math.random()*e.y+n.y,z:Math.random()*e.z+n.z})}})},function(t,e){function n(t,e,n){return new Promise(function(i){c(e).then(function(){d[t]={template:a(e)(n.trim()),type:e},i(d[t])})})}function i(t,e,n){switch(e){case v:return t(n);case m:return t(n);case b:return Mustache.render(t,n);case y:return t.render(n);default:return t}}function r(t,e){var i=document.querySelector(t),r=i.getAttribute("type"),o=i.innerHTML;if(!e){if(!r)throw new Error("Must provide `type` attribute for '),t=""+t+"";try{this.Ga.ib.open(),this.Ga.ib.write(t),this.Ga.ib.close()}catch(o){E("frame writing exception"),o.stack&&E(o.stack),E(o)}}function Se(t){if(t.Ud&&t.Kd&&t.ve.count()<(0=t.Qc[0].Re.length+30+n.length;){var r=t.Qc.shift(),n=n+"&seg"+i+"="+r.tg+"&ts"+i+"="+r.zg+"&d"+i+"="+r.Re;i++}return Te(t,e+n,t.$d),!0}return!1}function Te(t,e,n){function i(){t.ve.remove(n),Se(t)}t.ve.add(n,1);var r=setTimeout(i,Math.floor(25e3));Re(t,e,function(){clearTimeout(r),i()})}function Re(t,e,n){setTimeout(function(){try{if(t.Kd){var i=t.Ga.ib.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){E("Long-poll script failed to load: "+e),t.Kd=!1,t.close()},t.Ga.ib.body.appendChild(i)}}catch(r){}},Math.floor(1))}function Ue(t){Ve(this,t)}function Ve(t,e){var n=rd&&rd.isAvailable(),i=n&&!(Xb.bf||!0===Xb.get("previous_websocket_failure"));if(e.Ag&&(n||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),i=!0),i)t.Wc=[rd];else{var r=t.Wc=[];ld(We,function(t,e){e&&e.isAvailable()&&r.push(e)})}}function Xe(t){if(00&&(t.md=setTimeout(function(){t.md=null,t.Cb||(t.I&&102400=t.wf?(t.f("Secondary connection is healthy."),t.Cb=!0,t.D.sd(),t.D.start(),t.f("sending client ack on secondary"),t.D.send({t:"c",d:{t:"a",d:{}}}),t.f("Ending transmission on primary"),t.I.send({t:"c",d:{t:"n",d:{}}}),t.Xc=t.D,df(t)):(t.f("sending ping on secondary."),t.D.send({t:"c",d:{t:"p",d:{}}}))}function ff(t){t.Cb||(t.xe--,0>=t.xe&&(t.f("Primary connection is healthy."),t.Cb=!0,t.I.sd()))}function cf(t,e){t.D=new e("c:"+t.id+":"+t.Ne++,t.M,t.xf),t.wf=e.responsesRequiredToBeHealthy||0,t.D.open($e(t,t.D),af(t,t.D)),setTimeout(function(){t.D&&(t.f("Timed out trying to upgrade."),t.D.close())},Math.floor(6e4))}function bf(t,e,n){t.f("Realtime connection established."),t.I=e,t.L=1,t.Mc&&(t.Mc(n,t.xf),t.Mc=null),0===t.xe?(t.f("Primary connection is healthy."),t.Cb=!0):setTimeout(function(){gf(t)},Math.floor(5e3))}function gf(t){t.Cb||1!==t.L||(t.f("sending ping on primary."),jf(t,{t:"c",d:{t:"p",d:{}}}))}function jf(t,e){if(1!==t.L)throw"Connection is not connected";t.Xc.send(e)}function ef(t){t.f("Shutting down all connections"),t.I&&(t.I.close(),t.I=null),t.D&&(t.D.close(),t.D=null),t.md&&(clearTimeout(t.md),t.md=null)}function L(t,e){if(1==arguments.length){this.o=t.split("/");for(var n=0,i=0;i=t.o.length?null:t.o[t.Z]}function Wd(t){return t.o.length-t.Z}function D(t){var e=t.Z;return e10485760/3&&10485760n?i=i.left:n>0&&(r=i,i=i.right)}throw Error("Attempted to find predecessor key for a nonexistent key. What gives?")}function Uf(t,e,n,i,r){for(this.Hd=r||null,this.le=i,this.Sa=[],r=1;!t.e();)if(r=e?n(t.key,e):1,i&&(r*=-1),0>r)t=this.le?t.left:t.right;else{if(0===r){this.Sa.push(t);break}this.Sa.push(t),t=this.le?t.right:t.left}}function R(t){if(0===t.Sa.length)return null;var e,n=t.Sa.pop();if(e=t.Hd?t.Hd(n.key,n.value):{key:n.key,value:n.value},t.le)for(n=n.left;!n.e();)t.Sa.push(n),n=n.right;else for(n=n.right;!n.e();)t.Sa.push(n),n=n.left;return e}function Vf(t){if(0===t.Sa.length)return null;var e;return e=t.Sa,e=e[e.length-1],t.Hd?t.Hd(e.key,e.value):{key:e.key,value:e.value}}function Wf(t,e,n,i,r){this.key=t,this.value=e,this.color=null!=n?n:!0,this.left=null!=i?i:Sf,this.right=null!=r?r:Sf}function Xf(t){return t.left.e()?t:Xf(t.left)}function Zf(t){return t.left.e()?Sf:(t.left.fa()||t.left.left.fa()||(t=$f(t)),t=t.Y(null,null,null,Zf(t.left),null),Yf(t))}function Yf(t){return t.right.fa()&&!t.left.fa()&&(t=cg(t)),t.left.fa()&&t.left.left.fa()&&(t=ag(t)),t.left.fa()&&t.right.fa()&&(t=bg(t)),t}function $f(t){return t=bg(t),t.right.left.fa()&&(t=t.Y(null,null,null,null,ag(t.right)),t=cg(t),t=bg(t)),t}function cg(t){return t.right.Y(null,null,t.color,t.Y(null,null,!0,null,t.right.left),null)}function ag(t){return t.left.Y(null,null,t.color,null,t.Y(null,null,!0,t.left.right,null))}function bg(t){return t.Y(null,null,!t.color,t.left.Y(null,null,!t.left.color,null,null),t.right.Y(null,null,!t.right.color,null,null))}function dg(){}function P(t,e,n){this.k=t,(this.aa=e)&&ne(this.aa),t.e()&&H(!this.aa||this.aa.e(),"An empty node cannot have a priority"),this.zb=n,this.Eb=null}function le(t,e){var n;return n=(n=fg(t,e))?(n=n.Hc())&&n.name:t.k.Hc(),n?new K(n,t.k.get(n)):null}function me(t,e){var n;return n=(n=fg(t,e))?(n=n.fc())&&n.name:t.k.fc(),n?new K(n,t.k.get(n)):null; +}function fg(t,e){return e===ae?null:t.zb.get(e.toString())}function M(e,n){if(null===e)return F;var i=null;if("object"==typeof e&&".priority"in e?i=e[".priority"]:"undefined"!=typeof n&&(i=n),H(null===i||"string"==typeof i||"number"==typeof i||"object"==typeof i&&".sv"in i,"Invalid priority type found: "+typeof i),"object"==typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!=typeof e||".sv"in e)return new Uc(e,M(i));if(e instanceof Array){var r=F,o=e;return t(o,function(t,e){if(Bb(o,e)&&"."!==e.substring(0,1)){var n=M(t);!n.J()&&n.e()||(r=r.U(e,n))}}),r.ga(M(i))}var a=[],s=!1,l=e;if(Cb(l,function(t){if("string"!=typeof t||"."!==t.substring(0,1)){var e=M(l[t]);e.e()||(s=s||!e.C().e(),a.push(new K(t,e)))}}),0==a.length)return F;var u=He(a,Kc,function(t){return t.name},Mc);if(s){var c=He(a,ke(N));return new P(u,M(i),new Fe({".priority":c},{".priority":N}))}return new P(u,M(i),Je)}function hg(t){this.count=parseInt(Math.log(t+1)/gg,10),this.Qe=this.count-1,this.Kf=t+1&parseInt(Array(this.count+1).join("1"),2)}function ig(t){var e=!(t.Kf&1<o.Cc,"Stacking an older write on top of newer ones"),p(a)||(a=!0),o.la.push({path:e,Ja:n,Zc:i,visible:a}),a&&(o.T=Og(o.T,e,n)),o.Cc=i,r?Bh(t,new Zb(Jg,e,n)):[]}function Ch(t,e,n,i){var r=t.lb;return H(i>r.Cc,"Stacking an older merge on top of newer ones"),r.la.push({path:e,children:n,Zc:i,visible:!0}),r.T=Pg(r.T,e,n),r.Cc=i,n=xg(n),Bh(t,new Cd(Jg,e,n))}function Dh(t,e,n){n=n||!1;var i=Zg(t.lb,e);if(t.lb.Ed(e)){var r=Q;return null!=i.Ja?r=r.set(C,!0):Cb(i.children,function(t,e){r=r.set(new L(t),e)}),Bh(t,new Ig(i.path,r,n))}return[]}function Eh(t,e,n){return n=xg(n),Bh(t,new Cd(Lg,e,n))}function Fh(t,e,n,i){if(i=Gh(t,i),null!=i){var r=Hh(i);return i=r.path,r=r.Ib,e=T(i,e),n=new Zb(new Kg(!1,!0,r,!0),e,n),Ih(t,i,n)}return[]}function Jh(t,e,n,i){if(i=Gh(t,i)){var r=Hh(i);return i=r.path,r=r.Ib,e=T(i,e),n=xg(n),n=new Cd(new Kg(!1,!0,r,!0),e,n),Ih(t,i,n)}return[]}function Nh(e){return Ag(e,function(e,n,i){if(n&&null!=Vg(n))return[Vg(n)];var r=[];return n&&(r=Wg(n)),t(i,function(t){r=r.concat(t)}),r})}function Rh(t,e){for(var n=0;ni;){if(0==o)for(;n>=i;)na(this,t,i),i+=this.Ya;if(q(t)){for(;e>i;)if(r[o]=t.charCodeAt(i),++o,++i,o==this.Ya){na(this,r),o=0;break}}else for(;e>i;)if(r[o]=t[i],++o,++i,o==this.Ya){na(this,r),o=0;break}}this.ac=o,this.Pd+=e}};var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,v;t:{var Fa=n.navigator;if(Fa){var Ga=Fa.userAgent;if(Ga){v=Ga;break t}}v=""}ka(Ha,Error),Ha.prototype.name="CustomError";var w=Array.prototype,Ia=w.indexOf?function(t,e,n){return w.indexOf.call(t,e,n)}:function(t,e,n){if(n=null==n?0:0>n?Math.max(0,t.length+n):n,q(t))return q(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in r&&e.call(n,r[o],o,t)},Ka=w.filter?function(t,e,n){return w.filter.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=[],o=0,a=q(t)?t.split(""):t,s=0;i>s;s++)if(s in a){var l=a[s];e.call(n,l,s,t)&&(r[o++]=l)}return r},La=w.map?function(t,e,n){return w.map.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=Array(i),o=q(t)?t.split(""):t,a=0;i>a;a++)a in o&&(r[a]=e.call(n,o[a],a,t));return r},Ma=w.reduce?function(t,e,n,i){for(var o=[],a=1,s=arguments.length;s>a;a++)o.push(arguments[a]);return i&&(o[0]=r(e,i)),w.reduce.apply(t,o)}:function(t,e,n,i){var r=n;return Ja(t,function(n,o){r=e.call(i,r,n,o,t)}),r},Na=w.every?function(t,e,n){return w.every.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=q(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&!e.call(n,r[o],o,t))return!1;return!0},Ua=-1!=v.indexOf("Opera")||-1!=v.indexOf("OPR"),Va=-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE"),Wa=-1!=v.indexOf("Gecko")&&-1==v.toLowerCase().indexOf("webkit")&&!(-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE")),Xa=-1!=v.toLowerCase().indexOf("webkit");!function(){var t,e="";return Ua&&n.opera?(e=n.opera.version,ga(e)?e():e):(Wa?t=/rv\:([^\);]+)(\)|;)/:Va?t=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Xa&&(t=/WebKit\/(\S+)/),t&&(e=(e=t.exec(v))?e[1]:""),Va&&(t=(t=n.document)?t.documentMode:void 0,t>parseFloat(e))?String(t):e)}();var Ya=null,Za=null,$a=null,db,gb,ib=!1,jb=[];[].push(function(){ib=!1,jb=[]});var nb=0,qb=2,sb=3;mb.prototype.then=function(t,e,n){return tb(this,ga(t)?t:null,ga(e)?e:null,n)},mb.prototype.then=mb.prototype.then,mb.prototype.$goog_Thenable=!0,g=mb.prototype,g.yg=function(t,e){return tb(this,null,t,e)},g.cancel=function(t){this.L==nb&&fb(function(){var e=new rb(t);ub(this,e)},this)},g.Bf=function(t){this.L=nb,pb(this,qb,t)},g.Cf=function(t){this.L=nb,pb(this,sb,t)},g.Tf=function(){for(;this.Ca&&this.Ca.length;){var t=this.Ca;this.Ca=null;for(var e=0;e"),t},ic.prototype.qf=function(){var t,e=this.Vc.get(),n={},i=!1;for(t in e)0=t.length){var e=Number(t);if(!isNaN(e)){r.Fe=e,r.frames=[],t=null;break t}}r.Fe=1,r.frames=[]}null!==t&&vd(r,t)}},this.La.onerror=function(t){r.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&r.f(t),r.fb()}},rd.prototype.start=function(){},rd.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1parseFloat(e[1])&&(t=!0)}return!t&&null!==qd&&!td},rd.responsesRequiredToBeHealthy=2,rd.healthyTimeout=3e4,g=rd.prototype,g.sd=function(){Xb.remove("previous_websocket_failure")},g.send=function(t){ud(this),t=B(t),this.rb+=t.length,lc(this.Xa,"bytes_sent",t.length),t=kd(t,16384),1=this.g.compare(this.Uc,t)&&0>=this.g.compare(t,this.wc)},g.F=function(t,e,n,i,r,o){return this.matches(new K(e,n))||(n=F),this.he.F(t,e,n,i,r,o)},g.za=function(t,e,n){e.J()&&(e=F);var i=e.ob(this.g),i=i.ga(F),r=this;return e.P(N,function(t,e){r.matches(new K(t,e))||(i=i.U(t,F))}),this.he.za(t,i,n)},g.ga=function(t){return t},g.Qa=function(){return!0},g.Vb=function(){return this.he},g=he.prototype,g.F=function(t,e,n,i,r,o){return this.sa.matches(new K(e,n))||(n=F),t.R(e).ca(n)?t:t.Fb()=this.g.compare(this.sa.Uc,a):0>=this.g.compare(a,this.sa.wc)))break;i=i.U(a.name,a.S),r++}}else{i=e.ob(this.g),i=i.ga(F);var s,l,u;if(this.Jb){e=i.Ze(this.g),s=this.sa.wc,l=this.sa.Uc;var c=ke(this.g);u=function(t,e){return c(e,t)}}else e=i.Xb(this.g),s=this.sa.Uc,l=this.sa.wc,u=ke(this.g);for(var r=0,h=!1;0=u(s,a)&&(h=!0),(o=h&&r=u(a,l))?r++:i=i.U(a.name,F)}return this.sa.Vb().za(t,i,n)},g.ga=function(t){return t},g.Qa=function(){return!0},g.Vb=function(){return this.sa.Vb()};var oe=["object","boolean","number","string"];g=Uc.prototype,g.J=function(){return!0},g.C=function(){return this.aa},g.ga=function(t){return new Uc(this.B,t)},g.R=function(t){return".priority"===t?this.aa:F},g.Q=function(t){return t.e()?this:".priority"===J(t)?this.aa:F},g.Fa=function(){return!1},g.Ye=function(){return null},g.U=function(t,e){return".priority"===t?this.ga(e):e.e()&&".priority"!==t?this:F.U(t,e).ga(this.aa)},g.F=function(t,e){var n=J(t);return null===n?e:e.e()&&".priority"!==n?this:(H(".priority"!==n||1===Wd(t),".priority must be the last token in a path"),this.U(n,F.F(D(t),e)))},g.e=function(){return!1},g.Fb=function(){return 0},g.P=function(){return!1},g.H=function(t){return t&&!this.C().e()?{".value":this.Ea(),".priority":this.C().H()}:this.Ea()},g.hash=function(){if(null===this.Eb){var t="";this.aa.e()||(t+="priority:"+pe(this.aa.H())+":");var e=typeof this.B,t=t+(e+":"),t="number"===e?t+md(this.B):t+this.B;this.Eb=Yc(t)}return this.Eb},g.Ea=function(){return this.B},g.tc=function(t){if(t===F)return 1;if(t instanceof P)return-1;H(t.J(),"Unknown node type");var e=typeof t.B,n=typeof this.B,i=Ia(oe,e),r=Ia(oe,n);return H(i>=0,"Unknown leaf type: "+e),H(r>=0,"Unknown leaf type: "+n),i===r?"object"===n?0:this.B=this.o.length)return null;for(var t=[],e=this.Z;e=this.o.length},g.ca=function(t){if(Wd(this)!==Wd(t))return!1;for(var e=this.Z,n=t.Z;e<=this.o.length;e++,n++)if(this.o[e]!==t.o[n])return!1;return!0},g.contains=function(t){var e=this.Z,n=t.Z;if(Wd(this)>Wd(t))return!1;for(;e0){for(var r=Array(i),o=0;i>o;o++)r[o]=n[o];n=r}else n=[];for(i=0;i=0;o--)r[o]="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(n%64),n=Math.floor(n/64);if(H(0===n,"Cannot push at time == 0"),n=r.join(""),i){for(o=11;o>=0&&63===e[o];o--)e[o]=0;e[o]++}else for(o=0;12>o;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return H(20===n.length,"nextPushId: Length should be 20."),n}}();g=Rf.prototype,g.Ra=function(t,e){return new Rf(this.Oa,this.ba.Ra(t,e,this.Oa).Y(null,null,!1,null,null))},g.remove=function(t){return new Rf(this.Oa,this.ba.remove(t,this.Oa).Y(null,null,!1,null,null))},g.get=function(t){for(var e,n=this.ba;!n.e();){if(e=this.Oa(t,n.key),0===e)return n.value;0>e?n=n.left:e>0&&(n=n.right)}return null},g.e=function(){return this.ba.e()},g.count=function(){return this.ba.count()},g.Hc=function(){return this.ba.Hc()},g.fc=function(){return this.ba.fc()},g.ia=function(t){return this.ba.ia(t)},g.Xb=function(t){return new Uf(this.ba,null,this.Oa,!1,t)},g.Yb=function(t,e){return new Uf(this.ba,t,this.Oa,!1,e)},g.$b=function(t,e){return new Uf(this.ba,t,this.Oa,!0,e)},g.Ze=function(t){return new Uf(this.ba,null,this.Oa,!0,t)},g=Wf.prototype,g.Y=function(t,e,n,i,r){return new Wf(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=i?i:this.left,null!=r?r:this.right)},g.count=function(){return this.left.count()+1+this.right.count()},g.e=function(){return!1},g.ia=function(t){return this.left.ia(t)||t(this.key,this.value)||this.right.ia(t)},g.Hc=function(){return Xf(this).key},g.fc=function(){return this.right.e()?this.key:this.right.fc()},g.Ra=function(t,e,n){var i,r;return r=this,i=n(t,r.key),r=0>i?r.Y(null,null,null,r.left.Ra(t,e,n),null):0===i?r.Y(null,e,null,null,null):r.Y(null,null,null,null,r.right.Ra(t,e,n)),Yf(r)},g.remove=function(t,e){var n,i;if(n=this,0>e(t,n.key))n.left.e()||n.left.fa()||n.left.left.fa()||(n=$f(n)),n=n.Y(null,null,null,n.left.remove(t,e),null);else{if(n.left.fa()&&(n=ag(n)),n.right.e()||n.right.fa()||n.right.left.fa()||(n=bg(n),n.left.left.fa()&&(n=ag(n),n=bg(n))),0===e(t,n.key)){if(n.right.e())return Sf;i=Xf(n.right),n=n.Y(i.key,i.value,null,null,Zf(n.right))}n=n.Y(null,null,null,null,n.right.remove(t,e))}return Yf(n)},g.fa=function(){return this.color},g=dg.prototype,g.Y=function(){return this},g.Ra=function(t,e){return new Wf(t,e,null)},g.remove=function(){return this},g.count=function(){return 0},g.e=function(){return!0},g.ia=function(){return!1},g.Hc=function(){return null},g.fc=function(){return null},g.fa=function(){return!1};var Sf=new dg;g=P.prototype,g.J=function(){return!1},g.C=function(){return this.aa||F},g.ga=function(t){return this.k.e()?this:new P(this.k,t,this.zb)},g.R=function(t){return".priority"===t?this.C():(t=this.k.get(t),null===t?F:t)},g.Q=function(t){var e=J(t);return null===e?this:this.R(e).Q(D(t))},g.Fa=function(t){return null!==this.k.get(t)},g.U=function(t,e){if(H(e,"We should always be passing snapshot nodes"),".priority"===t)return this.ga(e);var n,i,r=new K(t,e);return e.e()?(n=this.k.remove(t),r=Ie(this.zb,r,this.k)):(n=this.k.Ra(t,e),r=Ge(this.zb,r,this.k)),i=n.e()?F:this.aa,new P(n,i,r)},g.F=function(t,e){var n=J(t);if(null===n)return e;H(".priority"!==J(t)||1===Wd(t),".priority must be the last token in a path");var i=this.R(n).F(D(t),e);return this.U(n,i)},g.e=function(){return this.k.e()},g.Fb=function(){return this.k.count()};var eg=/^(0|[1-9]\d*)$/;g=P.prototype,g.H=function(t){if(this.e())return null;var e={},n=0,i=0,r=!0;if(this.P(N,function(o,a){e[o]=a.H(t),n++,r&&eg.test(o)?i=Math.max(i,Number(o)):r=!1}),!t&&r&&2*n>i){var o,a=[];for(o in e)a[o]=e[o];return a}return t&&!this.C().e()&&(e[".priority"]=this.C().H()),e},g.hash=function(){if(null===this.Eb){var t="";this.C().e()||(t+="priority:"+pe(this.C().H())+":"),this.P(N,function(e,n){var i=n.hash();""!==i&&(t+=":"+e+":"+i)}),this.Eb=""===t?"":Yc(t)}return this.Eb},g.Ye=function(t,e,n){return(n=fg(this,n))?(t=Tf(n,new K(t,e)))?t.name:null:Tf(this.k,t)},g.P=function(t,e){var n=fg(this,t);return n?n.ia(function(t){return e(t.name,t.S)}):this.k.ia(e)},g.Xb=function(t){return this.Yb(t.Ic(),t)},g.Yb=function(t,e){var n=fg(this,e);if(n)return n.Yb(t,function(t){return t});for(var n=this.k.Yb(t.name,Nc),i=Vf(n);null!=i&&0>e.compare(i,t);)R(n),i=Vf(n);return n},g.Ze=function(t){return this.$b(t.Gc(),t)},g.$b=function(t,e){var n=fg(this,e);if(n)return n.$b(t,function(t){return t});for(var n=this.k.$b(t.name,Nc),i=Vf(n);null!=i&&0=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.ne(t),this.Oc)},g.oe=function(t){if(y("Query.limitToLast",1,1,arguments.length),!fa(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.xa)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.w,this.path,this.n.oe(t),this.Oc)},g.kg=function(t){if(y("Query.orderByChild",1,1,arguments.length),"$key"===t)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Hf("Query.orderByChild",t),sg(this,"Query.orderByChild");var e=new L(t);if(e.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");return e=new te(e),e=De(this.n,e),qg(e),new X(this.w,this.path,e,!0)},g.lg=function(){y("Query.orderByKey",0,0,arguments.length),sg(this,"Query.orderByKey");var t=De(this.n,ae);return qg(t),new X(this.w,this.path,t,!0)},g.mg=function(){y("Query.orderByPriority",0,0,arguments.length),sg(this,"Query.orderByPriority");var t=De(this.n,N);return qg(t),new X(this.w,this.path,t,!0)},g.ng=function(){y("Query.orderByValue",0,0,arguments.length),sg(this,"Query.orderByValue");var t=De(this.n,ze);return qg(t),new X(this.w,this.path,t,!0)},g.Nd=function(t,e){y("Query.startAt",0,2,arguments.length),Af("Query.startAt",t,this.path,!0),Gf("Query.startAt",e);var n=this.n.Nd(t,e);if(rg(n),qg(n),this.n.ka)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return p(t)||(e=t=null),new X(this.w,this.path,n,this.Oc)},g.fd=function(t,e){y("Query.endAt",0,2,arguments.length),Af("Query.endAt",t,this.path,!0),Gf("Query.endAt",e);var n=this.n.fd(t,e);if(rg(n),qg(n),this.n.na)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new X(this.w,this.path,n,this.Oc)},g.Qf=function(t,e){if(y("Query.equalTo",1,2,arguments.length),Af("Query.equalTo",t,this.path,!1),Gf("Query.equalTo",e),this.n.ka)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Nd(t,e).fd(t,e)},g.toString=function(){y("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.Z;nt?-1:1});g=vg.prototype,g.e=function(){return null===this.value&&this.children.e()},g.subtree=function(t){if(t.e())return this;var e=this.children.get(J(t));return null!==e?e.subtree(D(t)):Q},g.set=function(t,e){if(t.e())return new vg(e,this.children);var n=J(t),i=(this.children.get(n)||Q).set(D(t),e),n=this.children.Ra(n,i);return new vg(this.value,n)},g.remove=function(t){if(t.e())return this.children.e()?Q:new vg(null,this.children);var e=J(t),n=this.children.get(e);return n?(t=n.remove(D(t)),e=t.e()?this.children.remove(e):this.children.Ra(e,t),null===this.value&&e.e()?Q:new vg(this.value,e)):this},g.get=function(t){if(t.e())return this.value;var e=this.children.get(J(t));return e?e.get(D(t)):null};var Q=new vg(null);vg.prototype.toString=function(){var t={};return Yd(this,function(e,n){t[e.toString()]=n.toString()}),B(t)},Ig.prototype.Nc=function(t){return this.path.e()?null!=this.Pb.value?(H(this.Pb.children.e(),"affectedTree should not have overlapping affected paths."),this):(t=this.Pb.subtree(new L(t)),new Ig(C,t,this.Id)):(H(J(this.path)===t,"operationForChild called for unrelated child."),new Ig(D(this.path),this.Pb,this.Id))},Ig.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" ack write revert="+this.Id+" affectedTree="+this.Pb+")"};var $b=0,Dd=1,Qd=2,bc=3,Jg=new Kg(!0,!1,null,!1),Lg=new Kg(!1,!0,null,!1);Kg.prototype.toString=function(){return this.ee?"user":this.Ee?"server(queryID="+this.Ib+")":"server"};var Ng=new Mg(new vg(null));Mg.prototype.Ed=function(t){return t.e()?Ng:(t=$d(this.X,t,Q),new Mg(t))},Mg.prototype.e=function(){return this.X.e()},Mg.prototype.apply=function(t){return Tg(C,this.X,t)},g=Ug.prototype,g.e=function(){return xa(this.Aa)},g.gb=function(e,n,i){var r=e.source.Ib;if(null!==r)return r=x(this.Aa,r),H(null!=r,"SyncTree gave us an op for an invalid query."),r.gb(e,n,i);var o=[];return t(this.Aa,function(t){o=o.concat(t.gb(e,n,i))}),o},g.Ob=function(t,e,n,i,r){var o=t.ya(),a=x(this.Aa,o);if(!a){var a=n.Ba(r?i:null),s=!1;a?s=!0:(a=i instanceof P?n.sc(i):F,s=!1),a=new kg(t,new Ud(new Dc(a,s,!1),new Dc(i,r,!1))),this.Aa[o]=a}return a.Ob(e),ng(a,e)},g.mb=function(e,n,i){var r=e.ya(),o=[],a=[],s=null!=Vg(this);if("default"===r){var l=this;t(this.Aa,function(t,e){a=a.concat(t.mb(n,i)),t.e()&&(delete l.Aa[e],S(t.W.n)||o.push(t.W))})}else{var u=x(this.Aa,r);u&&(a=a.concat(u.mb(n,i)),u.e()&&(delete this.Aa[r],S(u.W.n)||o.push(u.W)))}return s&&null==Vg(this)&&o.push(new U(e.w,e.path)),{rg:o,Sf:a}},g.jb=function(e){var n=null;return t(this.Aa,function(t){n=n||t.jb(e)}),n},g=Yg.prototype,g.Ed=function(e){var n=Pa(this.la,function(t){return t.Zc===e});H(n>=0,"removeWrite called with nonexistent writeId.");var i=this.la[n];this.la.splice(n,1);for(var r=i.visible,o=!1,a=this.la.length-1;r&&a>=0;){var s=this.la[a];s.visible&&(a>=n&&$g(s,i.path)?r=!1:i.path.contains(s.path)&&(o=!0)),a--}if(r){if(o)this.T=ah(this.la,bh,C),this.Cc=0r;r++)e+=" ";console.log(e+i)}}},g.Ce=function(t){lc(this.Xa,t),this.xg.yf[t]=!0},g.f=function(t){var e="";this.Ua&&(e=this.Ua.id+":"),E(e,arguments)},uf.prototype.eb=function(){for(var t in this.nb)this.nb[t].eb()},uf.prototype.lc=function(){for(var t in this.nb)this.nb[t].lc()},uf.prototype.ce=function(t){this.Ef=t},ba(uf),uf.prototype.interrupt=uf.prototype.eb,uf.prototype.resume=uf.prototype.lc;var Z={};if(Z.pc=kh,Z.DataConnection=Z.pc,kh.prototype.wg=function(t,e){this.ua("q",{p:t},e)},Z.pc.prototype.simpleListen=Z.pc.prototype.wg,kh.prototype.Pf=function(t,e){this.ua("echo",{d:t},e)},Z.pc.prototype.echo=Z.pc.prototype.Pf,kh.prototype.interrupt=kh.prototype.eb,Z.Hf=Ye,Z.RealTimeConnection=Z.Hf,Ye.prototype.sendRequest=Ye.prototype.ua,Ye.prototype.close=Ye.prototype.close,Z.ag=function(t){var e=kh.prototype.put;return kh.prototype.put=function(n,i,r,o){p(o)&&(o=t()),e.call(this,n,i,r,o)},function(){kh.prototype.put=e}},Z.hijackHash=Z.ag,Z.Gf=fc,Z.ConnectionTarget=Z.Gf,Z.ya=function(t){return t.ya()},Z.queryIdentifier=Z.ya,Z.dg=function(t){return t.w.Ua.$},Z.listens=Z.dg,Z.ce=function(t){uf.Wb().ce(t)},Z.forceRestClient=Z.ce,Z.Context=uf,ka(U,X),g=U.prototype,g.getKey=function(){return y("Firebase.key",0,0,arguments.length),this.path.e()?null:Xd(this.path)},g.m=function(t){if(y("Firebase.child",1,1,arguments.length),fa(t))t=String(t);else if(!(t instanceof L))if(null===J(this.path)){var e=t;e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),Hf("Firebase.child",e)}else Hf("Firebase.child",t);return new U(this.w,this.path.m(t))},g.getParent=function(){y("Firebase.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new U(this.w,t)},g.Yf=function(){y("Firebase.ref",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},g.Of=function(){return this.w.$a},g.set=function(t,e){y("Firebase.set",1,2,arguments.length),If("Firebase.set",this.path),Af("Firebase.set",t,this.path,!1),A("Firebase.set",2,e,!0);var n=new Hb;return this.w.Kb(this.path,t,null,Ib(n,e)),n.ra},g.update=function(t,e){if(y("Firebase.update",1,2,arguments.length),If("Firebase.update",this.path),da(t)){for(var n={},i=0;i>>0),h=0,f=function(t,e,n){return t.call.apply(t.bind,arguments)},d=function(t,e,n){if(!t)throw Error();if(2s&&(s*=2);var n;1===c?(c=2,n=0):n=1e3*(s+Math.random()),r(n)}}function a(t){f||(f=!0,h||(null!==l?(t||(c=2),clearTimeout(l),r(0)):t||(c=1)))}var s=1,l=null,u=!1,c=0,h=!1,f=!1;return r(0),setTimeout(function(){u=!0,a(!0)},n),a},b="https://firebasestorage.googleapis.com",y=function(t,e){this.code="storage/"+t,this.message="Firebase Storage: "+e,this.serverResponse=null,this.name="FirebaseError"};v(y,Error);var q=function(){return new y("unknown","An unknown error occurred, please check the error payload for server response.")},w=function(){return new y("canceled","User canceled the upload/download.")},x=function(t,e,n){return new y("invalid-argument","Invalid argument in `"+e+"` at index "+t+": "+n)},E=function(){return new y("app-deleted","The Firebase app was deleted.")},k=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},T=function(t){var e={};return k(t,function(t,n){e[t]=n}),e},A=function(t,e,n,i){this.l=t,this.f={},this.i=e,this.b={},this.c="",this.N=n,this.g=this.a=null,this.h=[200],this.j=i},S={STATE_CHANGED:"state_changed"},_={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},I=function(t){switch(t){case"running":case"pausing":case"canceling":return"running";case"paused":return"paused";case"success":return"success";case"canceled":return"canceled";case"error":return"error";default:return"error"}},R=function(t){return i(t)&&null!==t},C=function(t){return"string"==typeof t||t instanceof String},O=function(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null};O.prototype.get=function(){var t;return 0t?-1:t>e?1:0},K=function(t,e){this.a=t,this.b=e};K.prototype.clone=function(){return new K(this.a,this.b)};var G=function(t,e){this.bucket=t,this.path=e},z=function(t){var e=encodeURIComponent;return"/b/"+e(t.bucket)+"/o/"+e(t.path)},J=function(t){for(var e=null,n=[{ja:/^gs:\/\/([A-Za-z0-9.\-]+)(\/(.*))?$/i,aa:{bucket:1,path:3},ia:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path=t.path.slice(0,-1))}},{ja:/^https?:\/\/firebasestorage\.googleapis\.com\/v[A-Za-z0-9_]+\/b\/([A-Za-z0-9.\-]+)\/o(\/([^?#]*).*)?$/i,aa:{bucket:1,path:3},ia:function(t){t.path=decodeURIComponent(t.path)}}],i=0;in?Math.max(0,t.length+n):n,s(t))return s(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in r&&e.call(n,r[o],o,t)},vt=Array.prototype.filter?function(t,e,n){return nt(null!=t.length),Array.prototype.filter.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=[],o=0,a=s(t)?t.split(""):t,l=0;i>l;l++)if(l in a){var u=a[l];e.call(n,u,l,t)&&(r[o++]=u)}return r},mt=Array.prototype.map?function(t,e,n){return nt(null!=t.length),Array.prototype.map.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=Array(i),o=s(t)?t.split(""):t,a=0;i>a;a++)a in o&&(r[a]=e.call(n,o[a],a,t));return r},bt=Array.prototype.some?function(t,e,n){return nt(null!=t.length),Array.prototype.some.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=s(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&e.call(n,r[o],o,t))return!0;return!1},yt=function(t){var e;t:{e=jn;for(var n=t.length,i=s(t)?t.split(""):t,r=0;n>r;r++)if(r in i&&e.call(void 0,i[r],r,t)){e=r;break t}e=-1}return 0>e?null:s(t)?t.charAt(e):t[e]},qt=function(t){if("array"!=o(t))for(var e=t.length-1;e>=0;e--)delete t[e];t.length=0},wt=function(t,e){e=pt(t,e);var n;return(n=e>=0)&&(nt(null!=t.length),Array.prototype.splice.call(t,e,1)),n},xt=function(t){var e=t.length;if(e>0){for(var n=Array(e),i=0;e>i;i++)n[i]=t[i];return n}return[]},Et=new O(function(){return new Tt},function(t){t.reset()},100),kt=function(){var t=be,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e},Tt=function(){this.next=this.b=this.a=null};Tt.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Tt.prototype.reset=function(){this.next=this.b=this.a=null};var At=function(t,e){this.type=t,this.a=this.target=e,this.ka=!0};At.prototype.b=function(){this.ka=!1};var St,_t=function(t,e,n,i,r){this.listener=t,this.a=null,this.src=e,this.type=n,this.U=!!i,this.N=r,++lt,this.O=this.T=!1},It=function(t){t.O=!0,t.listener=null,t.a=null,t.src=null,t.N=null},Rt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Ct=function(t,e){return e=vt(e.split("/"),function(t){return 0-1?(t=e[s],i||(t.T=!1)):(t=new _t(n,t.src,a,!!r,o),t.T=i,e.push(t)),t},Pt=function(t,e){var n=e.type;n in t.a&&wt(t.a[n],e)&&(It(e),0==t.a[n].length&&(delete t.a[n],t.b--))},Nt=function(t,e,n,i){for(var r=0;r=this.o()){for(var n=this.a,i=0;i0&&(i=e-1>>1,t[i].a>n.a);)t[e]=t[i],e=i;t[e]=n};t=Ut.prototype,t.w=function(){for(var t=this.a,e=[],n=t.length,i=0;n>i;i++)e.push(t[i].b);return e},t.D=function(){for(var t=this.a,e=[],n=t.length,i=0;n>i;i++)e.push(t[i].a);return e},t.clone=function(){return new Ut(this)},t.o=function(){return this.a.length},t.F=function(){return 0==this.a.length},t.clear=function(){qt(this.a)};var Wt=function(){this.b=[],this.a=[]},Bt=function(t){return 0==t.b.length&&(t.b=t.a,t.b.reverse(),t.a=[]),t.b.pop()};Wt.prototype.o=function(){return this.b.length+this.a.length},Wt.prototype.F=function(){return 0==this.b.length&&0==this.a.length},Wt.prototype.clear=function(){this.b=[],this.a=[]},Wt.prototype.w=function(){for(var t=[],e=this.b.length-1;e>=0;--e)t.push(this.b[e]);for(var n=this.a.length,e=0;n>e;++e)t.push(this.a[e]);return t};var Xt,Qt=function(t){if(t.w&&"function"==typeof t.w)return t.w();if(s(t))return t.split("");if(a(t)){for(var e=[],n=t.length,i=0;n>i;i++)e.push(t[i]);return e}return L(t)},Vt=function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(a(t)||s(t))gt(t,e,void 0);else{var n;if(t.D&&"function"==typeof t.D)n=t.D();else if(t.w&&"function"==typeof t.w)n=void 0;else if(a(t)||s(t)){n=[];for(var i=t.length,r=0;i>r;r++)n.push(r)}else n=j(t);for(var i=Qt(t),r=i.length,o=0;r>o;o++)e.call(void 0,i[o],n&&n[o],t)}},Kt=function(t){n.setTimeout(function(){throw t},0)},Gt=function(){var t=n.MessageChannel;if("undefined"==typeof t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!ht("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow,t=e.document;t.open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host,t=p(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this);e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),"undefined"!=typeof t&&!ht("Trident")&&!ht("MSIE")){var e=new t,r={},o=r;return e.port1.onmessage=function(){if(i(r.next)){r=r.next;var t=r.ea;r.ea=null,t()}},function(t){o.next={ea:t},o=o.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}},zt="StopIteration"in n?n.StopIteration:{message:"StopIteration",stack:""},Jt=function(){};Jt.prototype.next=function(){throw zt},Jt.prototype.Y=function(){return this};var Zt=function(){Ut.call(this)};v(Zt,Ut);var Yt,$t=ht("Opera"),te=ht("Trident")||ht("MSIE"),ee=ht("Edge"),ne=ht("Gecko")&&!(-1!=at.toLowerCase().indexOf("webkit")&&!ht("Edge"))&&!(ht("Trident")||ht("MSIE"))&&!ht("Edge"),ie=-1!=at.toLowerCase().indexOf("webkit")&&!ht("Edge"),re=function(){var t=n.document;return t?t.documentMode:void 0};t:{var oe="",ae=function(){var t=at;return ne?/rv\:([^\);]+)(\)|;)/.exec(t):ee?/Edge\/([\d\.]+)/.exec(t):te?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):ie?/WebKit\/(\S+)/.exec(t):$t?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(ae&&(oe=ae?ae[1]:""),te){var se=re();if(null!=se&&se>parseFloat(oe)){Yt=String(se);break t}}Yt=oe}var le,ue,ce=Yt,he={},fe=function(t){var e;if(!(e=he[t])){e=0;for(var n=Q(String(ce)).split("."),i=Q(String(t)).split("."),r=Math.max(n.length,i.length),o=0;0==e&&r>o;o++){var a=n[o]||"",s=i[o]||"",l=/(\d*)(\D*)/g,u=/(\d*)(\D*)/g;do{var c=l.exec(a)||["","",""],h=u.exec(s)||["","",""];if(0==c[0].length&&0==h[0].length)break;e=V(0==c[1].length?0:parseInt(c[1],10),0==h[1].length?0:parseInt(h[1],10))||V(0==c[2].length,0==h[2].length)||V(c[2],h[2])}while(0==e)}e=he[t]=e>=0}return e},de=n.document,pe=de&&te?re()||("CSS1Compat"==de.compatMode?parseInt(ce,10):5):void 0,ge=function(t,e){le||ve(),me||(le(),me=!0);var n=be,i=Et.get();i.set(t,e),n.b?n.b.next=i:(nt(!n.a),n.a=i),n.b=i},ve=function(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve(void 0);le=function(){t.then(ye)}}else le=function(){var t=ye;!l(n.setImmediate)||n.Window&&n.Window.prototype&&!ht("Edge")&&n.Window.prototype.setImmediate==n.setImmediate?(Xt||(Xt=Gt()),Xt(t)):n.setImmediate(t)}},me=!1,be=new function(){this.b=this.a=null},ye=function(){for(var t;t=kt();){try{t.a.call(t.b)}catch(e){Kt(e)}M(Et,t)}me=!1};(ue=!te)||(ue=9<=Number(pe));var qe=ue,we=te&&!fe("9");!ie||fe("528"),ne&&fe("1.9b")||te&&fe("8")||$t&&fe("9.5")||ie&&fe("528"),ne&&!fe("8")||te&&fe("9");var xe=function(t,e){this.b={},this.a=[],this.f=this.c=0;var n=arguments.length;if(n>1){if(n%2)throw Error("Uneven number of arguments");for(var i=0;n>i;i+=2)this.set(arguments[i],arguments[i+1])}else if(t){t instanceof xe?(n=t.D(),i=t.w()):(n=j(t),i=L(t));for(var r=0;r2*t.c&&ke(t),!0):!1},ke=function(t){if(t.c!=t.a.length){for(var e=0,n=0;e=i.a.length)throw zt;var r=i.a[e++];return t?r:i.b[r]},r};var Te=function(t,e){if(At.call(this,t?t.type:""),this.c=this.a=this.target=null,t){if(this.type=t.type,this.target=t.target||t.srcElement,this.a=e,(e=t.relatedTarget)&&ne)try{B(e.nodeName)}catch(n){}this.c=t,t.defaultPrevented&&this.b()}};v(Te,At),Te.prototype.b=function(){Te.G.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,we)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var Ae=function(t,e){if(this.a=0,this.i=void 0,this.c=this.b=this.f=null,this.g=this.h=!1,t!=r)try{var n=this;t.call(e,function(t){Fe(n,2,t)},function(t){try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Fe(n,3,t)})}catch(i){Fe(this,3,i)}},Se=function(){this.next=this.f=this.c=this.a=this.b=null,this.g=!1};Se.prototype.reset=function(){this.f=this.c=this.a=this.b=null,this.g=!1};var _e=new O(function(){return new Se},function(t){t.reset()},100),Ie=function(t,e,n){var i=_e.get();return i.a=t,i.c=e,i.f=n,i},Re=function(t){if(t instanceof Ae)return t;var e=new Ae(r);return Fe(e,2,t),e},Ce=function(t){return new Ae(function(e,n){n(t)})};Ae.prototype.then=function(t,e,n){return null!=t&&rt(t,"opt_onFulfilled should be a function."),null!=e&&rt(e,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Me(this,l(t)?t:null,l(e)?e:null,n)},H(Ae),Ae.prototype.l=function(t,e){return Me(this,null,t,e)};var Oe=function(t,e){t.b||2!=t.a&&3!=t.a||Ne(t),nt(null!=e.a),t.c?t.c.next=e:t.b=e,t.c=e},Me=function(t,e,n,i){var r=Ie(null,null,null);return r.b=new Ae(function(t,o){r.a=e?function(n){try{var r=e.call(i,n);t(r)}catch(a){o(a)}}:t,r.c=n?function(e){try{var r=n.call(i,e);t(r)}catch(a){o(a)}}:o}),r.b.f=t,Oe(t,r),r.b};Ae.prototype.s=function(t){nt(1==this.a),this.a=0,Fe(this,2,t)},Ae.prototype.m=function(t){nt(1==this.a),this.a=0,Fe(this,3,t)};var Fe=function(t,e,n){if(0==t.a){t==n&&(e=3,n=new TypeError("Promise cannot resolve to itself")),t.a=1;var i;t:{var o=n,a=t.s,s=t.m;if(o instanceof Ae)null!=a&&rt(a,"opt_onFulfilled should be a function."),null!=s&&rt(s,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Oe(o,Ie(a||r,s||null,t)),i=!0;else if(W(o))o.then(a,s,t),i=!0;else{if(u(o))try{var c=o.then;if(l(c)){Pe(o,c,a,s,t),i=!0;break t}}catch(h){s.call(t,h),i=!0;break t}i=!1}}i||(t.i=n,t.a=e,t.f=null,Ne(t),3!=e||De(t,n))}},Pe=function(t,e,n,i,r){var o=!1,a=function(t){o||(o=!0,n.call(r,t))},s=function(t){o||(o=!0,i.call(r,t))};try{e.call(t,a,s)}catch(l){s(l)}},Ne=function(t){t.h||(t.h=!0,ge(t.j,t))},Le=function(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.c=null),null!=e&&nt(null!=e.a),e};Ae.prototype.j=function(){for(var t;t=Le(this);){var e=this.a,n=this.i;if(3==e&&t.c&&!t.g){var i;for(i=this;i&&i.g;i=i.f)i.g=!1}if(t.b)t.b.f=null,je(t,e,n);else try{t.g?t.a.call(t.f):je(t,e,n)}catch(r){Ue.call(null,r)}M(_e,t)}this.h=!1};var je=function(t,e,n){2==e?t.a.call(t.f,n):t.c&&t.c.call(t.f,n)},De=function(t,e){t.g=!0,ge(function(){t.g&&Ue.call(null,e)})},Ue=Kt,He=function(t){if(this.a=new xe,t){t=Qt(t);for(var e=t.length,n=0;e>n;n++){var i=t[n];this.a.set(We(i),i)}}},We=function(t){var e=typeof t;return"object"==e&&t||"function"==e?"o"+(t[c]||(t[c]=++h)):e.substr(0,1)+t};t=He.prototype,t.o=function(){return this.a.o()},t.clear=function(){this.a.clear()},t.F=function(){return this.a.F()},t.w=function(){return this.a.w()},t.clone=function(){return new He(this)},t.Y=function(){return this.a.Y(!1)};var Be=function(t){return function(){var e=[];Array.prototype.push.apply(e,arguments),Re(!0).then(function(){t.apply(null,e)})}},Xe="closure_lm_"+(1e6*Math.random()|0),Qe={},Ve=0,Ke=function(t,e,n,i,r){if("array"==o(e)){for(var a=0;a-1&&(It(a[n]),nt(null!=a.length),Array.prototype.splice.call(a,n,1),0==a.length&&(delete t.a[e],t.b--)))):t&&(t=rn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=Nt(e,n,!!i,r)),(n=t>-1?e[t]:null)&&Ye(n))},Ye=function(t){if("number"!=typeof t&&t&&!t.O){var e=t.src;if(e&&e[st])Pt(e.b,t);else{var n=t.type,i=t.a;e.removeEventListener?e.removeEventListener(n,i,t.U):e.detachEvent&&e.detachEvent($e(n),i),Ve--,(n=rn(e))?(Pt(n,t),0==n.b&&(n.src=null,e[Xe]=null)):It(t)}}},$e=function(t){return t in Qe?Qe[t]:Qe[t]="on"+t},tn=function(t,e,n,i){var r=!0;if((t=rn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;ti.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(a){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=e.a;o;o=o.parentNode)i.push(o);for(t=t.type,o=i.length-1;o>=0;o--){e.a=i[o];var s=tn(i[o],t,!0,e),r=r&&s}for(o=0;o>>0),an=function(t){return nt(t,"Listener can not be null."),l(t)?t:(nt(t.handleEvent,"An object listener must have handleEvent method."),t[on]||(t[on]=function(e){return t.handleEvent(e)}),t[on])},sn=function(t,e){if(ot.call(this),this.l=t||0,this.c=e||10,this.l>this.c)throw Error("[goog.structs.Pool] Min can not be greater than max");this.a=new Wt,this.b=new He,this.i=null,this.S()};v(sn,ot),sn.prototype.W=function(){var t=g();if(!(null!=this.i&&0>t-this.i)){for(var e;0this.c&&0=wn(this).value)for(l(e)&&(e=e()),t=new P(t,String(e),this.f),i&&(t.a=i),i="log:"+t.b,n.console&&(n.console.timeStamp?n.console.timeStamp(i):n.console.markTimeline&&n.console.markTimeline(i)),n.msWriteProfilerMark&&n.msWriteProfilerMark(i),i=this;i;)i=i.a};var xn={},En=null,kn=function(t){En||(En=new vn(""),xn[""]=En,En.c=yn);var e;if(!(e=xn[t])){e=new vn(t);var n=t.lastIndexOf("."),i=t.substr(n+1),n=kn(t.substr(0,n));n.b||(n.b={}),n.b[i]=e,e.a=n,xn[t]=e}return e},Tn=function(){ot.call(this),this.b=new Mt(this),this.ma=this,this.I=null};v(Tn,ot),Tn.prototype[st]=!0,Tn.prototype.removeEventListener=function(t,e,n,i){Ze(this,t,e,n,i)};var An=function(t,e){_n(t);var n,i=t.I;if(i){n=[];for(var r=1;i;i=i.I)n.push(i),nt(1e3>++r,"infinite loop")}t=t.ma,i=e.type||e,s(e)?e=new At(e,t):e instanceof At?e.target=e.target||t:(r=e,e=new At(i,t),U(e,r));var o,r=!0;if(n)for(var a=n.length-1;a>=0;a--)o=e.a=n[a],r=Sn(o,i,!0,e)&&r;if(o=e.a=t,r=Sn(o,i,!0,e)&&r,r=Sn(o,i,!1,e)&&r,n)for(a=0;a=o)n=void 0;else{if(1==o)qt(r);else{r[0]=r.pop();for(var r=0,i=i.a,o=i.length,a=i[r];o>>1>r;){var s=2*r+1,l=2*r+2,s=o>l&&i[l].aa.a)break;i[r]=i[s],r=s}i[r]=a}n=n.b}n.apply(this,[e])}},t.Z=function(t){In.G.Z.call(this,t),this.$()},t.S=function(){In.G.S.call(this),this.$()},t.A=function(){In.G.A.call(this),n.clearTimeout(void 0),this.f.clear(),this.f=null};var Rn=function(t,e){t&&t.log(qn,e,void 0)},Cn=function(t,e,i){if(l(t))i&&(t=p(t,i));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=p(t.handleEvent,t)}return 2147483647=500&&600>o||429===o?(i=7===e.J,ln(e),t(!1,new ei(!1,null,i))):(i=0<=pt(r.I,o),t(!0,new ei(i,e)))})})}function n(t,e){var n=r.l;t=r.s;var o=e.c;if(e.b)try{var a=r.v(o,zn(o));i(a)?n(a):n()}catch(s){t(s)}else null!==o?(e=q(),a=zn(o),e.serverResponse=a,t(r.j?r.j(o,e):e)):(e=e.a?r.h?E():w():new y("retry-limit-exceeded","Max retry time for operation exceeded, please try again."),t(e));ln(o)}var r=t;t.i?n(0,new ei(!1,null,!0)):t.f=m(e,n,t.K)};ti.prototype.a=function(){return this.C},ti.prototype.b=function(t){this.i=!0,this.h=t||!1,null!==this.f&&(0,this.f)(!1),null!==this.c&&Hn(this.c)};var ii=function(t,e,n){var i=Y(t.f),i=t.l+i,r=t.b?T(t.b):{};return null!==e&&0e&&(e+=t.size),0>e&&(e=0),0>n&&(n+=t.size),e>n&&(n=e),t.slice(e,n-e)):t.slice(e,n):null},ai=function(t){this.c=Ce(t)};ai.prototype.a=function(){return this.c},ai.prototype.b=function(){};var si=function(){this.a={},this.b=Number.MIN_SAFE_INTEGER},li=function(t,e){function n(){delete r.a[i]}var i=t.b;t.b++,t.a[i]=e;var r=t;e.a().then(n,n)};si.prototype.clear=function(){k(this.a,function(t,e){e&&e.b(!0)}),this.a={}};var ui=function(t,e,n,i){this.a=t,this.f=null,null!==this.a&&(t=this.a.options,R(t)?this.f=t.storageBucket||null:this.f=null),this.l=e,this.j=n,this.i=i,this.c=12e4,this.b=6e4,this.h=new si,this.g=!1},ci=function(t){return null!==t.a&&R(t.a.INTERNAL)&&R(t.a.INTERNAL.getToken)?t.a.INTERNAL.getToken().then(function(t){return R(t)?t.accessToken:null},function(){return null}):Re(null)};ui.prototype.bucket=function(){if(this.g)throw E();return this.f};var hi=function(t,e,n){return t.g?new ai(E()):(e=t.j(e,n,null===t.a),li(t.h,e),e)},fi=function(t,e){return e},di=function(t,e,n,i){this.c=t,this.b=e||t,this.f=!!n,this.a=i||fi},pi=null,gi=function(){if(pi)return pi;var t=[];t.push(new di("bucket")),t.push(new di("generation")),t.push(new di("metageneration")),t.push(new di("name","fullPath",!0));var e=new di("name");return e.a=function(t,e){return!C(e)||2>e.length?e:Ot(e)},t.push(e),e=new di("size"),e.a=function(t,e){return R(e)?+e:e},t.push(e),t.push(new di("timeCreated")),t.push(new di("updated")),t.push(new di("md5Hash",null,!0)),t.push(new di("cacheControl",null,!0)),t.push(new di("contentDisposition",null,!0)),t.push(new di("contentEncoding",null,!0)),t.push(new di("contentLanguage",null,!0)),t.push(new di("contentType",null,!0)),t.push(new di("metadata","customMetadata",!0)),t.push(new di("downloadTokens","downloadURLs",!1,function(t,e){if(!(C(e)&&0r;r++){var o=e[r];o.f&&(n[o.c]=t[o.b])}return JSON.stringify(n)},bi=function(t){if(!t||"object"!=typeof t)throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e&&"object"!=typeof n)throw"Expected object for 'customMetadata' mapping."}},yi=function(t,e,n){for(var i=e.length,r=e.length,o=0;o=0))throw"Expected a number 0 or greater."})},Ti=function(t,e){return new qi(function(e){if(!(null===e||R(e)&&e instanceof Object))throw"Expected an Object.";R(t)&&t(e)},e)},Ai=function(){return new qi(function(t){if(null!==t&&!l(t))throw"Expected a Function."},!0)},Si=function(t){if(!t)throw q()},_i=function(t,e){return function(n,i){t:{var r;try{r=JSON.parse(i)}catch(o){n=null;break t}n=u(r)?r:null}if(null===n)n=null;else{i={type:"file"},r=e.length;for(var a=0;r>a;a++){var s=e[a];i[s.b]=s.a(i,n[s.c])}vi(i,t),n=i}return Si(null!==n),n}},Ii=function(t){return function(e,n){return e=401===Gn(e)?new y("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===Gn(e)?new y("quota-exceeded","Quota for bucket '"+t.bucket+"' exceeded, please view quota on https://firebase.google.com/pricing/."):403===Gn(e)?new y("unauthorized","User does not have permission to access '"+t.path+"'."):n,e.serverResponse=n.serverResponse,e}},Ri=function(t){var e=Ii(t);return function(n,i){var r=e(n,i);return 404===Gn(n)&&(r=new y("object-not-found","Object '"+t.path+"' does not exist.")),r.serverResponse=i.serverResponse,r}},Ci=function(t,e,n){var i=z(e);return t=new A(b+"/v0"+i,"GET",_i(t,n),t.c),t.a=Ri(e),t},Oi=function(t,e){var n=z(e);return t=new A(b+"/v0"+n,"DELETE",function(){},t.c),t.h=[200,204],t.a=Ri(e),t},Mi=function(t,e,n){return n=n?T(n):{},n.fullPath=t.path,n.size=e.size,n.contentType||(n.contentType=e&&e.type||"application/octet-stream"),n},Fi=function(t,e,n,i,r){var o,a="/b/"+encodeURIComponent(e.bucket)+"/o",s={"X-Goog-Upload-Protocol":"multipart"};o="";for(var l=0;2>l;l++)o+=Math.random().toString().slice(2);return s["Content-Type"]="multipart/related; boundary="+o,r=Mi(e,i,r),l=mi(r,n),i=ri("--"+o+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+l+"\r\n--"+o+"\r\nContent-Type: "+r.contentType+"\r\n\r\n",i,"\r\n--"+o+"--"),t=new A(b+"/v0"+a,"POST",_i(t,n),t.b),t.f={name:r.fullPath},t.b=s,t.c=i,t.a=Ii(e),t},Pi=function(t,e,n,i){this.a=t,this.total=e,this.b=!!n,this.c=i||null},Ni=function(t,e){var n;try{n=Jn(t,"X-Goog-Upload-Status")}catch(i){Si(!1)}return t=0<=pt(e||["active"],n),Si(t),n},Li=function(t,e,n,i,r){var o="/b/"+encodeURIComponent(e.bucket)+"/o",a=Mi(e,i,r);return r={name:a.fullPath},o=b+"/v0"+o,i={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":i.size,"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},n=mi(a,n),t=new A(o,"POST",function(t){Ni(t);var e;try{e=Jn(t,"X-Goog-Upload-URL")}catch(n){Si(!1)}return Si(C(e)),e},t.b),t.f=r,t.b=i,t.c=n,t.a=Ii(e),t},ji=function(t,e,n,i){return t=new A(n,"POST",function(t){var e,n=Ni(t,["active","final"]);try{e=Jn(t,"X-Goog-Upload-Size-Received")}catch(r){Si(!1)}return t=e,isFinite(t)&&(t=String(t)),t=s(t)?/^\s*-?0x/i.test(t)?parseInt(t,16):parseInt(t,10):NaN,Si(!isNaN(t)),new Pi(t,i.size,"final"===n)},t.b),t.b={"X-Goog-Upload-Command":"query"},t.a=Ii(e),t},Di=function(t,e,n,i,r,o){var a=new Pi(0,0);if(o?(a.a=o.a,a.total=o.total):(a.a=0,a.total=i.size),i.size!==a.total)throw new y("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var s=o=a.total-a.a,s=Math.min(s,262144),l=a.a;if(o={"X-Goog-Upload-Command":s===o?"upload, finalize":"upload","X-Goog-Upload-Offset":a.a},l=oi(i,l,l+s),null===l)throw new y("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.");return n=new A(n,"POST",function(t,n){var o,l=Ni(t,["active","final"]),u=a.a+s,c=i.size;return o="final"===l?_i(e,r)(t,n):null,new Pi(u,c,"final"===l,o)},e.b),n.b=o,n.c=l,n.g=null,n.a=Ii(t),n},Ui=function(t,e,n,i,r,o){this.K=t,this.c=e,this.i=n,this.f=r,this.h=o||null,this.l=i,this.j=0,this.B=this.s=!1,this.v=[],this.R=262144n&&Yi(t)},zi=function(t,e){if(t.b!==e)switch(e){case"canceling":t.b=e,null!==t.a&&t.a.b();break;case"pausing":t.b=e,null!==t.a&&t.a.b();break;case"running":var n="paused"===t.b;t.b=e,n&&(Yi(t),Hi(t));break;case"paused":t.b=e,Yi(t);break;case"canceled":t.g=w(),t.b=e,Yi(t);break;case"error":t.b=e,Yi(t);break;case"success":t.b=e,Yi(t)}},Ji=function(t){switch(t.b){case"pausing":zi(t,"paused");break;case"canceling":zi(t,"canceled");break;case"running":Hi(t)}};Ui.prototype.C=function(){return new $(this.j,this.f.size,I(this.b),this.h,this,this.K)},Ui.prototype.I=function(t,e,n,r){function o(t){try{return void s(t)}catch(e){}try{if(l(t),!(i(t.next)||i(t.error)||i(t.complete)))throw""}catch(e){throw"Expected a function or an Object with one of `next`, `error`, `complete` properties."}}function a(t){return function(e,n,i){null!==t&&yi("on",t,arguments);var r=new Z(e,n,i);return Zi(u,r),function(){wt(u.v,r)}}}var s=Ai().a,l=Ti(null,!0).a;yi("on",[xi(function(){if("state_changed"!==t)throw"Expected one of the event types: [state_changed]."}),Ti(o,!0),Ai(),Ai()],arguments);var u=this,c=[Ti(function(t){if(null===t)throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";o(t)}),Ai(),Ai()];return i(e)||i(n)||i(r)?a(null)(e,n,r):a(c)};var Zi=function(t,e){t.v.push(e),$i(t,e)},Yi=function(t){var e=xt(t.v);gt(e,function(e){$i(t,e)})},$i=function(t,e){switch(I(t.b)){case"running":case"paused":null!==e.next&&Be(e.next.bind(e,t.C()))();break;case"success":null!==e.a&&Be(e.a.bind(e))();break;case"canceled":case"error":null!==e.error&&Be(e.error.bind(e,t.g))();break;default:null!==e.error&&Be(e.error.bind(e,t.g))()}};Ui.prototype.M=function(){yi("resume",[],arguments);var t="paused"===this.b||"pausing"===this.b;return t&&zi(this,"running"),t},Ui.prototype.L=function(){yi("pause",[],arguments);var t="running"===this.b;return t&&zi(this,"pausing"),t},Ui.prototype.H=function(){yi("cancel",[],arguments);var t="running"===this.b||"pausing"===this.b;return t&&zi(this,"canceling"),t};var tr=function(t,e){if(this.b=t,e)this.a=e instanceof G?e:J(e);else{if(t=t.bucket(),null===t)throw new y("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");this.a=new G(t,"")}};tr.prototype.toString=function(){return yi("toString",[],arguments),"gs://"+this.a.bucket+"/"+this.a.path};var er=function(t,e){return new tr(t,e)};t=tr.prototype,t.ga=function(t){yi("child",[xi()],arguments);var e=Ct(this.a.path,t);return er(this.b,new G(this.a.bucket,e))},t.Fa=function(){var t;if(t=this.a.path,0==t.length)t=null;else{var e=t.lastIndexOf("/");t=-1===e?"":t.slice(0,e)}return null===t?null:er(this.b,new G(this.a.bucket,t))},t.Ha=function(){return er(this.b,new G(this.a.bucket,""))},t.pa=function(){return this.a.bucket},t.Aa=function(){return this.a.path},t.Ea=function(){return Ot(this.a.path)},t.Ja=function(){return this.b.i},t.ua=function(t,e){return yi("put",[Ei(),new qi(bi,!0)],arguments),nr(this,"put"),new Ui(this,this.b,this.a,gi(),t,e)},t["delete"]=function(){yi("delete",[],arguments),nr(this,"delete");var t=this;return ci(this.b).then(function(e){var n=Oi(t.b,t.a);return hi(t.b,n,e).a()})},t.ha=function(){yi("getMetadata",[],arguments),nr(this,"getMetadata");var t=this;return ci(this.b).then(function(e){var n=Ci(t.b,t.a,gi());return hi(t.b,n,e).a()})},t.va=function(t){yi("updateMetadata",[new qi(bi,void 0)],arguments),nr(this,"updateMetadata");var e=this;return ci(this.b).then(function(n){var i=e.b,r=e.a,o=t,a=gi(),s=z(r),s=b+"/v0"+s,o=mi(o,a),i=new A(s,"PATCH",_i(i,a),i.c);return i.b={"Content-Type":"application/json; charset=utf-8"},i.c=o,i.a=Ri(r),hi(e.b,i,n).a()})},t.ta=function(){return yi("getDownloadURL",[],arguments),nr(this,"getDownloadURL"),this.ha().then(function(t){if(t=t.downloadURLs[0],R(t))return t;throw new y("no-download-url","The given file does not have any download URLs.")})};var nr=function(t,e){if(""===t.a.path)throw new y("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').")},ir=function(t){this.a=new ui(t,function(t,e){return new tr(t,e)},ii,this),this.b=t,this.c=new rr(this)};t=ir.prototype,t.wa=function(t){yi("ref",[xi(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments);var e=new tr(this.a);return i(t)?e.ga(t):e},t.xa=function(t){return yi("refFromURL",[xi(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{J(t)}catch(e){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new tr(this.a,t)},t.Ca=function(){return this.a.b},t.za=function(t){yi("setMaxUploadRetryTime",[ki()],arguments),this.a.b=t},t.Ba=function(){return this.a.c},t.ya=function(t){yi("setMaxOperationRetryTime",[ki()],arguments),this.a.c=t},t.oa=function(){return this.b},t.la=function(){return this.c};var rr=function(t){this.a=t};rr.prototype["delete"]=function(){var t=this.a.a;t.g=!0,t.a=null,t.h.clear()};var or=function(t,e,n){Object.defineProperty(t,e,{get:n})};tr.prototype.toString=tr.prototype.toString,tr.prototype.child=tr.prototype.ga, +tr.prototype.put=tr.prototype.ua,tr.prototype["delete"]=tr.prototype["delete"],tr.prototype.getMetadata=tr.prototype.ha,tr.prototype.updateMetadata=tr.prototype.va,tr.prototype.getDownloadURL=tr.prototype.ta,or(tr.prototype,"parent",tr.prototype.Fa),or(tr.prototype,"root",tr.prototype.Ha),or(tr.prototype,"bucket",tr.prototype.pa),or(tr.prototype,"fullPath",tr.prototype.Aa),or(tr.prototype,"name",tr.prototype.Ea),or(tr.prototype,"storage",tr.prototype.Ja),ir.prototype.ref=ir.prototype.wa,ir.prototype.refFromURL=ir.prototype.xa,or(ir.prototype,"maxOperationRetryTime",ir.prototype.Ba),ir.prototype.setMaxOperationRetryTime=ir.prototype.ya,or(ir.prototype,"maxUploadRetryTime",ir.prototype.Ca),ir.prototype.setMaxUploadRetryTime=ir.prototype.za,or(ir.prototype,"app",ir.prototype.oa),or(ir.prototype,"INTERNAL",ir.prototype.la),rr.prototype["delete"]=rr.prototype["delete"],ir.prototype.capi_=function(t){b=t},Ui.prototype.on=Ui.prototype.I,Ui.prototype.resume=Ui.prototype.M,Ui.prototype.pause=Ui.prototype.L,Ui.prototype.cancel=Ui.prototype.H,or(Ui.prototype,"snapshot",Ui.prototype.C),or($.prototype,"bytesTransferred",$.prototype.qa),or($.prototype,"totalBytes",$.prototype.La),or($.prototype,"state",$.prototype.Ia),or($.prototype,"metadata",$.prototype.Da),or($.prototype,"downloadURL",$.prototype.sa),or($.prototype,"task",$.prototype.Ka),or($.prototype,"ref",$.prototype.Ga),S.STATE_CHANGED="state_changed",_.RUNNING="running",_.PAUSED="paused",_.SUCCESS="success",_.CANCELED="canceled",_.ERROR="error",Ae.prototype["catch"]=Ae.prototype.l,Ae.prototype.then=Ae.prototype.then,function(){function t(t){return new ir(t)}var e={TaskState:_,TaskEvent:S,Storage:ir,Reference:tr};if(!(window.firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("storage",t,e)}()}()}).call(exports,function(){return this}())},function(t,e){function n(t,e,n){for(var i=[],r=Math.ceil(e/t.columns),o=0;r>o;o++)for(var a=0;ar;r++){var o=r*(2*Math.PI)/e;i.push([n.x+t.radius*Math.cos(o),n.y,n.z+t.radius*Math.sin(o)])}return i}function r(t,e,i){return t.columns=e,n(t,e,i)}function o(t,e,n){return l([[1,0,0],[0,1,0],[0,0,1],[-1,0,0],[0,-1,0],[0,0,-1]],n,t.radius/2)}function a(t,e,n){var i=(1+Math.sqrt(5))/2,r=1/i,o=2-i,a=-1*r,s=-1*o;return l([[-1,o,0],[-1,s,0],[0,-1,o],[0,-1,s],[0,1,o],[0,1,s],[1,o,0],[1,s,0],[r,r,r],[r,r,a],[r,a,r],[r,a,a],[o,0,1],[o,0,-1],[a,r,r],[a,r,a],[a,a,r],[a,a,a],[s,0,1],[s,0,-1]],n,t.radius/2)}function s(t,e,n){var i=Math.sqrt(3),r=-1/Math.sqrt(3),o=2*Math.sqrt(2/3);return l([[0,0,i+r],[-1,0,r],[1,0,r],[0,o,0]],n,t.radius/2)}function l(t,e,n){return e=[e.x,e.y,e.z],t.map(function(t){return t.map(function(t,i){return t*n+e[i]})})}function u(t,e){t.forEach(function(t,n){var i=e[n];t.setAttribute("position",{x:i[0],y:i[1],z:i[2]})})}AFRAME.registerComponent("layout",{schema:{columns:{"default":1,min:0,"if":{type:["box"]}},margin:{"default":1,min:0,"if":{type:["box","line"]}},radius:{"default":1,min:0,"if":{type:["circle","cube","dodecahedron","pyramid"]}},type:{"default":"line",oneOf:["box","circle","cube","dodecahedron","line","pyramid"]}},init:function(){var t=this,e=this.el,n=n=[];this.children=e.getChildEntities(),this.children.forEach(function(t){n.push(t.getComputedAttribute("position"))}),e.addEventListener("child-attached",function(e){t.children.push(e.detail.el),t.update()})},update:function(t){var e,l,c=this.children,h=this.data,f=this.el,d=c.length,p=f.getComputedAttribute("position");switch(h.type){case"box":e=n;break;case"circle":e=i;break;case"cube":e=o;break;case"dodecahedron":e=a;break;case"pyramid":e=s;break;default:e=r}l=e(h,d,p),u(c,l)},remove:function(){el.removeEventListener("child-attached",this.childAttachedCallback),u(children,this.initialPositions)}}),t.exports.getBoxPositions=n,t.exports.getCirclePositions=i,t.exports.getLinePositions=r,t.exports.getCubePositions=o,t.exports.getDodecahedronPositions=a,t.exports.getPyramidPositions=s},function(t,e){var n=AFRAME.utils.debug,i=AFRAME.utils.coordinates,r=n("components:look-at:warn"),o=i.isCoordinate;delete AFRAME.components["look-at"],AFRAME.registerComponent("look-at",{schema:{"default":"",parse:function(t){return o(t)||"object"==typeof t?i.parse(t):t},stringify:function(t){return"object"==typeof t?i.stringify(t):t}},init:function(){this.target3D=null,this.vector=new THREE.Vector3},update:function(){var t,e=this,n=e.data,i=e.el.object3D;return!n||"object"==typeof n&&!Object.keys(n).length?e.remove():"object"==typeof n?i.lookAt(new THREE.Vector3(n.x,n.y,n.z)):(t=e.el.sceneEl.querySelector(n),t?t.hasLoaded?e.beginTracking(t):t.addEventListener("loaded",function(){e.beginTracking(t)}):void r('"'+n+'" does not point to a valid entity to look-at'))},tick:function(t){var e=this.target3D;return e?this.el.object3D.lookAt(this.vector.setFromMatrixPosition(e.matrixWorld)):void 0},beginTracking:function(t){this.target3D=t.object3D}})},function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("random-color",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:1,y:1,z:1},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("material","color","#"+new THREE.Color(Math.random()*e.x+n.x,Math.random()*e.y+n.y,Math.random()*e.z+n.z).getHexString())}}),AFRAME.registerComponent("random-position",{schema:{min:{"default":{x:-10,y:-10,z:-10},type:"vec3"},max:{"default":{x:10,y:10,z:10},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("position",{x:Math.random()*(e.x-n.x)+n.x,y:Math.random()*(e.y-n.y)+n.y,z:Math.random()*(e.z-n.z)+n.z})}}),AFRAME.registerComponent("random-spherical-position",{schema:{radius:{"default":10},startX:{"default":0},lengthX:{"default":360},startY:{"default":0},lengthY:{"default":360},startZ:{"default":0},lengthZ:{"default":360}},update:function(){var t=this.data,e=THREE.Math.degToRad(Math.random()*t.lengthX+t.startX),n=THREE.Math.degToRad(Math.random()*t.lengthY+t.startY);THREE.Math.degToRad(Math.random()*t.lengthZ+t.startZ);this.el.setAttribute("position",{x:t.radius*Math.cos(e)*Math.sin(n),y:t.radius*Math.sin(e)*Math.sin(n),z:t.radius*Math.cos(n)})}}),AFRAME.registerComponent("random-rotation",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:360,y:360,z:360},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("rotation",{x:Math.random()*e.x+n.x,y:Math.random()*e.y+n.y,z:Math.random()*e.z+n.z})}}),AFRAME.registerComponent("random-scale",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:2,y:2,z:2},type:"vec3"}},update:function(){var t=this.data,e=t.max,n=t.min;this.el.setAttribute("scale",{x:Math.random()*e.x+n.x,y:Math.random()*e.y+n.y,z:Math.random()*e.z+n.z})}})},function(t,e){function n(t,e,n){return new Promise(function(i){c(e).then(function(){d[t]={template:a(e)(n.trim()),type:e},i(d[t])})})}function i(t,e,n){switch(e){case v:return t(n);case m:return t(n);case b:return Mustache.render(t,n);case y:return t.render(n);default:return t}}function r(t,e){var i=document.querySelector(t),r=i.getAttribute("type"),o=i.innerHTML;if(!e){if(!r)throw new Error("Must provide `type` attribute for