"],_default:[0,"",""]};Lt.optgroup=Lt.option,Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead,Lt.th=Lt.td,Z.extend({clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=Z.contains(t.ownerDocument,t);if(!(X.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||Z.isXMLDoc(t)))for(a=v(s),o=v(t),r=0,i=o.length;i>r;r++)y(o[r],a[r]);if(e)if(n)for(o=o||v(t),a=a||v(s),r=0,i=o.length;i>r;r++)m(o[r],a[r]);else m(t,s);return a=v(s,"script"),a.length>0&&g(a,!u&&v(t,"script")),s},buildFragment:function(t,e,n,r){for(var i,o,a,s,u,c,l=e.createDocumentFragment(),h=[],f=0,d=t.length;d>f;f++)if(i=t[f],i||0===i)if("object"===Z.type(i))Z.merge(h,i.nodeType?[i]:i);else if(Mt.test(i)){for(o=o||l.appendChild(e.createElement("div")),a=(Ot.exec(i)||["",""])[1].toLowerCase(),s=Lt[a]||Lt._default,o.innerHTML=s[1]+i.replace(_t,"<$1>$2>")+s[2],c=s[0];c--;)o=o.lastChild;Z.merge(h,o.childNodes),o=l.firstChild,o.textContent=""}else h.push(e.createTextNode(i));for(l.textContent="",f=0;i=h[f++];)if((!r||-1===Z.inArray(i,r))&&(u=Z.contains(i.ownerDocument,i),o=v(l.appendChild(i),"script"),u&&g(o),n))for(c=0;i=o[c++];)Nt.test(i.type||"")&&n.push(i);return l},cleanData:function(t){for(var e,n,r,i,o=Z.event.special,a=0;void 0!==(n=t[a]);a++){if(Z.acceptData(n)&&(i=n[vt.expando],i&&(e=vt.cache[i]))){if(e.events)for(r in e.events)o[r]?Z.event.remove(n,r):Z.removeEvent(n,r,e.handle);vt.cache[i]&&delete vt.cache[i]}delete yt.cache[n[yt.expando]]}}}),Z.fn.extend({text:function(t){return mt(this,function(t){return void 0===t?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?Z.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(e&&Z.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(Z.cleanData(v(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return Z.clone(this,t,e)})},html:function(t){return mt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!Lt[(Ot.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(_t,"<$1>$2>");try{for(;r>n;n++)e=this[n]||{},1===e.nodeType&&(Z.cleanData(v(e,!1)),e.innerHTML=t);e=0}catch(i){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,Z.cleanData(v(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=V.apply([],t);var n,r,i,o,a,s,u=0,c=this.length,l=this,h=c-1,f=t[0],g=Z.isFunction(f);if(g||c>1&&"string"==typeof f&&!X.checkClone&&It.test(f))return this.each(function(n){var r=l.eq(n);g&&(t[0]=f.call(this,n,r.html())),r.domManip(t,e)});if(c&&(n=Z.buildFragment(t,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=Z.map(v(n,"script"),d),o=i.length;c>u;u++)a=n,u!==h&&(a=Z.clone(a,!0,!0),o&&Z.merge(i,v(a,"script"))),e.call(this[u],a,u);if(o)for(s=i[i.length-1].ownerDocument,Z.map(i,p),u=0;o>u;u++)a=i[u],Nt.test(a.type||"")&&!vt.access(a,"globalEval")&&Z.contains(s,a)&&(a.src?Z._evalUrl&&Z._evalUrl(a.src):Z.globalEval(a.textContent.replace(Rt,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){Z.fn[t]=function(t){for(var n,r=[],i=Z(t),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),Z(i[a])[e](n),W.apply(r,n.get());return this.pushStack(r)}});var Ft,Ut={},Bt=/^margin/,qt=new RegExp("^("+$t+")(?!px)[a-z%]+$","i"),Ht=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)};!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",i.appendChild(o);var e=t.getComputedStyle(a,null);n="1%"!==e.top,r="4px"===e.width,i.removeChild(o)}var n,r,i=J.documentElement,o=J.createElement("div"),a=J.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",X.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),t.getComputedStyle&&Z.extend(X,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return null==r&&e(),r},reliableMarginRight:function(){var e,n=a.appendChild(J.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",i.appendChild(o),e=!parseFloat(t.getComputedStyle(n,null).marginRight),i.removeChild(o),a.removeChild(n),e}}))}(),Z.swap=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=a[o];return i};var Vt=/^(none|table(?!-c[ea]).+)/,Wt=new RegExp("^("+$t+")(.*)$","i"),zt=new RegExp("^([+-])=("+$t+")","i"),Yt={position:"absolute",visibility:"hidden",display:"block"},Gt={letterSpacing:"0",fontWeight:"400"},Kt=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=$(t,"opacity");return""===n?"1":n}}}},cssNumber:{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:{"float":"cssFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=Z.camelCase(e),u=t.style;return e=Z.cssProps[s]||(Z.cssProps[s]=k(u,s)),a=Z.cssHooks[e]||Z.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e]:(o=typeof n,"string"===o&&(i=zt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(Z.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||Z.cssNumber[s]||(n+="px"),X.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u[e]=n)),void 0)}},css:function(t,e,n,r){var i,o,a,s=Z.camelCase(e);return e=Z.cssProps[s]||(Z.cssProps[s]=k(t.style,s)),a=Z.cssHooks[e]||Z.cssHooks[s],a&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=$(t,e,r)),"normal"===i&&e in Gt&&(i=Gt[e]),""===n||n?(o=parseFloat(i),n===!0||Z.isNumeric(o)?o||0:i):i}}),Z.each(["height","width"],function(t,e){Z.cssHooks[e]={get:function(t,n,r){return n?Vt.test(Z.css(t,"display"))&&0===t.offsetWidth?Z.swap(t,Yt,function(){return E(t,e,r)}):E(t,e,r):void 0},set:function(t,n,r){var i=r&&Ht(t);return S(t,n,r?C(t,e,r,"border-box"===Z.css(t,"boxSizing",!1,i),i):0)}}}),Z.cssHooks.marginRight=x(X.reliableMarginRight,function(t,e){return e?Z.swap(t,{display:"inline-block"},$,[t,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(t,e){Z.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[t+xt[r]+e]=o[r]||o[r-2]||o[0];return i}},Bt.test(t)||(Z.cssHooks[t+e].set=S)}),Z.fn.extend({css:function(t,e){return mt(this,function(t,e,n){var r,i,o={},a=0;if(Z.isArray(e)){for(r=Ht(t),i=e.length;i>a;a++)o[e[a]]=Z.css(t,e[a],!1,r);return o}return void 0!==n?Z.style(t,e,n):Z.css(t,e)},t,e,arguments.length>1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){kt(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=A,A.prototype={constructor:A,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var t=A.propHooks[this.prop];return t&&t.get?t.get(this):A.propHooks._default.get(this)},run:function(t){var e,n=A.propHooks[this.prop];return this.pos=e=this.options.duration?Z.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):A.propHooks._default.set(this),this}},A.prototype.init.prototype=A.prototype,A.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=Z.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){Z.fx.step[t.prop]?Z.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[Z.cssProps[t.prop]]||Z.cssHooks[t.prop])?Z.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},A.propHooks.scrollTop=A.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},Z.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},Z.fx=A.prototype.init,Z.fx.step={};var Xt,Jt,Qt=/^(?:toggle|show|hide)$/,Zt=new RegExp("^(?:([+-])=|)("+$t+")([a-z%]*)$","i"),te=/queueHooks$/,ee=[M],ne={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=Zt.exec(e),o=i&&i[3]||(Z.cssNumber[t]?"":"px"),a=(Z.cssNumber[t]||"px"!==o&&+r)&&Zt.exec(Z.css(n.elem,t)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,Z.style(n.elem,t,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};Z.Animation=Z.extend(I,{tweener:function(t,e){Z.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;i>r;r++)n=t[r],ne[n]=ne[n]||[],ne[n].unshift(e)},prefilter:function(t,e){e?ee.unshift(t):ee.push(t)}}),Z.speed=function(t,e,n){var r=t&&"object"==typeof t?Z.extend({},t):{complete:n||!n&&e||Z.isFunction(t)&&t,duration:t,easing:n&&e||e&&!Z.isFunction(e)&&e};return r.duration=Z.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in Z.fx.speeds?Z.fx.speeds[r.duration]:Z.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){Z.isFunction(r.old)&&r.old.call(this),r.queue&&Z.dequeue(this,r.queue)},r},Z.fn.extend({fadeTo:function(t,e,n,r){return this.filter(kt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=Z.isEmptyObject(t),o=Z.speed(e,n,r),a=function(){var e=I(this,Z.extend({},t),o);(i||vt.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=Z.timers,a=vt.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&te.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));(e||!n)&&Z.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=vt.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=Z.timers,a=r?r.length:0;for(n.finish=!0,Z.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;a>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(t,e){var n=Z.fn[e];Z.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(_(e,!0),t,r,i)}}),Z.each({slideDown:_("show"),slideUp:_("hide"),slideToggle:_("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){Z.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),Z.timers=[],Z.fx.tick=function(){var t,e=0,n=Z.timers;for(Xt=Z.now();e1)},removeAttr:function(t){return this.each(function(){Z.removeAttr(this,t)})}}),Z.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===Ct?Z.prop(t,e,n):(1===o&&Z.isXMLDoc(t)||(e=e.toLowerCase(),r=Z.attrHooks[e]||(Z.expr.match.bool.test(e)?ie:re)),void 0===n?r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=Z.find.attr(t,e),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):void Z.removeAttr(t,e))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(dt);if(o&&1===t.nodeType)for(;n=o[i++];)r=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(t[r]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!X.radioValue&&"radio"===e&&Z.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),ie={set:function(t,e,n){return e===!1?Z.removeAttr(t,n):t.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(t,e){var n=oe[e]||Z.find.attr;oe[e]=function(t,e,r){var i,o;return r||(o=oe[e],oe[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,oe[e]=o),i}});var ae=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(t,e){return mt(this,Z.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[Z.propFix[t]||t]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var r,i,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return o=1!==a||!Z.isXMLDoc(t),o&&(e=Z.propFix[e]||e,i=Z.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||ae.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),X.optSelected||(Z.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var se=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(t){var e,n,r,i,o,a,s="string"==typeof t&&t,u=0,c=this.length;if(Z.isFunction(t))return this.each(function(e){Z(this).addClass(t.call(this,e,this.className))});if(s)for(e=(t||"").match(dt)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(se," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=Z.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(t){var e,n,r,i,o,a,s=0===arguments.length||"string"==typeof t&&t,u=0,c=this.length;if(Z.isFunction(t))return this.each(function(e){Z(this).removeClass(t.call(this,e,this.className))});if(s)for(e=(t||"").match(dt)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(se," "):"")){for(o=0;i=e[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=t?Z.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):this.each(Z.isFunction(t)?function(n){Z(this).toggleClass(t.call(this,n,this.className,e),e)}:function(){if("string"===n)for(var e,r=0,i=Z(this),o=t.match(dt)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else(n===Ct||"boolean"===n)&&(this.className&&vt.set(this,"__className__",this.className),this.className=this.className||t===!1?"":vt.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(se," ").indexOf(e)>=0)return!0;return!1}});var ue=/\r/g;Z.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=Z.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,Z(this).val()):t,null==i?i="":"number"==typeof i?i+="":Z.isArray(i)&&(i=Z.map(i,function(t){return null==t?"":t+""})),e=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return e=Z.valHooks[i.type]||Z.valHooks[i.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(ue,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(t){var e=Z.find.attr(t,"value");return null!=e?e:Z.trim(Z.text(t))}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(X.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Z.nodeName(n.parentNode,"optgroup"))){if(e=Z(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=Z.makeArray(e),a=i.length;a--;)r=i[a],(r.selected=Z.inArray(r.value,o)>=0)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(t,e){return Z.isArray(e)?t.checked=Z.inArray(Z(t).val(),e)>=0:void 0}},X.checkOn||(Z.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){Z.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),Z.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var ce=Z.now(),le=/\?/;Z.parseJSON=function(t){return JSON.parse(t+"")},Z.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{n=new DOMParser,e=n.parseFromString(t,"text/xml")}catch(r){e=void 0}return(!e||e.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+t),e};var he=/#.*$/,fe=/([?&])_=[^&]*/,de=/^(.*?):[ \t]*([^\r\n]*)$/gm,pe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ge=/^(?:GET|HEAD)$/,me=/^\/\//,ve=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ye={},be={},we="*/".concat("*"),$e=t.location.href,xe=ve.exec($e.toLowerCase())||[];Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:$e,type:"GET",isLocal:pe.test(xe[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":we,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?R(R(t,Z.ajaxSettings),e):R(Z.ajaxSettings,t)},ajaxPrefilter:N(ye),ajaxTransport:N(be),ajax:function(t,e){function n(t,e,n,a){var u,l,v,y,w,x=e;2!==b&&(b=2,s&&clearTimeout(s),r=void 0,o=a||"",$.readyState=t>0?4:0,u=t>=200&&300>t||304===t,n&&(y=L(h,$,n)),y=F(h,y,$,u),u?(h.ifModified&&(w=$.getResponseHeader("Last-Modified"),w&&(Z.lastModified[i]=w),w=$.getResponseHeader("etag"),w&&(Z.etag[i]=w)),204===t||"HEAD"===h.type?x="nocontent":304===t?x="notmodified":(x=y.state,l=y.data,v=y.error,u=!v)):(v=x,(t||!x)&&(x="error",0>t&&(t=0))),$.status=t,$.statusText=(e||x)+"",u?p.resolveWith(f,[l,x,$]):p.rejectWith(f,[$,x,v]),$.statusCode(m),m=void 0,c&&d.trigger(u?"ajaxSuccess":"ajaxError",[$,h,u?l:v]),g.fireWith(f,[$,x]),c&&(d.trigger("ajaxComplete",[$,h]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,c,l,h=Z.ajaxSetup({},e),f=h.context||h,d=h.context&&(f.nodeType||f.jquery)?Z(f):Z.event,p=Z.Deferred(),g=Z.Callbacks("once memory"),m=h.statusCode||{},v={},y={},b=0,w="canceled",$={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!a)for(a={};e=de.exec(o);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return b||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)m[e]=[m[e],t[e]];else $.always(t[$.status]);return this},abort:function(t){var e=t||w;return r&&r.abort(e),n(0,e),this}};if(p.promise($).complete=g.add,$.success=$.done,$.error=$.fail,h.url=((t||h.url||$e)+"").replace(he,"").replace(me,xe[1]+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=Z.trim(h.dataType||"*").toLowerCase().match(dt)||[""],null==h.crossDomain&&(u=ve.exec(h.url.toLowerCase()),h.crossDomain=!(!u||u[1]===xe[1]&&u[2]===xe[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(xe[3]||("http:"===xe[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Z.param(h.data,h.traditional)),j(ye,h,e,$),2===b)return $;c=Z.event&&h.global,c&&0===Z.active++&&Z.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ge.test(h.type),i=h.url,h.hasContent||(h.data&&(i=h.url+=(le.test(i)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=fe.test(i)?i.replace(fe,"$1_="+ce++):i+(le.test(i)?"&":"?")+"_="+ce++)),h.ifModified&&(Z.lastModified[i]&&$.setRequestHeader("If-Modified-Since",Z.lastModified[i]),Z.etag[i]&&$.setRequestHeader("If-None-Match",Z.etag[i])),(h.data&&h.hasContent&&h.contentType!==!1||e.contentType)&&$.setRequestHeader("Content-Type",h.contentType),$.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+we+"; q=0.01":""):h.accepts["*"]);for(l in h.headers)$.setRequestHeader(l,h.headers[l]);if(h.beforeSend&&(h.beforeSend.call(f,$,h)===!1||2===b))return $.abort();w="abort";for(l in{success:1,error:1,complete:1})$[l](h[l]);if(r=j(be,h,e,$)){$.readyState=1,c&&d.trigger("ajaxSend",[$,h]),h.async&&h.timeout>0&&(s=setTimeout(function(){$.abort("timeout")},h.timeout));try{b=1,r.send(v,n)}catch(x){if(!(2>b))throw x;n(-1,x)}}else n(-1,"No Transport");return $},getJSON:function(t,e,n){return Z.get(t,e,n,"json")},getScript:function(t,e){return Z.get(t,void 0,e,"script")}}),Z.each(["get","post"],function(t,e){Z[e]=function(t,n,r,i){return Z.isFunction(n)&&(i=i||r,r=n,n=void 0),Z.ajax({url:t,type:e,dataType:i,data:n,success:r})}}),Z._evalUrl=function(t){return Z.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(t){var e;return Z.isFunction(t)?this.each(function(e){Z(this).wrapAll(t.call(this,e))}):(this[0]&&(e=Z(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return this.each(Z.isFunction(t)?function(e){Z(this).wrapInner(t.call(this,e))}:function(){var e=Z(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=Z.isFunction(t);return this.each(function(n){Z(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Z.expr.filters.visible=function(t){return!Z.expr.filters.hidden(t)};var ke=/%20/g,Se=/\[\]$/,Ce=/\r?\n/g,Ee=/^(?:submit|button|image|reset|file)$/i,Te=/^(?:input|select|textarea|keygen)/i;Z.param=function(t,e){var n,r=[],i=function(t,e){e=Z.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e);
};if(void 0===e&&(e=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(t)||t.jquery&&!Z.isPlainObject(t))Z.each(t,function(){i(this.name,this.value)});else for(n in t)U(n,t[n],e,i);return r.join("&").replace(ke,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=Z.prop(this,"elements");return t?Z.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!Z(this).is(":disabled")&&Te.test(this.nodeName)&&!Ee.test(t)&&(this.checked||!St.test(t))}).map(function(t,e){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}}):{name:e.name,value:n.replace(Ce,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Ae=0,De={},_e={0:200,1223:204},Oe=Z.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in De)De[t]()}),X.cors=!!Oe&&"withCredentials"in Oe,X.ajax=Oe=!!Oe,Z.ajaxTransport(function(t){var e;return X.cors||Oe&&!t.crossDomain?{send:function(n,r){var i,o=t.xhr(),a=++Ae;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);e=function(t){return function(){e&&(delete De[a],e=o.onload=o.onerror=null,"abort"===t?o.abort():"error"===t?r(o.status,o.statusText):r(_e[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=e(),o.onerror=e("error"),e=De[a]=e("abort");try{o.send(t.hasContent&&t.data||null)}catch(s){if(e)throw s}},abort:function(){e&&e()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return Z.globalEval(t),t}}}),Z.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),Z.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=Z("'),t=""+t+"";try{this.Ea.gb.open(),this.Ea.gb.write(t),this.Ea.gb.close()}catch(o){I("frame writing exception"),o.stack&&I(o.stack),I(o)}}function ig(t){if(t.Ud&&t.Kd&&t.ve.count()<(0=t.Qc[0].Pe.length+30+n.length;){var i=t.Qc.shift(),n=n+"&seg"+r+"="+i.jg+"&ts"+r+"="+i.pg+"&d"+r+"="+i.Pe;r++}return jg(t,e+n,t.$d),!0}return!1}function jg(t,e,n){function r(){t.ve.remove(n),ig(t)}t.ve.add(n,1);var i=setTimeout(r,Math.floor(25e3));hg(t,e,function(){clearTimeout(i),r()})}function hg(t,e,n){setTimeout(function(){try{if(t.Kd){var r=t.Ea.gb.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=function(){I("Long-poll script failed to load: "+e),t.Kd=!1,t.close()},t.Ea.gb.body.appendChild(r)}}catch(i){}},Math.floor(1))}function kg(t){lg(this,t)}function lg(t,e){var n=Yf&&Yf.isAvailable(),r=n&&!(xb.Ze||!0===xb.get("previous_websocket_failure"));if(e.qg&&(n||J("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)t.Wc=[Yf];else{var i=t.Wc=[];cc(mg,function(t,e){e&&e.isAvailable()&&i.push(e)})}}function ng(t){if(00&&(t.md=hc(function(){t.md=null,t.Bb||(t.I&&102400=t.pf?(t.f("Secondary connection is healthy."),t.Bb=!0,t.D.sd(),t.D.start(),t.f("sending client ack on secondary"),t.D.send({t:"c",d:{t:"a",d:{}}}),t.f("Ending transmission on primary"),t.I.send({t:"c",d:{t:"n",d:{}}}),t.Xc=t.D,ug(t)):(t.f("sending ping on secondary."),t.D.send({t:"c",d:{t:"p",d:{}}}))}function wg(t){t.Bb||(t.xe--,0>=t.xe&&(t.f("Primary connection is healthy."),t.Bb=!0,t.I.sd()))}function tg(t,e){t.D=new e("c:"+t.id+":"+t.Le++,t.L,t.qf),t.pf=e.responsesRequiredToBeHealthy||0,t.D.open(qg(t,t.D),rg(t,t.D)),hc(function(){t.D&&(t.f("Timed out trying to upgrade."),t.D.close())},Math.floor(6e4))}function sg(t,e,n){t.f("Realtime connection established."),t.I=e,t.Ua=1,t.Lc&&(t.Lc(n,t.qf),t.Lc=null),0===t.xe?(t.f("Primary connection is healthy."),t.Bb=!0):hc(function(){xg(t)},Math.floor(5e3))}function xg(t){t.Bb||1!==t.Ua||(t.f("sending ping on primary."),zg(t,{t:"c",d:{t:"p",d:{}}}))}function zg(t,e){if(1!==t.Ua)throw"Connection is not connected";t.Xc.send(e)}function vg(t){t.f("Shutting down all connections"),t.I&&(t.I.close(),t.I=null),t.D&&(t.D.close(),t.D=null),t.md&&(clearTimeout(t.md),t.md=null)}function Ag(t,e,n,r,i,o){if(this.id=Bg++,this.f=Tb("p:"+this.id+":"),this.qd={},this.$={},this.pa=[],this.Oc=0,this.Kc=[],this.ma=!1,this.Sa=1e3,
this.td=3e5,this.Gb=e,this.Jc=n,this.ue=r,this.L=t,this.ob=this.Fa=this.Cb=this.ze=null,this.$c=i,this.de=!1,this.ke=0,o)throw Error("Auth override specified in options, but not supported on non Node.js platforms");this.Vd=o,this.ub=null,this.Mb=!1,this.Gd={},this.ig=0,this.Re=!0,this.Ac=this.me=null,Cg(this,0),Mc.Vb().gc("visible",this.Zf,this),-1===t.host.indexOf("fblocal")&&Lc.Vb().gc("online",this.Yf,this)}function Eg(t,e){var n=e.eg,r=n.path.toString(),i=n.ja();t.f("Listen on "+r+" for "+i);var o={p:r};e.tag&&(o.q=pf(n.m),o.t=e.tag),o.h=e.ld(),t.ua("q",o,function(o){var a=o.d,s=o.s;if(a&&"object"==typeof a&&eb(a,"w")){var u=w(a,"w");ea(u)&&0<=xa(u,"no_index")&&J("Using an unspecified index. Consider adding "+('".indexOn": "'+n.m.g.toString()+'"')+" at "+n.path.toString()+" to your security rules for better performance")}(t.$[r]&&t.$[r][i])===e&&(t.f("listen response",o),"ok"!==s&&Fg(t,r,i),e.G&&e.G(s,a))})}function Gg(t){if(t.ma&&t.ob){var e=t.ob,n=jc(e)?"auth":"gauth",r={cred:e};null===t.Vd?r.noauth=!0:"object"==typeof t.Vd&&(r.authvar=t.Vd),t.ua(n,r,function(n){var r=n.s;n=n.d||"error",t.ob===e&&("ok"===r?t.ke=0:Hg(t,r,n))})}}function Ig(t,e,n,r,i){n={p:n,d:r},t.f("onDisconnect "+e,n),t.ua(e,n,function(t){i&&setTimeout(function(){i(t.s,t.d)},Math.floor(0))})}function Jg(t,e,r,i,o,a){i={p:r,d:i},n(a)&&(i.h=a),t.pa.push({action:e,mf:i,G:o}),t.Oc++,e=t.pa.length-1,t.ma?Kg(t,e):t.f("Buffering put: "+r)}function Kg(t,e){var n=t.pa[e].action,r=t.pa[e].mf,i=t.pa[e].G;t.pa[e].fg=t.ma,t.ua(n,r,function(r){t.f(n+" response",r),delete t.pa[e],t.Oc--,0===t.Oc&&(t.pa=[]),i&&i(r.s,r.d)})}function Cg(t,e){D(!t.Fa,"Scheduling a connect when we're already connected/ing?"),t.ub&&clearTimeout(t.ub),t.ub=setTimeout(function(){t.ub=null,Ng(t)},Math.floor(e))}function Ng(t){if(Og(t)){t.f("Making a connection attempt"),t.me=(new Date).getTime(),t.Ac=null;var e=q(t.wd,t),n=q(t.Lc,t),r=q(t.df,t),i=t.id+":"+Dg++,o=t.Cb,a=!1,s=null,u=function(){s?s.close():(a=!0,r())};t.Fa={close:u,ua:function(t){D(s,"sendRequest call when we're not connected not allowed."),s.ua(t)}};var c=t.de;t.de=!1,t.$c.getToken(c).then(function(u){a?I("getToken() completed but was canceled"):(I("getToken() completed. Creating connection."),t.ob=u&&u.accessToken,s=new og(i,t.L,e,n,r,function(e){J(e+" ("+t.L.toString()+")"),t.ab("server_kill")},o))}).then(null,function(e){t.f("Failed to get token: "+e),a||u()})}}function Lg(t,e,n){n=n?Aa(n,function(t){return ac(t)}).join("$"):"default",(t=Fg(t,e,n))&&t.G&&t.G("permission_denied")}function Fg(t,e,r){e=new E(e).toString();var i;return n(t.$[e])?(i=t.$[e][r],delete t.$[e][r],0===La(t.$[e])&&delete t.$[e]):i=void 0,i}function Hg(t,e,n){I("Auth token revoked: "+e+"/"+n),t.ob=null,t.de=!0,t.Fa.close(),("invalid_token"===e||"permission_denied"===e)&&(t.ke++,3<=t.ke&&(t.Sa=3e4,t=t.$c,e='Provided authentication credentials for the app named "'+t.oc.name+'" are invalid. This usually indicates your app was not initialized correctly. ',e="credential"in t.oc.options?e+'Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in t.oc.options?e+'Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+'Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',J(e)))}function Mg(t){Gg(t),v(t.$,function(e){v(e,function(e){Eg(t,e)})});for(var e=0;ea.Bc,"Stacking an older write on top of newer ones"),n(s)||(s=!0),a.la.push({path:e,Ga:r,Zc:i,visible:s}),s&&(a.S=uf(a.S,e,r)),a.Bc=i,o?ch(t,new ce(fe,e,r)):[]}function dh(t,e,n,r){var i=t.jb;return D(r>i.Bc,"Stacking an older merge on top of newer ones"),i.la.push({path:e,children:n,Zc:r,visible:!0}),i.S=vf(i.S,e,n),i.Bc=r,n=xd(n),ch(t,new ae(fe,e,n))}function eh(t,e,n){n=n||!1;var r=Ef(t.jb,e);if(t.jb.Ed(e)){var i=R;return null!=r.Ga?i=i.set(Q,!0):fb(r.children,function(t,e){i=i.set(new E(t),e)}),ch(t,new de(r.path,i,n))}return[]}function fh(t,e,n){return n=xd(n),ch(t,new ae(ie,e,n))}function gh(t,e,n,r){if(r=hh(t,r),null!=r){var i=ih(r);return r=i.path,i=i.Hb,e=P(r,e),n=new ce(new he(!1,!0,i,!0),e,n),jh(t,r,n)}return[]}function kh(t,e,n,r){if(r=hh(t,r)){var i=ih(r);return r=i.path,i=i.Hb,e=P(r,e),n=xd(n),n=new ae(new he(!1,!0,i,!0),e,n),jh(t,r,n)}return[]}function oh(t){return Bd(t,function(t,e,n){if(e&&null!=Yg(e))return[Yg(e)];var r=[];return e&&(r=Zg(e)),v(n,function(t){r=r.concat(t)}),r})}function sh(t,e){for(var n=0;ni;){if(0==a)for(;r>=i;)ua(this,t,i),i+=this.Wa;if(p(t)){for(;e>i;)if(o[a]=t.charCodeAt(i),++a,++i,a==this.Wa){ua(this,o),a=0;break}}else for(;e>i;)if(o[a]=t[i],++a,++i,a==this.Wa){ua(this,o),a=0;break}}this.$b=a,this.Pd+=e}};var r;t:{var va=aa.navigator;if(va){var wa=va.userAgent;if(wa){r=wa;break t}}r=""}var t=Array.prototype,xa=t.indexOf?function(e,n,r){return t.indexOf.call(e,n,r)}:function(t,e,n){if(n=null==n?0:0>n?Math.max(0,t.length+n):n,p(t))return p(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in i&&e.call(n,i[o],o,t)},za=t.filter?function(e,n,r){return t.filter.call(e,n,r)}:function(t,e,n){for(var r=t.length,i=[],o=0,a=p(t)?t.split(""):t,s=0;r>s;s++)if(s in a){var u=a[s];e.call(n,u,s,t)&&(i[o++]=u)}return i},Aa=t.map?function(e,n,r){return t.map.call(e,n,r)}:function(t,e,n){for(var r=t.length,i=Array(r),o=p(t)?t.split(""):t,a=0;r>a;a++)a in o&&(i[a]=e.call(n,o[a],a,t));return i},Ba=t.reduce?function(e,n,r,i){for(var o=[],a=1,s=arguments.length;s>a;a++)o.push(arguments[a]);return i&&(o[0]=q(n,i)),t.reduce.apply(e,o)}:function(t,e,n,r){var i=n;return ya(t,function(n,o){i=e.call(r,i,n,o,t)}),i},Ca=t.every?function(e,n,r){return t.every.call(e,n,r)}:function(t,e,n){for(var r=t.length,i=p(t)?t.split(""):t,o=0;r>o;o++)if(o in i&&!e.call(n,i[o],o,t))return!1;return!0},Ua=-1!=r.indexOf("Opera")||-1!=r.indexOf("OPR"),Va=-1!=r.indexOf("Trident")||-1!=r.indexOf("MSIE"),Wa=-1!=r.indexOf("Gecko")&&-1==r.toLowerCase().indexOf("webkit")&&!(-1!=r.indexOf("Trident")||-1!=r.indexOf("MSIE")),Xa=-1!=r.toLowerCase().indexOf("webkit");!function(){var t,e="";return Ua&&aa.opera?(e=aa.opera.version,ha(e)?e():e):(Wa?t=/rv\:([^\);]+)(\)|;)/:Va?t=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Xa&&(t=/WebKit\/(\S+)/),t&&(e=(e=t.exec(r))?e[1]:""),Va&&(t=(t=aa.document)?t.documentMode:void 0,t>parseFloat(e))?String(t):e)}();var Ya=null,Za=null,$a=null,hb=firebase.Promise;g=ub.prototype,g.set=function(t,e){null==e?this.uc.removeItem(this.Cd+t):this.uc.setItem(this.Cd+t,x(e))},g.get=function(t){return t=this.uc.getItem(this.Cd+t),null==t?null:lb(t)},g.remove=function(t){this.uc.removeItem(this.Cd+t)},g.Ze=!1,g.toString=function(){return this.uc.toString()},vb.prototype.set=function(t,e){null==e?delete this.pc[t]:this.pc[t]=e},vb.prototype.get=function(t){return eb(this.pc,t)?this.pc[t]:null},vb.prototype.remove=function(t){delete this.pc[t]},vb.prototype.Ze=!0;var xb=wb("localStorage"),yb=wb("sessionStorage");zb.prototype.toString=function(){var t=(this.Sc?"https://":"http://")+this.host;return this.gf&&(t+="<"+this.gf+">"),t};var Lb=function(){var t=1;return function(){return t++}}(),D=cb,Mb=db,Qb=null,Rb=!0,ec=/^-?\d{1,10}$/,mc={};lc.prototype.nd=function(t,e){return 0!==this.compare(new C("[MIN_NAME]",t),new C("[MIN_NAME]",e))},lc.prototype.Hc=function(){return oc},la(pc,lc),g=pc.prototype,g.xc=function(t){return!t.P(this.bc).e()},g.compare=function(t,e){var n=t.R.P(this.bc),r=e.R.P(this.bc),n=n.sc(r);return 0===n?sb(t.name,e.name):n},g.Ec=function(t,e){var n=G(t),n=L.F(this.bc,n);return new C(e,n)},g.Fc=function(){var t=L.F(this.bc,qc);return new C("[MAX_NAME]",t)},g.toString=function(){return this.bc.slice().join("/")},la(rc,lc),g=rc.prototype,g.compare=function(t,e){var n=t.R.C(),r=e.R.C(),n=n.sc(r);return 0===n?sb(t.name,e.name):n},g.xc=function(t){return!t.C().e()},g.nd=function(t,e){return!t.C().Z(e.C())},g.Hc=function(){return oc},g.Fc=function(){return new C("[MAX_NAME]",new Kb("[PRIORITY-POST]",qc))},g.Ec=function(t,e){var n=G(t);return new C(e,new Kb("[PRIORITY-POST]",n))},g.toString=function(){return".priority"};var H=new rc;la(sc,lc),g=sc.prototype,g.compare=function(t,e){return sb(t.name,e.name)},g.xc=function(){throw Mb("KeyIndex.isDefinedOn not expected to be called.")},g.nd=function(){return!1},g.Hc=function(){return oc},g.Fc=function(){return new C("[MAX_NAME]",L)},g.Ec=function(t){return D(p(t),"KeyIndex indexValue must always be a string."),new C(t,L)},g.toString=function(){return".key"};var tc=new sc;la(uc,lc),g=uc.prototype,g.compare=function(t,e){var n=t.R.sc(e.R);return 0===n?sb(t.name,e.name):n},g.xc=function(){return!0},g.nd=function(t,e){return!t.Z(e)},g.Hc=function(){return oc},g.Fc=function(){return vc},g.Ec=function(t,e){var n=G(t);return new C(e,n)},g.toString=function(){return".value"};var wc=new uc;xc.prototype.get=function(t){var e=w(this.od,t);if(!e)throw Error("No index defined for "+t);return e===mc?null:e};var Bc=new xc({".priority":mc},{".priority":H}),Dc=["object","boolean","number","string"];g=Kb.prototype,g.J=function(){return!0},g.C=function(){return this.aa},g.fa=function(t){return new Kb(this.B,t)},g.Q=function(t){return".priority"===t?this.aa:L},g.P=function(t){return t.e()?this:".priority"===K(t)?this.aa:L},g.Da=function(){return!1},g.Ve=function(){return null},g.T=function(t,e){return".priority"===t?this.fa(e):e.e()&&".priority"!==t?this:L.T(t,e).fa(this.aa)},g.F=function(t,e){var n=K(t);return null===n?e:e.e()&&".priority"!==n?this:(D(".priority"!==n||1===Ec(t),".priority must be the last token in a path"),this.T(n,L.F(N(t),e)))},g.e=function(){return!1},g.Eb=function(){return 0},g.O=function(){return!1},g.H=function(t){return t&&!this.C().e()?{".value":this.Ca(),".priority":this.C().H()}:this.Ca()},g.hash=function(){if(null===this.Db){var t="";this.aa.e()||(t+="priority:"+Fc(this.aa.H())+":");var e=typeof this.B,t=t+(e+":"),t="number"===e?t+dc(this.B):t+this.B;this.Db=Ob(t)}return this.Db},g.Ca=function(){return this.B},g.sc=function(t){if(t===L)return 1;if(t instanceof O)return-1;D(t.J(),"Unknown node type");var e=typeof t.B,n=typeof this.B,r=xa(Dc,e),i=xa(Dc,n);return D(r>=0,"Unknown leaf type: "+e),D(i>=0,"Unknown leaf type: "+n),r===i?"object"===n?0:this.B0){for(var i=Array(r),o=0;r>o;o++)i[o]=n[o];n=i}else n=[];for(r=0;r=0;o--)i[o]="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(n%64),n=Math.floor(n/64);if(D(0===n,"Cannot push at time == 0"),n=i.join(""),r){for(o=11;o>=0&&63===e[o];o--)e[o]=0;e[o]++}else for(o=0;12>o;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return D(20===n.length,"nextPushId: Length should be 20."),n}}();la(Lc,Ic),Lc.prototype.Ue=function(t){return D("online"===t,"Unknown event type: "+t),[this.hc]},ca(Lc),la(Mc,Ic),Mc.prototype.Ue=function(t){return D("visible"===t,"Unknown event type: "+t),[this.Mb]},ca(Mc),g=E.prototype,g.toString=function(){for(var t="",e=this.Y;e=this.o.length)return null;for(var t=[],e=this.Y;e=this.o.length},g.Z=function(t){if(Ec(this)!==Ec(t))return!1;for(var e=this.Y,n=t.Y;e<=this.o.length;e++,n++)if(this.o[e]!==t.o[n])return!1;return!0},g.contains=function(t){var e=this.Y,n=t.Y;if(Ec(this)>Ec(t))return!1;for(;ee?n=n.left:e>0&&(n=n.right)}return null},g.e=function(){return this.ba.e()},g.count=function(){return this.ba.count()},g.Gc=function(){return this.ba.Gc()},g.ec=function(){return this.ba.ec()},g.ha=function(t){return this.ba.ha(t)},g.Wb=function(t){return new bd(this.ba,null,this.La,!1,t)},g.Xb=function(t,e){return new bd(this.ba,t,this.La,!1,e)},g.Zb=function(t,e){return new bd(this.ba,t,this.La,!0,e)},g.We=function(t){return new bd(this.ba,null,this.La,!0,t)},g=dd.prototype,g.X=function(t,e,n,r,i){return new dd(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)},g.count=function(){return this.left.count()+1+this.right.count()},g.e=function(){return!1},g.ha=function(t){return this.left.ha(t)||t(this.key,this.value)||this.right.ha(t)},g.Gc=function(){return ed(this).key},g.ec=function(){return this.right.e()?this.key:this.right.ec()},g.Oa=function(t,e,n){var r,i;return i=this,r=n(t,i.key),i=0>r?i.X(null,null,null,i.left.Oa(t,e,n),null):0===r?i.X(null,e,null,null,null):i.X(null,null,null,null,i.right.Oa(t,e,n)),gd(i)},g.remove=function(t,e){var n,r;if(n=this,0>e(t,n.key))n.left.e()||n.left.ea()||n.left.left.ea()||(n=id(n)),n=n.X(null,null,null,n.left.remove(t,e),null);else{if(n.left.ea()&&(n=jd(n)),n.right.e()||n.right.ea()||n.right.left.ea()||(n=kd(n),n.left.left.ea()&&(n=jd(n),n=kd(n))),0===e(t,n.key)){if(n.right.e())return $c;r=ed(n.right),n=n.X(r.key,r.value,null,null,hd(n.right))}n=n.X(null,null,null,null,n.right.remove(t,e))}return gd(n)},g.ea=function(){return this.color},g=md.prototype,g.X=function(){return this},g.Oa=function(t,e){return new dd(t,e,null)},g.remove=function(){return this},g.count=function(){return 0},g.e=function(){return!0},g.ha=function(){return!1},g.Gc=function(){return null},g.ec=function(){return null},g.ea=function(){return!1};var $c=new md;g=O.prototype,g.J=function(){return!1},g.C=function(){return this.aa||L},g.fa=function(t){return this.k.e()?this:new O(this.k,t,this.yb)},g.Q=function(t){return".priority"===t?this.C():(t=this.k.get(t),null===t?L:t)},g.P=function(t){var e=K(t);return null===e?this:this.Q(e).P(N(t))},g.Da=function(t){return null!==this.k.get(t)},g.T=function(t,e){if(D(e,"We should always be passing snapshot nodes"),".priority"===t)return this.fa(e);var n,r,i=new C(t,e);return e.e()?(n=this.k.remove(t),i=Ac(this.yb,i,this.k)):(n=this.k.Oa(t,e),i=yc(this.yb,i,this.k)),r=n.e()?L:this.aa,new O(n,r,i)},g.F=function(t,e){var n=K(t);if(null===n)return e;D(".priority"!==K(t)||1===Ec(t),".priority must be the last token in a path");var r=this.Q(n).F(N(t),e);return this.T(n,r)},g.e=function(){return this.k.e()},g.Eb=function(){return this.k.count()};var nd=/^(0|[1-9]\d*)$/;g=O.prototype,g.H=function(t){if(this.e())return null;var e={},n=0,r=0,i=!0;if(this.O(H,function(o,a){e[o]=a.H(t),n++,i&&nd.test(o)?r=Math.max(r,Number(o)):i=!1}),!t&&i&&2*n>r){var o,a=[];for(o in e)a[o]=e[o];return a}return t&&!this.C().e()&&(e[".priority"]=this.C().H()),e},g.hash=function(){if(null===this.Db){var t="";this.C().e()||(t+="priority:"+Fc(this.C().H())+":"),this.O(H,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.Db=""===t?"":Ob(t)}return this.Db},g.Ve=function(t,e,n){return(n=od(this,n))?(t=ad(n,new C(t,e)))?t.name:null:ad(this.k,t)},g.O=function(t,e){var n=od(this,t);return n?n.ha(function(t){return e(t.name,t.R)}):this.k.ha(e)},g.Wb=function(t){return this.Xb(t.Hc(),t)},g.Xb=function(t,e){var n=od(this,e);if(n)return n.Xb(t,function(t){return t});for(var n=this.k.Xb(t.name,qb),r=cd(n);null!=r&&0>e.compare(r,t);)M(n),r=cd(n);return n},g.We=function(t){return this.Zb(t.Fc(),t)},g.Zb=function(t,e){var n=od(this,e);if(n)return n.Zb(t,function(t){return t});for(var n=this.k.Zb(t.name,qb),r=cd(n);null!=r&&0t?-1:1});g=vd.prototype,g.e=function(){return null===this.value&&this.children.e()},g.subtree=function(t){if(t.e())return this;var e=this.children.get(K(t));return null!==e?e.subtree(N(t)):R},g.set=function(t,e){if(t.e())return new vd(e,this.children);var n=K(t),r=(this.children.get(n)||R).set(N(t),e),n=this.children.Oa(n,r);return new vd(this.value,n)},g.remove=function(t){if(t.e())return this.children.e()?R:new vd(null,this.children);var e=K(t),n=this.children.get(e);return n?(t=n.remove(N(t)),e=t.e()?this.children.remove(e):this.children.Oa(e,t),null===this.value&&e.e()?R:new vd(this.value,e)):this},g.get=function(t){if(t.e())return this.value;var e=this.children.get(K(t));return e?e.get(N(t)):null};var R=new vd(null);vd.prototype.toString=function(){var t={};return Hd(this,function(e,n){t[e.toString()]=n.toString()}),x(t)};var Kd=/[\[\].#$\/\u0000-\u001F\u007F]/,Ld=/[\[\].#$\u0000-\u001F\u007F]/;Gb.prototype.find=function(t){if(null!=this.B)return this.B.P(t);if(t.e()||null==this.k)return null;var e=K(t);return t=N(t),this.k.contains(e)?this.k.get(e).find(t):null},Gb.prototype.O=function(t){null!==this.k&&Hc(this.k,function(e,n){
t(e,n)})},Zd.prototype.Mc=function(){return this.path.e()?new Zd(this.source,Q):new Zd(this.source,N(this.path))},Zd.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" listen_complete)"},ae.prototype.Mc=function(t){return this.path.e()?(t=this.children.subtree(new E(t)),t.e()?null:t.value?new ce(this.source,Q,t.value):new ae(this.source,Q,t)):(D(K(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new ae(this.source,N(this.path),this.children))},ae.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},de.prototype.Mc=function(t){return this.path.e()?null!=this.Ob.value?(D(this.Ob.children.e(),"affectedTree should not have overlapping affected paths."),this):(t=this.Ob.subtree(new E(t)),new de(Q,t,this.Id)):(D(K(this.path)===t,"operationForChild called for unrelated child."),new de(N(this.path),this.Ob,this.Id))},de.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" ack write revert="+this.Id+" affectedTree="+this.Ob+")"},ce.prototype.Mc=function(t){return this.path.e()?new ce(this.source,Q,this.Ga.Q(t)):new ce(this.source,N(this.path),this.Ga)},ce.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" overwrite: "+this.Ga.toString()+")"};var ge=0,be=1,ee=2,$d=3,fe=new he(!0,!1,null,!1),ie=new he(!1,!0,null,!1);he.prototype.toString=function(){return this.ee?"user":this.Ee?"server(queryID="+this.Hb+")":"server"},je.prototype.j=function(){return this.A},oe.prototype.w=function(){return this.Ld},se.prototype.Te=function(){return null},se.prototype.fe=function(){return null};var te=new se;ue.prototype.Te=function(t){var e=this.Ka.N;return ne(e,t)?e.j().Q(t):(e=null!=this.yd?new je(this.yd,!0,!1):this.Ka.w(),this.xf.qc(t,e))},ue.prototype.fe=function(t,e,n){var r=null!=this.yd?this.yd:re(this.Ka);return t=this.xf.Xd(r,e,1,n,t),0===t.length?null:t[0]},we.prototype.eb=function(t,e,n,r){var i,o=new xe;if(e.type===ge)e.source.ee?n=ye(this,t,e.path,e.Ga,n,r,o):(D(e.source.Se,"Unknown source."),i=e.source.Ee||le(t.w())&&!e.path.e(),n=ze(this,t,e.path,e.Ga,n,r,i,o));else if(e.type===be)e.source.ee?n=Ae(this,t,e.path,e.children,n,r,o):(D(e.source.Se,"Unknown source."),i=e.source.Ee||le(t.w()),n=Be(this,t,e.path,e.children,n,r,i,o));else if(e.type===ee)if(e.Id)if(e=e.path,null!=n.lc(e))n=t;else{if(i=new ue(n,t,r),r=t.N.j(),e.e()||".priority"===K(e))ke(t.w())?e=n.Aa(re(t)):(e=t.w().j(),D(e instanceof O,"serverChildren would be complete if leaf node"),e=n.rc(e)),e=this.U.ya(r,e,o);else{var a=K(e),s=n.qc(a,t.w());null==s&&ne(t.w(),a)&&(s=r.Q(a)),e=null!=s?this.U.F(r,a,s,N(e),i,o):t.N.j().Da(a)?this.U.F(r,a,L,N(e),i,o):r,e.e()&&ke(t.w())&&(r=n.Aa(re(t)),r.J()&&(e=this.U.ya(e,r,o)))}r=ke(t.w())||null!=n.lc(Q),n=pe(t,e,r,this.U.Na())}else n=Ce(this,t,e.path,e.Ob,n,r,o);else{if(e.type!==$d)throw Mb("Unknown operation type: "+e.type);r=e.path,e=t.w(),i=e.j(),a=e.da||r.e(),n=De(this,new oe(t.N,new je(i,a,e.Sb)),r,n,te,o)}return o=Na(o.fb),r=n,e=r.N,e.da&&(i=e.j().J()||e.j().e(),a=qe(t),(0=this.g.compare(this.Uc,t)&&0>=this.g.compare(t,this.vc)},g.F=function(t,e,n,r,i,o){return this.matches(new C(e,n))||(n=L),this.he.F(t,e,n,r,i,o)},g.ya=function(t,e,n){e.J()&&(e=L);var r=e.nb(this.g),r=r.fa(L),i=this;return e.O(H,function(t,e){i.matches(new C(t,e))||(r=r.T(t,L))}),this.he.ya(t,r,n)},g.fa=function(t){return t},g.Na=function(){return!0},g.Ub=function(){return this.he},g=Re.prototype,g.F=function(t,e,n,r,i,o){return this.sa.matches(new C(e,n))||(n=L),t.Q(e).Z(n)?t:t.Eb()=this.g.compare(this.sa.Uc,a):0>=this.g.compare(a,this.sa.vc)))break;r=r.T(a.name,a.R),i++}}else{r=e.nb(this.g),r=r.fa(L);var s,u,c;if(this.Ib){e=r.We(this.g),s=this.sa.vc,u=this.sa.Uc;var l=nc(this.g);c=function(t,e){return l(e,t)}}else e=r.Wb(this.g),s=this.sa.Uc,u=this.sa.vc,c=nc(this.g);for(var i=0,h=!1;0=c(s,a)&&(h=!0),(o=h&&i=c(a,u))?i++:r=r.T(a.name,L)}return this.sa.Ub().ya(t,r,n)},g.fa=function(t){return t},g.Na=function(){return!0},g.Ub=function(){return this.sa.Ub()};var Me="child_added",Le="child_removed",Ie="child_changed",Je="child_moved",Ne="value",mf=new lf;g=lf.prototype,g.ne=function(t){var e=nf(this);return e.xa=!0,e.oa=t,e.mb="l",e},g.oe=function(t){var e=nf(this);return e.xa=!0,e.oa=t,e.mb="r",e},g.Nd=function(t,e){var r=nf(this);return r.ka=!0,n(t)||(t=null),r.dc=t,null!=e?(r.Kb=!0,r.zb=e):(r.Kb=!1,r.zb=""),r},g.gd=function(t,e){var r=nf(this);return r.na=!0,n(t)||(t=null),r.ac=t,n(e)?(r.Rb=!0,r.xb=e):(r.vg=!1,r.xb=""),r},g.toString=function(){return x(pf(this))};var tf=new sf(new vd(null));sf.prototype.Ed=function(t){return t.e()?tf:(t=Ad(this.W,t,R),new sf(t))},sf.prototype.e=function(){return this.W.e()},sf.prototype.apply=function(t){return zf(Q,this.W,t)},Af.prototype.j=function(t){return this.Jd.P(t)},Af.prototype.toString=function(){return this.Jd.toString()},Bf.prototype.getToken=function(t){return this.oc.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(I("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})},g=Df.prototype,g.Ed=function(t){var e=Ea(this.la,function(e){return e.Zc===t});D(e>=0,"removeWrite called with nonexistent writeId.");var n=this.la[e];this.la.splice(e,1);for(var r=n.visible,i=!1,o=this.la.length-1;r&&o>=0;){var a=this.la[o];a.visible&&(o>=e&&Ff(a,n.path)?r=!1:n.path.contains(a.path)&&(i=!0)),o--}if(r){if(i)this.S=Gf(this.la,Hf,Q),this.Bc=0=t.length){var e=Number(t);if(!isNaN(e)){i.Fe=e,i.frames=[],t=null;break t}}i.Fe=1,i.frames=[]}null!==t&&ag(i,t)}},this.Ia.onerror=function(t){i.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&i.f(t),i.bb()}},Yf.prototype.start=function(){},Yf.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1parseFloat(e[1])&&(t=!0)}return!t&&null!==Xf&&!Zf},Yf.responsesRequiredToBeHealthy=2,Yf.healthyTimeout=3e4,g=Yf.prototype,g.sd=function(){xb.remove("previous_websocket_failure")},g.send=function(t){$f(this),t=x(t),this.qb+=t.length,Mf(this.Va,"bytes_sent",t.length),t=bc(t,16384),1i;i++)e+=" ";console.log(e+r)}}},g.Ce=function(t){Mf(this.Va,t),this.og.rf[t]=!0},g.f=function(t){var e="";this.Ra&&(e=this.Ra.id+":"),I(e,arguments)},Ug.prototype.ab=function(){for(var t in this.lb)this.lb[t].ab()},Ug.prototype.kc=function(){for(var t in this.lb)this.lb[t].kc()},Ug.prototype.ce=function(t){this.wf=t},ca(Ug),Ug.prototype.interrupt=Ug.prototype.ab,Ug.prototype.resume=Ug.prototype.kc;var W={};W.nc=Ag,W.DataConnection=W.nc,Ag.prototype.ng=function(t,e){this.ua("q",{p:t},e)},W.nc.prototype.simpleListen=W.nc.prototype.ng,Ag.prototype.Hf=function(t,e){this.ua("echo",{d:t},e)},W.nc.prototype.echo=W.nc.prototype.Hf,Ag.prototype.interrupt=Ag.prototype.ab,W.zf=og,W.RealTimeConnection=W.zf,og.prototype.sendRequest=og.prototype.ua,og.prototype.close=og.prototype.close,W.Rf=function(t){var e=Ag.prototype.put;return Ag.prototype.put=function(r,i,o,a){n(a)&&(a=t()),e.call(this,r,i,o,a)},function(){Ag.prototype.put=e}},W.hijackHash=W.Rf,W.yf=zb,W.ConnectionTarget=W.yf,W.ja=function(t){return t.ja()},W.queryIdentifier=W.ja,W.Uf=function(t){return t.u.Ra.$},W.listens=W.Uf,W.ce=function(t){Ug.Vb().ce(t)},W.forceRestClient=W.ce,W.Context=Ug,g=X.prototype,g.wb=function(){return y("Query.ref",0,0,arguments.length),new U(this.u,this.path)},g.gc=function(t,e,n,r){y("Query.on",2,4,arguments.length),Td("Query.on",t,!1),B("Query.on",2,e,!1);var i=Th("Query.on",n,r);if("value"===t)Fh(this.u,this,new Vg(e,i.cancel||null,i.Ma||null));else{var o={};o[t]=e,Fh(this.u,this,new Wg(o,i.cancel,i.Ma))}return e},g.Ic=function(t,e,n){y("Query.off",0,3,arguments.length),Td("Query.off",t,!0),B("Query.off",2,e,!0),ob("Query.off",3,n);var r=null,i=null;"value"===t?r=new Vg(e||null,null,n||null):t&&(e&&(i={},i[t]=e),r=new Wg(i,null,n||null)),i=this.u,r=".info"===K(this.path)?i.pd.kb(this,r):i.K.kb(this,r),af(i.ca,this.path,r)},g.$f=function(t,e){function n(s){o&&(o=!1,i.Ic(t,n),e&&e.call(r.Ma,s),a.resolve(s))}y("Query.once",1,4,arguments.length),Td("Query.once",t,!1),B("Query.once",2,e,!0);var r=Th("Query.once",arguments[2],arguments[3]),i=this,o=!0,a=new ib;return kb(a.ra),this.gc(t,n,function(e){i.Ic(t,n),r.cancel&&r.cancel.call(r.Ma,e),a.reject(e)}),a.ra},g.ne=function(t){if(y("Query.limitToFirst",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.m.xa)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.u,this.path,this.m.ne(t),this.Nc)},g.oe=function(t){if(y("Query.limitToLast",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.m.xa)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new X(this.u,this.path,this.m.oe(t),this.Nc)},g.ag=function(t){if(y("Query.orderByChild",1,1,arguments.length),"$key"===t)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Vd("Query.orderByChild",t),Sh(this,"Query.orderByChild");var e=new E(t);if(e.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");return e=new pc(e),e=of(this.m,e),Qh(e),new X(this.u,this.path,e,!0)},g.bg=function(){y("Query.orderByKey",0,0,arguments.length),Sh(this,"Query.orderByKey");var t=of(this.m,tc);return Qh(t),new X(this.u,this.path,t,!0)},g.cg=function(){y("Query.orderByPriority",0,0,arguments.length),Sh(this,"Query.orderByPriority");var t=of(this.m,H);return Qh(t),new X(this.u,this.path,t,!0)},g.dg=function(){y("Query.orderByValue",0,0,arguments.length),Sh(this,"Query.orderByValue");var t=of(this.m,wc);return Qh(t),new X(this.u,this.path,t,!0)},g.Nd=function(t,e){y("Query.startAt",0,2,arguments.length),Od("Query.startAt",t,this.path,!0),Ud("Query.startAt",e);var r=this.m.Nd(t,e);
if(Rh(r),Qh(r),this.m.ka)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return n(t)||(e=t=null),new X(this.u,this.path,r,this.Nc)},g.gd=function(t,e){y("Query.endAt",0,2,arguments.length),Od("Query.endAt",t,this.path,!0),Ud("Query.endAt",e);var n=this.m.gd(t,e);if(Rh(n),Qh(n),this.m.na)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new X(this.u,this.path,n,this.Nc)},g.If=function(t,e){if(y("Query.equalTo",1,2,arguments.length),Od("Query.equalTo",t,this.path,!1),Ud("Query.equalTo",e),this.m.ka)throw Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.m.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Nd(t,e).gd(t,e)},g.toString=function(){y("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.Y;ne;e++)u[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e);for(var e=u,r=[],i=0;i>2,o=(3&o)<<4|c>>4,c=(15&c)<<2|h>>6,h=63&h;l||(h=64,a||(c=64)),r.push(e[f],e[o],e[c],e[h])}return r.join("").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},l={},h=(l["only-available-in-window"]="This method is available in a Window context.",l["only-available-in-sw"]="This method is available in a service worker context.",l["should-be-overriden"]="This method should be overriden by extended classes.",l["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",l["permission-default"]="The required permissions were not granted and dismissed instead.",l["permission-blocked"]="The required permissions were not granted and blocked instead.",l["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",l["notifications-blocked"]="Notifications have been blocked.",l["failed-serviceworker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",l["sw-registration-expected"]="A service worker registration was the expected input.",l["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",l["invalid-saved-token"]="Unable to access details of the saved token.",l["sw-reg-redundant"]="The service worker being used for push was made redundant.",l["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",l["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",l["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",l["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",l["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",l["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",l["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",l["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",l["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",l["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}",l["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.",l["failed-to-delete-token"]="Unable to delete the currently saved token.",l["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",l["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",l["bad-scope"]="The service worker scope must be a string with at least one character.",l["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",l["bad-subscription"]="The subscription must be a valid PushSubscription.",l["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",l["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",l["failed-delete-vapid-key"]="The VAPID key could not be deleted.",l),f={userVisibleOnly:!0,applicationServerKey:new Uint8Array([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])},d=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",h),p=function(){this.a=null},g=function(t){return t.a?t.a:(t.a=new Promise(function(t,n){var r=e.indexedDB.open("fcm_token_details_db",1);r.onerror=function(t){n(t.target.error)},r.onsuccess=function(e){t(e.target.result)},r.onupgradeneeded=function(t){t=t.target.result.createObjectStore("fcm_token_object_Store",{keyPath:"swScope"}),t.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),t.createIndex("fcmToken","fcmToken",{unique:!0})}}),t.a)},m=function(t){t.a?t.a.then(function(e){e.close(),t.a=null}):Promise.resolve()},v=function(t,e){return g(t).then(function(t){return new Promise(function(n,r){var i=t.transaction(["fcm_token_object_Store"]).objectStore("fcm_token_object_Store").index("fcmToken").get(e);i.onerror=function(t){r(t.target.error)},i.onsuccess=function(t){n(t.target.result)}})})},y=function(t,e){return g(t).then(function(t){return new Promise(function(n,r){var i=[],o=t.transaction(["fcm_token_object_Store"]).objectStore("fcm_token_object_Store").openCursor();o.onerror=function(t){r(t.target.error)},o.onsuccess=function(t){(t=t.target.result)?(t.value.fcmSenderId===e&&i.push(t.value),t["continue"]()):n(i)}})})},b=function(t,e,n){var r=c(e.getKey("p256dh")),i=c(e.getKey("auth"));return t="authorized_entity="+t+"&"+("endpoint="+e.endpoint+"&")+("encryption_key="+r+"&")+("encryption_auth="+i),n&&(t+="&pushSet="+n),n=new Headers,n.append("Content-Type","application/x-www-form-urlencoded"),fetch("https://fcm.googleapis.com/fcm/connect/subscribe",{method:"POST",headers:n,body:t}).then(function(t){return t.json()}).then(function(t){if(t.error)throw d.create("token-subscribe-failed",{message:t.error.message});if(!t.token)throw d.create("token-subscribe-no-token");if(!t.pushSet)throw d.create("token-subscribe-no-push-set");return{token:t.token,pushSet:t.pushSet}})},w=function(t,e,n,r,i,o){var a={swScope:n.scope,endpoint:r.endpoint,auth:c(r.getKey("auth")),p256dh:c(r.getKey("p256dh")),fcmToken:i,fcmPushSet:o,fcmSenderId:e};return g(t).then(function(t){return new Promise(function(e,n){var r=t.transaction(["fcm_token_object_Store"],"readwrite").objectStore("fcm_token_object_Store").put(a);r.onerror=function(t){n(t.target.error)},r.onsuccess=function(){e()}})})};p.prototype.i=function(t,e){return e instanceof ServiceWorkerRegistration?"string"!=typeof t||0===t.length?Promise.reject(d.create("bad-sender-id")):y(this,t).then(function(n){if(0!==n.length){var r=n.findIndex(function(n){return e.scope===n.swScope&&t===n.fcmSenderId});if(-1!==r)return n[r]}}).then(function(t){return t?e.pushManager.getSubscription()["catch"](function(){throw d.create("get-subscription-failed")}).then(function(e){var n;return(n=e)&&(n=e.endpoint===t.endpoint&&c(e.getKey("auth"))===t.auth&&c(e.getKey("p256dh"))===t.p256dh),n?t.fcmToken:void 0}):void 0}):Promise.reject(d.create("sw-registration-expected"))},p.prototype.getSavedToken=p.prototype.i,p.prototype.h=function(t,e){var n=this;return"string"!=typeof t||0===t.length?Promise.reject(d.create("bad-sender-id")):e instanceof ServiceWorkerRegistration?e.pushManager.getSubscription().then(function(t){return t?t:e.pushManager.subscribe(f)}).then(function(r){return b(t,r).then(function(i){return w(n,t,e,r,i.token,i.pushSet).then(function(){return i.token})})}):Promise.reject(d.create("sw-registration-expected"))},p.prototype.createToken=p.prototype.h,p.prototype.deleteToken=function(t){var e=this;return"string"!=typeof t||0===t.length?Promise.reject(d.create("invalid-delete-token")):v(this,t).then(function(t){if(!t)throw d.create("delete-token-not-found");return g(e).then(function(e){return new Promise(function(n,r){var i=e.transaction(["fcm_token_object_Store"],"readwrite").objectStore("fcm_token_object_Store")["delete"](t.swScope);i.onerror=function(t){r(t.target.error)},i.onsuccess=function(e){0===e.target.result?r(d.create("failed-to-delete-token")):n(t)}})})})};var $=function(t){var e=this;if(this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",h),!t.options.messagingSenderId||"string"!=typeof t.options.messagingSenderId)throw this.a.create("bad-sender-id");this.l=t.options.messagingSenderId,this.c=new p,this.app=t,this.INTERNAL={},this.INTERNAL["delete"]=function(){return e["delete"]}};$.prototype.getToken=function(){var t=this,e=Notification.permission;return"granted"!==e?"denied"===e?Promise.reject(this.a.create("notifications-blocked")):Promise.resolve(null):this.f().then(function(e){return t.c.i(t.l,e).then(function(n){return n?n:t.c.h(t.l,e)})})},$.prototype.getToken=$.prototype.getToken,$.prototype.deleteToken=function(t){var e=this;return this.c.deleteToken(t).then(function(){return e.f()}).then(function(t){return t?t.pushManager.getSubscription():null}).then(function(t){return t?t.unsubscribe():void 0})},$.prototype.deleteToken=$.prototype.deleteToken,$.prototype.f=function(){throw this.a.create("should-be-overriden")},$.prototype.requestPermission=function(){throw this.a.create("only-available-in-window")},$.prototype.useServiceWorker=function(){throw this.a.create("only-available-in-window")},$.prototype.useServiceWorker=$.prototype.useServiceWorker,$.prototype.onMessage=function(){throw this.a.create("only-available-in-window")},$.prototype.onMessage=$.prototype.onMessage,$.prototype.onTokenRefresh=function(){throw this.a.create("only-available-in-window")},$.prototype.onTokenRefresh=$.prototype.onTokenRefresh,$.prototype.setBackgroundMessageHandler=function(){throw this.a.create("only-available-in-sw")},$.prototype.setBackgroundMessageHandler=$.prototype.setBackgroundMessageHandler,$.prototype["delete"]=function(){m(this.c)};var x=function(t,e){var n={};return n["firebase-messaging-msg-type"]=t,n["firebase-messaging-msg-data"]=e,n},k=self,S=function(t){$.call(this,t);var e=this;this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",h),k.addEventListener("push",function(t){return C(e,t)},!1),k.addEventListener("pushsubscriptionchange",function(t){return E(e,t)},!1),k.addEventListener("notificationclick",function(t){return T(e,t)},!1),this.b=null};t(S,$);var C=function(t,e){var n;try{n=e.data.json()}catch(r){return}var i=_().then(function(e){if(e){if(n.notification||t.b)return O(t,n)}else{if((e=n)&&"object"==typeof e.notification){var r=Object.assign({},e.notification),i={};r.data=(i.FCM_MSG=e,i),e=r}else e=void 0;if(e)return k.registration.showNotification(e.title||"",e);if(t.b)return t.b(n)}});e.waitUntil(i)},E=function(t,e){var n=t.getToken().then(function(e){if(!e)throw t.a.create("no-fcm-token-for-resubscribe");var n=t.c;return v(n,e).then(function(e){if(!e)throw t.a.create("invalid-saved-token");return k.registration.pushManager.subscribe(f).then(function(t){return b(e.A,t,e.w)})["catch"](function(r){return n.deleteToken(e.B).then(function(){throw t.a.create("unable-to-resubscribe",{message:r})})})})});e.waitUntil(n)},T=function(t,e){if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var n=e.notification.data.FCM_MSG,r=n.notification.click_action;if(r){var i=A(r).then(function(t){return t?t:k.clients.openWindow(r)}).then(function(e){return e?(delete n.notification,D(t,e,x("notification-clicked",n))):void 0});e.waitUntil(i)}}};S.prototype.setBackgroundMessageHandler=function(t){if(t&&"function"!=typeof t)throw this.a.create("bg-handler-function-expected");this.b=t},S.prototype.setBackgroundMessageHandler=S.prototype.setBackgroundMessageHandler;var A=function(t){var e=new URL(t).href;return k.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(t){for(var n=null,r=0;rs&&(s*=2);var n;1===l?(l=2,n=0):n=1e3*(s+Math.random()),i(n)}}function a(t){f||(f=!0,h||(null!==u?(t||(l=2),clearTimeout(u),i(0)):t||(l=1)))}var s=1,u=null,c=!1,l=0,h=!1,f=!1;return i(0),setTimeout(function(){c=!0,a(!0)},n),a},x=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},k=function(t){var e={};return x(t,function(t,n){e[t]=n}),e},S=function(t,e,n,r){this.l=t,this.b={},this.method=e,this.headers={},this.body=null,this.m=n,this.c=this.a=null,this.f=[200],this.i=[],this.timeout=r,this.g=!0},C=function(t){var e=encodeURIComponent,n="?";return x(t,function(t,r){t=e(t)+"="+e(r),n=n+t+"&"}),n=n.slice(0,-1)},E=function(t,e,n,r,i,o,a,s,u,c,l){this.F=t,this.D=e,this.A=n,this.u=r,this.B=i.slice(),this.s=o.slice(),this.m=this.o=this.c=this.b=null,this.g=this.i=!1,this.v=a,this.l=s,this.f=c,this.G=l,this.C=u;var h=this;this.w=b(function(t,e){h.o=t,h.m=e,A(h)})},T=function(t,e,n){this.b=t,this.c=e,this.a=!!n},A=function(t){function e(t,e){function n(t){r.f(t.loaded,t.lengthComputable?t.total:-1)}e?t(!1,new T(!1,null,!0)):(e=new ee,e.h.withCredentials=r.G,r.b=e,null!==r.f&&u(e.h.upload)&&e.h.upload.addEventListener("progress",n),ne(e,r.F,r.D,r.u,r.A).then(function(e){null!==r.f&&u(e.h.upload)&&e.h.upload.removeEventListener("progress",n),r.b=null;var i=0===re(e),o=ie(e);if(!(i=!i))var i=w([408,429],o),a=w(r.s,o),i=o>=500&&600>o||i||a;i?(e=2===re(e),t(!1,new T(!1,null,e))):t(!0,new T(w(r.B,o),e))}))}function n(t,e){var n=r.o;t=r.m;var i=e.c;if(e.b)try{var o=r.v(i,oe(i));u(o)?n(o):n()}catch(a){t(a)}else null!==i?(e=h(),o=oe(i),e.serverResponse=o,t(r.l?r.l(i,e):e)):(e=e.a?r.g?g():f():new l("retry-limit-exceeded","Max retry time for operation exceeded, please try again."),t(e))}var r=t;t.i?n(0,new T(!1,null,!0)):t.c=$(e,n,t.C)};E.prototype.a=function(){return this.w},E.prototype.cancel=function(t){this.i=!0,this.g=t||!1,null!==this.c&&this.c(!1),null!==this.b&&this.b.abort()};var D=function(t,e,n){var r=C(t.b),r=t.l+r,i=t.headers?k(t.headers):{};return null!==e&&0e.length?e:z(e)},t.push(e),e=new G("size"),e.a=function(t,e){return L(e)?+e:e},t.push(e),t.push(new G("timeCreated")),t.push(new G("updated")),t.push(new G("md5Hash",null,!0)),t.push(new G("cacheControl",null,!0)),t.push(new G("contentDisposition",null,!0)),t.push(new G("contentEncoding",null,!0)),t.push(new G("contentLanguage",null,!0)),t.push(new G("contentType",null,!0)),t.push(new G("metadata","customMetadata",!0)),t.push(new G("downloadTokens","downloadURLs",!1,function(t,e){if(!(F(e)&&0i;i++){var o=e[i];o.writable&&(n[o.c]=t[o.b])}return JSON.stringify(n)},Z=function(t){if(!t||"object"!=typeof t)throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if("object"!=typeof n)throw"Expected object for 'customMetadata' mapping."}else if(null!=n&&"object"==typeof n)throw"Mapping for '"+e+"' cannot be an object."}},tt=function(t,e,n){for(var r=e.length,i=e.length,o=0;o=0))throw"Expected a number 0 or greater."})},at=function(t,e){return new et(function(e){if(!(null===e||L(e)&&e instanceof Object))throw"Expected an Object.";L(t)&&t(e)},e)},st=function(){return new et(function(t){if(null!==t&&"function"!=c(t))throw"Expected a Function."},!0)},ut=function(t){return function(){var e=[];Array.prototype.push.apply(e,arguments),firebase.Promise.resolve(!0).then(function(){t.apply(null,e)})}},ct=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},lt=function(t,e){return e>t?-1:t>e?1:0};t:{var ht=s.navigator;if(ht){var ft=ht.userAgent;if(ft){H=ft;break t}}H=""}var dt,pt=function(t,e){var n=Ct;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)},gt=-1!=H.indexOf("Opera"),mt=-1!=H.indexOf("Trident")||-1!=H.indexOf("MSIE"),vt=-1!=H.indexOf("Edge"),yt=!(-1==H.indexOf("Gecko")||-1!=H.toLowerCase().indexOf("webkit")&&-1==H.indexOf("Edge")||-1!=H.indexOf("Trident")||-1!=H.indexOf("MSIE")||-1!=H.indexOf("Edge")),bt=-1!=H.toLowerCase().indexOf("webkit")&&-1==H.indexOf("Edge");t:{var wt="",$t=function(){var t=H;return yt?/rv\:([^\);]+)(\)|;)/.exec(t):vt?/Edge\/([\d\.]+)/.exec(t):mt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):bt?/WebKit\/(\S+)/.exec(t):gt?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if($t&&(wt=$t?$t[1]:""),mt){var xt,kt=s.document;if(xt=kt?kt.documentMode:void 0,null!=xt&&xt>parseFloat(wt)){dt=String(xt);break t}}dt=wt}var St=dt,Ct={},Et=function(t){return pt(t,function(){for(var e=0,n=ct(String(St)).split("."),r=ct(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&i>o;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=lt(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||lt(0==a[2].length,0==s[2].length)||lt(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return e>=0})},Tt=function(t){var e=s.BlobBuilder||s.WebKitBlobBuilder;if(u(e)){for(var e=new e,n=0;ne&&(e+=t.size),0>e&&(e=0),0>n&&(n+=t.size),e>n&&(n=e),t.slice(e,n-e)):t.slice(e,n):null},Dt={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},_t=function(t){switch(t){case"raw":case"base64":case"base64url":case"data_url":break;default:throw"Expected one of the event types: [raw, base64, base64url, data_url]."}},Ot=function(t,e){this.data=t,this.a=e||null},Mt=function(t,e){switch(t){case"raw":return new Ot(Pt(e));case"base64":case"base64url":return new Ot(It(t,e));case"data_url":t=new Nt(e);var n;if(t.a)n=It("base64",t.c);else{try{n=decodeURIComponent(t.c)}catch(r){throw m("data_url","Malformed data URL.")}n=Pt(n)}return new Ot(n,new Nt(e).b)}throw h()},Pt=function(t){for(var e=[],n=0;n=r)e.push(r);else if(2047>=r)e.push(192|r>>6,128|63&r);else if(55296==(64512&r))if(n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189);else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)},It=function(t,e){switch(t){case"base64":var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw m(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case"base64url":if(n=-1!==e.indexOf("+"),r=-1!==e.indexOf("/"),n||r)throw m(t,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var i;try{i=atob(e)}catch(o){throw m(t,"Invalid character found")}for(t=new Uint8Array(i.length),e=0;e][;base64],");if(e=e[1]||null,this.a=!1,this.b=null,null!=e){var n=e.length-7;this.b=(this.a=n>=0&&e.indexOf(";base64",n)==n)?e.substring(0,e.length-7):e}this.c=t.substring(t.indexOf(",")+1)},jt=function(t,e){U()&&t instanceof Blob?(this.j=t,e=t.size,t=t.type):(t instanceof ArrayBuffer?(e?this.j=new Uint8Array(t):(this.j=new Uint8Array(t.byteLength),this.j.set(new Uint8Array(t))),e=this.j.length):(e?this.j=t:(this.j=new Uint8Array(t.length),this.j.set(t)),e=t.length),t=""),this.a=e,this.b=t};jt.prototype.type=function(){return this.b},jt.prototype.slice=function(t,e){return U()&&this.j instanceof Blob?(t=At(this.j,t,e),null===t?null:new jt(t)):(t=new Uint8Array(this.j.buffer,t,e-t),new jt(t,!0))};var Rt=function(t){var e=[];if(Array.prototype.push.apply(e,arguments),U())return e=e.map(function(t){return t instanceof jt?t.j:t}),new jt(Tt.apply(null,e));var e=e.map(function(t){return F(t)?Mt("raw",t).data:t.j}),n=0;e.forEach(function(t){n+=t.byteLength});var r=new Uint8Array(n),i=0;return e.forEach(function(t){for(var e=0;ea;a++){var s=e[a];n[s.b]=s.a(n,i[s.c])}J(n,t),i=n}return Ft(null!==i),i}},Bt=function(t){return function(e,n){return e=401===ie(e)?new l("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===ie(e)?new l("quota-exceeded","Quota for bucket '"+t.bucket+"' exceeded, please view quota on https://firebase.google.com/pricing/."):403===ie(e)?new l("unauthorized","User does not have permission to access '"+t.path+"'."):n,e.serverResponse=n.serverResponse,e}},qt=function(t){var e=Bt(t);return function(n,r){var i=e(n,r);return 404===ie(n)&&(i=new l("object-not-found","Object '"+t.path+"' does not exist.")),i.serverResponse=r.serverResponse,i}},Ht=function(t,e,n){var r=M(e);return t=new S(y+"/v0"+r,"GET",Ut(t,n),t.c),t.a=qt(e),t},Vt=function(t,e){var n=M(e);return t=new S(y+"/v0"+n,"DELETE",function(){},t.c),t.f=[200,204],t.a=qt(e),t},Wt=function(t,e,n){return n=n?k(n):{},n.fullPath=t.path,n.size=e.a,n.contentType||(t=e&&e.type()||"application/octet-stream",n.contentType=t),n},zt=function(t,e,n,r,i){var o,a="/b/"+encodeURIComponent(e.bucket)+"/o",s={"X-Goog-Upload-Protocol":"multipart"};o="";for(var u=0;2>u;u++)o+=Math.random().toString().slice(2);if(s["Content-Type"]="multipart/related; boundary="+o,i=Wt(e,r,i),u=Q(i,n),r=Rt("--"+o+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+u+"\r\n--"+o+"\r\nContent-Type: "+i.contentType+"\r\n\r\n",r,"\r\n--"+o+"--"),null===r)throw d();return t=new S(y+"/v0"+a,"POST",Ut(t,n),t.b),t.b={name:i.fullPath},t.headers=s,t.body=r.j,t.a=Bt(e),t},Yt=function(t,e,n,r){this.current=t,this.total=e,this.I=!!n,this.metadata=r||null},Gt=function(t,e){var n;try{n=t.h.getResponseHeader("X-Goog-Upload-Status")}catch(r){Ft(!1)}return Ft(w(e||["active"],n)),n},Kt=function(t,e,n,r,i){var o="/b/"+encodeURIComponent(e.bucket)+"/o",a=Wt(e,r,i);return i={name:a.fullPath},o=y+"/v0"+o,r={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.a,"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},n=Q(a,n),t=new S(o,"POST",function(t){Gt(t);var e;try{e=t.h.getResponseHeader("X-Goog-Upload-URL")}catch(n){Ft(!1)}return Ft(F(e)),e},t.b),t.b=i,t.headers=r,t.body=n,t.a=Bt(e),t},Xt=function(t,e,n,r){return t=new S(n,"POST",function(t){var e,n=Gt(t,["active","final"]);try{e=t.h.getResponseHeader("X-Goog-Upload-Size-Received")}catch(i){Ft(!1)}return t=e,isFinite(t)&&(t=String(t)),t="string"==typeof t?/^\s*-?0x/i.test(t)?parseInt(t,16):parseInt(t,10):0/0,Ft(!isNaN(t)),new Yt(t,r.a,"final"===n)},t.b),t.headers={"X-Goog-Upload-Command":"query"},t.a=Bt(e),t.g=!1,t},Jt=function(t,e,n,r,i,o,a,s){var u=new Yt(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.a),r.a!==u.total)throw new l("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var c=a=u.total-u.current;i>0&&(c=Math.min(c,i));var h=u.current;if(i={"X-Goog-Upload-Command":c===a?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},a=r.slice(h,h+c),null===a)throw d();return n=new S(n,"POST",function(t,n){var i,a=Gt(t,["active","final"]),s=u.current+c,l=r.a;return i="final"===a?Ut(e,o)(t,n):null,new Yt(s,l,"final"===a,i)},e.b),n.headers=i,n.body=a.j,n.c=s||null,n.a=Bt(t),n.g=!1,n},Qt={STATE_CHANGED:"state_changed"},Zt={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},te=function(t){switch(t){case"running":case"pausing":case"canceling":return"running";case"paused":return"paused";case"success":return"success";case"canceled":return"canceled";case"error":return"error";default:return"error"}},ee=function(){var t=this;this.h=new XMLHttpRequest,this.b=0,this.c=b(function(e){t.h.addEventListener("abort",function(){t.b=2,e(t)}),t.h.addEventListener("error",function(){t.b=1,e(t)}),t.h.addEventListener("load",function(){e(t)})}),this.a=!1},ne=function(t,e,n,r,i){if(t.a)throw v("cannot .send() more than once");return t.a=!0,t.h.open(n,e,!0),L(i)&&x(i,function(e,n){t.h.setRequestHeader(e,n.toString())}),L(r)?t.h.send(r):t.h.send(),t.c},re=function(t){if(!t.a)throw v("cannot .getErrorCode() before sending");return t.b},ie=function(t){if(!t.a)throw v("cannot .getStatus() before sending");try{return t.h.status}catch(e){return-1}},oe=function(t){if(!t.a)throw v("cannot .getResponseText() before sending");return t.h.responseText};ee.prototype.abort=function(){this.h.abort()};var ae=function(){},se=function(t,e,n,r,i,o){this.b=t,this.i=e,this.f=n,this.a=r,this.g=i,this.c=o};t=se.prototype,t.X=function(){return this.b},t.sa=function(){return this.i},t.pa=function(){return this.f},t.ka=function(){return this.a},t.Y=function(){if(L(this.a)){var t=this.a.downloadURLs;return L(t)&&L(t[0])?t[0]:null}return null},t.ra=function(){return this.g},t.na=function(){return this.c};var ue=function(t,e,n,r,i,o){var a=this;this.O=t,this.c=e,this.o=n,this.f=i,this.i=void 0===o?null:o,this.u=r,this.l=0,this.G=this.w=!1,this.B=[],this.U=262144262144*t.m&&(t.m*=2),t.a=null,ve(t,e.current),e.I?(t.i=e.metadata,ye(t,"success")):be(t)},t.s)})},ge=function(t){he(t,function(e){var n=Ht(t.c,t.o,t.u);t.a=V(t.c,n,e),t.a.a().then(function(e){t.a=null,t.i=e,ye(t,"success")},t.N)})},me=function(t){he(t,function(e){var n=zt(t.c,t.o,t.u,t.f,t.i);t.a=V(t.c,n,e),t.a.a().then(function(e){t.a=null,t.i=e,ve(t,t.f.a),ye(t,"success")},t.s)})},ve=function(t,e){var n=t.l;t.l=e,t.l!==n&&we(t)},ye=function(t,e){if(t.b!==e)switch(e){case"canceling":t.b=e,null!==t.a&&t.a.cancel();break;case"pausing":t.b=e,null!==t.a&&t.a.cancel();break;case"running":var n="paused"===t.b;t.b=e,n&&(we(t),le(t));break;case"paused":t.b=e,we(t);break;case"canceled":t.g=f(),t.b=e,we(t);break;case"error":t.b=e,we(t);break;case"success":t.b=e,we(t)}},be=function(t){switch(t.b){case"pausing":ye(t,"paused");break;case"canceling":ye(t,"canceled");break;case"running":le(t)}};ue.prototype.C=function(){return new se(this.l,this.f.a,te(this.b),this.i,this,this.O)},ue.prototype.P=function(t,e,n,r){function i(t){try{return void a(t)}catch(e){}try{if(s(t),!(u(t.next)||u(t.error)||u(t.complete)))throw""}catch(e){throw"Expected a function or an Object with one of `next`, `error`, `complete` properties."}}function o(t){return function(e,n,r){null!==t&&tt("on",t,arguments);var i=new Lt(e,n,r);return c.B.push(i),xe(c,i),function(){var t=c.B,e=t.indexOf(i);-1!==e&&t.splice(e,1)}}}var a=st().a,s=at(null,!0).a;tt("on",[rt(function(){if("state_changed"!==t)throw"Expected one of the event types: [state_changed]."}),at(i,!0),st(),st()],arguments);var c=this,l=[at(function(t){if(null===t)throw"Expected a function or an Object with one of `next`, `error`, `complete` properties.";i(t)}),st(),st()];return u(e)||u(n)||u(r)?o(null)(e,n,r):o(l)},ue.prototype.then=function(t,e){return this.F.then(void 0===t?null:t,void 0===e?null:e)},ue.prototype["catch"]=function(t){return this.then(null,t)};var we=function(t){$e(t),Array.prototype.slice.call(t.B).forEach(function(e){xe(t,e)})},$e=function(t){if(null!==t.v){var e=!0;switch(te(t.b)){case"success":ut(t.v.bind(null,t.C()))();break;case"canceled":case"error":ut(t.D.bind(null,t.g))();break;default:e=!1}e&&(t.v=null,t.D=null)}},xe=function(t,e){switch(te(t.b)){case"running":case"paused":null!==e.b&&ut(e.b.bind(e,t.C()))();break;case"success":null!==e.a&&ut(e.a.bind(e))();break;case"canceled":case"error":null!==e.error&&ut(e.error.bind(e,t.g))();break;default:null!==e.error&&ut(e.error.bind(e,t.g))()}};ue.prototype.T=function(){tt("resume",[],arguments);var t="paused"===this.b||"pausing"===this.b;return t&&ye(this,"running"),t},ue.prototype.R=function(){tt("pause",[],arguments);var t="running"===this.b;return t&&ye(this,"pausing"),t},ue.prototype.cancel=function(){tt("cancel",[],arguments);var t="running"===this.b||"pausing"===this.b;return t&&ye(this,"canceling"),t};var ke=function(t,e){this.a=t,this.location=e instanceof O?e:I(e)};ke.prototype.toString=function(){return tt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path};var Se=function(t,e){return new ke(t,e)};t=ke.prototype,t.J=function(t){tt("child",[rt()],arguments);var e=W(this.location.path,t);return Se(this.a,new O(this.location.bucket,e))},t.ma=function(){var t;if(t=this.location.path,0==t.length)t=null;else{var e=t.lastIndexOf("/");t=-1===e?"":t.slice(0,e)}return null===t?null:Se(this.a,new O(this.location.bucket,t))},t.oa=function(){return Se(this.a,new O(this.location.bucket,""))},t.W=function(){return this.location.bucket},t.ha=function(){return this.location.path},t.la=function(){return z(this.location.path)},t.qa=function(){return this.a.m},t.aa=function(t,e){return tt("put",[it(),new et(Z,!0)],arguments),Ce(this,"put"),new ue(this,this.a,this.location,X(),new jt(t),e)},t.ba=function(t,e,n){tt("putString",[rt(),rt(_t,!0),new et(Z,!0)],arguments),Ce(this,"putString");var r=Mt(L(e)?e:"raw",t),i=n?k(n):{};return!L(i.contentType)&&L(r.a)&&(i.contentType=r.a),new ue(this,this.a,this.location,X(),new jt(r.data,!0),i)},t.Z=function(){tt("delete",[],arguments),Ce(this,"delete");var t=this;return q(this.a).then(function(e){var n=Vt(t.a,t.location);return V(t.a,n,e).a()})},t.K=function(){tt("getMetadata",[],arguments),Ce(this,"getMetadata");var t=this;return q(this.a).then(function(e){var n=Ht(t.a,t.location,X());return V(t.a,n,e).a()})},t.ca=function(t){tt("updateMetadata",[new et(Z,void 0)],arguments),Ce(this,"updateMetadata");var e=this;return q(this.a).then(function(n){var r=e.a,i=e.location,o=t,a=X(),s=M(i),s=y+"/v0"+s,o=Q(o,a),r=new S(s,"PATCH",Ut(r,a),r.c);return r.headers={"Content-Type":"application/json; charset=utf-8"},r.body=o,r.a=qt(i),V(e.a,r,n).a()})},t.$=function(){return tt("getDownloadURL",[],arguments),Ce(this,"getDownloadURL"),this.K().then(function(t){if(t=t.downloadURLs[0],L(t))return t;throw new l("no-download-url","The given file does not have any download URLs.")})};var Ce=function(t,e){if(""===t.location.path)throw new l("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")},Ee=function(t,e,n){this.a=new B(t,function(t,e){return new ke(t,e)},D,this,e),this.c=t,u(n)?this.b=P(n):null!=this.a.bucket()&&(this.b=new O(this.a.bucket(),"")),this.f=new Te(this)};t=Ee.prototype,t.da=function(t){if(tt("ref",[rt(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments),null===this.b)throw Error("No Storage Bucket defined in Firebase Options.");var e=new ke(this.a,this.b);return u(t)?e.J(t):e},t.ea=function(t){return tt("refFromURL",[rt(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{I(t)}catch(e){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new ke(this.a,t)},t.ja=function(){return this.a.b},t.ga=function(t){tt("setMaxUploadRetryTime",[ot()],arguments),this.a.b=t},t.ia=function(){return this.a.c},t.fa=function(t){tt("setMaxOperationRetryTime",[ot()],arguments),this.a.c=t},t.V=function(){return this.c},t.S=function(){return this.f};var Te=function(t){this.a=t};Te.prototype.b=function(){var t=this.a.a;t.f=!0,t.a=null,R(t.i)};var Ae=function(t,e,n){Object.defineProperty(t,e,{get:n})};ke.prototype.toString=ke.prototype.toString,ke.prototype.child=ke.prototype.J,ke.prototype.put=ke.prototype.aa,ke.prototype.putString=ke.prototype.ba,ke.prototype["delete"]=ke.prototype.Z,ke.prototype.getMetadata=ke.prototype.K,ke.prototype.updateMetadata=ke.prototype.ca,ke.prototype.getDownloadURL=ke.prototype.$,Ae(ke.prototype,"parent",ke.prototype.ma),Ae(ke.prototype,"root",ke.prototype.oa),Ae(ke.prototype,"bucket",ke.prototype.W),Ae(ke.prototype,"fullPath",ke.prototype.ha),Ae(ke.prototype,"name",ke.prototype.la),Ae(ke.prototype,"storage",ke.prototype.qa),Ee.prototype.ref=Ee.prototype.da,Ee.prototype.refFromURL=Ee.prototype.ea,Ae(Ee.prototype,"maxOperationRetryTime",Ee.prototype.ia),Ee.prototype.setMaxOperationRetryTime=Ee.prototype.fa,Ae(Ee.prototype,"maxUploadRetryTime",Ee.prototype.ja),Ee.prototype.setMaxUploadRetryTime=Ee.prototype.ga,Ae(Ee.prototype,"app",Ee.prototype.V),Ae(Ee.prototype,"INTERNAL",Ee.prototype.S),Te.prototype["delete"]=Te.prototype.b,Ee.prototype.capi_=function(t){y=t},ue.prototype.on=ue.prototype.P,ue.prototype.resume=ue.prototype.T,ue.prototype.pause=ue.prototype.R,ue.prototype.cancel=ue.prototype.cancel,ue.prototype.then=ue.prototype.then,ue.prototype["catch"]=ue.prototype["catch"],Ae(ue.prototype,"snapshot",ue.prototype.C),Ae(se.prototype,"bytesTransferred",se.prototype.X),Ae(se.prototype,"totalBytes",se.prototype.sa),Ae(se.prototype,"state",se.prototype.pa),Ae(se.prototype,"metadata",se.prototype.ka),Ae(se.prototype,"downloadURL",se.prototype.Y),Ae(se.prototype,"task",se.prototype.ra),Ae(se.prototype,"ref",se.prototype.na),Qt.STATE_CHANGED="state_changed",Zt.RUNNING="running",Zt.PAUSED="paused",Zt.SUCCESS="success",Zt.CANCELED="canceled",Zt.ERROR="error",Dt.RAW="raw",Dt.BASE64="base64",Dt.BASE64URL="base64url",Dt.DATA_URL="data_url",function(){function t(t,e,n){return new Ee(t,new ae,n)}var e={TaskState:Zt,TaskEvent:Qt,StringFormat:Dt,Storage:Ee,Reference:ke};if("undefined"==typeof firebase)throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("storage",t,e,void 0,!0)}()}.call(this),/*!
* AngularFire is the officially supported AngularJS binding for Firebase. Firebase
* is a full backend so you don't need servers to build your Angular app. AngularFire
* provides you with the $firebase service which allows you to easily keep your $scope
* variables in sync with your Firebase backend.
*
* AngularFire 0.0.0
* https://github.com/firebase/angularfire/
* Date: 01/23/2017
* License: MIT
*/
function(t){"use strict";angular.module("firebase.utils",[]),angular.module("firebase.config",[]),angular.module("firebase.auth",["firebase.utils"]),angular.module("firebase.database",["firebase.utils"]),angular.module("firebase.storage",["firebase.utils"]),angular.module("firebase",["firebase.utils","firebase.config","firebase.auth","firebase.database","firebase.storage"]).value("Firebase",t.firebase).value("firebase",t.firebase)}(window),function(){"use strict";var t;angular.module("firebase.auth").factory("$firebaseAuth",["$q","$firebaseUtils",function(e,n){return function(r){r=r||firebase.auth();var i=new t(e,n,r);return i.construct()}}]),t=function(t,e,n){if(this._q=t,this._utils=e,"string"==typeof n)throw new Error("The $firebaseAuth service accepts a Firebase auth instance (or nothing) instead of a URL.");if("undefined"!=typeof n.ref)throw new Error("The $firebaseAuth service accepts a Firebase auth instance (or nothing) instead of a Database reference.");this._auth=n,this._initialAuthResolver=this._initAuthResolver()},t.prototype={construct:function(){return this._object={$signInWithCustomToken:this.signInWithCustomToken.bind(this),$signInAnonymously:this.signInAnonymously.bind(this),$signInWithEmailAndPassword:this.signInWithEmailAndPassword.bind(this),$signInWithPopup:this.signInWithPopup.bind(this),$signInWithRedirect:this.signInWithRedirect.bind(this),$signInWithCredential:this.signInWithCredential.bind(this),$signOut:this.signOut.bind(this),$onAuthStateChanged:this.onAuthStateChanged.bind(this),$getAuth:this.getAuth.bind(this),$requireSignIn:this.requireSignIn.bind(this),$waitForSignIn:this.waitForSignIn.bind(this),$createUserWithEmailAndPassword:this.createUserWithEmailAndPassword.bind(this),$updatePassword:this.updatePassword.bind(this),$updateEmail:this.updateEmail.bind(this),$deleteUser:this.deleteUser.bind(this),$sendPasswordResetEmail:this.sendPasswordResetEmail.bind(this),_:this},this._object},signInWithCustomToken:function(t){return this._q.when(this._auth.signInWithCustomToken(t))},signInAnonymously:function(){return this._q.when(this._auth.signInAnonymously())},signInWithEmailAndPassword:function(t,e){return this._q.when(this._auth.signInWithEmailAndPassword(t,e))},signInWithPopup:function(t){return this._q.when(this._auth.signInWithPopup(this._getProvider(t)))},signInWithRedirect:function(t){return this._q.when(this._auth.signInWithRedirect(this._getProvider(t)))},signInWithCredential:function(t){return this._q.when(this._auth.signInWithCredential(t))},signOut:function(){return null!==this.getAuth()?this._q.when(this._auth.signOut()):this._q.when()},onAuthStateChanged:function(t,e){var n=this._utils.debounce(t,e,0),r=this._auth.onAuthStateChanged(n);return r},getAuth:function(){return this._auth.currentUser},_routerMethodOnAuthPromise:function(t,e){var n=this;return this._initialAuthResolver.then(function(){var r=n.getAuth(),i=null;return i=t&&null===r?n._q.reject("AUTH_REQUIRED"):e&&!r.emailVerified?n._q.reject("EMAIL_VERIFICATION_REQUIRED"):n._q.when(r)})},_getProvider:function(t){var e;if("string"==typeof t){var n=t.slice(0,1).toUpperCase()+t.slice(1);e=new firebase.auth[n+"AuthProvider"]}else e=t;return e},_initAuthResolver:function(){var t=this._auth;return this._q(function(e){function n(){r(),e()}var r;r=t.onAuthStateChanged(n)})},requireSignIn:function(t){return this._routerMethodOnAuthPromise(!0,t)},waitForSignIn:function(){return this._routerMethodOnAuthPromise(!1,!1)},createUserWithEmailAndPassword:function(t,e){return this._q.when(this._auth.createUserWithEmailAndPassword(t,e))},updatePassword:function(t){var e=this.getAuth();return e?this._q.when(e.updatePassword(t)):this._q.reject("Cannot update password since there is no logged in user.")},updateEmail:function(t){var e=this.getAuth();return e?this._q.when(e.updateEmail(t)):this._q.reject("Cannot update email since there is no logged in user.")},deleteUser:function(){var t=this.getAuth();return t?this._q.when(t["delete"]()):this._q.reject("Cannot delete user since there is no logged in user.")},sendPasswordResetEmail:function(t){return this._q.when(this._auth.sendPasswordResetEmail(t))}}}(),function(){"use strict";function t(t){return t()}t.$inject=["$firebaseAuth"],angular.module("firebase.auth").factory("$firebaseAuthService",t)}(),function(){"use strict";angular.module("firebase.database").factory("$firebaseArray",["$log","$firebaseUtils","$q",function(t,e,n){function r(t){if(!(this instanceof r))return new r(t);var n=this;return this._observers=[],this.$list=[],this._ref=t,this._sync=new i(this),e.assertValidRef(t,"Must pass a valid Firebase reference to $firebaseArray (not a string or URL)"),this._indexCache={},e.getPublicMethods(n,function(t,e){n.$list[e]=t.bind(n)}),this._sync.init(this.$list),this.$list.$resolved=!1,this.$loaded()["finally"](function(){n.$list.$resolved=!0}),this.$list}function i(r){function i(t){if(!v.isDestroyed){v.isDestroyed=!0;var e=r.$ref();e.off("child_added",c),e.off("child_moved",h),e.off("child_changed",l),e.off("child_removed",f),r=null,m(t||"destroyed")}}function o(e){var n=r.$ref();n.on("child_added",c,g),n.on("child_moved",h,g),n.on("child_changed",l,g),n.on("child_removed",f,g),n.once("value",function(n){angular.isArray(n.val())&&t.warn("Storing data using array indices in Firebase can result in unexpected behavior. See https://firebase.google.com/docs/database/web/structure-data for more information."),m(null,e)},m)}function a(t,e){p||(p=!0,t?u.reject(t):u.resolve(e))}function s(t,e){var r=n.when(t);r.then(function(t){t&&e(t)}),p||d.push(r)}var u=n.defer(),c=function(t,e){r&&s(r.$$added(t,e),function(t){r.$$process("child_added",t,e)})},l=function(t){if(r){var e=r.$getRecord(t.key);e&&s(r.$$updated(t),function(){r.$$process("child_changed",e)})}},h=function(t,e){if(r){var n=r.$getRecord(t.key);n&&s(r.$$moved(t,e),function(){r.$$process("child_moved",n,e)})}},f=function(t){if(r){var e=r.$getRecord(t.key);e&&s(r.$$removed(t),function(){r.$$process("child_removed",e)})}},d=[],p=!1,g=e.batch(function(t){a(t),r&&r.$$error(t)}),m=e.batch(a),v={destroy:i,isDestroyed:!1,init:o,ready:function(){return u.promise.then(function(t){return n.all(d).then(function(){return t})})}};return v}return r.prototype={$add:function(t){this._assertNotDestroyed("$add");var r,i=this,o=n.defer(),a=this.$ref().ref.push();try{r=e.toJSON(t)}catch(s){o.reject(s)}return"undefined"!=typeof r&&e.doSet(a,r).then(function(){i.$$notify("child_added",a.key),o.resolve(a)})["catch"](o.reject),o.promise},$save:function(t){this._assertNotDestroyed("$save");var r=this,i=r._resolveItem(t),o=r.$keyAt(i),a=n.defer();if(null!==o){var s,u=r.$ref().ref.child(o);try{s=e.toJSON(i)}catch(c){a.reject(c)}"undefined"!=typeof s&&e.doSet(u,s).then(function(){r.$$notify("child_changed",o),a.resolve(u)})["catch"](a.reject)}else a.reject("Invalid record; could not determine key for "+t);return a.promise},$remove:function(t){this._assertNotDestroyed("$remove");var r=this.$keyAt(t);if(null!==r){var i=this.$ref().ref.child(r);return e.doRemove(i).then(function(){return i})}return n.reject("Invalid record; could not determine key for "+t)},$keyAt:function(t){var e=this._resolveItem(t);return this.$$getKey(e)},$indexFor:function(t){var e=this,n=e._indexCache;if(!n.hasOwnProperty(t)||e.$keyAt(n[t])!==t){var r=e.$list.findIndex(function(n){return e.$$getKey(n)===t});-1!==r&&(n[t]=r)}return n.hasOwnProperty(t)?n[t]:-1},$loaded:function(t,e){var n=this._sync.ready();return arguments.length&&(n=n.then.call(n,t,e)),n},$ref:function(){return this._ref},$watch:function(t,e){var n=this._observers;return n.push([t,e]),function(){var r=n.findIndex(function(n){return n[0]===t&&n[1]===e});r>-1&&n.splice(r,1)}},$destroy:function(t){this._isDestroyed||(this._isDestroyed=!0,this._sync.destroy(t),this.$list.length=0)},$getRecord:function(t){var e=this.$indexFor(t);return e>-1?this.$list[e]:null},$$added:function(t){var n=this.$indexFor(t.key);if(-1===n){var r=t.val();return angular.isObject(r)||(r={$value:r}),r.$id=t.key,r.$priority=t.getPriority(),e.applyDefaults(r,this.$$defaults),r}return!1},$$removed:function(t){return this.$indexFor(t.key)>-1},$$updated:function(t){var n=!1,r=this.$getRecord(t.key);return angular.isObject(r)&&(n=e.updateRec(r,t),e.applyDefaults(r,this.$$defaults)),n},$$moved:function(t){var e=this.$getRecord(t.key);return angular.isObject(e)?(e.$priority=t.getPriority(),!0):!1},$$error:function(e){t.error(e),this.$destroy(e)},$$getKey:function(t){return angular.isObject(t)?t.$id:null},$$process:function(t,e,n){var r,i=this.$$getKey(e),o=!1;switch(t){case"child_added":r=this.$indexFor(i);break;case"child_moved":r=this.$indexFor(i),this._spliceOut(i);break;case"child_removed":o=null!==this._spliceOut(i);break;case"child_changed":o=!0;break;default:throw new Error("Invalid event type: "+t)}return angular.isDefined(r)&&(o=this._addAfter(e,n)!==r),o&&this.$$notify(t,i,n),o},$$notify:function(t,e,n){var r={event:t,key:e};angular.isDefined(n)&&(r.prevChild=n),angular.forEach(this._observers,function(t){t[0].call(t[1],r)})},_addAfter:function(t,e){var n;return null===e?n=0:(n=this.$indexFor(e)+1,0===n&&(n=this.$list.length)),this.$list.splice(n,0,t),this._indexCache[this.$$getKey(t)]=n,n},_spliceOut:function(t){var e=this.$indexFor(t);return e>-1?(delete this._indexCache[t],this.$list.splice(e,1)[0]):null},_resolveItem:function(t){var e=this.$list;if(angular.isNumber(t)&&t>=0&&e.length>=t)return e[t];if(angular.isObject(t)){var n=this.$$getKey(t),r=this.$getRecord(n);return r===t?r:null}return null},_assertNotDestroyed:function(t){if(this._isDestroyed)throw new Error("Cannot call "+t+" method on a destroyed $firebaseArray object")}},r.$extend=function(t,n){return 1===arguments.length&&angular.isObject(t)&&(n=t,t=function(e){return this instanceof t?(r.apply(this,arguments),this.$list):new t(e)}),e.inherit(t,r,n)},r}]),angular.module("firebase").factory("$FirebaseArray",["$log","$firebaseArray",function(t,e){return function(){return t.warn("$FirebaseArray has been renamed. Use $firebaseArray instead."),e.apply(null,arguments)}}])}(),function(){"use strict";angular.module("firebase.database").factory("$firebaseObject",["$parse","$firebaseUtils","$log","$q",function(t,e,n,r){function i(t){if(!(this instanceof i))return new i(t);var n=this;this.$$conf={sync:new a(this,t),ref:t,binding:new o(this),listeners:[]},Object.defineProperty(this,"$$conf",{value:this.$$conf}),this.$id=t.ref.key,this.$priority=null,e.applyDefaults(this,this.$$defaults),this.$$conf.sync.init(),this.$resolved=!1,this.$loaded()["finally"](function(){n.$resolved=!0})}function o(t){this.subs=[],this.scope=null,this.key=null,this.rec=t}function a(t,i){function o(e){d.isDestroyed||(d.isDestroyed=!0,i.off("value",l),t=null,f(e||"destroyed"))}function a(){i.on("value",l,h),i.once("value",function(t){angular.isArray(t.val())&&n.warn("Storing data using array indices in Firebase can result in unexpected behavior. See https://firebase.google.com/docs/database/web/structure-data for more information. Also note that you probably wanted $firebaseArray and not $firebaseObject."),f(null)},f)}function s(e){u||(u=!0,e?c.reject(e):c.resolve(t))}var u=!1,c=r.defer(),l=e.batch(function(e){if(t){var n=t.$$updated(e);n&&t.$$notify()}}),h=e.batch(function(e){s(e),t&&t.$$error(e)}),f=e.batch(s),d={isDestroyed:!1,destroy:o,init:a,ready:function(){return c.promise}};return d}return i.prototype={$save:function(){var t,n=this,i=n.$ref(),o=r.defer();try{t=e.toJSON(n)}catch(a){o.reject(a)}return"undefined"!=typeof t&&e.doSet(i,t).then(function(){n.$$notify(),o.resolve(n.$ref())})["catch"](o.reject),o.promise},$remove:function(){var t=this;return e.trimKeys(t,{}),t.$value=null,e.doRemove(t.$ref()).then(function(){return t.$$notify(),t.$ref()})},$loaded:function(t,e){var n=this.$$conf.sync.ready();return arguments.length&&(n=n.then.call(n,t,e)),n},$ref:function(){return this.$$conf.ref},$bindTo:function(t,e){var n=this;return n.$loaded().then(function(){return n.$$conf.binding.bindTo(t,e)})},$watch:function(t,e){var n=this.$$conf.listeners;return n.push([t,e]),function(){var r=n.findIndex(function(n){return n[0]===t&&n[1]===e});r>-1&&n.splice(r,1)}},$destroy:function(t){var n=this;n.$isDestroyed||(n.$isDestroyed=!0,n.$$conf.sync.destroy(t),n.$$conf.binding.destroy(),e.each(n,function(t,e){delete n[e]}))},$$updated:function(t){var n=e.updateRec(this,t);return e.applyDefaults(this,this.$$defaults),n},$$error:function(t){n.error(t),this.$destroy(t)},$$scopeUpdated:function(t){var n=r.defer();return this.$ref().set(e.toJSON(t),e.makeNodeResolver(n)),n.promise},$$notify:function(){var t=this,e=this.$$conf.listeners.slice();angular.forEach(e,function(e){e[0].call(e[1],{event:"value",key:t.$id})})},forEach:function(t,n){return e.each(this,t,n)}},i.$extend=function(t,n){return 1===arguments.length&&angular.isObject(t)&&(n=t,t=function(e){return this instanceof t?void i.apply(this,arguments):new t(e)}),e.inherit(t,i,n)},o.prototype={assertNotBound:function(t){if(this.scope){var e="Cannot bind to "+t+" because this instance is already bound to "+this.key+"; one binding per instance (call unbind method or create another FirebaseObject instance)";return n.error(e),r.reject(e)}},bindTo:function(n,r){function i(i){function o(t){return angular.equals(t,l)&&t.$priority===l.$priority&&t.$value===l.$value}function a(t){c.assign(n,e.scopeData(t))}function s(){var t=c(n);return[t,t.$priority,t.$value]}var u=!1,c=t(r),l=i.rec;i.scope=n,i.varName=r;var h=e.debounce(function(t){var r=e.scopeData(t);l.$$scopeUpdated(r)["finally"](function(){u=!1,r.hasOwnProperty("$value")||(delete l.$value,delete c(n).$value),a(l)})},50,500),f=function(t){t=t[0],o(t)||(u=!0,h(t))},d=function(){u||o(c(n))||a(l)};return a(l),i.subs.push(n.$on("$destroy",i.unbind.bind(i))),i.subs.push(n.$watch(s,f,!0)),i.subs.push(l.$watch(d)),i.unbind.bind(i)}return this.assertNotBound(r)||i(this)},unbind:function(){this.scope&&(angular.forEach(this.subs,function(t){t()}),this.subs=[],this.scope=null,this.key=null)},destroy:function(){this.unbind(),this.rec=null}},i}]),angular.module("firebase").factory("$FirebaseObject",["$log","$firebaseObject",function(t,e){return function(){return t.warn("$FirebaseObject has been renamed. Use $firebaseObject instead."),e.apply(null,arguments)}}])}(),function(){"use strict";function t(){this.urls=null,this.registerUrl=function(t){"string"==typeof t&&(this.urls={},this.urls["default"]=t),angular.isObject(t)&&(this.urls=t)},this.$$checkUrls=function(t){return t?t["default"]?void 0:new Error('No default Firebase URL registered. Use firebaseRefProvider.registerUrl({ default: "https://.firebaseio.com/"}).'):new Error("No Firebase URL registered. Use firebaseRefProvider.registerUrl() in the config phase. This is required if you are using $firebaseAuthService.")},this.$$createRefsFromUrlConfig=function(t){var e={},n=this.$$checkUrls(t);if(n)throw n;return angular.forEach(t,function(t,n){e[n]=firebase.database().refFromURL(t)}),e},this.$get=function(){return this.$$createRefsFromUrlConfig(this.urls)}}angular.module("firebase.database").provider("$firebaseRef",t)}(),function(){"use strict";angular.module("firebase").factory("$firebase",function(){return function(){throw new Error("$firebase has been removed. You may instantiate $firebaseArray and $firebaseObject directly now. For simple write operations, just use the Firebase ref directly. See the AngularFire 1.0.0 changelog for details: https://github.com/firebase/angularfire/releases/tag/v1.0.0")}})}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError("'this' is null or not defined");var n=this.length>>>0;for(e=+e||0,Math.abs(e)===1/0&&(e=0),0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1}),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&t?this:t,e.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;r>o;o++)if(o in n&&(e=n[o],t.call(i,e,o,n)))return o;return-1}}),"function"!=typeof Object.create&&!function(){var t=function(){};Object.create=function(e){if(arguments.length>1)throw new Error("Second argument not supported");if(null===e)throw new Error("Cannot set a null [[Prototype]]");if("object"!=typeof e)throw new TypeError("Argument must be an object");return t.prototype=e,new t}}(),Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(i){if("object"!=typeof i&&("function"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");var o,a,s=[];for(o in i)t.call(i,o)&&s.push(o);if(e)for(a=0;r>a;a++)t.call(i,n[a])&&s.push(n[a]);return s}}()),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){return t.constructor.prototype}),function(){"use strict";function t(t,n){return{$progress:function(r){t.on("state_changed",function(){n.compile(function(){r(e(t.snapshot))})})},$error:function(e){t.on("state_changed",null,function(t){n.compile(function(){e(t)})})},$complete:function(r){t.on("state_changed",null,null,function(){n.compile(function(){r(e(t.snapshot))})})},$cancel:t.cancel,$resume:t.resume,$pause:t.pause,then:t.then,"catch":t["catch"],$snapshot:t.snapshot}}function e(t){return{bytesTransferred:t.bytesTransferred,downloadURL:t.downloadURL,metadata:t.metadata,ref:t.ref,state:t.state,task:t.task,totalBytes:t.totalBytes}}function n(t){return t=t||{},"function"==typeof t.put}function r(t){if(!n(t))throw new Error("$firebaseStorage expects a Storage reference")}function i(i,o){var a=function(e){return r(e),{$put:function(n,r){var o=e.put(n,r);return t(o,i)},$putString:function(n,r,o){var a=e.putString(n,r,o);return t(a,i)},$getDownloadURL:function(){return o.when(e.getDownloadURL())},$delete:function(){return o.when(e["delete"]())},$getMetadata:function(){return o.when(e.getMetadata())},$updateMetadata:function(t){return o.when(e.updateMetadata(t))},$toString:function(){return e.toString()}}};return a.utils={_unwrapStorageSnapshot:e,_isStorageRef:n,_assertStorageRef:r},a}angular.module("firebase.storage").factory("$firebaseStorage",["$firebaseUtils","$q",i])}(),function(){"use strict";function t(t,e){return{restrict:"A",priority:99,scope:{},link:function(n,r,i){i.$observe("firebaseSrc",function(n){if(""!==n){var i=e.storage().ref(n),o=t(i);o.$getDownloadURL().then(function(t){r[0].src=t})}})}}}t.$inject=["$firebaseStorage","firebase"],angular.module("firebase.storage").directive("firebaseSrc",t)}(),function(){"use strict";function t(e){if(!angular.isObject(e))return e;var n=angular.isArray(e)?[]:{};return angular.forEach(e,function(e,r){("string"!=typeof r||"$"!==r.charAt(0))&&(n[r]=t(e))}),n}angular.module("firebase.utils").factory("$firebaseConfig",["$firebaseArray","$firebaseObject","$injector",function(t,e,n){return function(r){var i=angular.extend({},r);return"string"==typeof i.objectFactory&&(i.objectFactory=n.get(i.objectFactory)),"string"==typeof i.arrayFactory&&(i.arrayFactory=n.get(i.arrayFactory)),angular.extend({arrayFactory:t,objectFactory:e},i)}}]).factory("$firebaseUtils",["$q","$timeout","$rootScope",function(e,n,r){var i={batch:function(t,e){return function(){var n=Array.prototype.slice.call(arguments,0);i.compile(function(){t.apply(e,n)})}},debounce:function(t,e,n,r){function o(){c&&(c(),c=null),u&&Date.now()-u>r?h||(h=!0,i.compile(a)):(u||(u=Date.now()),c=i.wait(a,n))}function a(){c=null,u=null,h=!1,t.apply(e,l)}function s(){l=Array.prototype.slice.call(arguments,0),o()}var u,c,l,h;if("number"==typeof e&&(r=n,n=e,e=null),"number"!=typeof n)throw new Error("Must provide a valid integer for wait. Try 0 for a default");if("function"!=typeof t)throw new Error("Must provide a valid function to debounce");return r||(r=10*n||100),s.running=function(){return u>0},s},assertValidRef:function(t,e){if(!angular.isObject(t)||"object"!=typeof t.ref||"function"!=typeof t.ref.transaction)throw new Error(e||"Invalid Firebase reference")},inherit:function(t,e,n){var r=t.prototype;return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,angular.forEach(Object.keys(r),function(e){t.prototype[e]=r[e]}),angular.isObject(n)&&angular.extend(t.prototype,n),t},getPrototypeMethods:function(t,e,n){for(var r={},i=Object.getPrototypeOf({}),o=angular.isFunction(t)&&angular.isObject(t.prototype)?t.prototype:Object.getPrototypeOf(t);o&&o!==i;){for(var a in o)o.hasOwnProperty(a)&&!r.hasOwnProperty(a)&&(r[a]=!0,e.call(n,o[a],a,o));o=Object.getPrototypeOf(o)}},getPublicMethods:function(t,e,n){i.getPrototypeMethods(t,function(t,r){"function"==typeof t&&"_"!==r.charAt(0)&&e.call(n,t,r)})},makeNodeResolver:function(t){return function(e,n){null===e?(arguments.length>2&&(n=Array.prototype.slice.call(arguments,1)),t.resolve(n)):t.reject(e)}},wait:function(t,e){var r=n(t,e||0);return function(){r&&(n.cancel(r),r=null)}},compile:function(t){return r.$evalAsync(t||function(){})},deepCopy:function(t){if(!angular.isObject(t))return t;var e=angular.isArray(t)?t.slice():angular.extend({},t);for(var n in e)e.hasOwnProperty(n)&&angular.isObject(e[n])&&(e[n]=i.deepCopy(e[n]));return e},trimKeys:function(t,e){i.each(t,function(n,r){e.hasOwnProperty(r)||delete t[r]})},scopeData:function(t){var e={$id:t.$id,$priority:t.$priority},n=!1;return i.each(t,function(t,r){n=!0,e[r]=i.deepCopy(t)}),!n&&t.hasOwnProperty("$value")&&(e.$value=t.$value),e},updateRec:function(t,e){var n=e.val(),r=angular.extend({},t);return angular.isObject(n)?delete t.$value:(t.$value=n,n={}),i.trimKeys(t,n),angular.extend(t,n),t.$priority=e.getPriority(),!angular.equals(r,t)||r.$value!==t.$value||r.$priority!==t.$priority},applyDefaults:function(t,e){return angular.isObject(e)&&angular.forEach(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)}),t},dataKeys:function(t){var e=[];return i.each(t,function(t,n){e.push(n)}),e},each:function(t,e,n){if(angular.isObject(t)){for(var r in t)if(t.hasOwnProperty(r)){var i=r.charAt(0);"_"!==i&&"$"!==i&&"."!==i&&e.call(n,t[r],r,t)}}else if(angular.isArray(t))for(var o=0,a=t.length;a>o;o++)e.call(n,t[o],o,t);return t},toJSON:function(e){var n;return angular.isObject(e)||(e={$value:e}),angular.isFunction(e.toJSON)?n=e.toJSON():(n={},i.each(e,function(e,r){n[r]=t(e)})),angular.isDefined(e.$value)&&0===Object.keys(n).length&&null!==e.$value&&(n[".value"]=e.$value),angular.isDefined(e.$priority)&&Object.keys(n).length>0&&null!==e.$priority&&(n[".priority"]=e.$priority),angular.forEach(n,function(t,e){if(e.match(/[.$\[\]#\/]/)&&".value"!==e&&".priority"!==e)throw new Error("Invalid key "+e+" (cannot contain .$[]#/)");if(angular.isUndefined(t))throw new Error("Key "+e+" was undefined. Cannot pass undefined in JSON. Use null instead.")}),n},doSet:function(t,n){var r=e.defer();if(angular.isFunction(t.set)||!angular.isObject(n))try{t.set(n,i.makeNodeResolver(r))}catch(o){r.reject(o)}else{var a=angular.extend({},n);t.once("value",function(e){e.forEach(function(t){a.hasOwnProperty(t.key)||(a[t.key]=null)}),t.ref.update(a,i.makeNodeResolver(r))},function(t){r.reject(t)})}return r.promise},doRemove:function(t){var n=e.defer();return angular.isFunction(t.remove)?t.remove(i.makeNodeResolver(n)):t.once("value",function(e){var r=[];e.forEach(function(t){r.push(t.ref.remove())}),i.allPromises(r).then(function(){n.resolve(t)},function(t){n.reject(t)})},function(t){n.reject(t)}),n.promise},VERSION:"0.0.0",allPromises:e.all.bind(e)};return i}])}(),/**
* An Angular module that gives you access to the browsers local storage
* @version v0.5.1 - 2016-09-27
* @link https://github.com/grevory/angular-local-storage
* @author grevory
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
function(t,e){var n=e.isDefined,r=e.isUndefined,i=e.isNumber,o=e.isObject,a=e.isArray,s=e.isString,u=e.extend,c=e.toJson;e.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls",this.storageType="localStorage",this.cookie={expiry:30,path:"/",secure:!1},this.defaultToCookie=!0,this.notify={setItem:!0,removeItem:!1},this.setPrefix=function(t){return this.prefix=t,this},this.setStorageType=function(t){return this.storageType=t,this},this.setDefaultToCookie=function(t){return this.defaultToCookie=!!t,this},this.setStorageCookie=function(t,e,n){return this.cookie.expiry=t,this.cookie.path=e,this.cookie.secure=n,this},this.setStorageCookieDomain=function(t){return this.cookie.domain=t,this},this.setNotify=function(t,e){return this.notify={setItem:t,removeItem:e},this},this.$get=["$rootScope","$window","$document","$parse","$timeout",function(t,e,l,h,f){function d(n){if(n||(n=e.event),y.setItem&&s(n.key)&&x(n.key)){var r=$(n.key);f(function(){t.$broadcast("LocalStorageModule.notification.changed",{key:r,newvalue:n.newValue,storageType:g.storageType})})}}var p,g=this,m=g.prefix,v=g.cookie,y=g.notify,b=g.storageType;l?l[0]&&(l=l[0]):l=document,"."!==m.substr(-1)&&(m=m?m+".":"");var w=function(t){return m+t},$=function(t){return t.replace(new RegExp("^"+m,"g"),"")},x=function(t){return 0===t.indexOf(m)},k=function(){try{var n=b in e&&null!==e[b],r=w("__"+Math.round(1e7*Math.random()));return n&&(p=e[b],p.setItem(r,""),p.removeItem(r)),n}catch(i){return g.defaultToCookie&&(b="cookie"),t.$broadcast("LocalStorageModule.notification.error",i.message),!1}},S=k(),C=function(e,n,i){if(j(i),n=r(n)?null:c(n),!S&&g.defaultToCookie||"cookie"===g.storageType)return S||t.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),y.setItem&&t.$broadcast("LocalStorageModule.notification.setitem",{key:e,newvalue:n,storageType:"cookie"}),O(e,n);try{p&&p.setItem(w(e),n),y.setItem&&t.$broadcast("LocalStorageModule.notification.setitem",{key:e,newvalue:n,storageType:g.storageType})}catch(o){return t.$broadcast("LocalStorageModule.notification.error",o.message),O(e,n)}return!0},E=function(e,n){if(j(n),!S&&g.defaultToCookie||"cookie"===g.storageType)return S||t.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),M(e);var r=p?p.getItem(w(e)):null;if(!r||"null"===r)return null;try{return JSON.parse(r)}catch(i){return r}},T=function(){var e=0;arguments.length>=1&&("localStorage"===arguments[arguments.length-1]||"sessionStorage"===arguments[arguments.length-1])&&(e=1,j(arguments[arguments.length-1]));var n,r;for(n=0;n0||(l.cookie="test").indexOf.call(l.cookie,"test")>-1)}catch(n){return t.$broadcast("LocalStorageModule.notification.error",n.message),!1}}(),O=function(e,n,s,u){if(r(n))return!1;if((a(n)||o(n))&&(n=c(n)),!_)return t.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var h="",f=new Date,d="";if(null===n?(f.setTime(f.getTime()+-864e5),h="; expires="+f.toGMTString(),n=""):i(s)&&0!==s?(f.setTime(f.getTime()+24*s*60*60*1e3),h="; expires="+f.toGMTString()):0!==v.expiry&&(f.setTime(f.getTime()+24*v.expiry*60*60*1e3),h="; expires="+f.toGMTString()),e){var p="; path="+v.path;v.domain&&(d="; domain="+v.domain),"boolean"==typeof u?u===!0&&(d+="; secure"):v.secure===!0&&(d+="; secure"),l.cookie=w(e)+"="+encodeURIComponent(n)+h+p+d}}catch(g){return t.$broadcast("LocalStorageModule.notification.error",g.message),!1}return!0},M=function(e){if(!_)return t.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(var n=l.cookie&&l.cookie.split(";")||[],r=0;r").append(c.clone()).html(),f=window.btoa(unescape(encodeURIComponent(h))),d=t.base,p="";if(o.avatarBorderStyle?p=o.avatarBorderStyle:o.avatardefaultBorder&&(p=o.defaultBorder),"0"!=o.rotatedeg&&(p="-ms-transform: rotate("+o.rotatedeg+"deg); -webkit-transform: rotate("+o.rotatedeg+"deg); transform: rotate("+o.rotatedeg+"deg)"),o.shape){if("round"===o.shape){var g=t.radius+p;if(e.data.indexOf("http")>-1||e.data.indexOf("data:image")>-1){var m="width:"+o.width+"px;height:"+o.height+"px;";l=""}else l=""}}else if(e.data.indexOf("http")>-1||e.data.indexOf("data:image")>-1){var m="width:"+o.width+"px;height:"+o.height+"px;";l=""}else l="";"true"===o.dynamic?(n.empty(),n.append(l)):n.replaceWith(l)}var o={charCount:r.charcount||t.charCount,data:r.data,textColor:t.textColor,height:r.height||t.height,width:r.width||t.width,fontsize:r.fontsize||t.fontsize,fontWeight:r.fontweight||t.fontWeight,fontFamily:r.fontfamily||t.fontFamily,avatarBorderStyle:r.avatarcustomborder,avatardefaultBorder:r.avatarborder,defaultBorder:t.defaultBorder,shape:r.shape,alphabetcolors:e.alphabetcolors||t.alphabetcolors,avatarCustomBGColor:r.avatarcustombgcolor||t.custombgcolor,dynamic:r.dynamic||t.dynamic,rotatedeg:r.rotatedeg||t.rotatedeg};"true"===o.dynamic?e.$watch("data",function(){i()}):i()}}}]),/*
Copyright 2012 Igor Vaynberg
Version: 3.5.4 Timestamp: Sun Aug 30 13:30:32 EDT 2015
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the
Apache License or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
the specific language governing permissions and limitations under the Apache License and the GPL License.
*/
function(t){"undefined"==typeof t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var n=t([0]),r=-1,i=this.length;++rn;n+=1)if(a(t,e[n]))return n;return-1}function o(){var e=t(F);e.appendTo(document.body);var n={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),n}function a(t,n){return t===n?!0:t===e||n===e?!1:null===t||null===n?!1:t.constructor===String?t+""==n+"":n.constructor===String?n+""==t+"":!1}function s(t,e,n){var r,i,o;if(null===t||t.length<1)return[];for(r=t.split(e),i=0,o=r.length;o>i;i+=1)r[i]=n(r[i]);return r}function u(t){return t.outerWidth(!1)-t.width()}function c(n){var r="keyup-change-value";n.on("keydown",function(){t.data(n,r)===e&&t.data(n,r,n.val())}),n.on("keyup",function(){var i=t.data(n,r);i!==e&&n.val()!==i&&(t.removeData(n,r),n.trigger("keyup-change"))})}function l(n){n.on("mousemove",function(n){var r=R;(r===e||r.x!==n.pageX||r.y!==n.pageY)&&t(n.target).trigger("mousemove-filtered",n)})}function h(t,n,r){r=r||e;var i;return function(){var e=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,e)},t)}}function f(t,e){var n=h(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){i(t.target,e.get())>=0&&n(t)})}function d(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,n=t[0],r=t.val().length;t.focus();var i=n.offsetWidth>0||n.offsetHeight>0;i&&n===document.activeElement&&(n.setSelectionRange?n.setSelectionRange(r,r):n.createTextRange&&(e=n.createTextRange(),e.collapse(!1),e.select()))},0)}function p(e){e=t(e)[0];var n=0,r=0;if("selectionStart"in e)n=e.selectionStart,r=e.selectionEnd-n;else if("selection"in document){e.focus();var i=document.selection.createRange();r=document.selection.createRange().text.length,i.moveStart("character",-e.value.length),n=i.text.length-r}return{offset:n,length:r}}function g(t){t.preventDefault(),t.stopPropagation()}function m(t){t.preventDefault(),t.stopImmediatePropagation()}function v(e){if(!I){var n=e[0].currentStyle||window.getComputedStyle(e[0],null);I=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),I.attr("class","select2-sizer"),t(document.body).append(I)}return I.text(e.val()),I.width()}function y(e,n,r){var i,o,a=[];i=t.trim(e.attr("class")),i&&(i=""+i,t(i.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),i=t.trim(n.attr("class")),i&&(i=""+i,t(i.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=r(this),o&&a.push(o))})),e.attr("class",a.join(" "))}function b(t,e,n,i){var o=r(t.toUpperCase()).indexOf(r(e.toUpperCase())),a=e.length;return 0>o?void n.push(i(t)):(n.push(i(t.substring(0,o))),n.push(""),n.push(i(t.substring(o,o+a))),n.push(""),void n.push(i(t.substring(o+a,t.length))))}function w(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function $(n){var r,i=null,o=n.quietMillis||100,a=n.url,s=this;return function(u){window.clearTimeout(r),r=window.setTimeout(function(){var r=n.data,o=a,c=n.transport||t.fn.select2.ajaxDefaults.transport,l={type:n.type||"GET",cache:n.cache||!1,jsonpCallback:n.jsonpCallback||e,dataType:n.dataType||"json"},h=t.extend({},t.fn.select2.ajaxDefaults.params,l);r=r?r.call(s,u.term,u.page,u.context):null,o="function"==typeof o?o.call(s,u.term,u.page,u.context):o,i&&"function"==typeof i.abort&&i.abort(),n.params&&(t.isFunction(n.params)?t.extend(h,n.params.call(s)):t.extend(h,n.params)),t.extend(h,{url:o,dataType:n.dataType,data:r,success:function(t){var e=n.results(t,u.page,u);u.callback(e)},error:function(t,e,n){var r={hasError:!0,jqXHR:t,textStatus:e,errorThrown:n};u.callback(r)}}),i=c.call(s,h)},o)}}function x(e){var n,r,i=e,o=function(t){return""+t.text};t.isArray(i)&&(r=i,i={results:r}),t.isFunction(i)===!1&&(r=i,i=function(){return r});var a=i();return a.text&&(o=a.text,t.isFunction(o)||(n=a.text,o=function(t){return t[n]})),function(e){var n,r=e.term,a={results:[]};return""===r?void e.callback(i()):(n=function(i,a){var s,u;if(i=i[0],i.children){s={};for(u in i)i.hasOwnProperty(u)&&(s[u]=i[u]);s.children=[],t(i.children).each2(function(t,e){n(e,s.children)}),(s.children.length||e.matcher(r,o(s),i))&&a.push(s)}else e.matcher(r,o(i),i)&&a.push(i)},t(i().results).each2(function(t,e){n(e,a.results)}),void e.callback(a))}}function k(n){var r=t.isFunction(n);return function(i){var o=i.term,a={results:[]},s=r?n(i):n;t.isArray(s)&&(t(s).each(function(){var t=this.text!==e,n=t?this.text:this;(""===o||i.matcher(o,n))&&a.results.push(t?this:{id:this,text:this})}),i.callback(a))}}function S(e,n){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(n+" must be a string, function, or falsy value")}function C(e,n){if(t.isFunction(e)){var r=Array.prototype.slice.call(arguments,2);return e.apply(n,r)}return e}function E(e){var n=0;return t.each(e,function(t,e){e.children?n+=E(e.children):n++}),n}function T(t,n,r,i){var o,s,u,c,l,h=t,f=!1;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return e;for(;;){for(s=-1,u=0,c=i.tokenSeparators.length;c>u&&(l=i.tokenSeparators[u],s=t.indexOf(l),!(s>=0));u++);if(0>s)break;if(o=t.substring(0,s),t=t.substring(s+l.length),o.length>0&&(o=i.createSearchChoice.call(this,o,n),o!==e&&null!==o&&i.id(o)!==e&&null!==i.id(o))){for(f=!1,u=0,c=n.length;c>u;u++)if(a(i.id(o),i.id(n[u]))){f=!0;break}f||r(o)}}return h!==t?t:void 0}function A(){var e=this;t.each(arguments,function(t,n){e[n].remove(),e[n]=null})}function D(e,n){var r=function(){};return r.prototype=new e,r.prototype.constructor=r,r.prototype.parent=e.prototype,r.prototype=t.extend(r.prototype,n),r}if(window.Select2===e){var _,O,M,P,I,N,j,R={x:0,y:0},L={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case L.LEFT:case L.RIGHT:case L.UP:case L.DOWN:return!0}return!1},isControl:function(t){var e=t.which;switch(e){case L.SHIFT:case L.CTRL:case L.ALT:return!0}return t.metaKey?!0:!1},isFunctionKey:function(t){return t=t.which?t.which:t,t>=112&&123>=t}},F="",U={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};N=t(document),P=function(){var t=1;return function(){return t++}}(),_=D(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(n){var r,i,a=".select2-results";this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==e&&null!==n.element.data("select2")&&n.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=t("",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+P()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",n.element.attr("title")),this.body=t(document.body),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",n.element.attr("style")),this.container.css(C(n.containerCss,this.opts.element)),this.container.addClass(C(n.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(C(n.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=r=this.container.find(a),this.search=i=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),l(this.results),this.dropdown.on("mousemove-filtered",a,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",a,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",a,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",a,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),f(80,this.results),this.dropdown.on("scroll-debounced",a,this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&r.mousewheel(function(t,e,n,i){var o=r.scrollTop();i>0&&0>=o-i?(r.scrollTop(0),g(t)):0>i&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),g(t))}),c(i),i.on("keyup-change input paste",this.bind(this.updateResults)),i.on("focus",function(){i.addClass("select2-focused")}),i.on("blur",function(){i.removeClass("select2-focused")}),this.dropdown.on("mouseup",a,this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.lastSearchTerm=e,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==n.maximumInputLength&&this.search.attr("maxlength",n.maximumInputLength);var s=n.element.prop("disabled");s===e&&(s=!1),this.enable(!s);var u=n.element.prop("readonly");u===e&&(u=!1),this.readonly(u),j=j||o(),this.autofocus=n.element.prop("autofocus"),n.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",n.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,n=t.data("select2"),r=this;this.close(),t.length&&t[0].detachEvent&&r._sync&&t.each(function(){r._sync&&this.detachEvent("onpropertychange",r._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,n!==e&&(n.container.remove(),n.liveRegion.remove(),n.dropdown.remove(),t.removeData("select2").off(".select2"),t.is("input[type='hidden']")?t.css("display",""):(t.show().prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show())),A.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:a(t.attr("locked"),"locked")||a(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(n){var r,i,o,u,c=this;if(r=n.element,"select"===r.get(0).tagName.toLowerCase()&&(this.select=i=n.element),i&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a