function decodePolylineGoogleMapsCustom(n){for(var f=[],u=0,c=n.length,e=0,o=0,i,r,t,s,h;u<c;){r=0;t=0;do i=n.charAt(u++).charCodeAt(0)-63,t|=(i&31)<<r,r+=5;while(i>=32);s=(t&1)!=0?~(t>>1):t>>1;e+=s;r=0;t=0;do i=n.charAt(u++).charCodeAt(0)-63,t|=(i&31)<<r,r+=5;while(i>=32);h=(t&1)!=0?~(t>>1):t>>1;o+=h;f.push({lat:e/1e5,lng:o/1e5})}return f}function injectTooltip(n,t){!tipObj&&n&&(tipObj=document.createElement("div"),tipObj.style.width="100px",tipObj.style.height="40px",tipObj.style.background="white",tipObj.style.borderRadius="5px",tipObj.style.padding="10px",tipObj.style.fontFamily="Arial,Helvetica",tipObj.style.textAlign="center",tipObj.innerHTML=t,tipObj.style.position="fixed",tipObj.style.top=n.Ba.clientY+window.scrollY+offset.y+"px",tipObj.style.left=n.Ba.clientX+window.scrollX+offset.x+"px",document.body.appendChild(tipObj))}function moveTooltip(n){tipObj&&n&&(tipObj.style.top=n.Ba.clientY+window.scrollY+offset.y+"px",tipObj.style.left=n.Ba.clientX+window.scrollX+offset.x+"px")}function deleteTooltip(){tipObj&&(document.body.removeChild(tipObj),tipObj=null)}function isTokenSentToServer(){return window.localStorage.getItem(tokenSent)==1}function setTokenSentToServer(n){window.localStorage.setItem(tokenSent,n?1:0)}function sendTokenToServer(n){isTokenSentToServer()?console.log("[FIREBASE] Token already sent to server so won't send it again unless it changes"):(console.log("[FIREBASE] Sending token to server..."),$.post("/Token/SaveToken",{token:n}).done(function(n){n.success?(console.log("[FIREBASE] TOKEN Saved successfully"),setTokenSentToServer(!0)):(console.log(n.error),setTokenSentToServer(!1))}).fail(function(n,t,i){console.log(i.toString());setTokenSentToServer(!1)}))}function subscribeTokenToTopic(n){if(!isTokenSentToServer())console.log("[FIREBASE] Sending token to server..."),$.post("/subscribetopic",{token:n,topic:"GENERAL_CA"}).done(function(n){n.success?(console.log("[FIREBASE] Subscribed to topic OK"),setTokenSentToServer(!0)):(console.log(n.error),setTokenSentToServer(!1))}).fail(function(n,t,i){console.log(i.toString());setTokenSentToServer(!1)})}var firebase,tipObj,offset,config,tokenSent;!function(n,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){"use strict";function hr(n,t,i){var r,u=(t=t||f).createElement("script");if(u.text=n,i)for(r in df)i[r]&&(u[r]=i[r]);t.head.appendChild(u).parentNode.removeChild(u)}function it(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?bt[or.call(n)]||"object":typeof n}function hi(n){var t=!!n&&"length"in n&&n.length,i=it(n);return!u(n)&&!tt(n)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in n)}function v(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()}function li(n,t,r){return u(t)?i.grep(n,function(n,i){return!!t.call(n,i,n)!==r}):t.nodeType?i.grep(n,function(n){return n===t!==r}):"string"!=typeof t?i.grep(n,function(n){return wt.call(t,n)>-1!==r}):i.filter(t,n,r)}function wr(n,t){while((n=n[t])&&1!==n.nodeType);return n}function ne(n){var t={};return i.each(n.match(l)||[],function(n,i){t[i]=!0}),t}function ut(n){return n}function dt(n){throw n;}function br(n,t,i,r){var f;try{n&&u(f=n.promise)?f.call(n).done(t).fail(i):n&&u(f=n.then)?f.call(n,t,i):t.apply(void 0,[n].slice(r))}catch(n){i.apply(void 0,[n])}}function ni(){f.removeEventListener("DOMContentLoaded",ni);n.removeEventListener("load",ni);i.ready()}function re(n,t){return t.toUpperCase()}function y(n){return n.replace(te,"ms-").replace(ie,re)}function at(){this.expando=i.expando+at.uid++}function ee(n){return"true"===n||"false"!==n&&("null"===n?null:n===+n+""?+n:ue.test(n)?JSON.parse(n):n)}function dr(n,t,i){var r;if(void 0===i&&1===n.nodeType)if(r="data-"+t.replace(fe,"-$&").toLowerCase(),"string"==typeof(i=n.getAttribute(r))){try{i=ee(i)}catch(n){}o.set(n,t,i)}else i=void 0;return i}function tu(n,t,r,u){var s,h,c=20,l=u?function(){return u.cur()}:function(){return i.css(n,t,"")},o=l(),e=r&&r[3]||(i.cssNumber[t]?"":"px"),f=(i.cssNumber[t]||"px"!==e&&+o)&&vt.exec(i.css(n,t));if(f&&f[3]!==e){for(o/=2,e=e||f[3],f=+o||1;c--;)i.style(n,t,f+e),(1-h)*(1-(h=l()/o||.5))<=0&&(c=0),f/=h;f*=2;i.style(n,t,f+e);r=r||[]}return r&&(f=+f||+o||0,s=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=e,u.start=f,u.end=s)),s}function oe(n){var r,f=n.ownerDocument,u=n.nodeName,t=ai[u];return t||(r=f.body.appendChild(f.createElement(u)),t=i.css(r,"display"),r.parentNode.removeChild(r),"none"===t&&(t="block"),ai[u]=t,t)}function ft(n,t){for(var e,u,f=[],i=0,o=n.length;i<o;i++)(u=n[i]).style&&(e=u.style.display,t?("none"===e&&(f[i]=r.get(u,"display")||null,f[i]||(u.style.display="")),""===u.style.display&&ti(u)&&(f[i]=oe(u))):"none"!==e&&(f[i]="none",r.set(u,"display",e)));for(i=0;i<o;i++)null!=f[i]&&(n[i].style.display=f[i]);return n}function s(n,t){var r;return r="undefined"!=typeof n.getElementsByTagName?n.getElementsByTagName(t||"*"):"undefined"!=typeof n.querySelectorAll?n.querySelectorAll(t||"*"):[],void 0===t||t&&v(n,t)?i.merge([n],r):r}function vi(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function eu(n,t,r,u,f){for(var e,o,p,a,w,v,h=t.createDocumentFragment(),y=[],l=0,b=n.length;l<b;l++)if((e=n[l])||0===e)if("object"===it(e))i.merge(y,e.nodeType?[e]:e);else if(fu.test(e)){for(o=o||h.appendChild(t.createElement("div")),p=(ru.exec(e)||["",""])[1].toLowerCase(),a=c[p]||c._default,o.innerHTML=a[1]+i.htmlPrefilter(e)+a[2],v=a[0];v--;)o=o.lastChild;i.merge(y,o.childNodes);(o=h.firstChild).textContent=""}else y.push(t.createTextNode(e));for(h.textContent="",l=0;e=y[l++];)if(u&&i.inArray(e,u)>-1)f&&f.push(e);else if(w=i.contains(e.ownerDocument,e),o=s(h.appendChild(e),"script"),w&&vi(o),r)for(v=0;e=o[v++];)uu.test(e.type||"")&&r.push(e);return h}function ri(){return!0}function et(){return!1}function su(){try{return f.activeElement}catch(n){}}function yi(n,t,r,u,f,e){var o,s;if("object"==typeof t){"string"!=typeof r&&(u=u||r,r=void 0);for(s in t)yi(n,s,r,u,t[s],e);return n}if(null==u&&null==f?(f=r,u=r=void 0):null==f&&("string"==typeof r?(f=u,u=void 0):(f=u,u=r,r=void 0)),!1===f)f=et;else if(!f)return n;return 1===e&&(o=f,(f=function(n){return i().off(n),o.apply(this,arguments)}).guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function hu(n,t){return v(n,"table")&&v(11!==t.nodeType?t:t.firstChild,"tr")?i(n).children("tbody")[0]||n:n}function ye(n){return n.type=(null!==n.getAttribute("type"))+"/"+n.type,n}function pe(n){return"true/"===(n.type||"").slice(0,5)?n.type=n.type.slice(5):n.removeAttribute("type"),n}function cu(n,t){var u,c,f,s,h,l,a,e;if(1===t.nodeType){if(r.hasData(n)&&(s=r.access(n),h=r.set(t,s),e=s.events)){delete h.handle;h.events={};for(f in e)for(u=0,c=e[f].length;u<c;u++)i.event.add(t,f,e[f][u])}o.hasData(n)&&(l=o.access(n),a=i.extend({},l),o.set(t,a))}}function we(n,t){var i=t.nodeName.toLowerCase();"input"===i&&iu.test(n.type)?t.checked=n.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=n.defaultValue)}function ot(n,t,f,o){t=er.apply([],t);var l,w,a,v,h,b,c=0,y=n.length,d=y-1,p=t[0],k=u(p);if(k||y>1&&"string"==typeof p&&!e.checkClone&&ae.test(p))return n.each(function(i){var r=n.eq(i);k&&(t[0]=p.call(this,i,r.html()));ot(r,t,f,o)});if(y&&(l=eu(t,n[0].ownerDocument,!1,n,o),w=l.firstChild,1===l.childNodes.length&&(l=w),w||o)){for(v=(a=i.map(s(l,"script"),ye)).length;c<y;c++)h=l,c!==d&&(h=i.clone(h,!0,!0),v&&i.merge(a,s(h,"script"))),f.call(n[c],h,c);if(v)for(b=a[a.length-1].ownerDocument,i.map(a,pe),c=0;c<v;c++)h=a[c],uu.test(h.type||"")&&!r.access(h,"globalEval")&&i.contains(b,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?i._evalUrl&&i._evalUrl(h.src):hr(h.textContent.replace(ve,""),b,h))}return n}function lu(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;null!=(u=e[f]);f++)r||1!==u.nodeType||i.cleanData(s(u)),u.parentNode&&(r&&i.contains(u.ownerDocument,u)&&vi(s(u,"script")),u.parentNode.removeChild(u));return n}function yt(n,t,r){var o,s,h,f,u=n.style;return(r=r||ui(n))&&(""!==(f=r.getPropertyValue(t)||r[t])||i.contains(n.ownerDocument,n)||(f=i.style(n,t)),!e.pixelBoxStyles()&&pi.test(f)&&be.test(t)&&(o=u.width,s=u.minWidth,h=u.maxWidth,u.minWidth=u.maxWidth=u.width=f,f=r.width,u.width=o,u.minWidth=s,u.maxWidth=h)),void 0!==f?f+"":f}function au(n,t){return{get:function(){if(!n())return(this.get=t).apply(this,arguments);delete this.get}}}function ge(n){if(n in wu)return n;for(var i=n[0].toUpperCase()+n.slice(1),t=pu.length;t--;)if((n=pu[t]+i)in wu)return n}function bu(n){var t=i.cssProps[n];return t||(t=i.cssProps[n]=ge(n)||n),t}function ku(n,t,i){var r=vt.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function wi(n,t,r,u,f,e){var o="width"===t?1:0,h=0,s=0;if(r===(u?"border":"content"))return 0;for(;o<4;o+=2)"margin"===r&&(s+=i.css(n,r+w[o],!0,f)),u?("content"===r&&(s-=i.css(n,"padding"+w[o],!0,f)),"margin"!==r&&(s-=i.css(n,"border"+w[o]+"Width",!0,f))):(s+=i.css(n,"padding"+w[o],!0,f),"padding"!==r?s+=i.css(n,"border"+w[o]+"Width",!0,f):h+=i.css(n,"border"+w[o]+"Width",!0,f));return!u&&e>=0&&(s+=Math.max(0,Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-e-s-h-.5))),s}function du(n,t,r){var f=ui(n),u=yt(n,t,f),s="border-box"===i.css(n,"boxSizing",!1,f),o=s;if(pi.test(u)){if(!r)return u;u="auto"}return o=o&&(e.boxSizingReliable()||u===n.style[t]),("auto"===u||!parseFloat(u)&&"inline"===i.css(n,"display",!1,f))&&(u=n["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(u=parseFloat(u)||0)+wi(n,t,r||(s?"border":"content"),o,f,u)+"px"}function h(n,t,i,r,u){return new h.prototype.init(n,t,i,r,u)}function bi(){fi&&(!1===f.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(bi):n.setTimeout(bi,i.fx.interval),i.fx.tick())}function tf(){return n.setTimeout(function(){st=void 0}),st=Date.now()}function ei(n,t){var u,r=0,i={height:n};for(t=t?1:0;r<4;r+=2-t)i["margin"+(u=w[r])]=i["padding"+u]=n;return t&&(i.opacity=i.width=n),i}function rf(n,t,i){for(var u,f=(a.tweeners[t]||[]).concat(a.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function no(n,t,u){var f,y,w,c,b,h,o,l,k="width"in t||"height"in t,v=this,p={},s=n.style,a=n.nodeType&&ti(n),e=r.get(n,"fxshow");u.queue||(null==(c=i._queueHooks(n,"fx")).unqueued&&(c.unqueued=0,b=c.empty.fire,c.empty.fire=function(){c.unqueued||b()}),c.unqueued++,v.always(function(){v.always(function(){c.unqueued--;i.queue(n,"fx").length||c.empty.fire()})}));for(f in t)if(y=t[f],gu.test(y)){if(delete t[f],w=w||"toggle"===y,y===(a?"hide":"show")){if("show"!==y||!e||void 0===e[f])continue;a=!0}p[f]=e&&e[f]||i.style(n,f)}if((h=!i.isEmptyObject(t))||!i.isEmptyObject(p)){k&&1===n.nodeType&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],null==(o=e&&e.display)&&(o=r.get(n,"display")),"none"===(l=i.css(n,"display"))&&(o?l=o:(ft([n],!0),o=n.style.display||o,l=i.css(n,"display"),ft([n]))),("inline"===l||"inline-block"===l&&null!=o)&&"none"===i.css(n,"float")&&(h||(v.done(function(){s.display=o}),null==o&&(l=s.display,o="none"===l?"":l)),s.display="inline-block"));u.overflow&&(s.overflow="hidden",v.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]}));h=!1;for(f in p)h||(e?"hidden"in e&&(a=e.hidden):e=r.access(n,"fxshow",{display:o}),w&&(e.hidden=!a),a&&ft([n],!0),v.done(function(){a||ft([n]);r.remove(n,"fxshow");for(f in p)i.style(n,f,p[f])})),h=rf(a?e[f]:0,f,v),f in e||(e[f]=h.start,a&&(h.end=h.start,h.start=0))}}function to(n,t){var r,f,e,u,o;for(r in n)if(f=y(r),e=t[f],u=n[r],Array.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),(o=i.cssHooks[f])&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function a(n,t,r){var o,s,h=0,v=a.prefilters.length,e=i.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var o=st||tf(),t=Math.max(0,f.startTime+f.duration-o),i=1-(t/f.duration||0),r=0,u=f.tweens.length;r<u;r++)f.tweens[r].run(i);return e.notifyWith(n,[f,i,t]),i<1&&u?t:(u||e.notifyWith(n,[f,1,0]),e.resolveWith(n,[f]),!1)},f=e.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:st||tf(),duration:r.duration,tweens:[],createTween:function(t,r){var u=i.Tween(n,f.opts,t,r,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(u),u},stop:function(t){var i=0,r=t?f.tweens.length:0;if(s)return this;for(s=!0;i<r;i++)f.tweens[i].run(1);return t?(e.notifyWith(n,[f,1,0]),e.resolveWith(n,[f,t])):e.rejectWith(n,[f,t]),this}}),c=f.props;for(to(c,f.opts.specialEasing);h<v;h++)if(o=a.prefilters[h].call(f,n,c,f.opts))return u(o.stop)&&(i._queueHooks(f.elem,f.opts.queue).stop=o.stop.bind(o)),o;return i.map(c,rf,f),u(f.opts.start)&&f.opts.start.call(n,f),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always),i.fx.timer(i.extend(l,{elem:n,anim:f,queue:f.opts.queue})),f}function g(n){return(n.match(l)||[]).join(" ")}function nt(n){return n.getAttribute&&n.getAttribute("class")||""}function ki(n){return Array.isArray(n)?n:"string"==typeof n?n.match(l)||[]:[]}function tr(n,t,r,u){var f;if(Array.isArray(t))i.each(t,function(t,i){r||io.test(n)?u(n,i):tr(n+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,u)});else if(r||"object"!==it(t))u(n,t);else for(f in t)tr(n+"["+f+"]",t[f],r,u)}function af(n){return function(t,i){"string"!=typeof t&&(i=t,t="*");var r,f=0,e=t.toLowerCase().match(l)||[];if(u(i))while(r=e[f++])"+"===r[0]?(r=r.slice(1)||"*",(n[r]=n[r]||[]).unshift(i)):(n[r]=n[r]||[]).push(i)}}function vf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===ir;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ur(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function lo(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}function ao(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(!(f=o[e+" "+u]||o["* "+u]))for(h in o)if((s=h.split(" "))[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){!0===f?f=o[h]:!0!==o[h]&&(u=s[0],c.unshift(s[1]));break}if(!0!==f)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(n){return{state:"parsererror",error:f?n:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}var k=[],f=n.document,bf=Object.getPrototypeOf,d=k.slice,er=k.concat,si=k.push,wt=k.indexOf,bt={},or=bt.toString,kt=bt.hasOwnProperty,sr=kt.toString,kf=sr.call(Object),e={},u=function(n){return"function"==typeof n&&"number"!=typeof n.nodeType},tt=function(n){return null!=n&&n===n.window},df={type:!0,src:!0,noModule:!0},i=function(n,t){return new i.fn.init(n,t)},gf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,b,ci,ar,vr,yr,pr,l,kr,gt,lt,ai,fu,st,fi,gu,nf,uf,ht,ff,ef,of,di,gi,yf,ct,fr,oi,pf,wf;i.fn=i.prototype={jquery:"3.3.1",constructor:i,length:0,toArray:function(){return d.call(this)},get:function(n){return null==n?d.call(this):n<0?this[n+this.length]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:si,sort:k.sort,splice:k.splice};i.extend=i.fn.extend=function(){var o,e,t,r,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for("boolean"==typeof n&&(c=n,n=arguments[f]||{},f++),"object"==typeof n||u(n)||(n={}),f===l&&(n=this,f--);f<l;f++)if(null!=(o=arguments[f]))for(e in o)t=n[e],n!==(r=o[e])&&(c&&r&&(i.isPlainObject(r)||(s=Array.isArray(r)))?(s?(s=!1,h=t&&Array.isArray(t)?t:[]):h=t&&i.isPlainObject(t)?t:{},n[e]=i.extend(c,h,r)):void 0!==r&&(n[e]=r));return n};i.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isPlainObject:function(n){var t,i;return!(!n||"[object Object]"!==or.call(n))&&(!(t=bf(n))||"function"==typeof(i=kt.call(t,"constructor")&&t.constructor)&&sr.call(i)===kf)},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},globalEval:function(n){hr(n)},each:function(n,t){var r,i=0;if(hi(n)){for(r=n.length;i<r;i++)if(!1===t.call(n[i],i,n[i]))break}else for(i in n)if(!1===t.call(n[i],i,n[i]))break;return n},trim:function(n){return null==n?"":(n+"").replace(gf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(hi(Object(n))?i.merge(r,"string"==typeof n?[n]:n):si.call(r,n)),r},inArray:function(n,t,i){return null==t?-1:wt.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var f,u=[],r=0,e=n.length,o=!i;r<e;r++)(f=!t(n[r],r))!==o&&u.push(n[r]);return u},map:function(n,t,i){var e,u,r=0,f=[];if(hi(n))for(e=n.length;r<e;r++)null!=(u=t(n[r],r,i))&&f.push(u);else for(r in n)null!=(u=t(n[r],r,i))&&f.push(u);return er.apply([],f)},guid:1,support:e});"function"==typeof Symbol&&(i.fn[Symbol.iterator]=k[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){bt["[object "+t+"]"]=t.toLowerCase()});b=function(n){function u(n,t,r,u){var s,p,l,a,w,d,g,y=t&&t.ownerDocument,v=t?t.nodeType:9;if(r=r||[],"string"!=typeof n||!n||1!==v&&9!==v&&11!==v)return r;if(!u&&((t?t.ownerDocument||t:c)!==i&&b(t),t=t||i,h)){if(11!==v&&(w=cr.exec(n)))if(s=w[1]){if(9===v){if(!(l=t.getElementById(s)))return r;if(l.id===s)return r.push(l),r}else if(y&&(l=y.getElementById(s))&&et(t,l)&&l.id===s)return r.push(l),r}else{if(w[2])return k.apply(r,t.getElementsByTagName(n)),r;if((s=w[3])&&e.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(s)),r}if(e.qsa&&!lt[n+" "]&&(!o||!o.test(n))){if(1!==v)y=t,g=n;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(vi,yi):t.setAttribute("id",a=f),p=(d=ft(n)).length;p--;)d[p]="#"+a+" "+yt(d[p]);g=d.join(",");y=ni.test(n)&&ri(t.parentNode)||t}if(g)try{return k.apply(r,y.querySelectorAll(g)),r}catch(n){}finally{a===f&&t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,r,u)}function ti(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function l(n){return n[f]=!0,n}function a(n){var t=i.createElement("fieldset");try{return!!n(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ii(n,i){for(var r=n.split("|"),u=r.length;u--;)t.attrHandle[r[u]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&n.sourceIndex-t.sourceIndex;if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function ar(n){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===n}}function vr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function bi(n){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===n:t.disabled===n:t.isDisabled===n||t.isDisabled!==!n&&lr(t)===n:t.disabled===n:"label"in t&&t.disabled===n}}function it(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ri(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function ki(){}function yt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function pt(n,t,i){var r=t.dir,u=t.next,e=u||r,o=i&&"parentNode"===e,s=di++;return t.first?function(t,i,u){while(t=t[r])if(1===t.nodeType||o)return n(t,i,u);return!1}:function(t,i,h){var c,l,a,y=[v,s];if(h){while(t=t[r])if((1===t.nodeType||o)&&n(t,i,h))return!0}else while(t=t[r])if(1===t.nodeType||o)if(a=t[f]||(t[f]={}),l=a[t.uniqueID]||(a[t.uniqueID]={}),u&&u===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[e])&&c[0]===v&&c[1]===s)return y[2]=c[2];if(l[e]=y,y[2]=n(t,i,h))return!0}return!1}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function yr(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function wt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;f<s;f++)(e=n[f])&&(i&&!i(e,r,u)||(o.push(e),h&&t.push(f)));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),l(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||yr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?b:wt(b,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=wt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=wt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):k.apply(e,h)})}function ei(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=pt(function(n){return n===o},c,!0),a=pt(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])e=[pt(ui(e),u)];else{if((u=t.filter[n[i].type].apply(null,n[i].matches))[f]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,i<r&&ei(n.slice(i,r)),r<s&&ei(n=n.slice(r)),r<s&&yt(n))}e.push(u)}return ui(e)}function pr(n,r){var f=r.length>0,e=n.length>0,o=function(o,s,c,l,a){var y,nt,d,g=0,p="0",tt=o&&[],w=[],it=ht,rt=o||e&&t.find.TAG("*",a),ut=v+=null==it?1:Math.random()||.1,ft=rt.length;for(a&&(ht=s===i||s||a);p!==ft&&null!=(y=rt[p]);p++){if(e&&y){for(nt=0,s||y.ownerDocument===i||(b(y),c=!h);d=n[nt++];)if(d(y,s||i,c)){l.push(y);break}a&&(v=ut)}f&&((y=!d&&y)&&g--,o&&tt.push(y))}if(g+=p,f&&p!==g){for(nt=0;d=r[nt++];)d(tt,w,s,c);if(o){if(g>0)while(p--)tt[p]||w[p]||(w[p]=nr.call(l));w=wt(w)}k.apply(l,w);a&&!o&&w.length>0&&g+r.length>1&&u.uniqueSort(l)}return a&&(v=ut,ht=it),tt};return f?l(o):o}var rt,e,t,st,oi,ft,bt,si,ht,w,ut,b,i,s,h,o,d,ct,et,f="sizzle"+1*new Date,c=n.document,v=0,di=0,hi=ti(),ci=ti(),lt=ti(),kt=function(n,t){return n===t&&(ut=!0),0},gi={}.hasOwnProperty,g=[],nr=g.pop,tr=g.push,k=g.push,li=g.slice,nt=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},dt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ai="\\["+r+"*("+tt+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+r+"*\\]",gt=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ai+")*)|.*)\\)|)",ir=new RegExp(r+"+","g"),at=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),rr=new RegExp("^"+r+"*,"+r+"*"),ur=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),fr=new RegExp("="+r+"*([^\\]'\"]*?)"+r+"*\\]","g"),er=new RegExp(gt),or=new RegExp("^"+tt+"$"),vt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+ai),PSEUDO:new RegExp("^"+gt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+dt+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,cr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ni=/[+~]/,y=new RegExp("\\\\([\\da-f]{1,6}"+r+"?|("+r+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},vi=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,yi=function(n,t){return t?"\0"===n?"�":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n},pi=function(){b()},lr=pt(function(n){return!0===n.disabled&&("form"in n||"label"in n)},{dir:"parentNode",next:"legend"});try{k.apply(g=li.call(c.childNodes),c.childNodes);g[c.childNodes.length].nodeType}catch(n){k={apply:g.length?function(n,t){tr.apply(n,li.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}e=u.support={};oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return!!t&&"HTML"!==t.nodeName};b=u.setDocument=function(n){var v,u,l=n?n.ownerDocument||n:c;return l!==i&&9===l.nodeType&&l.documentElement?(i=l,s=i.documentElement,h=!oi(i),c!==i&&(u=i.defaultView)&&u.top!==u&&(u.addEventListener?u.addEventListener("unload",pi,!1):u.attachEvent&&u.attachEvent("onunload",pi)),e.attributes=a(function(n){return n.className="i",!n.getAttribute("className")}),e.getElementsByTagName=a(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),e.getElementsByClassName=ot.test(i.getElementsByClassName),e.getById=a(function(n){return s.appendChild(n).id=f,!i.getElementsByName||!i.getElementsByName(f).length}),e.getById?(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var i=t.getElementById(n);return i?[i]:[]}}):(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var r,u,f,i=t.getElementById(n);if(i){if((r=i.getAttributeNode("id"))&&r.value===n)return[i];for(f=t.getElementsByName(n),u=0;i=f[u++];)if((r=i.getAttributeNode("id"))&&r.value===n)return[i]}return[]}}),t.find.TAG=e.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):e.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=e.getElementsByClassName&&function(n,t){if("undefined"!=typeof t.getElementsByClassName&&h)return t.getElementsByClassName(n)},d=[],o=[],(e.qsa=ot.test(i.querySelectorAll))&&(a(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\r\\' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&o.push("[*^$]="+r+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+r+"*(?:value|"+dt+")");n.querySelectorAll("[id~="+f+"-]").length||o.push("~=");n.querySelectorAll(":checked").length||o.push(":checked");n.querySelectorAll("a#"+f+"+*").length||o.push(".#.+[+~]")}),a(function(n){n.innerHTML="<a href='' disabled='disabled'><\/a><select disabled='disabled'><option/><\/select>";var t=i.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+r+"*[*^$|!~]?=");2!==n.querySelectorAll(":enabled").length&&o.push(":enabled",":disabled");s.appendChild(n).disabled=!0;2!==n.querySelectorAll(":disabled").length&&o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(e.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&a(function(n){e.disconnectedMatch=ct.call(n,"*");ct.call(n,"[s!='']:x");d.push("!=",gt)}),o=o.length&&new RegExp(o.join("|")),d=d.length&&new RegExp(d.join("|")),v=ot.test(s.compareDocumentPosition),et=v||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},kt=v?function(n,t){if(n===t)return ut=!0,0;var r=!n.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1)||!e.sortDetached&&t.compareDocumentPosition(n)===r?n===i||n.ownerDocument===c&&et(c,n)?-1:t===i||t.ownerDocument===c&&et(c,t)?1:w?nt(w,n)-nt(w,t):0:4&r?-1:1)}:function(n,t){if(n===t)return ut=!0,0;var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===i?-1:t===i?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===c?-1:e[u]===c?1:0},i):i};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==i&&b(n),t=t.replace(fr,"='$1']"),e.matchesSelector&&h&&!lt[t+" "]&&(!d||!d.test(t))&&(!o||!o.test(t)))try{var r=ct.call(n,t);if(r||e.disconnectedMatch||n.document&&11!==n.document.nodeType)return r}catch(n){}return u(t,i,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==i&&b(n),et(n,t)};u.attr=function(n,r){(n.ownerDocument||n)!==i&&b(n);var f=t.attrHandle[r.toLowerCase()],u=f&&gi.call(t.attrHandle,r.toLowerCase())?f(n,r,!h):void 0;return void 0!==u?u:e.attributes||!h?n.getAttribute(r):(u=n.getAttributeNode(r))&&u.specified?u.value:null};u.escape=function(n){return(n+"").replace(vi,yi)};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ut=!e.detectDuplicates,w=!e.sortStable&&n.slice(0),n.sort(kt),ut){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return w=null,n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};(t=u.selectors={cacheLength:50,createPseudo:l,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&er.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+r+")"+n+"("+r+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:!t||(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(ir," ")+" ").indexOf(i)>-1:"|="===t&&(f===i||f.slice(0,i.length+1)===i+"-"))}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var p,d,y,c,a,w,b=s!==o?"nextSibling":"previousSibling",k=t.parentNode,nt=e&&t.nodeName.toLowerCase(),g=!h&&!e,l=!1;if(k){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===nt:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?k.firstChild:k.lastChild],o&&g){for(l=(a=(p=(d=(y=(c=k)[f]||(c[f]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]||[])[0]===v&&p[1])&&p[2],c=a&&k.childNodes[a];c=++a&&c&&c[b]||(l=a=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){d[n]=[v,a,l];break}}else if(g&&(l=a=(p=(d=(y=(c=t)[f]||(c[f]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]||[])[0]===v&&p[1]),!1===l)while(c=++a&&c&&c[b]||(l=a=0)||w.pop())if((e?c.nodeName.toLowerCase()===nt:1===c.nodeType)&&++l&&(g&&((d=(y=c[f]||(c[f]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]=[v,l]),c===t))break;return(l-=u)===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[f]?r(i):r.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,t){for(var e,u=r(n,i),f=u.length;f--;)n[e=nt(n,u[f])]=!(t[e]=u[f])}):function(n){return r(n,0,e)}):r}},pseudos:{not:l(function(n){var t=[],r=[],i=bt(n.replace(at,"$1"));return i[f]?l(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:l(function(n){return function(t){return u(n,t).length>0}}),contains:l(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:l(function(n){return or.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===i.activeElement&&(!i.hasFocus||i.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:bi(!1),disabled:bi(!0),checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,!0===n.selected},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}}).pseudos.nth=t.pseudos.eq;for(rt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=ar(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=vr(rt);return ki.prototype=t.filters=t.pseudos,t.setFilters=new ki,ft=u.tokenize=function(n,i){var e,f,s,o,r,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){(!e||(f=rr.exec(r)))&&(f&&(r=r.slice(f[0].length)||r),h.push(s=[]));e=!1;(f=ur.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),r=r.slice(e.length));for(o in t.filter)(f=vt[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):ci(n,h).slice(0)},bt=u.compile=function(n,t){var r,u=[],e=[],i=lt[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)(i=ei(t[r]))[f]?u.push(i):e.push(i);(i=lt(n,pr(e,u))).selector=n}return i},si=u.select=function(n,i,r,u){var o,f,e,l,a,c="function"==typeof n&&n,s=!u&&ft(n=c.selector||n);if(r=r||[],1===s.length){if((f=s[0]=s[0].slice(0)).length>2&&"ID"===(e=f[0]).type&&9===i.nodeType&&h&&t.relative[f[1].type]){if(!(i=(t.find.ID(e.matches[0].replace(y,p),i)||[])[0]))return r;c&&(i=i.parentNode);n=n.slice(f.shift().value.length)}for(o=vt.needsContext.test(n)?0:f.length;o--;){if(e=f[o],t.relative[l=e.type])break;if((a=t.find[l])&&(u=a(e.matches[0].replace(y,p),ni.test(f[0].type)&&ri(i.parentNode)||i))){if(f.splice(o,1),!(n=u.length&&yt(f)))return k.apply(r,u),r;break}}}return(c||bt(n,s))(u,i,!h,r,!i||ni.test(n)&&ri(i.parentNode)||i),r},e.sortStable=f.split("").sort(kt).join("")===f,e.detectDuplicates=!!ut,b(),e.sortDetached=a(function(n){return 1&n.compareDocumentPosition(i.createElement("fieldset"))}),a(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ii("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),e.attributes&&a(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ii("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),a(function(n){return null==n.getAttribute("disabled")})||ii(dt,function(n,t,i){var r;if(!i)return!0===n[t]?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=b;i.expr=b.selectors;i.expr[":"]=i.expr.pseudos;i.uniqueSort=i.unique=b.uniqueSort;i.text=b.getText;i.isXMLDoc=b.isXML;i.contains=b.contains;i.escapeSelector=b.escape;var rt=function(n,t,r){for(var u=[],f=void 0!==r;(n=n[t])&&9!==n.nodeType;)if(1===n.nodeType){if(f&&i(n).is(r))break;u.push(n)}return u},cr=function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i},lr=i.expr.match.needsContext;ci=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r,u=this.length,f=this;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=this.pushStack([]),t=0;t<u;t++)i.find(n,f[t],r);return u>1?i.uniqueSort(r):r},filter:function(n){return this.pushStack(li(this,n||[],!1))},not:function(n){return this.pushStack(li(this,n||[],!0))},is:function(n){return!!li(this,"string"==typeof n&&lr.test(n)?i(n):n||[],!1).length}});vr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(i.fn.init=function(n,t,r){var e,o;if(!n)return this;if(r=r||ar,"string"==typeof n){if(!(e="<"===n[0]&&">"===n[n.length-1]&&n.length>=3?[null,n,null]:vr.exec(n))||!e[1]&&t)return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n);if(e[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(e[1],t&&t.nodeType?t.ownerDocument||t:f,!0)),ci.test(e[1])&&i.isPlainObject(t))for(e in t)u(this[e])?this[e](t[e]):this.attr(e,t[e]);return this}return(o=f.getElementById(e[2]))&&(this[0]=o,this.length=1),this}return n.nodeType?(this[0]=n,this.length=1,this):u(n)?void 0!==r.ready?r.ready(n):n(i):i.makeArray(n,this)}).prototype=i.fn;ar=i(f);yr=/^(?:parents|prev(?:Until|All))/;pr={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){var r,f=0,o=this.length,u=[],e="string"!=typeof n&&i(n);if(!lr.test(n))for(;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.uniqueSort(u):u)},index:function(n){return n?"string"==typeof n?wt.call(i(n),this[0]):wt.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return rt(n,"parentNode")},parentsUntil:function(n,t,i){return rt(n,"parentNode",i)},next:function(n){return wr(n,"nextSibling")},prev:function(n){return wr(n,"previousSibling")},nextAll:function(n){return rt(n,"nextSibling")},prevAll:function(n){return rt(n,"previousSibling")},nextUntil:function(n,t,i){return rt(n,"nextSibling",i)},prevUntil:function(n,t,i){return rt(n,"previousSibling",i)},siblings:function(n){return cr((n.parentNode||{}).firstChild,n)},children:function(n){return cr(n.firstChild)},contents:function(n){return v(n,"iframe")?n.contentDocument:(v(n,"template")&&(n=n.content||n),i.merge([],n.childNodes))}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(pr[n]||i.uniqueSort(f),yr.test(n)&&f.reverse()),this.pushStack(f)}});l=/[^\x20\t\r\n\f]+/g;i.Callbacks=function(n){n="string"==typeof n?ne(n):i.extend({},n);var f,r,c,e,t=[],s=[],o=-1,l=function(){for(e=e||n.once,c=f=!0;s.length;o=-1)for(r=s.shift();++o<t.length;)!1===t[o].apply(r[0],r[1])&&n.stopOnFalse&&(o=t.length,r=!1);n.memory||(r=!1);f=!1;e&&(t=r?[]:"")},h={add:function(){return t&&(r&&!f&&(o=t.length-1,s.push(r)),function f(r){i.each(r,function(i,r){u(r)?n.unique&&h.has(r)||t.push(r):r&&r.length&&"string"!==it(r)&&f(r)})}(arguments),r&&!f&&l()),this},remove:function(){return i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),u<=o&&o--}),this},has:function(n){return n?i.inArray(n,t)>-1:t.length>0},empty:function(){return t&&(t=[]),this},disable:function(){return e=s=[],t=r="",this},disabled:function(){return!t},lock:function(){return e=s=[],r||f||(t=r=""),this},locked:function(){return!!e},fireWith:function(n,t){return e||(t=[n,(t=t||[]).slice?t.slice():t],s.push(t),f||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(t){var f=[["notify","progress",i.Callbacks("memory"),i.Callbacks("memory"),2],["resolve","done",i.Callbacks("once memory"),i.Callbacks("once memory"),0,"resolved"],["reject","fail",i.Callbacks("once memory"),i.Callbacks("once memory"),1,"rejected"]],o="pending",e={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},"catch":function(n){return e.then(null,n)},pipe:function(){var n=arguments;return i.Deferred(function(t){i.each(f,function(i,f){var e=u(n[f[4]])&&n[f[4]];r[f[1]](function(){var n=e&&e.apply(this,arguments);n&&u(n.promise)?n.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[f[0]+"With"](this,e?[n]:arguments)})});n=null}).promise()},then:function(t,r,e){function s(t,r,f,e){return function(){var h=this,c=arguments,a=function(){var n,i;if(!(t<o)){if((n=f.apply(h,c))===r.promise())throw new TypeError("Thenable self-resolution");i=n&&("object"==typeof n||"function"==typeof n)&&n.then;u(i)?e?i.call(n,s(o,r,ut,e),s(o,r,dt,e)):(o++,i.call(n,s(o,r,ut,e),s(o,r,dt,e),s(o,r,ut,r.notifyWith))):(f!==ut&&(h=void 0,c=[n]),(e||r.resolveWith)(h,c))}},l=e?a:function(){try{a()}catch(n){i.Deferred.exceptionHook&&i.Deferred.exceptionHook(n,l.stackTrace);t+1>=o&&(f!==dt&&(h=void 0,c=[n]),r.rejectWith(h,c))}};t?l():(i.Deferred.getStackHook&&(l.stackTrace=i.Deferred.getStackHook()),n.setTimeout(l))}}var o=0;return i.Deferred(function(n){f[0][3].add(s(0,n,u(e)?e:ut,n.notifyWith));f[1][3].add(s(0,n,u(t)?t:ut));f[2][3].add(s(0,n,u(r)?r:dt))}).promise()},promise:function(n){return null!=n?i.extend(n,e):e}},r={};return i.each(f,function(n,t){var i=t[2],u=t[5];e[t[1]]=i.add;u&&i.add(function(){o=u},f[3-n][2].disable,f[3-n][3].disable,f[0][2].lock,f[0][3].lock);i.add(t[3].fire);r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this};r[t[0]+"With"]=i.fireWith}),e.promise(r),t&&t.call(r,r),r},when:function(n){var e=arguments.length,t=e,o=Array(t),f=d.call(arguments),r=i.Deferred(),s=function(n){return function(t){o[n]=this;f[n]=arguments.length>1?d.call(arguments):t;--e||r.resolveWith(o,f)}};if(e<=1&&(br(n,r.done(s(t)).resolve,r.reject,!e),"pending"===r.state()||u(f[t]&&f[t].then)))return r.then();while(t--)br(f[t],s(t),r.reject);return r.promise()}});kr=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;i.Deferred.exceptionHook=function(t,i){n.console&&n.console.warn&&t&&kr.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)};i.readyException=function(t){n.setTimeout(function(){throw t;})};gt=i.Deferred();i.fn.ready=function(n){return gt.then(n)["catch"](function(n){i.readyException(n)}),this};i.extend({isReady:!1,readyWait:1,ready:function(n){(!0===n?--i.readyWait:i.isReady)||(i.isReady=!0,!0!==n&&--i.readyWait>0||gt.resolveWith(f,[i]))}});i.ready.then=gt.then;"complete"===f.readyState||"loading"!==f.readyState&&!f.documentElement.doScroll?n.setTimeout(i.ready):(f.addEventListener("DOMContentLoaded",ni),n.addEventListener("load",ni));var p=function(n,t,r,f,e,o,s){var h=0,l=n.length,c=null==r;if("object"===it(r)){e=!0;for(h in r)p(n,t,h,r[h],!0,o,s)}else if(void 0!==f&&(e=!0,u(f)||(s=!0),c&&(s?(t.call(n,f),t=null):(c=t,t=function(n,t,r){return c.call(i(n),r)})),t))for(;h<l;h++)t(n[h],r,s?f:f.call(n[h],h,t(n[h],r)));return e?n:c?t.call(n):l?t(n[0],r):o},te=/^-ms-/,ie=/-([a-z])/g;lt=function(n){return 1===n.nodeType||9===n.nodeType||!+n.nodeType};at.uid=1;at.prototype={cache:function(n){var t=n[this.expando];return t||(t={},lt(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,i){var r,u=this.cache(n);if("string"==typeof t)u[y(t)]=i;else for(r in t)u[y(r)]=t[r];return u},get:function(n,t){return void 0===t?this.cache(n):n[this.expando]&&n[this.expando][y(t)]},access:function(n,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(n,t):(this.set(n,t,i),void 0!==i?i:t)},remove:function(n,t){var u,r=n[this.expando];if(void 0!==r){if(void 0!==t)for(u=(t=Array.isArray(t)?t.map(y):(t=y(t))in r?[t]:t.match(l)||[]).length;u--;)delete r[t[u]];(void 0===t||i.isEmptyObject(r))&&(n.nodeType?n[this.expando]=void 0:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return void 0!==t&&!i.isEmptyObject(t)}};var r=new at,o=new at,ue=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,fe=/[A-Z]/g;i.extend({hasData:function(n){return o.hasData(n)||r.hasData(n)},data:function(n,t,i){return o.access(n,t,i)},removeData:function(n,t){o.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var f,u,e,i=this[0],s=i&&i.attributes;if(void 0===n){if(this.length&&(e=o.get(i),1===i.nodeType&&!r.get(i,"hasDataAttrs"))){for(f=s.length;f--;)s[f]&&0===(u=s[f].name).indexOf("data-")&&(u=y(u.slice(5)),dr(i,u,e[u]));r.set(i,"hasDataAttrs",!0)}return e}return"object"==typeof n?this.each(function(){o.set(this,n)}):p(this,function(t){var r;if(i&&void 0===t){if(void 0!==(r=o.get(i,n))||void 0!==(r=dr(i,n)))return r}else this.each(function(){o.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){o.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||Array.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";s--;)(u=r.get(f[s],n+"queueHooks"))&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var gr=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,vt=new RegExp("^(?:([+-])=|)("+gr+")([a-z%]*)$","i"),w=["Top","Right","Bottom","Left"],ti=function(n,t){return"none"===(n=t||n).style.display||""===n.style.display&&i.contains(n.ownerDocument,n)&&"none"===i.css(n,"display")},nu=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};ai={};i.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){ti(this)?i(this).show():i(this).hide()})}});var iu=/^(?:checkbox|radio)$/i,ru=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,uu=/^$|^module$|\/(?:java|ecma)script/i,c={option:[1,"<select multiple='multiple'>","<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};c.optgroup=c.option;c.tbody=c.tfoot=c.colgroup=c.caption=c.thead;c.th=c.td;fu=/<|&#?\w+;/;!function(){var n=f.createDocumentFragment().appendChild(f.createElement("div")),t=f.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);e.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";e.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue}();var ii=f.documentElement,se=/^key/,he=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ou=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var p,v,k,y,w,h,s,c,o,b,d,a=r.get(n);if(a)for(u.handler&&(u=(p=u).handler,e=p.selector),e&&i.find.matchesSelector(ii,e),u.guid||(u.guid=i.guid++),(y=a.events)||(y=a.events={}),(v=a.handle)||(v=a.handle=function(t){if("undefined"!=typeof i&&i.event.triggered!==t.type)return i.event.dispatch.apply(n,arguments)}),w=(t=(t||"").match(l)||[""]).length;w--;)o=d=(k=ou.exec(t[w])||[])[1],b=(k[2]||"").split(".").sort(),o&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},h=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:b.join(".")},p),(c=y[o])||((c=y[o]=[]).delegateCount=0,s.setup&&!1!==s.setup.call(n,f,b,v)||n.addEventListener&&n.addEventListener(o,v)),s.add&&(s.add.call(n,h),h.handler.guid||(h.handler.guid=u.guid)),e?c.splice(c.delegateCount++,0,h):c.push(h),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var y,k,h,v,p,s,c,a,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(v=w.events)){for(p=(t=(t||"").match(l)||[""]).length;p--;)if(h=ou.exec(t[p])||[],o=d=h[1],b=(h[2]||"").split(".").sort(),o){for(c=i.event.special[o]||{},a=v[o=(f?c.delegateType:c.bindType)||o]||[],h=h[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=y=a.length;y--;)s=a[y],!e&&d!==s.origType||u&&u.guid!==s.guid||h&&!h.test(s.namespace)||f&&f!==s.selector&&("**"!==f||!s.selector)||(a.splice(y,1),s.selector&&a.delegateCount--,c.remove&&c.remove.call(n,s));k&&!a.length&&(c.teardown&&!1!==c.teardown.call(n,b,w.handle)||i.removeEvent(n,o,w.handle),delete v[o])}else for(o in v)i.event.remove(n,o+t[p],u,f,!0);i.isEmptyObject(v)&&r.remove(n,"handle events")}},dispatch:function(n){var t=i.event.fix(n),u,h,c,e,f,l,s=new Array(arguments.length),a=(r.get(this,"events")||{})[t.type]||[],o=i.event.special[t.type]||{};for(s[0]=t,u=1;u<arguments.length;u++)s[u]=arguments[u];if(t.delegateTarget=this,!o.preDispatch||!1!==o.preDispatch.call(this,t)){for(l=i.event.handlers.call(this,t,a),u=0;(e=l[u++])&&!t.isPropagationStopped();)for(t.currentTarget=e.elem,h=0;(f=e.handlers[h++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(f.namespace)||(t.handleObj=f,t.data=f.data,void 0!==(c=((i.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,s))&&!1===(t.result=c)&&(t.preventDefault(),t.stopPropagation()));return o.postDispatch&&o.postDispatch.call(this,t),t.result}},handlers:function(n,t){var f,h,u,e,o,c=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&!("click"===n.type&&n.button>=1))for(;r!==this;r=r.parentNode||this)if(1===r.nodeType&&("click"!==n.type||!0!==r.disabled)){for(e=[],o={},f=0;f<s;f++)void 0===o[u=(h=t[f]).selector+" "]&&(o[u]=h.needsContext?i(u,this).index(r)>-1:i.find(u,this,null,[r]).length),o[u]&&e.push(h);e.length&&c.push({elem:r,handlers:e})}return r=this,s<t.length&&c.push({elem:r,handlers:t.slice(s)}),c},addProp:function(n,t){Object.defineProperty(i.Event.prototype,n,{enumerable:!0,configurable:!0,get:u(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set:function(t){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(n){return n[i.expando]?n:new i.Event(n)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==su()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===su()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&v(this,"input"))return this.click(),!1},_default:function(n){return v(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&!1===n.returnValue?ri:et,this.target=n.target&&3===n.target.nodeType?n.target.parentNode:n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||Date.now();this[i.expando]=!0};i.Event.prototype={constructor:i.Event,isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=ri;n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=ri;n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=ri;n&&!this.isSimulated&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(n){var t=n.button;return null==n.which&&se.test(n.type)?null!=n.charCode?n.charCode:n.keyCode:!n.which&&void 0!==t&&he.test(n.type)?1&t?1:2&t?3:4&t?2:0:n.which}},i.event.addProp);i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return yi(this,n,t,i,r)},one:function(n,t,i,r){return yi(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=et),this.each(function(){i.event.remove(this,n,r,t)})}});var ce=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,le=/<script|<style|<link/i,ae=/checked\s*(?:[^=]|=\s*.checked.)/i,ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;i.extend({htmlPrefilter:function(n){return n.replace(ce,"<$1><\/$2>")},clone:function(n,t,r){var u,c,o,f,h=n.cloneNode(!0),l=i.contains(n.ownerDocument,n);if(!(e.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=s(h),u=0,c=(o=s(n)).length;u<c;u++)we(o[u],f[u]);if(t)if(r)for(o=o||s(n),f=f||s(h),u=0,c=o.length;u<c;u++)cu(o[u],f[u]);else cu(n,h);return(f=s(h,"script")).length>0&&vi(f,!l&&s(n,"script")),h},cleanData:function(n){for(var u,t,f,s=i.event.special,e=0;void 0!==(t=n[e]);e++)if(lt(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)s[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=void 0}t[o.expando]&&(t[o.expando]=void 0)}}});i.fn.extend({detach:function(n){return lu(this,n,!0)},remove:function(n){return lu(this,n)},text:function(n){return p(this,function(n){return void 0===n?i.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=n)})},null,n,arguments.length)},append:function(){return ot(this,arguments,function(n){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||hu(this,n).appendChild(n)})},prepend:function(){return ot(this,arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=hu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return ot(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return ot(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;null!=(n=this[t]);t++)1===n.nodeType&&(i.cleanData(s(n,!1)),n.textContent="");return this},clone:function(n,t){return n=null!=n&&n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return p(this,function(n){var t=this[0]||{},r=0,u=this.length;if(void 0===n&&1===t.nodeType)return t.innerHTML;if("string"==typeof n&&!le.test(n)&&!c[(ru.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)1===(t=this[r]||{}).nodeType&&(i.cleanData(s(t,!1)),t.innerHTML=n);t=0}catch(n){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return ot(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(s(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),si.apply(f,u.get());return this.pushStack(f)}});var pi=new RegExp("^("+gr+")(?!px)[a-z%]+$","i"),ui=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)},be=new RegExp(w.join("|"),"i");!function(){function r(){if(t){o.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";t.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";ii.appendChild(o).appendChild(t);var i=n.getComputedStyle(t);s="1%"!==i.top;a=12===u(i.marginLeft);t.style.right="60%";l=36===u(i.right);h=36===u(i.width);t.style.position="absolute";c=36===t.offsetWidth||"absolute";ii.removeChild(o);t=null}}function u(n){return Math.round(parseFloat(n))}var s,h,c,l,a,o=f.createElement("div"),t=f.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===t.style.backgroundClip,i.extend(e,{boxSizingReliable:function(){return r(),h},pixelBoxStyles:function(){return r(),l},pixelPosition:function(){return r(),s},reliableMarginLeft:function(){return r(),a},scrollboxSize:function(){return r(),c}}))}();var ke=/^(none|table(?!-c[ea]).+)/,vu=/^--/,de={position:"absolute",visibility:"hidden",display:"block"},yu={letterSpacing:"0",fontWeight:"400"},pu=["Webkit","Moz","ms"],wu=f.createElement("div").style;i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=yt(n,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(n,t,r,u){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var f,h,o,c=y(t),l=vu.test(t),s=n.style;if(l||(t=bu(c)),o=i.cssHooks[t]||i.cssHooks[c],void 0===r)return o&&"get"in o&&void 0!==(f=o.get(n,!1,u))?f:s[t];"string"==(h=typeof r)&&(f=vt.exec(r))&&f[1]&&(r=tu(n,t,f),h="number");null!=r&&r===r&&("number"===h&&(r+=f&&f[3]||(i.cssNumber[c]?"":"px")),e.clearCloneStyle||""!==r||0!==t.indexOf("background")||(s[t]="inherit"),o&&"set"in o&&void 0===(r=o.set(n,r,u))||(l?s.setProperty(t,r):s[t]=r))}},css:function(n,t,r,u){var f,e,o,s=y(t);return vu.test(t)||(t=bu(s)),(o=i.cssHooks[t]||i.cssHooks[s])&&"get"in o&&(f=o.get(n,!0,r)),void 0===f&&(f=yt(n,t,u)),"normal"===f&&t in yu&&(f=yu[t]),""===r||r?(e=parseFloat(f),!0===r||isFinite(e)?e||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return!ke.test(i.css(n,"display"))||n.getClientRects().length&&n.getBoundingClientRect().width?du(n,t,u):nu(n,de,function(){return du(n,t,u)})},set:function(n,r,u){var s,f=ui(n),h="border-box"===i.css(n,"boxSizing",!1,f),o=u&&wi(n,t,u,h,f);return h&&e.scrollboxSize()===f.position&&(o-=Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(f[t])-wi(n,t,"border",!1,f)-.5)),o&&(s=vt.exec(r))&&"px"!==(s[3]||"px")&&(n.style[t]=r,r=i.css(n,t)),ku(n,r,o)}}});i.cssHooks.marginLeft=au(e.reliableMarginLeft,function(n,t){if(t)return(parseFloat(yt(n,"marginLeft"))||n.getBoundingClientRect().left-nu(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];r<4;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};"margin"!==n&&(i.cssHooks[n+t].set=ku)});i.fn.extend({css:function(n,t){return p(this,function(n,t,r){var f,e,o={},u=0;if(Array.isArray(t)){for(f=ui(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)}});i.Tween=h;h.prototype={constructor:h,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=h.propHooks[this.prop];return n&&n.get?n.get(this):h.propHooks._default.get(this)},run:function(n){var t,r=h.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):h.propHooks._default.set(this),this}};h.prototype.init.prototype=h.prototype;h.propHooks={_default:{get:function(n){var t;return 1!==n.elem.nodeType||null!=n.elem[n.prop]&&null==n.elem.style[n.prop]?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""))&&"auto"!==t?t:0},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):1!==n.elem.nodeType||null==n.elem.style[i.cssProps[n.prop]]&&!i.cssHooks[n.prop]?n.elem[n.prop]=n.now:i.style(n.elem,n.prop,n.now+n.unit)}}};h.propHooks.scrollTop=h.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=h.prototype.init;i.fx.step={};gu=/^(?:toggle|show|hide)$/;nf=/queueHooks$/;i.Animation=i.extend(a,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return tu(i.elem,n,vt.exec(t),i),i}]},tweener:function(n,t){u(n)?(t=n,n=["*"]):n=n.match(l);for(var i,r=0,f=n.length;r<f;r++)i=n[r],a.tweeners[i]=a.tweeners[i]||[],a.tweeners[i].unshift(t)},prefilters:[no],prefilter:function(n,t){t?a.prefilters.unshift(n):a.prefilters.push(n)}});i.speed=function(n,t,r){var f=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||u(n)&&n,duration:n,easing:r&&t||t&&!u(t)&&t};return i.fx.off?f.duration=0:"number"!=typeof f.duration&&(f.duration=f.duration in i.fx.speeds?i.fx.speeds[f.duration]:i.fx.speeds._default),null!=f.queue&&!0!==f.queue||(f.queue="fx"),f.old=f.complete,f.complete=function(){u(f.old)&&f.old.call(this);f.queue&&i.dequeue(this,f.queue)},f};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ti).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=a(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||!1===o.queue?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=t,t=n,n=void 0),t&&!1!==n&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=null!=n&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&nf.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem!==this||null!=n&&o[t].queue!==n||(o[t].anim.stop(u),s=!1,o.splice(t,1));!s&&u||i.dequeue(this,n)})},finish:function(n){return!1!==n&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ei(t,!0),n,i,u)}});i.each({slideDown:ei("show"),slideUp:ei("hide"),slideToggle:ei("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(st=Date.now();n<t.length;n++)(r=t[n])()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();st=void 0};i.fx.timer=function(n){i.timers.push(n);i.fx.start()};i.fx.interval=13;i.fx.start=function(){fi||(fi=!0,bi())};i.fx.stop=function(){fi=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx?i.fx.speeds[t]||t:t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})},function(){var n=f.createElement("input"),t=f.createElement("select").appendChild(f.createElement("option"));n.type="checkbox";e.checkOn=""!==n.value;e.optSelected=t.selected;(n=f.createElement("input")).value="t";n.type="radio";e.radioValue="t"===n.value}();ht=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return p(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var f,u,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return"undefined"==typeof n.getAttribute?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(u=i.attrHooks[t.toLowerCase()]||(i.expr.match.bool.test(t)?uf:void 0)),void 0!==r?null===r?void i.removeAttr(n,t):u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):u&&"get"in u&&null!==(f=u.get(n,t))?f:null==(f=i.find.attr(n,t))?void 0:f)},attrHooks:{type:{set:function(n,t){if(!e.radioValue&&"radio"===t&&v(n,"input")){var i=n.value;return n.setAttribute("type",t),i&&(n.value=i),t}}}},removeAttr:function(n,t){var i,u=0,r=t&&t.match(l);if(r&&1===n.nodeType)while(i=r[u++])n.removeAttribute(i)}});uf={set:function(n,t,r){return!1===t?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=ht[t]||i.find.attr;ht[t]=function(n,t,i){var f,e,u=t.toLowerCase();return i||(e=ht[u],ht[u]=f,f=null!=r(n,t,i)?u:null,ht[u]=e),f}});ff=/^(?:input|select|textarea|button)$/i;ef=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return p(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return 1===e&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ff.test(n.nodeName)||ef.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});e.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});i.fn.extend({addClass:function(n){var o,t,r,f,e,s,h,c=0;if(u(n))return this.each(function(t){i(this).addClass(n.call(this,t,nt(this)))});if((o=ki(n)).length)while(t=this[c++])if(f=nt(t),r=1===t.nodeType&&" "+g(f)+" "){for(s=0;e=o[s++];)r.indexOf(" "+e+" ")<0&&(r+=e+" ");f!==(h=g(r))&&t.setAttribute("class",h)}return this},removeClass:function(n){var o,r,t,f,e,s,h,c=0;if(u(n))return this.each(function(t){i(this).removeClass(n.call(this,t,nt(this)))});if(!arguments.length)return this.attr("class","");if((o=ki(n)).length)while(r=this[c++])if(f=nt(r),t=1===r.nodeType&&" "+g(f)+" "){for(s=0;e=o[s++];)while(t.indexOf(" "+e+" ")>-1)t=t.replace(" "+e+" "," ");f!==(h=g(t))&&r.setAttribute("class",h)}return this},toggleClass:function(n,t){var f=typeof n,e="string"===f||Array.isArray(n);return"boolean"==typeof t&&e?t?this.addClass(n):this.removeClass(n):u(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,nt(this),t),t)}):this.each(function(){var t,o,u,s;if(e)for(o=0,u=i(this),s=ki(n);t=s[o++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else void 0!==n&&"boolean"!==f||((t=nt(this))&&r.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===n?"":r.get(this,"__className__")||""))})},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(1===t.nodeType&&(" "+g(nt(t))+" ").indexOf(i)>-1)return!0;return!1}});of=/\r/g;i.fn.extend({val:function(n){var t,r,e,f=this[0];return arguments.length?(e=u(n),this.each(function(r){var u;1===this.nodeType&&(null==(u=e?n.call(this,r,i(this).val()):n)?u="":"number"==typeof u?u+="":Array.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),(t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):f?(t=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(f,"value"))?r:"string"==typeof(r=f.value)?r.replace(of,""):null==r?"":r:void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:g(i.text(n))}},select:{get:function(n){for(var e,t,o=n.options,u=n.selectedIndex,f="select-one"===n.type,s=f?null:[],h=f?u+1:o.length,r=u<0?h:f?u:0;r<h;r++)if(((t=o[r]).selected||r===u)&&!t.disabled&&(!t.parentNode.disabled||!v(t.parentNode,"optgroup"))){if(e=i(t).val(),f)return e;s.push(e)}return s},set:function(n,t){for(var r,u,f=n.options,e=i.makeArray(t),o=f.length;o--;)((u=f[o]).selected=i.inArray(i.valHooks.option.get(u),e)>-1)&&(r=!0);return r||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(Array.isArray(t))return n.checked=i.inArray(i(n).val(),t)>-1}};e.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});e.focusin="onfocusin"in n;di=/^(?:focusinfocus|focusoutblur)$/;gi=function(n){n.stopPropagation()};i.extend(i.event,{trigger:function(t,e,o,s){var k,c,l,d,v,y,a,p,w=[o||f],h=kt.call(t,"type")?t.type:t,b=kt.call(t,"namespace")?t.namespace.split("."):[];if(c=p=l=o=o||f,3!==o.nodeType&&8!==o.nodeType&&!di.test(h+i.event.triggered)&&(h.indexOf(".")>-1&&(h=(b=h.split(".")).shift(),b.sort()),v=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),e=null==e?[t]:i.makeArray(e,[t]),a=i.event.special[h]||{},s||!a.trigger||!1!==a.trigger.apply(o,e))){if(!s&&!a.noBubble&&!tt(o)){for(d=a.delegateType||h,di.test(d+h)||(c=c.parentNode);c;c=c.parentNode)w.push(c),l=c;l===(o.ownerDocument||f)&&w.push(l.defaultView||l.parentWindow||n)}for(k=0;(c=w[k++])&&!t.isPropagationStopped();)p=c,t.type=k>1?d:a.bindType||h,(y=(r.get(c,"events")||{})[t.type]&&r.get(c,"handle"))&&y.apply(c,e),(y=v&&c[v])&&y.apply&&lt(c)&&(t.result=y.apply(c,e),!1===t.result&&t.preventDefault());return t.type=h,s||t.isDefaultPrevented()||a._default&&!1!==a._default.apply(w.pop(),e)||!lt(o)||v&&u(o[h])&&!tt(o)&&((l=o[v])&&(o[v]=null),i.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,gi),o[h](),t.isPropagationStopped()&&p.removeEventListener(h,gi),i.event.triggered=void 0,l&&(o[v]=l)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t)}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});e.focusin||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n))};i.event.special[t]={setup:function(){var i=this.ownerDocument||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});var pt=n.location,sf=Date.now(),nr=/\?/;i.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(n){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var io=/\[\]$/,hf=/\r?\n/g,ro=/^(?:submit|button|image|reset|file)$/i,uo=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,f=[],e=function(n,t){var i=u(t)?t():t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(r in n)tr(r,n[r],t,e);return f.join("&")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&uo.test(this.nodeName)&&!ro.test(n)&&(this.checked||!iu.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:Array.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(hf,"\r\n")}}):{name:t.name,value:r.replace(hf,"\r\n")}}).get()}});var fo=/%20/g,eo=/#.*$/,oo=/([?&])_=[^&]*/,so=/^(.*?):[ \t]*([^\r\n]*)$/gm,ho=/^(?:GET|HEAD)$/,co=/^\/\//,cf={},ir={},lf="*/".concat("*"),rr=f.createElement("a");return rr.href=pt.href,i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(pt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":lf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ur(ur(n,i.ajaxSettings),t):ur(i.ajaxSettings,n)},ajaxPrefilter:af(cf),ajaxTransport:af(ir),ajax:function(t,r){function b(t,r,f,c){var v,rt,b,p,g,l=r;s||(s=!0,d&&n.clearTimeout(d),a=void 0,k=c||"",e.readyState=t>0?4:0,v=t>=200&&t<300||304===t,f&&(p=lo(u,e,f)),p=ao(u,p,e,v),v?(u.ifModified&&((g=e.getResponseHeader("Last-Modified"))&&(i.lastModified[o]=g),(g=e.getResponseHeader("etag"))&&(i.etag[o]=g)),204===t||"HEAD"===u.type?l="nocontent":304===t?l="notmodified":(l=p.state,rt=p.data,v=!(b=p.error))):(b=l,!t&&l||(l="error",t<0&&(t=0))),e.status=t,e.statusText=(r||l)+"",v?tt.resolveWith(h,[rt,l,e]):tt.rejectWith(h,[e,l,b]),e.statusCode(w),w=void 0,y&&nt.trigger(v?"ajaxSuccess":"ajaxError",[e,u,v?rt:b]),it.fireWith(h,[e,l]),y&&(nt.trigger("ajaxComplete",[e,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof t&&(r=t,t=void 0);r=r||{};var a,o,k,v,d,c,s,y,g,p,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),w=u.statusCode||{},rt={},ut={},ft="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s){if(!v)for(v={};t=so.exec(k);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return s?k:null},setRequestHeader:function(n,t){return null==s&&(n=ut[n.toLowerCase()]=ut[n.toLowerCase()]||n,rt[n]=t),this},overrideMimeType:function(n){return null==s&&(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(s)e.always(n[e.status]);else for(t in n)w[t]=[w[t],n[t]];return this},abort:function(n){var t=n||ft;return a&&a.abort(t),b(0,t),this}};if(tt.promise(e),u.url=((t||u.url||pt.href)+"").replace(co,pt.protocol+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=(u.dataType||"*").toLowerCase().match(l)||[""],null==u.crossDomain){c=f.createElement("a");try{c.href=u.url;c.href=c.href;u.crossDomain=rr.protocol+"//"+rr.host!=c.protocol+"//"+c.host}catch(n){u.crossDomain=!0}}if(u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),vf(cf,u,r,e),s)return e;(y=i.event&&u.global)&&0==i.active++&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!ho.test(u.type);o=u.url.replace(eo,"");u.hasContent?u.data&&u.processData&&0===(u.contentType||"").indexOf("application/x-www-form-urlencoded")&&(u.data=u.data.replace(fo,"+")):(p=u.url.slice(o.length),u.data&&(u.processData||"string"==typeof u.data)&&(o+=(nr.test(o)?"&":"?")+u.data,delete u.data),!1===u.cache&&(o=o.replace(oo,"$1"),p=(nr.test(o)?"&":"?")+"_="+sf+++p),u.url=o+p);u.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o]));(u.data&&u.hasContent&&!1!==u.contentType||r.contentType)&&e.setRequestHeader("Content-Type",u.contentType);e.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+lf+"; q=0.01":""):u.accepts["*"]);for(g in u.headers)e.setRequestHeader(g,u.headers[g]);if(u.beforeSend&&(!1===u.beforeSend.call(h,e,u)||s))return e.abort();if(ft="abort",it.add(u.complete),e.done(u.success),e.fail(u.error),a=vf(ir,u,r,e)){if(e.readyState=1,y&&nt.trigger("ajaxSend",[e,u]),s)return e;u.async&&u.timeout>0&&(d=n.setTimeout(function(){e.abort("timeout")},u.timeout));try{s=!1;a.send(rt,b)}catch(n){if(s)throw n;b(-1,n)}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}}),i.each(["get","post"],function(n,t){i[t]=function(n,r,f,e){return u(r)&&(e=e||f,f=r,r=void 0),i.ajax(i.extend({url:n,type:t,dataType:e,data:r,success:f},i.isPlainObject(n)&&n))}}),i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},i.fn.extend({wrapAll:function(n){var t;return this[0]&&(u(n)&&(n=n.call(this[0])),t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(n){return u(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=u(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(n){return this.parent(n).not("body").each(function(){i(this).replaceWith(this.childNodes)}),this}}),i.expr.pseudos.hidden=function(n){return!i.expr.pseudos.visible(n)},i.expr.pseudos.visible=function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)},i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(n){}},yf={0:200,1223:204},ct=i.ajaxSettings.xhr(),e.cors=!!ct&&"withCredentials"in ct,e.ajax=ct=!!ct,i.ajaxTransport(function(t){var i,r;if(e.cors||ct&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType);t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest");for(o in u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.ontimeout=e.onreadystatechange=null,"abort"===n?e.abort():"error"===n?"number"!=typeof e.status?f(0,"error"):f(e.status,e.statusText):f(yf[e.status]||e.status,e.statusText,"text"!==(e.responseType||"text")||"string"!=typeof e.responseText?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=e.ontimeout=i("error");void 0!==e.onabort?e.onabort=r:e.onreadystatechange=function(){4===e.readyState&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(n){if(i)throw n;}},abort:function(){i&&i()}}}),i.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain){var r,t;return{send:function(u,e){r=i("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e("error"===n.type?404:200,n.type)});f.head.appendChild(r[0])},abort:function(){t&&t()}}}}),fr=[],oi=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=fr.pop()||i.expando+"_"+sf++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,f){var e,o,s,h=!1!==t.jsonp&&(oi.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&oi.test(t.data)&&"data");if(h||"jsonp"===t.dataTypes[0])return e=t.jsonpCallback=u(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,h?t[h]=t[h].replace(oi,"$1"+e):!1!==t.jsonp&&(t.url+=(nr.test(t.url)?"&":"?")+t.jsonp+"="+e),t.converters["script json"]=function(){return s||i.error(e+" was not called"),s[0]},t.dataTypes[0]="json",o=n[e],n[e]=function(){s=arguments},f.always(function(){void 0===o?i(n).removeProp(e):n[e]=o;t[e]&&(t.jsonpCallback=r.jsonpCallback,fr.push(e));s&&u(o)&&o(s[0]);s=o=void 0}),"script"}),e.createHTMLDocument=function(){var n=f.implementation.createHTMLDocument("").body;return n.innerHTML="<form><\/form><form><\/form>",2===n.childNodes.length}(),i.parseHTML=function(n,t,r){if("string"!=typeof n)return[];"boolean"==typeof t&&(r=t,t=!1);var s,u,o;return t||(e.createHTMLDocument?((s=(t=f.implementation.createHTMLDocument("")).createElement("base")).href=f.location.href,t.head.appendChild(s)):t=f),u=ci.exec(n),o=!r&&[],u?[t.createElement(u[1])]:(u=eu([n],t,o),o&&o.length&&i(o).remove(),i.merge([],u.childNodes))},i.fn.load=function(n,t,r){var f,s,h,e=this,o=n.indexOf(" ");return o>-1&&(f=g(n.slice(o)),n=n.slice(0,o)),u(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),e.length>0&&i.ajax({url:n,type:s||"GET",dataType:"html",data:t}).done(function(n){h=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).always(r&&function(n,t){e.each(function(){r.apply(this,h||[n.responseText,t,n])})}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.pseudos.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var v,o,s,h,f,c,y,l=i.css(n,"position"),a=i(n),e={};"static"===l&&(n.style.position="relative");f=a.offset();s=i.css(n,"top");c=i.css(n,"left");(y=("absolute"===l||"fixed"===l)&&(s+c).indexOf("auto")>-1)?(h=(v=a.position()).top,o=v.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);u(t)&&(t=t.call(n,r,i.extend({},f)));null!=t.top&&(e.top=t.top-f.top+h);null!=t.left&&(e.left=t.left-f.left+o);"using"in t?t.using.call(n,e):a.css(e)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,u,t=this[0];if(t)return t.getClientRects().length?(r=t.getBoundingClientRect(),u=t.ownerDocument.defaultView,{top:r.top+u.pageYOffset,left:r.left+u.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var n,r,u,t=this[0],f={top:0,left:0};if("fixed"===i.css(t,"position"))r=t.getBoundingClientRect();else{for(r=this.offset(),u=t.ownerDocument,n=t.offsetParent||u.documentElement;n&&(n===u.body||n===u.documentElement)&&"static"===i.css(n,"position");)n=n.parentNode;n&&n!==t&&1===n.nodeType&&((f=i(n).offset()).top+=i.css(n,"borderTopWidth",!0),f.left+=i.css(n,"borderLeftWidth",!0))}return{top:r.top-f.top-i.css(t,"marginTop",!0),left:r.left-f.left-i.css(t,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&"static"===i.css(n,"position");)n=n.offsetParent;return n||ii})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(i){return p(this,function(n,i,u){var f;if(tt(n)?f=n:9===n.nodeType&&(f=n.defaultView),void 0===u)return f?f[t]:n[i];f?f.scrollTo(r?f.pageXOffset:u,r?u:f.pageYOffset):n[i]=u},n,i,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=au(e.pixelPosition,function(n,r){if(r)return r=yt(n,t),pi.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(f,e){var o=arguments.length&&(r||"boolean"!=typeof f),s=r||(!0===f||!0===e?"margin":"border");return p(this,function(t,r,f){var e;return tt(t)?0===u.indexOf("outer")?t["inner"+n]:t.document.documentElement["client"+n]:9===t.nodeType?(e=t.documentElement,Math.max(t.body["scroll"+n],e["scroll"+n],t.body["offset"+n],e["offset"+n],e["client"+n])):void 0===f?i.css(t,r,s):i.style(t,r,f,s)},t,o?f:void 0,o)}})}),i.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}}),i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}}),i.proxy=function(n,t){var f,e,r;if("string"==typeof t&&(f=n[t],t=n,n=f),u(n))return e=d.call(arguments,2),r=function(){return n.apply(t||this,e.concat(d.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r},i.holdReady=function(n){n?i.readyWait++:i.ready(!0)},i.isArray=Array.isArray,i.parseJSON=JSON.parse,i.nodeName=v,i.isFunction=u,i.isWindow=tt,i.camelCase=y,i.type=it,i.now=Date.now,i.isNumeric=function(n){var t=i.type(n);return("number"===t||"string"===t)&&!isNaN(n-parseFloat(n))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),pf=n.jQuery,wf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=wf),t&&n.jQuery===i&&(n.jQuery=pf),i},t||(n.jQuery=n.$=i),i}),function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()}(this,function(){"use strict";function ut(n){return n&&"[object Function]"==={}.toString.call(n)}function u(n,t){if(1!==n.nodeType)return[];var i=getComputedStyle(n,null);return t?i[t]:i}function p(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function c(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=u(n),i=t.overflow,r=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+r)?n:c(p(n))}function f(n){var r,t,i;if(!n)return document.documentElement;for(r=s(10)?document.body:null,t=n.offsetParent;t===r&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===u(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function fi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function w(n){return null===n.parentNode?n:w(n.parentNode)}function a(n,t){var i,u;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,r=document.createRange();return(r.setStart(o,0),r.setEnd(s,0),i=r.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?fi(i)?i:f(i):(u=w(n),u.host?a(u.host,t):a(n,w(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function ei(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function ft(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"],10)+parseFloat(n["border"+r+"Width"],10)}function et(n,t,r,u){return i(t["offset"+n],t["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],s(10)?r["offset"+n]+u["margin"+("Height"===n?"Top":"Left")]+u["margin"+("Height"===n?"Bottom":"Right")]:0)}function ot(){var t=document.body,n=document.documentElement,i=s(10)&&getComputedStyle(n);return{height:et("Height",t,n,i),width:et("Width",t,n,i)}}function r(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(n){var t={},f,o,l;try{s(10)?(t=n.getBoundingClientRect(),f=e(n,"top"),o=e(n,"left"),t.top+=f,t.left+=o,t.bottom+=f,t.right+=o):t=n.getBoundingClientRect()}catch(u){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?ot():{},v=a.width||n.clientWidth||i.right-i.left,y=a.height||n.clientHeight||i.bottom-i.top,h=n.offsetWidth-v,c=n.offsetHeight-y;return(h||c)&&(l=u(n),h-=ft(l,"x"),c-=ft(l,"y"),i.width-=h,i.height-=c),r(i)}function k(n,t){var w=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=s(10),d="HTML"===t.nodeName,o=b(n),e=b(t),v=c(n),h=u(t),y=parseFloat(h.borderTopWidth,10),p=parseFloat(h.borderLeftWidth,10),f,l,a;return w&&"HTML"===t.nodeName&&(e.top=i(e.top,0),e.left=i(e.left,0)),f=r({top:o.top-e.top-y,left:o.left-e.left-p,width:o.width,height:o.height}),(f.marginTop=0,f.marginLeft=0,!k&&d)&&(l=parseFloat(h.marginTop,10),a=parseFloat(h.marginLeft,10),f.top-=y-l,f.bottom-=y-l,f.left-=p-a,f.right-=p-a,f.marginTop=l,f.marginLeft=a),(k&&!w?t.contains(v):t===v&&"BODY"!==v.nodeName)&&(f=ei(f,t)),f}function oi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=n.ownerDocument.documentElement,u=k(n,t),o=i(t.clientWidth,window.innerWidth||0),s=i(t.clientHeight,window.innerHeight||0),h=f?0:e(t),c=f?0:e(t,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return r(l)}function st(n){var t=n.nodeName;return"BODY"===t||"HTML"===t?!1:"fixed"===u(n,"position")||st(p(n))}function ht(n){if(!n||!n.parentElement||s())return document.documentElement;for(var t=n.parentElement;t&&"none"===u(t,"transform");)t=t.parentElement;return t||document.documentElement}function d(n,t,i,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},s=o?ht(n):a(n,t),e,f;if("viewport"===r)u=oi(s,o);else if("scrollParent"===r?(e=c(p(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=k(e,s,o),"HTML"!==e.nodeName||st(s))u=f;else{var h=ot(),l=h.height,v=h.width;u.top+=f.top-f.marginTop;u.bottom=l+f.top;u.left+=f.left-f.marginLeft;u.right=v+f.left}return u.left+=i,u.top+=i,u.right-=i,u.bottom-=i,u}function si(n){var t=n.width,i=n.height;return t*i}function ct(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=d(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:si(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function lt(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?ht(t):a(t,i);return k(i,u,r)}function at(n){var t=getComputedStyle(n),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:n.offsetWidth+r,height:n.offsetHeight+i}}function v(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function vt(n,t,i){i=i.split("-")[0];var r=at(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[v(f)],e}function l(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function hi(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=l(n,function(n){return n[t]===i});return n.indexOf(r)}function yt(n,t,i){var u=void 0===i?n:n.slice(0,hi(n,"name",i));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=n["function"]||n.fn;n.enabled&&ut(i)&&(t.offsets.popper=r(t.offsets.popper),t.offsets.reference=r(t.offsets.reference),t=i(t,n))}),t}function ci(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=lt(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=ct(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=vt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=yt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function pt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function wt(n){for(var i,r,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<u.length;t++)if(i=u[t],r=i?""+i+f:n,"undefined"!=typeof document.body.style[r])return r;return null}function li(){return this.state.isDestroyed=!0,pt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[wt("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function bt(n){var t=n.ownerDocument;return t?t.defaultView:window}function kt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||kt(c(u.parentNode),t,i,r);r.push(u)}function ai(n,t,i,r){i.updateBound=r;bt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=c(n);return kt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function vi(){this.state.eventsEnabled||(this.state=ai(this.reference,this.options,this.state,this.scheduleUpdate))}function yi(n,t){return bt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function pi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=yi(this.reference,this.state))}function g(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function nt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&g(t[i])&&(r="px");n.style[i]=t[i]+r})}function wi(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function dt(n,t,i){var u=l(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function bi(n){return"end"===n?"start":"start"===n?"end":n}function gt(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=it.indexOf(n),i=it.slice(t+1).concat(it.slice(0,t));return r?i.reverse():i}function ki(n,t,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=r(s),c[t]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?i(document.documentElement.clientHeight,window.innerHeight||0):i(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function di(n,t,i,r){var s=[0,0],h=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(l(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!h:h)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return ki(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){g(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function gi(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=g(+f)?[+f,0]:di(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}for(var ni=Math.min,o=Math.floor,i=Math.max,ti="undefined"!=typeof window&&"undefined"!=typeof document,ii=["Edge","Trident","Firefox"],ri=0,tt=0;tt<ii.length;tt+=1)if(ti&&0<=navigator.userAgent.indexOf(ii[tt])){ri=1;break}var nr=ti&&window.Promise,tr=nr?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},ri))}},t={},s=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all";return(n=n.toString(),t.hasOwnProperty(n))?t[n]:("11"===n?t[n]=-1!==navigator.userAgent.indexOf("Trident"):"10"===n?t[n]=-1!==navigator.appVersion.indexOf("MSIE 10"):"all"===n?t[n]=-1!==navigator.userAgent.indexOf("Trident")||-1!==navigator.userAgent.indexOf("MSIE"):void 0,t.all=t.all||Object.keys(t).some(function(n){return t[n]}),t[n])},ir=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},rr=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),h=function(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,r,i=1;i<arguments.length;i++)for(r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},ui=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],it=ui.slice(3),rt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},y=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;ir(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=tr(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&ut(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return rr(t,[{key:"update",value:function(){return ci.call(this)}},{key:"destroy",value:function(){return li.call(this)}},{key:"enableEventListeners",value:function(){return vi.call(this)}},{key:"disableEventListeners",value:function(){return pi.call(this)}}]),t}();return y.Utils=("undefined"==typeof window?global:window).PopperUtils,y.placements=ui,y.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,o=e.popper,s=-1!==["bottom","top"].indexOf(l),i=s?"left":"top",c=s?"width":"height",a={start:h({},i,r[i]),end:h({},i,r[i]+r[c]-o[c])};t.offsets.popper=n({},o,a[f])}return t}},offset:{order:200,enabled:!0,fn:gi,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,r){var o=r.boundariesElement||f(t.instance.popper),e;t.instance.reference===o&&(o=f(o));e=d(t.instance.popper,t.instance.reference,r.padding,o,t.positionFixed);r.boundaries=e;var s=r.priority,u=t.offsets.popper,c={primary:function(n){var t=u[n];return u[n]<e[n]&&!r.escapeWithReference&&(t=i(u[n],e[n])),h({},n,t)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>e[n]&&!r.escapeWithReference&&(i=ni(u[t],e[n]-("right"===n?u.width:u.height))),h({},t,i)}};return s.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,c[i](t))}),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var s=n.offsets,u=s.popper,i=s.reference,h=n.placement.split("-")[0],r=o,f=-1!==["top","bottom"].indexOf(h),e=f?"right":"bottom",t=f?"left":"top",c=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[c]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,t){var l,e;if(!dt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=t.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,o=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",s=at(e)[y];o[v]-s<c[f]&&(n.offsets.popper[f]-=c[f]-(o[v]-s));o[f]+s>c[v]&&(n.offsets.popper[f]+=o[f]+s-c[v]);n.offsets.popper=r(n.offsets.popper);var nt=o[f]+o[y]/2-s/2,k=u(n.instance.popper),tt=parseFloat(k["margin"+p],10),it=parseFloat(k["border"+p+"Width"],10),w=nt-n.offsets.popper[f]-tt-it;return w=i(ni(c[y]-s,w),0),n.arrowElement=e,n.offsets.arrow=(l={},h(l,f,Math.round(w)),h(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(pt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=d(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],s=v(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case rt.FLIP:f=[r,s];break;case rt.CLOCKWISE:f=gt(r);break;case rt.COUNTERCLOCKWISE:f=gt(r,!0);break;default:f=i.behavior}return f.forEach(function(h,c){if(r!==h||f.length===c+1)return t;r=t.placement.split("-")[0];s=v(r);var a=t.offsets.popper,y=t.offsets.reference,l=o,w="left"===r&&l(a.right)>l(y.left)||"right"===r&&l(a.left)<l(y.right)||"top"===r&&l(a.bottom)>l(y.top)||"bottom"===r&&l(a.top)<l(y.bottom),b=l(a.left)<l(e.left),k=l(a.right)>l(e.right),d=l(a.top)<l(e.top),g=l(a.bottom)>l(e.bottom),nt="left"===r&&b||"right"===r&&k||"top"===r&&d||"bottom"===r&&g,p=-1!==["top","bottom"].indexOf(r),tt=!!i.flipVariations&&(p&&"start"===u&&b||p&&"end"===u&&k||!p&&"start"===u&&d||!p&&"end"===u&&g);(w||nt||tt)&&(t.flipped=!0,(w||nt)&&(r=f[c+1]),tt&&(u=bi(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,vt(t.instance.popper,t.offsets.reference,t.placement)),t=yt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,i=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return i[e?"left":"top"]=o[t]-(s?i[e?"width":"height"]:0),n.placement=v(u),n.offsets.popper=r(i),n}},hide:{order:800,enabled:!0,fn:function(n){if(!dt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=l(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var g=i.x,nt=i.y,u=t.offsets.popper,c=l(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,w,k,d;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,v,tt=void 0===c?i.gpuAcceleration:c,it=f(t.instance.popper),y=b(it),r={position:u.position},h={left:o(u.left),top:o(u.top),bottom:o(u.bottom),right:o(u.right)},e="bottom"===g?"top":"bottom",s="right"===nt?"left":"right",p=wt("transform");return(v="bottom"==e?-y.height+h.bottom:h.top,a="right"==s?-y.width+h.right:h.left,tt&&p)?(r[p]="translate3d("+a+"px, "+v+"px, 0)",r[e]=0,r[s]=0,r.willChange="transform"):(w="bottom"==e?-1:1,k="right"==s?-1:1,r[e]=v*w,r[s]=a*k,r.willChange=e+", "+s),d={"x-placement":t.placement},t.attributes=n({},d,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return nt(n.instance.popper,n.styles),wi(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&nt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=lt(u,t,n,i.positionFixed),e=ct(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),nt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},y});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t((n=n||self).bootstrap={},n.jQuery,n.Popper)}(this,function(n,t,i){"use strict";function uu(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function l(n,t,i){return t&&uu(n.prototype,t),i&&uu(n,i),n}function f(n){for(var i,r,t=1;t<arguments.length;t++)i=null!=arguments[t]?arguments[t]:{},r=Object.keys(i),"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable}))),r.forEach(function(t){var r,u,f;r=n;f=i[u=t];u in r?Object.defineProperty(r,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[u]=f});return n}function cf(n){var u=this,i=!1;return t(this).one(r.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||r.triggerTransitionEnd(u)},n),this}function wu(n,t,i){if(0===n.length)return n;if(i&&"function"==typeof i)return i(n);for(var u=(new window.DOMParser).parseFromString(n,"text/html"),e=Object.keys(t),f=[].slice.call(u.body.querySelectorAll("*")),o=function(n){var i=f[n],o=i.nodeName.toLowerCase(),r,u;if(-1===e.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";r=[].slice.call(i.attributes);u=[].concat(t["*"]||[],t[o]||[]);r.forEach(function(n){(function(n,t){var i=n.nodeName.toLowerCase();if(-1!==t.indexOf(i))return-1===us.indexOf(i)||Boolean(n.nodeValue.match(fs)||n.nodeValue.match(es));for(var u=t.filter(function(n){return n instanceof RegExp}),r=0,f=u.length;r<f;r++)if(i.match(u[r]))return!0;return!1})(n,u)||i.removeAttribute(n.nodeName)})},r=0,s=f.length;r<s;r++)o(r);return u.body.innerHTML}var at,r;t=t&&t.hasOwnProperty("default")?t.default:t;i=i&&i.hasOwnProperty("default")?i.default:i;at="transitionend";r={TRANSITION_END:"bsTransitionEnd",getUID:function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target"),i;t&&"#"!==t||(i=n.getAttribute("href"),t=i&&"#"!==i?i.trim():"");try{return document.querySelector(t)?t:null}catch(n){return null}},getTransitionDurationFromElement:function(n){if(!n)return 0;var i=t(n).css("transition-duration"),r=t(n).css("transition-delay"),u=parseFloat(i),f=parseFloat(r);return u||f?(i=i.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(i)+parseFloat(r))):0},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(at)},supportsTransitionEnd:function(){return Boolean(at)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,t,i){var u,s;for(u in i)if(Object.prototype.hasOwnProperty.call(i,u)){var e=i[u],f=t[u],o=f&&r.isElement(f)?"element":(s=f,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(e).test(o))throw new Error(n.toUpperCase()+': Option "'+u+'" provided type "'+o+'" but expected type "'+e+'".');}},findShadowRoot:function(n){if(!document.documentElement.attachShadow)return null;if("function"!=typeof n.getRootNode)return n instanceof ShadowRoot?n:n.parentNode?r.findShadowRoot(n.parentNode):null;var t=n.getRootNode();return t instanceof ShadowRoot?t:null}};t.fn.emulateTransitionEnd=cf;t.event.special[r.TRANSITION_END]={bindType:at,delegateType:at,handle:function(n){if(t(n.target).is(this))return n.handleObj.handler.apply(this,arguments)}};var vt="alert",pi="bs.alert",cr="."+pi,lf=t.fn[vt],lr={CLOSE:"close"+cr,CLOSED:"closed"+cr,CLICK_DATA_API:"click"+cr+".data-api"},af="alert",vf="fade",yf="show",it=function(){function n(n){this._element=n}var i=n.prototype;return i.close=function(n){var t=this._element;n&&(t=this._getRootElement(n));this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.dispose=function(){t.removeData(this._element,pi);this._element=null},i._getRootElement=function(n){var u=r.getSelectorFromElement(n),i=!1;return u&&(i=document.querySelector(u)),i||(i=t(n).closest("."+af)[0]),i},i._triggerCloseEvent=function(n){var i=t.Event(lr.CLOSE);return t(n).trigger(i),i},i._removeElement=function(n){var u=this,i;(t(n).removeClass(yf),t(n).hasClass(vf))?(i=r.getTransitionDurationFromElement(n),t(n).one(r.TRANSITION_END,function(t){return u._destroyElement(n,t)}).emulateTransitionEnd(i)):this._destroyElement(n)},i._destroyElement=function(n){t(n).detach().trigger(lr.CLOSED).remove()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(pi);r||(r=new n(this),u.data(pi,r));"close"===i&&r[i](this)})},n._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(lr.CLICK_DATA_API,'[data-dismiss="alert"]',it._handleDismiss(new it));t.fn[vt]=it._jQueryInterface;t.fn[vt].Constructor=it;t.fn[vt].noConflict=function(){return t.fn[vt]=lf,it._jQueryInterface};var yt="button",wi="bs.button",ar="."+wi,vr=".data-api",pf=t.fn[yt],pt="active",wf="btn",bf="focus",fu='[data-toggle^="button"]',kf='[data-toggle="buttons"]',df='input:not([type="hidden"])',gf=".active",eu=".btn",ou={CLICK_DATA_API:"click"+ar+vr,FOCUS_BLUR_DATA_API:"focus"+ar+vr+" blur"+ar+vr},wt=function(){function n(n){this._element=n}var i=n.prototype;return i.toggle=function(){var r=!0,f=!0,i=t(this._element).closest(kf)[0],n,u;if(i&&(n=this._element.querySelector(df),n)){if("radio"===n.type&&(n.checked&&this._element.classList.contains(pt)?r=!1:(u=i.querySelector(gf),u&&t(u).removeClass(pt))),r){if(n.hasAttribute("disabled")||i.hasAttribute("disabled")||n.classList.contains("disabled")||i.classList.contains("disabled"))return;n.checked=!this._element.classList.contains(pt);t(n).trigger("change")}n.focus();f=!1}f&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(pt));r&&t(this._element).toggleClass(pt)},i.dispose=function(){t.removeData(this._element,wi);this._element=null},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(wi);r||(r=new n(this),t(this).data(wi,r));"toggle"===i&&r[i]()})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ou.CLICK_DATA_API,fu,function(n){n.preventDefault();var i=n.target;t(i).hasClass(wf)||(i=t(i).closest(eu));wt._jQueryInterface.call(t(i),"toggle")}).on(ou.FOCUS_BLUR_DATA_API,fu,function(n){var i=t(n.target).closest(eu)[0];t(i).toggleClass(bf,/^focus(in)?$/.test(n.type))});t.fn[yt]=wt._jQueryInterface;t.fn[yt].Constructor=wt;t.fn[yt].noConflict=function(){return t.fn[yt]=pf,wt._jQueryInterface};var rt="carousel",bt="bs.carousel",o="."+bt,su=".data-api",ne=t.fn[rt],yr={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},te={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bi="next",ki="prev",ie="left",re="right",s={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,TOUCHSTART:"touchstart"+o,TOUCHMOVE:"touchmove"+o,TOUCHEND:"touchend"+o,POINTERDOWN:"pointerdown"+o,POINTERUP:"pointerup"+o,DRAG_START:"dragstart"+o,LOAD_DATA_API:"load"+o+su,CLICK_DATA_API:"click"+o+su},ue="carousel",w="active",fe="slide",ee="carousel-item-right",oe="carousel-item-left",se="carousel-item-next",he="carousel-item-prev",ce="pointer-event",le=".active",pr=".active.carousel-item",ae=".carousel-item",ve=".carousel-item img",ye=".carousel-item-next, .carousel-item-prev",pe=".carousel-indicators",we='[data-ride="carousel"]',hu={TOUCH:"touch",PEN:"pen"},ut=function(){function i(n,t){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this.touchStartX=0;this.touchDeltaX=0;this._config=this._getConfig(t);this._element=n;this._indicatorsElement=this._element.querySelector(pe);this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints;this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent);this._addEventListeners()}var n=i.prototype;return n.next=function(){this._isSliding||this._slide(bi)},n.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide(ki)},n.pause=function(n){n||(this._isPaused=!0);this._element.querySelector(ye)&&(r.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},n.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(n){var u=this,i,r;if(this._activeElement=this._element.querySelector(pr),i=this._getItemIndex(this._activeElement),!(n>this._items.length-1||n<0))if(this._isSliding)t(this._element).one(s.SLID,function(){return u.to(n)});else{if(i===n)return this.pause(),void this.cycle();r=i<n?bi:ki;this._slide(r,this._items[n])}},n.dispose=function(){t(this._element).off(o);t.removeData(this._element,bt);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},n._getConfig=function(n){return n=f({},yr,n),r.typeCheckConfig(rt,n,te),n},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX),n;t<=40||(n=t/this.touchDeltaX,0<n&&this.prev(),n<0&&this.next())},n._addEventListeners=function(){var n=this;this._config.keyboard&&t(this._element).on(s.KEYDOWN,function(t){return n._keydown(t)});"hover"===this._config.pause&&t(this._element).on(s.MOUSEENTER,function(t){return n.pause(t)}).on(s.MOUSELEAVE,function(t){return n.cycle(t)});this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var n=this,i,r;this._touchSupported&&(i=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},r=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX);n._handleSwipe();"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))},t(this._element.querySelectorAll(ve)).on(s.DRAG_START,function(n){return n.preventDefault()}),this._pointerEvent?(t(this._element).on(s.POINTERDOWN,function(n){return i(n)}),t(this._element).on(s.POINTERUP,function(n){return r(n)}),this._element.classList.add(ce)):(t(this._element).on(s.TOUCHSTART,function(n){return i(n)}),t(this._element).on(s.TOUCHMOVE,function(t){var i;n.touchDeltaX=(i=t).originalEvent.touches&&1<i.originalEvent.touches.length?0:i.originalEvent.touches[0].clientX-n.touchStartX}),t(this._element).on(s.TOUCHEND,function(n){return r(n)})))},n._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault();this.prev();break;case 39:n.preventDefault();this.next()}},n._getItemIndex=function(n){return this._items=n&&n.parentNode?[].slice.call(n.parentNode.querySelectorAll(ae)):[],this._items.indexOf(n)},n._getItemByDirection=function(n,t){var u=n===bi,f=n===ki,i=this._getItemIndex(t),e=this._items.length-1,r;return(f&&0===i||u&&i===e)&&!this._config.wrap?t:(r=(i+(n===ki?-1:1))%this._items.length,-1===r?this._items[this._items.length-1]:this._items[r])},n._triggerSlideEvent=function(n,i){var u=this._getItemIndex(n),f=this._getItemIndex(this._element.querySelector(pr)),r=t.Event(s.SLIDE,{relatedTarget:n,direction:i,from:f,to:u});return t(this._element).trigger(r),r},n._setActiveIndicatorElement=function(n){var r,i;this._indicatorsElement&&(r=[].slice.call(this._indicatorsElement.querySelectorAll(le)),t(r).removeClass(w),i=this._indicatorsElement.children[this._getItemIndex(n)],i&&t(i).addClass(w))},n._slide=function(n,i){var e,o,h,a=this,f=this._element.querySelector(pr),p=this._getItemIndex(f),u=i||f&&this._getItemByDirection(n,f),b=this._getItemIndex(u),v=Boolean(this._interval),c,l,y;(h=n===bi?(e=oe,o=se,ie):(e=ee,o=he,re),u&&t(u).hasClass(w))?this._isSliding=!1:!this._triggerSlideEvent(u,h).isDefaultPrevented()&&f&&u&&(this._isSliding=!0,v&&this.pause(),this._setActiveIndicatorElement(u),c=t.Event(s.SLID,{relatedTarget:u,direction:h,from:p,to:b}),t(this._element).hasClass(fe)?(t(u).addClass(o),r.reflow(u),t(f).addClass(e),t(u).addClass(e),l=parseInt(u.getAttribute("data-interval"),10),this._config.interval=l?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,l):this._config.defaultInterval||this._config.interval,y=r.getTransitionDurationFromElement(f),t(f).one(r.TRANSITION_END,function(){t(u).removeClass(e+" "+o).addClass(w);t(f).removeClass(w+" "+o+" "+e);a._isSliding=!1;setTimeout(function(){return t(a._element).trigger(c)},0)}).emulateTransitionEnd(y)):(t(f).removeClass(w),t(u).addClass(w),this._isSliding=!1,t(this._element).trigger(c)),v&&this.cycle())},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(bt),u=f({},yr,t(this).data()),e;if("object"==typeof n&&(u=f({},u,n)),e="string"==typeof n?n:u.slide,r||(r=new i(this,u),t(this).data(bt,r)),"number"==typeof n)r.to(n);else if("string"==typeof e){if("undefined"==typeof r[e])throw new TypeError('No method named "'+e+'"');r[e]()}else u.interval&&u.ride&&(r.pause(),r.cycle())})},i._dataApiClickHandler=function(n){var s=r.getSelectorFromElement(this),u,o,e;s&&(u=t(s)[0],u&&t(u).hasClass(ue)&&(o=f({},t(u).data(),t(this).data()),e=this.getAttribute("data-slide-to"),e&&(o.interval=!1),i._jQueryInterface.call(t(u),o),e&&t(u).data(bt).to(e),n.preventDefault()))},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yr}}]),i}();t(document).on(s.CLICK_DATA_API,"[data-slide], [data-slide-to]",ut._dataApiClickHandler);t(window).on(s.LOAD_DATA_API,function(){for(var i,r=[].slice.call(document.querySelectorAll(we)),n=0,u=r.length;n<u;n++)i=t(r[n]),ut._jQueryInterface.call(i,i.data())});t.fn[rt]=ut._jQueryInterface;t.fn[rt].Constructor=ut;t.fn[rt].noConflict=function(){return t.fn[rt]=ne,ut._jQueryInterface};var ft="collapse",b="bs.collapse",kt="."+b,be=t.fn[ft],wr={toggle:!0,parent:""},ke={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+kt,SHOWN:"shown"+kt,HIDE:"hide"+kt,HIDDEN:"hidden"+kt,CLICK_DATA_API:"click"+kt+".data-api"},k="show",gt="collapse",di="collapsing",br="collapsed",cu="width",de="height",ge=".show, .collapsing",lu='[data-toggle="collapse"]',ni=function(){function i(n,t){this._isTransitioning=!1;this._element=n;this._config=this._getConfig(t);this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));for(var f=[].slice.call(document.querySelectorAll(lu)),i=0,o=f.length;i<o;i++){var e=f[i],u=r.getSelectorFromElement(e),s=[].slice.call(document.querySelectorAll(u)).filter(function(t){return t===n});null!==u&&0<s.length&&(this._selector=u,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var n=i.prototype;return n.toggle=function(){t(this._element).hasClass(k)?this.hide():this.show()},n.show=function(){var n,e,u=this,o,f,s,h;this._isTransitioning||t(this._element).hasClass(k)||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(ge)).filter(function(n){return"string"==typeof u._config.parent?n.getAttribute("data-parent")===u._config.parent:n.classList.contains(gt)})).length&&(n=null),n&&(e=t(n).not(this._selector).data(b))&&e._isTransitioning)||(o=t.Event(dt.SHOW),(t(this._element).trigger(o),o.isDefaultPrevented())||(n&&(i._jQueryInterface.call(t(n).not(this._selector),"hide"),e||t(n).data(b,null)),f=this._getDimension(),t(this._element).removeClass(gt).addClass(di),this._element.style[f]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(br).attr("aria-expanded",!0),this.setTransitioning(!0),s="scroll"+(f[0].toUpperCase()+f.slice(1)),h=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(){t(u._element).removeClass(di).addClass(gt).addClass(k);u._element.style[f]="";u.setTransitioning(!1);t(u._element).trigger(dt.SHOWN)}).emulateTransitionEnd(h),this._element.style[f]=this._element[s]+"px"))},n.hide=function(){var s=this,u,n,f,i,e,o,h;if(!this._isTransitioning&&t(this._element).hasClass(k)&&(u=t.Event(dt.HIDE),t(this._element).trigger(u),!u.isDefaultPrevented())){if(n=this._getDimension(),this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",r.reflow(this._element),t(this._element).addClass(di).removeClass(gt).removeClass(k),f=this._triggerArray.length,0<f)for(i=0;i<f;i++)e=this._triggerArray[i],o=r.getSelectorFromElement(e),null!==o&&(t([].slice.call(document.querySelectorAll(o))).hasClass(k)||t(e).addClass(br).attr("aria-expanded",!1));this.setTransitioning(!0);this._element.style[n]="";h=r.getTransitionDurationFromElement(this._element);t(this._element).one(r.TRANSITION_END,function(){s.setTransitioning(!1);t(s._element).removeClass(di).addClass(gt).trigger(dt.HIDDEN)}).emulateTransitionEnd(h)}},n.setTransitioning=function(n){this._isTransitioning=n},n.dispose=function(){t.removeData(this._element,b);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},n._getConfig=function(n){return(n=f({},wr,n)).toggle=Boolean(n.toggle),r.typeCheckConfig(ft,n,ke),n},n._getDimension=function(){return t(this._element).hasClass(cu)?cu:de},n._getParent=function(){var n,e=this,u,f;return r.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent),u='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',f=[].slice.call(n.querySelectorAll(u)),t(f).each(function(n,t){e._addAriaAndCollapsedClass(i._getTargetFromElement(t),[t])}),n},n._addAriaAndCollapsedClass=function(n,i){var r=t(n).hasClass(k);i.length&&t(i).toggleClass(br,!r).attr("aria-expanded",r)},i._getTargetFromElement=function(n){var t=r.getSelectorFromElement(n);return t?document.querySelector(t):null},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(b),e=f({},wr,u.data(),"object"==typeof n&&n?n:{});if(!r&&e.toggle&&/show|hide/.test(n)&&(e.toggle=!1),r||(r=new i(this,e),u.data(b,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return wr}}]),i}();t(document).on(dt.CLICK_DATA_API,lu,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var i=t(this),u=r.getSelectorFromElement(this),f=[].slice.call(document.querySelectorAll(u));t(f).each(function(){var n=t(this),r=n.data(b)?"toggle":i.data();ni._jQueryInterface.call(n,r)})});t.fn[ft]=ni._jQueryInterface;t.fn[ft].Constructor=ni;t.fn[ft].noConflict=function(){return t.fn[ft]=be,ni._jQueryInterface};var et="dropdown",ti="bs.dropdown",y="."+ti,kr=".data-api",no=t.fn[et],to=new RegExp("38|40|27"),e={HIDE:"hide"+y,HIDDEN:"hidden"+y,SHOW:"show"+y,SHOWN:"shown"+y,CLICK:"click"+y,CLICK_DATA_API:"click"+y+kr,KEYDOWN_DATA_API:"keydown"+y+kr,KEYUP_DATA_API:"keyup"+y+kr},gi="disabled",h="show",io="dropup",ro="dropright",uo="dropleft",au="dropdown-menu-right",fo="position-static",nr='[data-toggle="dropdown"]',dr=".dropdown-menu",eo=".navbar-nav",oo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",so="top-start",ho="top-end",co="bottom-start",lo="bottom-end",ao="right-start",vo="left-start",yo={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},po={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},p=function(){function n(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var u=n.prototype;return u.toggle=function(){var u,c,o,s,f;if(!this._element.disabled&&!t(this._element).hasClass(gi)&&(u=n._getParentFromElement(this._element),c=t(this._menu).hasClass(h),(n._clearMenus(),!c)&&(o={relatedTarget:this._element},s=t.Event(e.SHOW,o),t(u).trigger(s),!s.isDefaultPrevented()))){if(!this._inNavbar){if("undefined"==typeof i)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");f=this._element;"parent"===this._config.reference?f=u:r.isElement(this._config.reference)&&(f=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(f=this._config.reference[0]));"scrollParent"!==this._config.boundary&&t(u).addClass(fo);this._popper=new i(f,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(u).closest(eo).length&&t(document.body).children().on("mouseover",null,t.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);t(this._menu).toggleClass(h);t(u).toggleClass(h).trigger(t.Event(e.SHOWN,o))}},u.show=function(){if(!(this._element.disabled||t(this._element).hasClass(gi)||t(this._menu).hasClass(h))){var i={relatedTarget:this._element},r=t.Event(e.SHOW,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.SHOWN,i)))}},u.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass(gi)&&t(this._menu).hasClass(h)){var i={relatedTarget:this._element},r=t.Event(e.HIDE,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.HIDDEN,i)))}},u.dispose=function(){t.removeData(this._element,ti);t(this._element).off(y);this._element=null;(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},u.update=function(){this._inNavbar=this._detectNavbar();null!==this._popper&&this._popper.scheduleUpdate()},u._addEventListeners=function(){var n=this;t(this._element).on(e.CLICK,function(t){t.preventDefault();t.stopPropagation();n.toggle()})},u._getConfig=function(n){return n=f({},this.constructor.Default,t(this._element).data(),n),r.typeCheckConfig(et,n,this.constructor.DefaultType),n},u._getMenuElement=function(){if(!this._menu){var t=n._getParentFromElement(this._element);t&&(this._menu=t.querySelector(dr))}return this._menu},u._getPlacement=function(){var i=t(this._element.parentNode),n=co;return i.hasClass(io)?(n=so,t(this._menu).hasClass(au)&&(n=ho)):i.hasClass(ro)?n=ao:i.hasClass(uo)?n=vo:t(this._menu).hasClass(au)&&(n=lo),n},u._detectNavbar=function(){return 0<t(this._element).closest(".navbar").length},u._getOffset=function(){var t=this,n={};return"function"==typeof this._config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t._config.offset(n.offsets,t._element)||{}),n}:n.offset=this._config.offset,n},u._getPopperConfig=function(){var n={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(ti);if(r||(r=new n(this,"object"==typeof i?i:null),t(this).data(ti,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},n._clearMenus=function(i){var l,s;if(!i||3!==i.which&&("keyup"!==i.type||9===i.which))for(var u=[].slice.call(document.querySelectorAll(nr)),r=0,a=u.length;r<a;r++){var f=n._getParentFromElement(u[r]),c=t(u[r]).data(ti),o={relatedTarget:u[r]};(i&&"click"===i.type&&(o.clickEvent=i),c)&&(l=c._menu,!t(f).hasClass(h)||i&&("click"===i.type&&/input|textarea/i.test(i.target.tagName)||"keyup"===i.type&&9===i.which)&&t.contains(f,i.target)||(s=t.Event(e.HIDE,o),t(f).trigger(s),s.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),u[r].setAttribute("aria-expanded","false"),t(l).removeClass(h),t(f).removeClass(h).trigger(t.Event(e.HIDDEN,o)))))}},n._getParentFromElement=function(n){var t,i=r.getSelectorFromElement(n);return i&&(t=document.querySelector(i)),t||n.parentNode},n._dataApiKeydownHandler=function(i){var f,e,u,r,o;(/input|textarea/i.test(i.target.tagName)?32===i.which||27!==i.which&&(40!==i.which&&38!==i.which||t(i.target).closest(dr).length):!to.test(i.which))||(i.preventDefault(),i.stopPropagation(),this.disabled||t(this).hasClass(gi))||(f=n._getParentFromElement(this),e=t(f).hasClass(h),e&&(!e||27!==i.which&&32!==i.which)?(u=[].slice.call(f.querySelectorAll(oo)),0!==u.length&&(r=u.indexOf(i.target),38===i.which&&0<r&&r--,40===i.which&&r<u.length-1&&r++,r<0&&(r=0),u[r].focus())):(27===i.which&&(o=f.querySelector(nr),t(o).trigger("focus")),t(this).trigger("click")))},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yo}},{key:"DefaultType",get:function(){return po}}]),n}();t(document).on(e.KEYDOWN_DATA_API,nr,p._dataApiKeydownHandler).on(e.KEYDOWN_DATA_API,dr,p._dataApiKeydownHandler).on(e.CLICK_DATA_API+" "+e.KEYUP_DATA_API,p._clearMenus).on(e.CLICK_DATA_API,nr,function(n){n.preventDefault();n.stopPropagation();p._jQueryInterface.call(t(this),"toggle")}).on(e.CLICK_DATA_API,".dropdown form",function(n){n.stopPropagation()});t.fn[et]=p._jQueryInterface;t.fn[et].Constructor=p;t.fn[et].noConflict=function(){return t.fn[et]=no,p._jQueryInterface};var ot="modal",ii="bs.modal",c="."+ii,wo=t.fn[ot],gr={backdrop:!0,keyboard:!0,focus:!0,show:!0},bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},u={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,FOCUSIN:"focusin"+c,RESIZE:"resize"+c,CLICK_DISMISS:"click.dismiss"+c,KEYDOWN_DISMISS:"keydown.dismiss"+c,MOUSEUP_DISMISS:"mouseup.dismiss"+c,MOUSEDOWN_DISMISS:"mousedown.dismiss"+c,CLICK_DATA_API:"click"+c+".data-api"},ko="modal-dialog-scrollable",go="modal-scrollbar-measure",ns="modal-backdrop",vu="modal-open",st="fade",tr="show",ts=".modal-dialog",is=".modal-body",rs='[data-dismiss="modal"]',yu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pu=".sticky-top",ri=function(){function i(n,t){this._config=this._getConfig(t);this._element=n;this._dialog=n.querySelector(ts);this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._isTransitioning=!1;this._scrollbarWidth=0}var n=i.prototype;return n.toggle=function(n){return this._isShown?this.hide():this.show(n)},n.show=function(n){var i=this,r;this._isShown||this._isTransitioning||(t(this._element).hasClass(st)&&(this._isTransitioning=!0),r=t.Event(u.SHOW,{relatedTarget:n}),t(this._element).trigger(r),this._isShown||r.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(u.CLICK_DISMISS,rs,function(n){return i.hide(n)}),t(this._dialog).on(u.MOUSEDOWN_DISMISS,function(){t(i._element).one(u.MOUSEUP_DISMISS,function(n){t(n.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(n)})))},n.hide=function(n){var o=this,i,f,e;(n&&n.preventDefault(),this._isShown&&!this._isTransitioning)&&(i=t.Event(u.HIDE),(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented())&&(this._isShown=!1,f=t(this._element).hasClass(st),(f&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(u.FOCUSIN),t(this._element).removeClass(tr),t(this._element).off(u.CLICK_DISMISS),t(this._dialog).off(u.MOUSEDOWN_DISMISS),f)?(e=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(n){return o._hideModal(n)}).emulateTransitionEnd(e)):this._hideModal()))},n.dispose=function(){[window,this._element,this._dialog].forEach(function(n){return t(n).off(c)});t(document).off(u.FOCUSIN);t.removeData(this._element,ii);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._isTransitioning=null;this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(n){return n=f({},gr,n),r.typeCheckConfig(ot,n,bo),n},n._showElement=function(n){var i=this,e=t(this._element).hasClass(st),o,f,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.setAttribute("aria-modal",!0);t(this._dialog).hasClass(ko)?this._dialog.querySelector(is).scrollTop=0:this._element.scrollTop=0;e&&r.reflow(this._element);t(this._element).addClass(tr);this._config.focus&&this._enforceFocus();o=t.Event(u.SHOWN,{relatedTarget:n});f=function(){i._config.focus&&i._element.focus();i._isTransitioning=!1;t(i._element).trigger(o)};e?(s=r.getTransitionDurationFromElement(this._dialog),t(this._dialog).one(r.TRANSITION_END,f).emulateTransitionEnd(s)):f()},n._enforceFocus=function(){var n=this;t(document).off(u.FOCUSIN).on(u.FOCUSIN,function(i){document!==i.target&&n._element!==i.target&&0===t(n._element).has(i.target).length&&n._element.focus()})},n._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?t(this._element).on(u.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),n.hide())}):this._isShown||t(this._element).off(u.KEYDOWN_DISMISS)},n._setResizeEvent=function(){var n=this;this._isShown?t(window).on(u.RESIZE,function(t){return n.handleUpdate(t)}):t(window).off(u.RESIZE)},n._hideModal=function(){var n=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._element.removeAttribute("aria-modal");this._isTransitioning=!1;this._showBackdrop(function(){t(document.body).removeClass(vu);n._resetAdjustments();n._resetScrollbar();t(n._element).trigger(u.HIDDEN)})},n._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(n){var i=this,f=t(this._element).hasClass(st)?st:"",o,e,s;if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ns,f&&this._backdrop.classList.add(f),t(this._backdrop).appendTo(document.body),t(this._element).on(u.CLICK_DISMISS,function(n){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),f&&r.reflow(this._backdrop),t(this._backdrop).addClass(tr),!n)return;if(!f)return void n();o=r.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(r.TRANSITION_END,n).emulateTransitionEnd(o)}else!this._isShown&&this._backdrop?(t(this._backdrop).removeClass(tr),e=function(){i._removeBackdrop();n&&n()},t(this._element).hasClass(st)?(s=r.getTransitionDurationFromElement(this._backdrop),t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(s)):e()):n&&n()},n._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},n._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var n=this,i,r,u,f;this._isBodyOverflowing&&(i=[].slice.call(document.querySelectorAll(yu)),r=[].slice.call(document.querySelectorAll(pu)),t(i).each(function(i,r){var u=r.style.paddingRight,f=t(r).css("padding-right");t(r).data("padding-right",u).css("padding-right",parseFloat(f)+n._scrollbarWidth+"px")}),t(r).each(function(i,r){var u=r.style.marginRight,f=t(r).css("margin-right");t(r).data("margin-right",u).css("margin-right",parseFloat(f)-n._scrollbarWidth+"px")}),u=document.body.style.paddingRight,f=t(document.body).css("padding-right"),t(document.body).data("padding-right",u).css("padding-right",parseFloat(f)+this._scrollbarWidth+"px"));t(document.body).addClass(vu)},n._resetScrollbar=function(){var r=[].slice.call(document.querySelectorAll(yu)),n,i;t(r).each(function(n,i){var r=t(i).data("padding-right");t(i).removeData("padding-right");i.style.paddingRight=r||""});n=[].slice.call(document.querySelectorAll(""+pu));t(n).each(function(n,i){var r=t(i).data("margin-right");"undefined"!=typeof r&&t(i).css("margin-right",r).removeData("margin-right")});i=t(document.body).data("padding-right");t(document.body).removeData("padding-right");document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=go,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},i._jQueryInterface=function(n,r){return this.each(function(){var u=t(this).data(ii),e=f({},gr,t(this).data(),"object"==typeof n&&n?n:{});if(u||(u=new i(this,e),t(this).data(ii,u)),"string"==typeof n){if("undefined"==typeof u[n])throw new TypeError('No method named "'+n+'"');u[n](r)}else e.show&&u.show(r)})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gr}}]),i}();t(document).on(u.CLICK_DATA_API,'[data-toggle="modal"]',function(n){var i,e=this,o=r.getSelectorFromElement(this),s,h;o&&(i=document.querySelector(o));s=t(i).data(ii)?"toggle":f({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();h=t(i).one(u.SHOW,function(n){n.isDefaultPrevented()||h.one(u.HIDDEN,function(){t(e).is(":visible")&&e.focus()})});ri._jQueryInterface.call(t(i),s,this)});t.fn[ot]=ri._jQueryInterface;t.fn[ot].Constructor=ri;t.fn[ot].noConflict=function(){return t.fn[ot]=wo,ri._jQueryInterface};var us=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],fs=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,es=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;var d="tooltip",ir="bs.tooltip",a="."+ir,os=t.fn[d],bu="bs-tooltip",ss=new RegExp("(^|\\s)"+bu+"\\S+","g"),hs=["sanitize","whiteList","sanitizeFn"],cs={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},ls={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},as={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},ui="show",nu="out",vs={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},fi="fade",ei="show",ys=".tooltip-inner",ps=".arrow",oi="hover",tu="focus",ws="click",bs="manual",g=function(){function u(n,t){if("undefined"==typeof i)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var n=u.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(n){if(this._isEnabled)if(n){var r=this.constructor.DATA_KEY,i=t(n.currentTarget).data(r);i||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));i._activeTrigger.click=!i._activeTrigger.click;i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(ei))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout);t.removeData(this.element,this.constructor.DATA_KEY);t(this.element).off(this.constructor.EVENT_KEY);t(this.element).closest(".modal").off("hide.bs.modal");this.tip&&t(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;(this._activeTrigger=null)!==this._popper&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},n.show=function(){var n=this,f,e,c,u,o,l,s,a,h,v;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");if(f=t.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(t(this.element).trigger(f),e=r.findShadowRoot(this.element),c=t.contains(null!==e?e:this.element.ownerDocument.documentElement,this.element),f.isDefaultPrevented()||!c)return;u=this.getTipElement();o=r.getUID(this.constructor.NAME);u.setAttribute("id",o);this.element.setAttribute("aria-describedby",o);this.setContent();this.config.animation&&t(u).addClass(fi);l="function"==typeof this.config.placement?this.config.placement.call(this,u,this.element):this.config.placement;s=this._getAttachment(l);this.addAttachmentClass(s);a=this._getContainer();t(u).data(this.constructor.DATA_KEY,this);t.contains(this.element.ownerDocument.documentElement,this.tip)||t(u).appendTo(a);t(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new i(this.element,u,{placement:s,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ps},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&n._handlePopperPlacementChange(t)},onUpdate:function(t){return n._handlePopperPlacementChange(t)}});t(u).addClass(ei);"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);h=function(){n.config.animation&&n._fixTransition();var i=n._hoverState;n._hoverState=null;t(n.element).trigger(n.constructor.Event.SHOWN);i===nu&&n._leave(null,n)};t(this.tip).hasClass(fi)?(v=r.getTransitionDurationFromElement(this.tip),t(this.tip).one(r.TRANSITION_END,h).emulateTransitionEnd(v)):h()}},n.hide=function(n){var i=this,u=this.getTipElement(),f=t.Event(this.constructor.Event.HIDE),e=function(){i._hoverState!==ui&&u.parentNode&&u.parentNode.removeChild(u);i._cleanTipClass();i.element.removeAttribute("aria-describedby");t(i.element).trigger(i.constructor.Event.HIDDEN);null!==i._popper&&i._popper.destroy();n&&n()},o;(t(this.element).trigger(f),f.isDefaultPrevented())||((t(u).removeClass(ei),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger[ws]=!1,this._activeTrigger[tu]=!1,this._activeTrigger[oi]=!1,t(this.tip).hasClass(fi))?(o=r.getTransitionDurationFromElement(u),t(u).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e(),this._hoverState="")},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(n){t(this.getTipElement()).addClass(bu+"-"+n)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var n=this.getTipElement();this.setElementContent(t(n.querySelectorAll(ys)),this.getTitle());t(n).removeClass(fi+" "+ei)},n.setElementContent=function(n,i){"object"!=typeof i||!i.nodeType&&!i.jquery?this.config.html?(this.config.sanitize&&(i=wu(i,this.config.whiteList,this.config.sanitizeFn)),n.html(i)):n.text(i):this.config.html?t(i).parent().is(n)||n.empty().append(i):n.text(t(i).text())},n.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},n._getOffset=function(){var t=this,n={};return"function"==typeof this.config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t.config.offset(n.offsets,t.element)||{}),n}:n.offset=this.config.offset,n},n._getContainer=function(){return!1===this.config.container?document.body:r.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(n){return ls[n.toUpperCase()]},n._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(i){if("click"===i)t(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(i!==bs){var r=i===oi?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,u=i===oi?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;t(n.element).on(r,n.config.selector,function(t){return n._enter(t)}).on(u,n.config.selector,function(t){return n._leave(t)})}});t(this.element).closest(".modal").on("hide.bs.modal",function(){n.element&&n.hide()});this.config.selector?this.config=f({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusin"===n.type?tu:oi]=!0);t(i.getTipElement()).hasClass(ei)||i._hoverState===ui?i._hoverState=ui:(clearTimeout(i._timeout),i._hoverState=ui,i.config.delay&&i.config.delay.show?i._timeout=setTimeout(function(){i._hoverState===ui&&i.show()},i.config.delay.show):i.show())},n._leave=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusout"===n.type?tu:oi]=!1);i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=nu,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout(function(){i._hoverState===nu&&i.hide()},i.config.delay.hide):i.hide())},n._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},n._getConfig=function(n){var i=t(this.element).data();return Object.keys(i).forEach(function(n){-1!==hs.indexOf(n)&&delete i[n]}),"number"==typeof(n=f({},this.constructor.Default,i,"object"==typeof n&&n?n:{})).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),r.typeCheckConfig(d,n,this.constructor.DefaultType),n.sanitize&&(n.template=wu(n.template,n.whiteList,n.sanitizeFn)),n},n._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},n._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ss);null!==n&&n.length&&i.removeClass(n.join(""))},n._handlePopperPlacementChange=function(n){var t=n.instance;this.tip=t.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},n._fixTransition=function(){var n=this.getTipElement(),i=this.config.animation;null===n.getAttribute("x-placement")&&(t(n).removeClass(fi),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},u._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(ir),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new u(this,r),t(this).data(ir,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(u,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return as}},{key:"NAME",get:function(){return d}},{key:"DATA_KEY",get:function(){return ir}},{key:"Event",get:function(){return vs}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return cs}}]),u}();t.fn[d]=g._jQueryInterface;t.fn[d].Constructor=g;t.fn[d].noConflict=function(){return t.fn[d]=os,g._jQueryInterface};var ht="popover",rr="bs.popover",v="."+rr,ks=t.fn[ht],ku="bs-popover",ds=new RegExp("(^|\\s)"+ku+"\\S+","g"),gs=f({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>'}),nh=f({},g.DefaultType,{content:"(string|element|function)"}),th="fade",ih="show",rh=".popover-header",uh=".popover-body",fh={HIDE:"hide"+v,HIDDEN:"hidden"+v,SHOW:"show"+v,SHOWN:"shown"+v,INSERTED:"inserted"+v,CLICK:"click"+v,FOCUSIN:"focusin"+v,FOCUSOUT:"focusout"+v,MOUSEENTER:"mouseenter"+v,MOUSELEAVE:"mouseleave"+v},ur=function(n){function r(){return n.apply(this,arguments)||this}var u,f,i;return f=n,(u=r).prototype=Object.create(f.prototype),(u.prototype.constructor=u).__proto__=f,i=r.prototype,i.isWithContent=function(){return this.getTitle()||this._getContent()},i.addAttachmentClass=function(n){t(this.getTipElement()).addClass(ku+"-"+n)},i.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},i.setContent=function(){var i=t(this.getTipElement()),n;this.setElementContent(i.find(rh),this.getTitle());n=this._getContent();"function"==typeof n&&(n=n.call(this.element));this.setElementContent(i.find(uh),n);i.removeClass(th+" "+ih)},i._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},i._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ds);null!==n&&0<n.length&&i.removeClass(n.join(""))},r._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(rr),u="object"==typeof n?n:null;if((i||!/dispose|hide/.test(n))&&(i||(i=new r(this,u),t(this).data(rr,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gs}},{key:"NAME",get:function(){return ht}},{key:"DATA_KEY",get:function(){return rr}},{key:"Event",get:function(){return fh}},{key:"EVENT_KEY",get:function(){return v}},{key:"DefaultType",get:function(){return nh}}]),r}(g);t.fn[ht]=ur._jQueryInterface;t.fn[ht].Constructor=ur;t.fn[ht].noConflict=function(){return t.fn[ht]=ks,ur._jQueryInterface};var nt="scrollspy",fr="bs.scrollspy",er="."+fr,eh=t.fn[nt],du={offset:10,method:"auto",target:""},oh={offset:"number",method:"string",target:"(string|element)"},iu={ACTIVATE:"activate"+er,SCROLL:"scroll"+er,LOAD_DATA_API:"load"+er+".data-api"},sh="dropdown-item",tt="active",hh='[data-spy="scroll"]',gu=".nav, .list-group",ru=".nav-link",ch=".nav-item",nf=".list-group-item",lh=".dropdown",ah=".dropdown-item",vh=".dropdown-toggle",yh="offset",tf="position",si=function(){function i(n,i){var r=this;this._element=n;this._scrollElement="BODY"===n.tagName?window:n;this._config=this._getConfig(i);this._selector=this._config.target+" "+ru+","+this._config.target+" "+nf+","+this._config.target+" "+ah;this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;t(this._scrollElement).on(iu.SCROLL,function(n){return r._process(n)});this.refresh();this._process()}var n=i.prototype;return n.refresh=function(){var n=this,u=this._scrollElement===this._scrollElement.window?yh:tf,i="auto"===this._config.method?u:this._config.method,f=i===tf?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map(function(n){var u,e=r.getSelectorFromElement(n),o;return(e&&(u=document.querySelector(e)),u)&&(o=u.getBoundingClientRect(),o.width||o.height)?[t(u)[i]().top+f,e]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(t){n._offsets.push(t[0]);n._targets.push(t[1])})},n.dispose=function(){t.removeData(this._element,fr);t(this._scrollElement).off(er);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},n._getConfig=function(n){if("string"!=typeof(n=f({},du,"object"==typeof n&&n?n:{})).target){var i=t(n.target).attr("id");i||(i=r.getUID(nt),t(n.target).attr("id",i));n.target="#"+i}return r.typeCheckConfig(nt,n,oh),n},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),u=this._config.offset+r-this._getOffsetHeight(),i,n;if(this._scrollHeight!==r&&this.refresh(),u<=t)i=this._targets[this._targets.length-1],this._activeTarget!==i&&this._activate(i);else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&("undefined"==typeof this._offsets[n+1]||t<this._offsets[n+1])&&this._activate(this._targets[n])}},n._activate=function(n){this._activeTarget=n;this._clear();var r=this._selector.split(",").map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'}),i=t([].slice.call(document.querySelectorAll(r.join(","))));i.hasClass(sh)?(i.closest(lh).find(vh).addClass(tt),i.addClass(tt)):(i.addClass(tt),i.parents(gu).prev(ru+", "+nf).addClass(tt),i.parents(gu).prev(ch).children(ru).addClass(tt));t(this._scrollElement).trigger(iu.ACTIVATE,{relatedTarget:n})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(n){return n.classList.contains(tt)}).forEach(function(n){return n.classList.remove(tt)})},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(fr);if(r||(r=new i(this,"object"==typeof n&&n),t(this).data(fr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return du}}]),i}();t(window).on(iu.LOAD_DATA_API,function(){for(var r,n=[].slice.call(document.querySelectorAll(hh)),i=n.length;i--;)r=t(n[i]),si._jQueryInterface.call(r,r.data())});t.fn[nt]=si._jQueryInterface;t.fn[nt].Constructor=si;t.fn[nt].noConflict=function(){return t.fn[nt]=eh,si._jQueryInterface};var or="bs.tab",hi="."+or,ph=t.fn.tab,ci={HIDE:"hide"+hi,HIDDEN:"hidden"+hi,SHOW:"show"+hi,SHOWN:"shown"+hi,CLICK_DATA_API:"click"+hi+".data-api"},wh="dropdown-menu",li="active",bh="disabled",rf="fade",uf="show",kh=".dropdown",dh=".nav, .list-group",ff=".active",ef="> li > .active",gh=".dropdown-toggle",nc="> .dropdown-menu .active",ai=function(){function n(n){this._element=n}var i=n.prototype;return i.show=function(){var h=this,u,n,i,f,c,e,o,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(li)||t(this._element).hasClass(bh)||(i=t(this._element).closest(dh)[0],f=r.getSelectorFromElement(this._element),i&&(c="UL"===i.nodeName||"OL"===i.nodeName?ef:ff,n=(n=t.makeArray(t(i).find(c)))[n.length-1]),e=t.Event(ci.HIDE,{relatedTarget:this._element}),o=t.Event(ci.SHOW,{relatedTarget:n}),(n&&t(n).trigger(e),t(this._element).trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(f&&(u=document.querySelector(f)),this._activate(this._element,i),s=function(){var i=t.Event(ci.HIDDEN,{relatedTarget:h._element}),r=t.Event(ci.SHOWN,{relatedTarget:n});t(n).trigger(i);t(h._element).trigger(r)},u?this._activate(u,u.parentNode,s):s()))},i.dispose=function(){t.removeData(this._element,or);this._element=null},i._activate=function(n,i,u){var s=this,f=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?t(i).children(ff):t(i).find(ef))[0],h=u&&f&&t(f).hasClass(rf),e=function(){return s._transitionComplete(n,f,u)},o;f&&h?(o=r.getTransitionDurationFromElement(f),t(f).removeClass(uf).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e()},i._transitionComplete=function(n,i,u){var f,e,o;i&&(t(i).removeClass(li),f=t(i.parentNode).find(nc)[0],f&&t(f).removeClass(li),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1));(t(n).addClass(li),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),r.reflow(n),n.classList.contains(rf)&&n.classList.add(uf),n.parentNode&&t(n.parentNode).hasClass(wh))&&(e=t(n).closest(kh)[0],e&&(o=[].slice.call(e.querySelectorAll(gh)),t(o).addClass(li)),n.setAttribute("aria-expanded",!0));u&&u()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(or);if(r||(r=new n(this),u.data(or,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ci.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(n){n.preventDefault();ai._jQueryInterface.call(t(this),"show")});t.fn.tab=ai._jQueryInterface;t.fn.tab.Constructor=ai;t.fn.tab.noConflict=function(){return t.fn.tab=ph,ai._jQueryInterface};var ct="toast",sr="bs.toast",vi="."+sr,tc=t.fn[ct],lt={CLICK_DISMISS:"click.dismiss"+vi,HIDE:"hide"+vi,HIDDEN:"hidden"+vi,SHOW:"show"+vi,SHOWN:"shown"+vi},ic="fade",of="hide",yi="show",sf="showing",rc={animation:"boolean",autohide:"boolean",delay:"number"},hf={animation:!0,autohide:!0,delay:500},uc='[data-dismiss="toast"]',hr=function(){function i(n,t){this._element=n;this._config=this._getConfig(t);this._timeout=null;this._setListeners()}var n=i.prototype;return n.show=function(){var n=this,i,u;t(this._element).trigger(lt.SHOW);this._config.animation&&this._element.classList.add(ic);i=function(){n._element.classList.remove(sf);n._element.classList.add(yi);t(n._element).trigger(lt.SHOWN);n._config.autohide&&n.hide()};(this._element.classList.remove(of),this._element.classList.add(sf),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},n.hide=function(n){var i=this;this._element.classList.contains(yi)&&(t(this._element).trigger(lt.HIDE),n?this._close():this._timeout=setTimeout(function(){i._close()},this._config.delay))},n.dispose=function(){clearTimeout(this._timeout);this._timeout=null;this._element.classList.contains(yi)&&this._element.classList.remove(yi);t(this._element).off(lt.CLICK_DISMISS);t.removeData(this._element,sr);this._element=null;this._config=null},n._getConfig=function(n){return n=f({},hf,t(this._element).data(),"object"==typeof n&&n?n:{}),r.typeCheckConfig(ct,n,this.constructor.DefaultType),n},n._setListeners=function(){var n=this;t(this._element).on(lt.CLICK_DISMISS,uc,function(){return n.hide(!0)})},n._close=function(){var n=this,i=function(){n._element.classList.add(of);t(n._element).trigger(lt.HIDDEN)},u;(this._element.classList.remove(yi),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(sr);if(r||(r=new i(this,"object"==typeof n&&n),u.data(sr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n](this)}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return rc}},{key:"Default",get:function(){return hf}}]),i}();t.fn[ct]=hr._jQueryInterface;t.fn[ct].Constructor=hr;t.fn[ct].noConflict=function(){return t.fn[ct]=tc,hr._jQueryInterface},function(){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var n=t.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1===n[0]&&9===n[1]&&n[2]<1||4<=n[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");}();n.Util=r;n.Alert=it;n.Button=wt;n.Carousel=ut;n.Collapse=ni;n.Dropdown=p;n.Modal=ri;n.Popover=ur;n.Scrollspy=si;n.Tab=ai;n.Toast=hr;n.Tooltip=g;Object.defineProperty(n,"__esModule",{value:!0})}),function(n){var r=window.location.search,i,t;r=r.replace(/&?((page)|(pg))=([^&]$|[^&]*)/i,"");i=r.substring(r.indexOf("?")+1);i=i==""?i:i+"&";t={init:function(r){var u=n.extend({items:1,itemsOnPage:1,pages:0,displayedPages:5,edges:2,currentPage:0,hrefTextPrefix:"?"+i+"page=",hrefTextSuffix:"",prevText:'<i class="fas fa-step-backward"><\/i>',nextText:'<i class="fas fa-step-forward"><\/i>',ellipseText:"&hellip;",listStyle:"",labelMap:[],selectOnClick:!0,nextAtFront:!1,invertPageOrder:!1,useStartEdge:!0,useEndEdge:!0,onPageClick:function(){},onInit:function(){}},r||{}),f=this;return u.pages=u.pages?u.pages:Math.ceil(u.items/u.itemsOnPage)?Math.ceil(u.items/u.itemsOnPage):1,u.currentPage=u.currentPage?u.currentPage-1:u.invertPageOrder?u.pages-1:0,u.halfDisplayed=u.displayedPages/2,this.each(function(){f.addClass(u.cssStyle+" simple-pagination").data("pagination",u);t._draw.call(f)}),u.onInit(),this},selectPage:function(n){return t._selectPage.call(this,n-1),this},prevPage:function(){var n=this.data("pagination");return n.invertPageOrder?n.currentPage<n.pages-1&&t._selectPage.call(this,n.currentPage+1):n.currentPage>0&&t._selectPage.call(this,n.currentPage-1),this},nextPage:function(){var n=this.data("pagination");return n.invertPageOrder?n.currentPage>0&&t._selectPage.call(this,n.currentPage-1):n.currentPage<n.pages-1&&t._selectPage.call(this,n.currentPage+1),this},getPagesCount:function(){return this.data("pagination").pages},setPagesCount:function(n){this.data("pagination").pages=n},getCurrentPage:function(){return this.data("pagination").currentPage+1},destroy:function(){return this.empty(),this},drawPage:function(n){var i=this.data("pagination");return i.currentPage=n-1,this.data("pagination",i),t._draw.call(this),this},redraw:function(){return t._draw.call(this),this},disable:function(){var n=this.data("pagination");return n.disabled=!0,this.data("pagination",n),t._draw.call(this),this},enable:function(){var n=this.data("pagination");return n.disabled=!1,this.data("pagination",n),t._draw.call(this),this},updateItems:function(n){var i=this.data("pagination");i.items=n;i.pages=t._getPages(i);this.data("pagination",i);t._draw.call(this)},updateItemsOnPage:function(n){var i=this.data("pagination");return i.itemsOnPage=n,i.pages=t._getPages(i),this.data("pagination",i),t._selectPage.call(this,0),this},_draw:function(){var i=this.data("pagination"),r=t._getInterval(i),u,s,f,o,e;if(t.destroy.call(this),s=typeof this.prop=="function"?this.prop("tagName"):this.attr("tagName"),f=s==="UL"?this:n("<ul"+(i.listStyle?' class="'+i.listStyle+'"':"")+"><\/ul>").appendTo(this),i.prevText&&t._appendItem.call(this,i.invertPageOrder?i.currentPage+1:i.currentPage-1,{text:i.prevText,classes:"prev"}),i.nextText&&i.nextAtFront&&t._appendItem.call(this,i.invertPageOrder?i.currentPage-1:i.currentPage+1,{text:i.nextText,classes:"next"}),i.invertPageOrder){if(r.end<i.pages&&i.edges>0){if(i.useStartEdge)for(o=Math.max(i.pages-i.edges,r.end),u=i.pages-1;u>=o;u--)t._appendItem.call(this,u);i.pages-i.edges>r.end&&i.pages-i.edges-r.end!=1?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):i.pages-i.edges-r.end==1&&t._appendItem.call(this,r.end)}}else if(r.start>0&&i.edges>0){if(i.useStartEdge)for(e=Math.min(i.edges,r.start),u=0;u<e;u++)t._appendItem.call(this,u);i.edges<r.start&&r.start-i.edges!=1?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):r.start-i.edges==1&&t._appendItem.call(this,i.edges)}if(i.invertPageOrder)for(u=r.end-1;u>=r.start;u--)t._appendItem.call(this,u);else for(u=r.start;u<r.end;u++)t._appendItem.call(this,u);if(i.invertPageOrder){if(r.start>0&&i.edges>0&&(i.edges<r.start&&r.start-i.edges!=1?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):r.start-i.edges==1&&t._appendItem.call(this,i.edges),i.useEndEdge))for(e=Math.min(i.edges,r.start),u=e-1;u>=0;u--)t._appendItem.call(this,u)}else if(r.end<i.pages&&i.edges>0&&(i.pages-i.edges>r.end&&i.pages-i.edges-r.end!=1?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):i.pages-i.edges-r.end==1&&t._appendItem.call(this,r.end),i.useEndEdge))for(o=Math.max(i.pages-i.edges,r.end),u=o;u<i.pages;u++)t._appendItem.call(this,u);i.nextText&&!i.nextAtFront&&t._appendItem.call(this,i.invertPageOrder?i.currentPage-1:i.currentPage+1,{text:i.nextText,classes:"next"})},_getPages:function(n){var t=Math.ceil(n.items/n.itemsOnPage);return t||1},_getInterval:function(n){return{start:Math.ceil(n.currentPage>n.halfDisplayed?Math.max(Math.min(n.currentPage-n.halfDisplayed,n.pages-n.displayedPages),0):0),end:Math.ceil(n.currentPage>n.halfDisplayed?Math.min(n.currentPage+n.halfDisplayed,n.pages):Math.min(n.displayedPages,n.pages))}},_appendItem:function(i,r){var s=this,f,e,u=s.data("pagination"),o=n("<li><\/li>"),h=s.find("ul");i=i<0?0:i<u.pages?i:u.pages-1;f={text:i+1,classes:""};u.labelMap.length&&u.labelMap[i]&&(f.text=u.labelMap[i]);f=n.extend(f,r||{});i==u.currentPage||u.disabled?(u.disabled?o.addClass("disabled"):o.addClass("active"),e=n('<span class="current">'+f.text+"<\/span>")):(e=n('<a href="'+u.hrefTextPrefix+(i+1)+u.hrefTextSuffix+'" class="page-link">'+f.text+"<\/a>"),e.click(function(n){return t._selectPage.call(s,i,n)}));f.classes&&e.addClass(f.classes);o.append(e);h.length?h.append(o):s.append(o)},_selectPage:function(n,i){var r=this.data("pagination");r.currentPage=n;r.selectOnClick&&t._draw.call(this);return r.onPageClick(n+1,i)}};n.fn.pagination=function(i){if(t[i]&&i.charAt(0)!="_")return t[i].apply(this,Array.prototype.slice.call(arguments,1));if(typeof i!="object"&&i)n.error("Method "+i+" does not exist on jQuery.pagination");else return t.init.apply(this,arguments)}}(jQuery);!function(n,t){"use strict";function f(r,f,e,o,s){function it(){ut=n.devicePixelRatio>1;e=rt(e);f.delay>=0&&setTimeout(function(){p(!0)},f.delay);(f.delay<0||f.combined)&&(o.e=lt(f.throttle,function(n){"resize"===n.type&&(w=b=-1);p(n.all)}),o.a=function(n){n=rt(n);e.push.apply(e,n)},o.g=function(){return e=i(e).filter(function(){return!i(this).data(f.loadedName)})},o.f=function(n){for(var i,t=0;t<n.length;t++)i=e.filter(function(){return this===n[t]}),i.length&&p(!1,i)},p(),i(f.appendScroll).on("scroll."+s+" resize."+s,o.e))}function rt(n){var v=f.defaultImage,p=f.placeholder,k=f.imageBase,s=f.srcsetAttribute,c=f.loaderAttribute,a=f._f||{},e,w;for(n=i(n).filter(function(){var n=i(this),r=g(this);return!n.data(f.handledName)&&(n.attr(f.attribute)||n.attr(s)||n.attr(c)||a[r]!==t)}).data("plugin_"+f.name,r),e=0,w=n.length;e<w;e++){var u=i(n[e]),o=g(n[e]),b=u.attr(f.imageBaseAttribute)||k;o===l&&b&&u.attr(s)&&u.attr(s,ct(u.attr(s),b));a[o]===t||u.attr(c)||u.attr(c,a[o]);o===l&&v&&!u.attr(h)?u.attr(h,v):o===l||!p||u.css(y)&&"none"!==u.css(y)||u.css(y,"url('"+p+"')")}return n}function p(n,t){if(!e.length)return void(f.autoDestroy&&r.destroy());for(var s=t||e,w=!1,nt=f.imageBase||"",b=f.srcsetAttribute,c=f.handledName,o=0;o<s.length;o++)if(n||t||ot(s[o])){var u=i(s[o]),a=g(s[o]),v=u.attr(f.attribute),p=u.attr(f.imageBaseAttribute)||nt,d=u.attr(f.loaderAttribute);!u.data(c)&&(!f.visibleOnly||u.is(":visible"))&&((v||u.attr(b))&&(a===l&&(p+v!==u.attr(h)||u.attr(b)!==u.attr(k))||a!==l&&p+v!==u.css(y))||d)&&(w=!0,u.data(c,!0),et(u,a,p,d))}w&&(e=i(e).filter(function(){return!i(this).data(c)}))}function et(n,t,r,u){var o,s,e,w;++tt;o=function(){c("onError",n);nt();o=i.noop};c("beforeLoad",n);var b=f.attribute,g=f.srcsetAttribute,p=f.sizesAttribute,it=f.retinaAttribute,rt=f.removeAttribute,et=f.loadedName,ot=n.attr(it);if(u)s=function(){rt&&n.removeAttr(f.loaderAttribute);n.data(et,!0);c(ft,n);setTimeout(nt,1);s=i.noop},n.off(v).one(v,o).one(a,s),c(u,n,function(t){t?(n.off(a),s()):(n.off(v),o())})||n.trigger(v);else{e=i(new Image);e.one(v,o).one(a,function(){n.hide();t===l?n.attr(d,e.attr(d)).attr(k,e.attr(k)).attr(h,e.attr(h)):n.css(y,"url('"+e.attr(h)+"')");n[f.effect](f.effectTime);rt&&(n.removeAttr(b+" "+g+" "+it+" "+f.imageBaseAttribute),p!==d&&n.removeAttr(p));n.data(et,!0);c(ft,n);e.remove();nt()});w=(ut&&ot?ot:n.attr(b))||"";e.attr(d,n.attr(p)).attr(k,n.attr(g)).attr(h,w?r+w:null);e.complete&&e.trigger(a)}}function ot(n){var t=n.getBoundingClientRect(),r=f.scrollDirection,i=f.threshold,u=ht()+i>t.top&&-i<t.bottom,e=st()+i>t.left&&-i<t.right;return"vertical"===r?u:"horizontal"===r?e:u&&e}function st(){return w>=0?w:w=i(n).width()}function ht(){return b>=0?b:b=i(n).height()}function g(n){return n.tagName.toLowerCase()}function ct(n,t){var r,i,u;if(t)for(r=n.split(","),n="",i=0,u=r.length;i<u;i++)n+=t+r[i].trim()+(i!==u-1?",":"");return n}function lt(n,t){var i,u=0;return function(e,o){function s(){u=+new Date;t.call(r,e)}var h=+new Date-u;i&&clearTimeout(i);h>n||!f.enableThrottle||o?s():i=setTimeout(s,n-h)}}function nt(){--tt;e.length||tt||c("onFinishedAll")}function c(n){return!!(n=f[n])&&(n.apply(r,[].slice.call(arguments,1)),!0)}var tt=0,w=-1,b=-1,ut=!1,ft="afterLoad",a="load",v="error",l="img",h="src",k="srcset",d="sizes",y="background-image";"event"===f.bind||u?it():i(n).on(a+"."+s,it)}function r(r,u){var o=this,h=i.extend({},o.config,u),s={},c=h.name+"-"+ ++e;return o.config=function(n,i){return i===t?h[n]:(h[n]=i,o)},o.addItems=function(n){return s.a&&s.a("string"===i.type(n)?i(n):n),o},o.getItems=function(){return s.g?s.g():{}},o.update=function(n){return s.e&&s.e({},!n),o},o.force=function(n){return s.f&&s.f("string"===i.type(n)?i(n):n),o},o.loadAll=function(){return s.e&&s.e({all:!0},!0),o},o.destroy=function(){return i(h.appendScroll).off("."+c,s.e),i(n).off("."+c),s={},t},f(o,h,r,s,c),h.chainable?r:o}var i=n.jQuery||n.Zepto,e=0,u=!1;i.fn.Lazy=i.fn.lazy=function(n){return new r(this,n)};i.Lazy=i.lazy=function(n,u,f){var s,h;if(i.isFunction(u)&&(f=u,u=[]),i.isFunction(f)){n=i.isArray(n)?n:[n];u=i.isArray(u)?u:[u];for(var e=r.prototype.config,c=e._f||(e._f={}),o=0,l=n.length;o<l;o++)(e[n[o]]===t||i.isFunction(e[n[o]]))&&(e[n[o]]=f);for(s=0,h=u.length;s<h;s++)c[u[s]]=n[0]}};r.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:n,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:t,afterLoad:t,onError:t,onFinishedAll:t};i(n).on("load",function(){u=!0})}(window);+function(){"use strict";function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var n=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();(function(i){var r="ekkoLightbox",e=i.fn[r],f={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div><\/div><div><\/div><\/div><\/div>',leftArrow:"<span>&#10094;<\/span>",rightArrow:"<span>&#10095;<\/span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},u=function(){function r(n,u){var e=this;t(this,r);this._config=i.extend({},f,u);this._$modalArrows=null;this._galleryIndex=0;this._galleryName=null;this._padding=null;this._border=null;this._titleIsShown=!1;this._footerIsShown=!1;this._wantedWidth=0;this._wantedHeight=0;this._touchstartX=0;this._touchendX=0;this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1);this._$element=n instanceof jQuery?n:i(n);this._isBootstrap3=3==i.fn.modal.Constructor.VERSION[0];var o='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"<\/h4>",s='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;<\/span><\/button>',h='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?s+o:o+s)+"<\/div>",c='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"<\/div>",l='<div class="modal-dialog" role="document"><div class="modal-content">'+h+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"><\/div><div class="ekko-lightbox-item fade"><\/div><\/div><\/div>'+c+"<\/div><\/div>";i(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+l+"<\/div>");this._$modal=i("#"+this._modalId,this._config.doc);this._$modalDialog=this._$modal.find(".modal-dialog").first();this._$modalContent=this._$modal.find(".modal-content").first();this._$modalBody=this._$modal.find(".modal-body").first();this._$modalHeader=this._$modal.find(".modal-header").first();this._$modalFooter=this._$modal.find(".modal-footer").first();this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first();this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first();this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first();this._border=this._calculateBorders();this._padding=this._calculatePadding();this._galleryName=this._$element.data("gallery");this._galleryName&&(this._$galleryItems=i(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),i(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'<\/a><a href="#">'+this._config.rightArrow+"<\/a><\/div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(n){return n.preventDefault(),e.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(n){return n.preventDefault(),e.navigateRight()}),this.updateNavigation()));this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return e._toggleLoading(!0),e._handle(),e._config.onShown.call(e)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return e._galleryName&&(i(document).off("keydown.ekkoLightbox"),i(window).off("resize.ekkoLightbox")),e._$modal.remove(),e._config.onHidden.call(e)}).modal(this._config);i(window).on("resize.ekkoLightbox",function(){e._resize(e._wantedWidth,e._wantedHeight)});this._$lightboxContainer.on("touchstart",function(){e._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){e._touchendX=event.changedTouches[0].screenX;e._swipeGesure()})}return n(r,null,[{key:"Default",get:function(){return f}}]),n(r,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(n){return n<0||n>this._$galleryItems.length-1?this:(this._galleryIndex=n,this.updateNavigation(),this._$element=i(this._$galleryItems.get(this._galleryIndex)),void this._handle())}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var n=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?n.find("a:first-child").addClass("disabled"):n.find("a:first-child").removeClass("disabled");this._galleryIndex===this._$galleryItems.length-1?n.find("a:last-child").addClass("disabled"):n.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(n){return n=n||window.event,39===n.keyCode?this.navigateRight():37===n.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(n,t){return t=t||!1,!t&&this._isImage(n)&&(t="image"),!t&&this._getYoutubeId(n)&&(t="youtube"),!t&&this._getVimeoId(n)&&(t="vimeo"),!t&&this._getInstagramId(n)&&(t="instagram"),("audio"==t||"video"==t||!t&&this._isMedia(n))&&(t="media"),(!t||["image","youtube","vimeo","instagram","media","url"].indexOf(t)<0)&&(t="url"),t}},{key:"_getRemoteContentType",value:function(n){var t=i.ajax({type:"HEAD",url:n,async:!1});return t.getResponseHeader("Content-Type")}},{key:"_isImage",value:function(n){return n&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_isMedia",value:function(n){return n&&n.match(/(\.(mp3|mp4|ogg|webm|wav)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var n=this,t=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(t=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){n._$lightboxBodyTwo.hasClass("in")||n._$lightboxBodyTwo.empty();n._$lightboxBodyOne.hasClass("in")||n._$lightboxBodyOne.empty()},500),t.addClass("in show"),t}},{key:"_handle",value:function(){var t=this._containerToUse(),n,i;if(this._updateTitleAndFooter(),n=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(n,this._$element.attr("data-type")||!1),["image","youtube","vimeo","instagram","media","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(n,t);this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(n,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(n),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(n),t);break;case"media":this._showHtml5Media(n,t);break;default:this._loadRemoteContent(n,t)}return this}},{key:"_getYoutubeId",value:function(n){if(!n)return!1;var t=n.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!t||11!==t[2].length)&&t[2]}},{key:"_getVimeoId",value:function(n){return!!(n&&n.indexOf("vimeo")>0)&&n}},{key:"_getInstagramId",value:function(n){return!!(n&&n.indexOf("instagram")>0)&&n}},{key:"_toggleLoading",value:function(n){return n=n||!1,n?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),i(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),i(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(n){return parseInt(this._$modalDialog.css(n),10)+parseInt(this._$modalContent.css(n),10)+parseInt(this._$modalBody.css(n),10)}},{key:"_updateTitleAndFooter",value:function(){var n=this._$element.data("title")||"",t=this._$element.data("footer")||"";return this._titleIsShown=!1,n||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(n||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,t?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(t)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(n,t){var r=this._getYoutubeId(n),u=n.indexOf("&")>0?n.substr(n.indexOf("&")):"",i=this._$element.data("width")||560,f=this._$element.data("height")||i/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+r+"?badge=0&autoplay=1&html5=1"+u,i,f,t)}},{key:"_showVimeoVideo",value:function(n,t){var i=this._$element.data("width")||500,r=this._$element.data("height")||i/(560/315);return this._showVideoIframe(n+"?autoplay=1",i,r,t)}},{key:"_showInstagramVideo",value:function(n,t){var i=this._$element.data("width")||612,r=i+80;return n="/"!==n.substr(-1)?n+"/":n,t.html('<iframe width="'+i+'" height="'+r+'" src="'+n+'embed/" frameborder="0" allowfullscreen><\/iframe>'),this._resize(i,r),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(n,t,i,r){return i=i||t,r.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+t+'" height="'+i+'" src="'+n+'" frameborder="0" allowfullscreen class="embed-responsive-item"><\/iframe><\/div>'),this._resize(t,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Media",value:function(n,t){var u=this._getRemoteContentType(n),i,r,f;return u?(i="",i=u.indexOf("audio")>0?"audio":"video",r=this._$element.data("width")||560,f=this._$element.data("height")||r/(560/315),t.html('<div class="embed-responsive embed-responsive-16by9"><'+i+' width="'+r+'" height="'+f+'" preload="auto" autoplay controls class="embed-responsive-item"><source src="'+n+'" type="'+u+'">'+this._config.strings.type+"<\/"+i+"><\/div>"),this._resize(r,f),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this):this._error(this._config.strings.type)}},{key:"_loadRemoteContent",value:function(n,t){var r=this,u=this._$element.data("width")||560,f=this._$element.data("height")||560,e=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),e||this._isExternal(n)?(t.html('<iframe src="'+n+'" frameborder="0" allowfullscreen><\/iframe>'),this._config.onContentLoaded.call(this)):t.load(n,i.proxy(function(){return r._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(u,f),this}},{key:"_isExternal",value:function(n){var t=n.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof t[1]&&t[1].length>0&&t[1].toLowerCase()!==location.protocol||"string"==typeof t[2]&&t[2].length>0&&t[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(n){return console.error(n),this._containerToUse().html(n),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(n,t){var r,u;if(this._$galleryItems&&(r=i(this._$galleryItems.get(n),!1),"undefined"!=typeof r))return u=r.attr("data-remote")||r.attr("href"),("image"===r.attr("data-type")||this._isImage(u))&&this._preloadImage(u,!1),t>0?this._preloadImageByIndex(n+1,t-1):void 0}},{key:"_preloadImage",value:function(n,t){var r=this,u;return t=t||!1,u=new Image,t&&!function(){var f=setTimeout(function(){t.append(r._config.loadingMessage)},200);u.onload=function(){f&&clearTimeout(f);f=null;var n=i("<img />");return n.attr("src",u.src),n.addClass("img-fluid"),n.css("width","100%"),t.html(n),r._$modalArrows&&r._$modalArrows.css("display",""),r._resize(u.width,u.height),r._toggleLoading(!1),r._config.onContentLoaded.call(r)};u.onerror=function(){return r._toggleLoading(!1),r._error(r._config.strings.fail+("  "+n))}}(),u.src=n,u}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(n,t){var u,f,e;t=t||n;this._wantedWidth=n;this._wantedHeight=t;var h=n/t,r=this._padding.left+this._padding.right+this._border.left+this._border.right,l=this._config.doc.body.clientWidth>575?20:0,a=this._config.doc.body.clientWidth>575?0:20,o=Math.min(n+r,this._config.doc.body.clientWidth-l,this._config.maxWidth);n+r>o?(t=(o-r-a)/h,n=o):n+=r;u=0;f=0;this._footerIsShown&&(f=this._$modalFooter.outerHeight(!0)||55);this._titleIsShown&&(u=this._$modalHeader.outerHeight(!0)||67);var c=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,v=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),s=Math.min(t,i(window).height()-c-v-u-f,this._config.maxHeight-c-u-f);if(t>s&&(n=Math.ceil(s*h)+r),this._$lightboxContainer.css("height",s),this._$modalDialog.css("flex",1).css("maxWidth",n),e=this._$modal.data("bs.modal"),e)try{e._handleUpdate()}catch(y){e.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(n){var t=this;return n=n||{},this.each(function(){var u=i(t),f=i.extend({},r.Default,u.data(),"object"==typeof n&&n);new r(t,f)})}}]),r}();return i.fn[r]=u._jQueryInterface,i.fn[r].Constructor=u,i.fn[r].noConflict=function(){return i.fn[r]=e,u._jQueryInterface},u})(jQuery)}(jQuery);!function(n,t,i,r){function u(t,i){this.settings=null;this.options=n.extend({},u.Defaults,i);this.$element=n(t);this._handlers={};this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._widths=[];this._invalidated={};this._pipe=[];this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null};this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}};n.each(["onResize","onThrottledResize"],n.proxy(function(t,i){this._handlers[i]=n.proxy(this[i],this)},this));n.each(u.Plugins,n.proxy(function(n,t){this._plugins[n.charAt(0).toLowerCase()+n.slice(1)]=new t(this)},this));n.each(u.Workers,n.proxy(function(t,i){this._pipe.push({filter:i.filter,run:n.proxy(i.run,this)})},this));this.setup();this.initialize()}u.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:t,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"};u.Width={Default:"default",Inner:"inner",Outer:"outer"};u.Type={Event:"event",State:"state"};u.Plugins={};u.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(n){n.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(n){var t=this.settings.margin||"",u=!this.settings.autoWidth,i=this.settings.rtl,r={width:"auto","margin-left":i?t:"","margin-right":i?"":t};u||this.$stage.children().css(r);n.css=r}},{filter:["width","items","settings"],run:function(n){var r=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,t=null,i=this._items.length,f=!this.settings.autoWidth,u=[];for(n.items={merge:!1,width:r};i--;)t=this._mergers[i],t=this.settings.mergeFit&&Math.min(t,this.settings.items)||t,n.items.merge=t>1||n.items.merge,u[i]=f?r*t:this._items[i].width();this._widths=u}},{filter:["items","settings"],run:function(){var t=[],i=this._items,r=this.settings,e=Math.max(2*r.items,4),s=2*Math.ceil(i.length/2),u=r.loop&&i.length?r.rewind?e:Math.max(e,s):0,o="",f="";for(u/=2;u>0;)t.push(this.normalize(t.length/2,!0)),o+=i[t[t.length-1]][0].outerHTML,t.push(this.normalize(i.length-1-(t.length-1)/2,!0)),f=i[t[t.length-1]][0].outerHTML+f,u-=1;this._clones=t;n(o).addClass("cloned").appendTo(this.$stage);n(f).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var u=this.settings.rtl?1:-1,f=this._clones.length+this._items.length,n=-1,i=0,r=0,t=[];++n<f;)i=t[n-1]||0,r=this._widths[this.relative(n)]+this.settings.margin,t.push(i+r*u);this._coordinates=t}},{filter:["width","items","settings"],run:function(){var n=this.settings.stagePadding,t=this._coordinates,i={width:Math.ceil(Math.abs(t[t.length-1]))+2*n,"padding-left":n||"","padding-right":n||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(n){var t=this._coordinates.length,i=!this.settings.autoWidth,r=this.$stage.children();if(i&&n.items.merge)for(;t--;)n.css.width=this._widths[this.relative(t)],r.eq(t).css(n.css);else i&&(n.css.width=n.items.width,r.css(n.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(n){n.current=n.current?this.$stage.children().index(n.current):0;n.current=Math.max(this.minimum(),Math.min(this.maximum(),n.current));this.reset(n.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){for(var t,i,f=this.settings.rtl?1:-1,e=2*this.settings.stagePadding,r=this.coordinates(this.current())+e,o=r+this.width()*f,s=[],n=0,u=this._coordinates.length;n<u;n++)t=this._coordinates[n-1]||0,i=Math.abs(this._coordinates[n])+e*f,(this.op(t,"<=",r)&&this.op(t,">",o)||this.op(i,"<",r)&&this.op(i,">",o))&&s.push(n);this.$stage.children(".active").removeClass("active");this.$stage.children(":eq("+s.join("), :eq(")+")").addClass("active");this.$stage.children(".center").removeClass("center");this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}];u.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass);this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=n("<"+this.settings.stageElement+">",{"class":this.settings.stageClass}).wrap(n("<div/>",{"class":this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))};u.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return n(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent()));this.isVisible()?this.refresh():this.invalidate("width");this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)};u.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var n,t,i;n=this.$element.find("img");t=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:r;i=this.$element.children(t).width();n.length&&i<=0&&this.preloadAutoWidthImages(n)}this.initializeStage();this.initializeItems();this.registerEventHandlers();this.leave("initializing");this.trigger("initialized")};u.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")};u.prototype.setup=function(){var u=this.viewport(),r=this.options.responsive,i=-1,t=null;r?(n.each(r,function(n){n<=u&&n>i&&(i=Number(n))}),t=n.extend({},this.options,r[i]),"function"==typeof t.stagePadding&&(t.stagePadding=t.stagePadding()),delete t.responsive,t.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):t=n.extend({},this.options);this.trigger("change",{property:{name:"settings",value:t}});this._breakpoint=i;this.settings=t;this.invalidate("settings");this.trigger("changed",{property:{name:"settings",value:this.settings}})};u.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)};u.prototype.prepare=function(t){var i=this.trigger("prepare",{content:t});return i.data||(i.data=n("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:i.data}),i.data};u.prototype.update=function(){for(var t=0,i=this._pipe.length,r=n.proxy(function(n){return this[n]},this._invalidated),u={};t<i;)(this._invalidated.all||n.grep(this._pipe[t].filter,r).length>0)&&this._pipe[t].run(u),t++;this._invalidated={};this.is("valid")||this.enter("valid")};u.prototype.width=function(n){switch(n=n||u.Width.Default){case u.Width.Inner:case u.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}};u.prototype.refresh=function(){this.enter("refreshing");this.trigger("refresh");this.setup();this.optionsLogic();this.$element.addClass(this.options.refreshClass);this.update();this.$element.removeClass(this.options.refreshClass);this.leave("refreshing");this.trigger("refreshed")};u.prototype.onThrottledResize=function(){t.clearTimeout(this.resizeTimer);this.resizeTimer=t.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)};u.prototype.onResize=function(){return!!this._items.length&&this._width!==this.$element.width()&&!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))};u.prototype.registerEventHandlers=function(){n.support.transition&&this.$stage.on(n.support.transition.end+".owl.core",n.proxy(this.onTransitionEnd,this));!1!==this.settings.responsive&&this.on(t,"resize",this._handlers.onThrottledResize);this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",n.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1}));this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",n.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",n.proxy(this.onDragEnd,this)))};u.prototype.onDragStart=function(t){var r=null;3!==t.which&&(n.support.transform?(r=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),r={x:r[16===r.length?12:4],y:r[16===r.length?13:5]}):(r=this.$stage.position(),r={x:this.settings.rtl?r.left+this.$stage.width()-this.width()+this.settings.margin:r.left,y:r.top}),this.is("animating")&&(n.support.transform?this.animate(r.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=n(t.target),this._drag.stage.start=r,this._drag.stage.current=r,this._drag.pointer=this.pointer(t),n(i).on("mouseup.owl.core touchend.owl.core",n.proxy(this.onDragEnd,this)),n(i).one("mousemove.owl.core touchmove.owl.core",n.proxy(function(t){var r=this.difference(this._drag.pointer,this.pointer(t));n(i).on("mousemove.owl.core touchmove.owl.core",n.proxy(this.onDragMove,this));Math.abs(r.x)<Math.abs(r.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))};u.prototype.onDragMove=function(n){var t=null,i=null,u=null,f=this.difference(this._drag.pointer,this.pointer(n)),r=this.difference(this._drag.stage.start,f);this.is("dragging")&&(n.preventDefault(),this.settings.loop?(t=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-t,r.x=((r.x-t)%i+i)%i+t):(t=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),u=this.settings.pullDrag?f.x/-5:0,r.x=Math.max(Math.min(r.x,t+u),i+u)),this._drag.stage.current=r,this.animate(r.x))};u.prototype.onDragEnd=function(t){var r=this.difference(this._drag.pointer,this.pointer(t)),f=this._drag.stage.current,u=r.x>0^this.settings.rtl?"left":"right";n(i).off(".owl.core");this.$element.removeClass(this.options.grabClass);(0!==r.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(f.x,0!==r.x?u:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=u,(Math.abs(r.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1}));this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))};u.prototype.closest=function(t,i){var u=-1,e=30,o=this.width(),f=this.coordinates();return this.settings.freeDrag||n.each(f,n.proxy(function(n,s){return"left"===i&&t>s-e&&t<s+e?u=n:"right"===i&&t>s-o-e&&t<s-o+e?u=n+1:this.op(t,"<",s)&&this.op(t,">",f[n+1]!==r?f[n+1]:s-o)&&(u="left"===i?n+1:n),-1===u},this)),this.settings.loop||(this.op(t,">",f[this.minimum()])?u=t=this.minimum():this.op(t,"<",f[this.maximum()])&&(u=t=this.maximum())),u};u.prototype.animate=function(t){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd();i&&(this.enter("animating"),this.trigger("translate"));n.support.transform3d&&n.support.transition?this.$stage.css({transform:"translate3d("+t+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,n.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"})};u.prototype.is=function(n){return this._states.current[n]&&this._states.current[n]>0};u.prototype.current=function(n){if(n===r)return this._current;if(0===this._items.length)return r;if(n=this.normalize(n),this._current!==n){var t=this.trigger("change",{property:{name:"position",value:n}});t.data!==r&&(n=this.normalize(t.data));this._current=n;this.invalidate("position");this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current};u.prototype.invalidate=function(t){return"string"===n.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),n.map(this._invalidated,function(n,t){return t})};u.prototype.reset=function(n){(n=this.normalize(n))!==r&&(this._speed=0,this._current=n,this.suppress(["translate","translated"]),this.animate(this.coordinates(n)),this.release(["translate","translated"]))};u.prototype.normalize=function(n,t){var i=this._items.length,u=t?0:this._clones.length;return!this.isNumeric(n)||i<1?n=r:(n<0||n>=i+u)&&(n=((n-u/2)%i+i)%i+u/2),n};u.prototype.relative=function(n){return n-=this._clones.length/2,this.normalize(n,!0)};u.prototype.maximum=function(n){var t,u,f,i=this.settings,r=this._coordinates.length;if(i.loop)r=this._clones.length/2+this._items.length-1;else if(i.autoWidth||i.merge){if(t=this._items.length)for(u=this._items[--t].width(),f=this.$element.width();t--&&!((u+=this._items[t].width()+this.settings.margin)>f););r=t+1}else r=i.center?this._items.length-1:this._items.length-i.items;return n&&(r-=this._clones.length/2),Math.max(r,0)};u.prototype.minimum=function(n){return n?0:this._clones.length/2};u.prototype.items=function(n){return n===r?this._items.slice():(n=this.normalize(n,!0),this._items[n])};u.prototype.mergers=function(n){return n===r?this._mergers.slice():(n=this.normalize(n,!0),this._mergers[n])};u.prototype.clones=function(t){var i=this._clones.length/2,f=i+this._items.length,u=function(n){return n%2==0?f+n/2:i-(n+1)/2};return t===r?n.map(this._clones,function(n,t){return u(t)}):n.map(this._clones,function(n,i){return n===t?u(i):null})};u.prototype.speed=function(n){return n!==r&&(this._speed=n),this._speed};u.prototype.coordinates=function(t){var i,f=1,u=t-1;return t===r?n.map(this._coordinates,n.proxy(function(n,t){return this.coordinates(t)},this)):(this.settings.center?(this.settings.rtl&&(f=-1,u=t+1),i=this._coordinates[t],i+=(this.width()-i+(this._coordinates[u]||0))/2*f):i=this._coordinates[u]||0,i=Math.ceil(i))};u.prototype.duration=function(n,t,i){return 0===i?0:Math.min(Math.max(Math.abs(t-n),1),6)*Math.abs(i||this.settings.smartSpeed)};u.prototype.to=function(n,t){var u=this.current(),f=null,i=n-this.relative(u),s=(i>0)-(i<0),e=this._items.length,o=this.minimum(),r=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(i)>e/2&&(i+=-1*s*e),n=u+i,(f=((n-o)%e+e)%e+o)!==n&&f-i<=r&&f-i>0&&(u=f-i,n=f,this.reset(u))):this.settings.rewind?(r+=1,n=(n%r+r)%r):n=Math.max(o,Math.min(r,n));this.speed(this.duration(u,n,t));this.current(n);this.isVisible()&&this.update()};u.prototype.next=function(n){n=n||!1;this.to(this.relative(this.current())+1,n)};u.prototype.prev=function(n){n=n||!1;this.to(this.relative(this.current())-1,n)};u.prototype.onTransitionEnd=function(n){if(n!==r&&(n.stopPropagation(),(n.target||n.srcElement||n.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating");this.trigger("translated")};u.prototype.viewport=function(){var r;return this.options.responsiveBaseElement!==t?r=n(this.options.responsiveBaseElement).width():t.innerWidth?r=t.innerWidth:i.documentElement&&i.documentElement.clientWidth?r=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),r};u.prototype.replace=function(t){this.$stage.empty();this._items=[];t&&(t=t instanceof jQuery?t:n(t));this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector));t.filter(function(){return 1===this.nodeType}).each(n.proxy(function(n,t){t=this.prepare(t);this.$stage.append(t);this._items.push(t);this._mergers.push(1*t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this));this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0);this.invalidate("items")};u.prototype.add=function(t,i){var u=this.relative(this._current);i=i===r?this._items.length:this.normalize(i,!0);t=t instanceof jQuery?t:n(t);this.trigger("add",{content:t,position:i});t=this.prepare(t);0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[i-1].after(t),this._items.push(t),this._mergers.push(1*t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(t),this._items.splice(i,0,t),this._mergers.splice(i,0,1*t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1));this._items[u]&&this.reset(this._items[u].index());this.invalidate("items");this.trigger("added",{content:t,position:i})};u.prototype.remove=function(n){(n=this.normalize(n,!0))!==r&&(this.trigger("remove",{content:this._items[n],position:n}),this._items[n].remove(),this._items.splice(n,1),this._mergers.splice(n,1),this.invalidate("items"),this.trigger("removed",{content:null,position:n}))};u.prototype.preloadAutoWidthImages=function(t){t.each(n.proxy(function(t,i){this.enter("pre-loading");i=n(i);n(new Image).one("load",n.proxy(function(n){i.attr("src",n.target.src);i.css("opacity",1);this.leave("pre-loading");!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))};u.prototype.destroy=function(){this.$element.off(".owl.core");this.$stage.off(".owl.core");n(i).off(".owl.core");!1!==this.settings.responsive&&(t.clearTimeout(this.resizeTimer),this.off(t,"resize",this._handlers.onThrottledResize));for(var r in this._plugins)this._plugins[r].destroy();this.$stage.children(".cloned").remove();this.$stage.unwrap();this.$stage.children().contents().unwrap();this.$stage.children().unwrap();this.$stage.remove();this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")};u.prototype.op=function(n,t,i){var r=this.settings.rtl;switch(t){case"<":return r?n>i:n<i;case">":return r?n<i:n>i;case">=":return r?n<=i:n>=i;case"<=":return r?n>=i:n<=i}};u.prototype.on=function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r):n.attachEvent&&n.attachEvent("on"+t,i)};u.prototype.off=function(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r):n.detachEvent&&n.detachEvent("on"+t,i)};u.prototype.trigger=function(t,i,r){var o={item:{count:this._items.length,index:this.current()}},e=n.camelCase(n.grep(["on",t,r],function(n){return n}).join("-").toLowerCase()),f=n.Event([t,"owl",r||"carousel"].join(".").toLowerCase(),n.extend({relatedTarget:this},o,i));return this._supress[t]||(n.each(this._plugins,function(n,t){t.onTrigger&&t.onTrigger(f)}),this.register({type:u.Type.Event,name:t}),this.$element.trigger(f),this.settings&&"function"==typeof this.settings[e]&&this.settings[e].call(this,f)),f};u.prototype.enter=function(t){n.each([t].concat(this._states.tags[t]||[]),n.proxy(function(n,t){this._states.current[t]===r&&(this._states.current[t]=0);this._states.current[t]++},this))};u.prototype.leave=function(t){n.each([t].concat(this._states.tags[t]||[]),n.proxy(function(n,t){this._states.current[t]--},this))};u.prototype.register=function(t){if(t.type===u.Type.Event){if(n.event.special[t.name]||(n.event.special[t.name]={}),!n.event.special[t.name].owl){var i=n.event.special[t.name]._default;n.event.special[t.name]._default=function(n){return!i||!i.apply||n.namespace&&-1!==n.namespace.indexOf("owl")?n.namespace&&n.namespace.indexOf("owl")>-1:i.apply(this,arguments)};n.event.special[t.name].owl=!0}}else t.type===u.Type.State&&(this._states.tags[t.name]=this._states.tags[t.name]?this._states.tags[t.name].concat(t.tags):t.tags,this._states.tags[t.name]=n.grep(this._states.tags[t.name],n.proxy(function(i,r){return n.inArray(i,this._states.tags[t.name])===r},this)))};u.prototype.suppress=function(t){n.each(t,n.proxy(function(n,t){this._supress[t]=!0},this))};u.prototype.release=function(t){n.each(t,n.proxy(function(n,t){delete this._supress[t]},this))};u.prototype.pointer=function(n){var i={x:null,y:null};return n=n.originalEvent||n||t.event,n=n.touches&&n.touches.length?n.touches[0]:n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,n.pageX?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i};u.prototype.isNumeric=function(n){return!isNaN(parseFloat(n))};u.prototype.difference=function(n,t){return{x:n.x-t.x,y:n.y-t.y}};n.fn.owlCarousel=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var f=n(this),r=f.data("owl.carousel");r||(r=new u(this,"object"==typeof t&&t),f.data("owl.carousel",r),n.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,i){r.register({type:u.Type.Event,name:i});r.$element.on(i+".owl.carousel.core",n.proxy(function(n){n.namespace&&n.relatedTarget!==this&&(this.suppress([i]),r[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},r))}));"string"==typeof t&&"_"!==t.charAt(0)&&r[t].apply(r,i)})};n.fn.owlCarousel.Constructor=u}(window.Zepto||window.jQuery,window,document),function(n,t){var i=function(t){this._core=t;this._interval=null;this._visible=null;this._handlers={"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoRefresh&&this.watch()},this)};this._core.options=n.extend({},i.Defaults,this._core.options);this._core.$element.on(this._handlers)};i.Defaults={autoRefresh:!0,autoRefreshInterval:500};i.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=t.setInterval(n.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))};i.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())};i.prototype.destroy=function(){var n,i;t.clearInterval(this._interval);for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)};n.fn.owlCarousel.Constructor.Plugins.AutoRefresh=i}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){var u=function(t){this._core=t;this._loaded=[];this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":n.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var i=this._core.settings,u=i.center&&Math.ceil(i.items/2)||i.items,e=i.center&&-1*u||0,f=(t.property&&t.property.value!==r?t.property.value:this._core.current())+e,o=this._core.clones().length,s=n.proxy(function(n,t){this.load(t)},this);for(i.lazyLoadEager>0&&(u+=i.lazyLoadEager,i.loop&&(f-=i.lazyLoadEager,u++));e++<u;)this.load(o/2+this._core.relative(f)),o&&n.each(this._core.clones(this._core.relative(f)),s),f++}},this)};this._core.options=n.extend({},u.Defaults,this._core.options);this._core.$element.on(this._handlers)};u.Defaults={lazyLoad:!1,lazyLoadEager:0};u.prototype.load=function(i){var r=this._core.$stage.children().eq(i),u=r&&r.find(".owl-lazy");!u||n.inArray(r.get(0),this._loaded)>-1||(u.each(n.proxy(function(i,r){var e,u=n(r),f=t.devicePixelRatio>1&&u.attr("data-src-retina")||u.attr("data-src")||u.attr("data-srcset");this._core.trigger("load",{element:u,url:f},"lazy");u.is("img")?u.one("load.owl.lazy",n.proxy(function(){u.css("opacity",1);this._core.trigger("loaded",{element:u,url:f},"lazy")},this)).attr("src",f):u.is("source")?u.one("load.owl.lazy",n.proxy(function(){this._core.trigger("loaded",{element:u,url:f},"lazy")},this)).attr("srcset",f):(e=new Image,e.onload=n.proxy(function(){u.css({"background-image":'url("'+f+'")',opacity:"1"});this._core.trigger("loaded",{element:u,url:f},"lazy")},this),e.src=f)},this)),this._loaded.push(r.get(0)))};u.prototype.destroy=function(){var n,t;for(n in this.handlers)this._core.$element.off(n,this.handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Lazy=u}(window.Zepto||window.jQuery,window,document),function(n,t){var i=function(r){this._core=r;this._previousHeight=null;this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&"position"===n.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&n.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)};this._core.options=n.extend({},i.Defaults,this._core.options);this._core.$element.on(this._handlers);this._intervalId=null;var u=this;n(t).on("load",function(){u._core.settings.autoHeight&&u.update()});n(t).resize(function(){u._core.settings.autoHeight&&(null!=u._intervalId&&clearTimeout(u._intervalId),u._intervalId=setTimeout(function(){u.update()},250))})};i.Defaults={autoHeight:!1,autoHeightClass:"owl-height"};i.prototype.update=function(){var i=this._core._current,u=i+this._core.settings.items,f=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(i,u),r=[],t=0;n.each(e,function(t,i){r.push(n(i).height())});t=Math.max.apply(null,r);t<=1&&f&&this._previousHeight&&(t=this._previousHeight);this._previousHeight=t;this._core.$stage.parent().height(t).addClass(this._core.settings.autoHeightClass)};i.prototype.destroy=function(){var n,t;for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.AutoHeight=i}(window.Zepto||window.jQuery,window,document),function(n,t,i){var r=function(t){this._core=t;this._videos={};this._playing=null;this._handlers={"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.video&&this.isInFullScreen()&&n.preventDefault()},this),"refreshed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&"position"===n.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":n.proxy(function(t){if(t.namespace){var i=n(t.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,n(t.content)))}},this)};this._core.options=n.extend({},r.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on("click.owl.video",".owl-video-play-icon",n.proxy(function(n){this.play(n)},this))};r.Defaults={video:!1,videoHeight:!1,videoWidth:!1};r.prototype.fetch=function(n,t){var u=function(){return n.attr("data-vimeo-id")?"vimeo":n.attr("data-vzaar-id")?"vzaar":"youtube"}(),i=n.attr("data-vimeo-id")||n.attr("data-youtube-id")||n.attr("data-vzaar-id"),f=n.attr("data-width")||this._core.settings.videoWidth,e=n.attr("data-height")||this._core.settings.videoHeight,r=n.attr("href");if(!r)throw new Error("Missing video URL.");if(i=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),i[3].indexOf("youtu")>-1)u="youtube";else if(i[3].indexOf("vimeo")>-1)u="vimeo";else{if(!(i[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");u="vzaar"}i=i[6];this._videos[r]={type:u,id:i,width:f,height:e};t.attr("data-video",r);this.thumbnail(n,this._videos[r])};r.prototype.thumbnail=function(t,i){var e,o,r,c=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",f=t.find("img"),s="src",h="",l=this._core.settings,u=function(i){o='<div class="owl-video-play-icon"><\/div>';e=l.lazyLoad?n("<div/>",{"class":"owl-video-tn "+h,srcType:i}):n("<div/>",{"class":"owl-video-tn",style:"opacity:1;background-image:url("+i+")"});t.after(e);t.after(o)};if(t.wrap(n("<div/>",{"class":"owl-video-wrapper",style:c})),this._core.settings.lazyLoad&&(s="data-src",h="owl-lazy"),f.length)return u(f.attr(s)),f.remove(),!1;"youtube"===i.type?(r="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",u(r)):"vimeo"===i.type?n.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(n){r=n[0].thumbnail_large;u(r)}}):"vzaar"===i.type&&n.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(n){r=n.framegrab_url;u(r)}})};r.prototype.stop=function(){this._core.trigger("stop",null,"video");this._playing.find(".owl-video-frame").remove();this._playing.removeClass("owl-video-playing");this._playing=null;this._core.leave("playing");this._core.trigger("stopped",null,"video")};r.prototype.play=function(t){var r,f=n(t.target),u=f.closest("."+this._core.settings.itemClass),i=this._videos[u.attr("data-video")],e=i.width||"100%",o=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),u=this._core.items(this._core.relative(u.index())),this._core.reset(u.index()),r=n('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ><\/iframe>'),r.attr("height",o),r.attr("width",e),"youtube"===i.type?r.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?r.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&r.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),n(r).wrap('<div class="owl-video-frame" />').insertAfter(u.find(".owl-video")),this._playing=u.addClass("owl-video-playing"))};r.prototype.isInFullScreen=function(){var t=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return t&&n(t).parent().hasClass("owl-video-frame")};r.prototype.destroy=function(){var n,t;this._core.$element.off("click.owl.video");for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Video=r}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){var u=function(t){this.core=t;this.core.options=n.extend({},u.Defaults,this.core.options);this.swapping=!0;this.previous=r;this.next=r;this.handlers={"change.owl.carousel":n.proxy(function(n){n.namespace&&"position"==n.property.name&&(this.previous=this.core.current(),this.next=n.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":n.proxy(function(n){n.namespace&&(this.swapping="translated"==n.type)},this),"translate.owl.carousel":n.proxy(function(n){n.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)};this.core.$element.on(this.handlers)};u.Defaults={animateOut:!1,animateIn:!1};u.prototype.swap=function(){if(1===this.core.settings.items&&n.support.animation&&n.support.transition){this.core.speed(0);var t,i=n.proxy(this.clear,this),f=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),r=this.core.settings.animateIn,u=this.core.settings.animateOut;this.core.current()!==this.previous&&(u&&(t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),f.one(n.support.animation.end,i).css({left:t+"px"}).addClass("animated owl-animated-out").addClass(u)),r&&e.one(n.support.animation.end,i).addClass("animated owl-animated-in").addClass(r))}};u.prototype.clear=function(t){n(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.onTransitionEnd()};u.prototype.destroy=function(){var n,t;for(n in this.handlers)this.core.$element.off(n,this.handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Animate=u}(window.Zepto||window.jQuery,window,document),function(n,t,i){var r=function(t){this._core=t;this._call=null;this._time=0;this._timeout=0;this._paused=!0;this._handlers={"changed.owl.carousel":n.proxy(function(n){n.namespace&&"settings"===n.property.name?this._core.settings.autoplay?this.play():this.stop():n.namespace&&"position"===n.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":n.proxy(function(n,t,i){n.namespace&&this.play(t,i)},this),"stop.owl.autoplay":n.proxy(function(n){n.namespace&&this.stop()},this),"mouseover.owl.autoplay":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":n.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)};this._core.$element.on(this._handlers);this._core.options=n.extend({},r.Defaults,this._core.options)};r.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1};r.prototype._next=function(r){this._call=t.setTimeout(n.proxy(this._next,this,r),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read());this._core.is("interacting")||i.hidden||this._core.next(r||this._core.settings.autoplaySpeed)};r.prototype.read=function(){return(new Date).getTime()-this._time};r.prototype.play=function(i,r){var u;this._core.is("rotating")||this._core.enter("rotating");i=i||this._core.settings.autoplayTimeout;u=Math.min(this._time%(this._timeout||i),i);this._paused?(this._time=this.read(),this._paused=!1):t.clearTimeout(this._call);this._time+=this.read()%i-u;this._timeout=i;this._call=t.setTimeout(n.proxy(this._next,this,r),i-u)};r.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,t.clearTimeout(this._call),this._core.leave("rotating"))};r.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,t.clearTimeout(this._call))};r.prototype.destroy=function(){var n,t;this.stop();for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.autoplay=r}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var t=function(i){this._core=i;this._initialized=!1;this._pages=[];this._controls={};this._templates=[];this.$element=this._core.$element;this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to};this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"<\/div>")},this),"added.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.dotsData&&this._templates.splice(n.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.dotsData&&this._templates.splice(n.position,1)},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&"position"==n.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(n){n.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(n){n.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)};this._core.options=n.extend({},t.Defaults,this._core.options);this.$element.on(this._handlers)};t.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;<\/span>','<span aria-label="Next">&#x203a;<\/span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1};t.prototype.initialize=function(){var i,t=this._core.settings;this._controls.$relative=(t.navContainer?n(t.navContainer):n("<div>").addClass(t.navContainerClass).appendTo(this.$element)).addClass("disabled");this._controls.$previous=n("<"+t.navElement+">").addClass(t.navClass[0]).html(t.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(){this.prev(t.navSpeed)},this));this._controls.$next=n("<"+t.navElement+">").addClass(t.navClass[1]).html(t.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(){this.next(t.navSpeed)},this));t.dotsData||(this._templates=[n('<button role="button">').addClass(t.dotClass).append(n("<span>")).prop("outerHTML")]);this._controls.$absolute=(t.dotsContainer?n(t.dotsContainer):n("<div>").addClass(t.dotsClass).appendTo(this.$element)).addClass("disabled");this._controls.$absolute.on("click","button",n.proxy(function(i){var r=n(i.target).parent().is(this._controls.$absolute)?n(i.target).index():n(i.target).parent().index();i.preventDefault();this.to(r,t.dotsSpeed)},this));for(i in this._overrides)this._core[i]=n.proxy(this[i],this)};t.prototype.destroy=function(){var t,n,i,r,u=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(n in this._controls)"$relative"===n&&u.navContainer?this._controls[n].html(""):this._controls[n].remove();for(r in this.overides)this._core[r]=this._overrides[r];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)};t.prototype.update=function(){var t,i,f,r=this._core.clones().length/2,o=r+this._core.items().length,u=this._core.maximum(!0),n=this._core.settings,e=n.center||n.autoWidth||n.dotsData?1:n.dotsEach||n.items;if("page"!==n.slideBy&&(n.slideBy=Math.min(n.slideBy,n.items)),n.dots||"page"==n.slideBy)for(this._pages=[],t=r,i=0,f=0;t<o;t++){if(i>=e||0===i){if(this._pages.push({start:Math.min(u,t-r),end:t-r+e-1}),Math.min(u,t-r)===u)break;i=0;++f}i+=this._core.mergers(this._core.relative(t))}};t.prototype.draw=function(){var i,t=this._core.settings,r=this._core.items().length<=t.items,u=this._core.relative(this._core.current()),f=t.loop||t.rewind;this._controls.$relative.toggleClass("disabled",!t.nav||r);t.nav&&(this._controls.$previous.toggleClass("disabled",!f&&u<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&u>=this._core.maximum(!0)));this._controls.$absolute.toggleClass("disabled",!t.dots||r);t.dots&&(i=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!==i?this._controls.$absolute.html(this._templates.join("")):i>0?this._controls.$absolute.append(new Array(i+1).join(this._templates[0])):i<0&&this._controls.$absolute.children().slice(i).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))};t.prototype.onTrigger=function(t){var i=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}};t.prototype.current=function(){var t=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(n){return n.start<=t&&n.end>=t},this)).pop()};t.prototype.getPosition=function(t){var i,r,u=this._core.settings;return"page"==u.slideBy?(i=n.inArray(this.current(),this._pages),r=this._pages.length,t?++i:--i,i=this._pages[(i%r+r)%r].start):(i=this._core.relative(this._core.current()),r=this._core.items().length,t?i+=u.slideBy:i-=u.slideBy),i};t.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)};t.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)};t.prototype.to=function(t,i,r){var u;!r&&this._pages.length?(u=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%u+u)%u].start,i)):n.proxy(this._overrides.to,this._core)(t,i)};n.fn.owlCarousel.Constructor.Plugins.Navigation=t}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){"use strict";var u=function(i){this._core=i;this._hashes={};this.$element=this._core.$element;this._handlers={"initialized.owl.carousel":n.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&n(t).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":n.proxy(function(t){if(t.namespace){var i=n(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=t.content}},this),"changed.owl.carousel":n.proxy(function(i){if(i.namespace&&"position"===i.property.name){var u=this._core.items(this._core.relative(this._core.current())),r=n.map(this._hashes,function(n,t){return n===u?t:null}).join();if(!r||t.location.hash.slice(1)===r)return;t.location.hash=r}},this)};this._core.options=n.extend({},u.Defaults,this._core.options);this.$element.on(this._handlers);n(t).on("hashchange.owl.navigation",n.proxy(function(){var i=t.location.hash.substring(1),u=this._core.$stage.children(),n=this._hashes[i]&&u.index(this._hashes[i]);n!==r&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};u.Defaults={URLhashListener:!1};u.prototype.destroy=function(){var i,r;n(t).off("hashchange.owl.navigation");for(i in this._handlers)this._core.$element.off(i,this._handlers[i]);for(r in Object.getOwnPropertyNames(this))"function"!=typeof this[r]&&(this[r]=null)};n.fn.owlCarousel.Constructor.Plugins.Hash=u}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){function u(t,i){var u=!1,f=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+h.join(f+" ")+f).split(" "),function(n,t){if(s[t]!==r)return u=!i||t,!1}),u}function e(n){return u(n,!0)}var s=n("<support>").get(0).style,h="Webkit Moz O ms".split(" "),o={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},f={csstransforms:function(){return!!u("transform")},csstransforms3d:function(){return!!u("perspective")},csstransitions:function(){return!!u("transition")},cssanimations:function(){return!!u("animation")}};f.csstransitions()&&(n.support.transition=new String(e("transition")),n.support.transition.end=o.transition.end[n.support.transition]);f.cssanimations()&&(n.support.animation=new String(e("animation")),n.support.animation.end=o.animation.end[n.support.animation]);f.csstransforms()&&(n.support.transform=new String(e("transform")),n.support.transform3d=f.csstransforms3d())}(window.Zepto||window.jQuery,window,document);$(document).on("click",'[data-toggle="lightbox"]',function(n){n.preventDefault();$(this).ekkoLightbox({showArrows:!0,strings:{close:"Tancar",fail:"No s'ha pogut carregar la imatge...",type:"Imatge incorrecta"}})});window.mobilecheck=function(){var n=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0)}(navigator.userAgent||navigator.vendor||window.opera),n};String.prototype.replaceAll=function(n,t){var i=this;return i.replace(new RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),t)};CreateLoader=function(){this.$loader;this.$parent;this.$errorMessage;this.isLoading=!1;this.currentTimeout=null;this.init=function(n){this.$loader=$("#loader_"+n);this.$parent=$("#background_"+n);this.$errorMessage=$("#errorLoadingMessage_"+n);this.$errorMessage.text("");this.currentTimeout=null;this.$loader.removeClass("loading");this.$parent.addClass("no-display-back");this.$parent.removeClass("no-display")};this.load=function(){this.$errorMessage.text("");this.currentTimeout!=null&&window.clearTimeout(this.currentTimeout);this.$loader.removeClass("success").removeClass("error");this.$parent.removeClass("no-display-back");this.$loader.addClass("loading");this.isLoading=!0};this.success=function(){var n=this;this.currentTimeout=window.setTimeout(function(){n.$loader.removeClass("loading").addClass("success");this.currentTimeout=window.setTimeout(function(){n.hide()},2e3);n.isLoading=!1},100)};this.message=function(n){var t=this;this.$errorMessage.text(n);this.currentTimeout=window.setTimeout(function(){t.$loader.removeClass("loading").addClass("success");this.currentTimeout=window.setTimeout(function(){t.hide()},5e3);t.isLoading=!1},100)};this.error=function(n){var t=this;$(":button").prop("disabled",!1);this.$errorMessage.text(n);this.currentTimeout=window.setTimeout(function(){t.$loader.removeClass("loading").addClass("error");this.currentTimeout=window.setTimeout(function(){t.hide()},3e3);t.isLoading=!1},100)};this.hide=function(){this.isLoading||this.$loader.removeClass("success").removeClass("error");this.$loader.removeClass("loading");this.$parent.addClass("no-display-back");this.currentTimeout=null}};!function(n,t){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("jquery")):n.jQueryBridget=t(n,n.jQuery)}(window,function(n,t){"use strict";function i(i,u,o){function s(n,t,r){var u,e="$()."+i+'("'+t+'")';return n.each(function(n,s){var h=o.data(s,i),c,l;if(!h)return void f(i+" not initialized. Cannot call methods, i.e. "+e);if(c=h[t],!c||"_"==t.charAt(0))return void f(e+" is not a valid method");l=c.apply(h,r);u=void 0===u?l:u}),void 0!==u?u:n}function h(n,t){n.each(function(n,r){var f=o.data(r,i);f?(f.option(t),f._init()):(f=new u(r,t),o.data(r,i,f))})}o=o||t||n.jQuery;o&&(u.prototype.option||(u.prototype.option=function(n){o.isPlainObject(n)&&(this.options=o.extend(!0,this.options,n))}),o.fn[i]=function(n){if("string"==typeof n){var t=e.call(arguments,1);return s(this,n,t)}return h(this,n),this},r(o))}function r(n){!n||n&&n.bridget||(n.bridget=i)}var e=Array.prototype.slice,u=n.console,f="undefined"==typeof u?function(){}:function(n){u.error(n)};return r(t||n.jQuery),i}),function(n,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():n.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function t(){}var n=t.prototype;return n.on=function(n,t){if(n&&t){var i=this._events=this._events||{},r=i[n]=i[n]||[];return-1==r.indexOf(t)&&r.push(t),this}},n.once=function(n,t){if(n&&t){this.on(n,t);var i=this._onceEvents=this._onceEvents||{},r=i[n]=i[n]||{};return r[t]=!0,this}},n.off=function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return r=i.indexOf(t),-1!=r&&i.splice(r,1),this},n.emitEvent=function(n,t){var i=this._events&&this._events[n],u,f,r,e;if(i&&i.length){for(i=i.slice(0),t=t||[],u=this._onceEvents&&this._onceEvents[n],f=0;f<i.length;f++)r=i[f],e=u&&u[r],e&&(this.off(n,r),delete u[r]),r.apply(this,t);return this}},n.allOff=function(){delete this._events;delete this._onceEvents},t}),function(n,t){"function"==typeof define&&define.amd?define("get-size/get-size",t):"object"==typeof module&&module.exports?module.exports=t():n.getSize=t()}(window,function(){"use strict";function n(n){var t=parseFloat(n),i=-1==n.indexOf("%")&&!isNaN(t);return i&&t}function o(){}function s(){for(var r,t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},n=0;f>n;n++)r=i[n],t[r]=0;return t}function r(n){var t=getComputedStyle(n);return t||c("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}function h(){var i,f,o;e||(e=!0,i=document.createElement("div"),i.style.width="200px",i.style.padding="1px 2px 3px 4px",i.style.borderStyle="solid",i.style.borderWidth="1px 2px 3px 4px",i.style.boxSizing="border-box",f=document.body||document.documentElement,f.appendChild(i),o=r(i),t=200==Math.round(n(o.width)),u.isBoxSizeOuter=t,f.removeChild(i))}function u(u){var o,e,a,c,l;if(h(),"string"==typeof u&&(u=document.querySelector(u)),u&&"object"==typeof u&&u.nodeType){if(o=r(u),"none"==o.display)return s();for(e={},e.width=u.offsetWidth,e.height=u.offsetHeight,a=e.isBorderBox="border-box"==o.boxSizing,c=0;f>c;c++){var v=i[c],nt=o[v],y=parseFloat(nt);e[v]=isNaN(y)?0:y}var p=e.paddingLeft+e.paddingRight,w=e.paddingTop+e.paddingBottom,tt=e.marginLeft+e.marginRight,it=e.marginTop+e.marginBottom,b=e.borderLeftWidth+e.borderRightWidth,k=e.borderTopWidth+e.borderBottomWidth,d=a&&t,g=n(o.width);return g!==!1&&(e.width=g+(d?0:p+b)),l=n(o.height),l!==!1&&(e.height=l+(d?0:w+k)),e.innerWidth=e.width-(p+b),e.innerHeight=e.height-(w+k),e.outerWidth=e.width+tt,e.outerHeight=e.height+it,e}}var t,c="undefined"==typeof console?o:function(n){console.error(n)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],f=i.length,e=!1;return u}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",t):"object"==typeof module&&module.exports?module.exports=t():n.matchesSelector=t()}(window,function(){"use strict";var n=function(){var t=window.Element.prototype,i,n,u,r;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(i=["webkit","moz","ms","o"],n=0;n<i.length;n++)if(u=i[n],r=u+"MatchesSelector",t[r])return r}();return function(t,i){return t[n](i)}}),function(n,t){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("desandro-matches-selector")):n.fizzyUIUtils=t(n,n.matchesSelector)}(window,function(n,t){var i={},u,r;return i.extend=function(n,t){for(var i in t)n[i]=t[i];return n},i.modulo=function(n,t){return(n%t+t)%t},u=Array.prototype.slice,i.makeArray=function(n){if(Array.isArray(n))return n;if(null===n||void 0===n)return[];var t="object"==typeof n&&"number"==typeof n.length;return t?u.call(n):[n]},i.removeFrom=function(n,t){var i=n.indexOf(t);-1!=i&&n.splice(i,1)},i.getParent=function(n,i){for(;n.parentNode&&n!=document.body;)if(n=n.parentNode,t(n,i))return n},i.getQueryElement=function(n){return"string"==typeof n?document.querySelector(n):n},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.filterFindElements=function(n,r){n=i.makeArray(n);var u=[];return n.forEach(function(n){if(n instanceof HTMLElement){if(!r)return void u.push(n);t(n,r)&&u.push(n);for(var f=n.querySelectorAll(r),i=0;i<f.length;i++)u.push(f[i])}}),u},i.debounceMethod=function(n,t,i){i=i||100;var u=n.prototype[t],r=t+"Timeout";n.prototype[t]=function(){var f=this[r],t,n;clearTimeout(f);t=arguments;n=this;this[r]=setTimeout(function(){u.apply(n,t);delete n[r]},i)}},i.docReady=function(n){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(n):document.addEventListener("DOMContentLoaded",n)},i.toDashed=function(n){return n.replace(/(.)([A-Z])/g,function(n,t,i){return t+"-"+i}).toLowerCase()},r=n.console,i.htmlInit=function(t,u){i.docReady(function(){var e=i.toDashed(u),f="data-"+e,s=document.querySelectorAll("["+f+"]"),h=document.querySelectorAll(".js-"+e),c=i.makeArray(s).concat(i.makeArray(h)),l=f+"-options",o=n.jQuery;c.forEach(function(n){var i,e=n.getAttribute(f)||n.getAttribute(l),s;try{i=e&&JSON.parse(e)}catch(h){return void(r&&r.error("Error parsing "+f+" on "+n.className+": "+h))}s=new t(n,i);o&&o.data(n,u,s)})})},i}),function(n,t){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],t):"object"==typeof module&&module.exports?module.exports=t(require("ev-emitter"),require("get-size")):(n.Outlayer={},n.Outlayer.Item=t(n.EvEmitter,n.getSize))}(window,function(n,t){"use strict";function l(n){for(var t in n)return!1;return t=null,!0}function u(n,t){n&&(this.element=n,this.layout=t,this.position={x:0,y:0},this._create())}function a(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}var f=document.documentElement.style,r="string"==typeof f.transition?"transition":"WebkitTransition",e="string"==typeof f.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],v={transform:e,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},i=u.prototype=Object.create(n.prototype),s,h,c;return i.constructor=u,i._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.getSize=function(){this.size=t(this.element)},i.css=function(n){var r=this.element.style,t,i;for(t in n)i=v[t]||t,r[i]=n[t]},i.getPosition=function(){var r=getComputedStyle(this.element),u=this.layout._getOption("originLeft"),f=this.layout._getOption("originTop"),e=r[u?"left":"right"],o=r[f?"top":"bottom"],n=parseFloat(e),t=parseFloat(o),i=this.layout.size;-1!=e.indexOf("%")&&(n=n/100*i.width);-1!=o.indexOf("%")&&(t=t/100*i.height);n=isNaN(n)?0:n;t=isNaN(t)?0:t;n-=u?i.paddingLeft:i.paddingRight;t-=f?i.paddingTop:i.paddingBottom;this.position.x=n;this.position.y=t},i.layoutPosition=function(){var r=this.layout.size,n={},t=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),u=t?"paddingLeft":"paddingRight",f=t?"left":"right",e=t?"right":"left",o=this.position.x+r[u];n[f]=this.getXValue(o);n[e]="";var s=i?"paddingTop":"paddingBottom",h=i?"top":"bottom",c=i?"bottom":"top",l=this.position.y+r[s];n[h]=this.getYValue(l);n[c]="";this.css(n);this.emitEvent("layout",[this])},i.getXValue=function(n){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?n/this.layout.size.width*100+"%":n+"px"},i.getYValue=function(n){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?n/this.layout.size.height*100+"%":n+"px"},i._transitionTo=function(n,t){this.getPosition();var r=this.position.x,u=this.position.y,f=n==this.position.x&&t==this.position.y;if(this.setPosition(n,t),f&&!this.isTransitioning)return void this.layoutPosition();var e=n-r,o=t-u,i={};i.transform=this.getTranslate(e,o);this.transition({to:i,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},i.getTranslate=function(n,t){var i=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop");return n=i?n:-n,t=r?t:-t,"translate3d("+n+"px, "+t+"px, 0)"},i.goTo=function(n,t){this.setPosition(n,t);this.layoutPosition()},i.moveTo=i._transitionTo,i.setPosition=function(n,t){this.position.x=parseFloat(n);this.position.y=parseFloat(t)},i._nonTransition=function(n){this.css(n.to);n.isCleaning&&this._removeStyles(n.to);for(var t in n.onTransitionEnd)n.onTransitionEnd[t].call(this)},i.transition=function(n){var i,t,r;if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(n);i=this._transn;for(t in n.onTransitionEnd)i.onEnd[t]=n.onTransitionEnd[t];for(t in n.to)i.ingProperties[t]=!0,n.isCleaning&&(i.clean[t]=!0);n.from&&(this.css(n.from),r=this.element.offsetHeight,r=null);this.enableTransition(n.to);this.css(n.to);this.isTransitioning=!0},s="opacity,"+a(e),i.enableTransition=function(){if(!this.isTransitioning){var n=this.layout.options.transitionDuration;n="number"==typeof n?n+"ms":n;this.css({transitionProperty:s,transitionDuration:n,transitionDelay:this.staggerDelay||0});this.element.addEventListener(o,this,!1)}},i.onwebkitTransitionEnd=function(n){this.ontransitionend(n)},i.onotransitionend=function(n){this.ontransitionend(n)},h={"-webkit-transform":"transform"},i.ontransitionend=function(n){var t,i,r;n.target===this.element&&(t=this._transn,i=h[n.propertyName]||n.propertyName,(delete t.ingProperties[i],l(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[n.propertyName]="",delete t.clean[i]),i in t.onEnd)&&(r=t.onEnd[i],r.call(this),delete t.onEnd[i]),this.emitEvent("transitionEnd",[this]))},i.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(o,this,!1);this.isTransitioning=!1},i._removeStyles=function(n){var t={},i;for(i in n)t[i]="";this.css(t)},c={transitionProperty:"",transitionDuration:"",transitionDelay:""},i.removeTransitionStyles=function(){this.css(c)},i.stagger=function(n){n=isNaN(n)?0:n;this.staggerDelay=n+"ms"},i.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])},i.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},i.reveal=function(){delete this.isHidden;this.css({display:""});var n=this.layout.options,t={},i=this.getHideRevealTransitionEndProperty("visibleStyle");t[i]=this.onRevealTransitionEnd;this.transition({from:n.hiddenStyle,to:n.visibleStyle,isCleaning:!0,onTransitionEnd:t})},i.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},i.getHideRevealTransitionEndProperty=function(n){var t=this.layout.options[n],i;if(t.opacity)return"opacity";for(i in t)return i},i.hide=function(){this.isHidden=!0;this.css({display:""});var n=this.layout.options,t={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");t[i]=this.onHideTransitionEnd;this.transition({from:n.visibleStyle,to:n.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},i.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},i.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},u}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,r,u,f){return t(n,i,r,u,f)}):"object"==typeof module&&module.exports?module.exports=t(n,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):n.Outlayer=t(n,n.EvEmitter,n.getSize,n.fizzyUIUtils,n.Outlayer.Item)}(window,function(n,t,i,r,u){"use strict";function e(n,t){var i=r.getQueryElement(n),u,f;if(!i)return void(c&&c.error("Bad element for "+this.constructor.namespace+": "+(i||n)));this.element=i;o&&(this.$element=o(this.element));this.options=r.extend({},this.constructor.defaults);this.option(t);u=++y;this.element.outlayerGUID=u;s[u]=this;this._create();f=this._getOption("initLayout");f&&this.layout()}function h(n){function t(){n.apply(this,arguments)}return t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t}function v(n){var r;if("number"==typeof n)return n;var t=n.match(/(^\d*\.?\d*)(\w*)/),i=t&&t[1],u=t&&t[2];return i.length?(i=parseFloat(i),r=a[u]||1,i*r):0}var c=n.console,o=n.jQuery,l=function(){},y=0,s={},f,a;return e.namespace="outlayer",e.Item=u,e.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},f=e.prototype,r.extend(f,t.prototype),f.option=function(n){r.extend(this.options,n)},f._getOption=function(n){var t=this.constructor.compatOptions[n];return t&&void 0!==this.options[t]?this.options[t]:this.options[n]},e.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);r.extend(this.element.style,this.options.containerStyle);var n=this._getOption("resize");n&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(n){for(var u,f,i=this._filterFindItemElements(n),e=this.constructor.Item,r=[],t=0;t<i.length;t++)u=i[t],f=new e(u,this),r.push(f);return r},f._filterFindItemElements=function(n){return r.filterFindElements(n,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(n){return n.element})},f.layout=function(){this._resetLayout();this._manageStamps();var n=this._getOption("layoutInstant"),t=void 0!==n?n:!this._isLayoutInited;this.layoutItems(this.items,t);this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(n,t){var u,r=this.options[n];r?("string"==typeof r?u=this.element.querySelector(r):r instanceof HTMLElement&&(u=r),this[n]=u?i(u)[t]:r):this[n]=0},f.layoutItems=function(n,t){n=this._getItemsForLayout(n);this._layoutItems(n,t);this._postLayout()},f._getItemsForLayout=function(n){return n.filter(function(n){return!n.isIgnored})},f._layoutItems=function(n,t){if(this._emitCompleteOnItems("layout",n),n&&n.length){var i=[];n.forEach(function(n){var r=this._getItemLayoutPosition(n);r.item=n;r.isInstant=t||n.isLayoutInstant;i.push(r)},this);this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(n){this.updateStagger();n.forEach(function(n,t){this._positionItem(n.item,n.x,n.y,n.isInstant,t)},this)},f.updateStagger=function(){var n=this.options.stagger;return null===n||void 0===n?void(this.stagger=0):(this.stagger=v(n),this.stagger)},f._positionItem=function(n,t,i,r,u){r?n.goTo(t,i):(n.stagger(u*this.stagger),n.moveTo(t,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer"),n;t&&(n=this._getContainerSize(),n&&(this._setContainerMeasure(n.width,!0),this._setContainerMeasure(n.height,!1)))},f._getContainerSize=l,f._setContainerMeasure=function(n,t){if(void 0!==n){var i=this.size;i.isBorderBox&&(n+=t?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth);n=Math.max(n,0);this.element.style[t?"width":"height"]=n+"px"}},f._emitCompleteOnItems=function(n,t){function r(){e.dispatchEvent(n+"Complete",null,[t])}function f(){i++;i==u&&r()}var e=this,u=t.length,i;if(!t||!u)return void r();i=0;t.forEach(function(t){t.once(n,f)})},f.dispatchEvent=function(n,t,i){var u=t?[t].concat(i):i,r;(this.emitEvent(n,u),o)&&((this.$element=this.$element||o(this.element),t)?(r=o.Event(t),r.type=n,this.$element.trigger(r,i)):this.$element.trigger(n,i))},f.ignore=function(n){var t=this.getItem(n);t&&(t.isIgnored=!0)},f.unignore=function(n){var t=this.getItem(n);t&&delete t.isIgnored},f.stamp=function(n){n=this._find(n);n&&(this.stamps=this.stamps.concat(n),n.forEach(this.ignore,this))},f.unstamp=function(n){n=this._find(n);n&&n.forEach(function(n){r.removeFrom(this.stamps,n);this.unignore(n)},this)},f._find=function(n){if(n)return("string"==typeof n&&(n=this.element.querySelectorAll(n)),n=r.makeArray(n))},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),n=this.size;this._boundingRect={left:t.left+n.paddingLeft+n.borderLeftWidth,top:t.top+n.paddingTop+n.borderTopWidth,right:t.right-(n.paddingRight+n.borderRightWidth),bottom:t.bottom-(n.paddingBottom+n.borderBottomWidth)}},f._manageStamp=l,f._getElementOffset=function(n){var t=n.getBoundingClientRect(),r=this._boundingRect,u=i(n);return{left:t.left-r.left-u.marginLeft,top:t.top-r.top-u.marginTop,right:r.right-t.right-u.marginRight,bottom:r.bottom-t.bottom-u.marginBottom}},f.handleEvent=r.handleEvent,f.bindResize=function(){n.addEventListener("resize",this);this.isResizeBound=!0},f.unbindResize=function(){n.removeEventListener("resize",this);this.isResizeBound=!1},f.onresize=function(){this.resize()},r.debounceMethod(e,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var n=i(this.element),t=this.size&&n;return t&&n.innerWidth!==this.size.innerWidth},f.addItems=function(n){var t=this._itemize(n);return t.length&&(this.items=this.items.concat(t)),t},f.appended=function(n){var t=this.addItems(n);t.length&&(this.layoutItems(t,!0),this.reveal(t))},f.prepended=function(n){var t=this._itemize(n),i;t.length&&(i=this.items.slice(0),this.items=t.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i))},f.reveal=function(n){if(this._emitCompleteOnItems("reveal",n),n&&n.length){var t=this.updateStagger();n.forEach(function(n,i){n.stagger(i*t);n.reveal()})}},f.hide=function(n){if(this._emitCompleteOnItems("hide",n),n&&n.length){var t=this.updateStagger();n.forEach(function(n,i){n.stagger(i*t);n.hide()})}},f.revealItemElements=function(n){var t=this.getItems(n);this.reveal(t)},f.hideItemElements=function(n){var t=this.getItems(n);this.hide(t)},f.getItem=function(n){for(var i,t=0;t<this.items.length;t++)if(i=this.items[t],i.element==n)return i},f.getItems=function(n){n=r.makeArray(n);var t=[];return n.forEach(function(n){var i=this.getItem(n);i&&t.push(i)},this),t},f.remove=function(n){var t=this.getItems(n);this._emitCompleteOnItems("remove",t);t&&t.length&&t.forEach(function(n){n.remove();r.removeFrom(this.items,n)},this)},f.destroy=function(){var n=this.element.style,t;n.height="";n.position="";n.width="";this.items.forEach(function(n){n.destroy()});this.unbindResize();t=this.element.outlayerGUID;delete s[t];delete this.element.outlayerGUID;o&&o.removeData(this.element,this.constructor.namespace)},e.data=function(n){n=r.getQueryElement(n);var t=n&&n.outlayerGUID;return t&&s[t]},e.create=function(n,t){var i=h(e);return i.defaults=r.extend({},e.defaults),r.extend(i.defaults,t),i.compatOptions=r.extend({},e.compatOptions),i.namespace=n,i.data=e.data,i.Item=h(u),r.htmlInit(i,n),o&&o.bridget&&o.bridget(n,i),i},a={ms:1,s:1e3},e.Item=u,e}),function(n,t){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],t):"object"==typeof module&&module.exports?module.exports=t(require("outlayer"),require("get-size")):n.Masonry=t(n.Outlayer,n.getSize)}(window,function(n,t){var r=n.create("masonry"),i;return r.compatOptions.fitWidth="isFitWidth",i=r.prototype,i._resetLayout=function(){this.getSize();this._getMeasurement("columnWidth","outerWidth");this._getMeasurement("gutter","outerWidth");this.measureColumns();this.colYs=[];for(var n=0;n<this.cols;n++)this.colYs.push(0);this.maxY=0;this.horizontalColIndex=0},i.measureColumns=function(){var n,i;(this.getContainerWidth(),this.columnWidth)||(n=this.items[0],i=n&&n.element,this.columnWidth=i&&t(i).outerWidth||this.containerWidth);var r=this.columnWidth+=this.gutter,f=this.containerWidth+this.gutter,u=f/r,e=r-f%r,o=e&&1>e?"round":"floor";u=Math[o](u);this.cols=Math.max(u,1)},i.getContainerWidth=function(){var i=this._getOption("fitWidth"),r=i?this.element.parentNode:this.element,n=t(r);this.containerWidth=n&&n.innerWidth},i._getItemLayoutPosition=function(n){n.getSize();var u=n.size.outerWidth%this.columnWidth,f=u&&1>u?"round":"ceil",i=Math[f](n.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);for(var e=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",t=this[e](i,n),o={x:this.columnWidth*t.col,y:t.y},s=t.y+n.size.outerHeight,h=i+t.col,r=t.col;h>r;r++)this.colYs[r]=s;return o},i._getTopColPosition=function(n){var t=this._getTopColGroup(n),i=Math.min.apply(Math,t);return{col:t.indexOf(i),y:i}},i._getTopColGroup=function(n){if(2>n)return this.colYs;for(var i=[],r=this.cols+1-n,t=0;r>t;t++)i[t]=this._getColGroupY(t,n);return i},i._getColGroupY=function(n,t){if(2>t)return this.colYs[n];var i=this.colYs.slice(n,n+t);return Math.max.apply(Math,i)},i._getHorizontalColPosition=function(n,t){var i=this.horizontalColIndex%this.cols,u=n>1&&i+n>this.cols,r;return i=u?0:i,r=t.size.outerWidth&&t.size.outerHeight,this.horizontalColIndex=r?i+n:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,n)}},i._manageStamp=function(n){var e=t(n),r=this._getElementOffset(n),h=this._getOption("originLeft"),o=h?r.left:r.right,s=o+e.outerWidth,f=Math.floor(o/this.columnWidth),i;f=Math.max(0,f);i=Math.floor(s/this.columnWidth);i-=s%this.columnWidth?0:1;i=Math.min(this.cols-1,i);for(var c=this._getOption("originTop"),l=(c?r.top:r.bottom)+e.outerHeight,u=f;i>=u;u++)this.colYs[u]=Math.max(l,this.colYs[u])},i._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var n={height:this.maxY};return this._getOption("fitWidth")&&(n.width=this._getContainerFitWidth()),n},i._getContainerFitWidth=function(){for(var n=0,t=this.cols;--t&&0===this.colYs[t];)n++;return(this.cols-n)*this.columnWidth-this.gutter},i.needsResizeLayout=function(){var n=this.containerWidth;return this.getContainerWidth(),n!=this.containerWidth},r}),function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n}()({1:[function(n,t,i){"use strict";function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function r(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function f(n,t,i){return t&&r(n.prototype,t),i&&r(n,i),n}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var e=function(){function n(){u(this,n)}return f(n,null,[{key:"getCookieExpiresString",value:function(n){var t=new Date,i=new Date(t.getTime()+n);return"expires=".concat(i.toGMTString(),";")}},{key:"bake",value:function(t,i){document.cookie="smartbanner_exited=1; ".concat(t?n.getCookieExpiresString(t):""," path=").concat(i)}},{key:"unbake",value:function(){document.cookie="smartbanner_exited=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}},{key:"baked",get:function(){var n=document.cookie.replace(/(?:(?:^|.*;\s*)smartbanner_exited\s*=\s*([^;]*).*$)|^.*$/,"$1");return n==="1"}}]),n}();i["default"]=e},{}],2:[function(n,t,i){(function(n){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function t(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function u(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var f=function(){function t(){r(this,t)}return u(t,null,[{key:"platform",value:function(){return/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":void 0}},{key:"userAgentMatchesRegex",value:function(n){return new RegExp(n).test(window.navigator.userAgent)}},{key:"jQueryMobilePage",value:function(){return typeof n.$!="undefined"&&n.$.mobile!=="undefined"&&document.querySelector(".ui-page")!==null}},{key:"wrapperElement",value:function(){var n=t.jQueryMobilePage()?".ui-page":"html";return document.querySelectorAll(n)}}]),t}();i["default"]=f}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],3:[function(n){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}var i=r(n("./smartbanner.js")),t;window.addEventListener("load",function(){t=new i["default"];t.apiEnabled?window.smartbanner=t:t.publish()})},{"./smartbanner.js":5}],4:[function(n,t,i){"use strict";function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function r(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function f(n,t,i){return t&&r(n.prototype,t),i&&r(n,i),n}function e(n){return n.indexOf("smartbanner:")!==-1&&n.split(":")[1].length>0}function o(n){var t=n.split("-");return t.map(function(n,i){i>0&&(t[i]=n.charAt(0).toUpperCase()+n.substring(1))}),t.join("")}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var s=function(){function n(){u(this,n)}return f(n,[{key:"parse",value:function(){var t=document.getElementsByTagName("meta"),n={};return Array.apply(null,t).forEach(function(t){var i=null,r=t.getAttribute("name"),u=t.getAttribute("content");r&&u&&e(r)&&u.length>0&&(i=r.split(":")[1],i.indexOf("-")!==-1&&(i=o(i)),n[i]=u)}),n}}]),n}();i["default"]=s},{}],5:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function a(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function v(n,t,i){return t&&o(n.prototype,t),i&&o(n,i),n}function w(n,t){t.exit();n.preventDefault()}function s(n){this.positioningDisabled||h(n.data.height)}function b(n){var t=document.querySelector(".js_smartbanner__exit");if(t.addEventListener("click",function(t){return w(t,n)}),r["default"].jQueryMobilePage())$(document).on("pagebeforeshow",n,s)}function k(){r["default"].jQueryMobilePage()&&$(document).off("pagebeforeshow",s)}function h(n){for(var o=r["default"].wrapperElement(),t,f,e,i=0,s=o.length;i<s;i++)if(t=o[i],r["default"].jQueryMobilePage()){if(t.getAttribute(u.originalTop))continue;f=parseFloat(getComputedStyle(t).top);t.setAttribute(u.originalTop,isNaN(f)?0:f);t.style.top=n+"px"}else{if(t.getAttribute(u.originalMarginTop))continue;e=parseFloat(getComputedStyle(t).marginTop);t.setAttribute(u.originalMarginTop,isNaN(e)?0:e);t.style.marginTop=n+"px"}}function d(){for(var i=r["default"].wrapperElement(),n,t=0,f=i.length;t<f;t++)n=i[t],r["default"].jQueryMobilePage()&&n.getAttribute(u.originalTop)?n.style.top=n.getAttribute(u.originalTop)+"px":n.getAttribute(u.originalMarginTop)&&(n.style.marginTop=n.getAttribute(u.originalMarginTop)+"px")}var c;Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var l=f(n("./optionparser.js")),r=f(n("./detector.js")),e=f(n("./bakery.js"));var y="android,ios",p="Close",u={originalTop:"data-smartbanner-original-top",originalMarginTop:"data-smartbanner-original-margin-top"};c=function(){function n(){a(this,n);var t=new l["default"];this.options=t.parse();this.platform=r["default"].platform()}return v(n,[{key:"publish",value:function(){var n,t;if(Object.keys(this.options).length===0)throw new Error("No options detected. Please consult documentation.");if(e["default"].baked||this.userAgentExcluded||!(this.platformEnabled||this.userAgentIncluded))return!1;n=document.createElement("div");document.querySelector("body").appendChild(n);n.outerHTML=this.html;t=new Event("smartbanner.view");document.dispatchEvent(t);this.positioningDisabled||h(this.height);b(this)}},{key:"exit",value:function(){var n,t;k();this.positioningDisabled||d();n=document.querySelector(".js_smartbanner");document.querySelector("body").removeChild(n);t=new Event("smartbanner.exit");document.dispatchEvent(t);e["default"].bake(this.hideTtl,this.hidePath)}},{key:"originalTop",get:function(){var n=r["default"].wrapperElement()[0];return parseFloat(n.getAttribute(u.originalTop))}},{key:"originalTopMargin",get:function(){var n=r["default"].wrapperElement()[0];return parseFloat(n.getAttribute(u.originalMarginTop))}},{key:"priceSuffix",get:function(){return this.platform==="ios"?this.options.priceSuffixApple:this.platform==="android"?this.options.priceSuffixGoogle:""}},{key:"icon",get:function(){return this.platform==="android"?this.options.iconGoogle:this.options.iconApple}},{key:"buttonUrl",get:function(){return this.platform==="android"?this.options.buttonUrlGoogle:this.platform==="ios"?this.options.buttonUrlApple:"#"}},{key:"closeLabel",get:function(){return this.options.closeLabel!==undefined?this.options.closeLabel:p}},{key:"html",get:function(){var n=this.options.customDesignModifier?this.options.customDesignModifier:this.platform;return'<div class="smartbanner smartbanner--'.concat(n,' js_smartbanner">\n      <a href="javascript:void();" class="smartbanner__exit js_smartbanner__exit" aria-label="').concat(this.closeLabel,'"><\/a>\n      <div class="smartbanner__icon" style="background-image: url(').concat(this.icon,');"><\/div>\n      <div class="smartbanner__info">\n        <div>\n          <div class="smartbanner__info__title">').concat(this.options.title,'<\/div>\n          <div class="smartbanner__info__author">').concat("",'<\/div>\n          <div class="smartbanner__info__price">').concat("").concat(this.priceSuffix,'<\/div>\n        <\/div>\n      <\/div>\n      <a href="').concat(this.buttonUrl,'" target="_blank" class="smartbanner__button" rel="noopener" aria-label="').concat(this.options.button,'"><span class="smartbanner__button__label">').concat(this.options.button,"<\/span><\/a>\n    <\/div>")}},{key:"height",get:function(){try{return document.querySelector(".js_smartbanner").offsetHeight}catch(n){return 0}}},{key:"platformEnabled",get:function(){var n=this.options.enabledPlatforms||y;return n&&n.replace(/\s+/g,"").split(",").indexOf(this.platform)!==-1}},{key:"positioningDisabled",get:function(){return this.options.disablePositioning==="true"}},{key:"apiEnabled",get:function(){return this.options.api==="true"}},{key:"userAgentExcluded",get:function(){return this.options.excludeUserAgentRegex?r["default"].userAgentMatchesRegex(this.options.excludeUserAgentRegex):!1}},{key:"userAgentIncluded",get:function(){return this.options.includeUserAgentRegex?r["default"].userAgentMatchesRegex(this.options.includeUserAgentRegex):!1}},{key:"hideTtl",get:function(){return this.options.hideTtl?parseInt(this.options.hideTtl):!1}},{key:"hidePath",get:function(){return this.options.hidePath?this.options.hidePath:"/"}}]),n}();i["default"]=c},{"./bakery.js":1,"./detector.js":2,"./optionparser.js":4}]},{},[3]);!function(n){n(["jquery"],function(n){return function(){function v(n,t,r){return u({type:f.error,iconClass:i().iconClasses.error,message:n,optionsOverride:r,title:t})}function r(r,u){return r||(r=i()),t=n("#"+r.containerId),t.length?t:(u&&(t=nt(r)),t)}function y(n,t,r){return u({type:f.info,iconClass:i().iconClasses.info,message:n,optionsOverride:r,title:t})}function p(n){o=n}function w(n,t,r){return u({type:f.success,iconClass:i().iconClasses.success,message:n,optionsOverride:r,title:t})}function b(n,t,r){return u({type:f.warning,iconClass:i().iconClasses.warning,message:n,optionsOverride:r,title:t})}function k(n,u){var f=i();t||r(f);h(n,f,u)||g(f)}function d(u){var f=i();return t||r(f),u&&0===n(":focus",u).length?void e(u):void(t.children().length&&t.remove())}function g(i){for(var u=t.children(),r=u.length-1;r>=0;r--)h(n(u[r]),i)}function h(t,i,r){var u=!(!r||!r.force)&&r.force;return!(!t||!u&&0!==n(":focus",t).length)&&(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){e(t)}}),!0)}function nt(i){return t=n("<div/>").attr("id",i.containerId).addClass(i.positionClass),t.appendTo(n(i.target)),t}function tt(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;<\/button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function c(n){o&&o(n)}function u(u){function k(n){return null==n&&(n=""),n.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function nt(){ut();et();ot();st();ht();ct();ft();tt()}function tt(){var n="";switch(u.iconClass){case"toast-success":case"toast-info":n="polite";break;default:n="assertive"}o.attr("aria-live",n)}function it(){f.closeOnHover&&o.hover(vt,at);!f.onclick&&f.tapToDismiss&&o.click(v);f.closeButton&&p&&p.click(function(n){n.stopPropagation?n.stopPropagation():void 0!==n.cancelBubble&&n.cancelBubble!==!0&&(n.cancelBubble=!0);f.onCloseClick&&f.onCloseClick(n);v(!0)});f.onclick&&o.click(function(n){f.onclick(n);v()})}function rt(){o.hide();o[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown});f.timeOut>0&&(y=setTimeout(v,f.timeOut),h.maxHideTime=parseFloat(f.timeOut),h.hideEta=(new Date).getTime()+h.maxHideTime,f.progressBar&&(h.intervalId=setInterval(yt,10)))}function ut(){u.iconClass&&o.addClass(f.toastClass).addClass(w)}function ft(){f.newestOnTop?t.prepend(o):t.append(o)}function et(){if(u.title){var n=u.title;f.escapeHtml&&(n=k(u.title));d.append(n).addClass(f.titleClass);o.append(d)}}function ot(){if(u.message){var n=u.message;f.escapeHtml&&(n=k(u.message));g.append(n).addClass(f.messageClass);o.append(g)}}function st(){f.closeButton&&(p.addClass(f.closeClass).attr("role","button"),o.prepend(p))}function ht(){f.progressBar&&(b.addClass(f.progressClass),o.prepend(b))}function ct(){f.rtl&&o.addClass("rtl")}function lt(n,t){if(n.preventDuplicates){if(t.message===s)return!0;s=t.message}return!1}function v(t){var i=t&&f.closeMethod!==!1?f.closeMethod:f.hideMethod,r=t&&f.closeDuration!==!1?f.closeDuration:f.hideDuration,u=t&&f.closeEasing!==!1?f.closeEasing:f.hideEasing;if(!n(":focus",o).length||t)return clearTimeout(h.intervalId),o[i]({duration:r,easing:u,complete:function(){e(o);clearTimeout(y);f.onHidden&&"hidden"!==a.state&&f.onHidden();a.state="hidden";a.endTime=new Date;c(a)}})}function at(){(f.timeOut>0||f.extendedTimeOut>0)&&(y=setTimeout(v,f.extendedTimeOut),h.maxHideTime=parseFloat(f.extendedTimeOut),h.hideEta=(new Date).getTime()+h.maxHideTime)}function vt(){clearTimeout(y);h.hideEta=0;o.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}function yt(){var n=(h.hideEta-(new Date).getTime())/h.maxHideTime*100;b.width(n+"%")}var f=i(),w=u.iconClass||f.iconClass;if("undefined"!=typeof u.optionsOverride&&(f=n.extend(f,u.optionsOverride),w=u.optionsOverride.iconClass||w),!lt(f,u)){l++;t=r(f,!0);var y=null,o=n("<div/>"),d=n("<div/>"),g=n("<div/>"),b=n("<div/>"),p=n(f.closeHtml),h={intervalId:null,hideEta:null,maxHideTime:null},a={toastId:l,state:"visible",startTime:new Date,options:f,map:u};return nt(),rt(),it(),c(a),f.debug&&console&&console.log(a),o}}function i(){return n.extend({},tt(),a.options)}function e(n){t||(t=r());n.is(":visible")||(n.remove(),n=null,0===t.children().length&&(t.remove(),s=void 0))}var t,o,s,l=0,f={error:"error",info:"info",success:"success",warning:"warning"},a={clear:k,remove:d,error:v,getContainer:r,info:y,options:{},subscribe:p,success:w,version:"2.1.3",warning:b};return a}()})}("function"==typeof define&&define.amd?define:function(n,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});firebase=function(){var n=void 0===n?self:n;return function(t){function i(n){if(u[n])return u[n].exports;var r=u[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}var f=n.webpackJsonpFirebase,u,r;return n.webpackJsonpFirebase=function(n,u,e){for(var s,h,l,o=0,c=[];o<n.length;o++)h=n[o],r[h]&&c.push(r[h][0]),r[h]=0;for(s in u)Object.prototype.hasOwnProperty.call(u,s)&&(t[s]=u[s]);for(f&&f(n,u,e);c.length;)c.shift()();if(e)for(o=0;o<e.length;o++)l=i(i.s=e[o]);return l},u={},r={5:0},i.e=function(n){function e(){t.onerror=t.onload=null;clearTimeout(s);var i=r[n];0!==i&&(i&&i[1](Error("Loading chunk "+n+" failed.")),r[n]=void 0)}var u=r[n],f,o,t,s;return 0===u?new Promise(function(n){n()}):u?u[2]:(f=new Promise(function(t,i){u=r[n]=[t,i]}),u[2]=f,o=document.getElementsByTagName("head")[0],t=document.createElement("script"),t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,i.nc&&t.setAttribute("nonce",i.nc),t.src=i.p+""+n+".js",s=setTimeout(e,12e4),t.onerror=t.onload=e,o.appendChild(t),f)},i.m=t,i.c=u,i.d=function(n,t,r){i.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="",i.oe=function(n){throw console.error(n),n;},i(i.s=57)}([function(n,t,i){"use strict";var c,o,p,s,w,e,h,l,u,r,a,b,v,f,y;Object.defineProperty(t,"__esModule",{value:!0});c=i(28);t.assert=c.assert;t.assertionError=c.assertionError;o=i(29);t.base64=o.base64;t.base64Decode=o.base64Decode;t.base64Encode=o.base64Encode;p=i(20);t.CONSTANTS=p.CONSTANTS;s=i(65);t.deepCopy=s.deepCopy;t.deepExtend=s.deepExtend;t.patchProperty=s.patchProperty;w=i(66);t.Deferred=w.Deferred;e=i(67);t.getUA=e.getUA;t.isMobileCordova=e.isMobileCordova;t.isNodeSdk=e.isNodeSdk;t.isReactNative=e.isReactNative;h=i(68);t.ErrorFactory=h.ErrorFactory;t.FirebaseError=h.FirebaseError;t.patchCapture=h.patchCapture;l=i(30);t.jsonEval=l.jsonEval;t.stringify=l.stringify;u=i(69);t.decode=u.decode;t.isAdmin=u.isAdmin;t.issuedAtTime=u.issuedAtTime;t.isValidFormat=u.isValidFormat;t.isValidTimestamp=u.isValidTimestamp;r=i(31);t.clone=r.clone;t.contains=r.contains;t.every=r.every;t.extend=r.extend;t.findKey=r.findKey;t.findValue=r.findValue;t.forEach=r.forEach;t.getAnyKey=r.getAnyKey;t.getCount=r.getCount;t.getValues=r.getValues;t.isEmpty=r.isEmpty;t.isNonNullObject=r.isNonNullObject;t.map=r.map;t.safeGet=r.safeGet;a=i(70);t.querystring=a.querystring;t.querystringDecode=a.querystringDecode;b=i(71);t.Sha1=b.Sha1;v=i(73);t.async=v.async;t.createSubscribe=v.createSubscribe;f=i(74);t.errorPrefix=f.errorPrefix;t.validateArgCount=f.validateArgCount;t.validateCallback=f.validateCallback;t.validateContextObject=f.validateContextObject;t.validateNamespace=f.validateNamespace;y=i(75);t.stringLength=y.stringLength;t.stringToByteArray=y.stringToByteArray},,,,,,function(n,t,i){"use strict";function h(){function y(t){a(n[t],"delete");delete n[t]}function e(t){return t=t||o,c(n,t)||u("no-app",{name:t}),n[t]}function p(i,r){void 0===r?r=o:"string"==typeof r&&""!==r||u("bad-app-name",{name:r+""});c(n,r)&&u("duplicate-app",{name:r});var e=new f(i,r,t);return n[r]=e,a(e,"create"),e}function l(){return Object.keys(n).map(function(t){return n[t]})}function w(n,o,h,c,a){i[n]&&u("duplicate-service",{name:n});i[n]=o;c&&(s[n]=c,l().forEach(function(n){c("create",n)}));var v=function(t){return void 0===t&&(t=e()),"function"!=typeof t[n]&&u("invalid-app-argument",{name:n}),t[n]()};return void 0!==h&&Object(r.deepExtend)(v,h),t[n]=v,f.prototype[n]=function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return this.t.bind(this,n).apply(this,a?i:[])},v}function b(n){Object(r.deepExtend)(t,n)}function a(n,t){Object.keys(i).forEach(function(i){var r=v(n,i);null!==r&&s[r]&&s[r](t,n)})}function v(n,t){if("serverAuth"===t)return null;var i=t;return n.options,i}var n={},i={},s={},t={__esModule:!0,initializeApp:p,app:e,apps:null,Promise:Promise,SDK_VERSION:"4.9.1",INTERNAL:{registerService:w,createFirebaseNamespace:h,extendNamespace:b,createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:y,factories:i,useAsService:v,Promise:Promise,deepExtend:r.deepExtend}};return Object(r.patchProperty)(t,"default",t),Object.defineProperty(t,"apps",{get:l}),Object(r.patchProperty)(e,"App",f),t}function u(n,t){throw a.create(n,t);}var l,a,s;Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),c=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o="[DEFAULT]",e=[],f=function(){function n(n,t,i){this.r=i;this.a=!1;this.u={};this.f=t;this.h=Object(r.deepCopy)(n);this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(n){e.push(n);setTimeout(function(){return n(null)},0)},removeAuthTokenListener:function(n){e=e.filter(function(t){return t!==n})}}}return Object.defineProperty(n.prototype,"name",{get:function(){return this.v(),this.f},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"options",{get:function(){return this.v(),this.h},enumerable:!0,configurable:!0}),n.prototype.delete=function(){var n=this;return new Promise(function(t){n.v();t()}).then(function(){n.r.INTERNAL.removeApp(n.f);var t=[];return Object.keys(n.u).forEach(function(i){Object.keys(n.u[i]).forEach(function(r){t.push(n.u[i][r])})}),Promise.all(t.map(function(n){return n.INTERNAL.delete()}))}).then(function(){n.a=!0;n.u={}})},n.prototype.t=function(n,t){if(void 0===t&&(t=o),this.v(),this.u[n]||(this.u[n]={}),!this.u[n][t]){var i=t!==o?t:void 0,r=this.r.INTERNAL.factories[n](this,this.extendApp.bind(this),i);this.u[n][t]=r}return this.u[n][t]},n.prototype.extendApp=function(n){var t=this;Object(r.deepExtend)(this,n);n.INTERNAL&&n.INTERNAL.addAuthTokenListener&&(e.forEach(function(n){t.INTERNAL.addAuthTokenListener(n)}),e=[])},n.prototype.v=function(){this.a&&u("app-deleted",{name:this.f})},n}();f.prototype.name&&f.prototype.options||f.prototype.delete||console.log("dc");l={"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."};a=new r.ErrorFactory("app","Firebase",l);i.d(t,"firebase",function(){return s});s=h();t.default=s},,,,,,function(t){var i=function(){return this}();try{i=i||Function("return this")()||eval("this")}catch(t){"object"==typeof n&&(i=n)}t.exports=i},,,,,,,,function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CONSTANTS={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"}},,,,,,,function(n){function h(){throw Error("setTimeout has not been defined");}function c(){throw Error("clearTimeout has not been defined");}function l(n){if(r===setTimeout)return setTimeout(n,0);if((r===h||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}function y(n){if(u===clearTimeout)return clearTimeout(n);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(n);try{return u(n)}catch(t){try{return u.call(null,n)}catch(t){return u.call(this,n)}}}function p(){o&&e&&(o=!1,e.length?f=e.concat(f):s=-1,f.length&&a())}function a(){var t,n;if(!o){for(t=l(p),o=!0,n=f.length;n;){for(e=f,f=[];++s<n;)e&&e[s].run();s=-1;n=f.length}e=null;o=!1;y(t)}}function v(n,t){this.fun=n;this.array=t}function i(){}var r,u,t=n.exports={};!function(){try{r="function"==typeof setTimeout?setTimeout:h}catch(n){r=h}try{u="function"==typeof clearTimeout?clearTimeout:c}catch(n){u=c}}();var e,f=[],o=!1,s=-1;t.nextTick=function(n){var i=Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];f.push(new v(n,i));1!==f.length||o||l(a)};v.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=!0;t.env={};t.argv=[];t.version="";t.versions={};t.on=i;t.addListener=i;t.once=i;t.off=i;t.removeListener=i;t.removeAllListeners=i;t.emit=i;t.prependListener=i;t.prependOnceListener=i;t.listeners=function(){return[]};t.binding=function(){throw Error("process.binding is not supported");};t.cwd=function(){return"/"};t.chdir=function(){throw Error("process.chdir is not supported");};t.umask=function(){return 0}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(20);t.assert=function(n,i){if(!n)throw t.assertionError(i);};t.assertionError=function(n){return Error("Firebase Database ("+r.CONSTANTS.SDK_VERSION+") INTERNAL ASSERT FAILED: "+n)}},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(n){for(var t,i=[],r=0,u=0;u<n.length;u++)t=n.charCodeAt(u),t<128?i[r++]=t:t<2048?(i[r++]=t>>6|192,i[r++]=63&t|128):55296==(64512&t)&&u+1<n.length&&56320==(64512&n.charCodeAt(u+1))?(t=65536+((1023&t)<<10)+(1023&n.charCodeAt(++u)),i[r++]=t>>18|240,i[r++]=t>>12&63|128,i[r++]=t>>6&63|128,i[r++]=63&t|128):(i[r++]=t>>12|224,i[r++]=t>>6&63|128,i[r++]=63&t|128);return i},r=function(n){for(var t,r,e,u=[],i=0,f=0;i<n.length;)if(t=n[i++],t<128)u[f++]=String.fromCharCode(t);else if(t>191&&t<224)r=n[i++],u[f++]=String.fromCharCode((31&t)<<6|63&r);else if(t>239&&t<365){var r=n[i++],e=n[i++],s=n[i++],o=((7&t)<<18|(63&r)<<12|(63&e)<<6|63&s)-65536;u[f++]=String.fromCharCode(55296+(o>>10));u[f++]=String.fromCharCode(56320+(1023&o))}else r=n[i++],e=n[i++],u[f++]=String.fromCharCode((15&t)<<12|(63&r)<<6|63&e);return u.join("")};t.base64={y:null,b:null,_:null,g:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(n,t){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.A();for(var r=t?this._:this.y,u=[],i=0;i<n.length;i+=3){var f=n[i],e=i+1<n.length,o=e?n[i+1]:0,s=i+2<n.length,h=s?n[i+2]:0,a=f>>2,v=(3&f)<<4|o>>4,c=(15&o)<<2|h>>6,l=63&h;s||(l=64,e||(c=64));u.push(r[a],r[v],r[c],r[l])}return u.join("")},encodeString:function(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(i(n),t)},decodeString:function(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):r(this.decodeStringToByteArray(n,t))},decodeStringToByteArray:function(n,t){var h,r,c,e,l,a,v;this.A();for(var u=t?this.g:this.b,f=[],i=0;i<n.length;){var s=u[n.charAt(i++)],y=i<n.length,o=y?u[n.charAt(i)]:0;if(++i,h=i<n.length,r=h?u[n.charAt(i)]:64,++i,c=i<n.length,e=c?u[n.charAt(i)]:64,++i,null==s||null==o||null==r||null==e)throw Error();l=s<<2|o>>4;(f.push(l),64!=r)&&(a=o<<4&240|r>>2,(f.push(a),64!=e)&&(v=r<<6&192|e,f.push(v)))}return f},A:function(){if(!this.y){this.y={};this.b={};this._={};this.g={};for(var n=0;n<this.ENCODED_VALS.length;n++)this.y[n]=this.ENCODED_VALS.charAt(n),this.b[this.y[n]]=n,this._[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.g[this._[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.b[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.g[this.ENCODED_VALS.charAt(n)]=n)}}};t.base64Encode=function(n){var r=i(n);return t.base64.encodeByteArray(r,!0)};t.base64Decode=function(n){try{return t.base64.decodeString(n,!0)}catch(n){console.error("base64Decode failed: ",n)}return null}},function(n,t){"use strict";function i(n){return JSON.parse(n)}function r(n){return JSON.stringify(n)}Object.defineProperty(t,"__esModule",{value:!0});t.jsonEval=i;t.stringify=r},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.contains=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.safeGet=function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};t.forEach=function(n,t){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t(i,n[i])};t.extend=function(n,i){return t.forEach(i,function(t,i){n[t]=i}),n};t.clone=function(n){return t.extend({},n)};t.isNonNullObject=function(n){return"object"==typeof n&&null!==n};t.isEmpty=function(n){for(var t in n)return!1;return!0};t.getCount=function(n){var t=0,i;for(i in n)t++;return t};t.map=function(n,t,i){var u={},r;for(r in n)u[r]=t.call(i,n[r],r,n);return u};t.findKey=function(n,t,i){for(var r in n)if(t.call(i,n[r],r,n))return r};t.findValue=function(n,i,r){var u=t.findKey(n,i,r);return u&&n[u]};t.getAnyKey=function(n){for(var t in n)return t};t.getValues=function(n){var t=[],r=0,i;for(i in n)t[r++]=n[i];return t};t.every=function(n,t){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!t(i,n[i]))return!1;return!0}},,,,,,,,,,,,,,,,,,,,,,,,,,function(n,t,i){i(58);n.exports=i(6).default},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(59),u=(i.n(r),i(63)),f=(i.n(u),i(64));i.n(f)},function(t,i,r){(function(t){var i=function(){if(void 0!==t)return t;if(void 0!==n)return n;if("undefined"!=typeof self)return self;throw Error("unable to locate global object");}();"undefined"==typeof Promise&&(i.Promise=Promise=r(60))}).call(i,r(12))},function(n,t,i){(function(t){!function(i){function h(){}function c(n,t){return function(){n.apply(t,arguments)}}function r(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0;this._handled=!1;this._value=void 0;this.O=[];s(n,this)}function o(n,t){for(;3===n._state;)n=n._value;if(0===n._state)return void n.O.push(t);n._handled=!0;r.T(function(){var i=1===n._state?t.onFulfilled:t.onRejected,r;if(null===i)return void(1===n._state?f:u)(t.promise,n._value);try{r=i(n._value)}catch(n){return void u(t.promise,n)}f(t.promise,r)})}function f(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var i=t.then;if(t instanceof r)return n._state=3,n._value=t,void e(n);if("function"==typeof i)return void s(c(i,t),n)}n._state=1;n._value=t;e(n)}catch(t){u(n,t)}}function u(n,t){n._state=2;n._value=t;e(n)}function e(n){2===n._state&&0===n.O.length&&r.T(function(){n._handled||r.j(n._value)});for(var t=0,i=n.O.length;t<i;t++)o(n,n.O[t]);n.O=null}function l(n,t,i){this.onFulfilled="function"==typeof n?n:null;this.onRejected="function"==typeof t?t:null;this.promise=i}function s(n,t){var i=!1;try{n(function(n){i||(i=!0,f(t,n))},function(n){i||(i=!0,u(t,n))})}catch(n){if(i)return;i=!0;u(t,n)}}var a=setTimeout;r.prototype.catch=function(n){return this.then(null,n)};r.prototype.then=function(n,t){var i=new this.constructor(h);return o(this,new l(n,t,i)),i};r.all=function(n){var t=Array.prototype.slice.call(n);return new r(function(n,i){function u(r,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var o=e.then;if("function"==typeof o)return void o.call(e,function(n){u(r,n)},i)}t[r]=e;0==--f&&n(t)}catch(n){i(n)}}if(0===t.length)return n([]);for(var f=t.length,r=0;r<t.length;r++)u(r,t[r])})};r.resolve=function(n){return n&&"object"==typeof n&&n.constructor===r?n:new r(function(t){t(n)})};r.reject=function(n){return new r(function(t,i){i(n)})};r.race=function(n){return new r(function(t,i){for(var r=0,u=n.length;r<u;r++)n[r].then(t,i)})};r.T="function"==typeof t&&function(n){t(n)}||function(n){a(n,0)};r.j=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)};r.S=function(n){r.T=n};r.C=function(n){r.j=n};void 0!==n&&n.exports?n.exports=r:i.Promise||(i.Promise=r)}(this)}).call(t,i(61).setImmediate)},function(t,i,r){function u(n,t){this.N=n;this._clearFn=t}var f=Function.prototype.apply;i.setTimeout=function(){return new u(f.call(setTimeout,n,arguments),clearTimeout)};i.setInterval=function(){return new u(f.call(setInterval,n,arguments),clearInterval)};i.clearTimeout=i.clearInterval=function(n){n&&n.close()};u.prototype.unref=u.prototype.ref=function(){};u.prototype.close=function(){this._clearFn.call(n,this.N)};i.enroll=function(n,t){clearTimeout(n.w);n.P=t};i.unenroll=function(n){clearTimeout(n.w);n.P=-1};i.k=i.active=function(n){clearTimeout(n.w);var t=n.P;t>=0&&(n.w=setTimeout(function(){n.M&&n.M()},t))};r(62);i.setImmediate=setImmediate;i.clearImmediate=clearImmediate},function(n,t,i){(function(n,t){!function(n,i){"use strict";function l(n){var i,t,r;for("function"!=typeof n&&(n=Function(""+n)),i=Array(arguments.length-1),t=0;t<i.length;t++)i[t]=arguments[t+1];return r={callback:n,args:i},s[o]=r,u(o),o++}function c(n){delete s[n]}function a(n){var r=n.callback,t=n.args;switch(t.length){case 0:r();break;case 1:r(t[0]);break;case 2:r(t[0],t[1]);break;case 3:r(t[0],t[1],t[2]);break;default:r.apply(i,t)}}function r(n){if(h)setTimeout(r,0,n);else{var t=s[n];if(t){h=!0;try{a(t)}finally{c(n);h=!1}}}}if(!n.setImmediate){var u,o=1,s={},h=!1,e=n.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(n);f=f&&f.setTimeout?f:n;"[object process]"==={}.toString.call(n.process)?function(){u=function(n){t.nextTick(function(){r(n)})}}():function(){if(n.postMessage&&!n.importScripts){var t=!0,i=n.onmessage;return n.onmessage=function(){t=!1},n.postMessage("","*"),n.onmessage=i,t}}()?function(){var t="setImmediate$"+Math.random()+"$",i=function(i){i.source===n&&"string"==typeof i.data&&0===i.data.indexOf(t)&&r(+i.data.slice(t.length))};n.addEventListener?n.addEventListener("message",i,!1):n.attachEvent("onmessage",i);u=function(i){n.postMessage(t+i,"*")}}():n.MessageChannel?function(){var n=new MessageChannel;n.port1.onmessage=function(n){r(n.data)};u=function(t){n.port2.postMessage(t)}}():e&&"onreadystatechange"in e.createElement("script")?function(){var n=e.documentElement;u=function(t){var i=e.createElement("script");i.onreadystatechange=function(){r(t);i.onreadystatechange=null;n.removeChild(i);i=null};n.appendChild(i)}}():function(){u=function(n){setTimeout(r,0,n)}}();f.setImmediate=l;f.clearImmediate=c}}("undefined"==typeof self?void 0===n?this:n:self)}).call(t,i(12),i(27))},function(){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(n){var i,u,f,t,r;if(null==this)throw new TypeError('"this" is null or not defined');if(i=Object(this),u=i.length>>>0,"function"!=typeof n)throw new TypeError("predicate must be a function");for(f=arguments[1],t=0;t<u;){if(r=i[t],n.call(f,r,t,i))return r;t++}}})},function(){Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(n){var i,r,u,t,f;if(null==this)throw new TypeError('"this" is null or not defined');if(i=Object(this),r=i.length>>>0,"function"!=typeof n)throw new TypeError("predicate must be a function");for(u=arguments[1],t=0;t<r;){if(f=i[t],n.call(u,f,t,i))return t;t++}return-1}})},function(n,t){"use strict";function r(n){return i(void 0,n)}function i(n,t){var u,r;if(!(t instanceof Object))return t;switch(t.constructor){case Date:return u=t,new Date(u.getTime());case Object:void 0===n&&(n={});break;case Array:n=[];break;default:return t}for(r in t)t.hasOwnProperty(r)&&(n[r]=i(n[r],t[r]));return n}function u(n,t,i){n[t]=i}Object.defineProperty(t,"__esModule",{value:!0});t.deepCopy=r;t.deepExtend=i;t.patchProperty=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){var n=this;this.promise=new Promise(function(t,i){n.resolve=t;n.reject=i})}return n.prototype.wrapCallback=function(n){var t=this;return function(i,r){i?t.reject(i):t.resolve(r);"function"==typeof n&&(t.promise.catch(function(){}),1===n.length?n(i):n(i,r))}},n}();t.Deferred=i},function(t,i,r){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var u=r(20);i.getUA=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""};i.isMobileCordova=function(){return void 0!==n&&!!(n.cordova||n.phonegap||n.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(i.getUA())};i.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product};i.isNodeSdk=function(){return!0===u.CONSTANTS.NODE_CLIENT||!0===u.CONSTANTS.NODE_ADMIN}},function(n,t){"use strict";function e(n){var t=r;return r=n,t}var u,r,i,f;Object.defineProperty(t,"__esModule",{value:!0});u="FirebaseError";r=Error.captureStackTrace;t.patchCapture=e;i=function(){function n(n,t){if(this.code=n,this.message=t,r)r(this,f.prototype.create);else{var i=Error.apply(this,arguments);this.name=u;Object.defineProperty(this,"stack",{get:function(){return i.stack}})}}return n}();t.FirebaseError=i;i.prototype=Object.create(Error.prototype);i.prototype.constructor=i;i.prototype.name=u;f=function(){function n(n,t,i){this.service=n;this.serviceName=t;this.errors=i;this.pattern=/\{\$([^}]+)}/g}return n.prototype.create=function(n,t){var u,f,e,o,r;void 0===t&&(t={});f=this.errors[n];e=this.service+"/"+n;u=void 0===f?"Error":f.replace(this.pattern,function(n,i){var r=t[i];return void 0!==r?""+r:"<"+i+"?>"});u=this.serviceName+": "+u+" ("+e+").";o=new i(e,u);for(r in t)t.hasOwnProperty(r)&&"_"!==r.slice(-1)&&(o[r]=t[r]);return o},n}();t.ErrorFactory=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(29),u=i(30);t.decode=function(n){var f={},t={},e={},o="",i;try{i=n.split(".");f=u.jsonEval(r.base64Decode(i[0])||"");t=u.jsonEval(r.base64Decode(i[1])||"");o=i[2];e=t.d||{};delete t.d}catch(n){}return{header:f,claims:t,data:e,signature:o}};t.isValidTimestamp=function(n){var r,u,i=t.decode(n).claims,f=Math.floor((new Date).getTime()/1e3);return"object"==typeof i&&(i.hasOwnProperty("nbf")?r=i.nbf:i.hasOwnProperty("iat")&&(r=i.iat),u=i.hasOwnProperty("exp")?i.exp:r+86400),f&&r&&u&&f>=r&&f<=u};t.issuedAtTime=function(n){var i=t.decode(n).claims;return"object"==typeof i&&i.hasOwnProperty("iat")?i.iat:null};t.isValidFormat=function(n){var r=t.decode(n),i=r.claims;return!!r.signature&&!!i&&"object"==typeof i&&i.hasOwnProperty("iat")};t.isAdmin=function(n){var i=t.decode(n).claims;return"object"==typeof i&&!0===i.admin}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(31);t.querystring=function(n){var t=[];return r.forEach(n,function(n,i){Array.isArray(i)?i.forEach(function(i){t.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}),t.length?"&"+t.join("&"):""};t.querystringDecode=function(n){var t={};return n.replace(/^\?/,"").split("&").forEach(function(n){if(n){var i=n.split("=");t[i[0]]=i[1]}}),t}},function(n,t,i){"use strict";var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),r,u;Object.defineProperty(t,"__esModule",{value:!0});r=i(72);u=function(n){function t(){var t=n.call(this)||this,i;for(t.D=[],t.x=[],t.F=[],t.I=[],t.L=0,t.R=0,t.blockSize=64,t.I[0]=128,i=1;i<t.blockSize;++i)t.I[i]=0;return t.reset(),t}return f(t,n),t.prototype.reset=function(){this.D[0]=1732584193;this.D[1]=4023233417;this.D[2]=2562383102;this.D[3]=271733878;this.D[4]=3285377520;this.L=0;this.R=0},t.prototype.V=function(n,t){var r,i,o;if(t||(t=0),r=this.F,"string"==typeof n)for(i=0;i<16;i++)r[i]=n.charCodeAt(t)<<24|n.charCodeAt(t+1)<<16|n.charCodeAt(t+2)<<8|n.charCodeAt(t+3),t+=4;else for(i=0;i<16;i++)r[i]=n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3],t+=4;for(i=16;i<80;i++)o=r[i-3]^r[i-8]^r[i-14]^r[i-16],r[i]=4294967295&(o<<1|o>>>31);for(var s,h,c=this.D[0],u=this.D[1],f=this.D[2],e=this.D[3],l=this.D[4],i=0;i<80;i++)i<40?i<20?(s=e^u&(f^e),h=1518500249):(s=u^f^e,h=1859775393):i<60?(s=u&f|e&(u|f),h=2400959708):(s=u^f^e,h=3395469782),o=(c<<5|c>>>27)+s+l+h+r[i]&4294967295,l=e,e=f,f=4294967295&(u<<30|u>>>2),u=c,c=o;this.D[0]=this.D[0]+c&4294967295;this.D[1]=this.D[1]+u&4294967295;this.D[2]=this.D[2]+f&4294967295;this.D[3]=this.D[3]+e&4294967295;this.D[4]=this.D[4]+l&4294967295},t.prototype.update=function(n,t){if(null!=n){void 0===t&&(t=n.length);for(var f=t-this.blockSize,i=0,u=this.x,r=this.L;i<t;){if(0==r)for(;i<=f;)this.V(n,i),i+=this.blockSize;if("string"==typeof n){for(;i<t;)if(u[r]=n.charCodeAt(i),++r,++i,r==this.blockSize){this.V(u);r=0;break}}else for(;i<t;)if(u[r]=n[i],++r,++i,r==this.blockSize){this.V(u);r=0;break}}this.L=r;this.R+=t}},t.prototype.digest=function(){var r=[],u=8*this.R,i,n,t;for(this.L<56?this.update(this.I,56-this.L):this.update(this.I,this.blockSize-(this.L-56)),n=this.blockSize-1;n>=56;n--)this.x[n]=255&u,u/=256;for(this.V(this.x),i=0,n=0;n<5;n++)for(t=24;t>=0;t-=8)r[i]=this.D[n]>>t&255,++i;return r},t}(r.Hash);t.Sha1=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.blockSize=-1}return n}();t.Hash=i},function(n,t){"use strict";function r(n,t){var i=new e(n,t);return i.subscribe.bind(i)}function u(n,t){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];Promise.resolve(!0).then(function(){n.apply(void 0,r)}).catch(function(n){t&&t(n)})}}function f(n,t){var i,r,u;if("object"!=typeof n||null===n)return!1;for(i=0,r=t;i<r.length;i++)if(u=r[i],u in n&&"function"==typeof n[u])return!0;return!1}function i(){}Object.defineProperty(t,"__esModule",{value:!0});t.createSubscribe=r;var e=function(){function n(n,t){var i=this;this.observers=[];this.unsubscribes=[];this.observerCount=0;this.task=Promise.resolve();this.finalized=!1;this.onNoObservers=t;this.task.then(function(){n(i)}).catch(function(n){i.error(n)})}return n.prototype.next=function(n){this.forEachObserver(function(t){t.next(n)})},n.prototype.error=function(n){this.forEachObserver(function(t){t.error(n)});this.close(n)},n.prototype.complete=function(){this.forEachObserver(function(n){n.complete()});this.close()},n.prototype.subscribe=function(n,t,r){var u,e=this,o;if(void 0===n&&void 0===t&&void 0===r)throw Error("Missing Observer.");return u=f(n,["next","error","complete"])?n:{next:n,error:t,complete:r},void 0===u.next&&(u.next=i),void 0===u.error&&(u.error=i),void 0===u.complete&&(u.complete=i),o=this.unsubscribeOne.bind(this,this.observers.length),this.finalized&&this.task.then(function(){try{e.finalError?u.error(e.finalError):u.complete()}catch(n){}}),this.observers.push(u),o},n.prototype.unsubscribeOne=function(n){void 0!==this.observers&&void 0!==this.observers[n]&&(delete this.observers[n],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},n.prototype.forEachObserver=function(n){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,n)},n.prototype.sendOne=function(n,t){var i=this;this.task.then(function(){if(void 0!==i.observers&&void 0!==i.observers[n])try{t(i.observers[n])}catch(n){"undefined"!=typeof console&&console.error&&console.error(n)}})},n.prototype.close=function(n){var t=this;this.finalized||(this.finalized=!0,void 0!==n&&(this.finalError=n),this.task.then(function(){t.observers=void 0;t.onNoObservers=void 0}))},n}();t.async=u},function(n,t){"use strict";function i(n,t,i){var r="",u;switch(t){case 1:r=i?"first":"First";break;case 2:r=i?"second":"Second";break;case 3:r=i?"third":"Third";break;case 4:r=i?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4.  Need to update it?");}return u=n+" failed: ",u+(r+" argument ")}function r(n,t,r,u){if((!u||r)&&"string"!=typeof r)throw Error(i(n,t,u)+"must be a valid firebase namespace.");}function u(n,t,r,u){if((!u||r)&&"function"!=typeof r)throw Error(i(n,t,u)+"must be a valid function.");}function f(n,t,r,u){if((!u||r)&&("object"!=typeof r||null===r))throw Error(i(n,t,u)+"must be a valid context object.");}Object.defineProperty(t,"__esModule",{value:!0});t.validateArgCount=function(n,t,i,r){var u,f;if(r<t?u="at least "+t:r>i&&(u=0===i?"none":"no more than "+i),u){f=n+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+u+".";throw Error(f);}};t.errorPrefix=i;t.validateNamespace=r;t.validateCallback=u;t.validateContextObject=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(28);t.stringToByteArray=function(n){for(var t,e,i=[],u=0,f=0;f<n.length;f++)t=n.charCodeAt(f),t>=55296&&t<=56319&&(e=t-55296,f++,r.assert(f<n.length,"Surrogate pair missing trail surrogate."),t=65536+(e<<10)+(n.charCodeAt(f)-56320)),t<128?i[u++]=t:t<2048?(i[u++]=t>>6|192,i[u++]=63&t|128):t<65536?(i[u++]=t>>12|224,i[u++]=t>>6&63|128,i[u++]=63&t|128):(i[u++]=t>>18|240,i[u++]=t>>12&63|128,i[u++]=t>>6&63|128,i[u++]=63&t|128);return i};t.stringLength=function(n){for(var r,t=0,i=0;i<n.length;i++)r=n.charCodeAt(i),r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,i++):t+=3;return t}}])}().default;try{webpackJsonpFirebase([4],{76:function(n,t,i){i(77)},77:function(n,t,i){(function(n){(function(){function p(n){return"string"==typeof n}function bit(n){return"boolean"==typeof n}function ni(){}function dr(n){var t=typeof n,i;if("object"==t){if(!n)return"null";if(n instanceof Array)return"array";if(n instanceof Object)return t;if(i=Object.prototype.toString.call(n),"[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof n.length&&void 0!==n.splice&&void 0!==n.propertyIsEnumerable&&!n.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||void 0!==n.call&&void 0!==n.propertyIsEnumerable&&!n.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===n.call)return"object";return t}function kit(n){return null===n}function vi(n){return"array"==dr(n)}function uf(n){var t=dr(n);return"array"==t||"object"==t&&"number"==typeof n.length}function rt(n){return"function"==dr(n)}function lt(n){var t=typeof n;return"object"==t&&null!=n||"function"==t}function dit(n){return n.call.apply(n.bind,arguments)}function git(n,t){if(!n)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,i),n.apply(t,r)}}return function(){return n.apply(t,arguments)}}function f(){return f=Function.prototype.bind&&-1!=(""+Function.prototype.bind).indexOf("native code")?dit:git,f.apply(null,arguments)}function ge(n){var t=Array.prototype.slice.call(arguments,1);return function(){var i=t.slice();return i.push.apply(i,arguments),n.apply(this,i)}}function l(n,t){function i(){}i.prototype=t.prototype;n.ib=t.prototype;n.prototype=new i;n.prototype.constructor=n;n.Rc=function(n,i){for(var u=Array(arguments.length-2),r=2;r<arguments.length;r++)u[r-2]=arguments[r];return t.prototype[i].apply(n,u)}}function st(n){if(Error.captureStackTrace)Error.captureStackTrace(this,st);else{var t=Error().stack;t&&(this.stack=t)}n&&(this.message=n+"")}function yh(n){for(var t=n.split("%s"),i="",r=Array.prototype.slice.call(arguments,1);r.length&&1<t.length;)i+=t.shift()+r.shift();return i+t.join("%s")}function ph(n){return lst.test(n)?(-1!=n.indexOf("&")&&(n=n.replace(fst,"&amp;")),-1!=n.indexOf("<")&&(n=n.replace(est,"&lt;")),-1!=n.indexOf(">")&&(n=n.replace(ost,"&gt;")),-1!=n.indexOf('"')&&(n=n.replace(sst,"&quot;")),-1!=n.indexOf("'")&&(n=n.replace(hst,"&#39;")),-1!=n.indexOf("\0")&&(n=n.replace(cst,"&#0;")),n):n}function v(n,t){return-1!=n.indexOf(t)}function wh(n,t){return n<t?-1:n>t?1:0}function bh(n,t){t.unshift(n);st.call(this,yh.apply(null,t));t.shift()}function ff(n){throw new bh("Failure"+(n?": "+n:""),Array.prototype.slice.call(arguments,1));}function nrt(n,t){var i=n.length,r=p(n)?n.split(""):n;for(--i;0<=i;--i)i in r&&t.call(void 0,r[i],i,n)}function trt(n){n:{for(var t=aut,u=n.length,r=p(n)?n.split(""):n,i=0;i<u;i++)if(i in r&&t.call(void 0,r[i],i,n)){t=i;break n}t=-1}return 0>t?null:p(n)?n.charAt(t):n[t]}function tr(n,t){return 0<=yn(n,t)}function no(n,t){t=yn(n,t);var i;return(i=0<=t)&&Array.prototype.splice.call(n,t,1),i}function ti(n,t){var i=0;nrt(n,function(r,u){t.call(void 0,r,u,n)&&1==Array.prototype.splice.call(n,u,1).length&&i++})}function kh(){return Array.prototype.concat.apply([],arguments)}function ir(n){var i=n.length,r,t;if(0<i){for(r=Array(i),t=0;t<i;t++)r[t]=n[t];return r}return[]}function g(n){return v(tf,n)}function rp(n,t){for(var i in n)t.call(void 0,n[i],i,n)}function up(n){var t,i=[],r=0;for(t in n)i[r++]=n[t];return i}function fp(n){var t,i=[],r=0;for(t in n)i[r++]=t;return i}function ef(n){for(var t in n)return!1;return!0}function irt(n,t){for(var i in n)if(!(i in t)||n[i]!==t[i])return!1;for(i in t)if(!(i in n))return!1;return!0}function of(n){var t,i={};for(t in n)i[t]=n[t];return i}function yi(n){for(var t,i,u,r=1;r<arguments.length;r++){i=arguments[r];for(t in i)n[t]=i[t];for(u=0;u<av.length;u++)t=av[u],Object.prototype.hasOwnProperty.call(i,t)&&(n[t]=i[t])}}function dh(n){return dh[" "](n),n}function rrt(n,t){var i=bn;return Object.prototype.hasOwnProperty.call(i,n)?i[n]:i[n]=t(n)}function ep(){var n=r.document;if(n)return n.documentMode}function op(n){return rrt(n,function(){for(var t,i,r=0,f=vn(gs+"").split("."),e=vn(n+"").split("."),o=Math.max(f.length,e.length),u=0;0==r&&u<o;u++){t=f[u]||"";i=e[u]||"";do{if(t=/(\d*)(\D*)(.*)/.exec(t)||["","","",""],i=/(\d*)(\D*)(.*)/.exec(i)||["","","",""],0==t[0].length&&0==i[0].length)break;r=wh(0==t[1].length?0:parseInt(t[1],10),0==i[1].length?0:parseInt(i[1],10))||wh(0==t[2].length,0==i[2].length)||wh(t[2],i[2]);t=t[3];i=i[3]}while(0==r)}return 0<=r})}function sp(n){n.prototype.then=n.prototype.then;n.prototype.$goog_Thenable=!0}function hp(n){if(!n)return!1;try{return!!n.$goog_Thenable}catch(n){return!1}}function gh(n,t,i){this.f=i;this.c=n;this.g=t;this.b=0;this.a=null}function cp(n,t){n.g(t);n.b<n.f&&(n.b++,t.next=n.a,n.a=t)}function urt(){var n=kn,t=null;return n.a&&(t=n.a,n.a=n.a.next,n.a||(n.b=null),t.next=null),t}function nc(){this.next=this.b=this.a=null}function lp(n){r.setTimeout(function(){throw n;},0)}function frt(){var t=r.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!g("Presto")&&(t=function(){var n=document.createElement("IFRAME"),t,r,i;n.style.display="none";n.src="";document.documentElement.appendChild(n);t=n.contentWindow;n=t.document;n.open();n.write("");n.close();r="callImmediate"+Math.random();i="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;n=f(function(n){"*"!=i&&n.origin!=i||n.data!=r||this.port1.onmessage()},this);t.addEventListener("message",n,!1);this.port1={};this.port2={postMessage:function(){t.postMessage(r,i)}}}),void 0!==t&&!g("Trident")&&!g("MSIE")){var u=new t,n={},i=n;return u.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var t=n.pb;n.pb=null;t()}},function(n){i.next={pb:n};i=i.next;u.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(n){var t=document.createElement("SCRIPT");t.onreadystatechange=function(){t.onreadystatechange=null;t.parentNode.removeChild(t);t=null;n();n=null};document.documentElement.appendChild(t)}:function(n){r.setTimeout(n,0)}}function to(n,t){rh||ert();wv||(rh(),wv=!0);var i=kn,r=yv.get();r.set(n,t);i.b?i.b.next=r:i.a=r;i.b=r}function ert(){if(-1!=(r.Promise+"").indexOf("[native code]")){var n=r.Promise.resolve(void 0);rh=function(){n.then(ap)}}else rh=function(){var n=ap;!rt(r.setImmediate)||r.Window&&r.Window.prototype&&!g("Edge")&&r.Window.prototype.setImmediate==r.setImmediate?(pv||(pv=frt()),pv(n)):r.setImmediate(n)}}function ap(){for(var n;n=urt();){try{n.a.call(n.b)}catch(n){lp(n)}cp(yv,n)}wv=!1}function c(n,t){if(this.a=kr,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,n!=ni)try{var i=this;n.call(t,function(n){rr(i,ae,n)},function(n){if(!(n instanceof nu))try{if(n instanceof Error)throw n;throw Error("Promise rejected.");}catch(n){}rr(i,ai,n)})}catch(n){rr(this,ai,n)}}function vp(){this.next=this.f=this.b=this.g=this.a=null;this.c=!1}function tc(n,t,i){var r=bv.get();return r.g=n,r.b=t,r.f=i,r}function e(n){if(n instanceof c)return n;var t=new c(ni);return rr(t,ae,n),t}function b(n){return new c(function(t,i){i(n)})}function yp(n,t,i){bp(n,t,i,null)||to(ge(t,n))}function ort(n){return new c(function(t,i){var u=n.length,f=[];if(u)for(var e,o=function(n,i){u--;f[n]=i;0==u&&t(f)},s=function(n){i(n)},r=0;r<n.length;r++)e=n[r],yp(e,ge(o,r),s);else t(f)})}function srt(n){return new c(function(t){var r=n.length,u=[],e,f,i;if(r)for(f=function(n,i,f){r--;u[n]=i?{Ub:!0,value:f}:{Ub:!1,reason:f};0==r&&t(u)},i=0;i<n.length;i++)e=n[i],yp(e,ge(f,i,!0),ge(f,i,!1));else t(u)})}function gr(n,t){return t=tc(t,t,void 0),t.c=!0,ic(n,t),n}function pp(n,t){var i;if(n.a==kr)if(n.c){if(i=n.c,i.b){for(var r=0,f=null,e=null,u=i.b;u&&(u.c||(r++,u.a==n&&(f=u),!(f&&1<r)));u=u.next)f||(e=u);f&&(i.a==kr&&1==r?pp(i,t):(e?(r=e,r.next==i.f&&(i.f=r),r.next=r.next.next):dp(i),gp(i,f,ai,t)))}n.c=null}else rr(n,ai,t)}function ic(n,t){n.b||n.a!=ae&&n.a!=ai||kp(n);n.f?n.f.next=t:n.b=t;n.f=t}function wp(n,t,i,r){var u=tc(null,null,null);return u.a=new c(function(n,f){u.g=t?function(i){try{var u=t.call(r,i);n(u)}catch(n){f(n)}}:n;u.b=i?function(t){try{var u=i.call(r,t);void 0===u&&t instanceof nu?f(t):n(u)}catch(n){f(n)}}:f}),u.a.c=n,ic(n,u),u.a}function rr(n,t,i){n.a==kr&&(n===i&&(t=ai,i=new TypeError("Promise cannot resolve to itself")),n.a=1,bp(i,n.Ac,n.Bc,n)||(n.i=i,n.a=t,n.c=null,kp(n),t!=ai||i instanceof nu||crt(n,i)))}function bp(n,t,i,r){if(n instanceof c)return ic(n,tc(t||ni,i||null,r)),!0;if(hp(n))return n.then(t,i,r),!0;if(lt(n))try{var u=n.then;if(rt(u))return hrt(n,u,t,i,r),!0}catch(n){return i.call(r,n),!0}return!1}function hrt(n,t,i,r,u){function e(n){f||(f=!0,r.call(u,n))}function o(n){f||(f=!0,i.call(u,n))}var f=!1;try{t.call(n,o,e)}catch(n){e(n)}}function kp(n){n.h||(n.h=!0,to(n.Qb,n))}function dp(n){var t=null;return n.b&&(t=n.b,n.b=t.next,t.next=null),n.b||(n.f=null),t}function gp(n,t,i,r){if(i==ai&&t.b&&!t.c)for(;n&&n.g;n=n.c)n.g=!1;if(t.a)t.a.c=null,nw(t,i,r);else try{t.c?t.g.call(t.f):nw(t,i,r)}catch(n){kv.call(null,n)}cp(bv,t)}function nw(n,t,i){t==ae?n.g.call(n.f,i):n.b&&n.b.call(n.f,i)}function crt(n,t){n.g=!0;to(function(){n.g&&kv.call(null,t)})}function nu(n){st.call(this,n)}function ur(){this.a="";this.b=dv}function tw(n){return n instanceof ur&&n.constructor===ur&&n.b===dv?n.a:(ff("expected object of type Const, got '"+n+"'"),"type_error:Const")}function sf(n){var t=new ur;return t.a=n,t}function tu(){this.a="";this.b=gn}function iw(n){return n instanceof tu&&n.constructor===tu&&n.b===gn?n.a:(ff("expected object of type TrustedResourceUrl, got '"+n+"' of type "+dr(n)),"type_error:TrustedResourceUrl")}function rc(n,t){return n=lrt(n,t),t=new tu,t.a=n,t}function lrt(n,t){var i=tw(n);if(!bst.test(i))throw Error("Invalid TrustedResourceUrl format: "+i);return i.replace(wst,function(n,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format string, "'+i+'", but no valid label mapping found in args: '+JSON.stringify(t));return n=t[r],n instanceof ur?tw(n):encodeURIComponent(n+"")})}function ii(){this.a="";this.b=ny}function io(n){return n instanceof ii&&n.constructor===ii&&n.b===ny?n.a:(ff("expected object of type SafeUrl, got '"+n+"' of type "+dr(n)),"type_error:SafeUrl")}function rw(n){return n instanceof ii?n:(n=n.la?n.ja():n+"",gv.test(n)||(n="about:invalid#zClosurez"),uc(n))}function uc(n){var t=new ii;return t.a=n,t}function iu(){this.a="";this.b=ty}function art(n){return n instanceof iu&&n.constructor===iu&&n.b===ty?n.a:(ff("expected object of type SafeHtml, got '"+n+"' of type "+dr(n)),"type_error:SafeHtml")}function ro(n){var t=new iu;return t.a=n,t}function uo(n){var t=document;return p(n)?t.getElementById(n):n}function uw(n,t){rp(t,function(t,i){t&&t.la&&(t=t.ja());"style"==i?n.style.cssText=t:"class"==i?n.className=t:"for"==i?n.htmlFor=t:ntt.hasOwnProperty(i)?n.setAttribute(ntt[i],t):0==i.lastIndexOf("aria-",0)||0==i.lastIndexOf("data-",0)?n.setAttribute(i,t):n[i]=t})}function vrt(){var i=arguments,u=document,t=i[0]+"",n=i[1],r;return!dn&&n&&(n.name||n.type)&&((t=["<",t],n.name&&t.push(' name="',ph(n.name),'"'),n.type)&&(t.push(' type="',ph(n.type),'"'),r={},yi(r,n),delete r.type,n=r),t.push(">"),t=t.join("")),t=u.createElement(t),n&&(p(n)?t.className=n:vi(n)?t.className=n.join(" "):uw(t,n)),2<i.length&&yrt(u,t,i),t}function yrt(n,t,i){function f(i){i&&t.appendChild(p(i)?n.createTextNode(i):i)}for(var r,u=2;u<i.length;u++)r=i[u],!uf(r)||lt(r)&&0<r.nodeType?f(r):ct(prt(r)?ir(r):r,f)}function prt(n){if(n&&"number"==typeof n.length){if(lt(n))return"function"==typeof n.item||"string"==typeof n.item;if(rt(n))return"function"==typeof n.item}return!1}function fw(n){var t=[];return fc(new wrt,n,t),t.join("")}function wrt(){}function fc(n,t,i){var r,u,f;if(null==t)i.push("null");else{if("object"==typeof t){if(vi(t)){for(r=t,t=r.length,i.push("["),u="",f=0;f<t;f++)i.push(u),fc(n,r[f],i),u=",";return void i.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){i.push("{");u="";for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"!=typeof(f=t[r])&&(i.push(u),ew(r,i),i.push(":"),fc(n,f,i),u=",");return void i.push("}")}t=t.valueOf()}switch(typeof t){case"string":ew(t,i);break;case"number":i.push(isFinite(t)&&!isNaN(t)?t+"":"null");break;case"boolean":i.push(t+"");break;case"function":i.push("null");break;default:throw Error("Unknown type: "+typeof t);}}}function ew(n,t){t.push('"',n.replace(kst,function(n){var t=ttt[n];return t||(t="\\u"+(65536|n.charCodeAt(0)).toString(16).substr(1),ttt[n]=t),t}),'"')}function fo(){0!=itt&&(rtt[this[ds]||(this[ds]=++an)]=this);this.oa=this.oa;this.Fa=this.Fa}function ow(n){n.oa||(n.oa=!0,n.ta(),0!=itt&&(n=n[ds]||(n[ds]=++an),delete rtt[n]))}function at(n,t){this.type=n;this.b=this.target=t;this.Bb=!0}function fr(n,t){var r,i,u;if(at.call(this,n?n.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,n){if(r=this.type=n.type,i=n.changedTouches?n.changedTouches[0]:null,this.target=n.target||n.srcElement,this.b=t,t=n.relatedTarget){if(wn){n:{try{dh(t.nodeName);u=!0;break n}catch(p){}u=!1}u||(t=null)}}else"mouseover"==r?t=n.fromElement:"mouseout"==r&&(t=n.toElement);this.relatedTarget=t;null===i?(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.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=n.button;this.key=n.key||"";this.ctrlKey=n.ctrlKey;this.altKey=n.altKey;this.shiftKey=n.shiftKey;this.metaKey=n.metaKey;this.pointerId=n.pointerId||0;this.pointerType=p(n.pointerType)?n.pointerType:ftt[n.pointerType]||"";this.a=n;n.defaultPrevented&&this.c()}}function brt(n,t,i,r,u){this.listener=n;this.a=null;this.src=t;this.type=i;this.capture=!!r;this.La=u;this.key=++tht;this.ma=this.Ha=!1}function eo(n){n.ma=!0;n.listener=null;n.a=null;n.src=null;n.La=null}function ec(n){this.src=n;this.a={};this.b=0}function oc(n,t,i,r,u,f){var e=""+t,o;return(t=n.a[e])||(t=n.a[e]=[],n.b++),o=hc(t,i,u,f),-1<o?(n=t[o],r||(n.Ha=!1)):(n=new brt(i,n.src,e,!!u,f),n.Ha=r,t.push(n)),n}function sc(n,t){var i=t.type;i in n.a&&no(n.a[i],t)&&(eo(t),0==n.a[i].length&&(delete n.a[i],n.b--))}function hc(n,t,i,r){for(var f,u=0;u<n.length;++u)if(f=n[u],!f.ma&&f.listener==t&&f.capture==!!i&&f.La==r)return u;return-1}function pi(n,t,i,r,u){if(r&&r.once)cc(n,t,i,r,u);else if(vi(t))for(var f=0;f<t.length;f++)pi(n,t[f],i,r,u);else i=lc(i),n&&n[ve]?vw(n,t,i,lt(r)?!!r.capture:!!r,u):sw(n,t,i,!1,r,u)}function sw(n,t,i,r,u,f){if(!t)throw Error("Invalid event type");var o=lt(u)?!!u.capture:!!u,e=oo(n);if(e||(n[iy]=e=new ec(n)),i=oc(e,t,i,r,o,f),!i.a){if(r=krt(),i.a=r,r.src=n,r.listener=i,n.addEventListener)nht||(u=o),void 0===u&&(u=!1),n.addEventListener(""+t,r,u);else{if(!n.attachEvent)throw Error("addEventListener and attachEvent are unavailable.");n.attachEvent(cw(""+t),r)}ett++}}function krt(){var t=drt,n=utt?function(i){return t.call(n.src,n.listener,i)}:function(i){if(!(i=t.call(n.src,n.listener,i)))return i};return n}function cc(n,t,i,r,u){if(vi(t))for(var f=0;f<t.length;f++)cc(n,t[f],i,r,u);else i=lc(i),n&&n[ve]?ac(n,t,i,lt(r)?!!r.capture:!!r,u):sw(n,t,i,!0,r,u)}function yt(n,t,i,r,u){if(vi(t))for(var f=0;f<t.length;f++)yt(n,t[f],i,r,u);else r=lt(r)?!!r.capture:!!r,i=lc(i),n&&n[ve]?(n=n.u,(t+="")in n.a&&(f=n.a[t],-1<(i=hc(f,i,r,u))&&(eo(f[i]),Array.prototype.splice.call(f,i,1),0==f.length&&(delete n.a[t],n.b--)))):n&&(n=oo(n))&&(t=n.a[""+t],n=-1,t&&(n=hc(t,i,r,u)),(i=-1<n?t[n]:null)&&hw(i))}function hw(n){var t,i,r;"number"!=typeof n&&n&&!n.ma&&(t=n.src,t&&t[ve]?sc(t.u,n):(i=n.type,r=n.a,t.removeEventListener?t.removeEventListener(i,r,n.capture):t.detachEvent&&t.detachEvent(cw(i),r),ett--,(i=oo(t))?(sc(i,n),0==i.b&&(i.src=null,t[iy]=null)):eo(n)))}function cw(n){return n in ry?ry[n]:ry[n]="on"+n}function lw(n,t,i,r){var f=!0,u;if((n=oo(n))&&(t=n.a[""+t]))for(t=t.concat(),n=0;n<t.length;n++)u=t[n],u&&u.capture==i&&!u.ma&&(u=aw(u,r),f=f&&!1!==u);return f}function aw(n,t){var i=n.listener,r=n.La||n.src;return n.Ha&&hw(n),i.call(r,t)}function drt(n,t){var f,i,u,e;if(n.ma)return!0;if(!utt){if(!t)n:{for(t=["window","event"],f=r,i=0;i<t.length;i++)if(null==(f=f[t[i]])){t=null;break n}t=f}if(i=t,t=new fr(i,this),f=!0,!(0>i.keyCode||void 0!=i.returnValue)){n:{if(u=!1,0==i.keyCode)try{i.keyCode=-1;break n}catch(n){u=!0}(u||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],u=t.b;u;u=u.parentNode)i.push(u);for(n=n.type,u=i.length-1;0<=u;u--)t.b=i[u],e=lw(i[u],n,!0,t),f=f&&e;for(u=0;u<i.length;u++)t.b=i[u],e=lw(i[u],n,!1,t),f=f&&e}return f}return aw(n,new fr(t,this))}function oo(n){return n=n[iy],n instanceof ec?n:null}function lc(n){return rt(n)?n:(n[uy]||(n[uy]=function(t){return n.handleEvent(t)}),n[uy])}function pt(){fo.call(this);this.u=new ec(this);this.Ib=this;this.Ra=null}function tt(n,t){var u,i=n.Ra,r,f,e;if(i)for(u=[];i;i=i.Ra)u.push(i);if((n=n.Ib,i=t.type||t,p(t))?t=new at(t,n):t instanceof at?t.target=t.target||n:(r=t,t=new at(i,n),yi(t,r)),r=!0,u)for(f=u.length-1;0<=f;f--)e=t.b=u[f],r=so(e,i,!0,t)&&r;if(e=t.b=n,r=so(e,i,!0,t)&&r,r=so(e,i,!1,t)&&r,u)for(f=0;f<u.length;f++)e=t.b=u[f],r=so(e,i,!1,t)&&r}function vw(n,t,i,r,u){oc(n.u,t+"",i,!1,r,u)}function ac(n,t,i,r,u){oc(n.u,t+"",i,!0,r,u)}function so(n,t,i,r){var f,e,u,o,s;if(!(t=n.u.a[t+""]))return!0;for(t=t.concat(),f=!0,e=0;e<t.length;++e)u=t[e],u&&!u.ma&&u.capture==i&&(o=u.listener,s=u.La||u.src,u.Ha&&sc(n.u,u),f=!1!==o.call(s,r)&&f);return f&&0!=r.Bb}function vc(n,t,i){if(rt(n))i&&(n=f(n,i));else{if(!n||"function"!=typeof n.handleEvent)throw Error("Invalid listener argument");n=f(n.handleEvent,n)}return 2147483647<+t?-1:r.setTimeout(n,t||0)}function er(n){var t=null;return new c(function(i,r){-1==(t=vc(function(){i(void 0)},n))&&r(Error("Failed to schedule timer."))}).s(function(n){throw r.clearTimeout(t),n;})}function yc(n,t,i,r,u){this.reset(n,t,i,r,u)}function pc(n){this.f=n;this.b=this.c=this.a=null}function ho(n,t){this.name=n;this.value=t}function yw(n){return n.c?n.c:n.a?yw(n.a):(ff("Root logger has no level set."),null)}function pw(n){var i,t,r;return ye||(ye=new pc(""),uh[""]=ye,ye.c=iht),(i=uh[n])||(i=new pc(n),t=n.lastIndexOf("."),r=n.substr(t+1),t=pw(n.substr(0,t)),t.b||(t.b={}),t.b[r]=i,i.a=t,uh[n]=i),i}function ru(n){var t,i,r;if(this.b={},this.a=[],this.c=0,t=arguments.length,1<t){if(t%2)throw Error("Uneven number of arguments");for(i=0;i<t;i+=2)this.set(arguments[i],arguments[i+1])}else if(n)for(n instanceof ru?(t=n.S(),i=n.P()):(t=fp(n),i=up(n)),r=0;r<t.length;r++)this.set(t[r],i[r])}function wc(n){var t,r,i,u;if(n.c!=n.a.length){for(t=0,r=0;t<n.a.length;)i=n.a[t],or(n.b,i)&&(n.a[r++]=i),t++;n.a.length=r}if(n.c!=n.a.length){for(u={},r=t=0;t<n.a.length;)i=n.a[t],or(u,i)||(n.a[r++]=i,u[i]=1),t++;n.a.length=r}}function or(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function vt(n,t){n&&n.log(rht,t,void 0)}function grt(n){return hv(n,function(n){return n=n.toString(16),1<n.length?n:"0"+n}).join("")}function nut(n){var t="";return tut(n,function(n){t+=String.fromCharCode(n)}),t}function tut(n,t){function i(t){for(;r<n.length;){var i=n.charAt(r++),u=we[i];if(null!=u)return u;if(!/^[\s\xa0]*$/.test(i))throw Error("Unknown base64 encoding at char: "+i);}return t}var r;for(iut(),r=0;;){var e=i(-1),o=i(0),u=i(64),f=i(64);if(64===f&&-1===e)break;t(e<<2|o>>4);64!=u&&(t(o<<4&240|u>>2),64!=f&&t(u<<6&192|f))}}function iut(){if(!pe){pe={};we={};for(var n=0;65>n;n++)pe[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(n),we[pe[n]]=n,62<=n&&(we["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(n)]=n)}}function wi(n,t){this.g=[];this.v=n;this.o=t||null;this.f=this.a=!1;this.c=void 0;this.u=this.w=this.i=!1;this.h=0;this.b=null;this.l=0}function hf(n,t,i){n.a=!0;n.c=i;n.f=!t;bw(n)}function co(n){if(n.a){if(!n.u)throw new lo;n.u=!1}}function rut(n,t){bc(n,null,t,void 0)}function bc(n,t,i,r){n.g.push([t,i,r]);n.a&&bw(n)}function ww(n){return ast(n.g,function(n){return rt(n[1])})}function bw(n){var t,e,u,i;for(n.h&&n.a&&ww(n)&&(t=n.h,e=be[t],e&&(r.clearTimeout(e.a),delete be[t]),n.h=0),n.b&&(n.b.l--,delete n.b),t=n.c,u=e=!1;n.g.length&&!n.i;){var o=n.g.shift(),s=o[0],h=o[1];if(o=o[2],s=n.f?h:s)try{i=s.call(o||n.o,t);void 0!==i&&(n.f=n.f&&(i==t||i instanceof Error),n.c=t=i);(hp(t)||"function"==typeof r.Promise&&t instanceof r.Promise)&&(u=!0,n.i=!0)}catch(u){t=u;n.f=!0;ww(n)||(e=!0)}}n.c=t;u&&(i=f(n.m,n,!0),u=f(n.m,n,!1),t instanceof wi?(bc(t,i,u),t.w=!0):t.then(i,u));e&&(t=new kw(t),be[t.a]=t,n.h=t.a)}function lo(){st.call(this)}function cf(){st.call(this)}function kw(n){this.a=r.setTimeout(f(this.c,this),0);this.b=n}function uut(){this.b=-1}function ao(n,t){this.b=-1;this.b=htt;this.f=r.Uint8Array?new Uint8Array(this.b):Array(this.b);this.g=this.c=0;this.a=[];this.i=n;this.h=t;this.l=r.Int32Array?new Int32Array(64):Array(64);fy||(fy=r.Int32Array?new Int32Array(sy):sy);this.reset()}function kc(n){for(var e,f,a,i=n.f,o=n.l,t=0,r=0;r<i.length;)o[t++]=i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3],r=4*t;for(i=16;64>i;i++)r=0|o[i-15],t=0|o[i-2],e=(0|o[i-16])+((r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3)|0,f=(0|o[i-7])+((t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)|0,o[i]=e+f|0;t=0|n.a[0];r=0|n.a[1];var s=0|n.a[2],l=0|n.a[3],u=0|n.a[4],h=0|n.a[5],c=0|n.a[6];for(e=0|n.a[7],i=0;64>i;i++)a=((t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10))+(t&r^t&s^r&s)|0,f=u&h^~u&c,e=e+((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))|0,f=f+(0|fy[i])|0,f=e+(f+(0|o[i])|0)|0,e=c,c=h,h=u,u=l+f|0,l=s,s=r,r=t,t=f+a|0;n.a[0]=n.a[0]+t|0;n.a[1]=n.a[1]+r|0;n.a[2]=n.a[2]+s|0;n.a[3]=n.a[3]+l|0;n.a[4]=n.a[4]+u|0;n.a[5]=n.a[5]+h|0;n.a[6]=n.a[6]+c|0;n.a[7]=n.a[7]+e|0}function dc(n,t,i){var f,r,u;if(void 0===i&&(i=t.length),f=0,r=n.c,p(t))for(;f<i;)n.f[r++]=t.charCodeAt(f++),r==n.b&&(kc(n),r=0);else{if(!uf(t))throw Error("message must be string or array");for(;f<i;){if(u=t[f++],!("number"==typeof u&&0<=u&&255>=u&&u==(0|u)))throw Error("message must be a byte array");n.f[r++]=u;r==n.b&&(kc(n),r=0)}}n.c=r;n.g+=i}function dw(){ao.call(this,8,ltt)}function gw(n){if(n.P&&"function"==typeof n.P)return n.P();if(p(n))return n.split("");if(uf(n)){for(var i=[],r=n.length,t=0;t<r;t++)i.push(n[t]);return i}return up(n)}function nb(n){var i,t;if(n.S&&"function"==typeof n.S)return n.S();if(!n.P||"function"!=typeof n.P){if(uf(n)||p(n)){for(i=[],n=n.length,t=0;t<n;t++)i.push(t);return i}return fp(n)}}function fut(n,t){if(n.forEach&&"function"==typeof n.forEach)n.forEach(t,void 0);else if(uf(n)||p(n))ct(n,t,void 0);else for(var r=nb(n),u=gw(n),f=u.length,i=0;i<f;i++)t.call(void 0,u[i],r&&r[i],n)}function eut(n,t){var i,r,u,f;if(n)for(n=n.split("&"),i=0;i<n.length;i++)r=n[i].indexOf("="),u=null,0<=r?(f=n[i].substring(0,r),u=n[i].substring(r+1)):f=n[i],t(f,u?decodeURIComponent(u.replace(/\+/g," ")):"")}function uu(n,t){if(this.b=this.l=this.c="",this.i=null,this.h=this.g="",this.f=!1,n instanceof uu){this.f=void 0!==t?t:n.f;gc(this,n.c);this.l=n.l;this.b=n.b;tb(this,n.i);this.g=n.g;t=n.a;var i=new eu;i.c=t.c;t.a&&(i.a=new ru(t.a),i.b=t.b);ib(this,i);this.h=n.h}else n&&(i=(n+"").match(hy))?(this.f=!!t,gc(this,i[1]||"",!0),this.l=lf(i[2]||""),this.b=lf(i[3]||"",!0),tb(this,i[4]),this.g=lf(i[5]||"",!0),ib(this,i[6]||"",!0),this.h=lf(i[7]||"")):(this.f=!!t,this.a=new eu(null,0,this.f))}function gc(n,t,i){n.c=i?lf(t,!0):t;n.c&&(n.c=n.c.replace(/:$/,""))}function tb(n,t){if(t){if(t=+t,isNaN(t)||0>t)throw Error("Bad port number "+t);n.i=t}else n.i=null}function ib(n,t,i){t instanceof eu?(n.a=t,sut(n.a,n.f)):(i||(t=af(t,oht)),n.a=new eu(t,0,n.f))}function k(n,t,i){n.a.set(t,i)}function fu(n,t){return n.a.get(t)}function bi(n){return n instanceof uu?new uu(n):new uu(n,void 0)}function rb(n,t){var i=new uu(null,void 0);return gc(i,"https"),n&&(i.b=n),t&&(i.g=t),i}function lf(n,t){return n?t?decodeURI(n.replace(/%25/g,"%2525")):decodeURIComponent(n):""}function af(n,t,i){return p(n)?(n=encodeURI(n).replace(t,out),i&&(n=n.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n):null}function out(n){return n=n.charCodeAt(0),"%"+(n>>4&15).toString(16)+(15&n).toString(16)}function eu(n,t,i){this.b=this.a=null;this.c=n||null;this.f=!!i}function ki(n){n.a||(n.a=new ru,n.b=0,n.c&&eut(n.c,function(t,i){fb(n,decodeURIComponent(t.replace(/\+/g," ")),i)}))}function ub(n){var u=nb(n),i,t,f,r;if(void 0===u)throw Error("Keys are undefined");for(i=new eu(null,0,void 0),n=gw(n),t=0;t<u.length;t++)f=u[t],r=n[t],vi(r)?ob(i,f,r):fb(i,f,r);return i}function fb(n,t,i){ki(n);n.c=null;t=ou(n,t);var r=n.a.get(t);r||n.a.set(t,r=[]);r.push(i);n.b+=1}function oi(n,t){ki(n);t=ou(n,t);or(n.a.b,t)&&(n.c=null,n.b-=n.a.get(t).length,n=n.a,or(n.b,t)&&(delete n.b[t],n.c--,n.a.length>2*n.c&&wc(n)))}function eb(n,t){return ki(n),t=ou(n,t),or(n.a.b,t)}function ob(n,t,i){oi(n,t);0<i.length&&(n.c=null,n.a.set(ou(n,t),ir(i)),n.b+=i.length)}function ou(n,t){return t+="",n.f&&(t=t.toLowerCase()),t}function sut(n,t){t&&!n.f&&(ki(n),n.c=null,n.a.forEach(function(n,t){var i=t.toLowerCase();t!=i&&(oi(this,t),ob(this,i,n))},n));n.f=t}function vo(){}function hut(n){return n.c||(n.c=n.b())}function yo(){}function sb(n){var r,t,i;if(!n.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(r=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],t=0;t<4;t++){i=r[t];try{return new ActiveXObject(i),n.f=i}catch(n){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return n.f}function sr(n){pt.call(this);this.headers=new ru;this.w=n||null;this.b=!1;this.v=this.a=null;this.g=this.I=this.i="";this.c=this.G=this.h=this.A=!1;this.f=0;this.m=null;this.l=vtt;this.o=this.N=!1}function cut(n,t,i,u,e){if(n.a)throw Error("[goog.net.XhrIo] Object is active with another request="+n.i+"; newUri="+t);i=i?i.toUpperCase():"GET";n.i=t;n.g="";n.I=i;n.A=!1;n.b=!0;n.a=n.w?n.w.a():cy.a();n.v=hut(n.w?n.w:cy);n.a.onreadystatechange=f(n.Ab,n);try{vt(n.J,si(n,"Opening Xhr"));n.G=!0;n.a.open(i,t+"",!0);n.G=!1}catch(t){return vt(n.J,si(n,"Error opening Xhr: "+t.message)),void hb(n,t)}t=u||"";var o=new ru(n.headers);e&&fut(e,function(n,t){o.set(t,n)});e=trt(o.S());u=r.FormData&&t instanceof r.FormData;!tr(ptt,i)||e||u||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");o.forEach(function(n,t){this.a.setRequestHeader(t,n)},n);n.l&&(n.a.responseType=n.l);"withCredentials"in n.a&&n.a.withCredentials!==n.N&&(n.a.withCredentials=n.N);try{ab(n);0<n.f&&(n.o=lut(n.a),vt(n.J,si(n,"Will abort after "+n.f+"ms if incomplete, xhr2 "+n.o)),n.o?(n.a.timeout=n.f,n.a.ontimeout=f(n.Ea,n)):n.m=vc(n.Ea,n.f,n));vt(n.J,si(n,"Sending request"));n.h=!0;n.a.send(t);n.h=!1}catch(t){vt(n.J,si(n,"Send error: "+t.message));hb(n,t)}}function lut(n){return dt&&op(9)&&"number"==typeof n.timeout&&void 0!==n.ontimeout}function aut(n){return"content-type"==n.toLowerCase()}function hb(n,t){n.b=!1;n.a&&(n.c=!0,n.a.abort(),n.c=!1);n.g=t;cb(n);po(n)}function cb(n){n.A||(n.A=!0,tt(n,"complete"),tt(n,"error"))}function lb(n){var i,u,f,e,t,o,s;if(n.b&&void 0!==sv)if(n.v[1]&&4==vf(n)&&2==wo(n))vt(n.J,si(n,"Local request error detected and ignored"));else if(n.h&&4==vf(n))vc(n.Ab,0,n);else if(tt(n,"readystatechange"),4==vf(n)){vt(n.J,si(n,"Request complete"));n.b=!1;try{i=wo(n);n:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:u=!0;break n;default:u=!1}if((f=u)||((e=0===i)&&(t=(n.i+"").match(hy)[1]||null,!t&&r.self&&r.self.location&&(o=r.self.location.protocol,t=o.substr(0,o.length-1)),e=!ytt.test(t?t.toLowerCase():"")),f=e),f)tt(n,"complete"),tt(n,"success");else{try{s=2<vf(n)?n.a.statusText:""}catch(i){vt(n.J,"Can not get status: "+i.message);s=""}n.g=s+" ["+wo(n)+"]";cb(n)}}finally{po(n)}}}function po(n,t){if(n.a){ab(n);var i=n.a,r=n.v[0]?ni:null;n.a=null;n.v=null;t||tt(n,"ready");try{i.onreadystatechange=r}catch(t){(n=n.J)&&n.log(stt,"Problem encountered resetting onreadystatechange: "+t.message,void 0)}}}function ab(n){n.a&&n.o&&(n.a.ontimeout=null);"number"==typeof n.m&&(r.clearTimeout(n.m),n.m=null)}function vf(n){return n.a?n.a.readyState:0}function wo(n){try{return 2<vf(n)?n.a.status:-1}catch(n){return-1}}function vut(n){try{return n.a?n.a.responseText:""}catch(t){return vt(n.J,"Can not get responseText: "+t.message),""}}function si(n,t){return t+" ["+n.I+" "+n.i+" "+wo(n)+"]"}function nl(n){var r={},s=r.document||document,e=iw(n),t=document.createElement("SCRIPT"),u={Cb:t,Ea:void 0},i=new wi(put,u),f=null,o=null!=r.timeout?r.timeout:5e3;return 0<o&&(f=window.setTimeout(function(){bo(t,!0);var n=new tl(vht,"Timeout reached for loading script "+e);co(i);hf(i,!1,n)},o),u.Ea=f),t.onload=t.onreadystatechange=function(){t.readyState&&"loaded"!=t.readyState&&"complete"!=t.readyState||(bo(t,r.Sc||!1,f),i.A(null))},t.onerror=function(){bo(t,!0,f);var n=new tl(aht,"Error while loading script "+e);co(i);hf(i,!1,n)},u=r.attributes||{},yi(u,{type:"text/javascript",charset:"UTF-8"}),uw(t,u),t.src=iw(n),yut(s).appendChild(t),i}function yut(n){var t;return(t=(n||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:n.documentElement}function put(){if(this&&this.Cb){var n=this.Cb;n&&"SCRIPT"==n.tagName&&bo(n,!0,this.Ea)}}function bo(n,t,i){null!=i&&r.clearTimeout(i);n.onload=ni;n.onerror=ni;n.onreadystatechange=ni;t&&window.setTimeout(function(){n&&n.parentNode&&n.parentNode.removeChild(n)},0)}function tl(n,t){var i="Jsloader error (code #"+n+")";t&&(i+=": "+t);st.call(this,i);this.code=n}function ko(){}function vb(){this.a=new XDomainRequest;this.readyState=0;this.onreadystatechange=null;this.responseText="";this.status=-1;this.statusText=this.responseXML=null;this.a.onload=f(this.Wb,this);this.a.onerror=f(this.xb,this);this.a.onprogress=f(this.Xb,this);this.a.ontimeout=f(this.Yb,this)}function il(n,t){n.readyState=t;n.onreadystatechange&&n.onreadystatechange()}function rl(){var n=it();return dt&&!!li&&11==li||/Edge\/\d+/.test(n)}function go(){return r.window&&r.window.location.href||""}function yb(n,t){t=t||r.window;var i="about:blank";n&&(i=io(rw(n)));t.location.href=i}function pb(n,t){var i,r=[];for(i in n)i in t?typeof n[i]!=typeof t[i]?r.push(i):vi(n[i])?irt(n[i],t[i])||r.push(i):"object"==typeof n[i]&&null!=n[i]&&null!=t[i]?0<pb(n[i],t[i]).length&&r.push(i):n[i]!==t[i]&&r.push(i):r.push(i);for(i in t)i in n||r.push(i);return r}function wut(){var n=it();return!((n=yf(n)!=wtt?null:(n=n.match(/\sChrome\/(\d+)/i))&&2==n.length?parseInt(n[1],10):null)&&30>n||dt&&li&&!(9<li))}function wb(n){return n=(n||it()).toLowerCase(),!!(n.match(/android/)||n.match(/webos/)||n.match(/iphone|ipad|ipod/)||n.match(/blackberry/)||n.match(/windows phone/)||n.match(/iemobile/))}function hr(n){n=n||r.window;try{n.close()}catch(n){}}function bb(n,t,i){var u=""+Math.floor(1e9*Math.random()),f,e,r;t=t||500;i=i||600;f=(window.screen.availHeight-i)/2;e=(window.screen.availWidth-t)/2;t={width:t,height:i,top:0<f?f:0,left:0<e?e:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1};i=it().toLowerCase();u&&(t.target=u,v(i,"crios/")&&(t.target="_blank"));yf(it())==ly&&(n=n||"http://localhost",t.scrollbars=!0);i=n||"";(u=t)||(u={});n=window;t=i instanceof ii?i:rw(void 0!==i.href?i.href:i+"");i=u.target||i.target;f=[];for(r in u)switch(r){case"width":case"height":case"top":case"left":f.push(r+"="+u[r]);break;case"target":case"noreferrer":break;default:f.push(r+"="+(u[r]?1:0))}if(r=f.join(","),(g("iPhone")&&!g("iPod")&&!g("iPad")||g("iPad")||g("iPod"))&&n.navigator&&n.navigator.standalone&&i&&"_self"!=i?(r=n.document.createElement("A"),t instanceof ii||t instanceof ii||(t=t.la?t.ja():t+"",gv.test(t)||(t="about:invalid#zClosurez"),t=uc(t)),r.href=io(t),r.setAttribute("target",i),u.noreferrer&&r.setAttribute("rel","noreferrer"),u=document.createEvent("MouseEvent"),u.initMouseEvent("click",!0,!0,n,1),r.dispatchEvent(u),r={}):u.noreferrer?(r=n.open("",i,r),n=io(t),r&&(yst&&v(n,";")&&(n="'"+n.replace(/'/g,"%27")+"'"),r.opener=null,sf("b/12014412, meta tag with sanitized URL"),n='<META HTTP-EQUIV="refresh" content="0; url='+ph(n)+'">',n=ro(n),r.document.write(art(n)),r.document.close())):r=n.open(io(t),i,r),r)try{r.focus()}catch(n){}return r}function but(n){return new c(function(t){function i(){er(2e3).then(function(){if(n&&!n.closed)return i();t()})}return i()})}function ul(){var n=null;return new c(function(t){"complete"==r.document.readyState?t():(n=function(){t()},cc(window,"load",n))}).s(function(t){throw yt(window,"load",n),t;})}function kut(){return fl(void 0)?ul().then(function(){return new c(function(n,t){var i=r.document,u=setTimeout(function(){t(Error("Cordova framework is not ready."))},1e3);i.addEventListener("deviceready",function(){clearTimeout(u);n()},!1)})}):b(Error("Cordova must run in an Android or iOS file scheme."))}function fl(n){return n=n||it(),!("file:"!==pf()||!n.toLowerCase().match(/iphone|ipad|ipod|android/))}function el(){var n=r.window;try{return!(!n||n==n.top)}catch(n){return!1}}function wt(){return o.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":o.INTERNAL.hasOwnProperty("node")?"Node":"Browser"}function kb(){var n=wt();return"ReactNative"===n||"Node"===n}function yf(n){var t=n.toLowerCase();return v(t,"opera/")||v(t,"opr/")||v(t,"opios/")?"Opera":v(t,"iemobile")?"IEMobile":v(t,"msie")||v(t,"trident/")?"IE":v(t,"edge/")?"Edge":v(t,"firefox/")?ly:v(t,"silk/")?"Silk":v(t,"blackberry")?"Blackberry":v(t,"webos")?"Webos":!v(t,"safari/")||v(t,"chrome/")||v(t,"crios/")||v(t,"android")?!v(t,"chrome/")&&!v(t,"crios/")||v(t,"edge/")?v(t,"android")?"Android":(n=n.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==n.length?n[1]:"Other":wtt:"Safari"}function su(n,t){t=t||[];var i,r=[],u={};for(i in btt)u[btt[i]]=!0;for(i=0;i<t.length;i++)void 0!==u[t[i]]&&(delete u[t[i]],r.push(t[i]));return r.sort(),t=r,t.length||(t=["FirebaseCore-web"]),r=wt(),u="",(u="Browser"===r?yf(it()):r)+"/JsCore/"+n+"/"+t.join(",")}function it(){return r.navigator&&r.navigator.userAgent||""}function w(n,t){n=n.split(".");t=t||r;for(var i=0;i<n.length&&"object"==typeof t&&null!=t;i++)t=t[n[i]];return i!=n.length&&(t=void 0),t}function ol(){try{var n=r.localStorage,t=hu();if(n)return n.setItem(t,"1"),n.removeItem(t),!rl()||!!r.indexedDB}catch(n){}return!1}function cr(){return(ns()||"chrome-extension:"===pf()||fl())&&!kb()&&ol()}function ns(){return"http:"===pf()||"https:"===pf()}function pf(){return r.location&&r.location.protocol||null}function wf(n){return n=n||it(),!wb(n)&&yf(n)!=ly}function bf(n){return void 0===n?null:fw(n)}function db(n){var t,i={};for(t in n)n.hasOwnProperty(t)&&null!==n[t]&&void 0!==n[t]&&(i[t]=n[t]);return i}function kf(n){if(null!==n)return JSON.parse(n)}function hu(n){return n||""+Math.floor(1e9*Math.random())}function gb(n){return n=n||it(),"Safari"!=yf(n)&&!n.toLowerCase().match(/iphone|ipad|ipod/)}function nk(){var n=r.___jsl,t,i;if(n&&n.H)for(t in n.H)if(n.H[t].r=n.H[t].r||[],n.H[t].L=n.H[t].L||[],n.H[t].r=n.H[t].L.concat(),n.CP)for(i=0;i<n.CP.length;i++)n.CP[i]=null}function sl(){var n=r.navigator;return!n||"boolean"!=typeof n.onLine||!ns()&&"chrome-extension:"!==pf()&&void 0===n.connection||n.onLine}function lr(n,t,i,r){if(n>t)throw Error("Short delay should be less than long delay!");this.c=n;this.b=t;n=i||it();r=r||wt();this.a=wb(n)||"ReactNative"===r}function hl(){var n=r.document;return!n||void 0===n.visibilityState||"visible"==n.visibilityState}function dut(){var n=r.document,t=null;return hl()||!n?e():new c(function(i){t=function(){hl()&&(n.removeEventListener("visibilitychange",t,!1),i())};n.addEventListener("visibilitychange",t,!1)}).s(function(i){throw n.removeEventListener("visibilitychange",t,!1),i;})}function tk(n){try{var t=new Date(parseInt(n,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(n))return t.toUTCString()}catch(n){}return null}function h(n,t,i){ay?Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:i}):n[t]=i}function ri(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&h(n,i,t[i])}function hi(n){var t={};return ri(t,n),t}function gut(n){var t,i={};for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}function nft(n,t){var i,r;if(!t||!t.length)return!0;if(!n)return!1;for(i=0;i<t.length;i++)if(r=n[t[i]],void 0===r||null===r||""===r)return!1;return!0}function cl(n){var t=n,i;if("object"==typeof n&&null!=n){t="length"in n?[]:{};for(i in n)h(t,i,cl(n[i]))}return t}function tft(n){var t={},i=n[pht],r=n[wht];if(n=n[bht],!i||!n)throw Error("Invalid provider user info!");t[dht]=r||null;t[kht]=i;h(this,nct,n);h(this,ght,cl(t))}function t(n,t){this.code=ke+n;this.message=t||tct[n]||""}function ik(n){var i=n&&n.code;return i?new t(i.substring(ke.length),n.message):null}function rk(n){var i=n[ict],r,u;if(void 0===i)throw new t("missing-continue-uri");if("string"!=typeof i||"string"==typeof i&&!i.length)throw new t("invalid-continue-uri");if(this.h=i,this.c=this.a=null,this.g=!1,r=n[ktt],r&&"object"==typeof r)if(i=r[tit],u=r[gtt],r=r[nit],"string"==typeof i&&i.length){if(this.a=i,void 0!==u&&"boolean"!=typeof u)throw new t("argument-error",gtt+" property must be a boolean when specified.");if(this.g=!!u,void 0!==r&&("string"!=typeof r||"string"==typeof r&&!r.length))throw new t("argument-error",nit+" property must be a non empty string when specified.");this.c=r||null}else{if(void 0!==i)throw new t("argument-error",tit+" property must be a non empty string when specified.");if(void 0!==u||void 0!==r)throw new t("missing-android-pkg-name");}else if(void 0!==r)throw new t("argument-error",ktt+" property must be a non null object when specified.");if(this.b=null,(i=n[dtt])&&"object"==typeof i){if("string"==typeof(i=i[iit])&&i.length)this.b=i;else if(void 0!==i)throw new t("argument-error",iit+" property must be a non empty string when specified.");}else if(void 0!==i)throw new t("argument-error",dtt+" property must be a non null object when specified.");if(void 0!==(n=n[yy])&&"boolean"!=typeof n)throw new t("argument-error",yy+" property must be a boolean when specified.");if((this.f=!!n)&&!this.b&&!this.a)throw new t("argument-error",yy+" property can't be true when no mobile application is provided.");}function uk(n){var t={},i;t.continueUrl=n.h;t.canHandleCodeInApp=n.f;(t.androidPackageName=n.a)&&(t.androidMinimumVersion=n.c,t.androidInstallApp=n.g);t.iOSBundleId=n.b;for(i in t)null===t[i]&&delete t[i];return t}function ift(n){this.b=n.sub;br();this.a=n.provider_id||n.firebase&&n.firebase.sign_in_provider||null}function fk(n){var r,i,t;if(n=n.split("."),3!=n.length)return null;for(n=n[1],r=(4-n.length%4)%4,i=0;i<r;i++)n+=".";try{if(t=JSON.parse(nut(n)),t.sub&&t.iss&&t.aud&&t.exp)return new ift(t)}catch(n){}return null}function ll(n){for(var t in py)if(py[t].Na==n)return py[t];return null}function al(n){var t={},i;t["facebook.com"]=ek;t["google.com"]=sk;t["github.com"]=ok;t["twitter.com"]=hk;i=n&&n[uit];try{if(i)return t[i]?new t[i](n):new ui(n);if(void 0!==n[wy])return new vl(n)}catch(n){}return null}function vl(n){var i=n[uit],t;if(!i&&n[wy]&&(t=fk(n[wy]),t&&t.a&&(i=t.a)),!i)throw Error("Invalid additional user info!");"anonymous"!=i&&"custom"!=i||(i=null);t=!1;void 0!==n.isNewUser?t=!!n.isNewUser:"identitytoolkit#SignupNewUserResponse"===n.kind&&(t=!0);h(this,"providerId",i);h(this,"isNewUser",t)}function ui(n){vl.call(this,n);n=kf(n.rawUserInfo||"{}");h(this,"profile",cl(n||{}))}function ek(n){if(ui.call(this,n),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!");}function ok(n){if(ui.call(this,n),"github.com"!=this.providerId)throw Error("Invalid provider ID!");h(this,"username",this.profile&&this.profile.login||null)}function sk(n){if(ui.call(this,n),"google.com"!=this.providerId)throw Error("Invalid provider ID!");}function hk(n){if(ui.call(this,n),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");h(this,"username",n.screenName||null)}function ts(n,i){return n.then(function(n){if(n[gt]){var r=fk(n[gt]);if(!r||i!=r.b)throw new t("user-mismatch");return n}throw new t("user-mismatch");}).s(function(n){throw n&&n.code&&n.code==ke+"user-not-found"?new t("user-mismatch"):n;})}function cu(n,i){if(i.idToken||i.accessToken)i.idToken&&h(this,"idToken",i.idToken),i.accessToken&&h(this,"accessToken",i.accessToken);else{if(!i.oauthToken||!i.oauthTokenSecret)throw new t("internal-error","failed to construct a credential");h(this,"accessToken",i.oauthToken);h(this,"secret",i.oauthTokenSecret)}h(this,"providerId",n)}function yl(n){var t={};return n.idToken&&(t.id_token=n.idToken),n.accessToken&&(t.access_token=n.accessToken),n.secret&&(t.oauth_token_secret=n.secret),t.providerId=n.providerId,{postBody:""+ub(t),requestUri:"http://localhost"}}function df(n,t){this.rc=t||[];ri(this,{providerId:n,isOAuthProvider:!0});this.rb={};this.Wa=(ll(n)||{}).Ma||null;this.Ua=null}function ht(n){df.call(this,n,eh);this.a=[]}function lu(){ht.call(this,"facebook.com")}function ck(n){if(!n)throw new t("argument-error","credential failed: expected 1 argument (the OAuth access token).");var i=n;return lt(n)&&(i=n.accessToken),(new lu).credential(null,i)}function au(){ht.call(this,"github.com")}function lk(n){if(!n)throw new t("argument-error","credential failed: expected 1 argument (the OAuth access token).");var i=n;return lt(n)&&(i=n.accessToken),(new au).credential(null,i)}function vu(){ht.call(this,"google.com");this.sa("profile")}function ak(n,t){var i=n;return lt(n)&&(i=n.idToken,t=n.accessToken),(new vu).credential(i,t)}function gf(){df.call(this,"twitter.com",rit)}function vk(n,i){var r=n;if(lt(r)||(r={oauthToken:n,oauthTokenSecret:i}),!r.oauthToken||!r.oauthTokenSecret)throw new t("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new cu("twitter.com",r)}function ne(n,t){this.a=n;this.f=t;h(this,"providerId","password")}function pl(){ri(this,{providerId:"password",isOAuthProvider:!1})}function yu(n){if(!(n.Pa&&n.Oa||n.Da&&n.Y))throw new t("internal-error");this.a=n;h(this,"providerId","phone")}function wl(n){return n.a.Da&&n.a.Y?{temporaryProof:n.a.Da,phoneNumber:n.a.Y}:{sessionInfo:n.a.Pa,code:n.a.Oa}}function ar(n){try{this.a=n||o.auth()}catch(n){throw new t("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().");}ri(this,{providerId:"phone",isOAuthProvider:!1})}function yk(n,i){if(!n)throw new t("missing-verification-id");if(!i)throw new t("missing-verification-code");return new yu({Pa:n,Oa:i})}function is(n){var i,t,r;if(n.temporaryProof&&n.phoneNumber)return new yu({Da:n.temporaryProof,Y:n.phoneNumber});if(i=n&&n.providerId,!i||"password"===i)return null;t=n&&n.oauthAccessToken;r=n&&n.oauthTokenSecret;n=n&&n.oauthIdToken;try{switch(i){case"google.com":return ak(n,t);case"facebook.com":return ck(t);case"github.com":return lk(t);case"twitter.com":return vk(t,r);default:return new ht(i).credential(n,t)}}catch(n){return null}}function bl(n){if(!n.isOAuthProvider)throw new t("invalid-oauth-provider");}function ci(n,i,r,u,f){if(this.b=n,this.c=i||null,this.f=r||null,this.g=u||null,this.a=f||null,!this.f&&!this.a)throw new t("invalid-auth-event");if(this.f&&this.a)throw new t("invalid-auth-event");if(this.f&&!this.g)throw new t("invalid-auth-event");}function pk(n){return n=n||{},n.type?new ci(n.type,n.eventId,n.urlResponse,n.sessionId,n.error&&ik(n.error)):null}function kl(){this.b=null;this.a=[]}function dl(n){var u="unauthorized-domain",r=void 0,i=bi(n);n=i.b;i=i.c;"chrome-extension"==i?r=yh("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",n):"http"==i||"https"==i?r=yh("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",n):u="operation-not-supported-in-this-environment";t.call(this,u,r)}function te(n,i,r){t.call(this,n,r);n=i||{};n.sb&&h(this,"email",n.sb);n.Y&&h(this,"phoneNumber",n.Y);n.credential&&h(this,"credential",n.credential)}function rs(n){var i,r;if(n.code){if(i=n.code||"",0==i.indexOf(ke)&&(i=i.substring(ke.length)),r={credential:is(n)},n.email)r.sb=n.email;else{if(!n.phoneNumber)return new t(i,n.message||void 0);r.Y=n.phoneNumber}return new te(i,r,n.message)}return null}function us(n){this.f=n}function fi(n,i,u){var f="Node"==wt();if(!(f=r.XMLHttpRequest||f&&o.INTERNAL.node&&o.INTERNAL.node.XMLHttpRequest))throw new t("internal-error","The XMLHttpRequest compatibility library was not found.");this.b=n;n=i||{};this.i=n.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token";this.l=n.secureTokenTimeout||rct;this.c=of(n.secureTokenHeaders||uct);this.g=n.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/";this.h=n.firebaseTimeout||fct;this.a=of(n.firebaseHeaders||ect);u&&(this.a["X-Client-Version"]=u,this.c["X-Client-Version"]=u);this.f=new ko;this.o=new us(f)}function wk(n,t){t?n.a["X-Firebase-Locale"]=t:delete n.a["X-Firebase-Locale"]}function bk(n,t){t?(n.a["X-Client-Version"]=t,n.c["X-Client-Version"]=t):(delete n.a["X-Client-Version"],delete n.c["X-Client-Version"])}function kk(n,t,i,r,u,e,o){sl()?(wut()?n=f(n.m,n):(by||(by=new c(function(n,t){rft(n,t)})),n=f(n.u,n)),n(t,i,r,u,e,o)):i&&i(null)}function rft(n,t){((window.gapi||{}).client||{}).request?n():(r[ky]=function(){((window.gapi||{}).client||{}).request?n():t(Error("CORS_UNSUPPORTED"))},rut(nl(rc(fit,{onload:ky})),function(){t(Error("CORS_UNSUPPORTED"))}))}function uft(n,i){return new c(function(r,u){"refresh_token"==i.grant_type&&i.refresh_token||"authorization_code"==i.grant_type&&i.code?kk(n,n.i+"?key="+encodeURIComponent(n.b),function(n){n?n.error?u(ia(n)):n.access_token&&n.refresh_token?r(n):u(new t("internal-error")):u(new t("network-request-failed"))},"POST",""+ub(i),n.c,n.l.get()):u(new t("internal-error"))})}function fft(n,i,r,u,f,e){var o=bi(n.g+i),h,s;if(k(o,"key",n.b),e&&k(o,"cb",""+br()),h="GET"==r,h)for(s in u)u.hasOwnProperty(s)&&k(o,s,u[s]);return new c(function(i,e){kk(n,""+o,function(n){n?n.error?e(ia(n,f||{})):i(n):e(new t("network-request-failed"))},r,h?void 0:fw(db(u)),n.a,n.h.get())})}function fs(n){if(!lht.test(n.email))throw new t("invalid-email");}function dk(n){"email"in n&&fs(n)}function eft(n,t){return a(n,cct,{identifier:t,continueUri:ns()?go():"http://localhost"}).then(function(n){return n.allProviders||[]})}function oft(n){return a(n,wct,{}).then(function(n){return n.authorizedDomains||[]})}function di(n){if(!n[gt])throw new t("internal-error");}function gl(n){if(n.phoneNumber||n.temporaryProof){if(!n.phoneNumber||!n.temporaryProof)throw new t("internal-error");}else{if(!n.sessionInfo)throw new t("missing-verification-id");if(!n.code)throw new t("missing-verification-code");}}function sft(n,t){return a(n,dct,t)}function hft(n,t,i){return a(n,act,{idToken:t,deleteProvider:i})}function na(n){if(!n.requestUri||!n.sessionId&&!n.postBody)throw new t("internal-error");}function gk(n){var i=null;if(n.needConfirmation?(n.code="account-exists-with-different-credential",i=rs(n)):"FEDERATED_USER_ID_ALREADY_LINKED"==n.errorMessage?(n.code="credential-already-in-use",i=rs(n)):"EMAIL_EXISTS"==n.errorMessage?(n.code="email-already-in-use",i=rs(n)):n.errorMessage&&(i=rd(n.errorMessage)),i)throw i;if(!n[gt])throw new t("internal-error");}function nd(n,t){return t.returnIdpCredential=!0,a(n,nlt,t)}function td(n,t){return t.returnIdpCredential=!0,a(n,ilt,t)}function id(n,t){return t.returnIdpCredential=!0,t.autoCreate=!1,a(n,tlt,t)}function ta(n){if(!n.oobCode)throw new t("invalid-action-code");}function a(n,i,r){if(!nft(r,i.ea))return b(new t("internal-error"));var u,f=i.zb||"POST";return e(r).then(i.D).then(function(){return i.T&&(r.returnSecureToken=!0),fft(n,i.endpoint,f,r,i.Pb,i.nb||!1)}).then(function(n){return u=n}).then(i.O).then(function(){if(!i.ga)return u;if(!(i.ga in u))throw new t("internal-error");return u[i.ga]})}function rd(n){return ia({error:{errors:[{message:n}],code:400,message:n}})}function ia(n,i){var r=(n.error&&n.error.errors&&n.error.errors[0]||{}).reason||"",u={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"},f;if(r=u[r]?new t(u[r]):null)return r;r=n.error&&n.error.message||"";u={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",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",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",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"};yi(u,i||{});i=(i=r.match(/^[^\s]+\s*:\s*(.*)$/))&&1<i.length?i[1]:void 0;for(f in u)if(0===r.indexOf(f))return new t(u[f],i);return!i&&n&&(i=bf(n)),new t("internal-error",i)}function ie(n){for(var t in dy)if(dy[t].id===n)return n=dy[t],{firebaseEndpoint:n.Va,secureTokenEndpoint:n.ab};return null}function cft(n){this.b=n;this.a=null;this.Ya=lft(this)}function lft(n){return yft().then(function(){return new c(function(t,i){w("gapi.iframes.getContext")().open({where:document.body,url:n.b,messageHandlersFilter:w("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function u(){clearTimeout(f);t()}n.a=r;n.a.restyle({setHideOnLeave:!1});var f=setTimeout(function(){i(Error("Network Error"))},hlt.get());r.ping(u).then(u,function(){i(Error("Network Error"))})})})})}function aft(n,t){return n.Ya.then(function(){return new c(function(i){n.a.send(t.type,t,i,w("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function vft(n,t){n.Ya.then(function(){n.a.register("authEvent",t,w("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}function yft(){return gy||(gy=new c(function(n,t){var u,i;sl()?(u=function(){nk();w("gapi.load")("gapi.iframes",{callback:n,ontimeout:function(){nk();t(Error("Network Error"))},timeout:slt.get()})},w("gapi.iframes.Iframe")?n():w("gapi.load")?u():(i="__iframefcb"+Math.floor(1e6*Math.random()),r[i]=function(){w("gapi.load")?u():t(Error("Network Error"))},i=rc(olt,{onload:i}),e(nl(i)).s(function(){t(Error("Network Error"))}))):t(Error("Network Error"))}).s(function(n){throw gy=null,n;}))}function ud(n,t,i){this.i=n;this.g=t;this.h=i;this.f=null;this.a=rb(this.i,"/__/auth/iframe");k(this.a,"apiKey",this.g);k(this.a,"appName",this.h);this.b=null;this.c=[]}function fd(n,t,i,r,u){this.m=n;this.u=t;this.c=i;this.l=r;this.i=this.g=this.h=null;this.a=u;this.f=null}function ra(n){try{return o.app(n).auth().Ka()}catch(n){return[]}}function ed(n,t,i,r,u){this.u=n;this.f=t;this.b=i;this.c=r||null;this.h=u||null;this.m=this.o=this.v=null;this.g=[];this.l=this.a=null}function od(n){var t=go();return oft(n).then(function(n){var u,o,f;n:{for(u=bi(t),o=u.c,u=u.b,f=0;f<n.length;f++){var i=n[f],r=u,e=o;if(0==i.indexOf("chrome-extension://")?r=bi(i).b==r&&"chrome-extension"==e:"http"!=e&&"https"!=e?r=!1:yht.test(i)?r=r==i:(i=i.split(".").join("\\."),r=RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)),r){n=!0;break n}}n=!1}if(!n)throw new dl(go());})}function sd(n){return n.l?n.l:(n.l=ul().then(function(){if(!n.o){var i=n.c,r=n.h,u=ra(n.b),t=new ud(n.u,n.f,n.b);t.f=i;t.b=r;t.c=ir(u||[]);n.o=""+t}n.i=new cft(n.o);pft(n)}),n.l)}function hd(n){return n.m||(n.v=n.c?su(n.c,ra(n.b)):null,n.m=new fi(n.f,ie(n.h),n.v)),n.m}function re(n,t,i,r,u,f,e,o,s,h){return n=new fd(n,t,i,r,u),n.h=f,n.g=e,n.i=o,n.b=of(s||null),n.f=h,""+n}function pft(n){if(!n.i)throw Error("IfcHandler must be initialized!");vft(n.i,function(t){var i={},r;if(t&&t.authEvent){for(r=!1,t=pk(t.authEvent),i=0;i<n.g.length;i++)r=n.g[i](t)||r;return i={},i.status=r?"ACK":"ERROR",e(i)}return i.status="ERROR",e(i)})}function wft(n){var t={type:"webStorageSupport"};return sd(n).then(function(){return aft(n.i,t)}).then(function(n){if(n&&n.length&&void 0!==n[0].webStorageSupport)return n[0].webStorageSupport;throw Error();})}function cd(n){if(this.a=n||o.INTERNAL.reactNative&&o.INTERNAL.reactNative.AsyncStorage,!this.a)throw new t("internal-error","The React Native compatibility library was not found.");}function es(){this.a={}}function ld(n,i,u,f,e,o){try{var s=!!r.indexedDB}catch(n){s=!1}if(!s)throw new t("web-storage-unsupported");this.u=n;this.h=i;this.g=u;this.l=f;this.m=e;this.f={};this.c=[];this.a=0;this.o=o||r.indexedDB}function bft(n){return new c(function(t,i){var r=n.o.open(n.u,n.m);r.onerror=function(n){i(Error(n.target.errorCode))};r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore(n.h,{keyPath:n.g})}catch(n){i(n)}};r.onsuccess=function(n){t(n.target.result)}})}function os(n){return n.i||(n.i=bft(n)),n.i}function ue(n,t){return t.objectStore(n.h)}function fe(n,t,i){return t.transaction([n.h],i?"readwrite":"readonly")}function pu(n){return new c(function(t,i){n.onsuccess=function(n){n&&n.target?t(n.target.result):t()};n.onerror=function(n){i(Error(n.target.errorCode))}})}function kft(n){function t(){return n.b=er(800).then(f(n.zc,n)).then(function(t){0<t.length&&ct(n.c,function(n){n(t)})}).then(t).s(function(n){"STOP_EVENT"!=n.message&&t()}),n.b}n.b&&n.b.cancel("STOP_EVENT");t()}function ua(){if(!dft()){if("Node"==wt())throw new t("internal-error","The LocalStorage compatibility library was not found.");throw new t("web-storage-unsupported");}this.a=ad()||o.INTERNAL.node.localStorage}function ad(){try{var n=r.localStorage,t=hu();return n&&(n.setItem(t,"1"),n.removeItem(t)),n}catch(n){return null}}function dft(){var n="Node"==wt();if(!(n=ad()||n&&o.INTERNAL.node&&o.INTERNAL.node.localStorage))return!1;try{return n.setItem("__sak","1"),n.removeItem("__sak"),!0}catch(n){return!1}}function vd(){}function fa(){if(!gft()){if("Node"==wt())throw new t("internal-error","The SessionStorage compatibility library was not found.");throw new t("web-storage-unsupported");}this.a=yd()||o.INTERNAL.node.sessionStorage}function yd(){try{var n=r.sessionStorage,t=hu();return n&&(n.setItem(t,"1"),n.removeItem(t)),n}catch(n){return null}}function gft(){var n="Node"==wt();if(!(n=yd()||n&&o.INTERNAL.node&&o.INTERNAL.node.sessionStorage))return!1;try{return n.setItem("__sak","1"),n.removeItem("__sak"),!0}catch(n){return!1}}function net(){var n={};n.Browser=clt;n.Node=llt;n.ReactNative=alt;this.a=n[wt()]}function tet(n){var u=new t("invalid-persistence-type"),r=new t("unsupported-persistence-type"),i;n:{for(i in rf)if(rf[i]==n){i=!0;break n}i=!1}if(!i||"string"!=typeof n)throw u;switch(wt()){case"ReactNative":if("session"===n)throw r;break;case"Node":if("none"!==n)throw r;break;default:if(!ol()&&"none"!==n)throw r;}}function ee(n,t,i,r,u){this.i=n;this.g=t;this.A=i;this.u=r;this.v=u;this.a={};tp||(tp=new net);n=tp;try{if(rl()){np||(np=new ld("firebaseLocalStorageDb","firebaseLocalStorage","fbase_key","value",1));var e=np}else e=new n.a.C;this.l=e}catch(n){this.l=new es;this.u=!0}try{this.o=new n.a.jb}catch(n){this.o=new es}this.w=new es;this.h=f(this.m,this);this.b={}}function oe(){return ip||(ip=new ee("firebase",":",!(gb(it())||!el()),wf(),ol())),ip}function wu(n,t){switch(t){case"session":return n.o;case"none":return n.w;default:return n.l}}function se(n,t,i){return n.i+n.g+t.name+(i?n.g+i:"")}function bu(n,t,i){return i=se(n,t,i),"local"==t.C&&(n.b[i]=null),wu(n,t.C).X(i)}function pd(n,t,i,u){t=se(n,t,i);n.v&&(n.b[t]=r.localStorage.getItem(t));ef(n.a)&&(wu(n,"local").ia(n.h),n.u||rl()||!n.v||ret(n));n.a[t]||(n.a[t]=[]);n.a[t].push(u)}function iet(n,t,i){t=se(n,ei("local"),t);n.a[t]&&(ti(n.a[t],function(n){return n==i}),0==n.a[t].length&&delete n.a[t]);ef(n.a)&&uet(n)}function ret(n){ea(n);n.f=setInterval(function(){var i,t,u;for(i in n.a)t=r.localStorage.getItem(i),u=n.b[i],t!=u&&(n.b[i]=t,t=new fr({type:"storage",key:i,target:window,oldValue:u,newValue:t,a:!0}),n.m(t))},1e3)}function ea(n){n.f&&(clearInterval(n.f),n.f=null)}function uet(n){wu(n,"local").da(n.h);ea(n)}function fet(n){this.a=n;this.b=oe()}function eet(n){return n.b.get(sh,n.a).then(function(n){return pk(n)})}function oet(){this.a=oe()}function wd(n,t,i,r,u,f,e){this.u=n;this.i=t;this.l=i;this.m=r||null;this.o=e||null;this.h=t+":"+i;this.A=new oet;this.g=new fet(this.h);this.f=null;this.b=[];this.v=u||500;this.w=f||2e3;this.a=this.c=null}function ss(n){return new t("invalid-cordova-configuration",n)}function set(){for(var n=20,t=[];0<n;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),n--;return t.join("")}function het(n){var t=new dw,r,i,u;for(dc(t,n),n=[],r=8*t.g,56>t.c?dc(t,oy,56-t.c):dc(t,oy,t.b-(t.c-56)),i=63;56<=i;i--)t.f[i]=255&r,r/=256;for(kc(t),i=r=0;i<t.i;i++)for(u=24;0<=u;u-=8)n[r++]=t.a[i]>>u&255;return grt(n)}function cet(n,i,u,f){var o=set(),l=new ci(i,f,null,o,new t("no-auth-event")),s=w("BuildInfo.packageName",r),h,e,c;if("string"!=typeof s)throw new t("invalid-cordova-configuration");if(h=w("BuildInfo.displayName",r),e={},it().toLowerCase().match(/iphone|ipad|ipod/))e.ibi=s;else{if(!it().toLowerCase().match(/android/))return b(new t("operation-not-supported-in-this-environment"));e.apn=s}return h&&(e.appDisplayName=h),o=het(o),e.sessionId=o,c=re(n.u,n.i,n.l,i,u,null,f,n.m,e,n.o),n.ba().then(function(){var t=n.h;return n.A.a.set(sh,l.B(),t)}).then(function(){var u=w("cordova.plugins.browsertab.isAvailable",r),i;if("function"!=typeof u)throw new t("invalid-cordova-configuration");i=null;u(function(u){if(u){if("function"!=typeof(i=w("cordova.plugins.browsertab.openUrl",r)))throw new t("invalid-cordova-configuration");i(c)}else{if("function"!=typeof(i=w("cordova.InAppBrowser.open",r)))throw new t("invalid-cordova-configuration");u=it();u=!(!u.match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!u.match(/(iPad|iPhone|iPod).*OS 8_\d/i));n.a=i(c,u?"_blank":"_system","location=yes")}})})}function bd(n,t){for(var i=0;i<n.b.length;i++)try{n.b[i](t)}catch(n){}}function kd(n){return n.f||(n.f=n.ba().then(function(){return new c(function(t){function i(r){return t(r),n.Ja(i),!1}n.ua(i);aet(n)})})),n.f}function oa(n){var t=null;return eet(n.g).then(function(i){return t=i,i=n.g,bu(i.b,sh,i.a)}).then(function(){return t})}function aet(n){function u(t){f=!0;e&&e.cancel();oa(n).then(function(r){var u=i;if(r&&t&&t.url){u=null;var f=t.url,e=bi(f),o=fu(e,"link"),s=fu(bi(o),"link");e=fu(e,"deep_link_id");f=fu(bi(e),"link")||e||s||o||f;-1!=f.indexOf("/__/auth/callback")&&(u=bi(f),u=kf(fu(u,"firebaseError")||null),u=(u="object"==typeof u?ik(u):null)?new ci(r.b,r.c,null,null,u):new ci(r.b,r.c,f,r.g));u=u||i}bd(n,u)})}var i=new ci("unknown",null,null,null,new t("no-auth-event")),f=!1,e=er(n.v).then(function(){return oa(n).then(function(){f||bd(n,i)})}),o=r.handleOpenURL;r.handleOpenURL=function(n){if(0==n.toLowerCase().indexOf(w("BuildInfo.packageName",r).toLowerCase()+"://")&&u({url:n}),"function"==typeof o)try{o(n)}catch(n){console.error(n)}};oh||(oh=new kl);oh.subscribe(u)}function vet(n){this.a=n;this.b=oe()}function yet(n){return n.b.set(hh,"pending",n.a)}function sa(n){return bu(n.b,hh,n.a)}function pet(n){return n.b.get(hh,n.a).then(function(n){return"pending"==n})}function gi(n,t,i){this.v=n;this.l=t;this.u=i;this.h=[];this.f=!1;this.i=f(this.m,this);this.c=new hs;this.o=new fg;this.g=new vet(this.l+":"+this.u);this.b={};this.b.unknown=this.c;this.b.signInViaRedirect=this.c;this.b.linkViaRedirect=this.c;this.b.reauthViaRedirect=this.c;this.b.signInViaPopup=this.o;this.b.linkViaPopup=this.o;this.b.reauthViaPopup=this.o;this.a=dd(this.v,this.l,this.u,de)}function dd(n,t,i,r){var u=o.SDK_VERSION||null;return fl()?new wd(n,t,i,u,void 0,void 0,r):new ed(n,t,i,u,r)}function gd(n){n.f||(n.f=!0,n.a.ua(n.i));var t=n.a;return n.a.ba().s(function(i){throw n.a==t&&n.reset(),i;})}function ng(n){n.a.Db()&&gd(n).s(function(i){var r=new ci("unknown",null,null,null,new t("operation-not-supported-in-this-environment"));ha(i)&&n.m(r)});n.a.yb()||rg(n.c)}function tg(n,t,i,r,u,f){return n.a.vb(t,i,r,function(){n.f||(n.f=!0,n.a.ua(n.i))},function(){n.reset()},u,f)}function ha(n){return!(!n||"auth/cordova-not-ready"!=n.code)}function ig(n,t,i){var r=t+":"+i;return ch[r]||(ch[r]=new gi(n,t,i)),ch[r]}function hs(){this.b=null;this.f=[];this.c=[];this.a=null;this.g=!1}function rg(n){n.g||(n.g=!0,ku(n,!1,null,null))}function wet(n,t,i){i=i.va(t.b,t.c);var u=t.f,f=t.g,r=!!t.b.match(/Redirect$/);return i(u,f).then(function(t){ku(n,r,t,null)}).s(function(t){ku(n,r,null,t)})}function bet(n,t){if(n.b=function(){return b(t)},n.c.length)for(var i=0;i<n.c.length;i++)n.c[i](t)}function ug(n,t){if(n.b=function(){return e(t)},n.f.length)for(var i=0;i<n.f.length;i++)n.f[i](t)}function ku(n,t,i,r){t?r?bet(n,r):ug(n,i):ug(n,{user:null});n.f=[];n.c=[]}function ket(n){var i=new t("timeout");n.a&&n.a.cancel();n.a=er(lit.get()).then(function(){n.b||ku(n,!0,null,i)})}function fg(){}function det(n,t){var i=n.c,r=n.b;return t.va(r,i)(n.f,n.g).then(function(n){t.fa(r,n,null,i)}).s(function(n){t.fa(r,null,n,i)})}function ca(n,t){this.a=t;h(this,"verificationId",n)}function la(n,t,i,r){return new ar(n).Qa(t,i).then(function(n){return new ca(n,r)})}function eg(n,t,i,r,u,f){if(this.h=n,this.i=t,this.g=i,this.c=r,this.f=u,this.l=!!f,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!");}function get(n,t){return t?(n.a=n.c,n.g()):(t=n.a,n.a*=2,n.a>n.f&&(n.a=n.f),t)}function aa(n,t){va(n);n.b=er(get(n,t)).then(function(){return n.l?e():dut()}).then(function(){return n.h()}).then(function(){aa(n,!0)}).s(function(t){n.i(t)&&aa(n,!1)})}function va(n){n.b&&(n.b.cancel(),n.b=null)}function ya(n){this.f=n;this.b=this.a=null;this.c=0}function og(n,t){var i=t[gt],r=t.refreshToken;t=sg(t.expiresIn);n.b=i;n.c=t;n.a=r}function sg(n){return br()+1e3*parseInt(n,10)}function not(n,t){return uft(n.f,t).then(function(t){return n.b=t.access_token,n.c=sg(t.expires_in),n.a=t.refresh_token,{accessToken:n.b,expirationTime:n.c,refreshToken:n.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(n.a=null),t;})}function cs(n,t){this.a=n||null;this.b=t||null;ri(this,{lastSignInTime:tk(t||null),creationTime:tk(n||null)})}function tot(n){return new cs(n.a,n.b)}function iot(n,t,i,r,u,f){ri(this,{uid:n,displayName:r||null,photoURL:u||null,email:i||null,phoneNumber:f||null,providerId:t})}function he(n,t){at.call(this,n);for(var i in t)this[i]=t[i]}function bt(n,t,i){this.A=[];this.G=n.apiKey;this.o=n.appName;this.w=n.authDomain||null;n=o.SDK_VERSION?su(o.SDK_VERSION):null;this.c=new fi(this.G,ie(de),n);this.h=new ya(this.c);ka(this,t[gt]);og(this.h,t);h(this,"refreshToken",this.h.a);lg(this,i||{});pt.call(this);this.I=!1;this.w&&cr()&&(this.a=ig(this.w,this.G,this.o));this.N=[];this.i=null;this.l=rot(this);this.U=f(this.Ga,this);var r=this;this.ha=null;this.ra=function(n){r.na(n.h)};this.W=null;this.R=[];this.qa=function(n){ls(r,n.f)};this.V=null}function pa(n,t){n.W&&yt(n.W,"languageCodeChanged",n.ra);(n.W=t)&&pi(t,"languageCodeChanged",n.ra)}function ls(n,t){n.R=t;bk(n.c,o.SDK_VERSION?su(o.SDK_VERSION,n.R):null)}function wa(n,t){n.V&&yt(n.V,"frameworkChanged",n.qa);(n.V=t)&&pi(t,"frameworkChanged",n.qa)}function hg(n){try{return o.app(n.o).auth()}catch(i){throw new t("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+n.o+"'!");}}function rot(n){return new eg(function(){return n.F(!0)},function(n){return!(!n||"auth/network-request-failed"!=n.code)},function(){var t=n.h.c-br()-3e5;return 0<t?t:0},3e4,96e4,!1)}function cg(n){n.m||n.l.b||(n.l.start(),yt(n,"tokenChanged",n.U),pi(n,"tokenChanged",n.U))}function ba(n){yt(n,"tokenChanged",n.U);va(n.l)}function ka(n,t){n.pa=t;h(n,"_lat",t)}function uot(n,t){ti(n.N,function(n){return n==t})}function vr(n){for(var i=[],t=0;t<n.N.length;t++)i.push(n.N[t](n));return srt(i).then(function(){return n})}function as(n){n.a&&!n.I&&(n.I=!0,n.a.subscribe(n))}function lg(n,t){ri(n,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,metadata:new cs(t.createdAt,t.lastLoginAt),providerData:[]})}function ag(){}function da(n){return e().then(function(){if(n.m)throw new t("app-deleted");})}function ga(n){return hv(n.providerData,function(n){return n.providerId})}function nv(n,t){t&&(vg(n,t.providerId),n.providerData.push(t))}function vg(n,t){ti(n.providerData,function(n){return n.providerId==t})}function nr(n,t,i){("uid"!=t||i)&&n.hasOwnProperty(t)&&h(n,t,i)}function yg(n,t){n!=t&&(ri(n,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,providerData:[]}),t.metadata?h(n,"metadata",tot(t.metadata)):h(n,"metadata",new cs),ct(t.providerData,function(t){nv(n,t)}),n.h=t.h,h(n,"refreshToken",n.h.a))}function tv(n){return n.F().then(function(t){var i=n.isAnonymous;return fot(n,t).then(function(){return i||nr(n,"isAnonymous",!1),t})})}function yr(n,t){t[gt]&&n.pa!=t[gt]&&(og(n.h,t),tt(n,new he("tokenChanged")),ka(n,t[gt]),nr(n,"refreshToken",n.h.a))}function fot(n,t){return a(n.c,vct,{idToken:t}).then(f(n.kc,n))}function eot(n){return(n=n.providerUserInfo)&&n.length?hv(n,function(n){return new iot(n.rawId,n.providerId,n.email,n.displayName,n.photoUrl,n.phoneNumber)}):[]}function vs(n,i){return tv(n).then(function(){if(tr(ga(n),i))return vr(n).then(function(){throw new t("provider-already-linked");})})}function ys(n,t,i){var r=is(t);return t=al(t),hi({user:n,credential:r,additionalUserInfo:t,operationType:i})}function pg(n,t){return yr(n,t),n.reload().then(function(){return n})}function wg(n,i,r,u,f){var e;if(!cr())return b(new t("operation-not-supported-in-this-environment"));if(n.i&&!f)return b(n.i);var s=ll(r.providerId),h=hu(n.uid+":::"),l=null;return(!wf()||el())&&n.w&&r.isOAuthProvider&&(l=re(n.w,n.G,n.o,i,r,null,h,o.SDK_VERSION||null)),e=bb(l,s&&s.za,s&&s.ya),u=u().then(function(){if(kg(n),!f)return n.F().then(function(){})}).then(function(){return tg(n.a,e,i,r,h,!!l)}).then(function(){return new c(function(r,u){n.fa(i,null,new t("cancelled-popup-request"),n.g||null);n.f=r;n.v=u;n.g=h;n.b=n.a.Ca(n,i,e,h)})}).then(function(n){return e&&hr(e),n?hi(n):null}).s(function(n){throw e&&hr(e),n;}),nt(n,u,f)}function bg(n,i,r,u,f){if(!cr())return b(new t("operation-not-supported-in-this-environment"));if(n.i&&!f)return b(n.i);var e=null,o=hu(n.uid+":::");return u=u().then(function(){if(kg(n),!f)return n.F().then(function(){})}).then(function(){return n.Z=o,vr(n)}).then(function(t){return n.ca&&(t=n.ca,t=t.b.set(lh,n.B(),t.a)),t}).then(function(){return n.a.Aa(i,r,o)}).s(function(t){if(e=t,n.ca)return gg(n.ca);throw e;}).then(function(){if(e)throw e;}),nt(n,u,f)}function kg(n){if(!n.a||!n.I){if(n.a&&!n.I)throw new t("internal-error");throw new t("auth-domain-config-required");}}function nt(n,t,i){var r=oot(n,t,i);return n.A.push(r),gr(r,function(){no(n.A,r)}),r}function oot(n,t,i){return n.i&&!i?(t.cancel(),b(n.i)):t.s(function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(n.i||tt(n,new he("userInvalidated")),n.i=t),t;})}function dg(n){var r,t,i;return n.apiKey?(r={apiKey:n.apiKey,authDomain:n.authDomain,appName:n.appName},t={},!(n.stsTokenManager&&n.stsTokenManager.accessToken&&n.stsTokenManager.expirationTime))?null:(t[gt]=n.stsTokenManager.accessToken,t.refreshToken=n.stsTokenManager.refreshToken||null,t.expiresIn=(n.stsTokenManager.expirationTime-br())/1e3,i=new bt(r,t,n),n.providerData&&ct(n.providerData,function(n){n&&nv(i,hi(n))}),n.redirectEventId&&(i.Z=n.redirectEventId),i):null}function sot(n,t,i,r){var u=new bt(n,t);return i&&(u.ca=i),r&&ls(u,r),u.reload().then(function(){return u})}function hot(n){this.a=n;this.b=oe()}function gg(n){return bu(n.b,lh,n.a)}function cot(n,t){return n.b.get(lh,n.a).then(function(n){return n&&t&&(n.authDomain=t),dg(n||{})})}function iv(n,t){this.a=n;this.b=t||oe();this.c=null;this.f=lot(this);pd(this.b,ei("local"),this.a,f(this.g,this))}function rv(n,t){var i,r=[];for(i in rf)rf[i]!==t&&r.push(bu(n.b,ei(rf[i]),n.a));return r.push(bu(n.b,ah,n.a)),ort(r)}function lot(n){var t=ei("local"),i=ei("session"),r=ei("none");return n.b.get(i,n.a).then(function(u){return u?i:n.b.get(r,n.a).then(function(i){return i?r:n.b.get(t,n.a).then(function(i){return i?t:n.b.get(ah,n.a).then(function(n){return n?ei(n):t})})})}).then(function(t){return n.c=t,rv(n,t.C)}).s(function(){n.c||(n.c=t)})}function ei(n){return{name:"authUser",C:n}}function aot(n){return du(n,function(){return n.b.set(ah,n.c.C,n.a)})}function nn(n,t){return du(n,function(){return n.b.set(n.c,t.B(),n.a)})}function tn(n){return du(n,function(){return bu(n.b,n.c,n.a)})}function rn(n,t){return du(n,function(){return n.b.get(n.c,n.a).then(function(n){return n&&t&&(n.authDomain=t),dg(n||{})})})}function du(n,t){return n.f=n.f.then(t,t),n.f}function kt(n){if(this.l=!1,h(this,"app",n),!y(this).options||!y(this).options.apiKey)throw new t("invalid-api-key");n=o.SDK_VERSION?su(o.SDK_VERSION):null;this.c=new fi(y(this).options&&y(this).options.apiKey,ie(de),n);this.N=[];this.m=[];this.I=[];this.Kb=o.INTERNAL.createSubscribe(f(this.ac,this));this.R=void 0;this.Lb=o.INTERNAL.createSubscribe(f(this.bc,this));ce(this,null);this.h=new iv(y(this).options.apiKey+":"+y(this).name);this.G=new hot(y(this).options.apiKey+":"+y(this).name);this.U=d(this,wot(this));this.i=d(this,bot(this));this.W=!1;this.ha=f(this.yc,this);this.Ga=f(this.ka,this);this.pa=f(this.Tb,this);this.qa=f(this.Zb,this);this.ra=f(this.$b,this);yot(this);this.INTERNAL={};this.INTERNAL.delete=f(this.delete,this);this.INTERNAL.logFramework=f(this.gc,this);this.o=0;pt.call(this);vot(this);this.A=[]}function un(n){at.call(this,"languageCodeChanged");this.h=n}function fn(n){at.call(this,"frameworkChanged");this.f=n}function vot(n){Object.defineProperty(n,"lc",{get:function(){return this.$()},set:function(n){this.na(n)},enumerable:!1});n.V=null}function uv(n){return n.Jb||b(new t("auth-domain-config-required"))}function yot(n){var t=y(n).options.authDomain,i=y(n).options.apiKey;t&&cr()&&(n.Jb=n.U.then(function(){if(!n.l){if(n.a=ig(t,i,y(n).name),n.a.subscribe(n),s(n)&&as(s(n)),n.w){as(n.w);var r=n.w;r.na(n.$());pa(r,n);r=n.w;ls(r,n.A);wa(r,n);n.w=null}return n.a}}))}function en(n,t){var i={};return i.apiKey=y(n).options.apiKey,i.authDomain=y(n).options.authDomain,i.appName=y(n).name,n.U.then(function(){return sot(i,t,n.G,n.Ka())}).then(function(t){return s(n)&&t.uid==s(n).uid?(yg(s(n),t),n.ka(t)):(ce(n,t),as(t),n.ka(t))}).then(function(){ws(n)})}function ce(n,t){s(n)&&(uot(s(n),n.Ga),yt(s(n),"tokenChanged",n.pa),yt(s(n),"userDeleted",n.qa),yt(s(n),"userInvalidated",n.ra),ba(s(n)));t&&(t.N.push(n.Ga),pi(t,"tokenChanged",n.pa),pi(t,"userDeleted",n.qa),pi(t,"userInvalidated",n.ra),0<n.o&&cg(t));h(n,"currentUser",t);t&&(t.na(n.$()),pa(t,n),ls(t,n.A),wa(t,n))}function pot(n){var t=cot(n.G,y(n).options.authDomain).then(function(t){return(n.w=t)&&(t.ca=n.G),gg(n.G)});return d(n,t)}function wot(n){var t=y(n).options.authDomain,i=pot(n).then(function(){return rn(n.h,t)}).then(function(t){return t?(t.ca=n.G,n.w&&(n.w.Z||null)==(t.Z||null)?t:t.reload().then(function(){return nn(n.h,t).then(function(){return t})}).s(function(i){return"auth/network-request-failed"==i.code?t:tn(n.h)})):null}).then(function(t){ce(n,t||null)});return d(n,i)}function bot(n){return n.U.then(function(){return n.aa()}).s(function(){}).then(function(){if(!n.l)return n.ha()}).s(function(){}).then(function(){if(!n.l){n.W=!0;var t=n.h;pd(t.b,ei("local"),t.a,n.ha)}})}function le(n,t){var i=null,r=null;return d(n,t.then(function(t){return i=is(t),r=al(t),en(n,t)}).then(function(){return hi({user:s(n),credential:i,additionalUserInfo:r,operationType:"signIn"})}))}function y(n){return n.app}function s(n){return n.currentUser}function ps(n){return s(n)&&s(n)._lat||null}function ws(n){if(n.W){for(var t=0;t<n.m.length;t++)n.m[t]&&n.m[t](ps(n));if(n.R!==n.getUid()&&n.I.length)for(n.R=n.getUid(),t=0;t<n.I.length;t++)n.I[t]&&n.I[t](ps(n))}}function kot(n,t){n.I.push(t);d(n,n.i.then(function(){!n.l&&tr(n.I,t)&&n.R!==n.getUid()&&(n.R=n.getUid(),t(ps(n)))}))}function d(n,t){return n.N.push(t),gr(t,function(){no(n.N,t)}),t}function on(n,i,r,u){n:{r=Array.prototype.slice.call(r);for(var f=0,e=!1,o=0;o<i.length;o++)if(i[o].optional)e=!0;else{if(e)throw new t("internal-error","Argument validator encountered a required argument after an optional argument.");f++}if(e=i.length,r.length<f||e<r.length)u="Expected "+(f==e?1==f?"1 argument":f+" arguments":f+"-"+e+" arguments")+" but got "+r.length+".";else{for(f=0;f<r.length;f++)if(e=i[f].optional&&void 0===r[f],!i[f].M(r[f])&&!e){if(i=i[f],0>f||f>=ait.length)throw new t("internal-error","Argument validator received an unsupported number of arguments.");r=ait[f];u=(u?"":r+" argument ")+(i.name?'"'+i.name+'" ':"")+"must be "+i.K+".";break n}u=null}}if(u)throw new t("argument-error",n+" failed: "+u);}function u(n,t){return{name:n||"",K:"a valid string",optional:!!t,M:p}}function sn(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:bit}}function ut(n,t){return{name:n||"",K:"a valid object",optional:!!t,M:lt}}function gu(n,t){return{name:n||"",K:"a function",optional:!!t,M:rt}}function pr(n,t){return{name:n||"",K:"null",optional:!!t,M:kit}}function dot(){return{name:"",K:"an HTML element",optional:!1,M:function(n){return!!(n&&n instanceof Element)}}}function got(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(n){return!!(n&&n instanceof kt)}}}function nst(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(n){return!!(n&&n instanceof o.app.App)}}}function wr(n){return{name:n?n+"Credential":"credential",K:n?"a valid "+n+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var i=!n||t.providerId===n;return!(!t.wa||!i)}}}function nf(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(n){return!!(n&&n.providerId&&n.hasOwnProperty&&n.hasOwnProperty("isOAuthProvider"))}}}function bs(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(n){return!!(n&&p(n.type)&&rt(n.verify))}}}function ft(n,t,i,r){return{name:i||"",K:n.K+" or "+t.K,optional:!!r,M:function(i){return n.M(i)||t.M(i)}}}function fv(n,i,u,f,e,o){var l,s,c;if(h(this,"type","recaptcha"),this.b=this.c=null,this.m=!1,this.l=i,this.a=u||{theme:"light",type:"image"},this.g=[],this.a[pit])throw new t("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[vlt],!uo(i)||!this.h&&uo(i).hasChildNodes())throw new t("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new fi(n,o||null,e||null);this.o=f||function(){return null};l=this;this.i=[];s=this.a[vit];this.a[vit]=function(n){if(hn(l,n),"function"==typeof s)s(n);else if("string"==typeof s){var t=w(s,r);"function"==typeof t&&t(n)}};c=this.a[yit];this.a[yit]=function(){if(hn(l,null),"function"==typeof c)c();else if("string"==typeof c){var n=w(c,r);"function"==typeof n&&n()}}}function hn(n,t){for(var i=0;i<n.i.length;i++)try{n.i[i](t)}catch(n){}}function tst(n,t){ti(n.i,function(n){return n==t})}function ev(n,t){return n.g.push(t),gr(t,function(){no(n.g,t)}),t}function ks(n){if(n.m)throw new t("internal-error","RecaptchaVerifier instance has been destroyed.");}function ist(){this.b=r.grecaptcha?1/0:0;this.c=null;this.a="__rcb"+Math.floor(1e6*Math.random())}function rst(n,i){return new c(function(u,f){if(sl())if(r.grecaptcha&&(i===n.c||n.b))u();else{r[n.a]=function(){if(r.grecaptcha){n.c=i;var e=r.grecaptcha.render;r.grecaptcha.render=function(t,i){return t=e(t,i),n.b++,t};u()}else f(new t("internal-error"));delete r[n.a]};var o=rc(wit,{onload:n.a,hl:i||""});e(nl(o)).s(function(){f(new t("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else f(new t("network-request-failed"))})}function cn(){return vh||(vh=new ist),vh}function ov(n,i,r){try{this.f=r||o.app()}catch(n){throw new t("argument-error","No firebase.app.App instance is currently initialized.");}if(!this.f.options||!this.f.options.apiKey)throw new t("invalid-api-key");r=this.f.options.apiKey;var f=this,u=null;try{u=this.f.auth().Ka()}catch(n){}u=o.SDK_VERSION?su(o.SDK_VERSION,u):null;fv.call(this,r,n,i,function(){try{var n=f.f.auth().$()}catch(t){n=null}return n},u,ie(de))}function et(n,t){var i,r;for(i in t)r=t[i].name,n[r]=ln(r,n[i],t[i].j)}function ot(n,t,i,r){n[t]=ln(t,i,r)}function ln(n,t,i){function u(){var n=Array.prototype.slice.call(arguments);return on(f,i,n),t.apply(this,n)}if(!i)return t;var r,f=ust(n);for(r in t)u[r]=t[r];for(r in t.prototype)u.prototype[r]=t.prototype[r];return u}function ust(n){return n=n.split("."),n[n.length-1]}var n,o=i(6).default,sv=sv||{},r=this,ds="closure_uid_"+(1e9*Math.random()>>>0),an=0,br=Date.now||function(){return+new Date},cv,lv,av,nh,th,ih,li,bn,vv,yv,bv,kv,dn,dv,gv,ny,ty,ftt,ott,uh,ye,pe,we,fy,be,oy,sy,ltt,hy,cy,ytt,ptt,ay,vy,fh,oh,fit,ky,eit,np,sh,hh,cit,lit,ch,lh,ah,wit,vh;l(st,Error);st.prototype.name="CustomError";var vn=String.prototype.trim?function(n){return n.trim()}:function(n){return n.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},fst=/&/g,est=/</g,ost=/>/g,sst=/"/g,hst=/'/g,cst=/\x00/g,lst=/[\x00&<>"']/;l(bh,st);bh.prototype.name="AssertionError";var tf,yn=Array.prototype.indexOf?function(n,t,i){return Array.prototype.indexOf.call(n,t,i)}:function(n,t,i){if(i=null==i?0:0>i?Math.max(0,n.length+i):i,p(n))return p(t)&&1==t.length?n.indexOf(t,i):-1;for(;i<n.length;i++)if(i in n&&n[i]===t)return i;return-1},ct=Array.prototype.forEach?function(n,t,i){Array.prototype.forEach.call(n,t,i)}:function(n,t,i){for(var f=n.length,u=p(n)?n.split(""):n,r=0;r<f;r++)r in u&&t.call(i,u[r],r,n)},hv=Array.prototype.map?function(n,t,i){return Array.prototype.map.call(n,t,i)}:function(n,t,i){for(var u=n.length,f=Array(u),e=p(n)?n.split(""):n,r=0;r<u;r++)r in e&&(f[r]=t.call(i,e[r],r,n));return f},ast=Array.prototype.some?function(n,t,i){return Array.prototype.some.call(n,t,i)}:function(n,t,i){for(var f=n.length,u=p(n)?n.split(""):n,r=0;r<f;r++)if(r in u&&t.call(i,u[r],r,n))return!0;return!1};n:{if(cv=r.navigator,cv&&(lv=cv.userAgent,lv)){tf=lv;break n}tf=""}av="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");dh[" "]=ni;var gs,vst=g("Opera"),dt=g("Trident")||g("MSIE"),pn=g("Edge"),yst=pn||dt,wn=g("Gecko")&&!(v(tf.toLowerCase(),"webkit")&&!g("Edge"))&&!(g("Trident")||g("MSIE"))&&!g("Edge"),pst=v(tf.toLowerCase(),"webkit")&&!g("Edge");n:{if(nh="",th=function(){var n=tf;return wn?/rv\:([^\);]+)(\)|;)/.exec(n):pn?/Edge\/([\d\.]+)/.exec(n):dt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(n):pst?/WebKit\/(\S+)/.exec(n):vst?/(?:Version)[ \/]?(\S+)/.exec(n):void 0}(),(th&&(nh=th?th[1]:""),dt)&&(ih=ep(),null!=ih&&ih>parseFloat(nh))){gs=ih+"";break n}gs=nh}bn={};vv=r.document;li=vv&&dt?ep()||("CSS1Compat"==vv.compatMode?parseInt(gs,10):5):void 0;gh.prototype.get=function(){if(0<this.b){this.b--;var n=this.a;this.a=n.next;n.next=null}else n=this.c();return n};yv=new gh(function(){return new nc},function(n){n.reset()},100);nc.prototype.set=function(n,t){this.a=n;this.b=t;this.next=null};nc.prototype.reset=function(){this.next=this.b=this.a=null};var pv,rh,wv=!1,kn=new function(){this.b=this.a=null},kr=0,ae=2,ai=3;vp.prototype.reset=function(){this.f=this.b=this.g=this.a=null;this.c=!1};bv=new gh(function(){return new vp},function(n){n.reset()},100);c.prototype.then=function(n,t,i){return wp(this,rt(n)?n:null,rt(t)?t:null,i)};sp(c);n=c.prototype;n.s=function(n,t){return wp(this,null,n,t)};n.cancel=function(n){this.a==kr&&to(function(){pp(this,new nu(n))},this)};n.Ac=function(n){this.a=kr;rr(this,ae,n)};n.Bc=function(n){this.a=kr;rr(this,ai,n)};n.Qb=function(){for(var n;n=dp(this);)gp(this,n,this.a,this.i);this.h=!1};kv=lp;l(nu,st);nu.prototype.name="cancel";dn=!dt||9<=+li;ur.prototype.la=!0;ur.prototype.ja=function(){return this.a};ur.prototype.toString=function(){return"Const{"+this.a+"}"};dv={};sf("");tu.prototype.la=!0;tu.prototype.ja=function(){return this.a};tu.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var wst=/%{(\w+)}/g,bst=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank(#|$)/i,gn={};ii.prototype.la=!0;ii.prototype.ja=function(){return this.a};ii.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};gv=/^(?:(?:https?|mailto|ftp):|[^:\/?#]*(?:[\/?#]|$))/i;ny={};uc("about:blank");iu.prototype.la=!0;iu.prototype.ja=function(){return this.a};iu.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};ty={};ro("<!DOCTYPE html>");ro("");ro("<br>");var ntt={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"},ttt={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},kst=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,itt=0,rtt={};fo.prototype.oa=!1;fo.prototype.ta=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var dst=Object.freeze||function(n){return n},utt=!dt||9<=+li,gst=dt&&!op("9"),nht=function(){if(!r.addEventListener||!Object.defineProperty)return!1;var n=!1,t=Object.defineProperty({},"passive",{get:function(){n=!0}});return r.addEventListener("test",ni,t),r.removeEventListener("test",ni,t),n}();at.prototype.c=function(){this.Bb=!1};l(fr,at);ftt=dst({2:"touch",3:"pen",4:"mouse"});fr.prototype.c=function(){fr.ib.c.call(this);var n=this.a;if(n.preventDefault)n.preventDefault();else if(n.returnValue=!1,gst)try{(n.ctrlKey||112<=n.keyCode&&123>=n.keyCode)&&(n.keyCode=-1)}catch(n){}};fr.prototype.g=function(){return this.a};var ve="closure_listenable_"+(1e6*Math.random()|0),tht=0,iy="closure_lm_"+(1e6*Math.random()|0),ry={},ett=0,uy="__closure_events_fn_"+(1e9*Math.random()>>>0);l(pt,fo);pt.prototype[ve]=!0;pt.prototype.removeEventListener=function(n,t,i,r){yt(this,n,t,i,r)};pt.prototype.ta=function(){var i,n,u,r,t;if(pt.ib.ta.call(this),this.u){n=this.u;u=0;for(i in n.a){for(r=n.a[i],t=0;t<r.length;t++)++u,eo(r[t]);delete n.a[i];n.b--}}this.Ra=null};yc.prototype.a=null;ott=0;yc.prototype.reset=function(n,t,i,r,u){"number"==typeof u||ott++;r||br();this.b=t;delete this.a};ho.prototype.toString=function(){return this.name};var stt=new ho("SEVERE",1e3),iht=new ho("CONFIG",700),rht=new ho("FINE",500);pc.prototype.log=function(n,t,i){if(n.value>=yw(this).value)for(rt(t)&&(t=t()),n=new yc(n,t+"",this.f),i&&(n.a=i),i="log:"+n.b,(n=r.console)&&n.timeStamp&&n.timeStamp(i),(n=r.msWriteProfilerMark)&&n(i),i=this;i;)i=i.a};uh={};ye=null;n=ru.prototype;n.P=function(){wc(this);for(var t=[],n=0;n<this.a.length;n++)t.push(this.b[this.a[n]]);return t};n.S=function(){return wc(this),this.a.concat()};n.clear=function(){this.b={};this.c=this.a.length=0};n.get=function(n,t){return or(this.b,n)?this.b[n]:t};n.set=function(n,t){or(this.b,n)||(this.c++,this.a.push(n));this.b[n]=t};n.forEach=function(n,t){for(var u,f,r=this.S(),i=0;i<r.length;i++)u=r[i],f=this.get(u),n.call(t,f,u,this)};pe=null;we=null;wi.prototype.cancel=function(n){if(this.a)this.c instanceof wi&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b;n?t.cancel(n):0>=--t.l&&t.cancel()}this.v?this.v.call(this.o,this):this.u=!0;this.a||(n=new cf,co(this),hf(this,!1,n))}};wi.prototype.m=function(n,t){this.i=!1;hf(this,n,t)};wi.prototype.A=function(n){co(this);hf(this,!0,n)};wi.prototype.then=function(n,t,i){var r,u,f=new c(function(n,t){r=n;u=t});return bc(this,r,function(n){n instanceof cf?f.cancel():u(n)}),f.then(n,t,i)};sp(wi);l(lo,st);lo.prototype.message="Deferred has already fired";lo.prototype.name="AlreadyCalledError";l(cf,st);cf.prototype.message="Deferred was canceled";cf.prototype.name="CanceledError";kw.prototype.c=function(){throw delete be[this.a],this.b;};be={};l(ao,uut);for(var htt=64,uht=htt-1,ctt=[],ey=0;ey<uht;ey++)ctt[ey]=0;oy=kh(128,ctt);ao.prototype.reset=function(){this.g=this.c=0;this.a=r.Int32Array?new Int32Array(this.h):ir(this.h)};sy=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];l(dw,ao);ltt=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];hy=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;uu.prototype.toString=function(){var t=[],i=this.c,n;return i&&t.push(af(i,att,!0),":"),n=this.b,(n||"file"==i)&&(t.push("//"),(i=this.l)&&t.push(af(i,att,!0),"@"),t.push(encodeURIComponent(n+"").replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",n+"")),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(af(n,"/"==n.charAt(0)?eht:fht,!0))),(n=""+this.a)&&t.push("?",n),(n=this.h)&&t.push("#",af(n,sht)),t.join("")};var att=/[#\/\?@]/g,fht=/[\#\?:]/g,eht=/[\#\?]/g,oht=/[\#\?@]/g,sht=/#/g;n=eu.prototype;n.clear=function(){this.a=this.c=null;this.b=0};n.forEach=function(n,t){ki(this);this.a.forEach(function(i,r){ct(i,function(i){n.call(t,i,r,this)},this)},this)};n.S=function(){var u,t;ki(this);for(var f=this.a.P(),i=this.a.S(),r=[],n=0;n<i.length;n++)for(u=f[n],t=0;t<u.length;t++)r.push(i[n]);return r};n.P=function(n){var t,i;if(ki(this),t=[],p(n))eb(this,n)&&(t=kh(t,this.a.get(ou(this,n))));else for(n=this.a.P(),i=0;i<n.length;i++)t=kh(t,n[i]);return t};n.set=function(n,t){return ki(this),this.c=null,n=ou(this,n),eb(this,n)&&(this.b-=this.a.get(n).length),this.a.set(n,[t]),this.b+=1,this};n.get=function(n,t){return n=n?this.P(n):[],0<n.length?n[0]+"":t};n.toString=function(){var n,e,t,r;if(this.c)return this.c;if(!this.a)return"";for(var u=[],f=this.a.S(),i=0;i<f.length;i++)for(n=f[i],e=encodeURIComponent(n+""),n=this.P(n),t=0;t<n.length;t++)r=e,""!==n[t]&&(r+="="+encodeURIComponent(n[t]+"")),u.push(r);return this.c=u.join("&")};vo.prototype.c=null;l(yo,vo);yo.prototype.a=function(){var n=sb(this);return n?new ActiveXObject(n):new XMLHttpRequest};yo.prototype.b=function(){var n={};return sb(this)&&(n[0]=!0,n[1]=!0),n};cy=new yo;l(sr,pt);var vtt="",hht=sr.prototype,cht=pw("goog.net.XhrIo");hht.J=cht;ytt=/^https?$/i;ptt=["POST","PUT"];n=sr.prototype;n.Ea=function(){void 0!==sv&&this.a&&(this.g="Timed out after "+this.f+"ms, aborting",vt(this.J,si(this,this.g)),tt(this,"timeout"),this.abort(8))};n.abort=function(){this.a&&this.b&&(vt(this.J,si(this,"Aborting")),this.b=!1,this.c=!0,this.a.abort(),this.c=!1,tt(this,"complete"),tt(this,"abort"),po(this))};n.ta=function(){this.a&&(this.b&&(this.b=!1,this.c=!0,this.a.abort(),this.c=!1),po(this,!0));sr.ib.ta.call(this)};n.Ab=function(){this.oa||(this.G||this.h||this.c?lb(this):this.jc())};n.jc=function(){lb(this)};n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.l){case vtt:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var n=this.J;return n&&n.log(stt,"Response type "+this.l+" is not supported on this browser",void 0),null}catch(n){return vt(this.J,"Can not get response: "+n.message),null}};var lht=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/,aht=0,vht=1;l(tl,st);l(ko,vo);ko.prototype.a=function(){var n=new XMLHttpRequest;if("withCredentials"in n)return n;if("undefined"!=typeof XDomainRequest)return new vb;throw Error("Unsupported browser");};ko.prototype.b=function(){return{}};n=vb.prototype;n.open=function(n,t,i){if(null!=i&&!i)throw Error("Only async requests are supported.");this.a.open(n,t)};n.send=function(n){if(n){if("string"!=typeof n)throw Error("Only string data is supported");this.a.send(n)}else this.a.send()};n.abort=function(){this.a.abort()};n.setRequestHeader=function(){};n.getResponseHeader=function(n){return"content-type"==n.toLowerCase()?this.a.contentType:""};n.Wb=function(){this.status=200;this.responseText=this.a.responseText;il(this,4)};n.xb=function(){this.status=500;this.responseText="";il(this,4)};n.Yb=function(){this.xb()};n.Xb=function(){this.status=200;il(this,1)};n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType};var yht=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ly="Firefox",wtt="Chrome",btt={Gc:"FirebaseCore-web",Ic:"FirebaseUI-web"};lr.prototype.get=function(){return this.a?this.b:this.c};vy={};try{fh={};Object.defineProperty(fh,"abcd",{configurable:!0,enumerable:!0,value:1});Object.defineProperty(fh,"abcd",{configurable:!0,enumerable:!0,value:2});ay=2==fh.abcd}catch(p){ay=!1}var pht="email",wht="newEmail",bht="requestType",kht="email",dht="fromEmail",ght="data",nct="operation";l(t,Error);t.prototype.B=function(){return{code:this.code,message:this.message}};t.prototype.toJSON=function(){return this.B()};var ke="auth/",tct={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"The user's credential is no longer valid. The user must sign in again.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},ktt="android",yy="handleCodeInApp",dtt="iOS",ict="url",gtt="installApp",nit="minimumVersion",tit="packageName",iit="bundleId",rit="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),eh=["client_id","response_type","scope","redirect_uri","state"],py={Hc:{Ma:"locale",za:500,ya:600,Na:"facebook.com",$a:eh},Jc:{Ma:null,za:500,ya:620,Na:"github.com",$a:eh},Kc:{Ma:"hl",za:515,ya:680,Na:"google.com",$a:eh},Qc:{Ma:"lang",za:485,ya:705,Na:"twitter.com",$a:rit}},wy="idToken",uit="providerId";l(ui,vl);l(ek,ui);l(ok,ui);l(sk,ui);l(hk,ui);cu.prototype.wa=function(n){return nd(n,yl(this))};cu.prototype.b=function(n,t){var i=yl(this);return i.idToken=t,td(n,i)};cu.prototype.c=function(n,t){return ts(id(n,yl(this)),t)};cu.prototype.B=function(){var n={providerId:this.providerId};return this.idToken&&(n.oauthIdToken=this.idToken),this.accessToken&&(n.oauthAccessToken=this.accessToken),this.secret&&(n.oauthTokenSecret=this.secret),n};df.prototype.Ba=function(n){return this.rb=of(n),this};l(ht,df);ht.prototype.sa=function(n){return tr(this.a,n)||this.a.push(n),this};ht.prototype.wb=function(){return ir(this.a)};ht.prototype.credential=function(n,i){if(!n&&!i)throw new t("argument-error","credential failed: must provide the ID token and/or the access token.");return new cu(this.providerId,{idToken:n||null,accessToken:i||null})};l(lu,ht);h(lu,"PROVIDER_ID","facebook.com");l(au,ht);h(au,"PROVIDER_ID","github.com");l(vu,ht);h(vu,"PROVIDER_ID","google.com");l(gf,df);h(gf,"PROVIDER_ID","twitter.com");ne.prototype.wa=function(n){return a(n,hit,{email:this.a,password:this.f})};ne.prototype.b=function(n,t){return a(n,sit,{idToken:t,email:this.a,password:this.f})};ne.prototype.c=function(n,t){return ts(this.wa(n),t)};ne.prototype.B=function(){return{email:this.a,password:this.f}};ri(pl,{PROVIDER_ID:"password"});yu.prototype.wa=function(n){return n.Qa(wl(this))};yu.prototype.b=function(n,t){var i=wl(this);return i.idToken=t,a(n,flt,i)};yu.prototype.c=function(n,t){var i=wl(this);return i.operation="REAUTH",n=a(n,elt,i),ts(n,t)};yu.prototype.B=function(){var n={providerId:"phone"};return this.a.Pa&&(n.verificationId=this.a.Pa),this.a.Oa&&(n.verificationCode=this.a.Oa),this.a.Da&&(n.temporaryProof=this.a.Da),this.a.Y&&(n.phoneNumber=this.a.Y),n};ar.prototype.Qa=function(n,i){var r=this.a.c;return e(i.verify()).then(function(u){if(!p(u))throw new t("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(i.type){case"recaptcha":return sft(r,{phoneNumber:n,recaptchaToken:u}).then(function(n){return"function"==typeof i.reset&&i.reset(),n},function(n){throw"function"==typeof i.reset&&i.reset(),n;});default:throw new t("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.');}})};ri(ar,{PROVIDER_ID:"phone"});ci.prototype.B=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.B()}};oh=null;kl.prototype.subscribe=function(n){var t=this;this.a.push(n);this.b||(this.b=function(n){for(var i=0;i<t.a.length;i++)t.a[i](n)},"function"==typeof(n=w("universalLinks.subscribe",r))&&n(null,this.b))};kl.prototype.unsubscribe=function(n){ti(this.a,function(t){return t==n})};l(dl,t);l(te,t);te.prototype.B=function(){var n={code:this.code,message:this.message},t;return this.email&&(n.email=this.email),this.phoneNumber&&(n.phoneNumber=this.phoneNumber),t=this.credential&&this.credential.B(),t&&yi(n,t),n};te.prototype.toJSON=function(){return this.B()};l(us,vo);us.prototype.a=function(){return new this.f};us.prototype.b=function(){return{}};var by,gt="idToken",rct=new lr(3e4,6e4),uct={"Content-Type":"application/x-www-form-urlencoded"},fct=new lr(3e4,6e4),ect={"Content-Type":"application/json"};fi.prototype.m=function(n,t,i,r,u,f){var s="Node"==wt(),o=kb()?s?new sr(this.o):new sr:new sr(this.f),e;f&&(o.f=Math.max(0,f),e=setTimeout(function(){tt(o,"timeout")},f));vw(o,"complete",function(){e&&clearTimeout(e);var n=null;try{n=JSON.parse(vut(this))||null}catch(t){n=null}t&&t(n)});ac(o,"ready",function(){e&&clearTimeout(e);ow(this)});ac(o,"timeout",function(){e&&clearTimeout(e);ow(this);t&&t(null)});cut(o,n,i,r,u)};fit=sf("https://apis.google.com/js/client.js?onload=%{onload}");ky="__fcb"+Math.floor(1e6*Math.random());fi.prototype.u=function(n,t,i,r,u){var f=this;by.then(function(){window.gapi.client.setApiKey(f.b);var e=window.gapi.auth.getToken();window.gapi.auth.setToken(null);window.gapi.client.request({path:n,method:i,body:r,headers:u,authType:"none",callback:function(n){window.gapi.auth.setToken(e);t&&t(n)}})}).s(function(n){t&&t({error:{message:n&&n.message||"CORS_UNSUPPORTED"}})})};fi.prototype.gb=function(){return a(this,gct,{})};fi.prototype.kb=function(n,t){return a(this,oit,{idToken:n,email:t})};fi.prototype.lb=function(n,t){return a(this,sit,{idToken:n,password:t})};eit={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};n=fi.prototype;n.mb=function(n,t){var i={idToken:n},r=[];return rp(eit,function(n,u){var f=t[u];null===f?r.push(n):u in t&&(i[u]=f)}),r.length&&(i.deleteAttribute=r),a(this,oit,i)};n.cb=function(n,t){return n={requestType:"PASSWORD_RESET",email:n},yi(n,t),a(this,pct,n)};n.bb=function(n,t){return n={requestType:"VERIFY_EMAIL",idToken:n},yi(n,t),a(this,yct,n)};n.Qa=function(n){return a(this,ult,n)};n.Ta=function(n,t){return a(this,kct,{oobCode:n,newPassword:t})};n.Ia=function(n){return a(this,sct,{oobCode:n})};n.Sa=function(n){return a(this,oct,{oobCode:n})};var de,oct={endpoint:"setAccountInfo",D:ta,ga:"email"},sct={endpoint:"resetPassword",D:ta,O:function(n){if(!n.email||!n.requestType)throw new t("internal-error");}},hct={endpoint:"signupNewUser",D:function(n){if(fs(n),!n.password)throw new t("weak-password");},O:di,T:!0},cct={endpoint:"createAuthUri"},lct={endpoint:"deleteAccount",ea:["idToken"]},act={endpoint:"setAccountInfo",ea:["idToken","deleteProvider"],D:function(n){if(!vi(n.deleteProvider))throw new t("internal-error");}},vct={endpoint:"getAccountInfo"},yct={endpoint:"getOobConfirmationCode",ea:["idToken","requestType"],D:function(n){if("VERIFY_EMAIL"!=n.requestType)throw new t("internal-error");},ga:"email"},pct={endpoint:"getOobConfirmationCode",ea:["requestType"],D:function(n){if("PASSWORD_RESET"!=n.requestType)throw new t("internal-error");fs(n)},ga:"email"},wct={nb:!0,endpoint:"getProjectConfig",zb:"GET"},bct={nb:!0,endpoint:"getRecaptchaParam",zb:"GET",O:function(n){if(!n.recaptchaSiteKey)throw new t("internal-error");}},kct={endpoint:"resetPassword",D:ta,ga:"email"},dct={endpoint:"sendVerificationCode",ea:["phoneNumber","recaptchaToken"],ga:"sessionInfo"},oit={endpoint:"setAccountInfo",ea:["idToken"],D:dk,T:!0},sit={endpoint:"setAccountInfo",ea:["idToken"],D:function(n){if(dk(n),!n.password)throw new t("weak-password");},O:di,T:!0},gct={endpoint:"signupNewUser",O:di,T:!0},nlt={endpoint:"verifyAssertion",D:na,O:gk,T:!0},tlt={endpoint:"verifyAssertion",D:na,O:function(n){if(n.errorMessage&&"USER_NOT_FOUND"==n.errorMessage)throw new t("user-not-found");if(n.errorMessage)throw rd(n.errorMessage);if(!n[gt])throw new t("internal-error");},T:!0},ilt={endpoint:"verifyAssertion",D:function(n){if(na(n),!n.idToken)throw new t("internal-error");},O:gk,T:!0},rlt={endpoint:"verifyCustomToken",D:function(n){if(!n.token)throw new t("invalid-custom-token");},O:di,T:!0},hit={endpoint:"verifyPassword",D:function(n){if(fs(n),!n.password)throw new t("wrong-password");},O:di,T:!0},ult={endpoint:"verifyPhoneNumber",D:gl,O:di},flt={endpoint:"verifyPhoneNumber",D:function(n){if(!n.idToken)throw new t("internal-error");gl(n)},O:function(n){if(n.temporaryProof)throw n.code="credential-already-in-use",rs(n);di(n)}},elt={Pb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",D:gl,O:di},dy={Mc:{Va:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",ab:"https://securetoken.googleapis.com/v1/token",id:"p"},Oc:{Va:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",ab:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},Pc:{Va:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",ab:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};de=ie("__EID__")?"__EID__":void 0;var olt=sf("https://apis.google.com/js/api.js?onload=%{onload}"),slt=new lr(3e4,6e4),hlt=new lr(5e3,15e3),gy=null;ud.prototype.toString=function(){return this.f?k(this.a,"v",this.f):oi(this.a.a,"v"),this.b?k(this.a,"eid",this.b):oi(this.a.a,"eid"),this.c.length?k(this.a,"fw",this.c.join(",")):oi(this.a.a,"fw"),""+this.a};fd.prototype.toString=function(){var n=rb(this.m,"/__/auth/handler"),i,t,u,f,e,r;if(k(n,"apiKey",this.u),k(n,"appName",this.c),k(n,"authType",this.l),this.a.isOAuthProvider){i=this.a;try{t=o.app(this.c).auth().$()}catch(n){t=null}i.Ua=t;k(n,"providerId",this.a.providerId);i=this.a;t=db(i.rb);for(u in t)t[u]=""+t[u];for(u=i.rc,t=of(t),f=0;f<u.length;f++)e=u[f],e in t&&delete t[e];i.Wa&&i.Ua&&!t[i.Wa]&&(t[i.Wa]=i.Ua);ef(t)||k(n,"customParameters",bf(t))}if("function"==typeof this.a.wb&&(i=this.a.wb(),i.length&&k(n,"scopes",i.join(","))),this.h?k(n,"redirectUrl",this.h):oi(n.a,"redirectUrl"),this.g?k(n,"eventId",this.g):oi(n.a,"eventId"),this.i?k(n,"v",this.i):oi(n.a,"v"),this.b)for(r in this.b)this.b.hasOwnProperty(r)&&!fu(n,r)&&k(n,r,this.b[r]);return this.f?k(n,"eid",this.f):oi(n.a,"eid"),r=ra(this.c),r.length&&k(n,"fw",r.join(",")),""+n};n=ed.prototype;n.Ca=function(n,i,r){var f=new t("popup-closed-by-user"),e=new t("web-storage-unsupported"),o=this,u=!1;return this.ba().then(function(){wft(o).then(function(t){t||(n&&hr(n),i(e),u=!0)})}).s(function(){}).then(function(){if(!u)return but(n)}).then(function(){if(!u)return er(r).then(function(){i(f)})})};n.Db=function(){var n=it();return!wf(n)&&!gb(n)};n.yb=function(){return!1};n.vb=function(n,i,r,u,f,o,s){if(!n)return b(new t("popup-blocked"));if(s&&!wf())return this.ba().s(function(t){hr(n);f(t)}),u(),e();this.a||(this.a=od(hd(this)));var h=this;return this.a.then(function(){var t=h.ba().s(function(t){throw hr(n),f(t),t;});return u(),t}).then(function(){bl(r);s||yb(re(h.u,h.f,h.b,i,r,null,o,h.c,void 0,h.h),n)}).s(function(n){throw"auth/network-request-failed"==n.code&&(h.a=null),n;})};n.Aa=function(n,t,i){this.a||(this.a=od(hd(this)));var r=this;return this.a.then(function(){bl(t);yb(re(r.u,r.f,r.b,n,t,go(),i,r.c,void 0,r.h))}).s(function(n){throw"auth/network-request-failed"==n.code&&(r.a=null),n;})};n.ba=function(){var n=this;return sd(this).then(function(){return n.i.Ya}).s(function(){throw n.a=null,new t("network-request-failed");})};n.Hb=function(){return!0};n.ua=function(n){this.g.push(n)};n.Ja=function(n){ti(this.g,function(t){return t==n})};n=cd.prototype;n.get=function(n){return e(this.a.getItem(n)).then(function(n){return n&&kf(n)})};n.set=function(n,t){return e(this.a.setItem(n,bf(t)))};n.X=function(n){return e(this.a.removeItem(n))};n.ia=function(){};n.da=function(){};n=es.prototype;n.get=function(n){return e(this.a[n])};n.set=function(n,t){return this.a[n]=t,e()};n.X=function(n){return delete this.a[n],e()};n.ia=function(){};n.da=function(){};n=ld.prototype;n.set=function(n,t){var r,u=!1,i=this;return gr(os(this).then(function(t){return r=t,t=ue(i,fe(i,r,!0)),pu(t.get(n))}).then(function(f){var e=ue(i,fe(i,r,!0));return f?(f.value=t,pu(e.put(f))):(i.a++,u=!0,f={},f[i.g]=n,f[i.l]=t,pu(e.add(f)))}).then(function(){i.f[n]=t}),function(){u&&i.a--})};n.get=function(n){var t=this;return os(this).then(function(i){return pu(ue(t,fe(t,i,!1)).get(n))}).then(function(n){return n&&n.value})};n.X=function(n){var i=!1,t=this;return gr(os(this).then(function(r){return i=!0,t.a++,pu(ue(t,fe(t,r,!0)).delete(n))}).then(function(){delete t.f[n]}),function(){i&&t.a--})};n.zc=function(){var n=this;return os(this).then(function(t){var i=ue(n,fe(n,t,!1));return i.getAll?pu(i.getAll()):new c(function(n,t){var r=[],u=i.openCursor();u.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):n(r)};u.onerror=function(n){t(Error(n.target.errorCode))}})}).then(function(t){var r={},i=[];if(0==n.a){for(i=0;i<t.length;i++)r[t[i][n.g]]=t[i][n.l];i=pb(n.f,r);n.f=r}return i})};n.ia=function(n){0==this.c.length&&kft(this);this.c.push(n)};n.da=function(n){ti(this.c,function(t){return t==n});0==this.c.length&&this.b&&this.b.cancel("STOP_EVENT")};n=ua.prototype;n.get=function(n){var t=this;return e().then(function(){return kf(t.a.getItem(n))})};n.set=function(n,t){var i=this;return e().then(function(){var r=bf(t);null===r?i.X(n):i.a.setItem(n,r)})};n.X=function(n){var t=this;return e().then(function(){t.a.removeItem(n)})};n.ia=function(n){r.window&&pi(r.window,"storage",n)};n.da=function(n){r.window&&yt(r.window,"storage",n)};n=vd.prototype;n.get=function(){return e(null)};n.set=function(){return e()};n.X=function(){return e()};n.ia=function(){};n.da=function(){};n=fa.prototype;n.get=function(n){var t=this;return e().then(function(){return kf(t.a.getItem(n))})};n.set=function(n,t){var i=this;return e().then(function(){var r=bf(t);null===r?i.X(n):i.a.setItem(n,r)})};n.X=function(n){var t=this;return e().then(function(){t.a.removeItem(n)})};n.ia=function(){};n.da=function(){};var tp,ip,clt={C:ua,jb:fa},llt={C:ua,jb:fa},alt={C:cd,jb:vd},rf={Lc:"local",NONE:"none",Nc:"session"};ee.prototype.get=function(n,t){return wu(this,n.C).get(se(this,n,t))};ee.prototype.set=function(n,t,i){var r=se(this,n,i),f=this,u=wu(this,n.C);return u.set(r,t).then(function(){return u.get(r)}).then(function(t){"local"==n.C&&(f.b[r]=t)})};ee.prototype.m=function(n){var t,i,u,o,e;if(n&&n.g){if(t=n.a.key,null==t)for(i in this.a)u=this.b[i],void 0===u&&(u=null),o=r.localStorage.getItem(i),o!==u&&(this.b[i]=o,this.c(i));else if(0==t.indexOf(this.i+this.g)&&this.a[t]){if(void 0!==n.a.a?wu(this,"local").da(this.h):ea(this),this.A)if(i=r.localStorage.getItem(t),(u=n.a.newValue)!==i)null!==u?r.localStorage.setItem(t,u):r.localStorage.removeItem(t);else if(this.b[t]===u&&void 0===n.a.a)return;e=this;i=function(){void 0===n.a.a&&e.b[t]===r.localStorage.getItem(t)||(e.b[t]=r.localStorage.getItem(t),e.c(t))};dt&&li&&10==li&&r.localStorage.getItem(t)!==n.a.newValue&&n.a.newValue!==n.a.oldValue?setTimeout(i,10):i()}}else ct(n,f(this.c,this))};ee.prototype.c=function(n){this.a[n]&&ct(this.a[n],function(n){n()})};sh={name:"authEvent",C:"local"};n=wd.prototype;n.ba=function(){return this.xa?this.xa:this.xa=kut().then(function(){if("function"!=typeof w("universalLinks.subscribe",r))throw ss("cordova-universal-links-plugin is not installed");if(void 0===w("BuildInfo.packageName",r))throw ss("cordova-plugin-buildinfo is not installed");if("function"!=typeof w("cordova.plugins.browsertab.openUrl",r))throw ss("cordova-plugin-browsertab is not installed");if("function"!=typeof w("cordova.InAppBrowser.open",r))throw ss("cordova-plugin-inappbrowser is not installed");},function(){throw new t("cordova-not-ready");})};n.Ca=function(n,i){return i(new t("operation-not-supported-in-this-environment")),e()};n.vb=function(){return b(new t("operation-not-supported-in-this-environment"))};n.Hb=function(){return!1};n.Db=function(){return!0};n.yb=function(){return!0};n.Aa=function(n,i,u){if(this.c)return b(new t("redirect-operation-pending"));var f=this,s=r.document,h=null,l=null,o=null,a=null;return this.c=gr(e().then(function(){return bl(i),kd(f)}).then(function(){return cet(f,n,i,u)}).then(function(){return new c(function(n,i){l=function(){var t=w("cordova.plugins.browsertab.close",r);return n(),"function"==typeof t&&t(),f.a&&"function"==typeof f.a.close&&(f.a.close(),f.a=null),!1};f.ua(l);o=function(){h||(h=er(f.w).then(function(){i(new t("redirect-cancelled-by-user"))}))};a=function(){hl()&&o()};s.addEventListener("resume",o,!1);it().toLowerCase().match(/android/)||s.addEventListener("visibilitychange",a,!1)}).s(function(n){return oa(f).then(function(){throw n;})})}),function(){o&&s.removeEventListener("resume",o,!1);a&&s.removeEventListener("visibilitychange",a,!1);h&&h.cancel();l&&f.Ja(l);f.c=null})};n.ua=function(n){this.b.push(n);kd(this).s(function(i){"auth/invalid-cordova-configuration"===i.code&&(i=new ci("unknown",null,null,null,new t("no-auth-event")),n(i))})};n.Ja=function(n){ti(this.b,function(t){return t==n})};hh={name:"pendingRedirect",C:"session"};gi.prototype.reset=function(){this.f=!1;this.a.Ja(this.i);this.a=dd(this.v,this.l,this.u)};gi.prototype.subscribe=function(n){if(tr(this.h,n)||this.h.push(n),!this.f){var i=this;pet(this.g).then(function(n){n?sa(i.g).then(function(){gd(i).s(function(n){var r=new ci("unknown",null,null,null,new t("operation-not-supported-in-this-environment"));ha(n)&&i.m(r)})}):ng(i)}).s(function(){ng(i)})}};gi.prototype.unsubscribe=function(n){ti(this.h,function(t){return t==n})};gi.prototype.m=function(n){var i,r,u;if(!n)throw new t("invalid-auth-event");for(i=!1,r=0;r<this.h.length;r++)if(u=this.h[r],u.ob(n.b,n.c)){(i=this.b[n.b])&&i.h(n,u);i=!0;break}return rg(this.c),i};cit=new lr(2e3,1e4);lit=new lr(3e4,6e4);gi.prototype.aa=function(){return this.c.aa()};gi.prototype.Aa=function(n,i,r){var f,u=this;return yet(this.g).then(function(){return u.a.Aa(n,i,r).s(function(n){if(ha(n))throw new t("operation-not-supported-in-this-environment");return f=n,sa(u.g).then(function(){throw f;})}).then(function(){return u.a.Hb()?new c(function(){}):sa(u.g).then(function(){return u.aa()}).then(function(){}).s(function(){})})})};gi.prototype.Ca=function(n,t,i,r){return this.a.Ca(i,function(i){n.fa(t,null,i,r)},cit.get())};ch={};hs.prototype.reset=function(){this.b=null;this.a&&(this.a.cancel(),this.a=null)};hs.prototype.h=function(n,i){if(!n)return b(new t("invalid-auth-event"));this.reset();this.g=!0;var r=n.b,u=n.c,f=n.a&&"auth/web-storage-unsupported"==n.a.code,o=n.a&&"auth/operation-not-supported-in-this-environment"==n.a.code;return"unknown"!=r||f||o?n.a?(ku(this,!0,null,n.a),n=e()):n=i.va(r,u)?wet(this,n,i):b(new t("invalid-auth-event")):(ku(this,!1,null,null),n=e()),n};hs.prototype.aa=function(){var n=this;return new c(function(t,i){n.b?n.b().then(t,i):(n.f.push(t),n.c.push(i),ket(n))})};fg.prototype.h=function(n,i){if(!n)return b(new t("invalid-auth-event"));var r=n.b,u=n.c;return n.a?(i.fa(n.b,null,n.a,n.c),n=e()):n=i.va(r,u)?det(n,i):b(new t("invalid-auth-event")),n};ca.prototype.confirm=function(n){return n=yk(this.verificationId,n),this.a(n)};eg.prototype.start=function(){this.a=this.c;aa(this,!0)};ya.prototype.B=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}};ya.prototype.getToken=function(n){return n=!!n,this.b&&!this.a?b(new t("user-token-expired")):n||!this.b||br()>this.c-3e4?this.a?not(this,{grant_type:"refresh_token",refresh_token:this.a}):e(null):e({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})};cs.prototype.B=function(){return{lastLoginAt:this.b,createdAt:this.a}};l(he,at);l(bt,pt);bt.prototype.na=function(n){this.ha=n;wk(this.c,n)};bt.prototype.$=function(){return this.ha};bt.prototype.Ka=function(){return ir(this.R)};bt.prototype.Ga=function(){this.l.b&&(va(this.l),this.l.start())};h(bt.prototype,"providerId","firebase");n=bt.prototype;n.reload=function(){var n=this;return nt(this,da(this).then(function(){return tv(n).then(function(){return vr(n)}).then(ag)}))};n.F=function(n){var i=this;return nt(this,da(this).then(function(){return i.h.getToken(n)}).then(function(n){if(!n)throw new t("internal-error");return n.accessToken!=i.pa&&(ka(i,n.accessToken),tt(i,new he("tokenChanged"))),nr(i,"refreshToken",n.refreshToken),n.accessToken}))};n.getToken=function(n){return vy["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(vy["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.")),this.F(n)};n.kc=function(n){if(!(n=n.users)||!n.length)throw new t("internal-error");n=n[0];lg(this,{uid:n.localId,displayName:n.displayName,photoURL:n.photoUrl,email:n.email,emailVerified:!!n.emailVerified,phoneNumber:n.phoneNumber,lastLoginAt:n.lastLoginAt,createdAt:n.createdAt});for(var r=eot(n),i=0;i<r.length;i++)nv(this,r[i]);nr(this,"isAnonymous",!(this.email&&n.passwordHash||this.providerData&&this.providerData.length))};n.Za=function(n){var t=this,i=null;return nt(this,n.c(this.c,this.uid).then(function(n){return yr(t,n),i=ys(t,n,"reauthenticate"),t.i=null,t.reload()}).then(function(){return i}),!0)};n.mc=function(n){return this.Za(n).then(function(){})};n.Xa=function(n){var t=this,i=null;return nt(this,vs(this,n.providerId).then(function(){return t.F()}).then(function(i){return n.b(t.c,i)}).then(function(n){return i=ys(t,n,"link"),pg(t,n)}).then(function(){return i}))};n.cc=function(n){return this.Xa(n).then(function(n){return n.user})};n.dc=function(n,t){var i=this;return nt(this,vs(this,"phone").then(function(){return la(hg(i),n,t,f(i.Xa,i))}))};n.nc=function(n,t){var i=this;return nt(this,e().then(function(){return la(hg(i),n,t,f(i.Za,i))}),!0)};n.kb=function(n){var t=this;return nt(this,this.F().then(function(i){return t.c.kb(i,n)}).then(function(n){return yr(t,n),t.reload()}))};n.Dc=function(n){var t=this;return nt(this,this.F().then(function(i){return n.b(t.c,i)}).then(function(n){return yr(t,n),t.reload()}))};n.lb=function(n){var t=this;return nt(this,this.F().then(function(i){return t.c.lb(i,n)}).then(function(n){return yr(t,n),t.reload()}))};n.mb=function(n){if(void 0===n.displayName&&void 0===n.photoURL)return da(this);var t=this;return nt(this,this.F().then(function(i){return t.c.mb(i,{displayName:n.displayName,photoUrl:n.photoURL})}).then(function(n){return yr(t,n),nr(t,"displayName",n.displayName||null),nr(t,"photoURL",n.photoUrl||null),ct(t.providerData,function(n){"password"===n.providerId&&(h(n,"displayName",t.displayName),h(n,"photoURL",t.photoURL))}),vr(t)}).then(ag))};n.Cc=function(n){var i=this;return nt(this,tv(this).then(function(r){return tr(ga(i),n)?hft(i.c,r,[n]).then(function(n){var t={};return ct(n.providerUserInfo||[],function(n){t[n.providerId]=!0}),ct(ga(i),function(n){t[n]||vg(i,n)}),t[ar.PROVIDER_ID]||h(i,"phoneNumber",null),vr(i)}):vr(i).then(function(){throw new t("no-such-provider");})}))};n.delete=function(){var n=this;return nt(this,this.F().then(function(t){return a(n.c,lct,{idToken:t})}).then(function(){tt(n,new he("userDeleted"))})).then(function(){for(var t=0;t<n.A.length;t++)n.A[t].cancel("app-deleted");pa(n,null);wa(n,null);n.A=[];n.m=!0;ba(n);h(n,"refreshToken",null);n.a&&n.a.unsubscribe(n)})};n.ob=function(n,t){return!!("linkViaPopup"==n&&(this.g||null)==t&&this.f||"reauthViaPopup"==n&&(this.g||null)==t&&this.f||"linkViaRedirect"==n&&(this.Z||null)==t||"reauthViaRedirect"==n&&(this.Z||null)==t)};n.fa=function(n,t,i,r){"linkViaPopup"!=n&&"reauthViaPopup"!=n||r!=(this.g||null)||(i&&this.v?this.v(i):t&&!i&&this.f&&this.f(t),this.b&&(this.b.cancel(),this.b=null),delete this.f,delete this.v)};n.va=function(n,t){return"linkViaPopup"==n&&t==(this.g||null)?f(this.tb,this):"reauthViaPopup"==n&&t==(this.g||null)?f(this.ub,this):"linkViaRedirect"==n&&(this.Z||null)==t?f(this.tb,this):"reauthViaRedirect"==n&&(this.Z||null)==t?f(this.ub,this):null};n.ec=function(n){var t=this;return wg(this,"linkViaPopup",n,function(){return vs(t,n.providerId).then(function(){return vr(t)})},!1)};n.oc=function(n){return wg(this,"reauthViaPopup",n,function(){return e()},!0)};n.fc=function(n){var t=this;return bg(this,"linkViaRedirect",n,function(){return vs(t,n.providerId)},!1)};n.pc=function(n){return bg(this,"reauthViaRedirect",n,function(){return e()},!0)};n.tb=function(n,t){var i=this,r;return this.b&&(this.b.cancel(),this.b=null),r=null,nt(this,this.F().then(function(r){return td(i.c,{requestUri:n,sessionId:t,idToken:r})}).then(function(n){return r=ys(i,n,"link"),pg(i,n)}).then(function(){return r}))};n.ub=function(n,t){var i=this,r;return this.b&&(this.b.cancel(),this.b=null),r=null,nt(this,e().then(function(){return ts(id(i.c,{requestUri:n,sessionId:t}),i.uid)}).then(function(n){return r=ys(i,n,"reauthenticate"),yr(i,n),i.i=null,i.reload()}).then(function(){return r}),!0)};n.bb=function(n){var t=this,i=null;return nt(this,this.F().then(function(t){return i=t,void 0===n||ef(n)?{}:uk(new rk(n))}).then(function(n){return t.c.bb(i,n)}).then(function(n){if(t.email!=n)return t.reload()}).then(function(){}))};n.toJSON=function(){return this.B()};n.B=function(){var n={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.G,appName:this.o,authDomain:this.w,stsTokenManager:this.h.B(),redirectEventId:this.Z||null};return this.metadata&&yi(n,this.metadata.B()),ct(this.providerData,function(t){n.providerData.push(gut(t))}),n};lh={name:"redirectUser",C:"session"};iv.prototype.g=function(){var n=this,t=ei("local");du(this,function(){return e().then(function(){return n.c&&"local"!=n.c.C?n.b.get(t,n.a):null}).then(function(i){if(i)return rv(n,"local").then(function(){n.c=t})})})};ah={name:"persistence",C:"session"};iv.prototype.eb=function(n){var i=null,t=this;return tet(n),du(this,function(){return n!=t.c.C?t.b.get(t.c,t.a).then(function(r){return i=r,rv(t,n)}).then(function(){if(t.c=ei(n),i)return t.b.set(t.c,i,t.a)}):e()})};l(kt,pt);l(un,at);l(fn,at);n=kt.prototype;n.eb=function(n){return n=this.h.eb(n),d(this,n)};n.na=function(n){this.V===n||this.l||(this.V=n,wk(this.c,this.V),tt(this,new un(this.$())))};n.$=function(){return this.V};n.Ec=function(){var n=r.navigator;this.na(n?n.languages&&n.languages[0]||n.language||n.userLanguage||null:null)};n.gc=function(n){this.A.push(n);bk(this.c,o.SDK_VERSION?su(o.SDK_VERSION,this.A):null);tt(this,new fn(this.A))};n.Ka=function(){return ir(this.A)};n.toJSON=function(){return{apiKey:y(this).options.apiKey,authDomain:y(this).options.authDomain,appName:y(this).name,currentUser:s(this)&&s(this).B()}};n.ob=function(n,t){switch(n){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}};n.fa=function(n,t,i,r){"signInViaPopup"==n&&this.g==r&&(i&&this.v?this.v(i):t&&!i&&this.f&&this.f(t),this.b&&(this.b.cancel(),this.b=null),delete this.f,delete this.v)};n.va=function(n,t){return"signInViaRedirect"==n||"signInViaPopup"==n&&this.g==t&&this.f?f(this.Sb,this):null};n.Sb=function(n,t){var i=this;n={requestUri:n,sessionId:t};this.b&&(this.b.cancel(),this.b=null);var r=null,u=null,f=nd(i.c,n).then(function(n){return r=is(n),u=al(n),n});return n=i.U.then(function(){return f}).then(function(n){return en(i,n)}).then(function(){return hi({user:s(i),credential:r,additionalUserInfo:u,operationType:"signIn"})}),d(this,n)};n.wc=function(n){var r;if(!cr())return b(new t("operation-not-supported-in-this-environment"));var i=this,u=ll(n.providerId),f=hu(),e=null;return(!wf()||el())&&y(this).options.authDomain&&n.isOAuthProvider&&(e=re(y(this).options.authDomain,y(this).options.apiKey,y(this).name,"signInViaPopup",n,null,f,o.SDK_VERSION||null)),r=bb(e,u&&u.za,u&&u.ya),u=uv(this).then(function(t){return tg(t,r,"signInViaPopup",n,f,!!e)}).then(function(){return new c(function(n,u){i.fa("signInViaPopup",null,new t("cancelled-popup-request"),i.g);i.f=n;i.v=u;i.g=f;i.b=i.a.Ca(i,"signInViaPopup",r,f)})}).then(function(n){return r&&hr(r),n?hi(n):null}).s(function(n){throw r&&hr(r),n;}),d(this,u)};n.xc=function(n){if(!cr())return b(new t("operation-not-supported-in-this-environment"));var i=this;return d(this,uv(this).then(function(){return aot(i.h)}).then(function(){return i.a.Aa("signInViaRedirect",n)}))};n.aa=function(){if(!cr())return b(new t("operation-not-supported-in-this-environment"));var n=this;return d(this,uv(this).then(function(){return n.a.aa()}).then(function(n){return n?hi(n):null}))};n.hb=function(){var n=this;return d(this,this.i.then(function(){return s(n)?(ce(n,null),tn(n.h).then(function(){ws(n)})):e()}))};n.yc=function(){var n=this;return rn(this.h,y(this).options.authDomain).then(function(t){var i,r;if(!n.l){if((i=s(n)&&t)&&(i=s(n).uid,r=t.uid,i=void 0!==i&&null!==i&&""!==i&&void 0!==r&&null!==r&&""!==r&&i==r),i)return yg(s(n),t),s(n).F();(s(n)||t)&&(ce(n,t),t&&(as(t),t.ca=n.G),n.a&&n.a.subscribe(n),ws(n))}})};n.ka=function(n){return nn(this.h,n)};n.Tb=function(){ws(this);this.ka(s(this))};n.Zb=function(){this.hb()};n.$b=function(){this.hb()};n.ac=function(n){var t=this;this.addAuthTokenListener(function(){n.next(s(t))})};n.bc=function(n){var t=this;kot(this,function(){n.next(s(t))})};n.ic=function(n,t,i){var r=this;return this.W&&o.Promise.resolve().then(function(){rt(n)?n(s(r)):rt(n.next)&&n.next(s(r))}),this.Kb(n,t,i)};n.hc=function(n,t,i){var r=this;return this.W&&o.Promise.resolve().then(function(){r.R=r.getUid();rt(n)?n(s(r)):rt(n.next)&&n.next(s(r))}),this.Lb(n,t,i)};n.Vb=function(n){var t=this;return d(this,this.i.then(function(){return s(t)?s(t).F(n).then(function(n){return{accessToken:n}}):null}))};n.tc=function(n){return this.Eb(n).then(function(n){return n.user})};n.Eb=function(n){var t=this;return this.i.then(function(){return le(t,a(t.c,rlt,{token:n}))}).then(function(n){var i=n.user;return nr(i,"isAnonymous",!1),t.ka(i),n})};n.Fb=function(n,t){var i=this;return this.i.then(function(){return le(i,a(i.c,hit,{email:n,password:t}))})};n.uc=function(n,t){return this.Fb(n,t).then(function(n){return n.user})};n.Ob=function(n,t){return this.qb(n,t).then(function(n){return n.user})};n.qb=function(n,t){var i=this;return this.i.then(function(){return le(i,a(i.c,hct,{email:n,password:t}))})};n.sc=function(n){return this.fb(n).then(function(n){return n.user})};n.fb=function(n){var t=this;return this.i.then(function(){return le(t,n.wa(t.c))})};n.gb=function(){return this.Gb().then(function(n){return n.user})};n.Gb=function(){var n=this;return this.i.then(function(){var t=s(n);return t&&t.isAnonymous?hi({user:t,credential:null,additionalUserInfo:hi({providerId:null,isNewUser:!1}),operationType:"signIn"}):le(n,n.c.gb()).then(function(t){var i=t.user;return nr(i,"isAnonymous",!0),n.ka(i),t})})};n.getUid=function(){return s(this)&&s(this).uid||null};n.Mb=function(n){this.addAuthTokenListener(n);0<++this.o&&s(this)&&cg(s(this))};n.qc=function(n){var t=this;ct(this.m,function(i){i==n&&t.o--});0>this.o&&(this.o=0);0==this.o&&s(this)&&ba(s(this));this.removeAuthTokenListener(n)};n.addAuthTokenListener=function(n){var t=this;this.m.push(n);d(this,this.i.then(function(){t.l||tr(t.m,n)&&n(ps(t))}))};n.removeAuthTokenListener=function(n){ti(this.m,function(t){return t==n})};n.delete=function(){this.l=!0;for(var n=0;n<this.N.length;n++)this.N[n].cancel("app-deleted");return this.N=[],this.h&&(n=this.h,iet(n.b,n.a,this.ha)),this.a&&this.a.unsubscribe(this),o.Promise.resolve()};n.Rb=function(n){return d(this,eft(this.c,n))};n.Fc=function(n){return this.Ia(n).then(function(n){return n.data.email})};n.Ta=function(n,t){return d(this,this.c.Ta(n,t).then(function(){}))};n.Ia=function(n){return d(this,this.c.Ia(n).then(function(n){return new tft(n)}))};n.Sa=function(n){return d(this,this.c.Sa(n).then(function(){}))};n.cb=function(n,t){var i=this;return d(this,e().then(function(){return void 0===t||ef(t)?{}:uk(new rk(t))}).then(function(t){return i.c.cb(n,t)}).then(function(){}))};n.vc=function(n,t){return d(this,la(this,n,t,f(this.fb,this)))};var ait="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),vit="callback",yit="expired-callback",pit="sitekey",vlt="size";n=fv.prototype;n.xa=function(){var n=this;return this.c?this.c:this.c=ev(this,e().then(function(){if(ns())return ul();throw new t("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.");}).then(function(){return rst(cn(),n.o())}).then(function(){return a(n.u,bct,{})}).then(function(t){n.a[pit]=t.recaptchaSiteKey}).s(function(t){throw n.c=null,t;}))};n.render=function(){ks(this);var n=this;return ev(this,this.xa().then(function(){var t,i;return null===n.b&&(t=n.l,n.h||(i=uo(t),t=vrt("DIV"),i.appendChild(t)),n.b=grecaptcha.render(t,n.a)),n.b}))};n.verify=function(){ks(this);var n=this;return ev(this,this.render().then(function(t){return new c(function(i){var u=grecaptcha.getResponse(t),r;u?i(u):(r=function(t){t&&(tst(n,r),i(t))},n.i.push(r),n.h&&grecaptcha.execute(n.b))})}))};n.reset=function(){ks(this);null!==this.b&&grecaptcha.reset(this.b)};n.clear=function(){var n,t;for(ks(this),this.m=!0,cn().b--,n=0;n<this.g.length;n++)this.g[n].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.h)for(n=uo(this.l);t=n.firstChild;)n.removeChild(t)};wit=sf("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}");vh=null;l(ov,fv);et(kt.prototype,{Sa:{name:"applyActionCode",j:[u("code")]},Ia:{name:"checkActionCode",j:[u("code")]},Ta:{name:"confirmPasswordReset",j:[u("code"),u("newPassword")]},Ob:{name:"createUserWithEmailAndPassword",j:[u("email"),u("password")]},qb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[u("email"),u("password")]},Rb:{name:"fetchProvidersForEmail",j:[u("email")]},aa:{name:"getRedirectResult",j:[]},hc:{name:"onAuthStateChanged",j:[ft(ut(),gu(),"nextOrObserver"),gu("opt_error",!0),gu("opt_completed",!0)]},ic:{name:"onIdTokenChanged",j:[ft(ut(),gu(),"nextOrObserver"),gu("opt_error",!0),gu("opt_completed",!0)]},cb:{name:"sendPasswordResetEmail",j:[u("email"),ft(ut("opt_actionCodeSettings",!0),pr(null,!0),"opt_actionCodeSettings",!0)]},eb:{name:"setPersistence",j:[u("persistence")]},fb:{name:"signInAndRetrieveDataWithCredential",j:[wr()]},gb:{name:"signInAnonymously",j:[]},Gb:{name:"signInAnonymouslyAndRetrieveData",j:[]},sc:{name:"signInWithCredential",j:[wr()]},tc:{name:"signInWithCustomToken",j:[u("token")]},Eb:{name:"signInAndRetrieveDataWithCustomToken",j:[u("token")]},uc:{name:"signInWithEmailAndPassword",j:[u("email"),u("password")]},Fb:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[u("email"),u("password")]},vc:{name:"signInWithPhoneNumber",j:[u("phoneNumber"),bs()]},wc:{name:"signInWithPopup",j:[nf()]},xc:{name:"signInWithRedirect",j:[nf()]},hb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[u(null,!0)]},Ec:{name:"useDeviceLanguage",j:[]},Fc:{name:"verifyPasswordResetCode",j:[u("code")]}}),function(n,t){var i,r,u;for(i in t)r=t[i].name,r!==i&&(u=t[i].Nb,Object.defineProperty(n,r,{get:function(){return this[i]},set:function(n){on(r,[u],[n],!0);this[i]=n},enumerable:!0}))}(kt.prototype,{lc:{name:"languageCode",Nb:ft(u(),pr(),"languageCode")}});kt.Persistence=rf;kt.Persistence.LOCAL="local";kt.Persistence.SESSION="session";kt.Persistence.NONE="none";et(bt.prototype,{"delete":{name:"delete",j:[]},F:{name:"getIdToken",j:[sn()]},getToken:{name:"getToken",j:[sn()]},Xa:{name:"linkAndRetrieveDataWithCredential",j:[wr()]},cc:{name:"linkWithCredential",j:[wr()]},dc:{name:"linkWithPhoneNumber",j:[u("phoneNumber"),bs()]},ec:{name:"linkWithPopup",j:[nf()]},fc:{name:"linkWithRedirect",j:[nf()]},Za:{name:"reauthenticateAndRetrieveDataWithCredential",j:[wr()]},mc:{name:"reauthenticateWithCredential",j:[wr()]},nc:{name:"reauthenticateWithPhoneNumber",j:[u("phoneNumber"),bs()]},oc:{name:"reauthenticateWithPopup",j:[nf()]},pc:{name:"reauthenticateWithRedirect",j:[nf()]},reload:{name:"reload",j:[]},bb:{name:"sendEmailVerification",j:[ft(ut("opt_actionCodeSettings",!0),pr(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[u(null,!0)]},Cc:{name:"unlink",j:[u("provider")]},kb:{name:"updateEmail",j:[u("email")]},lb:{name:"updatePassword",j:[u("password")]},Dc:{name:"updatePhoneNumber",j:[wr("phone")]},mb:{name:"updateProfile",j:[ut("profile")]}});et(c.prototype,{s:{name:"catch"},then:{name:"then"}});et(ca.prototype,{confirm:{name:"confirm",j:[u("verificationCode")]}});ot(pl,"credential",function(n,t){return new ne(n,t)},[u("email"),u("password")]);et(lu.prototype,{sa:{name:"addScope",j:[u("scope")]},Ba:{name:"setCustomParameters",j:[ut("customOAuthParameters")]}});ot(lu,"credential",ck,[ft(u(),ut(),"token")]);et(au.prototype,{sa:{name:"addScope",j:[u("scope")]},Ba:{name:"setCustomParameters",j:[ut("customOAuthParameters")]}});ot(au,"credential",lk,[ft(u(),ut(),"token")]);et(vu.prototype,{sa:{name:"addScope",j:[u("scope")]},Ba:{name:"setCustomParameters",j:[ut("customOAuthParameters")]}});ot(vu,"credential",ak,[ft(u(),ft(ut(),pr()),"idToken"),ft(u(),pr(),"accessToken",!0)]);et(gf.prototype,{Ba:{name:"setCustomParameters",j:[ut("customOAuthParameters")]}});ot(gf,"credential",vk,[ft(u(),ut(),"token"),u("secret",!0)]);et(ht.prototype,{sa:{name:"addScope",j:[u("scope")]},credential:{name:"credential",j:[ft(u(),pr(),"idToken",!0),ft(u(),pr(),"accessToken",!0)]},Ba:{name:"setCustomParameters",j:[ut("customOAuthParameters")]}});ot(ar,"credential",yk,[u("verificationId"),u("verificationCode")]);et(ar.prototype,{Qa:{name:"verifyPhoneNumber",j:[u("phoneNumber"),bs()]}});et(t.prototype,{toJSON:{name:"toJSON",j:[u(null,!0)]}});et(te.prototype,{toJSON:{name:"toJSON",j:[u(null,!0)]}});et(dl.prototype,{toJSON:{name:"toJSON",j:[u(null,!0)]}});et(ov.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if(void 0===o||!o.INTERNAL||!o.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var n={Auth:kt,Error:t};ot(n,"EmailAuthProvider",pl,[]);ot(n,"FacebookAuthProvider",lu,[]);ot(n,"GithubAuthProvider",au,[]);ot(n,"GoogleAuthProvider",vu,[]);ot(n,"TwitterAuthProvider",gf,[]);ot(n,"OAuthProvider",ht,[u("providerId")]);ot(n,"PhoneAuthProvider",ar,[got()]);ot(n,"RecaptchaVerifier",ov,[ft(u(),dot(),"recaptchaContainer"),ut("recaptchaParameters",!0),nst()]);o.INTERNAL.registerService("auth",function(n,t){return n=new kt(n),t({INTERNAL:{getUid:f(n.getUid,n),getToken:f(n.Vb,n),addAuthTokenListener:f(n.Mb,n),removeAuthTokenListener:f(n.qc,n)}}),n},n,function(n,t){if("create"===n)try{t.auth()}catch(n){}});o.INTERNAL.extendNamespace({User:bt})}()}).call(void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(t,i(12))}},[76])}catch(t){throw Error("Cannot instantiate firebase-auth.js - be sure to load firebase-app.js first.");}try{webpackJsonpFirebase([0],[,function(n,t,i){"use strict";var r,e;Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),s=i(0),h=i(0),c=i(0),l=i(0),u=i(0),f=i(13),a=i(0);t.LUIDGenerator=function(){var n=1;return function(){return n++}}();t.sha1=function(n){var r=l.stringToByteArray(n),t=new c.Sha1,i;return t.update(r),i=t.digest(),h.base64.encodeByteArray(i)};r=function(){for(var f,t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(f="",t=0;t<n.length;t++)f+=Array.isArray(n[t])||n[t]&&"object"==typeof n[t]&&"number"==typeof n[t].length?r.apply(null,n[t]):"object"==typeof n[t]?u.stringify(n[t]):n[t],f+=" ";return f};t.logger=null;e=!0;t.enableLogging=function(n,i){o.assert(!i||!0===n||!1===n,"Can't turn on custom loggers persistently.");!0===n?("undefined"!=typeof console&&("function"==typeof console.log?t.logger=console.log.bind(console):"object"==typeof console.log&&(t.logger=function(n){console.log(n)})),i&&f.SessionStorage.set("logging_enabled",!0)):"function"==typeof n?t.logger=n:(t.logger=null,f.SessionStorage.remove("logging_enabled"))};t.log=function(){for(var u,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];(!0===e&&(e=!1,null===t.logger&&!0===f.SessionStorage.get("logging_enabled")&&t.enableLogging(!0)),t.logger)&&(u=r.apply(null,i),t.logger(u))};t.logWrapper=function(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t.log.apply(void 0,[n].concat(r))}};t.error=function(){for(var i,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"undefined"!=typeof console&&(i="FIREBASE INTERNAL ERROR: "+r.apply(void 0,t),void 0!==console.error?console.error(i):console.log(i))};t.fatal=function(){for(var i,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];i=r.apply(void 0,t);throw Error("FIREBASE FATAL ERROR: "+i);};t.warn=function(){for(var i,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"undefined"!=typeof console&&(i="FIREBASE WARNING: "+r.apply(void 0,t),void 0!==console.warn?console.warn(i):console.log(i))};t.warnIfPageIsSecure=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&t.warn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")};t.warnAboutUnsupportedMethod=function(n){t.warn(n+" is unsupported and will likely change soon.  Please do not use.")};t.isInvalidJSONNumber=function(n){return"number"==typeof n&&(n!=n||n==Number.POSITIVE_INFINITY||n==Number.NEGATIVE_INFINITY)};t.executeWhenDOMReady=function(n){if(a.isNodeSdk()||"complete"===document.readyState)n();else{var i=!1,t=function(){if(!document.body)return void setTimeout(t,Math.floor(10));i||(i=!0,n())};document.addEventListener?(document.addEventListener("DOMContentLoaded",t,!1),window.addEventListener("load",t,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&t()}),window.attachEvent("onload",t))}};t.MIN_NAME="[MIN_NAME]";t.MAX_NAME="[MAX_NAME]";t.nameCompare=function(n,i){if(n===i)return 0;if(n===t.MIN_NAME||i===t.MAX_NAME)return-1;if(i===t.MIN_NAME||n===t.MAX_NAME)return 1;var u=t.tryParseInt(n),r=t.tryParseInt(i);return null!==u?null!==r?u-r==0?n.length-i.length:u-r:-1:null!==r?1:n<i?-1:1};t.stringCompare=function(n,t){return n===t?0:n<t?-1:1};t.requireKey=function(n,t){if(t&&n in t)return t[n];throw Error("Missing required key ("+n+") in object: "+u.stringify(t));};t.ObjectToUniqueKey=function(n){var i,e,r,f;if("object"!=typeof n||null===n)return u.stringify(n);i=[];for(e in n)i.push(e);for(i.sort(),r="{",f=0;f<i.length;f++)0!==f&&(r+=","),r+=u.stringify(i[f]),r+=":",r+=t.ObjectToUniqueKey(n[i[f]]);return r+"}"};t.splitStringBySize=function(n,t){var r=n.length,u,i;if(r<=t)return[n];for(u=[],i=0;i<r;i+=t)i+t>r?u.push(n.substring(i,r)):u.push(n.substring(i,i+t));return u};t.each=function(n,t){if(Array.isArray(n))for(var i=0;i<n.length;++i)t(i,n[i]);else s.forEach(n,function(n,i){return t(i,n)})};t.bindCallback=function(n,t){return t?n.bind(t):n};t.doubleToIEEE754String=function(n){var s,r,u,h,i,f,l,c,e;for(o.assert(!t.isInvalidJSONNumber(n),"Invalid JSON number"),0===n?(r=0,u=0,s=1/n==-1/0?1:0):(s=n<0,n=Math.abs(n),n>=Math.pow(2,-1022)?(h=Math.min(Math.floor(Math.log(n)/Math.LN2),1023),r=h+1023,u=Math.round(n*Math.pow(2,52-h)-Math.pow(2,52))):(r=0,u=Math.round(n/Math.pow(2,-1074)))),f=[],i=52;i;i-=1)f.push(u%2?1:0),u=Math.floor(u/2);for(i=11;i;i-=1)f.push(r%2?1:0),r=Math.floor(r/2);for(f.push(s?1:0),f.reverse(),l=f.join(""),c="",i=0;i<64;i+=8)e=parseInt(l.substr(i,8),2).toString(16),1===e.length&&(e="0"+e),c+=e;return c.toLowerCase()};t.isChromeExtensionContentScript=function(){return!("object"!=typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))};t.isWindowsStoreApp=function(){return"object"==typeof Windows&&"object"==typeof Windows.UI};t.errorForServerCode=function(n,t){var i="Unknown Error",r;return"too_big"===n?i="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==n?i="Client doesn't have permission to access the desired data.":"unavailable"==n&&(i="The service is unavailable"),r=Error(n+" at "+t.path+": "+i),r.code=n.toUpperCase(),r};t.e=RegExp("^-?\\d{1,10}$");t.tryParseInt=function(n){if(t.e.test(n)){var i=+n;if(i>=-2147483648&&i<=2147483647)return i}return null};t.exceptionGuard=function(n){try{n()}catch(n){setTimeout(function(){var i=n.stack||"";throw t.warn("Exception was thrown by user callback.",i),n;},Math.floor(0))}};t.callUserCallback=function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];"function"==typeof n&&t.exceptionGuard(function(){n.apply(void 0,r)})};t.beingCrawled=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0};t.exportPropGetter=function(n,t,i){Object.defineProperty(n,t,{get:i})};t.setTimeoutNonBlocking=function(n,t){var i=setTimeout(n,t);return"object"==typeof i&&i.unref&&i.unref(),i}},function(n,t,i){"use strict";var u;Object.defineProperty(t,"__esModule",{value:!0});var f=i(1),r=i(0),e=function(){function n(n,t){if(void 0===t){this.n=n.split("/");for(var r=0,i=0;i<this.n.length;i++)this.n[i].length>0&&(this.n[r]=this.n[i],r++);this.n.length=r;this.i=0}else this.n=n,this.i=t}return Object.defineProperty(n,"Empty",{get:function(){return new n("")},enumerable:!0,configurable:!0}),n.prototype.getFront=function(){return this.i>=this.n.length?null:this.n[this.i]},n.prototype.getLength=function(){return this.n.length-this.i},n.prototype.popFront=function(){var t=this.i;return t<this.n.length&&t++,new n(this.n,t)},n.prototype.getBack=function(){return this.i<this.n.length?this.n[this.n.length-1]:null},n.prototype.toString=function(){for(var t="",n=this.i;n<this.n.length;n++)""!==this.n[n]&&(t+="/"+this.n[n]);return t||"/"},n.prototype.toUrlEncodedString=function(){for(var t="",n=this.i;n<this.n.length;n++)""!==this.n[n]&&(t+="/"+encodeURIComponent(this.n[n]+""));return t||"/"},n.prototype.slice=function(n){return void 0===n&&(n=0),this.n.slice(this.i+n)},n.prototype.parent=function(){if(this.i>=this.n.length)return null;for(var i=[],t=this.i;t<this.n.length-1;t++)i.push(this.n[t]);return new n(i,0)},n.prototype.child=function(t){for(var u,r=[],i=this.i;i<this.n.length;i++)r.push(this.n[i]);if(t instanceof n)for(i=t.i;i<t.n.length;i++)r.push(t.n[i]);else for(u=t.split("/"),i=0;i<u.length;i++)u[i].length>0&&r.push(u[i]);return new n(r,0)},n.prototype.isEmpty=function(){return this.i>=this.n.length},n.relativePath=function(t,i){var r=t.getFront(),u=i.getFront();if(null===r)return i;if(r===u)return n.relativePath(t.popFront(),i.popFront());throw Error("INTERNAL ERROR: innerPath ("+i+") is not within outerPath ("+t+")");},n.comparePaths=function(n,t){for(var e,r=n.slice(),u=t.slice(),i=0;i<r.length&&i<u.length;i++)if(e=f.nameCompare(r[i],u[i]),0!==e)return e;return r.length===u.length?0:r.length<u.length?-1:1},n.prototype.equals=function(n){if(this.getLength()!==n.getLength())return!1;for(var t=this.i,i=n.i;t<=this.n.length;t++,i++)if(this.n[t]!==n.n[i])return!1;return!0},n.prototype.contains=function(n){var t=this.i,i=n.i;if(this.getLength()>n.getLength())return!1;for(;t<this.n.length;){if(this.n[t]!==n.n[i])return!1;++t;++i}return!0},n}();t.Path=e;u=function(){function n(n,t){this.o=t;this.u=n.slice();this.l=Math.max(1,this.u.length);for(var i=0;i<this.u.length;i++)this.l+=r.stringLength(this.u[i]);this.f()}return Object.defineProperty(n,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(n,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),n.prototype.push=function(n){this.u.length>0&&(this.l+=1);this.u.push(n);this.l+=r.stringLength(n);this.f()},n.prototype.pop=function(){var n=this.u.pop();this.l-=r.stringLength(n);this.u.length>0&&(this.l-=1)},n.prototype.f=function(){if(this.l>n.MAX_PATH_LENGTH_BYTES)throw Error(this.o+"has a key path longer than "+n.MAX_PATH_LENGTH_BYTES+" bytes ("+this.l+").");if(this.u.length>n.MAX_PATH_DEPTH)throw Error(this.o+"path specified exceeds the maximum depth that can be written ("+n.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString());},n.prototype.toErrorString=function(){return 0==this.u.length?"":"in property '"+this.u.join(".")+"'"},n}();t.ValidationPath=u},function(n,t,i){"use strict";function h(n){f=n}function c(n){e=n}var l=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u;Object.defineProperty(t,"__esModule",{value:!0});var f,e,a=i(15),o=i(1),r=i(5),s=i(16);t.setNodeFromJSON=h;t.setMaxNode=c;u=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return l(t,n),t.prototype.compare=function(n,t){var r=n.node.getPriority(),u=t.node.getPriority(),i=r.compareTo(u);return 0===i?o.nameCompare(n.name,t.name):i},t.prototype.isDefinedOn=function(n){return!n.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(n,t){return!n.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return r.NamedNode.MIN},t.prototype.maxPost=function(){return new r.NamedNode(o.MAX_NAME,new s.LeafNode("[PRIORITY-POST]",e))},t.prototype.makePost=function(n,t){var i=f(n);return new r.NamedNode(t,new s.LeafNode("[PRIORITY-POST]",i))},t.prototype.toString=function(){return".priority"},t}(a.Index);t.PriorityIndex=u;t.PRIORITY_INDEX=new u},function(n,t,i){"use strict";var p=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l;Object.defineProperty(t,"__esModule",{value:!0});var f,s=i(0),h=i(1),a=i(17),r=i(5),c=i(37),e=i(3),o=i(10),v=i(39),w=i(16),y=i(41),u=function(){function n(n,t,i){this._=n;this.y=t;this.g=i;this.m=null;this.y&&c.validatePriorityNode(this.y);this._.isEmpty()&&s.assert(!this.y||this.y.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(n,"EMPTY_NODE",{get:function(){return f||(f=new n(new a.SortedMap(y.NAME_COMPARATOR),null,v.IndexMap.Default))},enumerable:!0,configurable:!0}),n.prototype.isLeafNode=function(){return!1},n.prototype.getPriority=function(){return this.y||f},n.prototype.updatePriority=function(t){return this._.isEmpty()?this:new n(this._,t,this.g)},n.prototype.getImmediateChild=function(n){if(".priority"===n)return this.getPriority();var t=this._.get(n);return null===t?f:t},n.prototype.getChild=function(n){var t=n.getFront();return null===t?this:this.getImmediateChild(t).getChild(n.popFront())},n.prototype.hasChild=function(n){return null!==this._.get(n)},n.prototype.updateImmediateChild=function(t,i){if(s.assert(i,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(i);var o=new r.NamedNode(t,i),u=void 0,e=void 0,h=void 0;return i.isEmpty()?(u=this._.remove(t),e=this.g.removeFromIndexes(o,this._)):(u=this._.insert(t,i),e=this.g.addToIndexes(o,this._)),h=u.isEmpty()?f:this.y,new n(u,h,e)},n.prototype.updateChild=function(n,t){var i=n.getFront(),r;return null===i?t:(s.assert(".priority"!==n.getFront()||1===n.getLength(),".priority must be the last token in a path"),r=this.getImmediateChild(i).updateChild(n.popFront(),t),this.updateImmediateChild(i,r))},n.prototype.isEmpty=function(){return this._.isEmpty()},n.prototype.numChildren=function(){return this._.count()},n.prototype.val=function(t){var f,o;if(this.isEmpty())return null;var i={},s=0,r=0,u=!0;if(this.forEachChild(e.PRIORITY_INDEX,function(f,e){i[f]=e.val(t);s++;u&&n.e.test(f)?r=Math.max(r,+f):u=!1}),!t&&u&&r<2*s){f=[];for(o in i)f[o]=i[o];return f}return t&&!this.getPriority().isEmpty()&&(i[".priority"]=this.getPriority().val()),i},n.prototype.hash=function(){if(null===this.m){var n="";this.getPriority().isEmpty()||(n+="priority:"+c.priorityHashText(this.getPriority().val())+":");this.forEachChild(e.PRIORITY_INDEX,function(t,i){var r=i.hash();""!==r&&(n+=":"+t+":"+r)});this.m=""===n?"":h.sha1(n)}return this.m},n.prototype.getPredecessorChildName=function(n,t,i){var f=this.C(i),u;return f?(u=f.getPredecessorKey(new r.NamedNode(n,t)),u?u.name:null):this._.getPredecessorKey(n)},n.prototype.getFirstChildName=function(n){var i=this.C(n),t;return i?(t=i.minKey(),t&&t.name):this._.minKey()},n.prototype.getFirstChild=function(n){var t=this.getFirstChildName(n);return t?new r.NamedNode(t,this._.get(t)):null},n.prototype.getLastChildName=function(n){var i=this.C(n),t;return i?(t=i.maxKey(),t&&t.name):this._.maxKey()},n.prototype.getLastChild=function(n){var t=this.getLastChildName(n);return t?new r.NamedNode(t,this._.get(t)):null},n.prototype.forEachChild=function(n,t){var i=this.C(n);return i?i.inorderTraversal(function(n){return t(n.name,n.node)}):this._.inorderTraversal(t)},n.prototype.getIterator=function(n){return this.getIteratorFrom(n.minPost(),n)},n.prototype.getIteratorFrom=function(n,t){var f=this.C(t),i,u;if(f)return f.getIteratorFrom(n,function(n){return n});for(i=this._.getIteratorFrom(n.name,r.NamedNode.Wrap),u=i.peek();null!=u&&t.compare(u,n)<0;)i.getNext(),u=i.peek();return i},n.prototype.getReverseIterator=function(n){return this.getReverseIteratorFrom(n.maxPost(),n)},n.prototype.getReverseIteratorFrom=function(n,t){var f=this.C(t),i,u;if(f)return f.getReverseIteratorFrom(n,function(n){return n});for(i=this._.getReverseIteratorFrom(n.name,r.NamedNode.Wrap),u=i.peek();null!=u&&t.compare(u,n)>0;)i.getNext(),u=i.peek();return i},n.prototype.compareTo=function(n){return this.isEmpty()?n.isEmpty()?0:-1:n.isLeafNode()||n.isEmpty()?1:n===t.MAX_NODE?-1:0},n.prototype.withIndex=function(t){if(t===o.KEY_INDEX||this.g.hasIndex(t))return this;var i=this.g.addIndex(t,this._);return new n(this._,this.y,i)},n.prototype.isIndexed=function(n){return n===o.KEY_INDEX||this.g.hasIndex(n)},n.prototype.equals=function(n){var r;if(n===this)return!0;if(n.isLeafNode())return!1;if(r=n,this.getPriority().equals(r.getPriority())){if(this._.count()===r._.count()){for(var u=this.getIterator(e.PRIORITY_INDEX),f=r.getIterator(e.PRIORITY_INDEX),t=u.getNext(),i=f.getNext();t&&i;){if(t.name!==i.name||!t.node.equals(i.node))return!1;t=u.getNext();i=f.getNext()}return null===t&&null===i}return!1}return!1},n.prototype.C=function(n){return n===o.KEY_INDEX?null:this.g.get(""+n)},n.e=/^(0|[1-9]\d*)$/,n}();t.ChildrenNode=u;l=function(n){function t(){return n.call(this,new a.SortedMap(y.NAME_COMPARATOR),u.EMPTY_NODE,v.IndexMap.Default)||this}return p(t,n),t.prototype.compareTo=function(n){return n===this?0:1},t.prototype.equals=function(n){return n===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(){return u.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(u);t.MaxNode=l;t.MAX_NODE=new l;Object.defineProperties(r.NamedNode,{MIN:{value:new r.NamedNode(h.MIN_NAME,u.EMPTY_NODE)},MAX:{value:new r.NamedNode(h.MAX_NAME,t.MAX_NODE)}});o.KeyIndex.__EMPTY_NODE=u.EMPTY_NODE;w.LeafNode.__childrenNodeConstructor=u;c.setMaxNode(t.MAX_NODE);e.setMaxNode(t.MAX_NODE)},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n,t){this.name=n;this.node=t}return n.Wrap=function(t,i){return new n(t,i)},n}();t.NamedNode=i},,function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(2),u=i(0),e=i(1),r=i(0),o=i(0);t.N=/[\[\].#$\/\u0000-\u001F\u007F]/;t.P=/[\[\].#$\u0000-\u001F\u007F]/;t.S=10485760;t.isValidKey=function(n){return"string"==typeof n&&0!==n.length&&!t.N.test(n)};t.isValidPathString=function(n){return"string"==typeof n&&0!==n.length&&!t.P.test(n)};t.isValidRootPathString=function(n){return n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),t.isValidPathString(n)};t.isValidPriority=function(n){return null===n||"string"==typeof n||"number"==typeof n&&!e.isInvalidJSONNumber(n)||n&&"object"==typeof n&&u.contains(n,".sv")};t.validateFirebaseDataArg=function(n,i,u,f,e){e&&void 0===u||t.validateFirebaseData(r.errorPrefix(n,i,e),u,f)};t.validateFirebaseData=function(n,i,r){var s=r instanceof f.Path?new f.ValidationPath(r,n):r,h,c;if(void 0===i)throw Error(n+"contains undefined "+s.toErrorString());if("function"==typeof i)throw Error(n+"contains a function "+s.toErrorString()+" with contents = "+i);if(e.isInvalidJSONNumber(i))throw Error(n+"contains "+i+" "+s.toErrorString());if("string"==typeof i&&i.length>t.S/3&&o.stringLength(i)>t.S)throw Error(n+"contains a string greater than "+t.S+" utf8 bytes "+s.toErrorString()+" ('"+i.substring(0,50)+"...')");if(i&&"object"==typeof i&&(h=!1,c=!1,u.forEach(i,function(i,r){if(".value"===i)h=!0;else if(".priority"!==i&&".sv"!==i&&(c=!0,!t.isValidKey(i)))throw Error(n+" contains an invalid key ("+i+") "+s.toErrorString()+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');s.push(i);t.validateFirebaseData(n,r,s);s.pop()}),h&&c))throw Error(n+' contains ".value" child '+s.toErrorString()+" in addition to actual children.");};t.validateFirebaseMergePaths=function(n,i){for(var u,o,e,s,r=0;r<i.length;r++)for(u=i[r],o=u.slice(),e=0;e<o.length;e++)if((".priority"!==o[e]||e!==o.length-1)&&!t.isValidKey(o[e]))throw Error(n+"contains an invalid key ("+o[e]+") in path "+u+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');for(i.sort(f.Path.comparePaths),s=null,r=0;r<i.length;r++){if(u=i[r],null!==s&&s.contains(u))throw Error(n+"contains a path "+s+" that is ancestor of another path "+u);s=u}};t.validateFirebaseMergeDataArg=function(n,i,e,o,s){var h,c;if(!s||void 0!==e){if(h=r.errorPrefix(n,i,s),!e||"object"!=typeof e||Array.isArray(e))throw Error(h+" must be an object containing the children to replace.");c=[];u.forEach(e,function(n,i){var r=new f.Path(n);if(t.validateFirebaseData(h,i,o.child(r)),".priority"===r.getBack()&&!t.isValidPriority(i))throw Error(h+"contains an invalid value for '"+r+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");c.push(r)});t.validateFirebaseMergePaths(h,c)}};t.validatePriority=function(n,i,u,f){if(!f||void 0!==u){if(e.isInvalidJSONNumber(u))throw Error(r.errorPrefix(n,i,f)+"is "+u+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!t.isValidPriority(u))throw Error(r.errorPrefix(n,i,f)+"must be a valid Firebase priority (a string, finite number, server value, or null).");}};t.validateEventType=function(n,t,i,u){if(!u||void 0!==i)switch(i){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw Error(r.errorPrefix(n,t,u)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".');}};t.validateKey=function(n,i,u,f){if(!(f&&void 0===u||t.isValidKey(u)))throw Error(r.errorPrefix(n,i,f)+'was an invalid key = "'+u+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").');};t.validatePathString=function(n,i,u,f){if(!(f&&void 0===u||t.isValidPathString(u)))throw Error(r.errorPrefix(n,i,f)+'was an invalid path = "'+u+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"');};t.validateRootPathString=function(n,i,r,u){r&&(r=r.replace(/^\/*\.info(\/|$)/,"/"));t.validatePathString(n,i,r,u)};t.validateWritablePath=function(n,t){if(".info"===t.getFront())throw Error(n+" failed = Can't modify data under /.info/");};t.validateUrl=function(n,i,u){var f=""+u.path;if("string"!=typeof u.repoInfo.host||0===u.repoInfo.host.length||!t.isValidKey(u.repoInfo.namespace)&&"localhost"!==u.repoInfo.host.split(":")[0]||0!==f.length&&!t.isValidRootPathString(f))throw Error(r.errorPrefix(n,i,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');};t.validateCredential=function(n,t,i,u){if((!u||void 0!==i)&&"string"!=typeof i)throw Error(r.errorPrefix(n,t,u)+"must be a valid credential (a string).");};t.validateBoolean=function(n,t,i,u){if((!u||void 0!==i)&&"boolean"!=typeof i)throw Error(r.errorPrefix(n,t,u)+"must be a boolean.");};t.validateString=function(n,t,i,u){if((!u||void 0!==i)&&"string"!=typeof i)throw Error(r.errorPrefix(n,t,u)+"must be a valid string.");};t.validateObject=function(n,t,i,u){if(!(u&&void 0===i||i&&"object"==typeof i&&null!==i))throw Error(r.errorPrefix(n,t,u)+"must be a valid object.");};t.validateObjectContainsKey=function(n,t,i,f,e,o){if(!i||"object"!=typeof i||!u.contains(i,f)){if(e)return;throw Error(r.errorPrefix(n,t,e)+'must contain the key "'+f+'"');}if(o){var s=u.safeGet(i,f);if("number"===o&&"number"!=typeof s||"string"===o&&"string"!=typeof s||"boolean"===o&&"boolean"!=typeof s||"function"===o&&"function"!=typeof s||"object"===o&&"object"!=typeof s&&s)throw e?Error(r.errorPrefix(n,t,e)+'contains invalid value for key "'+f+'" (must be of type "'+o+'")'):Error(r.errorPrefix(n,t,e)+'must contain the key "'+f+'" with type "'+o+'"');}}},function(n,t,i){"use strict";var r,u;Object.defineProperty(t,"__esModule",{value:!0});r=i(0);!function(n){n[n.OVERWRITE=0]="OVERWRITE";n[n.MERGE=1]="MERGE";n[n.ACK_USER_WRITE=2]="ACK_USER_WRITE";n[n.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(t.OperationType||(t.OperationType={}));u=function(){function n(n,t,i,u){this.fromUser=n;this.fromServer=t;this.queryId=i;this.tagged=u;r.assert(!u||t,"Tagged queries must be from server.")}return n.User=new n(!0,!1,null,!1),n.Server=new n(!1,!0,null,!1),n.forServerTaggedQuery=function(t){return new n(!1,!0,t,!0)},n}();t.OperationSource=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n,t,i,r,u){this.type=n;this.snapshotNode=t;this.childName=i;this.oldSnap=r;this.prevName=u}return n.valueChange=function(t){return new n(n.VALUE,t)},n.childAddedChange=function(t,i){return new n(n.CHILD_ADDED,i,t)},n.childRemovedChange=function(t,i){return new n(n.CHILD_REMOVED,i,t)},n.childChangedChange=function(t,i,r){return new n(n.CHILD_CHANGED,i,t,r)},n.childMovedChange=function(t,i){return new n(n.CHILD_MOVED,i,t)},n.CHILD_ADDED="child_added",n.CHILD_REMOVED="child_removed",n.CHILD_CHANGED="child_changed",n.CHILD_MOVED="child_moved",n.VALUE="value",n}();t.Change=i},function(n,t,i){"use strict";var s=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var r,h=i(15),u=i(5),f=i(1),e=i(0),o=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return s(t,n),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return r},set:function(n){r=n},enumerable:!0,configurable:!0}),t.prototype.compare=function(n,t){return f.nameCompare(n.name,t.name)},t.prototype.isDefinedOn=function(){throw e.assertionError("KeyIndex.isDefinedOn not expected to be called.");},t.prototype.indexedValueChanged=function(){return!1},t.prototype.minPost=function(){return u.NamedNode.MIN},t.prototype.maxPost=function(){return new u.NamedNode(f.MAX_NAME,r)},t.prototype.makePost=function(n){return e.assert("string"==typeof n,"KeyIndex indexValue must always be a string."),new u.NamedNode(n,r)},t.prototype.toString=function(){return".key"},t}(h.Index);t.KeyIndex=o;t.KEY_INDEX=new o},function(n,t,i){"use strict";function r(n,t){var k,i,p,b,g;if(void 0===t&&(t=null),null===n)return u.ChildrenNode.EMPTY_NODE;if("object"==typeof n&&".priority"in n&&(t=n[".priority"]),a.assert(null===t||"string"==typeof t||"number"==typeof t||"object"==typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"==typeof n&&".value"in n&&null!==n[".value"]&&(n=n[".value"]),"object"!=typeof n||".sv"in n)return k=n,new c.LeafNode(k,r(t));if(n instanceof Array||!v)return i=u.ChildrenNode.EMPTY_NODE,p=n,f.forEach(p,function(n,t){if(f.contains(p,n)&&"."!==n.substring(0,1)){var u=r(t);!u.isLeafNode()&&u.isEmpty()||(i=i.updateImmediateChild(n,u))}}),i.updatePriority(r(t));var y=[],w=!1,d=n;return(f.forEach(d,function(n){if("string"!=typeof n||"."!==n.substring(0,1)){var t=r(d[n]);t.isEmpty()||(w=w||!t.getPriority().isEmpty(),y.push(new l.NamedNode(n,t)))}}),0==y.length)?u.ChildrenNode.EMPTY_NODE:(b=o.buildChildSet(y,s.NAME_ONLY_COMPARATOR,function(n){return n.name},s.NAME_COMPARATOR),w)?(g=o.buildChildSet(y,e.PRIORITY_INDEX.getCompare()),new u.ChildrenNode(b,r(t),new h.IndexMap({".priority":g},{".priority":e.PRIORITY_INDEX}))):new u.ChildrenNode(b,r(t),h.IndexMap.Default)}Object.defineProperty(t,"__esModule",{value:!0});var u=i(4),c=i(16),l=i(5),f=i(0),a=i(0),o=i(40),s=i(41),h=i(39),e=i(3),v=!0;t.nodeFromJSON=r;e.setNodeFromJSON(r)},,function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(80),f=i(81),r=function(n){try{if("undefined"!=typeof window&&void 0!==window[n]){var t=window[n];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new u.DOMStorageWrapper(t)}}catch(n){}return new f.MemoryStorage};t.PersistentStorage=r("localStorage");t.SessionStorage=r("sessionStorage")},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PROTOCOL_VERSION="5";t.VERSION_PARAM="v";t.TRANSPORT_SESSION_PARAM="s";t.REFERER_PARAM="r";t.FORGE_REF="f";t.FORGE_DOMAIN="firebaseio.com";t.LAST_SESSION_PARAM="ls";t.WEBSOCKET="websocket";t.LONG_POLLING="long_polling"},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(5),u=i(1),f=function(){function n(){}return n.prototype.getCompare=function(){return this.compare.bind(this)},n.prototype.indexedValueChanged=function(n,t){var i=new r.NamedNode(u.MIN_NAME,n),f=new r.NamedNode(u.MIN_NAME,t);return 0!==this.compare(i,f)},n.prototype.minPost=function(){return r.NamedNode.MIN},n}();t.Index=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u,r=i(0),f=i(1),e=i(37),o=function(){function n(t,i){void 0===i&&(i=n.__childrenNodeConstructor.EMPTY_NODE);this.T=t;this.y=i;this.m=null;r.assert(void 0!==this.T&&null!==this.T,"LeafNode shouldn't be created with null/undefined value.");e.validatePriorityNode(this.y)}return Object.defineProperty(n,"__childrenNodeConstructor",{get:function(){return u},set:function(n){u=n},enumerable:!0,configurable:!0}),n.prototype.isLeafNode=function(){return!0},n.prototype.getPriority=function(){return this.y},n.prototype.updatePriority=function(t){return new n(this.T,t)},n.prototype.getImmediateChild=function(t){return".priority"===t?this.y:n.__childrenNodeConstructor.EMPTY_NODE},n.prototype.getChild=function(t){return t.isEmpty()?this:".priority"===t.getFront()?this.y:n.__childrenNodeConstructor.EMPTY_NODE},n.prototype.hasChild=function(){return!1},n.prototype.getPredecessorChildName=function(){return null},n.prototype.updateImmediateChild=function(t,i){return".priority"===t?this.updatePriority(i):i.isEmpty()&&".priority"!==t?this:n.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,i).updatePriority(this.y)},n.prototype.updateChild=function(t,i){var u=t.getFront();return null===u?i:i.isEmpty()&&".priority"!==u?this:(r.assert(".priority"!==u||1===t.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(u,n.__childrenNodeConstructor.EMPTY_NODE.updateChild(t.popFront(),i)))},n.prototype.isEmpty=function(){return!1},n.prototype.numChildren=function(){return 0},n.prototype.forEachChild=function(){return!1},n.prototype.val=function(n){return n&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},n.prototype.hash=function(){var n,t;return null===this.m&&(n="",this.y.isEmpty()||(n+="priority:"+e.priorityHashText(this.y.val())+":"),t=typeof this.T,n+=t+":",n+="number"===t?f.doubleToIEEE754String(this.T):this.T,this.m=f.sha1(n)),this.m},n.prototype.getValue=function(){return this.T},n.prototype.compareTo=function(t){return t===n.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof n.__childrenNodeConstructor?-1:(r.assert(t.isLeafNode(),"Unknown node type"),this.w(t))},n.prototype.w=function(t){var e=typeof t.T,i=typeof this.T,u=n.VALUE_TYPE_ORDER.indexOf(e),f=n.VALUE_TYPE_ORDER.indexOf(i);return r.assert(u>=0,"Unknown leaf type: "+e),r.assert(f>=0,"Unknown leaf type: "+i),u===f?"object"===i?0:this.T<t.T?-1:this.T===t.T?0:1:f-u},n.prototype.withIndex=function(){return this},n.prototype.isIndexed=function(){return!0},n.prototype.equals=function(n){if(n===this)return!0;if(n.isLeafNode()){var t=n;return this.T===t.T&&this.y.equals(t.y)}return!1},n.VALUE_TYPE_ORDER=["object","boolean","number","string"],n}();t.LeafNode=o},function(n,t){"use strict";var i,u,f,r;Object.defineProperty(t,"__esModule",{value:!0});i=function(){function n(n,t,i,r,u){void 0===u&&(u=null);this.I=r;this.R=u;this.O=[];for(var f=1;!n.isEmpty();)if(n=n,f=t?i(n.key,t):1,r&&(f*=-1),f<0)n=this.I?n.left:n.right;else{if(0===f){this.O.push(n);break}this.O.push(n);n=this.I?n.right:n.left}}return n.prototype.getNext=function(){if(0===this.O.length)return null;var t,n=this.O.pop();if(t=this.R?this.R(n.key,n.value):{key:n.key,value:n.value},this.I)for(n=n.left;!n.isEmpty();)this.O.push(n),n=n.right;else for(n=n.right;!n.isEmpty();)this.O.push(n),n=n.left;return t},n.prototype.hasNext=function(){return this.O.length>0},n.prototype.peek=function(){if(0===this.O.length)return null;var n=this.O[this.O.length-1];return this.R?this.R(n.key,n.value):{key:n.key,value:n.value}},n}();t.SortedMapIterator=i;u=function(){function n(t,i,u,f,e){this.key=t;this.value=i;this.color=null!=u?u:n.RED;this.left=null!=f?f:r.EMPTY_NODE;this.right=null!=e?e:r.EMPTY_NODE}return n.prototype.copy=function(t,i,r,u,f){return new n(null!=t?t:this.key,null!=i?i:this.value,null!=r?r:this.color,null!=u?u:this.left,null!=f?f:this.right)},n.prototype.count=function(){return this.left.count()+1+this.right.count()},n.prototype.isEmpty=function(){return!1},n.prototype.inorderTraversal=function(n){return this.left.inorderTraversal(n)||n(this.key,this.value)||this.right.inorderTraversal(n)},n.prototype.reverseTraversal=function(n){return this.right.reverseTraversal(n)||n(this.key,this.value)||this.left.reverseTraversal(n)},n.prototype.A=function(){return this.left.isEmpty()?this:this.left.A()},n.prototype.minKey=function(){return this.A().key},n.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},n.prototype.insert=function(n,t,i){var u,r;return r=this,u=i(n,r.key),r=u<0?r.copy(null,null,null,r.left.insert(n,t,i),null):0===u?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(n,t,i)),r.D()},n.prototype.M=function(){if(this.left.isEmpty())return r.EMPTY_NODE;var n=this;return n.left.L()||n.left.left.L()||(n=n.F()),n=n.copy(null,null,null,n.left.M(),null),n.D()},n.prototype.remove=function(n,t){var i,u;if(i=this,t(n,i.key)<0)i.left.isEmpty()||i.left.L()||i.left.left.L()||(i=i.F()),i=i.copy(null,null,null,i.left.remove(n,t),null);else{if(i.left.L()&&(i=i.x()),i.right.isEmpty()||i.right.L()||i.right.left.L()||(i=i.k()),0===t(n,i.key)){if(i.right.isEmpty())return r.EMPTY_NODE;u=i.right.A();i=i.copy(u.key,u.value,null,null,i.right.M())}i=i.copy(null,null,null,null,i.right.remove(n,t))}return i.D()},n.prototype.L=function(){return this.color},n.prototype.D=function(){var n=this;return n.right.L()&&!n.left.L()&&(n=n.W()),n.left.L()&&n.left.left.L()&&(n=n.x()),n.left.L()&&n.right.L()&&(n=n.j()),n},n.prototype.F=function(){var n=this.j();return n.right.left.L()&&(n=n.copy(null,null,null,null,n.right.x()),n=n.W(),n=n.j()),n},n.prototype.k=function(){var n=this.j();return n.left.left.L()&&(n=n.x(),n=n.j()),n},n.prototype.W=function(){var t=this.copy(null,null,n.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},n.prototype.x=function(){var t=this.copy(null,null,n.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},n.prototype.j=function(){var n=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,n,t)},n.prototype.V=function(){var n=this.Q();return Math.pow(2,n)<=this.count()+1},n.prototype.Q=function(){var n;if(this.L()&&this.left.L())throw Error("Red node has red child("+this.key+","+this.value+")");if(this.right.L())throw Error("Right child of ("+this.key+","+this.value+") is red");if((n=this.left.Q())!==this.right.Q())throw Error("Black depths differ");return n+(this.L()?0:1)},n.RED=!0,n.BLACK=!1,n}();t.LLRBNode=u;f=function(){function n(){}return n.prototype.copy=function(){return this},n.prototype.insert=function(n,t){return new u(n,t,null)},n.prototype.remove=function(){return this},n.prototype.count=function(){return 0},n.prototype.isEmpty=function(){return!0},n.prototype.inorderTraversal=function(){return!1},n.prototype.reverseTraversal=function(){return!1},n.prototype.minKey=function(){return null},n.prototype.maxKey=function(){return null},n.prototype.Q=function(){return 0},n.prototype.L=function(){return!1},n}();t.LLRBEmptyNode=f;r=function(){function n(t,i){void 0===i&&(i=n.EMPTY_NODE);this.U=t;this.B=i}return n.prototype.insert=function(t,i){return new n(this.U,this.B.insert(t,i,this.U).copy(null,null,u.BLACK,null,null))},n.prototype.remove=function(t){return new n(this.U,this.B.remove(t,this.U).copy(null,null,u.BLACK,null,null))},n.prototype.get=function(n){for(var i,t=this.B;!t.isEmpty();){if(0===(i=this.U(n,t.key)))return t.value;i<0?t=t.left:i>0&&(t=t.right)}return null},n.prototype.getPredecessorKey=function(n){for(var i,t=this.B,r=null;!t.isEmpty();){if(0===(i=this.U(n,t.key))){if(t.left.isEmpty())return r?r.key:null;for(t=t.left;!t.right.isEmpty();)t=t.right;return t.key}i<0?t=t.left:i>0&&(r=t,t=t.right)}throw Error("Attempted to find predecessor key for a nonexistent key.  What gives?");},n.prototype.isEmpty=function(){return this.B.isEmpty()},n.prototype.count=function(){return this.B.count()},n.prototype.minKey=function(){return this.B.minKey()},n.prototype.maxKey=function(){return this.B.maxKey()},n.prototype.inorderTraversal=function(n){return this.B.inorderTraversal(n)},n.prototype.reverseTraversal=function(n){return this.B.reverseTraversal(n)},n.prototype.getIterator=function(n){return new i(this.B,null,this.U,!1,n)},n.prototype.getIteratorFrom=function(n,t){return new i(this.B,n,this.U,!1,t)},n.prototype.getReverseIteratorFrom=function(n,t){return new i(this.B,n,this.U,!0,t)},n.prototype.getReverseIterator=function(n){return new i(this.B,null,this.U,!0,n)},n.EMPTY_NODE=new f,n}();t.SortedMap=r},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(43),r=i(11),e=i(2),s=i(44),h=i(86),l=i(97),a=i(0),u=i(1),f=i(0),v=i(98),c=i(25),y=i(100),p=i(49),w=i(101),b=i(50),k=i(106),d=i(32),g=function(){function n(n,t,i){var r=this,e,f;if(this.H=n,this.app=i,this.dataUpdateCount=0,this.G=null,this.K=new w.EventQueue,this.Y=1,this.X=null,this.z=new s.SparseSnapshotTree,this.J=null,e=new v.AuthTokenProvider(i),this.$=c.StatsManager.getCollection(n),t||u.beingCrawled())this.Z=new k.ReadonlyRestClient(this.H,this.ee.bind(this),e),setTimeout(this.te.bind(this,!0),0);else{if(f=i.options.databaseAuthVariableOverride,void 0!==f&&null!==f){if("object"!=typeof f)throw Error("Only objects are supported for option databaseAuthVariableOverride");try{a.stringify(f)}catch(n){throw Error("Invalid authOverride provided: "+n);}}this.J=new b.PersistentConnection(this.H,this.ee.bind(this),this.te.bind(this),this.ne.bind(this),e,f);this.Z=this.J}e.addTokenChangeListener(function(n){r.Z.refreshAuthToken(n)});this.re=c.StatsManager.getOrCreateReporter(n,function(){return new y.StatsReporter(r.$,r.Z)});this.ie();this.oe=new l.SnapshotHolder;this.ae=new h.SyncTree({startListening:function(n,t,i,u){var f=[],e=r.oe.getNode(n.path);return e.isEmpty()||(f=r.ae.applyServerOverwrite(n.path,e),setTimeout(function(){u("ok")},0)),f},stopListening:function(){}});this.se("connected",!1);this.ue=new h.SyncTree({startListening:function(n,t,i,u){return r.Z.listen(n,i,t,function(t,i){var f=u(t,i);r.K.raiseEventsForChangedPath(n.path,f)}),[]},stopListening:function(n,t){r.Z.unlisten(n,t)}})}return n.prototype.toString=function(){return(this.H.secure?"https://":"http://")+this.H.host},n.prototype.name=function(){return this.H.namespace},n.prototype.serverTime=function(){var n=this.oe.getNode(new e.Path(".info/serverTimeOffset")),t=n.val()||0;return(new Date).getTime()+t},n.prototype.generateServerValues=function(){return o.generateWithValues({timestamp:this.serverTime()})},n.prototype.ee=function(n,t,i,u){var o,s,c,l,a,v,h;this.dataUpdateCount++;o=new e.Path(n);t=this.X?this.X(n,t):t;s=[];u?i?(c=f.map(t,function(n){return r.nodeFromJSON(n)}),s=this.ue.applyTaggedQueryMerge(o,c,u)):(l=r.nodeFromJSON(t),s=this.ue.applyTaggedQueryOverwrite(o,l,u)):i?(a=f.map(t,function(n){return r.nodeFromJSON(n)}),s=this.ue.applyServerMerge(o,a)):(v=r.nodeFromJSON(t),s=this.ue.applyServerOverwrite(o,v));h=o;s.length>0&&(h=this.le(o));this.K.raiseEventsForChangedPath(h,s)},n.prototype.he=function(n){this.X=n},n.prototype.te=function(n){this.se("connected",n);!1===n&&this.ce()},n.prototype.ne=function(n){var t=this;u.each(n,function(n,i){t.se(i,n)})},n.prototype.se=function(n,t){var i=new e.Path("/.info/"+n),u=r.nodeFromJSON(t),f;this.oe.updateSnapshot(i,u);f=this.ae.applyServerOverwrite(i,u);this.K.raiseEventsForChangedPath(i,f)},n.prototype.pe=function(){return this.Y++},n.prototype.setWithPriority=function(n,t,i,f){var e=this,s;this.de("set",{path:""+n,value:t,priority:i});var l=this.generateServerValues(),h=r.nodeFromJSON(t,i),a=o.resolveDeferredValueSnapshot(h,l),c=this.pe(),v=this.ue.applyUserOverwrite(n,a,c,!0);this.K.queueEvents(v);this.Z.put(""+n,h.val(!0),function(t,i){var r="ok"===t,o;r||u.warn("set at "+n+" failed: "+t);o=e.ue.ackUserWrite(c,!r);e.K.raiseEventsForChangedPath(n,o);e.callOnCompleteCallback(f,t,i)});s=this.fe(n);this.le(s);this.K.raiseEventsForChangedPath(s,[])},n.prototype.update=function(n,t,i){var e=this,s,l;this.de("update",{path:""+n,value:t});var h=!0,a=this.generateServerValues(),c={};(f.forEach(t,function(n,t){h=!1;var i=r.nodeFromJSON(t);c[n]=o.resolveDeferredValueSnapshot(i,a)}),h)?(u.log("update() called with empty data.  Don't do anything."),this.callOnCompleteCallback(i,"ok")):(s=this.pe(),l=this.ue.applyUserMerge(n,c,s),this.K.queueEvents(l),this.Z.merge(""+n,t,function(t,r){var o="ok"===t,f,h;o||u.warn("update at "+n+" failed: "+t);f=e.ue.ackUserWrite(s,!o);h=f.length>0?e.le(n):n;e.K.raiseEventsForChangedPath(h,f);e.callOnCompleteCallback(i,t,r)}),f.forEach(t,function(t){var i=e.fe(n.child(t));e.le(i)}),this.K.raiseEventsForChangedPath(n,[]))},n.prototype.ce=function(){var n=this;this.de("onDisconnectEvents");var i=this.generateServerValues(),r=o.resolveDeferredValueTree(this.z,i),t=[];r.forEachTree(e.Path.Empty,function(i,r){t=t.concat(n.ue.applyServerOverwrite(i,r));var u=n.fe(i);n.le(u)});this.z=new s.SparseSnapshotTree;this.K.raiseEventsForChangedPath(e.Path.Empty,t)},n.prototype.onDisconnectCancel=function(n,t){var i=this;this.Z.onDisconnectCancel(""+n,function(r,u){"ok"===r&&i.z.forget(n);i.callOnCompleteCallback(t,r,u)})},n.prototype.onDisconnectSet=function(n,t,i){var u=this,f=r.nodeFromJSON(t);this.Z.onDisconnectPut(""+n,f.val(!0),function(t,r){"ok"===t&&u.z.remember(n,f);u.callOnCompleteCallback(i,t,r)})},n.prototype.onDisconnectSetWithPriority=function(n,t,i,u){var f=this,e=r.nodeFromJSON(t,i);this.Z.onDisconnectPut(""+n,e.val(!0),function(t,i){"ok"===t&&f.z.remember(n,e);f.callOnCompleteCallback(u,t,i)})},n.prototype.onDisconnectUpdate=function(n,t,i){var e=this;if(f.isEmpty(t))return u.log("onDisconnect().update() called with empty data.  Don't do anything."),void this.callOnCompleteCallback(i,"ok");this.Z.onDisconnectMerge(""+n,t,function(u,o){"ok"===u&&f.forEach(t,function(t,i){var u=r.nodeFromJSON(i);e.z.remember(n.child(t),u)});e.callOnCompleteCallback(i,u,o)})},n.prototype.addEventCallbackForQuery=function(n,t){var i;i=".info"===n.path.getFront()?this.ae.addEventRegistration(n,t):this.ue.addEventRegistration(n,t);this.K.raiseEventsAtPath(n.path,i)},n.prototype.removeEventCallbackForQuery=function(n,t){var i;i=".info"===n.path.getFront()?this.ae.removeEventRegistration(n,t):this.ue.removeEventRegistration(n,t);this.K.raiseEventsAtPath(n.path,i)},n.prototype.interrupt=function(){this.J&&this.J.interrupt("repo_interrupt")},n.prototype.resume=function(){this.J&&this.J.resume("repo_interrupt")},n.prototype.stats=function(n){var t,i;(void 0===n&&(n=!1),"undefined"!=typeof console)&&(n?(this.G||(this.G=new p.StatsListener(this.$)),t=this.G.get()):t=this.$.get(),i=Object.keys(t).reduce(function(n,t){return Math.max(t.length,n)},0),f.forEach(t,function(n,t){for(var r=n.length;r<i+2;r++)n+=" ";console.log(n+t)}))},n.prototype.statsIncrementCounter=function(n){this.$.incrementCounter(n);this.re.includeStat(n)},n.prototype.de=function(){for(var i,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];i="";this.J&&(i=this.J.id+":");u.log.apply(void 0,[i].concat(t))},n.prototype.callOnCompleteCallback=function(n,t,i){n&&u.exceptionGuard(function(){var r,u,f;"ok"==t?n(null):(r=(t||"error").toUpperCase(),u=r,i&&(u+=": "+i),f=Error(u),f.code=r,n(f))})},Object.defineProperty(n.prototype,"database",{get:function(){return this.__database||(this.__database=new d.Database(this))},enumerable:!0,configurable:!0}),n}();t.Repo=g},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n,t,i){this._e=n;this.ye=t;this.ve=i}return n.prototype.isFullyInitialized=function(){return this.ye},n.prototype.isFiltered=function(){return this.ve},n.prototype.isCompleteForPath=function(n){if(n.isEmpty())return this.isFullyInitialized()&&!this.ve;var t=n.getFront();return this.isCompleteForChild(t)},n.prototype.isCompleteForChild=function(n){return this.isFullyInitialized()&&!this.ve||this._e.hasChild(n)},n.prototype.getNode=function(){return this._e},n}();t.CacheNode=i},,function(n,t,i){"use strict";var s=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var h=i(35),c=i(82),l=i(1),a=i(83),o=i(36),v=i(18),y=i(2),p=i(107),u=i(7),r=i(0),f=i(0),w=i(47),e=function(n){function t(t,i){if(!(t instanceof v.Repo))throw Error("new Reference() no longer supported - use app.database().");return n.call(this,t,i,p.QueryParams.DEFAULT,!1)||this}return s(t,n),t.prototype.getKey=function(){return r.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},t.prototype.child=function(n){return r.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof n?n+="":n instanceof y.Path||(null===this.path.getFront()?u.validateRootPathString("Reference.child",1,n,!1):u.validatePathString("Reference.child",1,n,!1)),new t(this.repo,this.path.child(n))},t.prototype.getParent=function(){r.validateArgCount("Reference.parent",0,0,arguments.length);var n=this.path.parent();return null===n?null:new t(this.repo,n)},t.prototype.getRoot=function(){r.validateArgCount("Reference.root",0,0,arguments.length);for(var n=this;null!==n.getParent();)n=n.getParent();return n},t.prototype.databaseProp=function(){return this.repo.database},t.prototype.set=function(n,t){r.validateArgCount("Reference.set",1,2,arguments.length);u.validateWritablePath("Reference.set",this.path);u.validateFirebaseDataArg("Reference.set",1,n,this.path,!1);r.validateCallback("Reference.set",2,t,!0);var i=new f.Deferred;return this.repo.setWithPriority(this.path,n,null,i.wrapCallback(t)),i.promise},t.prototype.update=function(n,t){var e,i,o;if(r.validateArgCount("Reference.update",1,2,arguments.length),u.validateWritablePath("Reference.update",this.path),Array.isArray(n)){for(e={},i=0;i<n.length;++i)e[""+i]=n[i];n=e;l.warn("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}return u.validateFirebaseMergeDataArg("Reference.update",1,n,this.path,!1),r.validateCallback("Reference.update",2,t,!0),o=new f.Deferred,this.repo.update(this.path,n,o.wrapCallback(t)),o.promise},t.prototype.setWithPriority=function(n,t,i){if(r.validateArgCount("Reference.setWithPriority",2,3,arguments.length),u.validateWritablePath("Reference.setWithPriority",this.path),u.validateFirebaseDataArg("Reference.setWithPriority",1,n,this.path,!1),u.validatePriority("Reference.setWithPriority",2,t,!1),r.validateCallback("Reference.setWithPriority",3,i,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var e=new f.Deferred;return this.repo.setWithPriority(this.path,n,t,e.wrapCallback(i)),e.promise},t.prototype.remove=function(n){return r.validateArgCount("Reference.remove",0,1,arguments.length),u.validateWritablePath("Reference.remove",this.path),r.validateCallback("Reference.remove",1,n,!0),this.set(null,n)},t.prototype.transaction=function(n,t,i){var e,o;if(r.validateArgCount("Reference.transaction",1,3,arguments.length),u.validateWritablePath("Reference.transaction",this.path),r.validateCallback("Reference.transaction",1,n,!1),r.validateCallback("Reference.transaction",2,t,!0),u.validateBoolean("Reference.transaction",3,i,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";return void 0===i&&(i=!0),e=new f.Deferred,"function"==typeof t&&e.promise.catch(function(){}),o=function(n,i,r){n?e.reject(n):e.resolve(new c.TransactionResult(i,r));"function"==typeof t&&t(n,i,r)},this.repo.startTransaction(this.path,n,o,i),e.promise},t.prototype.setPriority=function(n,t){r.validateArgCount("Reference.setPriority",1,2,arguments.length);u.validateWritablePath("Reference.setPriority",this.path);u.validatePriority("Reference.setPriority",1,n,!1);r.validateCallback("Reference.setPriority",2,t,!0);var i=new f.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),n,null,i.wrapCallback(t)),i.promise},t.prototype.push=function(n,t){r.validateArgCount("Reference.push",0,2,arguments.length);u.validateWritablePath("Reference.push",this.path);u.validateFirebaseDataArg("Reference.push",1,n,this.path,!0);r.validateCallback("Reference.push",2,t,!0);var i,s=this.repo.serverTime(),e=a.nextPushId(s),f=this.child(e),o=this.child(e);return i=null!=n?f.set(n,t).then(function(){return o}):Promise.resolve(o),f.then=i.then.bind(i),f.catch=i.then.bind(i,void 0),"function"==typeof t&&i.catch(function(){}),f},t.prototype.onDisconnect=function(){return u.validateWritablePath("Reference.onDisconnect",this.path),new h.OnDisconnect(this.repo,this.path)},Object.defineProperty(t.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),t}(o.Query);t.Reference=e;o.Query.__referenceConstructor=e;w.SyncPoint.__referenceConstructor=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=i(7),f=i(2),e=i(3),o=function(){function n(n,t,i){this._e=n;this.ge=t;this.me=i}return n.prototype.val=function(){return r.validateArgCount("DataSnapshot.val",0,0,arguments.length),this._e.val()},n.prototype.exportVal=function(){return r.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this._e.val(!0)},n.prototype.toJSON=function(){return r.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},n.prototype.exists=function(){return r.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this._e.isEmpty()},n.prototype.child=function(t){r.validateArgCount("DataSnapshot.child",0,1,arguments.length);t+="";u.validatePathString("DataSnapshot.child",1,t,!1);var i=new f.Path(t),o=this.ge.child(i);return new n(this._e.getChild(i),o,e.PRIORITY_INDEX)},n.prototype.hasChild=function(n){r.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length);u.validatePathString("DataSnapshot.hasChild",1,n,!1);var t=new f.Path(n);return!this._e.getChild(t).isEmpty()},n.prototype.getPriority=function(){return r.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this._e.getPriority().val()},n.prototype.forEach=function(t){var i=this;return r.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),r.validateCallback("DataSnapshot.forEach",1,t,!1),!this._e.isLeafNode()&&!!this._e.forEachChild(this.me,function(r,u){return t(new n(u,i.ge.child(r),e.PRIORITY_INDEX))})},n.prototype.hasChildren=function(){return r.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this._e.isLeafNode()&&!this._e.isEmpty()},Object.defineProperty(n.prototype,"key",{get:function(){return this.ge.getKey()},enumerable:!0,configurable:!0}),n.prototype.numChildren=function(){return r.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this._e.numChildren()},n.prototype.getRef=function(){return r.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ge},Object.defineProperty(n.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),n}();t.DataSnapshot=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u,f=i(17),r=i(2),e=i(1),o=i(0),s=function(){return u||(u=new f.SortedMap(e.stringCompare)),u},h=function(){function n(n,t){void 0===t&&(t=s());this.value=n;this.children=t}return n.fromObject=function(t){var i=n.Empty;return o.forEach(t,function(n,t){i=i.set(new r.Path(n),t)}),i},n.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},n.prototype.findRootMostMatchingPathAndValue=function(n,t){var u,f,i;return null!=this.value&&t(this.value)?{path:r.Path.Empty,value:this.value}:n.isEmpty()?null:(u=n.getFront(),f=this.children.get(u),null!==f)?(i=f.findRootMostMatchingPathAndValue(n.popFront(),t),null!=i?{path:new r.Path(u).child(i.path),value:i.value}:null):null},n.prototype.findRootMostValueAndPath=function(n){return this.findRootMostMatchingPathAndValue(n,function(){return!0})},n.prototype.subtree=function(t){if(t.isEmpty())return this;var r=t.getFront(),i=this.children.get(r);return null!==i?i.subtree(t.popFront()):n.Empty},n.prototype.set=function(t,i){if(t.isEmpty())return new n(i,this.children);var r=t.getFront(),u=this.children.get(r)||n.Empty,f=u.set(t.popFront(),i),e=this.children.insert(r,f);return new n(this.value,e)},n.prototype.remove=function(t){var i,u,f,r;return t.isEmpty()?this.children.isEmpty()?n.Empty:new n(null,this.children):(i=t.getFront(),u=this.children.get(i),u)?(f=u.remove(t.popFront()),r=void 0,r=f.isEmpty()?this.children.remove(i):this.children.insert(i,f),null===this.value&&r.isEmpty()?n.Empty:new n(this.value,r)):this},n.prototype.get=function(n){if(n.isEmpty())return this.value;var i=n.getFront(),t=this.children.get(i);return t?t.get(n.popFront()):null},n.prototype.setTree=function(t,i){if(t.isEmpty())return i;var r=t.getFront(),e=this.children.get(r)||n.Empty,u=e.setTree(t.popFront(),i),f=void 0;return f=u.isEmpty()?this.children.remove(r):this.children.insert(r,u),new n(this.value,f)},n.prototype.fold=function(n){return this.Ce(r.Path.Empty,n)},n.prototype.Ce=function(n,t){var i={};return this.children.inorderTraversal(function(r,u){i[r]=u.Ce(n.child(r),t)}),t(n,this.value,i)},n.prototype.findOnPath=function(n,t){return this.Ee(n,r.Path.Empty,t)},n.prototype.Ee=function(n,t,i){var f=!!this.value&&i(t,this.value),r,u;return f?f:n.isEmpty()?null:(r=n.getFront(),u=this.children.get(r),u?u.Ee(n.popFront(),t.child(r),i):null)},n.prototype.foreachOnPath=function(n,t){return this.Ne(n,r.Path.Empty,t)},n.prototype.Ne=function(t,i,r){if(t.isEmpty())return this;this.value&&r(i,this.value);var u=t.getFront(),f=this.children.get(u);return f?f.Ne(t.popFront(),i.child(u),r):n.Empty},n.prototype.foreach=function(n){this.Pe(r.Path.Empty,n)},n.prototype.Pe=function(n,t){this.children.inorderTraversal(function(i,r){r.Pe(n.child(i),t)});this.value&&t(n,this.value)},n.prototype.foreachChild=function(n){this.children.inorderTraversal(function(t,i){i.value&&n(t,i.value)})},n.Empty=new n(null),n}();t.ImmutableTree=h},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),r=i(9),e=i(4),f=i(3),o=function(){function n(n){this.me=n}return n.prototype.updateChild=function(n,t,i,f,e,o){u.assert(n.isIndexed(this.me),"A node must be indexed if only a child is updated");var s=n.getImmediateChild(t);return s.getChild(f).equals(i.getChild(f))&&s.isEmpty()==i.isEmpty()?n:(null!=o&&(i.isEmpty()?n.hasChild(t)?o.trackChildChange(r.Change.childRemovedChange(t,s)):u.assert(n.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(r.Change.childAddedChange(t,i)):o.trackChildChange(r.Change.childChangedChange(t,i,s))),n.isLeafNode()&&i.isEmpty()?n:n.updateImmediateChild(t,i).withIndex(this.me))},n.prototype.updateFullNode=function(n,t,i){return null!=i&&(n.isLeafNode()||n.forEachChild(f.PRIORITY_INDEX,function(n,u){t.hasChild(n)||i.trackChildChange(r.Change.childRemovedChange(n,u))}),t.isLeafNode()||t.forEachChild(f.PRIORITY_INDEX,function(t,u){if(n.hasChild(t)){var f=n.getImmediateChild(t);f.equals(u)||i.trackChildChange(r.Change.childChangedChange(t,u,f))}else i.trackChildChange(r.Change.childAddedChange(t,u))})),t.withIndex(this.me)},n.prototype.updatePriority=function(n,t){return n.isEmpty()?e.ChildrenNode.EMPTY_NODE:n.updatePriority(t)},n.prototype.filtersNodes=function(){return!1},n.prototype.getIndexedFilter=function(){return this},n.prototype.getIndex=function(){return this.me},n}();t.IndexedFilter=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(99),u=function(){function n(){}return n.getCollection=function(n){var t=""+n;return this.be[t]||(this.be[t]=new r.StatsCollection),this.be[t]},n.getOrCreateReporter=function(n,t){var i=""+n;return this.Se[i]||(this.Se[i]=t()),this.Se[i]},n.be={},n.Se={},n}();t.StatsManager=u},function(n,t,i){"use strict";var f,e;Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),o=i(18),u=i(1),s=i(33),h=i(7);i(109);e=function(){function n(){this.Te={};this.we=!1}return n.getInstance=function(){return f||(f=new n),f},n.prototype.interrupt=function(){var n,t;for(n in this.Te)for(t in this.Te[n])this.Te[n][t].interrupt()},n.prototype.resume=function(){var n,t;for(n in this.Te)for(t in this.Te[n])this.Te[n][t].resume()},n.prototype.databaseFromApp=function(n,t){var r=t||n.options.databaseURL,i,f;return void 0===r&&u.fatal("Can't determine Firebase Database URL.  Be sure to include databaseURL option when calling firebase.initializeApp()."),i=s.parseRepoInfo(r),f=i.repoInfo,h.validateUrl("Invalid Firebase Database URL",1,i),i.path.isEmpty()||u.fatal("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(f,n).database},n.prototype.deleteRepo=function(n){var t=r.safeGet(this.Te,n.app.name);t&&r.safeGet(t,n.H.toURLString())===n||u.fatal("Database "+n.app.name+"("+n.H+") has already been deleted.");n.interrupt();delete t[n.H.toURLString()]},n.prototype.createRepo=function(n,t){var i=r.safeGet(this.Te,t.name),f;return i||(i={},this.Te[t.name]=i),f=r.safeGet(i,n.toURLString()),f&&u.fatal("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),f=new o.Repo(n,this.we,t),i[n.toURLString()]=f,f},n.prototype.forceRestClient=function(n){this.we=n},n}();t.RepoManager=e},,,,,,function(n,t,i){"use strict";var f;Object.defineProperty(t,"__esModule",{value:!0});var u=i(1),e=i(33),o=i(2),s=i(21),h=i(18),c=i(26),r=i(0),l=i(7),a=function(){function n(n){this.Ie=n;n instanceof h.Repo||u.fatal("Don't call new Database() directly - please use firebase.database().");this.B=new s.Reference(n,o.Path.Empty);this.INTERNAL=new f(this)}return Object.defineProperty(n.prototype,"app",{get:function(){return this.Ie.app},enumerable:!0,configurable:!0}),n.prototype.ref=function(n){return this.Re("ref"),r.validateArgCount("database.ref",0,1,arguments.length),void 0!==n?this.B.child(n):this.B},n.prototype.refFromURL=function(n){var t="database.refFromURL",i,f;return this.Re(t),r.validateArgCount(t,1,1,arguments.length),i=e.parseRepoInfo(n),l.validateUrl(t,1,i),f=i.repoInfo,f.host!==this.Ie.H.host&&u.fatal(t+": Host name does not match the current database: (found "+f.host+" but expected "+this.Ie.H.host+")"),this.ref(""+i.path)},n.prototype.Re=function(n){null===this.Ie&&u.fatal("Cannot call "+n+" on a deleted database.")},n.prototype.goOffline=function(){r.validateArgCount("database.goOffline",0,0,arguments.length);this.Re("goOffline");this.Ie.interrupt()},n.prototype.goOnline=function(){r.validateArgCount("database.goOnline",0,0,arguments.length);this.Re("goOnline");this.Ie.resume()},n.ServerValue={TIMESTAMP:{".sv":"timestamp"}},n}();t.Database=a;f=function(){function n(n){this.database=n}return n.prototype.delete=function(){return this.database.Re("delete"),c.RepoManager.getInstance().deleteRepo(this.database.Ie),this.database.Ie=null,this.database.B=null,this.database.INTERNAL=null,this.database=null,Promise.resolve()},n}();t.DatabaseInternals=f},function(n,t,i){"use strict";function u(n){for(var i,u="",r=n.split("/"),t=0;t<r.length;t++)if(r[t].length>0){i=r[t];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(n){}u+="/"+i}return u}Object.defineProperty(t,"__esModule",{value:!0});var f=i(2),e=i(34),r=i(1);t.parseRepoInfo=function(n){var i=t.parseURL(n),u=i.subdomain,o;return"firebase"===i.domain&&r.fatal(i.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),u&&"undefined"!=u||"localhost"===i.domain||r.fatal("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),i.secure||r.warnIfPageIsSecure(),o="ws"===i.scheme||"wss"===i.scheme,{repoInfo:new e.RepoInfo(i.host,i.secure,u,o),path:new f.Path(i.pathString)}};t.parseURL=function(n){var r="",e="",s="",h="",c=!0,o="https",l=443,t,f,i;return"string"==typeof n&&(t=n.indexOf("//"),t>=0&&(o=n.substring(0,t-1),n=n.substring(t+2)),f=n.indexOf("/"),-1===f&&(f=n.length),r=n.substring(0,f),h=u(n.substring(f)),t=r.indexOf(":"),t>=0?(c="https"===o||"wss"===o,l=parseInt(r.substring(t+1),10)):t=n.length,i=r.split("."),3===i.length?(e=i[1],s=i[0].toLowerCase()):2===i.length?e=i[0]:"localhost"===i[0].slice(0,t).toLowerCase()&&(e="localhost")),{host:r,port:l,domain:e,subdomain:s,secure:c,scheme:o,pathString:h}}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),e=i(0),u=i(13),f=i(14),o=function(){function n(n,t,i,r,f){void 0===f&&(f="");this.secure=t;this.namespace=i;this.webSocketOnly=r;this.persistenceKey=f;this.host=n.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.internalHost=u.PersistentStorage.get("host:"+n)||this.host}return n.prototype.needsQueryParam=function(){return this.host!==this.internalHost},n.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},n.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},n.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},n.prototype.updateHost=function(n){n!==this.internalHost&&(this.internalHost=n,this.isCacheableHost()&&u.PersistentStorage.set("host:"+this.host,this.internalHost))},n.prototype.connectionURL=function(n,t){var i,u;if(r.assert("string"==typeof n,"typeof type must == string"),r.assert("object"==typeof t,"typeof params must == object"),n===f.WEBSOCKET)i=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(n!==f.LONG_POLLING)throw Error("Unknown connection type: "+n);i=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}return this.needsQueryParam()&&(t.ns=this.namespace),u=[],e.forEach(t,function(n,t){u.push(n+"="+t)}),i+u.join("&")},n.prototype.toString=function(){var n=this.toURLString();return this.persistenceKey&&(n+="<"+this.persistenceKey+">"),n},n.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},n}();t.RepoInfo=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=i(7),e=i(1),f=i(0),o=function(){function n(n,t){this.Ie=n;this.Oe=t}return n.prototype.cancel=function(n){r.validateArgCount("OnDisconnect.cancel",0,1,arguments.length);r.validateCallback("OnDisconnect.cancel",1,n,!0);var t=new f.Deferred;return this.Ie.onDisconnectCancel(this.Oe,t.wrapCallback(n)),t.promise},n.prototype.remove=function(n){r.validateArgCount("OnDisconnect.remove",0,1,arguments.length);u.validateWritablePath("OnDisconnect.remove",this.Oe);r.validateCallback("OnDisconnect.remove",1,n,!0);var t=new f.Deferred;return this.Ie.onDisconnectSet(this.Oe,null,t.wrapCallback(n)),t.promise},n.prototype.set=function(n,t){r.validateArgCount("OnDisconnect.set",1,2,arguments.length);u.validateWritablePath("OnDisconnect.set",this.Oe);u.validateFirebaseDataArg("OnDisconnect.set",1,n,this.Oe,!1);r.validateCallback("OnDisconnect.set",2,t,!0);var i=new f.Deferred;return this.Ie.onDisconnectSet(this.Oe,n,i.wrapCallback(t)),i.promise},n.prototype.setWithPriority=function(n,t,i){r.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length);u.validateWritablePath("OnDisconnect.setWithPriority",this.Oe);u.validateFirebaseDataArg("OnDisconnect.setWithPriority",1,n,this.Oe,!1);u.validatePriority("OnDisconnect.setWithPriority",2,t,!1);r.validateCallback("OnDisconnect.setWithPriority",3,i,!0);var e=new f.Deferred;return this.Ie.onDisconnectSetWithPriority(this.Oe,n,t,e.wrapCallback(i)),e.promise},n.prototype.update=function(n,t){var o,i,s;if(r.validateArgCount("OnDisconnect.update",1,2,arguments.length),u.validateWritablePath("OnDisconnect.update",this.Oe),Array.isArray(n)){for(o={},i=0;i<n.length;++i)o[""+i]=n[i];n=o;e.warn("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}return u.validateFirebaseMergeDataArg("OnDisconnect.update",1,n,this.Oe,!1),r.validateCallback("OnDisconnect.update",2,t,!0),s=new f.Deferred,this.Ie.onDisconnectUpdate(this.Oe,n,s.wrapCallback(t)),s.promise},n}();t.OnDisconnect=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e,s=i(0),h=i(10),c=i(3),l=i(38),a=i(42),o=i(1),v=i(2),u=i(7),r=i(0),f=i(84),y=i(0),p=function(){function n(n,t,i,r){this.repo=n;this.path=t;this.Ae=i;this.De=r}return Object.defineProperty(n,"__referenceConstructor",{get:function(){return s.assert(e,"Reference.ts has not been loaded"),e},set:function(n){e=n},enumerable:!0,configurable:!0}),n.Me=function(n){var t=null,i=null,r,f;if(n.hasStart()&&(t=n.getIndexStartValue()),n.hasEnd()&&(i=n.getIndexEndValue()),n.getIndex()===h.KEY_INDEX){if(r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",f="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.",n.hasStart()){if(n.getIndexStartName()!=o.MIN_NAME)throw Error(r);if("string"!=typeof t)throw Error(f);}if(n.hasEnd()){if(n.getIndexEndName()!=o.MAX_NAME)throw Error(r);if("string"!=typeof i)throw Error(f);}}else if(n.getIndex()===c.PRIORITY_INDEX){if(null!=t&&!u.isValidPriority(t)||null!=i&&!u.isValidPriority(i))throw Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).");}else if(s.assert(n.getIndex()instanceof a.PathIndex||n.getIndex()===l.VALUE_INDEX,"unknown index type."),null!=t&&"object"==typeof t||null!=i&&"object"==typeof i)throw Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.");},n.Le=function(n){if(n.hasStart()&&n.hasEnd()&&n.hasLimit()&&!n.hasAnchoredLimit())throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");},n.prototype.Fe=function(n){if(!0===this.De)throw Error(n+": You can't combine multiple orderBy calls.");},n.prototype.getQueryParams=function(){return this.Ae},n.prototype.getRef=function(){return r.validateArgCount("Query.ref",0,0,arguments.length),new n.__referenceConstructor(this.repo,this.path)},n.prototype.on=function(t,i,f,e){var o,s;if(r.validateArgCount("Query.on",2,4,arguments.length),u.validateEventType("Query.on",1,t,!1),r.validateCallback("Query.on",2,i,!1),o=n.xe("Query.on",f,e),"value"===t)this.onValueEvent(i,o.cancel,o.context);else s={},s[t]=i,this.onChildEvent(s,o.cancel,o.context);return i},n.prototype.onValueEvent=function(n,t,i){var r=new f.ValueEventRegistration(n,t||null,i||null);this.repo.addEventCallbackForQuery(this,r)},n.prototype.onChildEvent=function(n,t,i){var r=new f.ChildEventRegistration(n,t,i);this.repo.addEventCallbackForQuery(this,r)},n.prototype.off=function(n,t,i){var e,o,s;r.validateArgCount("Query.off",0,3,arguments.length);u.validateEventType("Query.off",1,n,!0);r.validateCallback("Query.off",2,t,!0);r.validateContextObject("Query.off",3,i,!0);e=null;o=null;"value"===n?(s=t||null,e=new f.ValueEventRegistration(s,null,i||null)):n&&(t&&(o={},o[n]=t),e=new f.ChildEventRegistration(o,null,i||null));this.repo.removeEventCallbackForQuery(this,e)},n.prototype.once=function(t,i,f,e){var c=this,h;r.validateArgCount("Query.once",1,4,arguments.length);u.validateEventType("Query.once",1,t,!1);r.validateCallback("Query.once",2,i,!0);var o=n.xe("Query.once",f,e),l=!0,s=new y.Deferred;return s.promise.catch(function(){}),h=function(n){l&&(l=!1,c.off(t,h),i&&i.bind(o.context)(n),s.resolve(n))},this.on(t,h,function(n){c.off(t,h);o.cancel&&o.cancel.bind(o.context)(n);s.reject(n)}),s.promise},n.prototype.limitToFirst=function(t){if(r.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof t||Math.floor(t)!==t||t<=0)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.Ae.hasLimit())throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new n(this.repo,this.path,this.Ae.limitToFirst(t),this.De)},n.prototype.limitToLast=function(t){if(r.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof t||Math.floor(t)!==t||t<=0)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.Ae.hasLimit())throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new n(this.repo,this.path,this.Ae.limitToLast(t),this.De)},n.prototype.orderByChild=function(t){var i,e,f;if(r.validateArgCount("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.');if(u.validatePathString("Query.orderByChild",1,t,!1),this.Fe("Query.orderByChild"),i=new v.Path(t),i.isEmpty())throw Error("Query.orderByChild: cannot pass in empty path.  Use Query.orderByValue() instead.");return e=new a.PathIndex(i),f=this.Ae.orderBy(e),n.Me(f),new n(this.repo,this.path,f,!0)},n.prototype.orderByKey=function(){r.validateArgCount("Query.orderByKey",0,0,arguments.length);this.Fe("Query.orderByKey");var t=this.Ae.orderBy(h.KEY_INDEX);return n.Me(t),new n(this.repo,this.path,t,!0)},n.prototype.orderByPriority=function(){r.validateArgCount("Query.orderByPriority",0,0,arguments.length);this.Fe("Query.orderByPriority");var t=this.Ae.orderBy(c.PRIORITY_INDEX);return n.Me(t),new n(this.repo,this.path,t,!0)},n.prototype.orderByValue=function(){r.validateArgCount("Query.orderByValue",0,0,arguments.length);this.Fe("Query.orderByValue");var t=this.Ae.orderBy(l.VALUE_INDEX);return n.Me(t),new n(this.repo,this.path,t,!0)},n.prototype.startAt=function(t,i){void 0===t&&(t=null);r.validateArgCount("Query.startAt",0,2,arguments.length);u.validateFirebaseDataArg("Query.startAt",1,t,this.path,!0);u.validateKey("Query.startAt",2,i,!0);var f=this.Ae.startAt(t,i);if(n.Le(f),n.Me(f),this.Ae.hasStart())throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===t&&(t=null,i=null),new n(this.repo,this.path,f,this.De)},n.prototype.endAt=function(t,i){void 0===t&&(t=null);r.validateArgCount("Query.endAt",0,2,arguments.length);u.validateFirebaseDataArg("Query.endAt",1,t,this.path,!0);u.validateKey("Query.endAt",2,i,!0);var f=this.Ae.endAt(t,i);if(n.Le(f),n.Me(f),this.Ae.hasEnd())throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new n(this.repo,this.path,f,this.De)},n.prototype.equalTo=function(n,t){if(r.validateArgCount("Query.equalTo",1,2,arguments.length),u.validateFirebaseDataArg("Query.equalTo",1,n,this.path,!1),u.validateKey("Query.equalTo",2,t,!0),this.Ae.hasStart())throw Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.Ae.hasEnd())throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(n,t).endAt(n,t)},n.prototype.toString=function(){return r.validateArgCount("Query.toString",0,0,arguments.length),""+this.repo+this.path.toUrlEncodedString()},n.prototype.toJSON=function(){return r.validateArgCount("Query.toJSON",0,1,arguments.length),""+this},n.prototype.queryObject=function(){return this.Ae.getQueryObject()},n.prototype.queryIdentifier=function(){var t=this.queryObject(),n=o.ObjectToUniqueKey(t);return"{}"===n?"default":n},n.prototype.isEqual=function(t){if(r.validateArgCount("Query.isEqual",1,1,arguments.length),!(t instanceof n))throw Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.");var i=this.repo===t.repo,u=this.path.equals(t.path),f=this.queryIdentifier()===t.queryIdentifier();return i&&u&&f},n.xe=function(n,t,i){var u={cancel:null,context:null};if(t&&i)u.cancel=t,r.validateCallback(n,3,u.cancel,!0),u.context=i,r.validateContextObject(n,4,u.context,!0);else if(t)if("object"==typeof t&&null!==t)u.context=t;else{if("function"!=typeof t)throw Error(r.errorPrefix(n,3,!0)+" must either be a cancel callback or a context object.");u.cancel=t}return u},Object.defineProperty(n.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),n}();t.Query=p},function(n,t,i){"use strict";function f(n){r=n}Object.defineProperty(t,"__esModule",{value:!0});var r,u=i(0),e=i(1),o=i(0);t.setMaxNode=f;t.priorityHashText=function(n){return"number"==typeof n?"number:"+e.doubleToIEEE754String(n):"string:"+n};t.validatePriorityNode=function(n){if(n.isLeafNode()){var t=n.val();u.assert("string"==typeof t||"number"==typeof t||"object"==typeof t&&o.contains(t,".sv"),"Priority must be a string or number.")}else u.assert(n===r||n.isEmpty(),"priority of unexpected type.");u.assert(n===r||n.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")}},function(n,t,i){"use strict";var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var e=i(15),r=i(5),o=i(1),s=i(11),u=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return f(t,n),t.prototype.compare=function(n,t){var i=n.node.compareTo(t.node);return 0===i?o.nameCompare(n.name,t.name):i},t.prototype.isDefinedOn=function(){return!0},t.prototype.indexedValueChanged=function(n,t){return!n.equals(t)},t.prototype.minPost=function(){return r.NamedNode.MIN},t.prototype.maxPost=function(){return r.NamedNode.MAX},t.prototype.makePost=function(n,t){var i=s.nodeFromJSON(n);return new r.NamedNode(t,i)},t.prototype.toString=function(){return".value"},t}(e.Index);t.ValueIndex=u;t.VALUE_INDEX=new u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,e=i(0),s=i(40),r=i(0),f=i(5),h=i(3),c=i(10),u={},l=function(){function n(n,t){this.ke=n;this.We=t}return Object.defineProperty(n,"Default",{get:function(){return e.assert(u&&h.PRIORITY_INDEX,"ChildrenNode.ts has not been loaded"),o=o||new n({".priority":u},{".priority":h.PRIORITY_INDEX})},enumerable:!0,configurable:!0}),n.prototype.get=function(n){var t=r.safeGet(this.ke,n);if(!t)throw Error("No index defined for "+n);return t===u?null:t},n.prototype.hasIndex=function(n){return r.contains(this.We,""+n)},n.prototype.addIndex=function(t,i){var w,l,a,v;e.assert(t!==c.KEY_INDEX,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var y=[],h=!1,p=i.getIterator(f.NamedNode.Wrap),o=p.getNext();o;)h=h||t.isDefinedOn(o.node),y.push(o),o=p.getNext();return w=h?s.buildChildSet(y,t.getCompare()):u,l=""+t,a=r.clone(this.We),a[l]=t,v=r.clone(this.ke),v[l]=w,new n(v,a)},n.prototype.addToIndexes=function(t,i){var o=this;return new n(r.map(this.ke,function(n,h){var a=r.safeGet(o.We,h),y,l;if(e.assert(a,"Missing index implementation for "+h),n===u){if(a.isDefinedOn(t.node)){for(var v=[],p=i.getIterator(f.NamedNode.Wrap),c=p.getNext();c;)c.name!=t.name&&v.push(c),c=p.getNext();return v.push(t),s.buildChildSet(v,a.getCompare())}return u}return y=i.get(t.name),l=n,y&&(l=l.remove(new f.NamedNode(t.name,y))),l.insert(t,t.node)}),this.We)},n.prototype.removeFromIndexes=function(t,i){return new n(r.map(this.ke,function(n){if(n===u)return n;var r=i.get(t.name);return r?n.remove(new f.NamedNode(t.name,r)):n}),this.We)},n}();t.IndexMap=l},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(17),u=i(17),f=Math.log(2),e=function(){function n(n){this.count=function(n){return parseInt(Math.log(n)/f,10)}(n+1);this.je=this.count-1;var t=function(n){return parseInt(Array(n+1).join("1"),2)}(this.count);this.Ve=n+1&t}return n.prototype.nextBitIsOne=function(){var n=!(this.Ve&1<<this.je);return this.je--,n},n}();t.buildChildSet=function(n,t,i,f){n.sort(t);var o=function(t,u){var f,e,s=u-t;if(0==s)return null;if(1==s)return f=n[t],e=i?i(f):f,new r.LLRBNode(e,f.node,r.LLRBNode.BLACK,null,null);var h=parseInt(s/2,10)+t,c=o(t,h),l=o(h+1,u);return f=n[h],e=i?i(f):f,new r.LLRBNode(e,f.node,r.LLRBNode.BLACK,c,l)},s=new e(n.length),h=function(t){for(var l,f,u=null,c=null,e=n.length,s=function(t,u){var s=e-t,h=e;e-=t;var c=o(s+1,h),f=n[s],l=i?i(f):f;a(new r.LLRBNode(l,f.node,u,null,c))},a=function(n){u?(u.left=n,u=n):(c=n,u=n)},h=0;h<t.count;++h)l=t.nextBitIsOne(),f=Math.pow(2,t.count-(h+1)),l?s(f,r.LLRBNode.BLACK):(s(f,r.LLRBNode.BLACK),s(f,r.LLRBNode.RED));return c}(s);return new u.SortedMap(f||t,h)}},function(n,t,i){"use strict";function u(n,t){return r.nameCompare(n.name,t.name)}function f(n,t){return r.nameCompare(n,t)}Object.defineProperty(t,"__esModule",{value:!0});var r=i(1);t.NAME_ONLY_COMPARATOR=u;t.NAME_COMPARATOR=f},function(n,t,i){"use strict";var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),u=i(1),s=i(15),r=i(4),f=i(5),h=i(11),c=function(n){function t(t){var i=n.call(this)||this;return i.Qe=t,o.assert(!t.isEmpty()&&".priority"!==t.getFront(),"Can't create PathIndex with empty path or .priority key"),i}return e(t,n),t.prototype.extractChild=function(n){return n.getChild(this.Qe)},t.prototype.isDefinedOn=function(n){return!n.getChild(this.Qe).isEmpty()},t.prototype.compare=function(n,t){var r=this.extractChild(n.node),f=this.extractChild(t.node),i=r.compareTo(f);return 0===i?u.nameCompare(n.name,t.name):i},t.prototype.makePost=function(n,t){var i=h.nodeFromJSON(n),u=r.ChildrenNode.EMPTY_NODE.updateChild(this.Qe,i);return new f.NamedNode(t,u)},t.prototype.maxPost=function(){var n=r.ChildrenNode.EMPTY_NODE.updateChild(this.Qe,r.MAX_NODE);return new f.NamedNode(u.MAX_NAME,n)},t.prototype.toString=function(){return this.Qe.slice().join("/")},t}(s.Index);t.PathIndex=c},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),f=i(2),e=i(44),r=i(16),o=i(11),s=i(3);t.generateWithValues=function(n){return n=n||{},n.timestamp=n.timestamp||(new Date).getTime(),n};t.resolveDeferredValue=function(n,t){return n&&"object"==typeof n?(u.assert(".sv"in n,"Unexpected leaf node or priority contents"),t[n[".sv"]]):n};t.resolveDeferredValueTree=function(n,i){var r=new e.SparseSnapshotTree;return n.forEachTree(new f.Path(""),function(n,u){r.remember(n,t.resolveDeferredValueSnapshot(u,i))}),r};t.resolveDeferredValueSnapshot=function(n,i){var u,l=n.getPriority().val(),f=t.resolveDeferredValue(l,i),e,c,h;return n.isLeafNode()?(e=n,c=t.resolveDeferredValue(e.getValue(),i),c!==e.getValue()||f!==e.getPriority().val()?new r.LeafNode(c,o.nodeFromJSON(f)):n):(h=n,u=h,f!==h.getPriority().val()&&(u=u.updatePriority(new r.LeafNode(f))),h.forEachChild(s.PRIORITY_INDEX,function(n,r){var f=t.resolveDeferredValueSnapshot(r,i);f!==r&&(u=u.updateImmediateChild(n,f))}),u)}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),u=i(3),f=i(45),e=function(){function n(){this.T=null;this._=null}return n.prototype.find=function(n){if(null!=this.T)return this.T.getChild(n);if(n.isEmpty()||null==this._)return null;var t=n.getFront();return n=n.popFront(),this._.contains(t)?this._.get(t).find(n):null},n.prototype.remember=function(t,i){var r,u;t.isEmpty()?(this.T=i,this._=null):null!==this.T?this.T=this.T.updateChild(t,i):(null==this._&&(this._=new f.CountedSet),r=t.getFront(),this._.contains(r)||this._.add(r,new n),u=this._.get(r),t=t.popFront(),u.remember(t,i))},n.prototype.forget=function(n){var i,f,t;return n.isEmpty()?(this.T=null,this._=null,!0):null!==this.T?this.T.isLeafNode()?!1:(i=this.T,this.T=null,f=this,i.forEachChild(u.PRIORITY_INDEX,function(n,t){f.remember(new r.Path(n),t)}),this.forget(n)):null!==this._?(t=n.getFront(),n=n.popFront(),this._.contains(t)&&this._.get(t).forget(n)&&this._.remove(t),!!this._.isEmpty()&&(this._=null,!0)):!0},n.prototype.forEachTree=function(n,t){null!==this.T?t(n,this.T):this.forEachChild(function(i,u){var f=new r.Path(n+"/"+i);u.forEachTree(f,t)})},n.prototype.forEachChild=function(n){null!==this._&&this._.each(function(t,i){n(t,i)})},n}();t.SparseSnapshotTree=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(){this.set={}}return n.prototype.add=function(n,t){this.set[n]=null===t||t},n.prototype.contains=function(n){return r.contains(this.set,n)},n.prototype.get=function(n){if(this.contains(n))return this.set[n]},n.prototype.remove=function(n){delete this.set[n]},n.prototype.clear=function(){this.set={}},n.prototype.isEmpty=function(){return r.isEmpty(this.set)},n.prototype.count=function(){return r.getCount(this.set)},n.prototype.each=function(n){r.forEach(this.set,function(t,i){return n(t,i)})},n.prototype.keys=function(){var n=[];return r.forEach(this.set,function(t){n.push(t)}),n},n}();t.CountedSet=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(8),u=i(2),f=function(){function n(n,t,i){this.source=n;this.path=t;this.snap=i;this.type=r.OperationType.OVERWRITE}return n.prototype.operationForChild=function(t){return this.path.isEmpty()?new n(this.source,u.Path.Empty,this.snap.getImmediateChild(t)):new n(this.source,this.path.popFront(),this.snap)},n}();t.Overwrite=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u,e=i(19),o=i(4),f=i(0),r=i(0),s=i(48),h=i(90),c=function(){function n(){this.qe={}}return Object.defineProperty(n,"__referenceConstructor",{get:function(){return f.assert(u,"Reference.ts has not been loaded"),u},set:function(n){f.assert(!u,"__referenceConstructor has already been defined");u=n},enumerable:!0,configurable:!0}),n.prototype.isEmpty=function(){return r.isEmpty(this.qe)},n.prototype.applyOperation=function(n,t,i){var o=n.source.queryId,e,u;return null!==o?(e=r.safeGet(this.qe,o),f.assert(null!=e,"SyncTree gave us an op for an invalid query."),e.applyOperation(n,t,i)):(u=[],r.forEach(this.qe,function(r,f){u=u.concat(f.applyOperation(n,t,i))}),u)},n.prototype.addEventRegistration=function(n,t,i,u,f){var v=n.queryIdentifier(),c=r.safeGet(this.qe,v),l,a,y;return c||(l=i.calcCompleteEventCache(f?u:null),a=!1,l?a=!0:u instanceof o.ChildrenNode?(l=i.calcCompleteEventChildren(u),a=!1):(l=o.ChildrenNode.EMPTY_NODE,a=!1),y=new s.ViewCache(new e.CacheNode(l,a,!1),new e.CacheNode(u,f,!1)),c=new h.View(n,y),this.qe[v]=c),c.addEventRegistration(t),c.getInitialEvents(t)},n.prototype.removeEventRegistration=function(t,i,u){var s=t.queryIdentifier(),o=[],e=[],c=this.hasCompleteView(),h,f;return"default"===s?(h=this,r.forEach(this.qe,function(n,t){e=e.concat(t.removeEventRegistration(i,u));t.isEmpty()&&(delete h.qe[n],t.getQuery().getQueryParams().loadsAllData()||o.push(t.getQuery()))})):(f=r.safeGet(this.qe,s),f&&(e=e.concat(f.removeEventRegistration(i,u)),f.isEmpty()&&(delete this.qe[s],f.getQuery().getQueryParams().loadsAllData()||o.push(f.getQuery())))),c&&!this.hasCompleteView()&&o.push(new n.__referenceConstructor(t.repo,t.path)),{removed:o,events:e}},n.prototype.getQueryViews=function(){var n=this;return Object.keys(this.qe).map(function(t){return n.qe[t]}).filter(function(n){return!n.getQuery().getQueryParams().loadsAllData()})},n.prototype.getCompleteServerCache=function(n){var t=null;return r.forEach(this.qe,function(i,r){t=t||r.getCompleteServerCache(n)}),t},n.prototype.viewForQuery=function(n){if(n.getQueryParams().loadsAllData())return this.getCompleteView();var t=n.queryIdentifier();return r.safeGet(this.qe,t)},n.prototype.viewExistsForQuery=function(n){return null!=this.viewForQuery(n)},n.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},n.prototype.getCompleteView=function(){return r.findValue(this.qe,function(n){return n.getQuery().getQueryParams().loadsAllData()})||null},n}();t.SyncPoint=c},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(4),r=i(19),f=function(){function n(n,t){this.Ue=n;this.Be=t}return n.prototype.updateEventSnap=function(t,i,u){return new n(new r.CacheNode(t,i,u),this.Be)},n.prototype.updateServerSnap=function(t,i,u){return new n(this.Ue,new r.CacheNode(t,i,u))},n.prototype.getEventCache=function(){return this.Ue},n.prototype.getCompleteEventSnap=function(){return this.Ue.isFullyInitialized()?this.Ue.getNode():null},n.prototype.getServerCache=function(){return this.Be},n.prototype.getCompleteServerSnap=function(){return this.Be.isFullyInitialized()?this.Be.getNode():null},n.Empty=new n(new r.CacheNode(u.ChildrenNode.EMPTY_NODE,!1,!1),new r.CacheNode(u.ChildrenNode.EMPTY_NODE,!1,!1)),n}();t.ViewCache=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(n){this.He=n;this.Ge=null}return n.prototype.get=function(){var t=this.He.get(),n=r.clone(t);return this.Ge&&r.forEach(this.Ge,function(t,i){n[t]=n[t]-i}),this.Ge=t,n},n}();t.StatsListener=u},function(n,t,i){"use strict";var a=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var v=i(6),u=i(0),o=i(0),f=i(0),r=i(1),y=i(2),p=i(102),c=i(103),l=i(0),w=i(52),s=i(0),h=i(0),b=i(55),e=1e3,k=3e5,d=function(n){function t(i,u,f,o,s,l){var a=n.call(this)||this;if(a.H=i,a.ee=u,a.te=f,a.ne=o,a.Ke=s,a.Ye=l,a.id=t.Xe++,a.de=r.logWrapper("p:"+a.id+":"),a.ze={},a.Je={},a.$e=[],a.Ze=0,a.et=[],a.tt=!1,a.nt=e,a.rt=k,a.it=null,a.lastSessionId=null,a.ot=null,a.at=!1,a.st={},a.ut=0,a.lt=null,a.ht=null,a.ct=!1,a.pt=0,a.dt=!0,a.ft=null,a._t=null,l&&!h.isNodeSdk())throw Error("Auth override specified in options, but not supported on non Node.js platforms");return a.yt(0),p.VisibilityMonitor.getInstance().on("visible",a.vt,a),-1===i.host.indexOf("fblocal")&&c.OnlineMonitor.getInstance().on("online",a.gt,a),a}return a(t,n),t.prototype.sendRequest=function(n,t,i){var r=++this.ut,u={r:r,a:n,b:t};this.de(o.stringify(u));f.assert(this.tt,"sendRequest call when we're not connected not allowed.");this.lt.sendRequest(u);i&&(this.st[r]=i)},t.prototype.listen=function(n,t,i,r){var e=n.queryIdentifier(),u=""+n.path,o;this.de("Listen called for "+u+" "+e);this.Je[u]=this.Je[u]||{};f.assert(n.getQueryParams().isDefault()||!n.getQueryParams().loadsAllData(),"listen() called for non-default but complete query");f.assert(!this.Je[u][e],"listen() called twice for same path/queryId.");o={onComplete:r,hashFn:t,query:n,tag:i};this.Je[u][e]=o;this.tt&&this.mt(o)},t.prototype.mt=function(n){var u=this,f=n.query,i=""+f.path,e=f.queryIdentifier(),r;this.de("Listen on "+i+" for "+e);r={p:i};n.tag&&(r.q=f.queryObject(),r.t=n.tag);r.h=n.hashFn();this.sendRequest("q",r,function(r){var o=r.d,s=r.s;t.Ct(o,f);(u.Je[i]&&u.Je[i][e])===n&&(u.de("listen response",r),"ok"!==s&&u.Et(i,e),n.onComplete&&n.onComplete(s,o))})},t.Ct=function(n,t){var i,f,e;n&&"object"==typeof n&&u.contains(n,"w")&&(i=u.safeGet(n,"w"),Array.isArray(i)&&~i.indexOf("no_index")&&(f='".indexOn": "'+t.getQueryParams().getIndex()+'"',e=""+t.path,r.warn("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+f+" at "+e+" to your security rules for better performance.")))},t.prototype.refreshAuthToken=function(n){this.ht=n;this.de("Auth token refreshed");this.ht?this.tryAuth():this.tt&&this.sendRequest("unauth",{},function(){});this.Nt(n)},t.prototype.Nt=function(n){(n&&40===n.length||l.isAdmin(n))&&(this.de("Admin auth credential detected.  Reducing max reconnect time."),this.rt=3e4)},t.prototype.tryAuth=function(){var n=this;if(this.tt&&this.ht){var t=this.ht,r=l.isValidFormat(t)?"auth":"gauth",i={cred:t};null===this.Ye?i.noauth=!0:"object"==typeof this.Ye&&(i.authvar=this.Ye);this.sendRequest(r,i,function(i){var r=i.s,u=i.d||"error";n.ht===t&&("ok"===r?n.pt=0:n.Pt(r,u))})}},t.prototype.unlisten=function(n,t){var i=""+n.path,r=n.queryIdentifier();this.de("Unlisten called for "+i+" "+r);f.assert(n.getQueryParams().isDefault()||!n.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query");this.Et(i,r)&&this.tt&&this.bt(i,r,n.queryObject(),t)},t.prototype.bt=function(n,t,i,r){this.de("Unlisten on "+n+" for "+t);var u={p:n};r&&(u.q=i,u.t=r);this.sendRequest("n",u)},t.prototype.onDisconnectPut=function(n,t,i){this.tt?this.St("o",n,t,i):this.et.push({pathString:n,action:"o",data:t,onComplete:i})},t.prototype.onDisconnectMerge=function(n,t,i){this.tt?this.St("om",n,t,i):this.et.push({pathString:n,action:"om",data:t,onComplete:i})},t.prototype.onDisconnectCancel=function(n,t){this.tt?this.St("oc",n,null,t):this.et.push({pathString:n,action:"oc",data:null,onComplete:t})},t.prototype.St=function(n,t,i,r){var u={p:t,d:i};this.de("onDisconnect "+n,u);this.sendRequest(n,u,function(n){r&&setTimeout(function(){r(n.s,n.d)},Math.floor(0))})},t.prototype.put=function(n,t,i,r){this.putInternal("p",n,t,i,r)},t.prototype.merge=function(n,t,i,r){this.putInternal("m",n,t,i,r)},t.prototype.putInternal=function(n,t,i,r,u){var f={p:t,d:i},e;void 0!==u&&(f.h=u);this.$e.push({action:n,request:f,onComplete:r});this.Ze++;e=this.$e.length-1;this.tt?this.Tt(e):this.de("Buffering put: "+t)},t.prototype.Tt=function(n){var t=this,i=this.$e[n].action,u=this.$e[n].request,r=this.$e[n].onComplete;this.$e[n].queued=this.tt;this.sendRequest(i,u,function(u){t.de(i+" response",u);delete t.$e[n];t.Ze--;0===t.Ze&&(t.$e=[]);r&&r(u.s,u.d)})},t.prototype.reportStats=function(n){var i=this,t;this.tt&&(t={c:n},this.de("reportStats",t),this.sendRequest("s",t,function(n){if("ok"!==n.s){var t=n.d;i.de("reportStats","Error sending stats: "+t)}}))},t.prototype.wt=function(n){if("r"in n){this.de("from server: "+o.stringify(n));var t=n.r,i=this.st[t];i&&(delete this.st[t],i(n.b))}else{if("error"in n)throw"A server-side error has occurred: "+n.error;"a"in n&&this.It(n.a,n.b)}},t.prototype.It=function(n,t){this.de("handleServerMessage",n,t);"d"===n?this.ee(t.p,t.d,!1,t.t):"m"===n?this.ee(t.p,t.d,!0,t.t):"c"===n?this.Rt(t.p,t.q):"ac"===n?this.Pt(t.s,t.d):"sd"===n?this.Ot(t):r.error("Unrecognized action received from server: "+o.stringify(n)+"\nAre you using the latest client?")},t.prototype.At=function(n,t){this.de("connection ready");this.tt=!0;this._t=(new Date).getTime();this.Dt(n);this.lastSessionId=t;this.dt&&this.Mt();this.Lt();this.dt=!1;this.te(!0)},t.prototype.yt=function(n){var t=this;f.assert(!this.lt,"Scheduling a connect when we're already connected/ing?");this.ot&&clearTimeout(this.ot);this.ot=setTimeout(function(){t.ot=null;t.Ft()},Math.floor(n))},t.prototype.vt=function(n){n&&!this.at&&this.nt===this.rt&&(this.de("Window became visible.  Reducing delay."),this.nt=e,this.lt||this.yt(0));this.at=n},t.prototype.gt=function(n){n?(this.de("Browser went online."),this.nt=e,this.lt||this.yt(0)):(this.de("Browser went offline.  Killing connection."),this.lt&&this.lt.close())},t.prototype.xt=function(){var t,i,n;(this.de("data client disconnected"),this.tt=!1,this.lt=null,this.kt(),this.st={},this.Wt())&&(this.at?this._t&&(t=(new Date).getTime()-this._t,t>3e4&&(this.nt=e),this._t=null):(this.de("Window isn't visible.  Delaying reconnect."),this.nt=this.rt,this.ft=(new Date).getTime()),i=(new Date).getTime()-this.ft,n=Math.max(0,this.nt-i),n=Math.random()*n,this.de("Trying to reconnect in "+n+"ms"),this.yt(n),this.nt=Math.min(this.rt,1.3*this.nt));this.te(!1)},t.prototype.Ft=function(){var h;if(this.Wt()){this.de("Making a connection attempt");this.ft=(new Date).getTime();this._t=null;var c=this.wt.bind(this),l=this.At.bind(this),e=this.xt.bind(this),a=this.id+":"+t.jt++,n=this,v=this.lastSessionId,u=!1,i=null,o=function(){i?i.close():(u=!0,e())},y=function(n){f.assert(i,"sendRequest call when we're not connected not allowed.");i.sendRequest(n)};this.lt={close:o,sendRequest:y};h=this.ct;this.ct=!1;this.Ke.getToken(h).then(function(t){u?r.log("getToken() completed but was canceled"):(r.log("getToken() completed. Creating connection."),n.ht=t&&t.accessToken,i=new w.Connection(a,n.H,c,l,e,function(t){r.warn(t+" ("+n.H+")");n.interrupt("server_kill")},v))}).then(null,function(t){n.de("Failed to get token: "+t);u||(s.CONSTANTS.NODE_ADMIN&&r.warn(t),o())})}},t.prototype.interrupt=function(n){r.log("Interrupting connection for reason: "+n);this.ze[n]=!0;this.lt?this.lt.close():(this.ot&&(clearTimeout(this.ot),this.ot=null),this.tt&&this.xt())},t.prototype.resume=function(n){r.log("Resuming connection for reason: "+n);delete this.ze[n];u.isEmpty(this.ze)&&(this.nt=e,this.lt||this.yt(0))},t.prototype.Dt=function(n){var t=n-(new Date).getTime();this.ne({serverTimeOffset:t})},t.prototype.kt=function(){for(var n,t=0;t<this.$e.length;t++)n=this.$e[t],n&&"h"in n.request&&n.queued&&(n.onComplete&&n.onComplete("disconnect"),delete this.$e[t],this.Ze--);0===this.Ze&&(this.$e=[])},t.prototype.Rt=function(n,t){var u,i;u=t?t.map(function(n){return r.ObjectToUniqueKey(n)}).join("$"):"default";i=this.Et(n,u);i&&i.onComplete&&i.onComplete("permission_denied")},t.prototype.Et=function(n,t){var r,i=""+new y.Path(n);return void 0!==this.Je[i]?(r=this.Je[i][t],delete this.Je[i][t],0===u.getCount(this.Je[i])&&delete this.Je[i]):r=void 0,r},t.prototype.Pt=function(n,t){r.log("Auth token revoked: "+n+"/"+t);this.ht=null;this.ct=!0;this.lt.close();"invalid_token"!==n&&"permission_denied"!==n||++this.pt>=3&&(this.nt=3e4,this.Ke.notifyForInvalidToken())},t.prototype.Ot=function(n){this.it?this.it(n):"msg"in n&&"undefined"!=typeof console&&console.log("FIREBASE: "+n.msg.replace("\n","\nFIREBASE: "))},t.prototype.Lt=function(){var i=this,n,t;for(this.tryAuth(),u.forEach(this.Je,function(n,t){u.forEach(t,function(n,t){i.mt(t)})}),n=0;n<this.$e.length;n++)this.$e[n]&&this.Tt(n);for(;this.et.length;)t=this.et.shift(),this.St(t.action,t.pathString,t.data,t.onComplete)},t.prototype.Mt=function(){var n={},t="js";s.CONSTANTS.NODE_ADMIN?t="admin_node":s.CONSTANTS.NODE_CLIENT&&(t="node");n["sdk."+t+"."+v.default.SDK_VERSION.replace(/\./g,"-")]=1;h.isMobileCordova()?n["framework.cordova"]=1:h.isReactNative()&&(n["framework.reactnative"]=1);this.reportStats(n)},t.prototype.Wt=function(){var n=c.OnlineMonitor.getInstance().currentlyOnline();return u.isEmpty(this.ze)&&n},t.Xe=0,t.jt=0,t}(b.ServerActions);t.PersistentConnection=d},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(n){this.Vt=n;this.Qt={};r.assert(Array.isArray(n)&&n.length>0,"Requires a non-empty array")}return n.prototype.trigger=function(n){for(var r,i,u=[],t=1;t<arguments.length;t++)u[t-1]=arguments[t];if(Array.isArray(this.Qt[n]))for(r=this.Qt[n].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,u)},n.prototype.on=function(n,t,i){this.qt(n);this.Qt[n]=this.Qt[n]||[];this.Qt[n].push({callback:t,context:i});var r=this.getInitialEvent(n);r&&t.apply(i,r)},n.prototype.off=function(n,t,i){this.qt(n);for(var u=this.Qt[n]||[],r=0;r<u.length;r++)if(u[r].callback===t&&(!i||i===u[r].context))return void u.splice(r,1)},n.prototype.qt=function(n){r.assert(this.Vt.find(function(t){return t===n}),"Unknown event: "+n)},n}();t.EventEmitter=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=i(13),f=i(14),e=i(104),o=function(){function n(n,t,i,u,f,o,s){this.id=n;this.H=t;this.Ut=i;this.At=u;this.z=f;this.Bt=o;this.lastSessionId=s;this.connectionCount=0;this.pendingDataMessages=[];this.Ht=0;this.de=r.logWrapper("c:"+this.id+":");this.Gt=new e.TransportManager(t);this.de("Connection created");this.Kt()}return n.prototype.Kt=function(){var n=this,t=this.Gt.initialTransport(),u,f,i;this.Yt=new t(this.Xt(),this.H,void 0,this.lastSessionId);this.zt=t.responsesRequiredToBeHealthy||0;u=this.Jt(this.Yt);f=this.$t(this.Yt);this.Zt=this.Yt;this.en=this.Yt;this.tn=null;this.nn=!1;setTimeout(function(){n.Yt&&n.Yt.open(u,f)},Math.floor(0));i=t.healthyTimeout||0;i>0&&(this.rn=r.setTimeoutNonBlocking(function(){n.rn=null;n.nn||(n.Yt&&n.Yt.bytesReceived>102400?(n.de("Connection exceeded healthy timeout but has received "+n.Yt.bytesReceived+" bytes.  Marking connection healthy."),n.nn=!0,n.Yt.markConnectionHealthy()):n.Yt&&n.Yt.bytesSent>10240?n.de("Connection exceeded healthy timeout but has sent "+n.Yt.bytesSent+" bytes.  Leaving connection alive."):(n.de("Closing unhealthy connection after timeout."),n.close()))},Math.floor(i)))},n.prototype.Xt=function(){return"c:"+this.id+":"+this.connectionCount++},n.prototype.$t=function(n){var t=this;return function(i){n===t.Yt?t.in(i):n===t.tn?(t.de("Secondary connection lost."),t.an()):t.de("closing an old connection")}},n.prototype.Jt=function(n){var t=this;return function(i){2!=t.Ht&&(n===t.en?t.sn(i):n===t.tn?t.un(i):t.de("message on old connection"))}},n.prototype.sendRequest=function(n){var t={t:"d",d:n};this.ln(t)},n.prototype.tryCleanupConnection=function(){this.Zt===this.tn&&this.en===this.tn&&(this.de("cleaning up and promoting a connection: "+this.tn.connId),this.Yt=this.tn,this.tn=null)},n.prototype.hn=function(n){if("t"in n){var t=n.t;"a"===t?this.cn():"r"===t?(this.de("Got a reset on secondary, closing it"),this.tn.close(),this.Zt!==this.tn&&this.en!==this.tn||this.close()):"o"===t&&(this.de("got pong on secondary."),this.pn--,this.cn())}},n.prototype.un=function(n){var t=r.requireKey("t",n),i=r.requireKey("d",n);if("c"==t)this.hn(i);else{if("d"!=t)throw Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(i)}},n.prototype.cn=function(){this.pn<=0?(this.de("Secondary connection is healthy."),this.nn=!0,this.tn.markConnectionHealthy(),this.dn()):(this.de("sending ping on secondary."),this.tn.send({t:"c",d:{t:"p",d:{}}}))},n.prototype.dn=function(){this.tn.start();this.de("sending client ack on secondary");this.tn.send({t:"c",d:{t:"a",d:{}}});this.de("Ending transmission on primary");this.Yt.send({t:"c",d:{t:"n",d:{}}});this.Zt=this.tn;this.tryCleanupConnection()},n.prototype.sn=function(n){var t=r.requireKey("t",n),i=r.requireKey("d",n);"c"==t?this.fn(i):"d"==t&&this.wt(i)},n.prototype.wt=function(n){this._n();this.Ut(n)},n.prototype._n=function(){this.nn||--this.zt<=0&&(this.de("Primary connection is healthy."),this.nn=!0,this.Yt.markConnectionHealthy())},n.prototype.fn=function(n){var t=r.requireKey("t",n),i,u;if("d"in n)if(i=n.d,"h"===t)this.yn(i);else if("n"===t){for(this.de("recvd end transmission on primary"),this.en=this.tn,u=0;u<this.pendingDataMessages.length;++u)this.wt(this.pendingDataMessages[u]);this.pendingDataMessages=[];this.tryCleanupConnection()}else"s"===t?this.vn(i):"r"===t?this.gn(i):"e"===t?r.error("Server Error: "+i):"o"===t?(this.de("got pong on primary."),this._n(),this.mn()):r.error("Unknown control packet command: "+t)},n.prototype.yn=function(n){var t=n.ts,i=n.v,u=n.h;this.sessionId=n.s;this.H.updateHost(u);0==this.Ht&&(this.Yt.start(),this.Cn(this.Yt,t),f.PROTOCOL_VERSION!==i&&r.warn("Protocol version mismatch detected"),this.En())},n.prototype.En=function(){var n=this.Gt.upgradeTransport();n&&this.Nn(n)},n.prototype.Nn=function(n){var t=this,i,u;this.tn=new n(this.Xt(),this.H,this.sessionId);this.pn=n.responsesRequiredToBeHealthy||0;i=this.Jt(this.tn);u=this.$t(this.tn);this.tn.open(i,u);r.setTimeoutNonBlocking(function(){t.tn&&(t.de("Timed out trying to upgrade."),t.tn.close())},Math.floor(6e4))},n.prototype.gn=function(n){this.de("Reset packet received.  New host: "+n);this.H.updateHost(n);1===this.Ht?this.close():(this.Pn(),this.Kt())},n.prototype.Cn=function(n,t){var i=this;this.de("Realtime connection established.");this.Yt=n;this.Ht=1;this.At&&(this.At(t,this.sessionId),this.At=null);0===this.zt?(this.de("Primary connection is healthy."),this.nn=!0):r.setTimeoutNonBlocking(function(){i.mn()},Math.floor(5e3))},n.prototype.mn=function(){this.nn||1!==this.Ht||(this.de("sending ping on primary."),this.ln({t:"c",d:{t:"p",d:{}}}))},n.prototype.an=function(){var n=this.tn;this.tn=null;this.Zt!==n&&this.en!==n||this.close()},n.prototype.in=function(n){this.Yt=null;n||0!==this.Ht?1===this.Ht&&this.de("Realtime connection lost."):(this.de("Realtime connection failed."),this.H.isCacheableHost()&&(u.PersistentStorage.remove("host:"+this.H.host),this.H.internalHost=this.H.host));this.close()},n.prototype.vn=function(n){this.de("Connection shutdown command received. Shutting down...");this.Bt&&(this.Bt(n),this.Bt=null);this.z=null;this.close()},n.prototype.ln=function(n){if(1!==this.Ht)throw"Connection is not connected";this.Zt.send(n)},n.prototype.close=function(){2!==this.Ht&&(this.de("Closing realtime connection."),this.Ht=2,this.Pn(),this.z&&(this.z(),this.z=null))},n.prototype.Pn=function(){this.de("Shutting down all connections");this.Yt&&(this.Yt.close(),this.Yt=null);this.tn&&(this.tn.close(),this.tn=null);this.rn&&(clearTimeout(this.rn),this.rn=null)},n}();t.Connection=o},function(n,t,i){"use strict";var s,o;Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),h=i(45),c=i(25),l=i(105),u=i(14),e=i(0),f=i(0);t.FIREBASE_LONGPOLL_START_PARAM="start";t.FIREBASE_LONGPOLL_CLOSE_COMMAND="close";t.FIREBASE_LONGPOLL_COMMAND_CB_NAME="pLPCommand";t.FIREBASE_LONGPOLL_DATA_CB_NAME="pRTLPCB";t.FIREBASE_LONGPOLL_ID_PARAM="id";t.FIREBASE_LONGPOLL_PW_PARAM="pw";t.FIREBASE_LONGPOLL_SERIAL_PARAM="ser";t.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM="cb";t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM="seg";t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET="ts";t.FIREBASE_LONGPOLL_DATA_PARAM="d";t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM="disconn";t.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM="dframe";s=function(){function n(n,t,i,f){this.connId=n;this.repoInfo=t;this.transportSessionId=i;this.lastSessionId=f;this.bytesSent=0;this.bytesReceived=0;this.bn=!1;this.de=r.logWrapper(n);this.$=c.StatsManager.getCollection(t);this.urlFn=function(n){return t.connectionURL(u.LONG_POLLING,n)}}return n.prototype.open=function(n,i){var e=this;this.curSegmentNum=0;this.z=i;this.myPacketOrderer=new l.PacketReceiver(n);this.Sn=!1;this.Tn=setTimeout(function(){e.de("Timed out trying to connect.");e.wn();e.Tn=null},Math.floor(3e4));r.executeWhenDOMReady(function(){var n,i;e.Sn||(e.scriptTagHolder=new o(function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=n[0],u=n[1],f=n[2];if(n[3],n[4],e.In(n),e.scriptTagHolder)if(e.Tn&&(clearTimeout(e.Tn),e.Tn=null),e.bn=!0,r==t.FIREBASE_LONGPOLL_START_PARAM)e.id=u,e.password=f;else{if(r!==t.FIREBASE_LONGPOLL_CLOSE_COMMAND)throw Error("Unrecognized command received: "+r);u?(e.scriptTagHolder.sendNewPolls=!1,e.myPacketOrderer.closeAfter(u,function(){e.wn()})):e.wn()}},function(){for(var i,r,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];i=n[0];r=n[1];e.In(n);e.myPacketOrderer.handleResponse(i,r)},function(){e.wn()},e.urlFn),n={},n[t.FIREBASE_LONGPOLL_START_PARAM]="t",n[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=Math.floor(1e8*Math.random()),e.scriptTagHolder.uniqueCallbackIdentifier&&(n[t.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM]=e.scriptTagHolder.uniqueCallbackIdentifier),n[u.VERSION_PARAM]=u.PROTOCOL_VERSION,e.transportSessionId&&(n[u.TRANSPORT_SESSION_PARAM]=e.transportSessionId),e.lastSessionId&&(n[u.LAST_SESSION_PARAM]=e.lastSessionId),!f.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(u.FORGE_DOMAIN)&&(n[u.REFERER_PARAM]=u.FORGE_REF),i=e.urlFn(n),e.de("Connecting via long-poll to "+i),e.scriptTagHolder.addTag(i,function(){}))})},n.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password);this.addDisconnectPingFrame(this.id,this.password)},n.forceAllow=function(){n.Rn=!0},n.forceDisallow=function(){n.On=!0},n.isAvailable=function(){return n.Rn||!n.On&&"undefined"!=typeof document&&null!=document.createElement&&!r.isChromeExtensionContentScript()&&!r.isWindowsStoreApp()&&!f.isNodeSdk()},n.prototype.markConnectionHealthy=function(){},n.prototype.An=function(){this.Sn=!0;this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null);this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null);this.Tn&&(clearTimeout(this.Tn),this.Tn=null)},n.prototype.wn=function(){this.Sn||(this.de("Longpoll is closing itself"),this.An(),this.z&&(this.z(this.bn),this.z=null))},n.prototype.close=function(){this.Sn||(this.de("Longpoll is being closed."),this.An())},n.prototype.send=function(n){var t=e.stringify(n);this.bytesSent+=t.length;this.$.incrementCounter("bytes_sent",t.length);for(var f=e.base64Encode(t),i=r.splitStringBySize(f,1840),u=0;u<i.length;u++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,i.length,i[u]),this.curSegmentNum++},n.prototype.addDisconnectPingFrame=function(n,i){if(!f.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var r={};r[t.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM]="t";r[t.FIREBASE_LONGPOLL_ID_PARAM]=n;r[t.FIREBASE_LONGPOLL_PW_PARAM]=i;this.myDisconnFrame.src=this.urlFn(r);this.myDisconnFrame.style.display="none";document.body.appendChild(this.myDisconnFrame)}},n.prototype.In=function(n){var t=e.stringify(n).length;this.bytesReceived+=t;this.$.incrementCounter("bytes_received",t)},n}();t.BrowserPollConnection=s;o=function(){function n(i,u,e,o){var s,c;if(this.onDisconnect=e,this.urlFn=o,this.outstandingRequests=new h.CountedSet,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,f.isNodeSdk())this.commandCB=i,this.onMessageCB=u;else{this.uniqueCallbackIdentifier=r.LUIDGenerator();window[t.FIREBASE_LONGPOLL_COMMAND_CB_NAME+this.uniqueCallbackIdentifier]=i;window[t.FIREBASE_LONGPOLL_DATA_CB_NAME+this.uniqueCallbackIdentifier]=u;this.myIFrame=n.Dn();s="";this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,11)&&(s='<script>document.domain="'+document.domain+'";<\/script>');c="<html><body>"+s+"<\/body><\/html>";try{this.myIFrame.doc.open();this.myIFrame.doc.write(c);this.myIFrame.doc.close()}catch(n){r.log("frame writing exception");n.stack&&r.log(n.stack);r.log(n)}}}return n.Dn=function(){var n=document.createElement("iframe"),t;if(n.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(n);try{n.contentWindow.document||r.log("No IE domain setting required")}catch(i){t=document.domain;n.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return n.contentDocument?n.doc=n.contentDocument:n.contentWindow?n.doc=n.contentWindow.document:n.document&&(n.doc=n.document),n},n.prototype.close=function(){var r=this,i,e,u;(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==r.myIFrame&&(document.body.removeChild(r.myIFrame),r.myIFrame=null)},Math.floor(0))),f.isNodeSdk()&&this.myID)&&(i={},i[t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM]="t",i[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,i[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,e=this.urlFn(i),n.nodeRestRequest(e));u=this.onDisconnect;u&&(this.onDisconnect=null,u())},n.prototype.startLongPoll=function(n,t){for(this.myID=n,this.myPW=t,this.alive=!0;this.Mn(););},n.prototype.Mn=function(){var n,u;if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;n={};n[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID;n[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW;n[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;for(var f=this.urlFn(n),i="",r=0;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+30+i.length<=1870;)u=this.pendingSegs.shift(),i=i+"&"+t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+r+"="+u.seg+"&"+t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+r+"="+u.ts+"&"+t.FIREBASE_LONGPOLL_DATA_PARAM+r+"="+u.d,r++;return f+=i,this.Ln(f,this.currentSerial),!0}return!1},n.prototype.enqueueSegment=function(n,t,i){this.pendingSegs.push({seg:n,ts:t,d:i});this.alive&&this.Mn()},n.prototype.Ln=function(n,t){var i=this;this.outstandingRequests.add(t,1);var r=function(){i.outstandingRequests.remove(t);i.Mn()},u=setTimeout(r,Math.floor(25e3)),f=function(){clearTimeout(u);r()};this.addTag(n,f)},n.prototype.addTag=function(n,t){var i=this;f.isNodeSdk()?this.doNodeLongPoll(n,t):setTimeout(function(){try{if(!i.sendNewPolls)return;var u=i.myIFrame.doc.createElement("script");u.type="text/javascript";u.async=!0;u.src=n;u.onload=u.onreadystatechange=function(){var n=u.readyState;n&&"loaded"!==n&&"complete"!==n||(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),t())};u.onerror=function(){r.log("Long-poll script failed to load: "+n);i.sendNewPolls=!1;i.close()};i.myIFrame.doc.body.appendChild(u)}catch(n){}},Math.floor(1))},n}();t.FirebaseIFrameScriptHolder=o},function(n,t,i){"use strict";(function(n){function c(n){u=n}var h;Object.defineProperty(t,"__esModule",{value:!0});var l=i(6),a=i(0),e=i(1),v=i(25),r=i(14),y=i(0),f=i(13),o=i(0),s=i(0),u=null;"undefined"!=typeof MozWebSocket?u=MozWebSocket:"undefined"!=typeof WebSocket&&(u=WebSocket);t.setWebSocketImpl=c;h=function(){function t(n,i,r,u){this.connId=n;this.keepaliveTimer=null;this.frames=null;this.totalFrames=0;this.bytesSent=0;this.bytesReceived=0;this.de=e.logWrapper(this.connId);this.$=v.StatsManager.getCollection(i);this.connURL=t.Fn(i,r,u)}return t.Fn=function(n,t,i){var u={};return u[r.VERSION_PARAM]=r.PROTOCOL_VERSION,!s.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(r.FORGE_DOMAIN)&&(u[r.REFERER_PARAM]=r.FORGE_REF),t&&(u[r.TRANSPORT_SESSION_PARAM]=t),i&&(u[r.LAST_SESSION_PARAM]=i),n.connectionURL(r.WEBSOCKET,u)},t.prototype.open=function(t,i){var e=this,h;this.onDisconnect=i;this.onMessage=t;this.de("Websocket connecting to "+this.connURL);this.bn=!1;f.PersistentStorage.set("previous_websocket_failure",!0);try{if(s.isNodeSdk()){var v=y.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",c={headers:{"User-Agent":"Firebase/"+r.PROTOCOL_VERSION+"/"+l.default.SDK_VERSION+"/"+n.platform+"/"+v}},o=n.env,a=0==this.connURL.indexOf("wss://")?o.HTTPS_PROXY||o.https_proxy:o.HTTP_PROXY||o.http_proxy;a&&(c.proxy={origin:a});this.mySock=new u(this.connURL,[],c)}else this.mySock=new u(this.connURL)}catch(n){return this.de("Error instantiating WebSocket."),h=n.message||n.data,h&&this.de(h),void this.wn()}this.mySock.onopen=function(){e.de("Websocket connected.");e.bn=!0};this.mySock.onclose=function(){e.de("Websocket connection was disconnected.");e.mySock=null;e.wn()};this.mySock.onmessage=function(n){e.handleIncomingFrame(n)};this.mySock.onerror=function(n){e.de("WebSocket error.  Closing connection.");var t=n.message||n.data;t&&e.de(t);e.wn()}},t.prototype.start=function(){},t.forceDisallow=function(){t.On=!0},t.isAvailable=function(){var i=!1,r,n;return"undefined"!=typeof navigator&&navigator.userAgent&&(r=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(r),n&&n.length>1&&parseFloat(n[1])<4.4&&(i=!0)),!i&&null!==u&&!t.On},t.previouslyFailed=function(){return f.PersistentStorage.isInMemoryStorage||!0===f.PersistentStorage.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){f.PersistentStorage.remove("previous_websocket_failure")},t.prototype.xn=function(n){var t,i;if(this.frames.push(n),this.frames.length==this.totalFrames){t=this.frames.join("");this.frames=null;i=o.jsonEval(t);this.onMessage(i)}},t.prototype.kn=function(n){this.totalFrames=n;this.frames=[]},t.prototype.Wn=function(n){if(a.assert(null===this.frames,"We already have a frame buffer"),n.length<=6){var t=+n;if(!isNaN(t))return this.kn(t),null}return this.kn(1),n},t.prototype.handleIncomingFrame=function(n){var t,i;null!==this.mySock&&(t=n.data,(this.bytesReceived+=t.length,this.$.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)?this.xn(t):(i=this.Wn(t),null!==i&&this.xn(i)))},t.prototype.send=function(n){var i,t,r;for(this.resetKeepAlive(),i=o.stringify(n),this.bytesSent+=i.length,this.$.incrementCounter("bytes_sent",i.length),t=e.splitStringBySize(i,16384),t.length>1&&this.jn(t.length+""),r=0;r<t.length;r++)this.jn(t[r])},t.prototype.An=function(){this.Sn=!0;this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null);this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.wn=function(){this.Sn||(this.de("WebSocket is closing itself"),this.An(),this.onDisconnect&&(this.onDisconnect(this.bn),this.onDisconnect=null))},t.prototype.close=function(){this.Sn||(this.de("WebSocket is being closed"),this.An())},t.prototype.resetKeepAlive=function(){var n=this;clearInterval(this.keepaliveTimer);this.keepaliveTimer=setInterval(function(){n.mySock&&n.jn("0");n.resetKeepAlive()},Math.floor(45e3))},t.prototype.jn=function(n){try{this.mySock.send(n)}catch(n){this.de("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection.");setTimeout(this.wn.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}();t.WebSocketConnection=h}).call(t,i(27))},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.prototype.put=function(){},n.prototype.merge=function(){},n.prototype.refreshAuthToken=function(){},n.prototype.onDisconnectPut=function(){},n.prototype.onDisconnectMerge=function(){},n.prototype.onDisconnectCancel=function(){},n.prototype.reportStats=function(){},n}();t.ServerActions=i},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(24),e=i(3),u=i(5),r=i(4),o=function(){function n(t){this.Vn=new f.IndexedFilter(t.getIndex());this.me=t.getIndex();this.Qn=n.qn(t);this.Un=n.Bn(t)}return n.prototype.getStartPost=function(){return this.Qn},n.prototype.getEndPost=function(){return this.Un},n.prototype.matches=function(n){return this.me.compare(this.getStartPost(),n)<=0&&this.me.compare(n,this.getEndPost())<=0},n.prototype.updateChild=function(n,t,i,f,e,o){return this.matches(new u.NamedNode(t,i))||(i=r.ChildrenNode.EMPTY_NODE),this.Vn.updateChild(n,t,i,f,e,o)},n.prototype.updateFullNode=function(n,t,i){var f,o;return t.isLeafNode()&&(t=r.ChildrenNode.EMPTY_NODE),f=t.withIndex(this.me),f=f.updatePriority(r.ChildrenNode.EMPTY_NODE),o=this,t.forEachChild(e.PRIORITY_INDEX,function(n,t){o.matches(new u.NamedNode(n,t))||(f=f.updateImmediateChild(n,r.ChildrenNode.EMPTY_NODE))}),this.Vn.updateFullNode(n,f,i)},n.prototype.updatePriority=function(n){return n},n.prototype.filtersNodes=function(){return!0},n.prototype.getIndexedFilter=function(){return this.Vn},n.prototype.getIndex=function(){return this.me},n.qn=function(n){if(n.hasStart()){var t=n.getIndexStartName();return n.getIndex().makePost(n.getIndexStartValue(),t)}return n.getIndex().minPost()},n.Bn=function(n){if(n.hasEnd()){var t=n.getIndexEndName();return n.getIndex().makePost(n.getIndexEndValue(),t)}return n.getIndex().maxPost()},n}();t.RangedFilter=o},,,,,,,,,,,,,,,,,,,,,,function(n,t,i){n.exports=i(79)},function(n,t,i){"use strict";function o(t){var i=t.INTERNAL.registerService("database",function(n,t,i){return a.RepoManager.getInstance().databaseFromApp(n,i)},{Reference:f.Reference,Query:u.Query,Database:r.Database,enableLogging:e.enableLogging,INTERNAL:v,ServerValue:h,TEST_ACCESS:y},null,!0);p.isNodeSdk()&&(n.exports=i)}var s,r,u,f,e,c,l;Object.defineProperty(t,"__esModule",{value:!0});s=i(6);r=i(32);t.Database=r.Database;u=i(36);t.Query=u.Query;f=i(21);t.Reference=f.Reference;e=i(1);t.enableLogging=e.enableLogging;var a=i(26),v=i(111),y=i(112),p=i(0),h=r.Database.ServerValue;t.ServerValue=h;t.registerDatabase=o;o(s.default);c=i(22);t.DataSnapshot=c.DataSnapshot;l=i(35);t.OnDisconnect=l.OnDisconnect},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(n){this.Hn=n;this.Gn="firebase:"}return n.prototype.set=function(n,t){null==t?this.Hn.removeItem(this.Kn(n)):this.Hn.setItem(this.Kn(n),r.stringify(t))},n.prototype.get=function(n){var t=this.Hn.getItem(this.Kn(n));return null==t?null:r.jsonEval(t)},n.prototype.remove=function(n){this.Hn.removeItem(this.Kn(n))},n.prototype.Kn=function(n){return this.Gn+n},n.prototype.toString=function(){return""+this.Hn},n}();t.DOMStorageWrapper=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(){this.Yn={};this.isInMemoryStorage=!0}return n.prototype.set=function(n,t){null==t?delete this.Yn[n]:this.Yn[n]=t},n.prototype.get=function(n){return r.contains(this.Yn,n)?this.Yn[n]:null},n.prototype.remove=function(n){delete this.Yn[n]},n}();t.MemoryStorage=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(n,t){this.committed=n;this.snapshot=t}return n.prototype.toJSON=function(){return r.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},n}();t.TransactionResult=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0);t.nextPushId=function(){var t="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",i=0,n=[];return function(u){var s=u===i,f,o,e;for(i=u,o=Array(8),f=7;f>=0;f--)o[f]=t.charAt(u%64),u=Math.floor(u/64);if(r.assert(0===u,"Cannot push at time == 0"),e=o.join(""),s){for(f=11;f>=0&&63===n[f];f--)n[f]=0;n[f]++}else for(f=0;f<12;f++)n[f]=Math.floor(64*Math.random());for(f=0;f<12;f++)e+=t.charAt(n[f]);return r.assert(20===e.length,"nextPushId: Length should be 20."),e}}()},function(n,t,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});var e=i(22),u=i(85),r=i(0),f=i(0),s=function(){function n(n,t,i){this.Xn=n;this.zn=t;this.Jn=i}return n.prototype.respondsTo=function(n){return"value"===n},n.prototype.createEvent=function(n,t){var i=t.getQueryParams().getIndex();return new u.DataEvent("value",this,new e.DataSnapshot(n.snapshotNode,t.getRef(),i))},n.prototype.getEventRunner=function(n){var t=this.Jn,i,r;return"cancel"===n.getEventType()?(f.assert(this.zn,"Raising a cancel event on a listener with no cancel callback"),i=this.zn,function(){i.call(t,n.error)}):(r=this.Xn,function(){r.call(t,n.snapshot)})},n.prototype.createCancelEvent=function(n,t){return this.zn?new u.CancelEvent(this,n,t):null},n.prototype.matches=function(t){return t instanceof n&&(!t.Xn||!this.Xn||t.Xn===this.Xn&&t.Jn===this.Jn)},n.prototype.hasAnyCallback=function(){return null!==this.Xn},n}();t.ValueEventRegistration=s;o=function(){function n(n,t,i){this.$n=n;this.zn=t;this.Jn=i}return n.prototype.respondsTo=function(n){var t="children_added"===n?"child_added":n;return t="children_removed"===t?"child_removed":t,r.contains(this.$n,t)},n.prototype.createCancelEvent=function(n,t){return this.zn?new u.CancelEvent(this,n,t):null},n.prototype.createEvent=function(n,t){f.assert(null!=n.childName,"Child events should have a childName.");var i=t.getRef().child(n.childName),r=t.getQueryParams().getIndex();return new u.DataEvent(n.type,this,new e.DataSnapshot(n.snapshotNode,i,r),n.prevName)},n.prototype.getEventRunner=function(n){var t=this.Jn,i,r;return"cancel"===n.getEventType()?(f.assert(this.zn,"Raising a cancel event on a listener with no cancel callback"),i=this.zn,function(){i.call(t,n.error)}):(r=this.$n[n.eventType],function(){r.call(t,n.snapshot,n.prevName)})},n.prototype.matches=function(t){var f,i,u;if(t instanceof n){if(!this.$n||!t.$n)return!0;if(this.Jn===t.Jn&&(f=r.getCount(t.$n),f===r.getCount(this.$n)))return 1===f?(i=r.getAnyKey(t.$n),u=r.getAnyKey(this.$n),!(u!==i||t.$n[i]&&this.$n[u]&&t.$n[i]!==this.$n[u])):r.every(this.$n,function(n,i){return t.$n[n]===i})}return!1},n.prototype.hasAnyCallback=function(){return null!==this.$n},n}();t.ChildEventRegistration=o},function(n,t,i){"use strict";var r,u,f;Object.defineProperty(t,"__esModule",{value:!0});r=i(0);u=function(){function n(n,t,i,r){this.eventType=n;this.eventRegistration=t;this.snapshot=i;this.prevName=r}return n.prototype.getPath=function(){var n=this.snapshot.getRef();return"value"===this.eventType?n.path:n.getParent().path},n.prototype.getEventType=function(){return this.eventType},n.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},n.prototype.toString=function(){return this.getPath()+":"+this.eventType+":"+r.stringify(this.snapshot.exportVal())},n}();t.DataEvent=u;f=function(){function n(n,t,i){this.eventRegistration=n;this.error=t;this.path=i}return n.prototype.getPath=function(){return this.path},n.prototype.getEventType=function(){return"cancel"},n.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},n.prototype.toString=function(){return this.path+":cancel"},n}();t.CancelEvent=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=i(0),a=i(1),v=i(87),c=i(4),o=i(0),f=i(23),l=i(88),s=i(89),u=i(8),h=i(46),r=i(2),y=i(47),p=i(95),w=function(){function n(n){this.Zn=n;this.er=f.ImmutableTree.Empty;this.tr=new p.WriteTree;this.nr={};this.rr={}}return n.prototype.applyUserOverwrite=function(n,t,i,r){return this.tr.addOverwrite(n,t,i,r),r?this.ir(new h.Overwrite(u.OperationSource.User,n,t)):[]},n.prototype.applyUserMerge=function(n,t,i){this.tr.addMerge(n,t,i);var r=f.ImmutableTree.fromObject(t);return this.ir(new s.Merge(u.OperationSource.User,n,r))},n.prototype.ackUserWrite=function(n,t){var u,i;return(void 0===t&&(t=!1),u=this.tr.getWrite(n),this.tr.removeWrite(n))?(i=f.ImmutableTree.Empty,null!=u.snap?i=i.set(r.Path.Empty,!0):o.forEach(u.children,function(n,t){i=i.set(new r.Path(n),t)}),this.ir(new v.AckUserWrite(u.path,i,t))):[]},n.prototype.applyServerOverwrite=function(n,t){return this.ir(new h.Overwrite(u.OperationSource.Server,n,t))},n.prototype.applyServerMerge=function(n,t){var i=f.ImmutableTree.fromObject(t);return this.ir(new s.Merge(u.OperationSource.Server,n,i))},n.prototype.applyListenComplete=function(n){return this.ir(new l.ListenComplete(u.OperationSource.Server,n))},n.prototype.applyTaggedQueryOverwrite=function(t,i,f){var e=this.or(f);if(null!=e){var o=n.ar(e),s=o.path,c=o.queryId,l=r.Path.relativePath(s,t),a=new h.Overwrite(u.OperationSource.forServerTaggedQuery(c),l,i);return this.sr(s,a)}return[]},n.prototype.applyTaggedQueryMerge=function(t,i,e){var o=this.or(e);if(o){var h=n.ar(o),c=h.path,l=h.queryId,a=r.Path.relativePath(c,t),v=f.ImmutableTree.fromObject(i),y=new s.Merge(u.OperationSource.forServerTaggedQuery(l),a,v);return this.sr(c,y)}return[]},n.prototype.applyTaggedListenComplete=function(t,i){var f=this.or(i);if(f){var e=n.ar(f),o=e.path,s=e.queryId,h=r.Path.relativePath(o,t),c=new l.ListenComplete(u.OperationSource.forServerTaggedQuery(s),h);return this.sr(o,c)}return[]},n.prototype.addEventRegistration=function(t,i){var o=t.path,u=null,s=!1,f,a,v,h,p,w,l,b;return this.er.foreachOnPath(o,function(n,t){var i=r.Path.relativePath(n,o);u=u||t.getCompleteServerCache(i);s=s||t.hasCompleteView()}),f=this.er.get(o),f?(s=s||f.hasCompleteView(),u=u||f.getCompleteServerCache(r.Path.Empty)):(f=new y.SyncPoint,this.er=this.er.set(o,f)),null!=u?a=!0:(a=!1,u=c.ChildrenNode.EMPTY_NODE,this.er.subtree(o).foreachChild(function(n,t){var i=t.getCompleteServerCache(r.Path.Empty);i&&(u=u.updateImmediateChild(n,i))})),v=f.viewExistsForQuery(t),v||t.getQueryParams().loadsAllData()||(h=n.ur(t),e.assert(!(h in this.rr),"View does not exist, but we have a tag"),p=n.lr(),this.rr[h]=p,this.nr["_"+p]=h),w=this.tr.childWrites(o),l=f.addEventRegistration(t,i,w,u,a),v||s||(b=f.viewForQuery(t),l=l.concat(this.hr(t,b))),l},n.prototype.removeEventRegistration=function(t,i,r){var v=this,f=t.path,e=this.er.get(f),y=[],s,u,h,c,l,a,o;if(e&&("default"===t.queryIdentifier()||e.viewExistsForQuery(t))){if(s=e.removeEventRegistration(t,i,r),e.isEmpty()&&(this.er=this.er.remove(f)),u=s.removed,y=s.events,h=-1!==u.findIndex(function(n){return n.getQueryParams().loadsAllData()}),c=this.er.findOnPath(f,function(n,t){return t.hasCompleteView()}),h&&!c&&(l=this.er.subtree(f),!l.isEmpty()))for(a=this.cr(l),o=0;o<a.length;++o){var p=a[o],w=p.getQuery(),b=this.pr(p);this.Zn.startListening(n.dr(w),this.fr(w),b.hashFn,b.onComplete)}!c&&u.length>0&&!r&&(h?this.Zn.stopListening(n.dr(t),null):u.forEach(function(t){var i=v.rr[n.ur(t)];v.Zn.stopListening(n.dr(t),i)}));this._r(u)}return y},n.prototype.calcCompleteEventCache=function(n,t){var i=this.tr,u=this.er.findOnPath(n,function(t,i){var f=r.Path.relativePath(t,n),u=i.getCompleteServerCache(f);if(u)return u});return i.calcCompleteEventCache(n,u,t,!0)},n.prototype.cr=function(n){return n.fold(function(n,t,i){if(t&&t.hasCompleteView())return[t.getCompleteView()];var r=[];return t&&(r=t.getQueryViews()),o.forEach(i,function(n,t){r=r.concat(t)}),r})},n.prototype._r=function(t){for(var r,u,f,i=0;i<t.length;++i)r=t[i],r.getQueryParams().loadsAllData()||(u=n.ur(r),f=this.rr[u],delete this.rr[u],delete this.nr["_"+f])},n.dr=function(n){return n.getQueryParams().loadsAllData()&&!n.getQueryParams().isDefault()?n.getRef():n},n.prototype.hr=function(t,i){var l=t.path,s=this.fr(t),h=this.pr(i),a=this.Zn.startListening(n.dr(t),s,h.hashFn,h.onComplete),c=this.er.subtree(l),u,r,f;if(s)e.assert(!c.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(u=c.fold(function(n,t,i){if(!n.isEmpty()&&t&&t.hasCompleteView())return[t.getCompleteView().getQuery()];var r=[];return t&&(r=r.concat(t.getQueryViews().map(function(n){return n.getQuery()}))),o.forEach(i,function(n,t){r=r.concat(t)}),r}),r=0;r<u.length;++r)f=u[r],this.Zn.stopListening(n.dr(f),this.fr(f));return a},n.prototype.pr=function(n){var i=this,t=n.getQuery(),r=this.fr(t);return{hashFn:function(){return(n.getServerCache()||c.ChildrenNode.EMPTY_NODE).hash()},onComplete:function(n){if("ok"===n)return r?i.applyTaggedListenComplete(t.path,r):i.applyListenComplete(t.path);var u=a.errorForServerCode(n,t);return i.removeEventRegistration(t,null,u)}}},n.ur=function(n){return n.path+"$"+n.queryIdentifier()},n.ar=function(n){var t=n.indexOf("$");return e.assert(-1!==t&&t<n.length-1,"Bad queryKey."),{queryId:n.substr(t+1),path:new r.Path(n.substr(0,t))}},n.prototype.or=function(n){return this.nr["_"+n]},n.prototype.fr=function(t){var i=n.ur(t);return o.safeGet(this.rr,i)},n.lr=function(){return n.yr++},n.prototype.sr=function(n,t){var i=this.er.get(n),r;return e.assert(i,"Missing sync point for query tag that we're tracking"),r=this.tr.childWrites(n),i.applyOperation(t,r,null)},n.prototype.ir=function(n){return this.vr(n,this.er,null,this.tr.childWrites(r.Path.Empty))},n.prototype.vr=function(n,t,i,u){var f,c,l;if(n.path.isEmpty())return this.gr(n,t,i,u);f=t.get(r.Path.Empty);null==i&&null!=f&&(i=f.getCompleteServerCache(r.Path.Empty));var e=[],o=n.path.getFront(),s=n.operationForChild(o),h=t.children.get(o);return h&&s&&(c=i?i.getImmediateChild(o):null,l=u.child(o),e=e.concat(this.vr(s,h,c,l))),f&&(e=e.concat(f.applyOperation(n,u,i))),e},n.prototype.gr=function(n,t,i,u){var o=this,e=t.get(r.Path.Empty),f;return null==i&&null!=e&&(i=e.getCompleteServerCache(r.Path.Empty)),f=[],t.children.inorderTraversal(function(t,r){var s=i?i.getImmediateChild(t):null,h=u.child(t),e=n.operationForChild(t);e&&(f=f.concat(o.gr(e,r,s,h)))}),e&&(f=f.concat(e.applyOperation(n,u,i))),f},n.yr=1,n}();t.SyncTree=w},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=i(2),f=i(8),e=function(){function n(n,t,i){this.path=n;this.affectedTree=t;this.revert=i;this.type=f.OperationType.ACK_USER_WRITE;this.source=f.OperationSource.User}return n.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return r.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var i=this.affectedTree.subtree(new u.Path(t));return new n(u.Path.Empty,i,this.revert)}return r.assert(this.path.getFront()===t,"operationForChild called for unrelated child."),new n(this.path.popFront(),this.affectedTree,this.revert)},n}();t.AckUserWrite=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),u=i(8),f=function(){function n(n,t){this.source=n;this.path=t;this.type=u.OperationType.LISTEN_COMPLETE}return n.prototype.operationForChild=function(){return this.path.isEmpty()?new n(this.source,r.Path.Empty):new n(this.source,this.path.popFront())},n}();t.ListenComplete=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(8),f=i(46),r=i(2),e=i(0),o=function(){function n(n,t,i){this.source=n;this.path=t;this.children=i;this.type=u.OperationType.MERGE}return n.prototype.operationForChild=function(t){if(this.path.isEmpty()){var i=this.children.subtree(new r.Path(t));return i.isEmpty()?null:i.value?new f.Overwrite(this.source,r.Path.Empty,i.value):new n(this.source,r.Path.Empty,i)}return e.assert(this.path.getFront()===t,"Can't get a merge for a child not on the path of the operation"),new n(this.source,this.path.popFront(),this.children)},n.prototype.toString=function(){return"Operation("+this.path+": "+this.source+" merge: "+this.children+")"},n}();t.Merge=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(24),s=i(91),u=i(4),f=i(19),h=i(48),c=i(94),r=i(0),l=i(8),e=i(9),a=i(3),v=function(){function n(n,t){this.mr=n;this.Cr=[];var r=this.mr.getQueryParams(),e=new o.IndexedFilter(r.getIndex()),i=r.getNodeFilter();this.Er=new s.ViewProcessor(i);var l=t.getServerCache(),a=t.getEventCache(),v=e.updateFullNode(u.ChildrenNode.EMPTY_NODE,l.getNode(),null),y=i.updateFullNode(u.ChildrenNode.EMPTY_NODE,a.getNode(),null),p=new f.CacheNode(v,l.isFullyInitialized(),e.filtersNodes()),w=new f.CacheNode(y,a.isFullyInitialized(),i.filtersNodes());this.Nr=new h.ViewCache(w,p);this.Pr=new c.EventGenerator(this.mr)}return n.prototype.getQuery=function(){return this.mr},n.prototype.getServerCache=function(){return this.Nr.getServerCache().getNode()},n.prototype.getCompleteServerCache=function(n){var t=this.Nr.getCompleteServerSnap();return t&&(this.mr.getQueryParams().loadsAllData()||!n.isEmpty()&&!t.getImmediateChild(n.getFront()).isEmpty())?t.getChild(n):null},n.prototype.isEmpty=function(){return 0===this.Cr.length},n.prototype.addEventRegistration=function(n){this.Cr.push(n)},n.prototype.removeEventRegistration=function(n,t){var e=[],o,i,u,f;if(t&&(r.assert(null==n,"A cancel should cancel all event registrations."),o=this.mr.path,this.Cr.forEach(function(n){t=t;var i=n.createCancelEvent(t,o);i&&e.push(i)})),n){for(i=[],u=0;u<this.Cr.length;++u)if(f=this.Cr[u],f.matches(n)){if(n.hasAnyCallback()){i=i.concat(this.Cr.slice(u+1));break}}else i.push(f);this.Cr=i}else this.Cr=[];return e},n.prototype.applyOperation=function(n,t,i){n.type===l.OperationType.MERGE&&null!==n.source.queryId&&(r.assert(this.Nr.getCompleteServerSnap(),"We should always have a full cache before handling merges"),r.assert(this.Nr.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var f=this.Nr,u=this.Er.applyOperation(f,n,t,i);return this.Er.assertIndexed(u.viewCache),r.assert(u.viewCache.getServerCache().isFullyInitialized()||!f.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.Nr=u.viewCache,this.br(u.changes,u.viewCache.getEventCache().getNode(),null)},n.prototype.getInitialEvents=function(n){var t=this.Nr.getEventCache(),i=[];return t.getNode().isLeafNode()||t.getNode().forEachChild(a.PRIORITY_INDEX,function(n,t){i.push(e.Change.childAddedChange(n,t))}),t.isFullyInitialized()&&i.push(e.Change.valueChange(t.getNode())),this.br(i,t.getNode(),n)},n.prototype.br=function(n,t,i){var r=i?[i]:this.Cr;return this.Pr.generateEventsForChanges(n,t,r)},n}();t.View=v},function(n,t,i){"use strict";var c;Object.defineProperty(t,"__esModule",{value:!0});var e=i(8),r=i(0),l=i(92),a=i(9),u=i(4),v=i(10),s=i(23),o=i(2),f=i(93),h=function(){function n(n,t){this.viewCache=n;this.changes=t}return n}();t.ProcessorResult=h;c=function(){function n(n){this.Sr=n}return n.prototype.assertIndexed=function(n){r.assert(n.getEventCache().getNode().isIndexed(this.Sr.getIndex()),"Event snap not indexed");r.assert(n.getServerCache().getNode().isIndexed(this.Sr.getIndex()),"Server snap not indexed")},n.prototype.applyOperation=function(t,i,u,f){var s,y,c=new l.ChildChangeAccumulator,o,a,v,p;if(i.type===e.OperationType.OVERWRITE)o=i,o.source.fromUser?s=this.Tr(t,o.path,o.snap,u,f,c):(r.assert(o.source.fromServer,"Unknown source."),y=o.source.tagged||t.getServerCache().isFiltered()&&!o.path.isEmpty(),s=this.wr(t,o.path,o.snap,u,f,y,c));else if(i.type===e.OperationType.MERGE)a=i,a.source.fromUser?s=this.Ir(t,a.path,a.children,u,f,c):(r.assert(a.source.fromServer,"Unknown source."),y=a.source.tagged||t.getServerCache().isFiltered(),s=this.Rr(t,a.path,a.children,u,f,y,c));else if(i.type===e.OperationType.ACK_USER_WRITE)v=i,s=v.revert?this.Or(t,v.path,u,f,c):this.Ar(t,v.path,v.affectedTree,u,f,c);else{if(i.type!==e.OperationType.LISTEN_COMPLETE)throw r.assertionError("Unknown operation type: "+i.type);s=this.Dr(t,i.path,u,c)}return p=c.getChanges(),n.Mr(t,s,p),new h(s,p)},n.Mr=function(n,t,i){var r=t.getEventCache(),f,u;r.isFullyInitialized()&&(f=r.getNode().isLeafNode()||r.getNode().isEmpty(),u=n.getCompleteEventSnap(),(i.length>0||!n.getEventCache().isFullyInitialized()||f&&!r.getNode().equals(u)||!r.getNode().getPriority().equals(u.getPriority()))&&i.push(a.Change.valueChange(t.getCompleteEventSnap())))},n.prototype.Lr=function(n,t,i,f,e){var o=n.getEventCache(),h,c,b,s,a,v,y,l,p;if(null!=i.shadowingWrite(t))return n;if(h=void 0,c=void 0,t.isEmpty())if(r.assert(n.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),n.getServerCache().isFiltered()){var w=n.getCompleteServerSnap(),k=w instanceof u.ChildrenNode?w:u.ChildrenNode.EMPTY_NODE,d=i.calcCompleteEventChildren(k);h=this.Sr.updateFullNode(n.getEventCache().getNode(),d,e)}else b=i.calcCompleteEventCache(n.getCompleteServerSnap()),h=this.Sr.updateFullNode(n.getEventCache().getNode(),b,e);else s=t.getFront(),".priority"==s?(r.assert(1==t.getLength(),"Can't have a priority with additional path components"),a=o.getNode(),c=n.getServerCache().getNode(),v=i.calcEventCacheAfterServerOverwrite(t,a,c),h=null!=v?this.Sr.updatePriority(a,v):o.getNode()):(y=t.popFront(),l=void 0,o.isCompleteForChild(s)?(c=n.getServerCache().getNode(),p=i.calcEventCacheAfterServerOverwrite(t,o.getNode(),c),l=null!=p?o.getNode().getImmediateChild(s).updateChild(y,p):o.getNode().getImmediateChild(s)):l=i.calcCompleteChild(s,n.getServerCache()),h=null!=l?this.Sr.updateChild(o.getNode(),s,l,y,f,e):o.getNode());return n.updateEventSnap(h,o.isFullyInitialized()||t.isEmpty(),this.Sr.filtersNodes())},n.prototype.wr=function(n,t,i,r,u,e,o){var c,s=n.getServerCache(),h=e?this.Sr:this.Sr.getIndexedFilter(),v,l,a,w;if(t.isEmpty())c=h.updateFullNode(s.getNode(),i,null);else if(h.filtersNodes()&&!s.isFiltered())v=s.getNode().updateChild(t,i),c=h.updateFullNode(s.getNode(),v,null);else{if(l=t.getFront(),!s.isCompleteForPath(t)&&t.getLength()>1)return n;var y=t.popFront(),b=s.getNode().getImmediateChild(l),p=b.updateChild(y,i);c=".priority"==l?h.updatePriority(s.getNode(),p):h.updateChild(s.getNode(),l,p,y,f.NO_COMPLETE_CHILD_SOURCE,null)}return a=n.updateServerSnap(c,s.isFullyInitialized()||t.isEmpty(),h.filtersNodes()),w=new f.WriteTreeCompleteChildSource(r,a,u),this.Lr(a,t,r,w,o)},n.prototype.Tr=function(n,t,i,r,e,o){var s,v,h=n.getEventCache(),p=new f.WriteTreeCompleteChildSource(r,n,e),c,a,w;if(t.isEmpty())v=this.Sr.updateFullNode(n.getEventCache().getNode(),i,o),s=n.updateEventSnap(v,!0,this.Sr.filtersNodes());else if(c=t.getFront(),".priority"===c)v=this.Sr.updatePriority(n.getEventCache().getNode(),i),s=n.updateEventSnap(v,h.isFullyInitialized(),h.isFiltered());else{var l=t.popFront(),b=h.getNode().getImmediateChild(c),y=void 0;l.isEmpty()?y=i:(a=p.getCompleteChild(c),y=null!=a?".priority"===l.getBack()&&a.getChild(l.parent()).isEmpty()?a:a.updateChild(l,i):u.ChildrenNode.EMPTY_NODE);b.equals(y)?s=n:(w=this.Sr.updateChild(h.getNode(),c,y,l,p,o),s=n.updateEventSnap(w,h.isFullyInitialized(),this.Sr.filtersNodes()))}return s},n.Fr=function(n,t){return n.getEventCache().isCompleteForChild(t)},n.prototype.Ir=function(t,i,r,u,f,e){var s=this,o=t;return r.foreach(function(r,h){var c=i.child(r);n.Fr(t,c.getFront())&&(o=s.Tr(o,c,h,u,f,e))}),r.foreach(function(r,h){var c=i.child(r);n.Fr(t,c.getFront())||(o=s.Tr(o,c,h,u,f,e))}),o},n.prototype.xr=function(n,t){return t.foreach(function(t,i){n=n.updateChild(t,i)}),n},n.prototype.Rr=function(n,t,i,r,u,f,e){var c=this,l,h,a;return n.getServerCache().getNode().isEmpty()&&!n.getServerCache().isFullyInitialized()?n:(h=n,l=t.isEmpty()?i:s.ImmutableTree.Empty.setTree(t,i),a=n.getServerCache().getNode(),l.children.inorderTraversal(function(t,i){if(a.hasChild(t)){var s=n.getServerCache().getNode().getImmediateChild(t),l=c.xr(s,i);h=c.wr(h,new o.Path(t),l,r,u,f,e)}}),l.children.inorderTraversal(function(t,i){var v=!n.getServerCache().isCompleteForChild(t)&&null==i.value,s,l;a.hasChild(t)||v||(s=n.getServerCache().getNode().getImmediateChild(t),l=c.xr(s,i),h=c.wr(h,new o.Path(t),l,r,u,f,e))}),h)},n.prototype.Ar=function(n,t,i,r,u,f){var h,e,c,l;return null!=r.shadowingWrite(t)?n:(h=n.getServerCache().isFiltered(),e=n.getServerCache(),null!=i.value)?t.isEmpty()&&e.isFullyInitialized()||e.isCompleteForPath(t)?this.wr(n,t,e.getNode().getChild(t),r,u,h,f):t.isEmpty()?(c=s.ImmutableTree.Empty,e.getNode().forEachChild(v.KEY_INDEX,function(n,t){c=c.set(new o.Path(n),t)}),this.Rr(n,t,c,r,u,h,f)):n:(l=s.ImmutableTree.Empty,i.foreach(function(n){var i=t.child(n);e.isCompleteForPath(i)&&(l=l.set(n,e.getNode().getChild(i)))}),this.Rr(n,t,l,r,u,h,f))},n.prototype.Dr=function(n,t,i,r){var u=n.getServerCache(),e=n.updateServerSnap(u.getNode(),u.isFullyInitialized()||t.isEmpty(),u.isFiltered());return this.Lr(e,t,i,f.NO_COMPLETE_CHILD_SOURCE,r)},n.prototype.Or=function(n,t,i,e,s){var a,l,p,h,y;if(null!=i.shadowingWrite(t))return n;var w=new f.WriteTreeCompleteChildSource(i,n,e),v=n.getEventCache().getNode(),c=void 0;return t.isEmpty()||".priority"===t.getFront()?(l=void 0,n.getServerCache().isFullyInitialized()?l=i.calcCompleteEventCache(n.getCompleteServerSnap()):(p=n.getServerCache().getNode(),r.assert(p instanceof u.ChildrenNode,"serverChildren would be complete if leaf node"),l=i.calcCompleteEventChildren(p)),l=l,c=this.Sr.updateFullNode(v,l,s)):(h=t.getFront(),y=i.calcCompleteChild(h,n.getServerCache()),null==y&&n.getServerCache().isCompleteForChild(h)&&(y=v.getImmediateChild(h)),c=null!=y?this.Sr.updateChild(v,h,y,t.popFront(),w,s):n.getEventCache().getNode().hasChild(h)?this.Sr.updateChild(v,h,u.ChildrenNode.EMPTY_NODE,t.popFront(),w,s):v,c.isEmpty()&&n.getServerCache().isFullyInitialized()&&(a=i.calcCompleteEventCache(n.getCompleteServerSnap()),a.isLeafNode()&&(c=this.Sr.updateFullNode(c,a,s)))),a=n.getServerCache().isFullyInitialized()||null!=i.shadowingWrite(o.Path.Empty),n.updateEventSnap(c,a,this.Sr.filtersNodes())},n}();t.ViewProcessor=c},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(0),r=i(9),u=i(0),e=function(){function n(){this.kr={}}return n.prototype.trackChildChange=function(n){var i=n.type,t=n.childName,e,o;if(u.assert(i==r.Change.CHILD_ADDED||i==r.Change.CHILD_CHANGED||i==r.Change.CHILD_REMOVED,"Only child changes supported for tracking"),u.assert(".priority"!==t,"Only non-priority child changes can be tracked."),e=f.safeGet(this.kr,t),e)if(o=e.type,i==r.Change.CHILD_ADDED&&o==r.Change.CHILD_REMOVED)this.kr[t]=r.Change.childChangedChange(t,n.snapshotNode,e.snapshotNode);else if(i==r.Change.CHILD_REMOVED&&o==r.Change.CHILD_ADDED)delete this.kr[t];else if(i==r.Change.CHILD_REMOVED&&o==r.Change.CHILD_CHANGED)this.kr[t]=r.Change.childRemovedChange(t,e.oldSnap);else if(i==r.Change.CHILD_CHANGED&&o==r.Change.CHILD_ADDED)this.kr[t]=r.Change.childAddedChange(t,n.snapshotNode);else{if(i!=r.Change.CHILD_CHANGED||o!=r.Change.CHILD_CHANGED)throw u.assertionError("Illegal combination of changes: "+n+" occurred after "+e);this.kr[t]=r.Change.childChangedChange(t,n.snapshotNode,e.oldSnap)}else this.kr[t]=n},n.prototype.getChanges=function(){return f.getValues(this.kr)},n}();t.ChildChangeAccumulator=e},function(n,t,i){"use strict";var u,r,f;Object.defineProperty(t,"__esModule",{value:!0});u=i(19);r=function(){function n(){}return n.prototype.getCompleteChild=function(){return null},n.prototype.getChildAfterChild=function(){return null},n}();t.Wr=r;t.NO_COMPLETE_CHILD_SOURCE=new r;f=function(){function n(n,t,i){void 0===i&&(i=null);this.jr=n;this.Nr=t;this.Vr=i}return n.prototype.getCompleteChild=function(n){var t=this.Nr.getEventCache(),i;return t.isCompleteForChild(n)?t.getNode().getImmediateChild(n):(i=null!=this.Vr?new u.CacheNode(this.Vr,!0,!1):this.Nr.getServerCache(),this.jr.calcCompleteChild(n,i))},n.prototype.getChildAfterChild=function(n,t,i){var u=null!=this.Vr?this.Vr:this.Nr.getCompleteServerSnap(),r=this.jr.calcIndexedSlice(u,t,1,i,n);return 0===r.length?null:r[0]},n}();t.WriteTreeCompleteChildSource=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(5),r=i(9),f=i(0),e=function(){function n(n){this.mr=n;this.me=this.mr.getQueryParams().getIndex()}return n.prototype.generateEventsForChanges=function(n,t,i){var e=this,u=[],f=[];return n.forEach(function(n){n.type===r.Change.CHILD_CHANGED&&e.me.indexedValueChanged(n.oldSnap,n.snapshotNode)&&f.push(r.Change.childMovedChange(n.childName,n.snapshotNode))}),this.Qr(u,r.Change.CHILD_REMOVED,n,i,t),this.Qr(u,r.Change.CHILD_ADDED,n,i,t),this.Qr(u,r.Change.CHILD_MOVED,f,i,t),this.Qr(u,r.Change.CHILD_CHANGED,n,i,t),this.Qr(u,r.Change.VALUE,n,i,t),u},n.prototype.Qr=function(n,t,i,r,u){var f=this,e=i.filter(function(n){return n.type===t});e.sort(this.qr.bind(this));e.forEach(function(t){var i=f.Ur(t,u);r.forEach(function(r){r.respondsTo(t.type)&&n.push(r.createEvent(i,f.mr))})})},n.prototype.Ur=function(n,t){return"value"===n.type||"child_removed"===n.type?n:(n.prevName=t.getPredecessorChildName(n.childName,n.snapshotNode,this.me),n)},n.prototype.qr=function(n,t){if(null==n.childName||null==t.childName)throw f.assertionError("Should only compare child_ events.");var i=new u.NamedNode(n.childName,n.snapshotNode),r=new u.NamedNode(t.childName,t.snapshotNode);return this.me.compare(i,r)},n}();t.EventGenerator=e},function(n,t,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});var f=i(0),u=i(0),r=i(2),s=i(96),h=i(3),e=i(4),c=function(){function n(){this.Br=s.CompoundWrite.Empty;this.Hr=[];this.Gr=-1}return n.prototype.childWrites=function(n){return new o(n,this)},n.prototype.addOverwrite=function(n,t,i,r){u.assert(i>this.Gr,"Stacking an older write on top of newer ones");void 0===r&&(r=!0);this.Hr.push({path:n,snap:t,writeId:i,visible:r});r&&(this.Br=this.Br.addWrite(n,t));this.Gr=i},n.prototype.addMerge=function(n,t,i){u.assert(i>this.Gr,"Stacking an older merge on top of newer ones");this.Hr.push({path:n,children:t,writeId:i,visible:!0});this.Br=this.Br.addWrites(n,t);this.Gr=i},n.prototype.getWrite=function(n){for(var i,t=0;t<this.Hr.length;t++)if(i=this.Hr[t],i.writeId===n)return i;return null},n.prototype.removeWrite=function(n){var s=this,i=this.Hr.findIndex(function(t){return t.writeId===n}),t,e,c;u.assert(i>=0,"removeWrite called with nonexistent writeId.");t=this.Hr[i];this.Hr.splice(i,1);for(var o=t.visible,h=!1,r=this.Hr.length-1;o&&r>=0;)e=this.Hr[r],e.visible&&(r>=i&&this.Kr(e,t.path)?o=!1:t.path.contains(e.path)&&(h=!0)),r--;return o?h?(this.Yr(),!0):(t.snap?this.Br=this.Br.removeWrite(t.path):(c=t.children,f.forEach(c,function(n){s.Br=s.Br.removeWrite(t.path.child(n))})),!0):!1},n.prototype.getCompleteWriteData=function(n){return this.Br.getCompleteNode(n)},n.prototype.calcCompleteEventCache=function(t,i,u,f){var h,c,s,o;if(u||f){if(h=this.Br.childCompoundWrite(t),!f&&h.isEmpty())return i;if(f||null!=i||h.hasCompleteWrite(r.Path.Empty)){var l=function(n){return(n.visible||f)&&(!u||!~u.indexOf(n.writeId))&&(n.path.contains(t)||t.contains(n.path))},a=n.Xr(this.Hr,l,t),o=i||e.ChildrenNode.EMPTY_NODE;return a.apply(o)}return null}return(c=this.Br.getCompleteNode(t),null!=c)?c:(s=this.Br.childCompoundWrite(t),s.isEmpty())?i:null!=i||s.hasCompleteWrite(r.Path.Empty)?(o=i||e.ChildrenNode.EMPTY_NODE,s.apply(o)):null},n.prototype.calcCompleteEventChildren=function(n,t){var i=e.ChildrenNode.EMPTY_NODE,u=this.Br.getCompleteNode(n),f;return u?(u.isLeafNode()||u.forEachChild(h.PRIORITY_INDEX,function(n,t){i=i.updateImmediateChild(n,t)}),i):t?(f=this.Br.childCompoundWrite(n),t.forEachChild(h.PRIORITY_INDEX,function(n,t){var u=f.childCompoundWrite(new r.Path(n)).apply(t);i=i.updateImmediateChild(n,u)}),f.getCompleteChildren().forEach(function(n){i=i.updateImmediateChild(n.name,n.node)}),i):(this.Br.childCompoundWrite(n).getCompleteChildren().forEach(function(n){i=i.updateImmediateChild(n.name,n.node)}),i)},n.prototype.calcEventCacheAfterServerOverwrite=function(n,t,i,r){var f,e;return(u.assert(i||r,"Either existingEventSnap or existingServerSnap must exist"),f=n.child(t),this.Br.hasCompleteWrite(f))?null:(e=this.Br.childCompoundWrite(f),e.isEmpty()?r.getChild(t):e.apply(r.getChild(t)))},n.prototype.calcCompleteChild=function(n,t,i){var r=n.child(t),u=this.Br.getCompleteNode(r);return null!=u?u:i.isCompleteForChild(t)?this.Br.childCompoundWrite(r).apply(i.getNode().getImmediateChild(t)):null},n.prototype.shadowingWrite=function(n){return this.Br.getCompleteNode(n)},n.prototype.calcIndexedSlice=function(n,t,i,u,f,e){var o,c=this.Br.childCompoundWrite(n),l=c.getCompleteNode(r.Path.Empty);if(null!=l)o=l;else{if(null==t)return[];o=c.apply(t)}if(o=o.withIndex(e),o.isEmpty()||o.isLeafNode())return[];for(var h=[],v=e.getCompare(),a=f?o.getReverseIteratorFrom(i,e):o.getIteratorFrom(i,e),s=a.getNext();s&&h.length<u;)0!==v(s,i)&&h.push(s),s=a.getNext();return h},n.prototype.Kr=function(n,t){return n.snap?n.path.contains(t):!!f.findKey(n.children,function(i,r){return n.path.child(r).contains(t)})},n.prototype.Yr=function(){this.Br=n.Xr(this.Hr,n.zr,r.Path.Empty);this.Gr=this.Hr.length>0?this.Hr[this.Hr.length-1].writeId:-1},n.zr=function(n){return n.visible},n.Xr=function(n,t,i){for(var h,c,o,a,v,e=s.CompoundWrite.Empty,l=0;l<n.length;++l)if(h=n[l],t(h))if(c=h.path,o=void 0,h.snap)i.contains(c)?(o=r.Path.relativePath(i,c),e=e.addWrite(o,h.snap)):c.contains(i)&&(o=r.Path.relativePath(c,i),e=e.addWrite(r.Path.Empty,h.snap.getChild(o)));else{if(!h.children)throw u.assertionError("WriteRecord should have .snap or .children");i.contains(c)?(o=r.Path.relativePath(i,c),e=e.addWrites(o,h.children)):c.contains(i)&&((o=r.Path.relativePath(c,i),o.isEmpty())?e=e.addWrites(r.Path.Empty,h.children):(a=f.safeGet(h.children,o.getFront()),a&&(v=a.getChild(o.popFront()),e=e.addWrite(r.Path.Empty,v))))}return e},n}();t.WriteTree=c;o=function(){function n(n,t){this.Jr=n;this.$r=t}return n.prototype.calcCompleteEventCache=function(n,t,i){return this.$r.calcCompleteEventCache(this.Jr,n,t,i)},n.prototype.calcCompleteEventChildren=function(n){return this.$r.calcCompleteEventChildren(this.Jr,n)},n.prototype.calcEventCacheAfterServerOverwrite=function(n,t,i){return this.$r.calcEventCacheAfterServerOverwrite(this.Jr,n,t,i)},n.prototype.shadowingWrite=function(n){return this.$r.shadowingWrite(this.Jr.child(n))},n.prototype.calcIndexedSlice=function(n,t,i,r,u){return this.$r.calcIndexedSlice(this.Jr,n,t,i,r,u)},n.prototype.calcCompleteChild=function(n,t){return this.$r.calcCompleteChild(this.Jr,n,t)},n.prototype.child=function(t){return new n(this.Jr.child(t),this.$r)},n}();t.WriteTreeRef=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(23),u=i(2),e=i(0),f=i(5),o=i(3),s=i(0),h=function(){function n(n){this.$r=n}return n.prototype.addWrite=function(t,i){var f,s;if(t.isEmpty())return new n(new r.ImmutableTree(i));if(f=this.$r.findRootMostValueAndPath(t),null!=f){var o=f.path,e=f.value,h=u.Path.relativePath(o,t);return e=e.updateChild(h,i),new n(this.$r.set(o,e))}return s=new r.ImmutableTree(i),new n(this.$r.setTree(t,s))},n.prototype.addWrites=function(n,t){var i=this;return e.forEach(t,function(t,r){i=i.addWrite(n.child(t),r)}),i},n.prototype.removeWrite=function(t){return t.isEmpty()?n.Empty:new n(this.$r.setTree(t,r.ImmutableTree.Empty))},n.prototype.hasCompleteWrite=function(n){return null!=this.getCompleteNode(n)},n.prototype.getCompleteNode=function(n){var t=this.$r.findRootMostValueAndPath(n);return null!=t?this.$r.get(t.path).getChild(u.Path.relativePath(t.path,n)):null},n.prototype.getCompleteChildren=function(){var n=[],t=this.$r.value;return null!=t?t.isLeafNode()||t.forEachChild(o.PRIORITY_INDEX,function(t,i){n.push(new f.NamedNode(t,i))}):this.$r.children.inorderTraversal(function(t,i){null!=i.value&&n.push(new f.NamedNode(t,i.value))}),n},n.prototype.childCompoundWrite=function(t){if(t.isEmpty())return this;var i=this.getCompleteNode(t);return new n(null!=i?new r.ImmutableTree(i):this.$r.subtree(t))},n.prototype.isEmpty=function(){return this.$r.isEmpty()},n.prototype.apply=function(t){return n.Zr(u.Path.Empty,this.$r,t)},n.Empty=new n(new r.ImmutableTree(null)),n.Zr=function(t,i,r){if(null!=i.value)return r.updateChild(t,i.value);var u=null;return i.children.inorderTraversal(function(i,f){".priority"===i?(s.assert(null!==f.value,"Priority writes must always be leaf nodes"),u=f.value):r=n.Zr(t.child(i),f,r)}),r.getChild(t).isEmpty()||null===u||(r=r.updateChild(t.child(".priority"),u)),r},n}();t.CompoundWrite=h},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(4),u=function(){function n(){this.ei=r.ChildrenNode.EMPTY_NODE}return n.prototype.getNode=function(n){return this.ei.getChild(n)},n.prototype.updateSnapshot=function(n,t){this.ei=this.ei.updateChild(n,t)},n}();t.SnapshotHolder=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=function(){function n(n){this.ti=n}return n.prototype.getToken=function(n){return this.ti.INTERNAL.getToken(n).then(null,function(n){return n&&"auth/token-not-initialized"===n.code?(r.log("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(n)})},n.prototype.addTokenChangeListener=function(n){this.ti.INTERNAL.addAuthTokenListener(n)},n.prototype.removeTokenChangeListener=function(n){this.ti.INTERNAL.removeAuthTokenListener(n)},n.prototype.notifyForInvalidToken=function(){var n='Provided authentication credentials for the app named "'+this.ti.name+'" are invalid. This usually indicates your app was not initialized correctly. ';n+="credential"in this.ti.options?'Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.ti.options?'Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':'Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.';r.warn(n)},n}();t.AuthTokenProvider=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=i(0),f=function(){function n(){this.ni={}}return n.prototype.incrementCounter=function(n,t){void 0===t&&(t=1);u.contains(this.ni,n)||(this.ni[n]=0);this.ni[n]+=t},n.prototype.get=function(){return r.deepCopy(this.ni)},n}();t.StatsCollection=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=i(1),e=i(49),f=1e4,o=3e4,s=function(){function n(n,t){this.Z=t;this.ri={};this.G=new e.StatsListener(n);var i=f+(o-f)*Math.random();u.setTimeoutNonBlocking(this.ii.bind(this),Math.floor(i))}return n.prototype.includeStat=function(n){this.ri[n]=!0},n.prototype.ii=function(){var i=this,f=this.G.get(),n={},t=!1;r.forEach(f,function(u,f){f>0&&r.contains(i.ri,u)&&(n[u]=f,t=!0)});t&&this.Z.reportStats(n);u.setTimeoutNonBlocking(this.ii.bind(this),Math.floor(6e5*Math.random()))},n}();t.StatsReporter=s},function(n,t,i){"use strict";var r,f,u;Object.defineProperty(t,"__esModule",{value:!0});r=i(1);f=function(){function n(){this.oi=[];this.ai=0}return n.prototype.queueEvents=function(n){for(var r,f,t=null,i=0;i<n.length;i++)r=n[i],f=r.getPath(),null===t||f.equals(t.getPath())||(this.oi.push(t),t=null),null===t&&(t=new u(f)),t.add(r);t&&this.oi.push(t)},n.prototype.raiseEventsAtPath=function(n,t){this.queueEvents(t);this.si(function(t){return t.equals(n)})},n.prototype.raiseEventsForChangedPath=function(n,t){this.queueEvents(t);this.si(function(t){return t.contains(n)||n.contains(t)})},n.prototype.si=function(n){var i,t,r;for(this.ai++,i=!0,t=0;t<this.oi.length;t++)r=this.oi[t],r&&(n(r.getPath())?(this.oi[t].raise(),this.oi[t]=null):i=!1);i&&(this.oi=[]);this.ai--},n}();t.EventQueue=f;u=function(){function n(n){this.Oe=n;this.ui=[]}return n.prototype.add=function(n){this.ui.push(n)},n.prototype.raise=function(){for(var t,i,n=0;n<this.ui.length;n++)t=this.ui[n],null!==t&&(this.ui[n]=null,i=t.getEventRunner(),r.logger&&r.log("event: "+t),r.exceptionGuard(i))},n.prototype.getPath=function(){return this.Oe},n}();t.EventList=u},function(n,t,i){"use strict";var r=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(51),f=i(0),e=function(n){function t(){var i,t,r=n.call(this,["visible"])||this;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(t="visibilitychange",i="hidden"):void 0!==document.mozHidden?(t="mozvisibilitychange",i="mozHidden"):void 0!==document.msHidden?(t="msvisibilitychange",i="msHidden"):void 0!==document.webkitHidden&&(t="webkitvisibilitychange",i="webkitHidden")),r.at=!0,t&&document.addEventListener(t,function(){var n=!document[i];n!==r.at&&(r.at=n,r.trigger("visible",n))},!1),r}return r(t,n),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(n){return f.assert("visible"===n,"Unknown event type: "+n),[this.at]},t}(u.EventEmitter);t.VisibilityMonitor=e},function(n,t,i){"use strict";var r=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),f=i(51),e=i(0),o=function(n){function t(){var t=n.call(this,["online"])||this;return t.li=!0,"undefined"==typeof window||void 0===window.addEventListener||e.isMobileCordova()||(window.addEventListener("online",function(){t.li||(t.li=!0,t.trigger("online",!0))},!1),window.addEventListener("offline",function(){t.li&&(t.li=!1,t.trigger("online",!1))},!1)),t}return r(t,n),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(n){return u.assert("online"===n,"Unknown event type: "+n),[this.li]},t.prototype.currentlyOnline=function(){return this.li},t}(f.EventEmitter);t.OnlineMonitor=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(53),r=i(54),u=i(1),e=function(){function n(n){this.hi(n)}return Object.defineProperty(n,"ALL_TRANSPORTS",{get:function(){return[f.BrowserPollConnection,r.WebSocketConnection]},enumerable:!0,configurable:!0}),n.prototype.hi=function(t){var i=r.WebSocketConnection&&r.WebSocketConnection.isAvailable(),f=i&&!r.WebSocketConnection.previouslyFailed(),e;(t.webSocketOnly&&(i||u.warn("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),f=!0),f)?this.ci=[r.WebSocketConnection]:(e=this.ci=[],u.each(n.ALL_TRANSPORTS,function(n,t){t&&t.isAvailable()&&e.push(t)}))},n.prototype.initialTransport=function(){if(this.ci.length>0)return this.ci[0];throw Error("No transports available");},n.prototype.upgradeTransport=function(){return this.ci.length>1?this.ci[1]:null},n}();t.TransportManager=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=function(){function n(n){this.Ut=n;this.pendingResponses=[];this.currentResponseNum=0;this.closeAfterResponse=-1;this.onClose=null}return n.prototype.closeAfter=function(n,t){this.closeAfterResponse=n;this.onClose=t;this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},n.prototype.handleResponse=function(n,t){var u=this,i;for(this.pendingResponses[n]=t,i=this;this.pendingResponses[this.currentResponseNum]&&"break"!==function(){var t=i.pendingResponses[i.currentResponseNum],n;for(delete i.pendingResponses[i.currentResponseNum],n=0;n<t.length;++n)!function(n){t[n]&&r.exceptionGuard(function(){u.Ut(t[n])})}(n);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++}(););},n}();t.PacketReceiver=u},function(n,t,i){"use strict";var u=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=i(0),r=i(1),e=i(0),o=i(0),s=i(0),h=i(55),c=function(n){function t(t,i,u){var f=n.call(this)||this;return f.H=t,f.ee=i,f.Ke=u,f.de=r.logWrapper("p:rest:"),f.Je={},f}return u(t,n),t.prototype.reportStats=function(){throw Error("Method not implemented.");},t.pi=function(n,t){return void 0!==t?"tag$"+t:(f.assert(n.getQueryParams().isDefault(),"should have a tag if it's not a default query."),""+n.path)},t.prototype.listen=function(n,i,r,u){var h=this,f=""+n.path,e,s,c;this.de("Listen called for "+f+" "+n.queryIdentifier());e=t.pi(n,r);s={};this.Je[e]=s;c=n.getQueryParams().toRestQueryStringParameters();this.di(f+".json",c,function(n,t){var i=t,c;(404===n&&(i=null,n=null),null===n&&h.ee(f,i,!1,r),o.safeGet(h.Je,e)===s)&&(c=n?401==n?"permission_denied":"rest_error:"+n:"ok",u(c,null))})},t.prototype.unlisten=function(n,i){var r=t.pi(n,i);delete this.Je[r]},t.prototype.refreshAuthToken=function(){},t.prototype.di=function(n,t,i){var u=this;void 0===t&&(t={});t.format="export";this.Ke.getToken(!1).then(function(f){var c=f&&f.accessToken,h,o;c&&(t.auth=c);h=(u.H.secure?"https://":"http://")+u.H.host+n+"?"+s.querystring(t);u.de("Sending REST request for "+h);o=new XMLHttpRequest;o.onreadystatechange=function(){if(i&&4===o.readyState){u.de("REST Response for "+h+" received. status:",o.status,"response:",o.responseText);var n=null;if(o.status>=200&&o.status<300){try{n=e.jsonEval(o.responseText)}catch(n){r.warn("Failed to parse JSON response for "+h+": "+o.responseText)}i(null,n)}else 401!==o.status&&404!==o.status&&r.warn("Got unsuccessful REST response for "+h+" Status: "+o.status),i(o.status);i=null}};o.open("GET",h,!0);o.send()})},t}(h.ServerActions);t.ReadonlyRestClient=c},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),e=i(1),o=i(10),f=i(3),s=i(38),h=i(42),c=i(24),l=i(108),a=i(56),u=i(0),v=function(){function n(){this.fi=!1;this._i=!1;this.yi=!1;this.vi=!1;this.gi=!1;this.mi=0;this.Ci="";this.Ei=null;this.Ni="";this.Pi=null;this.bi="";this.me=f.PRIORITY_INDEX}return n.prototype.hasStart=function(){return this._i},n.prototype.isViewFromLeft=function(){return""===this.Ci?this._i:this.Ci===n.Si.VIEW_FROM_LEFT},n.prototype.getIndexStartValue=function(){return r.assert(this._i,"Only valid if start has been set"),this.Ei},n.prototype.getIndexStartName=function(){return r.assert(this._i,"Only valid if start has been set"),this.yi?this.Ni:e.MIN_NAME},n.prototype.hasEnd=function(){return this.vi},n.prototype.getIndexEndValue=function(){return r.assert(this.vi,"Only valid if end has been set"),this.Pi},n.prototype.getIndexEndName=function(){return r.assert(this.vi,"Only valid if end has been set"),this.gi?this.bi:e.MAX_NAME},n.prototype.hasLimit=function(){return this.fi},n.prototype.hasAnchoredLimit=function(){return this.fi&&""!==this.Ci},n.prototype.getLimit=function(){return r.assert(this.fi,"Only valid if limit has been set"),this.mi},n.prototype.getIndex=function(){return this.me},n.prototype.Ti=function(){var t=new n;return t.fi=this.fi,t.mi=this.mi,t._i=this._i,t.Ei=this.Ei,t.yi=this.yi,t.Ni=this.Ni,t.vi=this.vi,t.Pi=this.Pi,t.gi=this.gi,t.bi=this.bi,t.me=this.me,t.Ci=this.Ci,t},n.prototype.limit=function(n){var t=this.Ti();return t.fi=!0,t.mi=n,t.Ci="",t},n.prototype.limitToFirst=function(t){var i=this.Ti();return i.fi=!0,i.mi=t,i.Ci=n.Si.VIEW_FROM_LEFT,i},n.prototype.limitToLast=function(t){var i=this.Ti();return i.fi=!0,i.mi=t,i.Ci=n.Si.VIEW_FROM_RIGHT,i},n.prototype.startAt=function(n,t){var i=this.Ti();return i._i=!0,void 0===n&&(n=null),i.Ei=n,null!=t?(i.yi=!0,i.Ni=t):(i.yi=!1,i.Ni=""),i},n.prototype.endAt=function(n,t){var i=this.Ti();return i.vi=!0,void 0===n&&(n=null),i.Pi=n,void 0!==t?(i.gi=!0,i.bi=t):(i.gi=!1,i.bi=""),i},n.prototype.orderBy=function(n){var t=this.Ti();return t.me=n,t},n.prototype.getQueryObject=function(){var t=n.Si,i={},r;return(this._i&&(i[t.INDEX_START_VALUE]=this.Ei,this.yi&&(i[t.INDEX_START_NAME]=this.Ni)),this.vi&&(i[t.INDEX_END_VALUE]=this.Pi,this.gi&&(i[t.INDEX_END_NAME]=this.bi)),this.fi)&&(i[t.LIMIT]=this.mi,r=this.Ci,""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),i[t.VIEW_FROM]=r),this.me!==f.PRIORITY_INDEX&&(i[t.INDEX]=""+this.me),i},n.prototype.loadsAllData=function(){return!(this._i||this.vi||this.fi)},n.prototype.isDefault=function(){return this.loadsAllData()&&this.me==f.PRIORITY_INDEX},n.prototype.getNodeFilter=function(){return this.loadsAllData()?new c.IndexedFilter(this.getIndex()):this.hasLimit()?new l.LimitedFilter(this):new a.RangedFilter(this)},n.prototype.toRestQueryStringParameters=function(){var t=n.wi,i={},e;return this.isDefault()?i:(this.me===f.PRIORITY_INDEX?e=t.PRIORITY_INDEX:this.me===s.VALUE_INDEX?e=t.VALUE_INDEX:this.me===o.KEY_INDEX?e=t.KEY_INDEX:(r.assert(this.me instanceof h.PathIndex,"Unrecognized index type!"),e=""+this.me),i[t.ORDER_BY]=u.stringify(e),this._i&&(i[t.START_AT]=u.stringify(this.Ei),this.yi&&(i[t.START_AT]+=","+u.stringify(this.Ni))),this.vi&&(i[t.END_AT]=u.stringify(this.Pi),this.gi&&(i[t.END_AT]+=","+u.stringify(this.bi))),this.fi&&(this.isViewFromLeft()?i[t.LIMIT_TO_FIRST]=this.mi:i[t.LIMIT_TO_LAST]=this.mi),i)},n.Si={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},n.wi={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},n.DEFAULT=new n,n}();t.QueryParams=v},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=i(56),r=i(4),f=i(5),o=i(0),u=i(9),s=function(){function n(n){this.Ii=new e.RangedFilter(n);this.me=n.getIndex();this.mi=n.getLimit();this.Ri=!n.isViewFromLeft()}return n.prototype.updateChild=function(n,t,i,u,e,o){return this.Ii.matches(new f.NamedNode(t,i))||(i=r.ChildrenNode.EMPTY_NODE),n.getImmediateChild(t).equals(i)?n:n.numChildren()<this.mi?this.Ii.getIndexedFilter().updateChild(n,t,i,u,e,o):this.Oi(n,t,i,e,o)},n.prototype.updateFullNode=function(n,t,i){var u,e,v,o,c,f,s;if(t.isLeafNode()||t.isEmpty())u=r.ChildrenNode.EMPTY_NODE.withIndex(this.me);else if(2*this.mi<t.numChildren()&&t.isIndexed(this.me))for(u=r.ChildrenNode.EMPTY_NODE.withIndex(this.me),e=void 0,e=this.Ri?t.getReverseIteratorFrom(this.Ii.getEndPost(),this.me):t.getIteratorFrom(this.Ii.getStartPost(),this.me),o=0;e.hasNext()&&o<this.mi;){if(f=e.getNext(),s=void 0,!(s=this.Ri?this.me.compare(this.Ii.getStartPost(),f)<=0:this.me.compare(f,this.Ii.getEndPost())<=0))break;u=u.updateImmediateChild(f.name,f.node);o++}else{u=t.withIndex(this.me);u=u.updatePriority(r.ChildrenNode.EMPTY_NODE);var l=void 0,a=void 0,h=void 0,e=void 0;for(this.Ri?(e=u.getReverseIterator(this.me),l=this.Ii.getEndPost(),a=this.Ii.getStartPost(),v=this.me.getCompare(),h=function(n,t){return v(t,n)}):(e=u.getIterator(this.me),l=this.Ii.getStartPost(),a=this.Ii.getEndPost(),h=this.me.getCompare()),o=0,c=!1;e.hasNext();)f=e.getNext(),!c&&h(l,f)<=0&&(c=!0),s=c&&o<this.mi&&h(f,a)<=0,s?o++:u=u.updateImmediateChild(f.name,r.ChildrenNode.EMPTY_NODE)}return this.Ii.getIndexedFilter().updateFullNode(n,u,i)},n.prototype.updatePriority=function(n){return n},n.prototype.filtersNodes=function(){return!0},n.prototype.getIndexedFilter=function(){return this.Ii.getIndexedFilter()},n.prototype.getIndex=function(){return this.me},n.prototype.Oi=function(n,t,i,e,s){var a,w,c,y,h,k,p;this.Ri?(w=this.me.getCompare(),a=function(n,t){return w(t,n)}):a=this.me.getCompare();c=n;o.assert(c.numChildren()==this.mi,"");var v=new f.NamedNode(t,i),l=this.Ri?c.getFirstChild(this.me):c.getLastChild(this.me),b=this.Ii.matches(v);if(c.hasChild(t)){for(y=c.getImmediateChild(t),h=e.getChildAfterChild(this.me,l,this.Ri);null!=h&&(h.name==t||c.hasChild(h.name));)h=e.getChildAfterChild(this.me,h,this.Ri);return(k=null==h?1:a(h,v),b&&!i.isEmpty()&&k>=0)?(null!=s&&s.trackChildChange(u.Change.childChangedChange(t,i,y)),c.updateImmediateChild(t,i)):(null!=s&&s.trackChildChange(u.Change.childRemovedChange(t,y)),p=c.updateImmediateChild(t,r.ChildrenNode.EMPTY_NODE),null!=h&&this.Ii.matches(h)?(null!=s&&s.trackChildChange(u.Change.childAddedChange(h.name,h.node)),p.updateImmediateChild(h.name,h.node)):p)}return i.isEmpty()?n:b&&a(l,v)>=0?(null!=s&&(s.trackChildChange(u.Change.childRemovedChange(l.name,l.node)),s.trackChildChange(u.Change.childAddedChange(t,i))),c.updateImmediateChild(t,i).updateImmediateChild(l.name,r.ChildrenNode.EMPTY_NODE)):n},n}();t.LimitedFilter=s},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,f=i(0),o=i(21),s=i(22),a=i(2),w=i(110),h=i(3),e=i(1),v=i(43),c=i(7),l=i(0),y=i(11),p=i(4),u=i(18);!function(n){n[n.RUN=0]="RUN";n[n.SENT=1]="SENT";n[n.COMPLETED=2]="COMPLETED";n[n.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT";n[n.NEEDS_ABORT=4]="NEEDS_ABORT"}(r=t.TransactionStatus||(t.TransactionStatus={}));u.Repo.Ai=25;u.Repo.prototype.ie=function(){this.Di=new w.Tree};u.Repo.prototype.startTransaction=function(n,t,i,u){var k,d,w,it,g,nt,b,ft;this.de("transaction on "+n);k=function(){};d=new o.Reference(this,n);d.on("value",k);var et=function(){d.off("value",k)},a={path:n,update:t,onComplete:i,status:null,order:e.LUIDGenerator(),applyLocally:u,retryCount:0,unwatcher:et,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},tt=this.Mi(n);if(a.currentInputSnapshot=tt,w=a.update(tt.val()),void 0===w){if(a.unwatcher(),a.currentOutputSnapshotRaw=null,a.currentOutputSnapshotResolved=null,a.onComplete){it=new s.DataSnapshot(a.currentInputSnapshot,new o.Reference(this,a.path),h.PRIORITY_INDEX);a.onComplete(null,!1,it)}}else{c.validateFirebaseData("transaction failed: Data returned ",w,a.path);a.status=r.RUN;g=this.Di.subTree(n);nt=g.getValue()||[];nt.push(a);g.setValue(nt);b=void 0;"object"==typeof w&&null!==w&&l.contains(w,".priority")?(b=l.safeGet(w,".priority"),f.assert(c.isValidPriority(b),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):b=(this.ue.calcCompleteEventCache(n)||p.ChildrenNode.EMPTY_NODE).getPriority().val();b=b;var ot=this.generateServerValues(),rt=y.nodeFromJSON(w,b),ut=v.resolveDeferredValueSnapshot(rt,ot);a.currentOutputSnapshotRaw=rt;a.currentOutputSnapshotResolved=ut;a.currentWriteId=this.pe();ft=this.ue.applyUserOverwrite(n,ut,a.currentWriteId,a.applyLocally);this.K.raiseEventsForChangedPath(n,ft);this.Li()}};u.Repo.prototype.Mi=function(n,t){return this.ue.calcCompleteEventCache(n,t)||p.ChildrenNode.EMPTY_NODE};u.Repo.prototype.Li=function(n){var i=this,t;(void 0===n&&(n=this.Di),n||this.Fi(n),null!==n.getValue())?(t=this.xi(n),f.assert(t.length>0,"Sending zero length transaction queue"),t.every(function(n){return n.status===r.RUN})&&this.ki(n.path(),t)):n.hasChildren()&&n.forEachChild(function(n){i.Li(n)})};u.Repo.prototype.ki=function(n,t){for(var u,p,w,c,i=this,b=t.map(function(n){return n.currentWriteId}),y=this.Mi(n,b),l=y,k=y.hash(),v=0;v<t.length;v++)u=t[v],f.assert(u.status===r.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),u.status=r.SENT,u.retryCount++,p=a.Path.relativePath(n,u.path),l=l.updateChild(p,u.currentOutputSnapshotRaw);w=l.val(!0);c=n;this.Z.put(""+c,w,function(u){var l,a,f;if(i.de("transaction put response",{path:""+c,status:u}),l=[],"ok"===u){for(a=[],f=0;f<t.length;f++){if(t[f].status=r.COMPLETED,l=l.concat(i.ue.ackUserWrite(t[f].currentWriteId)),t[f].onComplete){var v=t[f].currentOutputSnapshotResolved,y=new o.Reference(i,t[f].path),p=new s.DataSnapshot(v,y,h.PRIORITY_INDEX);a.push(t[f].onComplete.bind(null,null,!0,p))}t[f].unwatcher()}for(i.Fi(i.Di.subTree(n)),i.Li(),i.K.raiseEventsForChangedPath(n,l),f=0;f<a.length;f++)e.exceptionGuard(a[f])}else{if("datastale"===u)for(f=0;f<t.length;f++)t[f].status=t[f].status===r.SENT_NEEDS_ABORT?r.NEEDS_ABORT:r.RUN;else for(e.warn("transaction at "+c+" failed: "+u),f=0;f<t.length;f++)t[f].status=r.NEEDS_ABORT,t[f].abortReason=u;i.le(n)}},k)};u.Repo.prototype.le=function(n){var t=this.Wi(n),i=t.path(),r=this.xi(t);return this.ji(r,i),i};u.Repo.prototype.ji=function(n,t){var tt,b,d,rt,p;if(0!==n.length){for(var g=[],w=[],et=n.filter(function(n){return n.status===r.RUN}),it=et.map(function(n){return n.currentWriteId}),p=0;p<n.length;p++){var i=n[p],ot=a.Path.relativePath(t,i.path),nt=!1,k=void 0;if(f.assert(null!==ot,"rerunTransactionsUnderNode_: relativePath should not be null."),i.status===r.NEEDS_ABORT)nt=!0,k=i.abortReason,w=w.concat(this.ue.ackUserWrite(i.currentWriteId,!0));else if(i.status===r.RUN)if(i.retryCount>=u.Repo.Ai)nt=!0,k="maxretry",w=w.concat(this.ue.ackUserWrite(i.currentWriteId,!0));else if(tt=this.Mi(i.path,it),i.currentInputSnapshot=tt,b=n[p].update(tt.val()),void 0!==b){c.validateFirebaseData("transaction failed: Data returned ",b,i.path);d=y.nodeFromJSON(b);rt="object"==typeof b&&null!=b&&l.contains(b,".priority");rt||(d=d.updatePriority(tt.getPriority()));var ut=i.currentWriteId,st=this.generateServerValues(),ft=v.resolveDeferredValueSnapshot(d,st);i.currentOutputSnapshotRaw=d;i.currentOutputSnapshotResolved=ft;i.currentWriteId=this.pe();it.splice(it.indexOf(ut),1);w=w.concat(this.ue.applyUserOverwrite(i.path,ft,i.currentWriteId,i.applyLocally));w=w.concat(this.ue.ackUserWrite(ut,!0))}else nt=!0,k="nodata",w=w.concat(this.ue.ackUserWrite(i.currentWriteId,!0));if(this.K.raiseEventsForChangedPath(t,w),w=[],nt&&(n[p].status=r.COMPLETED,function(n){setTimeout(n,Math.floor(0))}(n[p].unwatcher),n[p].onComplete))if("nodata"===k){var ht=new o.Reference(this,n[p].path),ct=n[p].currentInputSnapshot,lt=new s.DataSnapshot(ct,ht,h.PRIORITY_INDEX);g.push(n[p].onComplete.bind(null,null,!1,lt))}else g.push(n[p].onComplete.bind(null,Error(k),!1,null))}for(this.Fi(this.Di),p=0;p<g.length;p++)e.exceptionGuard(g[p]);this.Li()}};u.Repo.prototype.Wi=function(n){for(var i,t=this.Di;null!==(i=n.getFront())&&null===t.getValue();)t=t.subTree(i),n=n.popFront();return t};u.Repo.prototype.xi=function(n){var t=[];return this.Vi(n,t),t.sort(function(n,t){return n.order-t.order}),t};u.Repo.prototype.Vi=function(n,t){var u=this,r=n.getValue(),i;if(null!==r)for(i=0;i<r.length;i++)t.push(r[i]);n.forEachChild(function(n){u.Vi(n,t)})};u.Repo.prototype.Fi=function(n){var f=this,t=n.getValue(),u,i;if(t){for(u=0,i=0;i<t.length;i++)t[i].status!==r.COMPLETED&&(t[u]=t[i],u++);t.length=u;n.setValue(t.length>0?t:null)}n.forEachChild(function(n){f.Fi(n)})};u.Repo.prototype.fe=function(n){var i=this,r=this.Wi(n).path(),t=this.Di.subTree(n);return t.forEachAncestor(function(n){i.Qi(n)}),this.Qi(t),t.forEachDescendant(function(n){i.Qi(n)}),r};u.Repo.prototype.Qi=function(n){var i=n.getValue(),t;if(null!==i){for(var o=[],s=[],u=-1,t=0;t<i.length;t++)i[t].status===r.SENT_NEEDS_ABORT||(i[t].status===r.SENT?(f.assert(u===t-1,"All SENT items should be at beginning of queue."),u=t,i[t].status=r.SENT_NEEDS_ABORT,i[t].abortReason="set"):(f.assert(i[t].status===r.RUN,"Unexpected transaction status in abort"),i[t].unwatcher(),s=s.concat(this.ue.ackUserWrite(i[t].currentWriteId,!0)),i[t].onComplete&&o.push(i[t].onComplete.bind(null,Error("set"),!1,null))));for(-1===u?n.setValue(null):i.length=u+1,this.K.raiseEventsForChangedPath(n.path(),s),t=0;t<o.length;t++)e.exceptionGuard(o[t])}}},function(n,t,i){"use strict";var e;Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),r=i(2),u=i(0),f=function(){function n(){this.children={};this.childCount=0;this.value=null}return n}();t.TreeNode=f;e=function(){function n(n,t,i){void 0===n&&(n="");void 0===t&&(t=null);void 0===i&&(i=new f);this.qi=n;this.Ui=t;this._e=i}return n.prototype.subTree=function(t){for(var e,o=t instanceof r.Path?t:new r.Path(t),i=this;null!==(e=o.getFront());)i=new n(e,i,u.safeGet(i._e.children,e)||new f),o=o.popFront();return i},n.prototype.getValue=function(){return this._e.value},n.prototype.setValue=function(n){o.assert(void 0!==n,"Cannot set value to undefined");this._e.value=n;this.Bi()},n.prototype.clear=function(){this._e.value=null;this._e.children={};this._e.childCount=0;this.Bi()},n.prototype.hasChildren=function(){return this._e.childCount>0},n.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},n.prototype.forEachChild=function(t){var i=this;u.forEach(this._e.children,function(r,u){t(new n(r,i,u))})},n.prototype.forEachDescendant=function(n,t,i){t&&!i&&n(this);this.forEachChild(function(t){t.forEachDescendant(n,!0,i)});t&&i&&n(this)},n.prototype.forEachAncestor=function(n,t){for(var i=t?this:this.parent();null!==i;){if(n(i))return!0;i=i.parent()}return!1},n.prototype.forEachImmediateDescendantWithValue=function(n){this.forEachChild(function(t){null!==t.getValue()?n(t):t.forEachImmediateDescendantWithValue(n)})},n.prototype.path=function(){return new r.Path(null===this.Ui?this.qi:this.Ui.path()+"/"+this.qi)},n.prototype.name=function(){return this.qi},n.prototype.parent=function(){return this.Ui},n.prototype.Bi=function(){null!==this.Ui&&this.Ui.Hi(this.qi,this)},n.prototype.Hi=function(n,t){var i=t.isEmpty(),r=u.contains(this._e.children,n);i&&r?(delete this._e.children[n],this._e.childCount--,this.Bi()):i||r||(this._e.children[n]=t._e,this._e.childCount++,this.Bi())},n}();t.Tree=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(54),u=i(53);t.forceLongPolling=function(){r.WebSocketConnection.forceDisallow();u.BrowserPollConnection.forceAllow()};t.forceWebSockets=function(){u.BrowserPollConnection.forceDisallow()};t.isWebSocketsAvailable=function(){return r.WebSocketConnection.isAvailable()};t.setSecurityDebugCallback=function(n,t){n.repo.J.it=t};t.stats=function(n,t){n.repo.stats(t)};t.statsIncrementCounter=function(n,t){n.repo.statsIncrementCounter(t)};t.dataUpdateCount=function(n){return n.repo.dataUpdateCount};t.interceptServerData=function(n,t){return n.repo.he(t)}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(34),r=i(50),f=i(26),e=i(52);t.DataConnection=r.PersistentConnection;r.PersistentConnection.prototype.simpleListen=function(n,t){this.sendRequest("q",{p:n},t)};r.PersistentConnection.prototype.echo=function(n,t){this.sendRequest("echo",{d:n},t)};t.RealTimeConnection=e.Connection;t.hijackHash=function(n){var t=r.PersistentConnection.prototype.put;return r.PersistentConnection.prototype.put=function(i,r,u,f){void 0!==f&&(f=n());t.call(this,i,r,u,f)},function(){r.PersistentConnection.prototype.put=t}};t.ConnectionTarget=u.RepoInfo;t.queryIdentifier=function(n){return n.queryIdentifier()};t.listens=function(n){return n.repo.J.Je};t.forceRestClient=function(n){f.RepoManager.getInstance().forceRestClient(n)}}],[78])}catch(e){throw Error("Cannot instantiate firebase-database.js - be sure to load firebase-app.js first.");}try{webpackJsonpFirebase([3],{116:function(n,t,i){i(117)},117:function(n,t,i){"use strict";function k(n){var t=new Uint8Array(n);return window.btoa(String.fromCharCode.apply(null,t))}function v(n){var t=function(n){return self&&"ServiceWorkerGlobalScope"in self?new st(n):new b(n)},i={Messaging:b};n.INTERNAL.registerService("messaging",t,i)}Object.defineProperty(t,"__esModule",{value:!0});var u,s=i(0),h={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key"},d=(u={},u[h.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",u[h.AVAILABLE_IN_SW]="This method is available in a service worker context.",u["should-be-overriden"]="This method should be overriden by extended classes.",u["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",u["permission-default"]="The required permissions were not granted and dismissed instead.",u["permission-blocked"]="The required permissions were not granted and blocked instead.",u["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",u["notifications-blocked"]="Notifications have been blocked.",u[h.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",u["sw-registration-expected"]="A service worker registration was the expected input.",u["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",u["invalid-saved-token"]="Unable to access details of the saved token.",u["sw-reg-redundant"]="The service worker being used for push was made redundant.",u["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",u["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",u["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",u["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",u["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",u["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",u["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",u["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",u["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",u["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",u["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",u["failed-to-delete-token"]="Unable to delete the currently saved token.",u["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",u["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",u["bad-scope"]="The service worker scope must be a string with at least one character.",u["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",u["bad-subscription"]="The subscription must be a valid PushSubscription.",u["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",u["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",u["failed-delete-vapid-key"]="The VAPID key could not be deleted.",u),r={codes:h,map:d},o=function(n){return k(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},y=[4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110],g={userVisibleOnly:!0,applicationServerKey:new Uint8Array(y)},c={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:y,SUBSCRIPTION_OPTIONS:g},f="fcm_token_object_Store",nt=function(){function n(){this.e=new s.ErrorFactory("messaging","Messaging",r.map);this.t=null}return n.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(t,i){var r=indexedDB.open(n.DB_NAME,1);r.onerror=function(n){i(n.target.error)};r.onsuccess=function(n){t(n.target.result)};r.onupgradeneeded=function(n){var i=n.target.result,t=i.createObjectStore(f,{keyPath:"swScope"});t.createIndex("fcmSenderId","fcmSenderId",{unique:!1});t.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.t)},n.prototype.closeDatabase=function(){var n=this;return this.t?this.t.then(function(t){t.close();n.t=null}):Promise.resolve()},n.prototype.getTokenDetailsFromToken=function(n){return this.r().then(function(t){return new Promise(function(i,r){var e=t.transaction([f]),o=e.objectStore(f),s=o.index("fcmToken"),u=s.get(n);u.onerror=function(n){r(n.target.error)};u.onsuccess=function(n){i(n.target.result)}})})},n.prototype.n=function(n){return this.r().then(function(t){return new Promise(function(i,r){var e=t.transaction([f]),o=e.objectStore(f),u=o.get(n);u.onerror=function(n){r(n.target.error)};u.onsuccess=function(n){i(n.target.result)}})})},n.prototype.o=function(n){return this.r().then(function(t){return new Promise(function(i,r){var o=t.transaction([f]),s=o.objectStore(f),u=[],e=s.openCursor();e.onerror=function(n){r(n.target.error)};e.onsuccess=function(t){var r=t.target.result;r?(r.value.fcmSenderId===n&&u.push(r.value),r.continue()):i(u)}})})},n.prototype.subscribeToFCM=function(n,t,i){var u=this,h=o(t.getKey("p256dh")),l=o(t.getKey("auth")),e="authorized_entity="+n+"&endpoint="+t.endpoint+"&encryption_key="+h+"&encryption_auth="+l,f,s;return i&&(e+="&pushSet="+i),f=new Headers,f.append("Content-Type","application/x-www-form-urlencoded"),s={method:"POST",headers:f,body:e},fetch(c.ENDPOINT+"/fcm/connect/subscribe",s).then(function(n){return n.json()}).then(function(n){var t=n,i;if(t.error){i=t.error.message;throw u.e.create(r.codes.TOKEN_SUBSCRIBE_FAILED,{message:i});}if(!t.token)throw u.e.create(r.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw u.e.create(r.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},n.prototype.i=function(n,t){return n.endpoint===t.endpoint&&o(n.getKey("auth"))===t.auth&&o(n.getKey("p256dh"))===t.p256dh},n.prototype.s=function(n,t,i,r,u){var e={swScope:t.scope,endpoint:i.endpoint,auth:o(i.getKey("auth")),p256dh:o(i.getKey("p256dh")),fcmToken:r,fcmPushSet:u,fcmSenderId:n};return this.r().then(function(n){return new Promise(function(t,i){var u=n.transaction([f],"readwrite"),o=u.objectStore(f),r=o.put(e);r.onerror=function(n){i(n.target.error)};r.onsuccess=function(){t()}})})},n.prototype.getSavedToken=function(n,t){var i=this;return t instanceof ServiceWorkerRegistration?"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.BAD_SENDER_ID)):this.o(n).then(function(i){if(0!==i.length){var r=i.findIndex(function(i){return t.scope===i.swScope&&n===i.fcmSenderId});if(-1!==r)return i[r]}}).then(function(n){if(n)return t.pushManager.getSubscription().catch(function(){throw i.e.create(r.codes.GET_SUBSCRIPTION_FAILED);}).then(function(t){if(t&&i.i(t,n))return n.fcmToken})}):Promise.reject(this.e.create(r.codes.SW_REGISTRATION_EXPECTED))},n.prototype.createToken=function(n,t){var f=this,u,i;return"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.BAD_SENDER_ID)):(t instanceof ServiceWorkerRegistration)?t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe(c.SUBSCRIPTION_OPTIONS)}).then(function(t){return u=t,f.subscribeToFCM(n,u)}).then(function(r){return i=r,f.s(n,t,u,i.token,i.pushSet)}).then(function(){return i.token}):Promise.reject(this.e.create(r.codes.SW_REGISTRATION_EXPECTED))},n.prototype.deleteToken=function(n){var t=this;return"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(n).then(function(n){if(!n)throw t.e.create(r.codes.DELETE_TOKEN_NOT_FOUND);return t.r().then(function(i){return new Promise(function(u,e){var s=i.transaction([f],"readwrite"),h=s.objectStore(f),o=h.delete(n.swScope);o.onerror=function(n){e(n.target.error)};o.onsuccess=function(i){if(0===i.target.result)return void e(t.e.create(r.codes.FAILED_TO_DELETE_TOKEN));u(n)}})})})},n}(),tt=nt,l="messagingSenderId",it=function(){function n(n){var t=this;if(this.e=new s.ErrorFactory("messaging","Messaging",r.map),!n.options[l]||"string"!=typeof n.options[l])throw this.e.create(r.codes.BAD_SENDER_ID);this.a=n.options[l];this.c=new tt;this.app=n;this.INTERNAL={};this.INTERNAL.delete=function(){return t.delete}}return n.prototype.getToken=function(){var n=this,t=this.u();return"granted"!==t?"denied"===t?Promise.reject(this.e.create(r.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this._().then(function(t){return n.c.getSavedToken(n.a,t).then(function(i){return i||n.c.createToken(n.a,t)})})},n.prototype.deleteToken=function(n){var t=this;return this.c.deleteToken(n).then(function(){return t._().then(function(n){if(n)return n.pushManager.getSubscription()}).then(function(n){if(n)return n.unsubscribe()})})},n.prototype._=function(){throw this.e.create(r.codes.SHOULD_BE_INHERITED);},n.prototype.requestPermission=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.useServiceWorker=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.onMessage=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.onTokenRefresh=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.setBackgroundMessageHandler=function(){throw this.e.create(r.codes.AVAILABLE_IN_SW);},n.prototype.delete=function(){return this.c.closeDatabase()},n.prototype.u=function(){return Notification.permission},n.prototype.getTokenManager=function(){return this.c},n}(),p=it,a={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},rt=function(n,t){return i={},i[a.TYPE_OF_MSG]=n,i[a.DATA]=t,i;var i},e={PARAMS:a,TYPES_OF_MSG:{PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},createNewMsg:rt},w={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"},ut=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ft=function(n){function t(t){var i=n.call(this,t)||this;return i.d=null,i.f=Object(s.createSubscribe)(function(n){i.d=n}),i.h=null,i.p=Object(s.createSubscribe)(function(n){i.h=n}),i.l(),i}return ut(t,n),t.prototype.getToken=function(){var t=this;return this.g()?this.T().then(function(){return n.prototype.getToken.call(t)}):Promise.reject(this.e.create(r.codes.UNSUPPORTED_BROWSER))},t.prototype.T=function(){var t=this,n;return this.S?this.S:(n=document.querySelector('link[rel="manifest"]'),this.S=n?fetch(n.href).then(function(n){return n.json()}).catch(function(){return Promise.resolve()}).then(function(n){if(n&&n.gcm_sender_id&&"103953800507"!==n.gcm_sender_id)throw t.e.create(r.codes.INCORRECT_GCM_SENDER_ID);}):Promise.resolve(),this.S)},t.prototype.requestPermission=function(){var n=this;return"granted"===Notification.permission?Promise.resolve():new Promise(function(t,i){var f=function(u){return"granted"===u?t():i("denied"===u?n.e.create(r.codes.PERMISSION_BLOCKED):n.e.create(r.codes.PERMISSION_DEFAULT))},u=Notification.requestPermission(function(n){u||f(n)});u&&u.then(f)})},t.prototype.useServiceWorker=function(n){if(!(n instanceof ServiceWorkerRegistration))throw this.e.create(r.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.b)throw this.e.create(r.codes.USE_SW_BEFORE_GET_TOKEN);this.b=n},t.prototype.onMessage=function(n,t,i){return this.f(n,t,i)},t.prototype.onTokenRefresh=function(n,t,i){return this.p(n,t,i)},t.prototype.v=function(n){var i=this,t=n.installing||n.waiting||n.active;return new Promise(function(u,f){if(!t)return void f(i.e.create(r.codes.NO_SW_IN_REG));if("activated"===t.state)return void u(n);if("redundant"===t.state)return void f(i.e.create(r.codes.SW_REG_REDUNDANT));var e=function(){if("activated"===t.state)u(n);else{if("redundant"!==t.state)return;f(i.e.create(r.codes.SW_REG_REDUNDANT))}t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)})},t.prototype._=function(){var n=this;return this.b?this.v(this.b):(this.b=null,navigator.serviceWorker.register(w.path,{scope:w.scope}).catch(function(t){throw n.e.create(r.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message});}).then(function(t){return n.v(t).then(function(){return n.b=t,t.update(),t})}))},t.prototype.l=function(){var n=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){var i,r;if(t.data&&t.data[e.PARAMS.TYPE_OF_MSG]){i=t.data;switch(i[e.PARAMS.TYPE_OF_MSG]){case e.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case e.TYPES_OF_MSG.NOTIFICATION_CLICKED:r=i[e.PARAMS.DATA];n.d.next(r)}}},!1)},t.prototype.g=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(p),b=ft,et=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ot=function(n){function t(t){var i=n.call(this,t)||this;return self.addEventListener("push",function(n){return i.I(n)},!1),self.addEventListener("pushsubscriptionchange",function(n){return i.m(n)},!1),self.addEventListener("notificationclick",function(n){return i.y(n)},!1),i.N=null,i}return et(t,n),t.prototype.I=function(n){var t,i=this,r;try{t=n.data.json()}catch(n){return}r=this.w().then(function(n){var r,u;if(n){if(t.notification||i.N)return i.k(t)}else{if(r=i.O(t),r)return u=r.title||"",self.registration.showNotification(u,r);if(i.N)return i.N(t)}});n.waitUntil(r)},t.prototype.m=function(n){var t=this,i=this.getToken().then(function(n){if(!n)throw t.e.create(r.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var i=null,u=t.getTokenManager();return u.getTokenDetailsFromToken(n).then(function(n){if(!(i=n))throw t.e.create(r.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(c.SUBSCRIPTION_OPTIONS)}).then(function(n){return u.subscribeToFCM(i.fcmSenderId,n,i.fcmPushSet)}).catch(function(n){return u.deleteToken(i.fcmToken).then(function(){throw t.e.create(r.codes.UNABLE_TO_RESUBSCRIBE,{message:n});})})});n.waitUntil(i)},t.prototype.y=function(n){var u=this,t,i,r;n.notification&&n.notification.data&&n.notification.data.FCM_MSG&&(n.stopImmediatePropagation(),n.notification.close(),t=n.notification.data.FCM_MSG,i=t.notification.click_action,i&&(r=this.D(i).then(function(n){return n||self.clients.openWindow(i)}).then(function(n){if(n){t.notification;delete t.notification;var i=e.createNewMsg(e.TYPES_OF_MSG.NOTIFICATION_CLICKED,t);return u.A(n,i)}}),n.waitUntil(r)))},t.prototype.O=function(n){var t,i;if(n&&"object"==typeof n.notification)return t=Object.assign({},n.notification),t.data=(i={},i.FCM_MSG=n,i),t},t.prototype.setBackgroundMessageHandler=function(n){if(n&&"function"!=typeof n)throw this.e.create(r.codes.BG_HANDLER_FUNCTION_EXPECTED);this.N=n},t.prototype.D=function(n){var t=new URL(n).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){for(var i=null,r=0;r<n.length;r++)if(new URL(n[r].url).href===t){i=n[r];break}if(i)return i.focus(),i})},t.prototype.A=function(n,t){var i=this;return new Promise(function(u,f){if(!n)return f(i.e.create(r.codes.NO_WINDOW_CLIENT_TO_MSG));n.postMessage(t);u()})},t.prototype.w=function(){return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){return n.some(function(n){return"visible"===n.visibilityState})})},t.prototype.k=function(n){var t=this;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(i){var r=e.createNewMsg(e.TYPES_OF_MSG.PUSH_MSG_RECEIVED,n);return Promise.all(i.map(function(n){return t.A(n,r)}))})},t.prototype._=function(){return Promise.resolve(self.registration)},t}(p),st=ot,ht=i(6);t.registerMessaging=v;v(ht.firebase)}},[116])}catch(e){throw Error("Cannot instantiate firebase-messaging.js - be sure to load firebase-app.js first.");}try{webpackJsonpFirebase([2],{118:function(n,t,i){i(119)},119:function(n,t,i){"use strict";function oi(n){return"storage/"+n}function lt(){return new e(u.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function sr(n){return new e(u.OBJECT_NOT_FOUND,"Object '"+n+"' does not exist.")}function hr(n){return new e(u.QUOTA_EXCEEDED,"Quota for bucket '"+n+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function cr(){return new e(u.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function lr(n){return new e(u.UNAUTHORIZED,"User does not have permission to access '"+n+"'.")}function ar(){return new e(u.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function si(){return new e(u.CANCELED,"User canceled the upload/download.")}function vr(n){return new e(u.INVALID_URL,"Invalid URL '"+n+"'.")}function yr(n){return new e(u.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+n+"'.")}function hi(){return new e(u.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function pr(){return new e(u.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function wr(){return new e(u.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function ci(n,t,i){return new e(u.INVALID_ARGUMENT,"Invalid argument in `"+t+"` at index "+n+": "+i)}function br(n,t,i,r){var f,o;return n===t?(f=n,o=1===n?"argument":"arguments"):(f="between "+n+" and "+t,o="arguments"),new e(u.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+i+"`: Expected "+f+" "+o+", received "+r+".")}function at(){return new e(u.APP_DELETED,"The Firebase app was deleted.")}function kr(n){return new e(u.INVALID_ROOT_OPERATION,"The operation '"+n+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function d(n,t){return new e(u.INVALID_FORMAT,"String does not match format '"+n+"': "+t)}function it(n){throw new e(u.INTERNAL_ERROR,"Internal error: "+n);}function dr(n){switch(n){case f.RAW:case f.BASE64:case f.BASE64URL:case f.DATA_URL:return;default:throw"Expected one of the event types: ["+f.RAW+", "+f.BASE64+", "+f.BASE64URL+", "+f.DATA_URL+"].";}}function li(n,t){switch(n){case f.RAW:return new ri(ai(t));case f.BASE64:case f.BASE64URL:return new ri(vi(n,t));case f.DATA_URL:return new ri(nu(t),tu(t))}throw lt();}function ai(n){for(var t,u,f,e,i=[],r=0;r<n.length;r++)t=n.charCodeAt(r),t<=127?i.push(t):t<=2047?i.push(192|t>>6,128|63&t):55296==(64512&t)?(u=r<n.length-1&&56320==(64512&n.charCodeAt(r+1)),u?(f=t,e=n.charCodeAt(++r),t=65536|(1023&f)<<10|1023&e,i.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|63&t)):i.push(239,191,189)):56320==(64512&t)?i.push(239,191,189):i.push(224|t>>12,128|t>>6&63,128|63&t);return new Uint8Array(i)}function gr(n){var t;try{t=decodeURIComponent(n)}catch(n){throw d(f.DATA_URL,"Malformed data URL.");}return ai(t)}function vi(n,t){var e,h,o,c,i,u,s,r;switch(n){case f.BASE64:if(e=-1!==t.indexOf("-"),h=-1!==t.indexOf("_"),e||h){i=e?"-":"_";throw d(n,"Invalid character '"+i+"' found: is it base64url encoded?");}break;case f.BASE64URL:if(o=-1!==t.indexOf("+"),c=-1!==t.indexOf("/"),o||c){i=o?"+":"/";throw d(n,"Invalid character '"+i+"' found: is it base64 encoded?");}t=t.replace(/-/g,"+").replace(/_/g,"/")}try{u=atob(t)}catch(t){throw d(n,"Invalid character found");}for(s=new Uint8Array(u.length),r=0;r<u.length;r++)s[r]=u.charCodeAt(r);return s}function nu(n){var t=new ur(n);return t.base64?vi(f.BASE64,t.rest):gr(t.rest)}function tu(n){return new ur(n).contentType}function iu(n,t){return!!(n.length>=t.length)&&n.substring(n.length-t.length)===t}function vt(n){switch(n){case r.RUNNING:case r.PAUSING:case r.CANCELING:return c.RUNNING;case r.PAUSED:return c.PAUSED;case r.SUCCESS:return c.SUCCESS;case r.CANCELED:return c.CANCELED;case r.ERROR:default:return c.ERROR}}function ru(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function rt(n,t){for(var i in n)ru(n,i)&&t(i,n[i])}function yt(n){if(null==n)return{};var t={};return rt(n,function(n,i){t[n]=i}),t}function pt(n){return new Promise(n)}function wt(n){return Promise.resolve(n)}function uu(n){return Promise.reject(n)}function h(n){return null!=n}function a(n){return void 0!==n}function yi(n){return"function"==typeof n}function ut(n){return"object"==typeof n}function fu(n){return ut(n)&&null!==n}function eu(n){return ut(n)&&!Array.isArray(n)}function g(n){return"string"==typeof n||n instanceof String}function ou(n){return"number"==typeof n||n instanceof Number}function pi(n){return ft()&&n instanceof Blob}function ft(){return"undefined"!=typeof Blob}function su(n){var t;try{t=JSON.parse(n)}catch(n){return null}return eu(t)?t:null}function hu(n){if(0==n.length)return null;var t=n.lastIndexOf("/");return-1===t?"":n.slice(0,t)}function cu(n,t){var i=t.split("/").filter(function(n){return n.length>0}).join("/");return 0===n.length?i:n+"/"+i}function wi(n){var t=n.lastIndexOf("/",n.length-2);return-1===t?n:n.slice(t+1)}function bt(n){return ir+rr+n}function lu(n){return df+rr+n}function bi(n){return ir+gf+n}function ki(n){var i=encodeURIComponent,t="?";return rt(n,function(n,r){var u=i(n)+"="+i(r);t=t+u+"&"}),t=t.slice(0,-1)}function au(n,t){return t}function vu(n){return!g(n)||n.length<2?n:(n=n,wi(n))}function yu(){function r(n,t){return vu(t)}function u(n,t){return h(t)?+t:t}function f(n,t){if(!(g(t)&&t.length>0))return[];var i=encodeURIComponent;return t.split(",").map(function(t){var r=n.bucket,u=n.fullPath;return lu("/b/"+i(r)+"/o/"+i(u))+ki({alt:"media",token:t})})}var n,t,i;return fi?fi:(n=[],n.push(new s("bucket")),n.push(new s("generation")),n.push(new s("metageneration")),n.push(new s("name","fullPath",!0)),t=new s("name"),t.xform=r,n.push(t),i=new s("size"),i.xform=u,n.push(i),n.push(new s("timeCreated")),n.push(new s("updated")),n.push(new s("md5Hash",null,!0)),n.push(new s("cacheControl",null,!0)),n.push(new s("contentDisposition",null,!0)),n.push(new s("contentEncoding",null,!0)),n.push(new s("contentLanguage",null,!0)),n.push(new s("contentType",null,!0)),n.push(new s("metadata","customMetadata",!0)),n.push(new s("downloadTokens","downloadURLs",!1,f)),fi=n)}function pu(n,t){function i(){var i=n.bucket,r=n.fullPath,u=new l(i,r);return t.makeStorageReference(u)}Object.defineProperty(n,"ref",{get:i})}function wu(n,t,i){var r={},e,u,f;for(r.type="file",e=i.length,u=0;u<e;u++)f=i[u],r[f.local]=f.xform(r,t[f.server]);return pu(r,n),r}function bu(n,t,i){var r=su(t);return null===r?null:wu(n,r,i)}function kt(n,t){for(var i,u={},f=t.length,r=0;r<f;r++)i=t[r],i.writable&&(u[i.server]=n[i.local]);return JSON.stringify(u)}function ku(n){var t,i;if(!n||!ut(n))throw"Expected Metadata object.";for(t in n)if(i=n[t],"customMetadata"===t){if(!ut(i))throw"Expected object for 'customMetadata' mapping.";}else if(fu(i))throw"Mapping for '"+t+"' cannot be an object.";}function o(n,t,i){for(var u=t.length,f=t.length,r=0;r<t.length;r++)if(t[r].optional){u=r;break}if(!(u<=i.length&&i.length<=f))throw br(u,f,n,i.length);for(r=0;r<i.length;r++)try{t[r].validator(i[r])}catch(t){throw t instanceof Error?ci(r,n,t.message):ci(r,n,t);}}function du(n,t){return function(i){n(i);t(i)}}function w(n,t){function i(n){if(!g(n))throw"Expected string.";}var r;return r=n?du(i,n):i,new k(r,t)}function gu(){function n(n){if(!(n instanceof Uint8Array||n instanceof ArrayBuffer||ft()&&n instanceof Blob))throw"Expected Blob or File.";}return new k(n)}function dt(n){return new k(ku,n)}function di(){function n(n){if(!(ou(n)&&n>=0))throw"Expected a number 0 or greater.";}return new k(n)}function gt(n,t){function i(t){if(!(null===t||h(t)&&t instanceof Object))throw"Expected an Object.";void 0!==n&&null!==n&&n(t)}return new k(i,t)}function nt(n){function t(n){if(null!==n&&!yi(n))throw"Expected a Function.";}return new k(t,n)}function nf(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function tf(){for(var r,u,i,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(r=nf(),void 0!==r){for(u=new r,i=0;i<n.length;i++)u.append(n[i]);return u.getBlob()}if(ft())return new Blob(n);throw Error("This browser doesn't seem to support creating Blobs");}function rf(n,t,i){return n.webkitSlice?n.webkitSlice(t,i):n.mozSlice?n.mozSlice(t,i):n.slice?n.slice(t,i):null}function et(n,t){return-1!==n.indexOf(t)}function uf(n){return Array.prototype.slice.call(n)}function ff(n,t){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}function v(n){if(!n)throw lt();}function ot(n,t){function i(i,r){var u=bu(n,r,t);return v(null!==u),u}return i}function tt(n){function t(t,i){var r;return r=401===t.getStatus()?cr():402===t.getStatus()?hr(n.bucket):403===t.getStatus()?lr(n.path):i,r.setServerResponseProp(i.serverResponseProp()),r}return t}function ni(n){function t(t,r){var u=i(t,r);return 404===t.getStatus()&&(u=sr(n.path)),u.setServerResponseProp(r.serverResponseProp()),u}var i=tt(n);return t}function gi(n,t,i){var u=t.fullServerUrl(),f=bt(u),e=n.maxOperationRetryTime(),r=new p(f,"GET",ot(n,i),e);return r.errorHandler=ni(t),r}function ef(n,t,i,r){var f=t.fullServerUrl(),e=bt(f),o=kt(i,r),s=n.maxOperationRetryTime(),u=new p(e,"PATCH",ot(n,r),s);return u.headers={"Content-Type":"application/json; charset=utf-8"},u.body=o,u.errorHandler=ni(t),u}function of(n,t){function r(){}var u=t.fullServerUrl(),f=bt(u),e=n.maxOperationRetryTime(),i=new p(f,"DELETE",r,e);return i.successCodes=[200,204],i.errorHandler=ni(t),i}function sf(n,t){return n&&n.contentType||t&&t.type()||"application/octet-stream"}function nr(n,t,i){var r=yt(i);return r.fullPath=n.path,r.size=t.size(),r.contentType||(r.contentType=sf(null,t)),r}function hf(n,t,i,r,u){var c=t.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"},e=function(){for(var n="",t=0;t<2;t++)n+=(""+Math.random()).slice(2);return n}();s["Content-Type"]="multipart/related; boundary="+e;var o=nr(t,r,u),l=kt(o,i),a="--"+e+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+l+"\r\n--"+e+"\r\nContent-Type: "+o.contentType+"\r\n\r\n",v="\r\n--"+e+"--",h=ei.getBlob(a,r,v);if(null===h)throw hi();var y={name:o.fullPath},w=bi(c),b=n.maxUploadRetryTime(),f=new p(w,"POST",ot(n,i),b);return f.urlParams=y,f.headers=s,f.body=h.uploadData(),f.errorHandler=tt(t),f}function ti(n,t){var i;try{i=n.getResponseHeader("X-Goog-Upload-Status")}catch(n){v(!1)}return v(et(t||["active"],i)),i}function cf(n,t,i,r,u){function o(n){ti(n);var t;try{t=n.getResponseHeader("X-Goog-Upload-URL")}catch(n){v(!1)}return v(g(t)),t}var s=t.bucketOnlyServerUrl(),e=nr(t,r,u),h={name:e.fullPath},c=bi(s),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":e.contentType,"Content-Type":"application/json; charset=utf-8"},a=kt(e,i),y=n.maxUploadRetryTime(),f=new p(c,"POST",o,y);return f.urlParams=h,f.headers=l,f.body=a,f.errorHandler=tt(t),f}function lf(n,t,i,r){function f(n){var i,u=ti(n,["active","final"]),t;try{i=n.getResponseHeader("X-Goog-Upload-Size-Received")}catch(n){v(!1)}return t=parseInt(i,10),v(!isNaN(t)),new st(t,r.size(),"final"===u)}var e=n.maxUploadRetryTime(),u=new p(i,"POST",f,e);return u.headers={"X-Goog-Upload-Command":"query"},u.errorHandler=tt(t),u}function af(n,t,i,r,u,f,e,o){function w(n,i){var u,e=ti(n,["active","final"]),o=s.current+h,c=r.size();return u="final"===e?ot(t,f)(n,i):null,new st(o,c,"final"===e,u)}var s=new st(0,0),l,h,y,c;if(e?(s.current=e.current,s.total=e.total):(s.current=0,s.total=r.size()),r.size()!==s.total)throw pr();l=s.total-s.current;h=l;u>0&&(h=Math.min(h,u));var a=s.current,b=a+h,k=h===l?"upload, finalize":"upload",d={"X-Goog-Upload-Command":k,"X-Goog-Upload-Offset":s.current},v=r.slice(a,b);if(null===v)throw hi();return y=t.maxUploadRetryTime(),c=new p(i,"POST",w,y),c.headers=d,c.body=v.uploadData(),c.progressCallback=o||null,c.errorHandler=tt(n),c}function b(n){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];wt(!0).then(function(){n.apply(null,i)})}}function vf(n,t,i){function s(){return 2===r}function h(){f||(f=!0,t.apply(null,arguments))}function e(t){u=setTimeout(function(){u=null;n(v,s())},t)}function v(n){for(var i,u=[],t=1;t<arguments.length;t++)u[t-1]=arguments[t];if(!f){if(n||s()||l)return void h.apply(null,arguments);o<64&&(o*=2);1===r?(r=2,i=0):i=1e3*(o+Math.random());e(i)}}function c(n){a||(a=!0,f||(null!==u?(n||(r=2),clearTimeout(u),e(0)):n||(r=1)))}var o=1,u=null,l=!1,r=0,f=!1,a=!1;return e(0),setTimeout(function(){l=!0;c(!0)},i),c}function yf(n){n(!1)}function pf(n,t){null!==t&&t.length>0&&(n.Authorization="Firebase "+t)}function wf(n){var t=void 0!==ii.default?ii.default.SDK_VERSION:"AppManager";n["X-Firebase-Storage-Version"]="webjs/"+t}function bf(n,t,i){var u=ki(n.urlParams),f=n.url+u,r=yt(n.headers);return pf(r,t),wf(r),new ce(f,n.method,r,n.body,n.successCodes,n.additionalRetryCodes,n.handler,n.errorHandler,n.timeout,n.progressCallback,i)}function kf(n,t,i){return new er(n,new ue,i)}function tr(n){var t={TaskState:c,TaskEvent:ui,StringFormat:f,Storage:er,Reference:ht};n.INTERNAL.registerService(or,kf,t,void 0,!0)}var or;Object.defineProperty(t,"__esModule",{value:!0});var y,ii=i(6),ir="https://firebasestorage.googleapis.com",df="https://firebasestorage.googleapis.com",rr="/v0",gf="/v0",ne=12e4,te=6e4,ie=-9007199254740991,e=function(){function n(n,t){this.t=oi(n);this.e="Firebase Storage: "+t;this.n=null;this.r="FirebaseError"}return n.prototype.codeProp=function(){return this.code},n.prototype.codeEquals=function(n){return oi(n)===this.codeProp()},n.prototype.serverResponseProp=function(){return this.n},n.prototype.setServerResponseProp=function(n){this.n=n},Object.defineProperty(n.prototype,"name",{get:function(){return this.r},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"code",{get:function(){return this.t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"message",{get:function(){return this.e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"serverResponse",{get:function(){return this.n},enumerable:!0,configurable:!0}),n}(),u={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},f={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},ri=function(){function n(n,t){this.data=n;this.contentType=t||null}return n}(),ur=function(){function n(n){var i,t;if(this.base64=!1,this.contentType=null,i=n.match(/^data:([^,]+)?,/),null===i)throw d(f.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");t=i[1]||null;null!=t&&(this.base64=iu(t,";base64"),this.contentType=this.base64?t.substring(0,t.length-7):t);this.rest=n.substring(n.indexOf(",")+1)}return n}(),ui={STATE_CHANGED:"state_changed"},r={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},c={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};!function(n){n[n.NO_ERROR=0]="NO_ERROR";n[n.NETWORK_ERROR=1]="NETWORK_ERROR";n[n.ABORT=2]="ABORT"}(y||(y={}));var re=function(){function n(){var n=this;this.o=!1;this.i=new XMLHttpRequest;this.a=y.NO_ERROR;this.s=pt(function(t){n.i.addEventListener("abort",function(){n.a=y.ABORT;t(n)});n.i.addEventListener("error",function(){n.a=y.NETWORK_ERROR;t(n)});n.i.addEventListener("load",function(){t(n)})})}return n.prototype.send=function(n,t,i,r){var u=this;if(this.o)throw it("cannot .send() more than once");return this.o=!0,this.i.open(t,n,!0),h(r)&&rt(r,function(n,t){u.i.setRequestHeader(n,""+t)}),h(i)?this.i.send(i):this.i.send(),this.s},n.prototype.getErrorCode=function(){if(!this.o)throw it("cannot .getErrorCode() before sending");return this.a},n.prototype.getStatus=function(){if(!this.o)throw it("cannot .getStatus() before sending");try{return this.i.status}catch(n){return-1}},n.prototype.getResponseText=function(){if(!this.o)throw it("cannot .getResponseText() before sending");return this.i.responseText},n.prototype.abort=function(){this.i.abort()},n.prototype.getResponseHeader=function(n){return this.i.getResponseHeader(n)},n.prototype.addUploadProgressListener=function(n){h(this.i.upload)&&this.i.upload.addEventListener("progress",n)},n.prototype.removeUploadProgressListener=function(n){h(this.i.upload)&&this.i.upload.removeEventListener("progress",n)},n}(),ue=function(){function n(){}return n.prototype.createXhrIo=function(){return new re},n}(),l=function(){function n(n,t){this.bucket=n;this.u=t}return Object.defineProperty(n.prototype,"path",{get:function(){return this.u},enumerable:!0,configurable:!0}),n.prototype.fullServerUrl=function(){var n=encodeURIComponent;return"/b/"+n(this.bucket)+"/o/"+n(this.path)},n.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},n.makeFromBucketSpec=function(t){var i;try{i=n.makeFromUrl(t)}catch(i){return new n(t,"")}if(""===i.path)return i;throw yr(t);},n.makeFromUrl=function(t){function h(n){"/"===n.path.charAt(n.path.length-1)&&(n.u=n.u.slice(0,-1))}function c(n){n.u=decodeURIComponent(n.path)}for(var i,u,s,f,r=null,l=RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a=RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),o=[{regex:l,indices:{bucket:1,path:3},postModify:h},{regex:a,indices:{bucket:1,path:3},postModify:c}],e=0;e<o.length;e++)if(i=o[e],u=i.regex.exec(t),u){s=u[i.indices.bucket];f=u[i.indices.path];f||(f="");r=new n(s,f);i.postModify(r);break}if(null==r)throw vr(t);return r},n}(),s=function(){function n(n,t,i,r){this.server=n;this.local=t||n;this.writable=!!i;this.xform=r||au}return n}(),fi=null,k=function(){function n(n,t){var i=this;this.validator=function(t){i.optional&&!a(t)||n(t)};this.optional=!!t}return n}(),ei=function(){function n(n,t){var i=0,r="";pi(n)?(this.c=n,i=n.size,r=n.type):n instanceof ArrayBuffer?(t?this.c=new Uint8Array(n):(this.c=new Uint8Array(n.byteLength),this.c.set(new Uint8Array(n))),i=this.c.length):n instanceof Uint8Array&&(t?this.c=n:(this.c=new Uint8Array(n.length),this.c.set(n)),i=n.length);this.l=i;this.h=r}return n.prototype.size=function(){return this.l},n.prototype.type=function(){return this.h},n.prototype.slice=function(t,i){if(pi(this.c)){var u=this.c,r=rf(u,t,i);return null===r?null:new n(r)}return new n(new Uint8Array(this.c.buffer,t,i-t),!0)},n.getBlob=function(){for(var o,r,u,e,s,i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return ft()?(o=i.map(function(t){return t instanceof n?t.c:t}),new n(tf.apply(null,o))):(r=i.map(function(n){return g(n)?li(f.RAW,n).data:n.c}),u=0,r.forEach(function(n){u+=n.byteLength}),e=new Uint8Array(u),s=0,r.forEach(function(n){for(var t=0;t<n.length;t++)e[s++]=n[t]}),new n(e,!0))},n.prototype.uploadData=function(){return this.c},n}(),p=function(){function n(n,t,i,r){this.url=n;this.method=t;this.handler=i;this.timeout=r;this.urlParams={};this.headers={};this.body=null;this.errorHandler=null;this.progressCallback=null;this.successCodes=[200];this.additionalRetryCodes=[]}return n}(),st=function(){function n(n,t,i,r){this.current=n;this.total=t;this.finalized=!!i;this.metadata=r||null}return n}(),fe=function(){function n(n,t,i){if(yi(n)||h(t)||h(i))this.next=n,this.error=t||null,this.complete=i||null;else{var r=n;this.next=r.next||null;this.error=r.error||null;this.complete=r.complete||null}}return n}(),ee=function(){function n(n,t,i,r,u,f){this.bytesTransferred=n;this.totalBytes=t;this.state=i;this.metadata=r;this.task=u;this.ref=f}return Object.defineProperty(n.prototype,"downloadURL",{get:function(){if(null!==this.metadata){var n=this.metadata.downloadURLs;return null!=n&&null!=n[0]?n[0]:null}return null},enumerable:!0,configurable:!0}),n}(),fr=function(){function n(n,t,i,f,e,o){void 0===o&&(o=null);var s=this;this.p=0;this.f=!1;this.d=!1;this._=[];this.v=null;this.b=null;this.m=null;this.g=1;this.y=null;this.R=null;this.w=n;this.U=t;this.T=i;this.A=e;this.N=o;this.O=f;this.C=this.S(this.A);this.k=r.RUNNING;this.I=function(n){s.m=null;s.g=1;n.codeEquals(u.CANCELED)?(s.f=!0,s.L()):(s.v=n,s.P(r.ERROR))};this.x=function(n){s.m=null;n.codeEquals(u.CANCELED)?s.L():(s.v=n,s.P(r.ERROR))};this.D=pt(function(n,t){s.y=n;s.R=t;s.M()});this.D.then(null,function(){})}return n.prototype.W=function(){var n=this,t=this.p;return function(i){n.B(t+i)}},n.prototype.S=function(n){return n.size()>262144},n.prototype.M=function(){this.k===r.RUNNING&&null===this.m&&(this.C?null===this.b?this.G():this.f?this.j():this.d?this.q():this.F():this.H())},n.prototype.z=function(n){var t=this;this.U.getAuthToken().then(function(i){switch(t.k){case r.RUNNING:n(i);break;case r.CANCELING:t.P(r.CANCELED);break;case r.PAUSING:t.P(r.PAUSED)}})},n.prototype.G=function(){var n=this;this.z(function(t){var r=cf(n.U,n.T,n.O,n.A,n.N),i=n.U.makeRequest(r,t);n.m=i;i.getPromise().then(function(t){n.m=null;n.b=t;n.f=!1;n.L()},n.I)})},n.prototype.j=function(){var n=this,t=this.b;this.z(function(i){var u=lf(n.U,n.T,t,n.A),r=n.U.makeRequest(u,i);n.m=r;r.getPromise().then(function(t){t=t;n.m=null;n.B(t.current);n.f=!1;t.finalized&&(n.d=!0);n.L()},n.I)})},n.prototype.F=function(){var n=this,t=262144*this.g,i=new st(this.p,this.A.size()),u=this.b;this.z(function(f){var o,e;try{o=af(n.T,n.U,u,n.A,t,n.O,i,n.W())}catch(t){return n.v=t,void n.P(r.ERROR)}e=n.U.makeRequest(o,f);n.m=e;e.getPromise().then(function(t){n.X();n.m=null;n.B(t.current);t.finalized?(n.N=t.metadata,n.P(r.SUCCESS)):n.L()},n.I)})},n.prototype.X=function(){262144*this.g<33554432&&(this.g*=2)},n.prototype.q=function(){var n=this;this.z(function(t){var u=gi(n.U,n.T,n.O),i=n.U.makeRequest(u,t);n.m=i;i.getPromise().then(function(t){n.m=null;n.N=t;n.P(r.SUCCESS)},n.x)})},n.prototype.H=function(){var n=this;this.z(function(t){var u=hf(n.U,n.T,n.O,n.A,n.N),i=n.U.makeRequest(u,t);n.m=i;i.getPromise().then(function(t){n.m=null;n.N=t;n.B(n.A.size());n.P(r.SUCCESS)},n.I)})},n.prototype.B=function(n){var t=this.p;this.p=n;this.p!==t&&this.V()},n.prototype.P=function(n){if(this.k!==n)switch(n){case r.CANCELING:case r.PAUSING:this.k=n;null!==this.m&&this.m.cancel();break;case r.RUNNING:var t=this.k===r.PAUSED;this.k=n;t&&(this.V(),this.M());break;case r.PAUSED:this.k=n;this.V();break;case r.CANCELED:this.v=si();this.k=n;this.V();break;case r.ERROR:case r.SUCCESS:this.k=n;this.V()}},n.prototype.L=function(){switch(this.k){case r.PAUSING:this.P(r.PAUSED);break;case r.CANCELING:this.P(r.CANCELED);break;case r.RUNNING:this.M()}},Object.defineProperty(n.prototype,"snapshot",{get:function(){var n=vt(this.k);return new ee(this.p,this.A.size(),n,this.N,this,this.w)},enumerable:!0,configurable:!0}),n.prototype.on=function(n,t,i,r){function c(){if(n!==ui.STATE_CHANGED)throw"Expected one of the event types: ["+ui.STATE_CHANGED+"].";}function f(n){try{return void v(n)}catch(n){}try{if(y(n),!(a(n.next)||a(n.error)||a(n.complete)))throw"";return}catch(n){throw s;}}function e(n){function t(t,i){null!==n&&o("on",n,arguments);var f=new fe(t,i,r);return u.K(f),function(){u.Z(f)}}return t}function l(n){if(null===n)throw s;f(n)}var u,h;void 0===t&&(t=void 0);void 0===i&&(i=void 0);void 0===r&&(r=void 0);var s="Expected a function or an Object with one of `next`, `error`, `complete` properties.",v=nt(!0).validator,y=gt(null,!0).validator;return o("on",[w(c),gt(f,!0),nt(!0),nt(!0)],arguments),u=this,h=[gt(l),nt(!0),nt(!0)],a(t)||a(i)||a(r)?e(null)(t,i,r):e(h)},n.prototype.then=function(n,t){return this.D.then(n,t)},n.prototype.catch=function(n){return this.then(null,n)},n.prototype.K=function(n){this._.push(n);this.J(n)},n.prototype.Z=function(n){ff(this._,n)},n.prototype.V=function(){var n=this;this.Q();uf(this._).forEach(function(t){n.J(t)})},n.prototype.Q=function(){if(null!==this.y){var n=!0;switch(vt(this.k)){case c.SUCCESS:b(this.y.bind(null,this.snapshot))();break;case c.CANCELED:case c.ERROR:b(this.R.bind(null,this.v))();break;default:n=!1}n&&(this.y=null,this.R=null)}},n.prototype.J=function(n){switch(vt(this.k)){case c.RUNNING:case c.PAUSED:null!==n.next&&b(n.next.bind(n,this.snapshot))();break;case c.SUCCESS:null!==n.complete&&b(n.complete.bind(n))();break;case c.CANCELED:case c.ERROR:null!==n.error&&b(n.error.bind(n,this.v))();break;default:null!==n.error&&b(n.error.bind(n,this.v))()}},n.prototype.resume=function(){o("resume",[],arguments);var n=this.k===r.PAUSED||this.k===r.PAUSING;return n&&this.P(r.RUNNING),n},n.prototype.pause=function(){o("pause",[],arguments);var n=this.k===r.RUNNING;return n&&this.P(r.PAUSING),n},n.prototype.cancel=function(){o("cancel",[],arguments);var n=this.k===r.RUNNING||this.k===r.PAUSING;return n&&this.P(r.CANCELING),n},n}(),ht=function(){function n(n,t){this.authWrapper=n;this.location=t instanceof l?t:l.makeFromUrl(t)}return n.prototype.toString=function(){return o("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},n.prototype.newRef=function(t,i){return new n(t,i)},n.prototype.mappings=function(){return yu()},n.prototype.child=function(n){o("child",[w()],arguments);var t=cu(this.location.path,n),i=new l(this.location.bucket,t);return this.newRef(this.authWrapper,i)},Object.defineProperty(n.prototype,"parent",{get:function(){var n=hu(this.location.path),t;return null===n?null:(t=new l(this.location.bucket,n),this.newRef(this.authWrapper,t))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){var n=new l(this.location.bucket,"");return this.newRef(this.authWrapper,n)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return wi(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),n.prototype.put=function(n,t){return void 0===t&&(t=null),o("put",[gu(),dt(!0)],arguments),this.Y("put"),new fr(this,this.authWrapper,this.location,this.mappings(),new ei(n),t)},n.prototype.putString=function(n,t,i){void 0===t&&(t=f.RAW);o("putString",[w(),w(dr,!0),dt(!0)],arguments);this.Y("putString");var r=li(t,n),u=yt(i);return!h(u.contentType)&&h(r.contentType)&&(u.contentType=r.contentType),new fr(this,this.authWrapper,this.location,this.mappings(),new ei(r.data,!0),u)},n.prototype.delete=function(){o("delete",[],arguments);this.Y("delete");var n=this;return this.authWrapper.getAuthToken().then(function(t){var i=of(n.authWrapper,n.location);return n.authWrapper.makeRequest(i,t).getPromise()})},n.prototype.getMetadata=function(){o("getMetadata",[],arguments);this.Y("getMetadata");var n=this;return this.authWrapper.getAuthToken().then(function(t){var i=gi(n.authWrapper,n.location,n.mappings());return n.authWrapper.makeRequest(i,t).getPromise()})},n.prototype.updateMetadata=function(n){o("updateMetadata",[dt()],arguments);this.Y("updateMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(i){var r=ef(t.authWrapper,t.location,n,t.mappings());return t.authWrapper.makeRequest(r,i).getPromise()})},n.prototype.getDownloadURL=function(){return o("getDownloadURL",[],arguments),this.Y("getDownloadURL"),this.getMetadata().then(function(n){var t=n.downloadURLs[0];if(h(t))return t;throw wr();})},n.prototype.Y=function(n){if(""===this.location.path)throw kr(n);},n}(),oe=function(){function n(n){this.D=uu(n)}return n.prototype.getPromise=function(){return this.D},n.prototype.cancel=function(n){void 0===n&&(n=!1)},n}(),se=function(){function n(){this.$={};this.tt=ie}return n.prototype.addRequest=function(n){function t(){delete r.$[i]}var i=this.tt,r;this.tt++;this.$[i]=n;r=this;n.getPromise().then(t,t)},n.prototype.clear=function(){rt(this.$,function(n,t){t&&t.cancel(!0)});this.$={}},n}(),he=function(){function n(t,i,r,u,f){if(this.et=null,this.nt=!1,this.rt=t,null!==this.rt){var e=this.rt.options;h(e)&&(this.et=n.ot(e))}this.it=i;this.at=r;this.st=f;this.ut=u;this.ct=ne;this.lt=te;this.ht=new se}return n.ot=function(n){var t=n.storageBucket||null;return null==t?null:l.makeFromBucketSpec(t).bucket},n.prototype.getAuthToken=function(){return null!==this.rt&&h(this.rt.INTERNAL)&&h(this.rt.INTERNAL.getToken)?this.rt.INTERNAL.getToken().then(function(n){return null!==n?n.accessToken:null},function(){return null}):wt(null)},n.prototype.bucket=function(){if(this.nt)throw at();return this.et},n.prototype.service=function(){return this.ut},n.prototype.makeStorageReference=function(n){return this.it(this,n)},n.prototype.makeRequest=function(n,t){if(this.nt)return new oe(at());var i=this.at(n,t,this.st);return this.ht.addRequest(i),i},n.prototype.deleteApp=function(){this.nt=!0;this.rt=null;this.ht.clear()},n.prototype.maxUploadRetryTime=function(){return this.lt},n.prototype.setMaxUploadRetryTime=function(n){this.lt=n},n.prototype.maxOperationRetryTime=function(){return this.ct},n.prototype.setMaxOperationRetryTime=function(n){this.ct=n},n}(),ce=function(){function n(n,t,i,r,u,f,e,o,s,h,c){this.pt=null;this.ft=null;this.y=null;this.R=null;this.dt=!1;this._t=!1;this.vt=n;this.bt=t;this.mt=i;this.gt=r;this.yt=u.slice();this.Rt=f.slice();this.Et=e;this.wt=o;this.Ut=h;this.Tt=s;this.st=c;var l=this;this.D=pt(function(n,t){l.y=n;l.R=t;l.M()})}return n.prototype.M=function(){function i(t,i){function u(t){var i=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.Ut&&n.Ut(i,r)}if(i)return void t(!1,new ct(!1,null,!0));var r=n.st.createXhrIo();n.pt=r;null!==n.Ut&&r.addUploadProgressListener(u);r.send(n.vt,n.bt,n.gt,n.mt).then(function(i){var f,r,e,o;if(null!==n.Ut&&i.removeUploadProgressListener(u),n.pt=null,i=i,f=i.getErrorCode()===y.NO_ERROR,r=i.getStatus(),!f||n.At(r))return e=i.getErrorCode()===y.ABORT,void t(!1,new ct(!1,null,e));o=et(n.yt,r);t(!0,new ct(o,i))})}function t(t,i){var o=n.y,f=n.R,u=i.xhr,e,r;if(i.wasSuccessCode)try{e=n.Et(u,u.getResponseText());a(e)?o(e):o()}catch(t){f(t)}else null!==u?(r=lt(),r.setServerResponseProp(u.getResponseText()),f(n.wt?n.wt(u,r):r)):i.canceled?(r=n._t?at():si(),f(r)):(r=ar(),f(r))}var n=this;this.dt?t(!1,new ct(!1,null,!0)):this.ft=vf(i,t,this.Tt)},n.prototype.getPromise=function(){return this.D},n.prototype.cancel=function(n){this.dt=!0;this._t=n||!1;null!==this.ft&&yf(this.ft);null!==this.pt&&this.pt.abort()},n.prototype.At=function(n){var t=n>=500&&n<600,i=et([408,429],n),r=et(this.Rt,n);return t||i||r},n}(),ct=function(){function n(n,t,i){this.wasSuccessCode=n;this.xhr=t;this.canceled=!!i}return n}(),er=function(){function n(n,t,i){function u(n,t){return new ht(n,t)}if(this.et=null,this.U=new he(n,u,bf,this,t),this.rt=n,null!=i)this.et=l.makeFromBucketSpec(i);else{var r=this.U.bucket();null!=r&&(this.et=new l(r,""))}this.Nt=new le(this)}return n.prototype.ref=function(n){function i(n){if(/^[A-Za-z]+:\/\//.test(n))throw"Expected child path but got a URL, use refFromURL instead.";}if(o("ref",[w(i,!0)],arguments),null==this.et)throw Error("No Storage Bucket defined in Firebase Options.");var t=new ht(this.U,this.et);return null!=n?t.child(n):t},n.prototype.refFromURL=function(n){function t(n){if(!/^[A-Za-z]+:\/\//.test(n))throw"Expected full URL but got a child path, use ref instead.";try{l.makeFromUrl(n)}catch(n){throw"Expected valid full URL but got an invalid one.";}}return o("refFromURL",[w(t,!1)],arguments),new ht(this.U,n)},Object.defineProperty(n.prototype,"maxUploadRetryTime",{get:function(){return this.U.maxUploadRetryTime()},enumerable:!0,configurable:!0}),n.prototype.setMaxUploadRetryTime=function(n){o("setMaxUploadRetryTime",[di()],arguments);this.U.setMaxUploadRetryTime(n)},Object.defineProperty(n.prototype,"maxOperationRetryTime",{get:function(){return this.U.maxOperationRetryTime()},enumerable:!0,configurable:!0}),n.prototype.setMaxOperationRetryTime=function(n){o("setMaxOperationRetryTime",[di()],arguments);this.U.setMaxOperationRetryTime(n)},Object.defineProperty(n.prototype,"app",{get:function(){return this.rt},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"INTERNAL",{get:function(){return this.Nt},enumerable:!0,configurable:!0}),n}(),le=function(){function n(n){this.ut=n}return n.prototype.delete=function(){return this.ut.U.deleteApp(),wt(void 0)},n}();t.registerStorage=tr;or="storage";tr(ii.default)}},[118])}catch(t){throw Error("Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.");}try{webpackJsonpFirebase([3],{116:function(n,t,i){i(117)},117:function(n,t,i){"use strict";function k(n){var t=new Uint8Array(n);return window.btoa(String.fromCharCode.apply(null,t))}function v(n){var t=function(n){return self&&"ServiceWorkerGlobalScope"in self?new st(n):new b(n)},i={Messaging:b};n.INTERNAL.registerService("messaging",t,i)}Object.defineProperty(t,"__esModule",{value:!0});var u,s=i(0),h={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key"},d=(u={},u[h.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",u[h.AVAILABLE_IN_SW]="This method is available in a service worker context.",u["should-be-overriden"]="This method should be overriden by extended classes.",u["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",u["permission-default"]="The required permissions were not granted and dismissed instead.",u["permission-blocked"]="The required permissions were not granted and blocked instead.",u["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",u["notifications-blocked"]="Notifications have been blocked.",u[h.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",u["sw-registration-expected"]="A service worker registration was the expected input.",u["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",u["invalid-saved-token"]="Unable to access details of the saved token.",u["sw-reg-redundant"]="The service worker being used for push was made redundant.",u["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",u["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",u["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",u["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",u["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",u["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",u["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",u["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",u["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",u["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",u["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",u["failed-to-delete-token"]="Unable to delete the currently saved token.",u["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",u["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",u["bad-scope"]="The service worker scope must be a string with at least one character.",u["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",u["bad-subscription"]="The subscription must be a valid PushSubscription.",u["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",u["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",u["failed-delete-vapid-key"]="The VAPID key could not be deleted.",u),r={codes:h,map:d},o=function(n){return k(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},y=[4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110],g={userVisibleOnly:!0,applicationServerKey:new Uint8Array(y)},c={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:y,SUBSCRIPTION_OPTIONS:g},f="fcm_token_object_Store",nt=function(){function n(){this.e=new s.ErrorFactory("messaging","Messaging",r.map);this.t=null}return n.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(t,i){var r=indexedDB.open(n.DB_NAME,1);r.onerror=function(n){i(n.target.error)};r.onsuccess=function(n){t(n.target.result)};r.onupgradeneeded=function(n){var i=n.target.result,t=i.createObjectStore(f,{keyPath:"swScope"});t.createIndex("fcmSenderId","fcmSenderId",{unique:!1});t.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.t)},n.prototype.closeDatabase=function(){var n=this;return this.t?this.t.then(function(t){t.close();n.t=null}):Promise.resolve()},n.prototype.getTokenDetailsFromToken=function(n){return this.r().then(function(t){return new Promise(function(i,r){var e=t.transaction([f]),o=e.objectStore(f),s=o.index("fcmToken"),u=s.get(n);u.onerror=function(n){r(n.target.error)};u.onsuccess=function(n){i(n.target.result)}})})},n.prototype.n=function(n){return this.r().then(function(t){return new Promise(function(i,r){var e=t.transaction([f]),o=e.objectStore(f),u=o.get(n);u.onerror=function(n){r(n.target.error)};u.onsuccess=function(n){i(n.target.result)}})})},n.prototype.o=function(n){return this.r().then(function(t){return new Promise(function(i,r){var o=t.transaction([f]),s=o.objectStore(f),u=[],e=s.openCursor();e.onerror=function(n){r(n.target.error)};e.onsuccess=function(t){var r=t.target.result;r?(r.value.fcmSenderId===n&&u.push(r.value),r.continue()):i(u)}})})},n.prototype.subscribeToFCM=function(n,t,i){var u=this,h=o(t.getKey("p256dh")),l=o(t.getKey("auth")),e="authorized_entity="+n+"&endpoint="+t.endpoint+"&encryption_key="+h+"&encryption_auth="+l,f,s;return i&&(e+="&pushSet="+i),f=new Headers,f.append("Content-Type","application/x-www-form-urlencoded"),s={method:"POST",headers:f,body:e},fetch(c.ENDPOINT+"/fcm/connect/subscribe",s).then(function(n){return n.json()}).then(function(n){var t=n,i;if(t.error){i=t.error.message;throw u.e.create(r.codes.TOKEN_SUBSCRIBE_FAILED,{message:i});}if(!t.token)throw u.e.create(r.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw u.e.create(r.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},n.prototype.i=function(n,t){return n.endpoint===t.endpoint&&o(n.getKey("auth"))===t.auth&&o(n.getKey("p256dh"))===t.p256dh},n.prototype.s=function(n,t,i,r,u){var e={swScope:t.scope,endpoint:i.endpoint,auth:o(i.getKey("auth")),p256dh:o(i.getKey("p256dh")),fcmToken:r,fcmPushSet:u,fcmSenderId:n};return this.r().then(function(n){return new Promise(function(t,i){var u=n.transaction([f],"readwrite"),o=u.objectStore(f),r=o.put(e);r.onerror=function(n){i(n.target.error)};r.onsuccess=function(){t()}})})},n.prototype.getSavedToken=function(n,t){var i=this;return t instanceof ServiceWorkerRegistration?"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.BAD_SENDER_ID)):this.o(n).then(function(i){if(0!==i.length){var r=i.findIndex(function(i){return t.scope===i.swScope&&n===i.fcmSenderId});if(-1!==r)return i[r]}}).then(function(n){if(n)return t.pushManager.getSubscription().catch(function(){throw i.e.create(r.codes.GET_SUBSCRIPTION_FAILED);}).then(function(t){if(t&&i.i(t,n))return n.fcmToken})}):Promise.reject(this.e.create(r.codes.SW_REGISTRATION_EXPECTED))},n.prototype.createToken=function(n,t){var f=this,u,i;return"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.BAD_SENDER_ID)):(t instanceof ServiceWorkerRegistration)?t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe(c.SUBSCRIPTION_OPTIONS)}).then(function(t){return u=t,f.subscribeToFCM(n,u)}).then(function(r){return i=r,f.s(n,t,u,i.token,i.pushSet)}).then(function(){return i.token}):Promise.reject(this.e.create(r.codes.SW_REGISTRATION_EXPECTED))},n.prototype.deleteToken=function(n){var t=this;return"string"!=typeof n||0===n.length?Promise.reject(this.e.create(r.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(n).then(function(n){if(!n)throw t.e.create(r.codes.DELETE_TOKEN_NOT_FOUND);return t.r().then(function(i){return new Promise(function(u,e){var s=i.transaction([f],"readwrite"),h=s.objectStore(f),o=h.delete(n.swScope);o.onerror=function(n){e(n.target.error)};o.onsuccess=function(i){if(0===i.target.result)return void e(t.e.create(r.codes.FAILED_TO_DELETE_TOKEN));u(n)}})})})},n}(),tt=nt,l="messagingSenderId",it=function(){function n(n){var t=this;if(this.e=new s.ErrorFactory("messaging","Messaging",r.map),!n.options[l]||"string"!=typeof n.options[l])throw this.e.create(r.codes.BAD_SENDER_ID);this.a=n.options[l];this.c=new tt;this.app=n;this.INTERNAL={};this.INTERNAL.delete=function(){return t.delete}}return n.prototype.getToken=function(){var n=this,t=this.u();return"granted"!==t?"denied"===t?Promise.reject(this.e.create(r.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this._().then(function(t){return n.c.getSavedToken(n.a,t).then(function(i){return i||n.c.createToken(n.a,t)})})},n.prototype.deleteToken=function(n){var t=this;return this.c.deleteToken(n).then(function(){return t._().then(function(n){if(n)return n.pushManager.getSubscription()}).then(function(n){if(n)return n.unsubscribe()})})},n.prototype._=function(){throw this.e.create(r.codes.SHOULD_BE_INHERITED);},n.prototype.requestPermission=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.useServiceWorker=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.onMessage=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.onTokenRefresh=function(){throw this.e.create(r.codes.AVAILABLE_IN_WINDOW);},n.prototype.setBackgroundMessageHandler=function(){throw this.e.create(r.codes.AVAILABLE_IN_SW);},n.prototype.delete=function(){return this.c.closeDatabase()},n.prototype.u=function(){return Notification.permission},n.prototype.getTokenManager=function(){return this.c},n}(),p=it,a={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},rt=function(n,t){return i={},i[a.TYPE_OF_MSG]=n,i[a.DATA]=t,i;var i},e={PARAMS:a,TYPES_OF_MSG:{PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},createNewMsg:rt},w={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"},ut=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ft=function(n){function t(t){var i=n.call(this,t)||this;return i.d=null,i.f=Object(s.createSubscribe)(function(n){i.d=n}),i.h=null,i.p=Object(s.createSubscribe)(function(n){i.h=n}),i.l(),i}return ut(t,n),t.prototype.getToken=function(){var t=this;return this.g()?this.T().then(function(){return n.prototype.getToken.call(t)}):Promise.reject(this.e.create(r.codes.UNSUPPORTED_BROWSER))},t.prototype.T=function(){var t=this,n;return this.S?this.S:(n=document.querySelector('link[rel="manifest"]'),this.S=n?fetch(n.href).then(function(n){return n.json()}).catch(function(){return Promise.resolve()}).then(function(n){if(n&&n.gcm_sender_id&&"103953800507"!==n.gcm_sender_id)throw t.e.create(r.codes.INCORRECT_GCM_SENDER_ID);}):Promise.resolve(),this.S)},t.prototype.requestPermission=function(){var n=this;return"granted"===Notification.permission?Promise.resolve():new Promise(function(t,i){var f=function(u){return"granted"===u?t():i("denied"===u?n.e.create(r.codes.PERMISSION_BLOCKED):n.e.create(r.codes.PERMISSION_DEFAULT))},u=Notification.requestPermission(function(n){u||f(n)});u&&u.then(f)})},t.prototype.useServiceWorker=function(n){if(!(n instanceof ServiceWorkerRegistration))throw this.e.create(r.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.b)throw this.e.create(r.codes.USE_SW_BEFORE_GET_TOKEN);this.b=n},t.prototype.onMessage=function(n,t,i){return this.f(n,t,i)},t.prototype.onTokenRefresh=function(n,t,i){return this.p(n,t,i)},t.prototype.v=function(n){var i=this,t=n.installing||n.waiting||n.active;return new Promise(function(u,f){if(!t)return void f(i.e.create(r.codes.NO_SW_IN_REG));if("activated"===t.state)return void u(n);if("redundant"===t.state)return void f(i.e.create(r.codes.SW_REG_REDUNDANT));var e=function(){if("activated"===t.state)u(n);else{if("redundant"!==t.state)return;f(i.e.create(r.codes.SW_REG_REDUNDANT))}t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)})},t.prototype._=function(){var n=this;return this.b?this.v(this.b):(this.b=null,navigator.serviceWorker.register(w.path,{scope:w.scope}).catch(function(t){throw n.e.create(r.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message});}).then(function(t){return n.v(t).then(function(){return n.b=t,t.update(),t})}))},t.prototype.l=function(){var n=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){var i,r;if(t.data&&t.data[e.PARAMS.TYPE_OF_MSG]){i=t.data;switch(i[e.PARAMS.TYPE_OF_MSG]){case e.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case e.TYPES_OF_MSG.NOTIFICATION_CLICKED:r=i[e.PARAMS.DATA];n.d.next(r)}}},!1)},t.prototype.g=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(p),b=ft,et=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ot=function(n){function t(t){var i=n.call(this,t)||this;return self.addEventListener("push",function(n){return i.I(n)},!1),self.addEventListener("pushsubscriptionchange",function(n){return i.m(n)},!1),self.addEventListener("notificationclick",function(n){return i.y(n)},!1),i.N=null,i}return et(t,n),t.prototype.I=function(n){var t,i=this,r;try{t=n.data.json()}catch(n){return}r=this.w().then(function(n){var r,u;if(n){if(t.notification||i.N)return i.k(t)}else{if(r=i.O(t),r)return u=r.title||"",self.registration.showNotification(u,r);if(i.N)return i.N(t)}});n.waitUntil(r)},t.prototype.m=function(n){var t=this,i=this.getToken().then(function(n){if(!n)throw t.e.create(r.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var i=null,u=t.getTokenManager();return u.getTokenDetailsFromToken(n).then(function(n){if(!(i=n))throw t.e.create(r.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(c.SUBSCRIPTION_OPTIONS)}).then(function(n){return u.subscribeToFCM(i.fcmSenderId,n,i.fcmPushSet)}).catch(function(n){return u.deleteToken(i.fcmToken).then(function(){throw t.e.create(r.codes.UNABLE_TO_RESUBSCRIBE,{message:n});})})});n.waitUntil(i)},t.prototype.y=function(n){var u=this,t,i,r;n.notification&&n.notification.data&&n.notification.data.FCM_MSG&&(n.stopImmediatePropagation(),n.notification.close(),t=n.notification.data.FCM_MSG,i=t.notification.click_action,i&&(r=this.D(i).then(function(n){return n||self.clients.openWindow(i)}).then(function(n){if(n){t.notification;delete t.notification;var i=e.createNewMsg(e.TYPES_OF_MSG.NOTIFICATION_CLICKED,t);return u.A(n,i)}}),n.waitUntil(r)))},t.prototype.O=function(n){var t,i;if(n&&"object"==typeof n.notification)return t=Object.assign({},n.notification),t.data=(i={},i.FCM_MSG=n,i),t},t.prototype.setBackgroundMessageHandler=function(n){if(n&&"function"!=typeof n)throw this.e.create(r.codes.BG_HANDLER_FUNCTION_EXPECTED);this.N=n},t.prototype.D=function(n){var t=new URL(n).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){for(var i=null,r=0;r<n.length;r++)if(new URL(n[r].url).href===t){i=n[r];break}if(i)return i.focus(),i})},t.prototype.A=function(n,t){var i=this;return new Promise(function(u,f){if(!n)return f(i.e.create(r.codes.NO_WINDOW_CLIENT_TO_MSG));n.postMessage(t);u()})},t.prototype.w=function(){return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){return n.some(function(n){return"visible"===n.visibilityState})})},t.prototype.k=function(n){var t=this;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(i){var r=e.createNewMsg(e.TYPES_OF_MSG.PUSH_MSG_RECEIVED,n);return Promise.all(i.map(function(n){return t.A(n,r)}))})},t.prototype._=function(){return Promise.resolve(self.registration)},t}(p),st=ot,ht=i(6);t.registerMessaging=v;v(ht.firebase)}},[116])}catch(e){throw Error("Cannot instantiate firebase-messaging.js - be sure to load firebase-app.js first.");}tipObj=null;offset={x:20,y:20};config={messagingSenderId:"1003052516540"};tokenSent="MobilitatTokenSentToServer";firebase.initializeApp(config);const messaging=firebase.messaging();navigator.serviceWorker.register("/scripts/push/sw.js").then(function(n){messaging.useServiceWorker(n);messaging.requestPermission().then(function(){console.log("[FIREBASE] Notification permission granted.");messaging.getToken().then(function(n){n?subscribeTokenToTopic(n):(console.log("[FIREBASE] No Instance ID token available. Request permission to generate one."),setTokenSentToServer(!1))}).catch(function(n){console.log("[FIREBASE] An error occurred while retrieving token. ",n);setTokenSentToServer(!1)})}).catch(function(n){console.log("[FIREBASE] Unable to get permission to notify.",n)})});messaging.onMessage(function(n){console.log("[FIREBASE] Notification received: ",n);toastr.options={preventDuplicates:!0,timeOut:"15000",onclick:function(){window.location.href=n.notification.click_action}};toastr.info(n.notification.body,n.notification.title)});messaging.onTokenRefresh(function(){messaging.getToken().then(function(n){console.log("[FIREBASE] Token refreshed.");setTokenSentToServer(!1);subscribeTokenToTopic(n)}).catch(function(n){console.log("[FIREBASE] Unable to retrieve refreshed token ",n)})})