diff --git a/package.json b/package.json index d2fc0e8..6721a23 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "dependencies": { "es6-promise": "^3.0.2", - "firebase": "^2.4.2", + "firebase": "^3.4.1", "vue": "^1.0.26", "vue-router": "^0.7.13" } diff --git a/src/store/index.js b/src/store/index.js index f874c62..34360a1 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,8 +1,14 @@ -import Firebase from 'firebase' +import Firebase from 'firebase/app' +import Database from 'firebase/database' import { EventEmitter } from 'events' import { Promise } from 'es6-promise' -const api = new Firebase('https://hacker-news.firebaseio.com/v0') +const config = { + databaseURL: 'https://hacker-news.firebaseio.com' +} +Firebase.initializeApp(config) +const version = '/v0' +const api = Firebase.database().ref(version) const itemsCache = Object.create(null) const store = new EventEmitter() const storiesPerPage = store.storiesPerPage = 30 diff --git a/static/build.js b/static/build.js index c3072c5..1072695 100644 --- a/static/build.js +++ b/static/build.js @@ -1,26 +1,52 @@ -!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/static/",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=n(74),o=i(r),s=n(67),a=i(s),u=n(22),h=n(62),c=i(h),l=n(65),f=i(l),p=n(64),d=i(p),v=n(66),g=i(v);o["default"].use(a["default"]),o["default"].filter("fromNow",u.fromNow),o["default"].filter("domain",u.domain);var m=new a["default"];m.map({"/news/:page":{component:f["default"]},"/user/:id":{component:g["default"]},"/item/:id":{component:d["default"]}}),m.beforeEach(function(){window.scrollTo(0,0)}),m.redirect({"*":"/news/1"}),m.start(c["default"],"#app")},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t,e){var n,i,r;if(e.singleton){var o=g++;n=v||(v=a(e)),i=h.bind(null,n,o,!1),r=h.bind(null,n,o,!0)}else n=a(e),i=c.bind(null,n),r=function(){s(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}function h(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=b(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function c(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var l={},f=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),d=f(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,m=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return i(n,e),function(t){for(var o=[],s=0;s0?i:n)(t)}},function(t,e,n){var i=n(35),r=n(29);t.exports=function(t){return i(r(t))}},function(t,e,n){var i,r;n(70),i=n(18),r=n(58),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r);e["default"]={name:"Comment",props:{comment:Object},data:function(){return{childComments:[],open:!0}},created:function(){var t=this;this.comment.kids&&o["default"].fetchItems(this.comment.kids).then(function(e){t.childComments=e})}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={name:"Item",props:{item:Object,index:Number},computed:{href:function(){return this.item.url||"#/item/"+this.item.id},showInfo:function(){return"story"===this.item.type||"poll"===this.item.type},showDomain:function(){return"story"===this.item.type}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(16),a=i(s),u=n(63),h=i(u);e["default"]={name:"ItemView",components:{Item:a["default"],Comment:h["default"]},data:function(){return{item:{},comments:[],pollOptions:null}},route:{data:function(t){var e=t.to;return o["default"].fetchItem(e.params.id).then(function(t){return document.title=t.title+" | Vue.js HN Clone",{item:t,comments:o["default"].fetchItems(t.kids),pollOptions:"poll"===t.type?o["default"].fetchItems(t.parts):null}})}},computed:{isJob:function(){return"job"===this.item.type},hasText:function(){return this.item.hasOwnProperty("text")}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(16),a=i(s);e["default"]={name:"NewsView",components:{Item:a["default"]},data:function(){return{page:1,items:[]}},route:{data:function(t){var e=t.to,n=+e.params.page;return document.title="Vue.js HN Clone",o["default"].fetchItemsByPage(n).then(function(t){return{page:n,items:t}})}},created:function(){o["default"].on("topstories-updated",this.update)},destroyed:function(){o["default"].removeListener("topstories-updated",this.update)},methods:{update:function(){var t=this;o["default"].fetchItemsByPage(this.page).then(function(e){t.items=e})}},filters:{formatItemIndex:function(t){return(this.page-1)*o["default"].storiesPerPage+t+1}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r);e["default"]={name:"UserView",data:function(){return{user:{}}},route:{data:function(t){var e=t.to;return document.title="Profile: "+e.params.id+" | Vue.js HN Clone",{user:o["default"].fetchUser(e.params.id)}}}}},function(t,e){"use strict";function n(t){return o.href=t,o.hostname}function i(t){var e=Date.now()/1e3-Number(t);return e<3600?r(~~(e/60)," minute"):e<86400?r(~~(e/3600)," hour"):r(~~(e/86400)," day")}function r(t,e){return 1===t?t+e:t+e+"s"}Object.defineProperty(e,"__esModule",{value:!0}),e.domain=n,e.fromNow=i;var o=document.createElement("a")},function(t,e,n){t.exports={"default":n(24),__esModule:!0}},function(t,e,n){n(46);var i=n(8).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(15),r=n(43),o=n(42);t.exports=function(t){return function(e,n,s){var a,u=i(e),h=r(u.length),c=o(s,h);if(t&&n!=n){for(;h>c;)if(a=u[c++],a!=a)return!0}else for(;h>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(25);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(5),r=n(8),o=n(28),s=n(32),a="prototype",u=function(t,e,n){var h,c,l,f=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,g=t&u.B,m=t&u.W,b=p?r:r[e]||(r[e]={}),y=b[a],w=p?i:d?i[e]:(i[e]||{})[a];p&&(n=e);for(h in n)c=!f&&w&&void 0!==w[h],c&&h in b||(l=c?w[h]:n[h],b[h]=p&&"function"!=typeof w[h]?n[h]:g&&c?o(l,i):m&&w[h]==l?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((b.virtual||(b.virtual={}))[h]=l,t&u.R&&y&&!y[h]&&s(y,h,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(12),r=n(40);t.exports=n(4)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=n(5).document&&document.documentElement},function(t,e,n){t.exports=!n(4)&&!n(11)(function(){return 7!=Object.defineProperty(n(9)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(6),r=n(37),o=n(10),s=n(13)("IE_PROTO"),a=function(){},u="prototype",h=function(){var t,e=n(9)("iframe"),i=o.length,r="<",s=">";for(e.style.display="none",n(33).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+s+"document.F=Object"+r+"/script"+s),t.close(),h=t.F;i--;)delete h[u][o[i]];return h()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=i(t),n=new a,a[u]=null,n[s]=t):n=h(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(12),r=n(6),o=n(39);t.exports=n(4)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var i=n(31),r=n(15),o=n(26)(!1),s=n(13)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,h=[];for(n in a)n!=s&&i(a,n)&&h.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~o(h,n)||h.push(n));return h}},function(t,e,n){var i=n(38),r=n(10);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(5),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var i=n(14),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(14),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(7);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(30);i(i.S,"Object",{create:n(36)})},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,"body,html{font-family:Verdana;font-size:13px;height:100%}ul{list-style-type:none;padding:0;margin:0}a{color:#000;cursor:pointer;text-decoration:none}#wrapper{background-color:#f6f6ef;width:85%;min-height:80px;margin:0 auto}#header,#wrapper{position:relative}#header{background-color:#f60;height:24px}#header h1{font-weight:700;font-size:13px;display:inline-block;vertical-align:middle;margin:0}#header .source{color:#fff;font-size:11px;position:absolute;top:4px;right:4px}#header .source a{color:#fff}#header .source a:hover{text-decoration:underline}#yc{border:1px solid #fff;margin:2px;display:inline-block}#yc,#yc img{vertical-align:middle}.view{position:absolute;background-color:#f6f6ef;width:100%;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;box-sizing:border-box;padding:8px 20px}.view.v-enter,.view.v-leave{opacity:0}@media screen and (max-width:700px){body,html{margin:0}#wrapper{width:100%}}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".comhead{font-size:11px;margin-bottom:8px}.comhead,.comhead a{color:#828282}.comhead a:hover{text-decoration:underline}.comhead .toggle{margin-right:4px}.comment-content{margin:0 0 16px 24px;word-wrap:break-word}.comment-content code{white-space:pre-wrap}.child-comments{margin:8px 0 8px 22px}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".item{padding:2px 0 2px 40px;position:relative;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.item p{margin:2px 0}.item .index,.item .title:visited{color:#828282}.item .index{position:absolute;width:30px;text-align:right;left:0;top:4px}.item .domain,.item .subtext{font-size:11px;color:#828282}.item .domain a,.item .subtext a{color:#828282}.item .subtext a:hover{text-decoration:underline}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".item-view .item{padding-left:0;margin-bottom:30px}.item-view .item .index{display:none}.item-view .poll-options{margin-left:30px;margin-bottom:40px}.item-view .poll-options li{margin:12px 0}.item-view .poll-options p{margin:8px 0}.item-view .poll-options .subtext{color:#828282;font-size:11px}.item-view .itemtext{color:#828282;margin-top:0;margin-bottom:30px}.item-view .itemtext p{margin:10px 0}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,'.news-view{padding-left:5px;padding-right:15px}.news-view.loading:before{content:"Loading...";position:absolute;top:16px;left:20px}.news-view .nav{padding:10px 10px 10px 40px;margin-top:10px;border-top:2px solid #f60}.news-view .nav a{margin-right:10px}.news-view .nav a:hover{text-decoration:underline}',""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".user-view{color:#828282}.user-view li{margin:5px 0}.user-view .label{display:inline-block;min-width:60px}.user-view .about{margin-top:1em}.user-view .links a{text-decoration:underline}",""])},function(t,e){/*! +!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/static/",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(75),o=i(r),s=n(68),a=i(s),u=n(23),c=n(63),h=i(c),l=n(66),f=i(l),p=n(65),d=i(p),v=n(67),g=i(v);o.default.use(a.default),o.default.filter("fromNow",u.fromNow),o.default.filter("domain",u.domain);var b=new a.default;b.map({"/news/:page":{component:f.default},"/user/:id":{component:g.default},"/item/:id":{component:d.default}}),b.beforeEach(function(){window.scrollTo(0,0)}),b.redirect({"*":"/news/1"}),b.start(h.default,"#app")},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&b.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t,e){var n,i,r;if(e.singleton){var o=g++;n=v||(v=a(e)),i=c.bind(null,n,o,!1),r=c.bind(null,n,o,!0)}else n=a(e),i=h.bind(null,n),r=function(){s(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}function c(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=m(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function h(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var l={},f=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),d=f(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,b=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return i(n,e),function(t){for(var o=[],s=0;s0?i:n)(t)}},function(t,e,n){var i=n(36),r=n(30);t.exports=function(t){return i(r(t))}},function(t,e){(function(e){/*! @license Firebase v3.6.0 + Build: 3.6.0-rc.3 + Terms: https://developers.google.com/terms */ +var n=null;!function(){function t(t,e){function n(){this.constructor=t}for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t,e,n,i){var r,o=arguments.length,s=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if(r=f.Reflect,"object"==typeof r&&"function"==typeof r.decorate)s=r.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(3>o?r(s):3"}),n=this.W+": "+n+" ("+t+").",n=new _t(t,n);for(i in e)e.hasOwnProperty(i)&&"_"!==i.slice(-1)&&(n[i]=e[i]);return n};var kt=vt,Ct=function(t,e,n){var i=this;this.I=n,this.J=!1,this.i={},this.C=e,this.F=o(void 0,t),t="serviceAccount"in this.F,("credential"in this.F||t)&&"undefined"!=typeof console&&console.log("The '"+(t?"serviceAccount":"credential")+"' property specified in the first argument to initializeApp() is deprecated and will be removed in the next major version. You should instead use the 'firebase-admin' package. See https://firebase.google.com/docs/admin/setup for details on how to get started."),Object.keys(n.INTERNAL.factories).forEach(function(t){var e=n.INTERNAL.useAsService(i,t);null!==e&&(e=i.S.bind(i,e),i[t]=e)})};Ct.prototype.delete=function(){var t=this;return new kt(function(e){At(t),e()}).then(function(){return t.I.INTERNAL.removeApp(t.C),kt.all(Object.keys(t.i).map(function(e){return t.i[e].INTERNAL.delete()}))}).then(function(){t.J=!0,t.i={}})},Ct.prototype.S=function(t){return At(this),void 0===this.i[t]&&(this.i[t]=this.I.INTERNAL.factories[t](this,this.R.bind(this))),this.i[t]},Ct.prototype.R=function(t){o(this,t)};var At=function(t){t.J&&h(l("deleted",{name:t.C}))};d.Object.defineProperties(Ct.prototype,{name:{configurable:!0,enumerable:!0,get:function(){return At(this),this.C}},options:{configurable:!0,enumerable:!0,get:function(){return At(this),this.F}}}),Ct.prototype.name&&Ct.prototype.options||Ct.prototype.delete||console.log("dc"),"undefined"!=typeof n&&(n=c())}(),n.SDK_VERSION="3.6.0",t.exports=n}).call(e,function(){return this}())},function(t,e,n){var i,r,o={};n(71),i=n(19),r=n(59),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r);e.default={name:"Comment",props:{comment:Object},data:function(){return{childComments:[],open:!0}},created:function(){var t=this;this.comment.kids&&o.default.fetchItems(this.comment.kids).then(function(e){t.childComments=e})}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"Item",props:{item:Object,index:Number},computed:{href:function(){return this.item.url||"#/item/"+this.item.id},showInfo:function(){return"story"===this.item.type||"poll"===this.item.type},showDomain:function(){return"story"===this.item.type}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(17),a=i(s),u=n(64),c=i(u);e.default={name:"ItemView",components:{Item:a.default,Comment:c.default},data:function(){return{item:{},comments:[],pollOptions:null}},route:{data:function(t){var e=t.to;return o.default.fetchItem(e.params.id).then(function(t){return document.title=t.title+" | Vue.js HN Clone",{item:t,comments:o.default.fetchItems(t.kids),pollOptions:"poll"===t.type?o.default.fetchItems(t.parts):null}})}},computed:{isJob:function(){return"job"===this.item.type},hasText:function(){return this.item.hasOwnProperty("text")}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(17),a=i(s);e.default={name:"NewsView",components:{Item:a.default},data:function(){return{page:1,items:[]}},route:{data:function(t){var e=t.to,n=+e.params.page;return document.title="Vue.js HN Clone",o.default.fetchItemsByPage(n).then(function(t){return{page:n,items:t}})}},created:function(){o.default.on("topstories-updated",this.update)},destroyed:function(){o.default.removeListener("topstories-updated",this.update)},methods:{update:function(){var t=this;o.default.fetchItemsByPage(this.page).then(function(e){t.items=e})}},filters:{formatItemIndex:function(t){return(this.page-1)*o.default.storiesPerPage+t+1}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=i(r);e.default={name:"UserView",data:function(){return{user:{}}},route:{data:function(t){var e=t.to;return document.title="Profile: "+e.params.id+" | Vue.js HN Clone",{user:o.default.fetchUser(e.params.id)}}}}},function(t,e){"use strict";function n(t){return o.href=t,o.hostname}function i(t){var e=Date.now()/1e3-Number(t);return e<3600?r(~~(e/60)," minute"):e<86400?r(~~(e/3600)," hour"):r(~~(e/86400)," day")}function r(t,e){return 1===t?t+e:t+e+"s"}Object.defineProperty(e,"__esModule",{value:!0}),e.domain=n,e.fromNow=i;var o=document.createElement("a")},function(t,e,n){t.exports={default:n(25),__esModule:!0}},function(t,e,n){n(47);var i=n(8).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(15),r=n(44),o=n(43);t.exports=function(t){return function(e,n,s){var a,u=i(e),c=r(u.length),h=o(s,c);if(t&&n!=n){for(;c>h;)if(a=u[h++],a!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(26);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(5),r=n(8),o=n(29),s=n(33),a="prototype",u=function(t,e,n){var c,h,l,f=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,g=t&u.B,b=t&u.W,m=p?r:r[e]||(r[e]={}),y=m[a],w=p?i:d?i[e]:(i[e]||{})[a];p&&(n=e);for(c in n)h=!f&&w&&void 0!==w[c],h&&c in m||(l=h?w[c]:n[c],m[c]=p&&"function"!=typeof w[c]?n[c]:g&&h?o(l,i):b&&w[c]==l?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[c]=l,t&u.R&&y&&!y[c]&&s(y,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(12),r=n(41);t.exports=n(4)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=n(5).document&&document.documentElement},function(t,e,n){t.exports=!n(4)&&!n(11)(function(){return 7!=Object.defineProperty(n(9)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(28);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(6),r=n(38),o=n(10),s=n(13)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(9)("iframe"),i=o.length,r="<",s=">";for(e.style.display="none",n(34).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+s+"document.F=Object"+r+"/script"+s),t.close(),c=t.F;i--;)delete c[u][o[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=i(t),n=new a,a[u]=null,n[s]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(12),r=n(6),o=n(40);t.exports=n(4)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var i=n(32),r=n(15),o=n(27)(!1),s=n(13)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(39),r=n(10);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(5),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var i=n(14),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(14),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(7);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(31);i(i.S,"Object",{create:n(37)})},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,"body,html{font-family:Verdana;font-size:13px;height:100%}ul{list-style-type:none;padding:0;margin:0}a{color:#000;cursor:pointer;text-decoration:none}#wrapper{background-color:#f6f6ef;width:85%;min-height:80px;margin:0 auto}#header,#wrapper{position:relative}#header{background-color:#f60;height:24px}#header h1{font-weight:700;font-size:13px;display:inline-block;vertical-align:middle;margin:0}#header .source{color:#fff;font-size:11px;position:absolute;top:4px;right:4px}#header .source a{color:#fff}#header .source a:hover{text-decoration:underline}#yc{border:1px solid #fff;margin:2px;display:inline-block}#yc,#yc img{vertical-align:middle}.view{position:absolute;background-color:#f6f6ef;width:100%;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;box-sizing:border-box;padding:8px 20px}.view.v-enter,.view.v-leave{opacity:0}@media screen and (max-width:700px){body,html{margin:0}#wrapper{width:100%}}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".comhead{font-size:11px;margin-bottom:8px}.comhead,.comhead a{color:#828282}.comhead a:hover{text-decoration:underline}.comhead .toggle{margin-right:4px}.comment-content{margin:0 0 16px 24px;word-wrap:break-word}.comment-content code{white-space:pre-wrap}.child-comments{margin:8px 0 8px 22px}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".item{padding:2px 0 2px 40px;position:relative;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.item p{margin:2px 0}.item .index,.item .title:visited{color:#828282}.item .index{position:absolute;width:30px;text-align:right;left:0;top:4px}.item .domain,.item .subtext{font-size:11px;color:#828282}.item .domain a,.item .subtext a{color:#828282}.item .subtext a:hover{text-decoration:underline}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".item-view .item{padding-left:0;margin-bottom:30px}.item-view .item .index{display:none}.item-view .poll-options{margin-left:30px;margin-bottom:40px}.item-view .poll-options li{margin:12px 0}.item-view .poll-options p{margin:8px 0}.item-view .poll-options .subtext{color:#828282;font-size:11px}.item-view .itemtext{color:#828282;margin-top:0;margin-bottom:30px}.item-view .itemtext p{margin:10px 0}",""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,'.news-view{padding-left:5px;padding-right:15px}.news-view.loading:before{content:"Loading...";position:absolute;top:16px;left:20px}.news-view .nav{padding:10px 10px 10px 40px;margin-top:10px;border-top:2px solid #f60}.news-view .nav a{margin-right:10px}.news-view .nav a:hover{text-decoration:underline}',""])},function(t,e,n){e=t.exports=n(1)(),e.push([t.id,".user-view{color:#828282}.user-view li{margin:5px 0}.user-view .label{display:inline-block;min-width:60px}.user-view .about{margin-top:1em}.user-view .links a{text-decoration:underline}",""])},function(t,e){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license - * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE - * @version 3.2.1 + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version 3.3.1 */ -(function(){"use strict";function e(t){return"function"==typeof t||"object"==typeof t&&null!==t}function n(t){return"function"==typeof t}function i(t){V=t}function r(t){z=t}function o(){return function(){process.nextTick(c)}}function s(){return function(){B(c)}}function a(){var t=0,e=new G(c),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=c,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(c,1)}}function c(){for(var t=0;t0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,r,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(module,exports){/*! @license Firebase v2.4.2 - License: https://www.firebase.com/terms/terms-of-service.html */ -!function(){function p(t){return void 0!==t}function aa(){}function ba(t){t.yb=function(){return t.zf?t.zf:t.zf=new t}}function ca(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e}function da(t){return"array"==ca(t)}function ea(t){var e=ca(t);return"array"==e||"object"==e&&"number"==typeof t.length}function q(t){return"string"==typeof t}function fa(t){return"number"==typeof t}function r(t){return"function"==ca(t)}function ga(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function ha(t,e,n){return t.call.apply(t.bind,arguments)}function ia(t,e,n){if(!t)throw Error();if(2e?n+="000":256>e?n+="00":4096>e&&(n+="0"),Da[t]=n+e.toString(16)}),'"')}function Fa(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^ja()).toString(36)}function Ia(){this.Ya=-1}function Ja(){this.Ya=-1,this.Ya=64,this.P=[],this.pe=[],this.eg=[],this.Od=[],this.Od[0]=128;for(var t=1;tr;r++)i[r]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(r=0;16>r;r++)i[r]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(r=16;80>r;r++){var o=i[r-3]^i[r-8]^i[r-14]^i[r-16];i[r]=4294967295&(o<<1|o>>>31)}e=t.P[0],n=t.P[1];for(var s,a=t.P[2],u=t.P[3],h=t.P[4],r=0;80>r;r++)40>r?20>r?(o=u^n&(a^u),s=1518500249):(o=n^a^u,s=1859775393):60>r?(o=n&a|u&(n|a),s=2400959708):(o=n^a^u,s=3395469782),o=(e<<5|e>>>27)+o+h+s+i[r]&4294967295,h=u,u=a,a=4294967295&(n<<30|n>>>2),n=e,e=o;t.P[0]=t.P[0]+e&4294967295,t.P[1]=t.P[1]+n&4294967295,t.P[2]=t.P[2]+a&4294967295,t.P[3]=t.P[3]+u&4294967295,t.P[4]=t.P[4]+h&4294967295}function Ra(t,e){var n=Sa(t,e,void 0);return 0>n?null:q(t)?t.charAt(n):t[n]}function Sa(t,e,n){for(var i=t.length,r=q(t)?t.split(""):t,o=0;o=arguments.length?x.slice.call(t,e):x.slice.call(t,e,n)}function Va(t,e){t.sort(e||Wa)}function Wa(t,e){return t>e?1:t>2,o=(3&o)<<4|a>>4,a=(15&a)<<2|h>>6,h=63&h;u||(h=64,s||(a=64)),i.push(n[c],n[o],n[a],n[h])}return i.join("")}function ob(){if(!kb){kb={},lb={},mb={};for(var t=0;65>t;t++)kb[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),lb[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t),mb[lb[t]]=t,62<=t&&(mb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)]=t)}}function pb(t,e){if(this.N=qb,this.Rf=void 0,this.Ba=this.Ha=null,this.yd=this.ye=!1,t==rb)sb(this,tb,e);else try{var n=this;t.call(e,function(t){sb(n,tb,t)},function(t){if(!(t instanceof ub))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}sb(n,vb,t)})}catch(i){sb(this,vb,i)}}function rb(){}function xb(t,e){if(t.N==qb)if(t.Ha){var n=t.Ha;if(n.Ba){for(var i,r=0,o=-1,s=0;(i=n.Ba[s])&&!((i=i.o)&&(r++,i==t&&(o=s),0<=o&&1=r&&(r-=55296,i++,Kb(ir?e[n++]=r:(2048>r?e[n++]=r>>6|192:(65536>r?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return e}function Pb(t){for(var e=0,n=0;ni?e++:2048>i?e+=2:55296<=i&&56319>=i?(e+=4,n++):e+=3}return e}function D(t,e,n,i){var r;if(in&&(r=0===n?"none":"no more than "+n),r)throw Error(t+" failed: Was called with "+i+(1===i?" argument.":" arguments.")+" Expects "+r+".")}function E(t,e,n){var i="";switch(e){case 1:i=n?"first":"First";break;case 2:i=n?"second":"Second";break;case 3:i=n?"third":"Third";break;case 4:i=n?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?")}return t=t+" failed: "+(i+" argument ")}function F(t,e,n,i){if((!i||p(n))&&!r(n))throw Error(E(t,e,i)+"must be a valid function.")}function Qb(t,e,n){if(p(n)&&(!ga(n)||null===n))throw Error(E(t,e,!0)+"must be a valid context object.")}function Rb(t){return"undefined"!=typeof JSON&&p(JSON.parse)?JSON.parse(t):za(t)}function G(t){if("undefined"!=typeof JSON&&p(JSON.stringify))t=JSON.stringify(t);else{var e=[];Ba(new Aa,t,e),t=e.join("")}return t}function Sb(){this.Zd=H}function Tb(){}function Vb(t,e,n){this.bg=t,this.Oa=e,this.Nd=n}function Zb(){this.xb=[]}function $b(t,e){for(var n=null,i=0;in?i=i.left:0r)t=this.Je?t.left:t.right;else{if(0===r){this.Ta.push(t);break}this.Ta.push(t),t=this.Je?t.right:t.left}}function Ic(t){if(0===t.Ta.length)return null;var e,n=t.Ta.pop();if(e=t.Xd?t.Xd(n.key,n.value):{key:n.key,value:n.value},t.Je)for(n=n.left;!n.e();)t.Ta.push(n),n=n.right;else for(n=n.right;!n.e();)t.Ta.push(n),n=n.left;return e}function Jc(t){if(0===t.Ta.length)return null;var e;return e=t.Ta,e=e[e.length-1],t.Xd?t.Xd(e.key,e.value):{key:e.key,value:e.value}}function Kc(t,e,n,i,r){this.key=t,this.value=e,this.color=null==n||n,this.left=null!=i?i:Fc,this.right=null!=r?r:Fc}function Lc(t){return t.left.e()?t:Lc(t.left)}function Nc(t){return t.left.e()?Fc:(t.left.ha()||t.left.left.ha()||(t=Oc(t)),t=t.$(null,null,null,Nc(t.left),null),Mc(t))}function Mc(t){return t.right.ha()&&!t.left.ha()&&(t=Rc(t)),t.left.ha()&&t.left.left.ha()&&(t=Pc(t)),t.left.ha()&&t.right.ha()&&(t=Qc(t)),t}function Oc(t){return t=Qc(t),t.right.left.ha()&&(t=t.$(null,null,null,null,Pc(t.right)),t=Rc(t),t=Qc(t)),t}function Rc(t){return t.right.$(null,null,t.color,t.$(null,null,!0,null,t.right.left),null)}function Pc(t){return t.left.$(null,null,t.color,null,t.$(null,null,!0,t.left.right,null))}function Qc(t){return t.$(null,null,!t.color,t.left.$(null,null,!t.left.color,null,null),t.right.$(null,null,!t.right.color,null,null))}function Sc(){}function Tc(t,e){return t&&"object"==typeof t?(O(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t}function Uc(t,e){var n=new Vc;return Wc(t,new P(""),function(t,i){n.rc(t,Xc(i,e))}),n}function Xc(t,e){var n,i=t.C().J(),i=Tc(i,e);if(t.L()){var r=Tc(t.Ea(),e);return r!==t.Ea()||i!==t.C().J()?new Yc(r,Q(i)):t}return n=t,i!==t.C().J()&&(n=n.ia(new Yc(i))),t.R(R,function(t,i){var r=Xc(i,e);r!==i&&(n=n.W(t,r))}),n}function Zc(){this.Ac={}}function $c(t){this.Ic=t,this.Sd="firebase:"}function ad(t){try{if("undefined"!=typeof window&&"undefined"!=typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new $c(e)}}catch(n){}return new Zc}function dd(t,e,n,i,r){this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.ob=e,this.lc=n,this.jh=i,this.Rd=r||"",this.ab=bd.get("host:"+t)||this.host}function ed(t,e){e!==t.ab&&(t.ab=e,"s-"===t.ab.substr(0,2)&&bd.set("host:"+t.host,t.ab))}function fd(t,e,n){if(O("string"==typeof e,"typeof type must == string"),O("object"==typeof n,"typeof params must == object"),e===gd)e=(t.ob?"wss://":"ws://")+t.ab+"/.ws?";else{if(e!==hd)throw Error("Unknown connection type: "+e);e=(t.ob?"https://":"http://")+t.ab+"/.lp?"}t.host!==t.ab&&(n.ns=t.lc);var i=[];return v(n,function(t,e){i.push(e+"="+t)}),e+i.join("&")}function kd(t){try{var e;if("undefined"!=typeof atob)e=atob(t);else{ob();for(var n=mb,i=[],r=0;r>4),64!=a&&(i.push(s<<4&240|a>>2),64!=u&&i.push(a<<6&192|u))}if(8192>i.length)e=String.fromCharCode.apply(null,i);else{for(t="",n=0;nt.ec?t.update(t.Od,56-t.ec):t.update(t.Od,t.Ya-(t.ec-56));for(var i=t.Ya-1;56<=i;i--)t.pe[i]=255&n,n/=256;for(Ka(t,t.pe),i=n=0;5>i;i++)for(var r=24;0<=r;r-=8)e[n]=t.P[i]>>r&255,++n;return nb(e)}function md(t){for(var e="",n=0;nt?n.push(t.substring(i,t.length)):n.push(t.substring(i,i+e));return n}function zd(t,e){if(da(t))for(var n=0;nt,t=Math.abs(t),t>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023),n=i+1023,i=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,i=Math.round(t/Math.pow(2,-1074)))),r=[],t=52;t;--t)r.push(i%2?1:0),i=Math.floor(i/2);for(t=11;t;--t)r.push(n%2?1:0),n=Math.floor(n/2);for(r.push(e?1:0),r.reverse(),e=r.join(""),n="",t=0;64>t;t+=8)i=parseInt(e.substr(t,8),2).toString(16),1===i.length&&(i="0"+i),n+=i;return n.toLowerCase()}function vd(t){return Bd.test(t)&&(t=Number(t),-2147483648<=t&&2147483647>=t)?t:null}function gc(t){try{t()}catch(e){setTimeout(function(){throw S("Exception was thrown by user callback.",e.stack||""),e},Math.floor(0))}}function T(t,e){if(r(t)){var n=Array.prototype.slice.call(arguments,1).slice();gc(function(){t.apply(null,n)})}}function Cd(t){var e={},n={},i={},r="";try{var o=t.split("."),e=Rb(kd(o[0])||""),n=Rb(kd(o[1])||""),r=o[2],i=n.d||{};delete n.d}catch(s){}return{mh:e,Ec:n,data:i,bh:r}}function Dd(t){return t=Cd(t).Ec,"object"==typeof t&&t.hasOwnProperty("iat")?z(t,"iat"):null}function Ed(t){t=Cd(t);var e=t.Ec;return!!t.bh&&!!e&&"object"==typeof e&&e.hasOwnProperty("iat")}function Fd(t){this.Y=t,this.g=t.n.g}function Gd(t,e,n,i){var r=[],o=[];return Ma(e,function(e){"child_changed"===e.type&&t.g.Dd(e.Oe,e.Na)&&o.push(new J("child_moved",e.Na,e.Za))}),Hd(t,r,"child_removed",e,i,n),Hd(t,r,"child_added",e,i,n),Hd(t,r,"child_moved",o,i,n),Hd(t,r,"child_changed",e,i,n),Hd(t,r,ic,e,i,n),r}function Hd(t,e,n,i,r,o){i=Na(i,function(t){return t.type===n}),Va(i,u(t.qg,t)),Ma(i,function(n){var i=Id(t,n,o);Ma(r,function(r){r.Qf(n.type)&&e.push(r.createEvent(i,t.Y))})})}function Id(t,e,n){return"value"!==e.type&&"child_removed"!==e.type&&(e.Td=n.wf(e.Za,e.Na,t.g)),e}function Jd(){this.ib={}}function Kd(t,e){var n=e.type,i=e.Za;O("child_added"==n||"child_changed"==n||"child_removed"==n,"Only child changes supported for tracking"),O(".priority"!==i,"Only non-priority child changes can be tracked.");var r=z(t.ib,i);if(r){var o=r.type;if("child_added"==n&&"child_removed"==o)t.ib[i]=new J("child_changed",e.Na,i,r.Na);else if("child_removed"==n&&"child_added"==o)delete t.ib[i];else if("child_removed"==n&&"child_changed"==o)t.ib[i]=new J("child_removed",r.Oe,i);else if("child_changed"==n&&"child_added"==o)t.ib[i]=new J("child_added",e.Na,i);else{if("child_changed"!=n||"child_changed"!=o)throw jd("Illegal combination of changes: "+e+" occurred after "+r);t.ib[i]=new J("child_changed",e.Na,i,r.Oe)}}else t.ib[i]=e}function Ld(t){this.g=t}function Md(t){this.Fe=new Ld(t.g),this.g=t.g;var e;t.oa?(e=Nd(t),e=t.g.Sc(Od(t),e)):e=t.g.Wc(),this.gd=e,t.ra?(e=Pd(t),t=t.g.Sc(Rd(t),e)):t=t.g.Tc(),this.Jc=t}function Sd(t){this.ua=new Md(t),this.g=t.g,O(t.la,"Only valid if limit has been set"),this.ma=t.ma,this.Nb=!Td(t)}function Ud(t,e,n,i,r,o){var s;if(t.Nb){var a=Vd(t.g);s=function(t,e){return a(e,t)}}else s=Vd(t.g);O(e.Hb()==t.ma,"");var u=new L(n,i),h=t.Nb?Wd(e,t.g):Xd(e,t.g),c=t.ua.matches(u);if(e.Fa(n)){for(var l=e.T(n),h=r.Ce(t.g,h,t.Nb);null!=h&&(h.name==n||e.Fa(h.name));)h=r.Ce(t.g,h,t.Nb);return r=null==h?1:s(h,u),c&&!i.e()&&0<=r?(null!=o&&Kd(o,new J("child_changed",i,n,l)),e.W(n,i)):(null!=o&&Kd(o,new J("child_removed",l,n)),e=e.W(n,H),null!=h&&t.ua.matches(h)?(null!=o&&Kd(o,new J("child_added",h.U,h.name)),e.W(h.name,h.U)):e)}return i.e()?e:c&&0<=s(h,u)?(null!=o&&(Kd(o,new J("child_removed",h.U,h.name)),Kd(o,new J("child_added",i,n))),e.W(n,i).W(h.name,H)):e}function Yd(t,e){this.me=t,this.og=e}function Zd(t){this.X=t}function ie(t,e,n,i,r,o){var s=e.Q;if(null!=i.xc(n))return e;var a;if(n.e())O(lc(e.w()),"If change path is empty, we must have complete server data"),mc(e.w())?(r=Yb(e),i=i.Cc(r instanceof fe?r:H)):i=i.Aa(Yb(e)),o=t.X.ya(e.Q.j(),i,o);else{var u=K(n);if(".priority"==u)O(1==le(n),"Can't have a priority with additional path components"),o=s.j(),a=e.w().j(),i=i.nd(n,o,a),o=null!=i?t.X.ia(o,i):s.j();else{var h=N(n);Wb(s,u)?(a=e.w().j(),i=i.nd(n,s.j(),a),i=null!=i?s.j().T(u).H(h,i):s.j().T(u)):i=i.Bc(u,e.w()),o=null!=i?t.X.H(s.j(),u,i,h,r,o):s.j()}}return ge(e,o,s.ga||n.e(),t.X.Ra())}function ae(t,e,n,i,r,o,s,a){var u=e.w();if(s=s?t.X:t.X.$b(),n.e())i=s.ya(u.j(),i,null);else if(s.Ra()&&!u.Yb)i=u.j().H(n,i),i=s.ya(u.j(),i,null);else{var h=K(n);if(!nc(u,n)&&1o.status){try{e=Rb(o.responseText)}catch(n){S("Failed to parse JSON response for "+r+": "+o.responseText)}i(null,e)}else 401!==o.status&&404!==o.status&&S("Got unsuccessful REST response for "+r+" Status: "+o.status),i(o.status);i=null}},o.open("GET",r,!0),o.send()}function ff(t){O(da(t)&&0=t.u.length?null:t.u[t.aa]}function le(t){return t.u.length-t.aa}function N(t){var e=t.aa;return e10485760/3&&10485760=t}else if(-1=t;return!1}function Gg(){var t,e=window.opener.frames;for(t=e.length-1;0<=t;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(n){}return null}function Hg(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener&&t.addEventListener(e,n,!1)}function Ig(t,e,n){t.detachEvent?t.detachEvent("on"+e,n):t.removeEventListener&&t.removeEventListener(e,n,!1)}function Jg(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(t);return e?e[1]:t}function Kg(t){var e="";try{t=t.replace(/.*\?/,"");var n=Jb(t);n&&y(n,"__firebase_request_key")&&(e=z(n,"__firebase_request_key"))}catch(i){}return e}function Lg(){try{var t=document.location.hash.replace(/&__firebase_request_key=([a-zA-z0-9]*)/,""),t=t.replace(/\?$/,""),t=t.replace(/^#+$/,"");document.location.hash=t}catch(e){}}function Mg(){var t=sd(xg);return t.scheme+"://"+t.host+"/v2"}function Ng(t){return Mg()+"/"+t+"/auth/channel"}function Og(t){var e=this;if(this.hb=t,this.fe="*",Fg(8)?this.Uc=this.Cd=Gg():(this.Uc=window.opener,this.Cd=window),!e.Uc)throw"Unable to find relay frame";Hg(this.Cd,"message",u(this.nc,this)),Hg(this.Cd,"message",u(this.Ff,this));try{Pg(this,{a:"ready"})}catch(n){Hg(this.Uc,"load",function(){Pg(e,{a:"ready"})})}Hg(window,"unload",u(this.Ng,this))}function Pg(t,e){e=G(e),Fg(8)?t.Uc.doPost(e,t.fe):t.Uc.postMessage(e,t.fe)}function Qg(t){this.tc=Fa()+Fa()+Fa(),this.Kf=t}function Sg(t){var e=Error(z(Rg,t),t);return e.code=t,e}function Tg(t){var e;(e=!t.window_features)||(e=Cg(),e=-1!==e.indexOf("Fennec/")||-1!==e.indexOf("Firefox/")&&-1!==e.indexOf("Android")),e&&(t.window_features=void 0),t.window_name||(t.window_name="_blank"),this.options=t}function Ug(t){t.method||(t.method="GET"),t.headers||(t.headers={}),t.headers.content_type||(t.headers.content_type="application/json"),t.headers.content_type=t.headers.content_type.toLowerCase(),this.options=t}function Vg(t){this.tc=Fa()+Fa()+Fa(),this.Kf=t}function Wg(t){t.callback_parameter||(t.callback_parameter="callback"),this.options=t,window.__firebase_auth_jsonp=window.__firebase_auth_jsonp||{}}function Xg(t,e,n){setTimeout(function(){try{var i=document.createElement("script");i.type="text/javascript",i.id=t,i.async=!0,i.src=e,i.onerror=function(){var e=document.getElementById(t);null!==e&&e.parentNode.removeChild(e),n&&n(Sg("NETWORK_ERROR"))};var r=document.getElementsByTagName("head");(r&&0!=r.length?r[0]:document.documentElement).appendChild(i)}catch(o){n&&n(Sg("NETWORK_ERROR"))}},0)}function Yg(t,e,n,i){ff.call(this,["auth_status"]),this.G=t,this.hf=e,this.ih=n,this.Pe=i,this.wc=new Bg(t,[bd,cd]),this.qb=null,this.We=!1,Zg(this)}function Zg(t){cd.get("redirect_request_id")&&$g(t);var e=t.wc.get();e&&e.token?(ah(t,e),t.hf(e.token,function(n,i){bh(t,n,i,!1,e.token,e)},function(e,n){ch(t,"resumeSession()",e,n)})):ah(t,null)}function dh(t,e,n,i,r,o){"firebaseio-demo.com"===t.G.domain&&S("Firebase authentication is not supported on demo Firebases (*.firebaseio-demo.com). To secure your Firebase, create a production Firebase at https://www.firebase.com."),t.hf(e,function(o,s){bh(t,o,s,!0,e,n,i||{},r)},function(e,n){ch(t,"auth()",e,n,o)})}function eh(t,e){t.wc.clear(),ah(t,null),t.ih(function(t,n){if("ok"===t)T(e,null);else{var i=(t||"error").toUpperCase(),r=i;n&&(r+=": "+n),r=Error(r),r.code=i,T(e,r)}})}function bh(t,e,n,i,r,o,s,a){"ok"===e?(i&&(e=n.auth,o.auth=e,o.expires=n.expires,o.token=Ed(r)?r:"",n=null,e&&y(e,"uid")?n=z(e,"uid"):y(o,"uid")&&(n=z(o,"uid")),o.uid=n,n="custom",e&&y(e,"provider")?n=z(e,"provider"):y(o,"provider")&&(n=z(o,"provider")),o.provider=n,t.wc.clear(),Ed(r)&&(s=s||{},n=bd,"sessionOnly"===s.remember&&(n=cd),"none"!==s.remember&&t.wc.set(o,n)),ah(t,o)),T(a,null,o)):(t.wc.clear(),ah(t,null),o=t=(e||"error").toUpperCase(),n&&(o+=": "+n),o=Error(o),o.code=t,T(a,o))}function ch(t,e,n,i,r){S(e+" was canceled: "+i),t.wc.clear(),ah(t,null),t=Error(i),t.code=n.toUpperCase(),T(r,t)}function fh(t,e,n,i,r){gh(t),n=new yg(i||{},{},n||{}),hh(t,[Ug,Wg],"/auth/"+e,n,r)}function ih(t,e,n,i){gh(t);var r=[Tg,Vg];n=Ag(n);var o=625;"anonymous"===e||"password"===e?setTimeout(function(){T(i,Sg("TRANSPORT_UNAVAILABLE"))},0):("github"===e&&(o=1025),n.he.window_features="menubar=yes,modal=yes,alwaysRaised=yeslocation=yes,resizable=yes,scrollbars=yes,status=yes,height=625,width="+o+",top="+("object"==typeof screen?.5*(screen.height-625):0)+",left="+("object"==typeof screen?.5*(screen.width-o):0),n.he.relay_url=Ng(t.G.lc),n.he.requestWithCredential=u(t.uc,t),hh(t,r,"/auth/"+e,n,i))}function $g(t){var e=cd.get("redirect_request_id");if(e){var n=cd.get("redirect_client_options");cd.remove("redirect_request_id"),cd.remove("redirect_client_options");var i=[Ug,Wg],e={requestId:e,requestKey:Kg(document.location.hash)},n=new yg(n,{},e);t.We=!0,Lg(),hh(t,i,"/auth/session",n,function(){this.We=!1}.bind(t))}}function hh(t,e,n,i,r){jh(t,e,n,i,function(e,n){!e&&n&&n.token&&n.uid?dh(t,n.token,n,i.qd,function(t,e){t?T(r,t):T(r,null,e)}):T(r,e||Sg("UNKNOWN_ERROR"))})}function jh(t,e,n,i,r){e=Na(e,function(t){return"function"==typeof t.isAvailable&&t.isAvailable()}),0===e.length?setTimeout(function(){T(r,Sg("TRANSPORT_UNAVAILABLE"))},0):(e=new(e.shift())(i.he),i=Gb(i.fb),i.v="js-"+Eb,i.transport=e.Fc(),i.suppress_status_codes=!0,t=Mg()+"/"+t.G.lc+n,e.open(t,i,function(t,e){if(t)T(r,t);else if(e&&e.error){var n=Error(e.error.message);n.code=e.error.code,n.details=e.error.details,T(r,n)}else T(r,null,e)}))}function ah(t,e){var n=null!==t.qb||null!==e;t.qb=e,n&&t.ie("auth_status",e),t.Pe(null!==e)}function gh(t){var e=t.G;if("firebaseio.com"!==e.domain&&"firebaseio-demo.com"!==e.domain&&"auth.firebase.com"===xg)throw Error("This custom Firebase server ('"+t.G.domain+"') does not support delegated login.")}function kh(t){this.nc=t,this.Qd=[],this.Wb=0,this.te=-1,this.Jb=null}function lh(t,e,n){t.te=e,t.Jb=n,t.tedocument.domain="'+document.domain+'";'),t=""+t+"";try{this.Ga.jb.open(),this.Ga.jb.write(t),this.Ga.jb.close()}catch(o){fc("frame writing exception"),o.stack&&fc(o.stack),fc(o)}}function th(t){if(t.oe&&t.$d&&t.Te.count()<(0=t.cd[0].of.length+30+n.length;){var r=t.cd.shift(),n=n+"&seg"+i+"="+r.Yg+"&ts"+i+"="+r.hh+"&d"+i+"="+r.of;i++}return uh(t,e+n,t.we),!0}return!1}function uh(t,e,n){function i(){t.Te.remove(n),th(t)}t.Te.add(n,1);var r=setTimeout(i,Math.floor(25e3));sh(t,e,function(){clearTimeout(r),i()})}function sh(t,e,n){setTimeout(function(){try{if(t.$d){var i=t.Ga.jb.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){fc("Long-poll script failed to load: "+e),t.$d=!1,t.close()},t.Ga.jb.body.appendChild(i)}}catch(r){}},Math.floor(1))}function wh(t,e,n,i){this.ue=t,this.f=pd(this.ue),this.frames=this.Nc=null,this.rb=this.sb=this.ff=0,this.Xa=uc(e),t={v:"5"},"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f"),n&&(t.s=n),i&&(t.ls=i),this.jf=fd(e,gd,t)}function zh(t,e){if(t.frames.push(e),t.frames.length==t.ff){var n=t.frames.join("");t.frames=null,n=Rb(n),t.Lg(n)}}function yh(t){clearInterval(t.Nc),t.Nc=setInterval(function(){t.La&&Ah(t,"0"),yh(t)},Math.floor(45e3))}function Ah(t,e){try{t.La.send(e)}catch(n){t.f("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(u(t.bb,t),0)}}function Bh(t){Ch(this,t)}function Ch(t,e){var n=wh&&wh.isAvailable(),i=n&&!(bd.Af||!0===bd.get("previous_websocket_failure"));if(e.jh&&(n||S("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),i=!0),i)t.jd=[wh];else{var r=t.jd=[];zd(Dh,function(t,e){e&&e.isAvailable()&&r.push(e)})}}function Eh(t){if(0=t.Tf?(t.f("Secondary connection is healthy."),t.Eb=!0,t.F.Hd(),t.F.start(),t.f("sending client ack on secondary"),t.F.send({t:"c",d:{t:"a",d:{}}}),t.f("Ending transmission on primary"),t.K.send({t:"c",d:{t:"n",d:{}}}),t.kd=t.F,Lh(t)):(t.f("sending ping on secondary."),t.F.send({t:"c",d:{t:"p",d:{}}}))}function Nh(t){t.Eb||(t.Ve--,0>=t.Ve&&(t.f("Primary connection is healthy."),t.Eb=!0,t.K.Hd()))}function Kh(t,e){t.F=new e("c:"+t.id+":"+t.kf++,t.G,t.Uf),t.Tf=e.responsesRequiredToBeHealthy||0,t.F.open(Hh(t,t.F),Ih(t,t.F)),setTimeout(function(){t.F&&(t.f("Timed out trying to upgrade."),t.F.close())},Math.floor(6e4))}function Jh(t,e,n){t.f("Realtime connection established."),t.K=e,t.N=1,t.Zc&&(t.Zc(n,t.Uf),t.Zc=null),0===t.Ve?(t.f("Primary connection is healthy."),t.Eb=!0):setTimeout(function(){Oh(t)},Math.floor(5e3))}function Oh(t){t.Eb||1!==t.N||(t.f("sending ping on primary."),Qh(t,{t:"c",d:{t:"p",d:{}}}))}function Qh(t,e){if(1!==t.N)throw"Connection is not connected";t.kd.send(e)}function Mh(t){t.f("Shutting down all connections"),t.K&&(t.K.close(),t.K=null),t.F&&(t.F.close(),t.F=null),t.Bd&&(clearTimeout(t.Bd),t.Bd=null)}function Rh(t,e,n,i){this.id=Sh++,this.f=pd("p:"+this.id+":"),this.Bf=this.Ie=!1,this.ba={},this.sa=[],this.ad=0,this.Yc=[],this.qa=!1,this.eb=1e3,this.Id=3e5,this.Kb=e,this.Xc=n,this.Se=i,this.G=t,this.wb=this.Ca=this.Ma=this.Fb=this.$e=null,this.Sb=!1,this.Wd={},this.Xg=0,this.rf=!0,this.Oc=this.Ke=null,Th(this,0),kf.yb().Ib("visible",this.Og,this),-1===t.host.indexOf("fblocal")&&jf.yb().Ib("online",this.Mg,this)}function Vh(t,e){var n=e.Ug,i=n.path.toString(),r=n.wa();t.f("Listen on "+i+" for "+r);var o={p:i};e.tag&&(o.q=Ge(n.n),o.t=e.tag),o.h=e.Ad(),t.Ia("q",o,function(o){var s=o.d,a=o.s;if(s&&"object"==typeof s&&y(s,"w")){var u=z(s,"w");da(u)&&0<=La(u,"no_index")&&S("Using an unspecified index. Consider adding "+('".indexOn": "'+n.n.g.toString()+'"')+" at "+n.path.toString()+" to your security rules for better performance")}(t.ba[i]&&t.ba[i][r])===e&&(t.f("listen response",o),"ok"!==a&&Wh(t,i,r),e.I&&e.I(a,s))})}function Xh(t){var e=t.Ca;t.qa&&e&&t.Ia("auth",{cred:e.rg},function(n){var i=n.s;n=n.d||"error","ok"!==i&&t.Ca===e&&(t.Ca=null),e.sf?"ok"!==i&&e.od&&e.od(i,n):(e.sf=!0,e.Dc&&e.Dc(i,n))})}function Yh(t,e,n,i,r){n={p:n,d:i},t.f("onDisconnect "+e,n),t.Ia(e,n,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})}function Zh(t,e,n,i,r,o){i={p:n,d:i},p(o)&&(i.h=o),t.sa.push({action:e,Pf:i,I:r}),t.ad++,e=t.sa.length-1,t.qa?$h(t,e):t.f("Buffering put: "+n)}function $h(t,e){var n=t.sa[e].action,i=t.sa[e].Pf,r=t.sa[e].I;t.sa[e].Vg=t.qa,t.Ia(n,i,function(i){t.f(n+" response",i),delete t.sa[e],t.ad--,0===t.ad&&(t.sa=[]),r&&r(i.s,i.d)})}function Th(t,e){O(!t.Ma,"Scheduling a connect when we're already connected/ing?"),t.wb&&clearTimeout(t.wb),t.wb=setTimeout(function(){t.wb=null,ci(t)},Math.floor(e))}function ci(t){if(di(t)){t.f("Making a connection attempt"),t.Ke=(new Date).getTime(),t.Oc=null;var e=u(t.Ld,t),n=u(t.Zc,t),i=u(t.If,t),r=t.id+":"+Uh++;t.Ma=new Fh(r,t.G,e,n,i,function(e){S(e+" ("+t.G.toString()+")"),t.Bf=!0},t.Fb)}}function ai(t,e,n){n=n?Oa(n,function(t){return xd(t)}).join("$"):"default",(t=Wh(t,e,n))&&t.I&&t.I("permission_denied")}function Wh(t,e,n){e=new P(e).toString();var i;return p(t.ba[e])?(i=t.ba[e][n],delete t.ba[e][n],0===oa(t.ba[e])&&delete t.ba[e]):i=void 0,i}function bi(t){Xh(t),v(t.ba,function(e){v(e,function(e){Vh(t,e)})});for(var e=0;eo.Pc,"Stacking an older write on top of newer ones"),p(s)||(s=!0),o.pa.push({path:e,Ja:n,md:i,visible:s}),s&&(o.V=Jf(o.V,e,n)),o.Pc=i,r?qi(t,new Ac(Ef,e,n)):[]}function ri(t,e,n,i){var r=t.mb;return O(i>r.Pc,"Stacking an older merge on top of newer ones"),r.pa.push({path:e,children:n,md:i,visible:!0}),r.V=Kf(r.V,e,n),r.Pc=i,n=sf(n),qi(t,new bf(Ef,e,n))}function si(t,e,n){n=n||!1;var i=Qf(t.mb,e);if(t.mb.Ud(e)){var r=qe;return null!=i.Ja?r=r.set(M,!0):Fb(i.children,function(t,e){r=r.set(new P(t),e)}),qi(t,new Df(i.path,r,n))}return[]}function ti(t,e,n){return n=sf(n),qi(t,new bf(Gf,e,n))}function ui(t,e,n,i){if(i=vi(t,i),null!=i){var r=wi(i);return i=r.path,r=r.Lb,e=lf(i,e),n=new Ac(new Ff((!1),(!0),r,(!0)),e,n),xi(t,i,n)}return[]}function yi(t,e,n,i){if(i=vi(t,i)){var r=wi(i);return i=r.path,r=r.Lb,e=lf(i,e),n=sf(n),n=new bf(new Ff((!1),(!0),r,(!0)),e,n),xi(t,i,n)}return[]}function Ci(t){return vf(t,function(t,e,n){if(e&&null!=li(e))return[li(e)];var i=[];return e&&(i=mi(e)),v(n,function(t){i=i.concat(t)}),i})}function Gi(t,e){for(var n=0;n.firebaseio.com instead"),n&&"undefined"!=n||rd("Cannot parse Firebase url. Please use https://.firebaseio.com"),i.ob||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."),n=new dd(i.host,i.ob,n,"ws"===i.scheme||"wss"===i.scheme),i=new P(i.bd),r=i.toString();var o;if(!(o=!q(n.host)||0===n.host.length||!eg(n.lc))&&(o=0!==r.length)&&(r&&(r=r.replace(/^\/*\.info(\/|$)/,"/")),o=!(q(r)&&0!==r.length&&!cg.test(r))),o)throw Error(E("new Firebase",1,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');if(e)if(e instanceof aj)r=e;else{if(!q(e))throw Error("Expected a valid Firebase.Context for second argument to new Firebase()");r=aj.yb(),n.Rd=e}else r=aj.yb();o=n.toString();var s=z(r.sc,o);s||(s=new Ji(n,r.ag),r.sc[o]=s),n=s}Y.call(this,n,i,De,!1),this.then=void 0,this["catch"]=void 0}var h,n=this,ja=Date.now||function(){return+new Date};ka(la,Error),la.prototype.name="CustomError";var xa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("ï¿¿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,w;t:{var Ga=n.navigator;if(Ga){var Ha=Ga.userAgent;if(Ha){w=Ha;break t}}w=""}ka(Ja,Ia),Ja.prototype.reset=function(){this.P[0]=1732584193,this.P[1]=4023233417,this.P[2]=2562383102,this.P[3]=271733878,this.P[4]=3285377520,this.ge=this.ec=0},Ja.prototype.update=function(t,e){if(null!=t){p(e)||(e=t.length);for(var n=e-this.Ya,i=0,r=this.pe,o=this.ec;in?Math.max(0,t.length+n):n,q(t))return q(e)&&1==e.length?t.indexOf(e,n):-1;for(;nparseFloat(e))?String(t):e)}();var kb=null,lb=null,mb=null,qb=0,tb=2,vb=3;pb.prototype.then=function(t,e,n){return wb(this,r(t)?t:null,r(e)?e:null,n)},pb.prototype.then=pb.prototype.then,pb.prototype.$goog_Thenable=!0,h=pb.prototype,h.gh=function(t,e){return wb(this,null,t,e)},h.cancel=function(t){this.N==qb&&$a(function(){var e=new ub(t);xb(this,e)},this)},h.Yf=function(t){this.N=qb,sb(this,tb,t)},h.Zf=function(t){this.N=qb,sb(this,vb,t)},h.wg=function(){for(;this.Ba&&this.Ba.length;){var t=this.Ba;this.Ba=null;for(var e=0;ee?n=n.left:0i?r.$(null,null,null,r.left.Sa(t,e,n),null):0===i?r.$(null,e,null,null,null):r.$(null,null,null,null,r.right.Sa(t,e,n)),Mc(r)},h.remove=function(t,e){var n,i;if(n=this,0>e(t,n.key))n.left.e()||n.left.ha()||n.left.left.ha()||(n=Oc(n)),n=n.$(null,null,null,n.left.remove(t,e),null);else{if(n.left.ha()&&(n=Pc(n)),n.right.e()||n.right.ha()||n.right.left.ha()||(n=Qc(n),n.left.left.ha()&&(n=Pc(n),n=Qc(n))),0===e(t,n.key)){if(n.right.e())return Fc;i=Lc(n.right),n=n.$(i.key,i.value,null,null,Nc(n.right))}n=n.$(null,null,null,null,n.right.remove(t,e))}return Mc(n)},h.ha=function(){return this.color},h=Sc.prototype,h.$=function(){return this},h.Sa=function(t,e){return new Kc(t,e,null)},h.remove=function(){return this},h.count=function(){return 0},h.e=function(){return!0},h.ka=function(){return!1},h.Vc=function(){return null},h.jc=function(){return null},h.ha=function(){return!1};var Fc=new Sc;Zc.prototype.set=function(t,e){null==e?delete this.Ac[t]:this.Ac[t]=e},Zc.prototype.get=function(t){return y(this.Ac,t)?this.Ac[t]:null},Zc.prototype.remove=function(t){delete this.Ac[t]},Zc.prototype.Af=!0,h=$c.prototype,h.set=function(t,e){null==e?this.Ic.removeItem(this.Sd+t):this.Ic.setItem(this.Sd+t,G(e))},h.get=function(t){return t=this.Ic.getItem(this.Sd+t),null==t?null:Rb(t)},h.remove=function(t){this.Ic.removeItem(this.Sd+t)},h.Af=!1,h.toString=function(){return this.Ic.toString()};var bd=ad("localStorage"),cd=ad("sessionStorage");dd.prototype.toString=function(){var t=(this.ob?"https://":"http://")+this.host;return this.Rd&&(t+="<"+this.Rd+">"),t};var id=function(){var t=1;return function(){return t++}}(),O=Kb,jd=Lb,ec=null,nd=!0,Bd=/^-?\d{1,10}$/;Fd.prototype.qg=function(t,e){if(null==t.Za||null==e.Za)throw jd("Should only compare child_ events.");return this.g.compare(new L(t.Za,t.Na),new L(e.Za,e.Na))},h=Ld.prototype,h.H=function(t,e,n,i,r,o){return O(t.Mc(this.g),"A node must be indexed if only a child is updated"),r=t.T(e),r.S(i).ea(n.S(i))&&r.e()==n.e()?t:(null!=o&&(n.e()?t.Fa(e)?Kd(o,new J("child_removed",r,e)):O(t.L(),"A child remove without an old child only makes sense on a leaf node"):r.e()?Kd(o,new J("child_added",n,e)):Kd(o,new J("child_changed",n,e,r))),t.L()&&n.e()?t:t.W(e,n).pb(this.g))},h.ya=function(t,e,n){return null!=n&&(t.L()||t.R(R,function(t,i){e.Fa(t)||Kd(n,new J("child_removed",i,t))}),e.L()||e.R(R,function(e,i){if(t.Fa(e)){var r=t.T(e);r.ea(i)||Kd(n,new J("child_changed",i,e,r))}else Kd(n,new J("child_added",i,e))})),e.pb(this.g)},h.ia=function(t,e){return t.e()?H:t.ia(e)},h.Ra=function(){return!1},h.$b=function(){return this},h=Md.prototype,h.matches=function(t){return 0>=this.g.compare(this.gd,t)&&0>=this.g.compare(t,this.Jc)},h.H=function(t,e,n,i,r,o){return this.matches(new L(e,n))||(n=H),this.Fe.H(t,e,n,i,r,o)},h.ya=function(t,e,n){e.L()&&(e=H);var i=e.pb(this.g),i=i.ia(H),r=this;return e.R(R,function(t,e){r.matches(new L(t,e))||(i=i.W(t,H))}),this.Fe.ya(t,i,n)},h.ia=function(t){return t},h.Ra=function(){return!0},h.$b=function(){return this.Fe},h=Sd.prototype,h.H=function(t,e,n,i,r,o){return this.ua.matches(new L(e,n))||(n=H),t.T(e).ea(n)?t:t.Hb()=this.g.compare(this.ua.gd,s):0>=this.g.compare(s,this.ua.Jc)))break;i=i.W(s.name,s.U),r++}}else{i=e.pb(this.g),i=i.ia(H);var a,u,h;if(this.Nb){e=i.xf(this.g),a=this.ua.Jc,u=this.ua.gd;var c=Vd(this.g);h=function(t,e){return c(e,t)}}else e=i.ac(this.g),a=this.ua.gd,u=this.ua.Jc,h=Vd(this.g);for(var r=0,l=!1;0=h(a,s)&&(l=!0),(o=l&&r=h(s,u))?r++:i=i.W(s.name,H)}return this.ua.$b().ya(t,i,n)},h.ia=function(t){return t},h.Ra=function(){return!0},h.$b=function(){return this.ua.$b()},Zd.prototype.gb=function(t,e,n,i){var r,o=new Jd;if(e.type===Bc)e.source.Ae?n=$d(this,t,e.path,e.Ja,n,i,o):(O(e.source.tf,"Unknown source."),r=e.source.ef||mc(t.w())&&!e.path.e(),n=ae(this,t,e.path,e.Ja,n,i,r,o));else if(e.type===be)e.source.Ae?n=ce(this,t,e.path,e.children,n,i,o):(O(e.source.tf,"Unknown source."),r=e.source.ef||mc(t.w()),n=de(this,t,e.path,e.children,n,i,r,o));else if(e.type===ee)if(e.Yd)if(e=e.path,null!=n.xc(e))n=t;else{if(r=new Vb(n,t,i),i=t.Q.j(),e.e()||".priority"===K(e))lc(t.w())?e=n.Aa(Yb(t)):(e=t.w().j(),O(e instanceof fe,"serverChildren would be complete if leaf node"),e=n.Cc(e)),e=this.X.ya(i,e,o);else{var s=K(e),a=n.Bc(s,t.w());null==a&&Wb(t.w(),s)&&(a=i.T(s)),e=null!=a?this.X.H(i,s,a,N(e),r,o):t.Q.j().Fa(s)?this.X.H(i,s,H,N(e),r,o):i,e.e()&&lc(t.w())&&(i=n.Aa(Yb(t)),i.L()&&(e=this.X.ya(e,i,o)))}i=lc(t.w())||null!=n.xc(M),n=ge(t,e,i,this.X.Ra())}else n=he(this,t,e.path,e.Ub,n,i,o);else{if(e.type!==Dc)throw jd("Unknown operation type: "+e.type);i=e.path,e=t.w(),r=e.j(),s=e.ga||i.e(),n=ie(this,new je(t.Q,new Xb(r,s,e.Yb)),i,n,Ub,o)}return o=qa(o.ib),i=n,e=i.Q,e.ga&&(r=e.j().L()||e.j().e(),s=ke(t),(0e.compare(i,t);)Ic(n),i=Jc(n);return n},h.xf=function(t){return this.dc(t.Tc(),t)},h.dc=function(t,e){var n=Te(this,e);if(n)return n.dc(t,function(t){return t});for(var n=this.m.dc(t.name,wc),i=Jc(n);null!=i&&0o;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return O(20===n.length,"nextPushId: Length should be 20."),n}}();ka(jf,ff),jf.prototype.Ee=function(t){return O("online"===t,"Unknown event type: "+t),[this.oc]},ba(jf),ka(kf,ff),kf.prototype.Ee=function(t){return O("visible"===t,"Unknown event type: "+t),[this.Sb]},ba(kf),h=P.prototype,h.toString=function(){for(var t="",e=this.aa;e=this.u.length)return null;for(var t=[],e=this.aa;e=this.u.length},h.ea=function(t){if(le(this)!==le(t))return!1;for(var e=this.aa,n=t.aa;e<=this.u.length;e++,n++)if(this.u[e]!==t.u[n])return!1;return!0},h.contains=function(t){var e=this.aa,n=t.aa;if(le(this)>le(t))return!1;for(;e=e&&Rf(s,n.path)?i=!1:n.path.contains(s.path)&&(r=!0)),o--}if(i){if(r)this.V=Sf(this.pa,Tf,M),this.Pc=0o.status){try{t=Rb(o.responseText)}catch(e){}n(null,t)}else n(500<=o.status&&600>o.status?Sg("SERVER_ERROR"):Sg("NETWORK_ERROR"));n=null,Ig(window,"beforeunload",i)}},"GET"===s)t+=(/\?/.test(t)?"":"?")+Ib(e),r=null;else{var a=this.options.headers.content_type;"application/json"===a&&(r=G(e)),"application/x-www-form-urlencoded"===a&&(r=Ib(e))}o.open(s,t,!0),t={"X-Requested-With":"XMLHttpRequest",Accept:"application/json;text/plain"},ya(t,this.options.headers);for(var u in t)o.setRequestHeader(u,t[u]);o.send(r)},Ug.isAvailable=function(){var t;return(t=!!window.XMLHttpRequest)&&(t=Cg(),t=!(t.match(/MSIE/)||t.match(/Trident/))||Fg(10)),t},Ug.prototype.Fc=function(){return"json"},Vg.prototype.open=function(t,e,n){function i(){n&&(n(Sg("USER_CANCELLED")),n=null)}var o,s=this,a=sd(xg);e.requestId=this.tc,e.redirectTo=a.scheme+"://"+a.host+"/blank/page.html",t+=/\?/.test(t)?"":"?",t+=Ib(e),(o=window.open(t,"_blank","location=no"))&&r(o.addEventListener)?(o.addEventListener("loadstart",function(t){var e;if(e=t&&t.url)t:{try{var r=document.createElement("a");r.href=t.url,e=r.host===a.host&&"/blank/page.html"===r.pathname;break t}catch(u){}e=!1}e&&(t=Kg(t.url),o.removeEventListener("exit",i),o.close(),t=new yg(null,null,{requestId:s.tc,requestKey:t}),s.Kf.requestWithCredential("/auth/session",t,n),n=null)}),o.addEventListener("exit",i)):n(Sg("TRANSPORT_UNAVAILABLE"))},Vg.isAvailable=function(){return Dg()},Vg.prototype.Fc=function(){return"redirect"},Wg.prototype.open=function(t,e,n){function i(){n&&(n(Sg("REQUEST_INTERRUPTED")),n=null)}function r(){setTimeout(function(){window.__firebase_auth_jsonp[o]=void 0,va(window.__firebase_auth_jsonp)&&(window.__firebase_auth_jsonp=void 0);try{var t=document.getElementById(o);t&&t.parentNode.removeChild(t)}catch(e){}},1),Ig(window,"beforeunload",i)}var o="fn"+(new Date).getTime()+Math.floor(99999*Math.random());e[this.options.callback_parameter]="__firebase_auth_jsonp."+o,t+=(/\?/.test(t)?"":"?")+Ib(e),Hg(window,"beforeunload",i),window.__firebase_auth_jsonp[o]=function(t){n&&(n(null,t),n=null),r()},Xg(o,t,n)},Wg.isAvailable=function(){return"undefined"!=typeof document&&null!=document.createElement},Wg.prototype.Fc=function(){return"json"},ka(Yg,ff),h=Yg.prototype,h.Be=function(){return this.qb||null},h.ve=function(t,e){gh(this);var n=Ag(t);n.fb._method="POST",this.uc("/users",n,function(t,n){t?T(e,t):T(e,t,n)})},h.Xe=function(t,e){var n=this;gh(this);var i="/users/"+encodeURIComponent(t.email),r=Ag(t);r.fb._method="DELETE",this.uc(i,r,function(t,i){!t&&i&&i.uid&&n.qb&&n.qb.uid&&n.qb.uid===i.uid&&eh(n),T(e,t)})},h.se=function(t,e){gh(this);var n="/users/"+encodeURIComponent(t.email)+"/password",i=Ag(t);i.fb._method="PUT",i.fb.password=t.newPassword,this.uc(n,i,function(t){T(e,t)})},h.re=function(t,e){gh(this);var n="/users/"+encodeURIComponent(t.oldEmail)+"/email",i=Ag(t);i.fb._method="PUT",i.fb.email=t.newEmail,i.fb.password=t.password,this.uc(n,i,function(t){T(e,t)})},h.Ze=function(t,e){gh(this);var n="/users/"+encodeURIComponent(t.email)+"/password",i=Ag(t);i.fb._method="POST",this.uc(n,i,function(t){T(e,t)})},h.uc=function(t,e,n){jh(this,[Ug,Wg],t,e,n)},h.Ee=function(t){return O("auth_status"===t,'initial event must be of type "auth_status"'),this.We?null:[this.qb]};var gd="websocket",hd="long_polling",oh,ph;nh.prototype.open=function(t,e){this.mf=0,this.na=e,this.Ef=new kh(t),this.Db=!1;var n=this;this.ub=setTimeout(function(){n.f("Timed out trying to connect."),n.bb(),n.ub=null},Math.floor(3e4)),ud(function(){if(!n.Db){n.Wa=new qh(function(t,e,i,r,o){if(rh(n,arguments),n.Wa)if(n.ub&&(clearTimeout(n.ub),n.ub=null),n.Kc=!0,"start"==t)n.id=e,n.Mf=i;else{if("close"!==t)throw Error("Unrecognized command received: "+t);e?(n.Wa.$d=!1,lh(n.Ef,e,function(){n.bb()})):n.bb()}},function(t,e){rh(n,arguments),mh(n.Ef,t,e)},function(){n.bb()},n.ld);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.Wa.ke&&(t.cb=n.Wa.ke),t.v="5",n.Xf&&(t.s=n.Xf),n.Fb&&(t.ls=n.Fb),"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f"),t=n.ld(t),n.f("Connecting via long-poll to "+t),sh(n.Wa,t,function(){})}})},nh.prototype.start=function(){var t=this.Wa,e=this.Mf;for(t.Gg=this.id,t.Hg=e,t.oe=!0;th(t););t=this.id,e=this.Mf,this.kc=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.kc.src=this.ld(n),this.kc.style.display="none",document.body.appendChild(this.kc)},nh.isAvailable=function(){return oh||!ph&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.kh)&&!0},h=nh.prototype,h.Hd=function(){},h.fd=function(){this.Db=!0,this.Wa&&(this.Wa.close(),this.Wa=null),this.kc&&(document.body.removeChild(this.kc),this.kc=null),this.ub&&(clearTimeout(this.ub),this.ub=null)},h.bb=function(){this.Db||(this.f("Longpoll is closing itself"),this.fd(),this.na&&(this.na(this.Kc),this.na=null))},h.close=function(){this.Db||(this.f("Longpoll is being closed."),this.fd())},h.send=function(t){t=G(t),this.sb+=t.length,rc(this.Xa,"bytes_sent",t.length),t=Ob(t),t=nb(t,!0),t=yd(t,1840);for(var e=0;e=t.length){var e=Number(t);if(!isNaN(e)){r.ff=e,r.frames=[],t=null;break t}}r.ff=1,r.frames=[]}null!==t&&zh(r,t)}},this.La.onerror=function(t){r.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&r.f(t),r.bb()}},wh.prototype.start=function(){},wh.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!==vh&&!xh},wh.responsesRequiredToBeHealthy=2,wh.healthyTimeout=3e4,h=wh.prototype,h.Hd=function(){bd.remove("previous_websocket_failure")},h.send=function(t){yh(this),t=G(t),this.sb+=t.length,rc(this.Xa,"bytes_sent",t.length),t=yd(t,16384),1=t)throw Error("Query.limit: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limit: Limit was already set (by another call to limit, limitToFirst, orlimitToLast.");var e=this.n.Le(t);return cj(e),new Y(this.k,this.path,e,this.pc)},h.Me=function(t){if(D("Query.limitToFirst",1,1,arguments.length),!fa(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Me(t),this.pc)},h.Ne=function(t){if(D("Query.limitToLast",1,1,arguments.length),!fa(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Ne(t),this.pc)},h.Qg=function(t){if(D("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.');ng("Query.orderByChild",t),dj(this,"Query.orderByChild");var e=new P(t);if(e.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");return e=new ve(e),e=Fe(this.n,e),bj(e),new Y(this.k,this.path,e,(!0)); -},h.Rg=function(){D("Query.orderByKey",0,0,arguments.length),dj(this,"Query.orderByKey");var t=Fe(this.n,re);return bj(t),new Y(this.k,this.path,t,(!0))},h.Sg=function(){D("Query.orderByPriority",0,0,arguments.length),dj(this,"Query.orderByPriority");var t=Fe(this.n,R);return bj(t),new Y(this.k,this.path,t,(!0))},h.Tg=function(){D("Query.orderByValue",0,0,arguments.length),dj(this,"Query.orderByValue");var t=Fe(this.n,Be);return bj(t),new Y(this.k,this.path,t,(!0))},h.ce=function(t,e){D("Query.startAt",0,2,arguments.length),gg("Query.startAt",t,this.path,!0),mg("Query.startAt",e);var n=this.n.ce(t,e);if(cj(n),bj(n),this.n.oa)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return p(t)||(e=t=null),new Y(this.k,this.path,n,this.pc)},h.vd=function(t,e){D("Query.endAt",0,2,arguments.length),gg("Query.endAt",t,this.path,!0),mg("Query.endAt",e);var n=this.n.vd(t,e);if(cj(n),bj(n),this.n.ra)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new Y(this.k,this.path,n,this.pc)},h.tg=function(t,e){if(D("Query.equalTo",1,2,arguments.length),gg("Query.equalTo",t,this.path,!1),mg("Query.equalTo",e),this.n.oa)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.ra)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.ce(t,e).vd(t,e)},h.toString=function(){D("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.aa;n "},function(t,e){t.exports="
  • {{open ? '[-]' : '[+]'}} {{comment.by}} {{comment.time | fromNow}} ago

    {{{comment.text}}}

  • "},function(t,e){t.exports="
    {{index}}.

    {{{item.title}}} ({{item.url | domain}})

    {{item.score}} points by {{item.by}} {{item.time | fromNow}} ago | {{item.descendants}} {{item.descendants | pluralize 'comment'}}

    "},function(t,e){t.exports='

    • {{option.text}}

      {{option.score}} points

    No comments yet.

    '},function(t,e){t.exports=' '},function(t,e){t.exports="
    • user: {{user.id}}
    • created: {{user.created | fromNow}} ago
    • karma: {{user.karma}}
    • about:
      {{{user.about}}}
    "},function(t,e,n){var i,r;n(68),r=n(56),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){var i,r;n(69),i=n(17),r=n(57),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){var i,r;n(71),i=n(19),r=n(59),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){var i,r;n(72),i=n(20),r=n(60),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){var i,r;n(73),i=n(21),r=n(61),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),r&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=r)},function(t,e,n){/*! +!function(n,i){"object"==typeof e&&"undefined"!=typeof t?t.exports=i():"function"==typeof define&&define.amd?define(i):n.ES6Promise=i()}(this,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){Q=t}function i(t){G=t}function r(){return function(){return process.nextTick(c)}}function o(){return function(){q(c)}}function s(){var t=0,e=new z(c),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function a(){var t=new MessageChannel;return t.port1.onmessage=c,function(){return t.port2.postMessage(0)}}function u(){var t=setTimeout;return function(){return t(c,1)}}function c(){for(var t=0;t0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,r,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(module,exports,__webpack_require__){var firebase=__webpack_require__(16);/*! @license Firebase v3.6.0 + Build: 3.6.0-rc.3 + Terms: https://developers.google.com/terms + + --- + + typedarray.js + Copyright (c) 2010, Linden Research, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ +!function(){function n(t){return void 0!==t}function ba(){}function ca(t){t.Vb=function(){return t.Ye?t.Ye:t.Ye=new t}}function da(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e}function ea(t){return"array"==da(t)}function fa(t){var e=da(t);return"array"==e||"object"==e&&"number"==typeof t.length}function p(t){return"string"==typeof t}function ga(t){return"number"==typeof t}function ha(t){return"function"==da(t)}function ia(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function ja(t,e,n){return t.call.apply(t.bind,arguments)}function ka(t,e,n){if(!t)throw Error();if(2r;r++)i[r]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(r=0;16>r;r++)i[r]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(r=16;80>r;r++){var o=i[r-3]^i[r-8]^i[r-14]^i[r-16];i[r]=4294967295&(o<<1|o>>>31)}e=t.M[0],n=t.M[1];for(var s,a=t.M[2],u=t.M[3],c=t.M[4],r=0;80>r;r++)40>r?20>r?(o=u^n&(a^u),s=1518500249):(o=n^a^u,s=1859775393):60>r?(o=n&a|u&(n|a),s=2400959708):(o=n^a^u,s=3395469782),o=(e<<5|e>>>27)+o+c+s+i[r]&4294967295,c=u,u=a,a=4294967295&(n<<30|n>>>2),n=e,e=o;t.M[0]=t.M[0]+e&4294967295,t.M[1]=t.M[1]+n&4294967295,t.M[2]=t.M[2]+a&4294967295,t.M[3]=t.M[3]+u&4294967295,t.M[4]=t.M[4]+c&4294967295}function r(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function pa(t,e){var n,i={};for(n in t)i[n]=e.call(void 0,t[n],n,t);return i}function qa(t,e){for(var n in t)if(!e.call(void 0,t[n],n,t))return!1;return!0}function ra(t){var e,n=0;for(e in t)n++;return n}function sa(t){for(var e in t)return e}function ta(t){var e,n=[],i=0;for(e in t)n[i++]=t[e];return n}function ua(t){var e,n=[],i=0;for(e in t)n[i++]=e;return n}function va(t,e){for(var n in t)if(t[n]==e)return!0;return!1}function wa(t,e,n){for(var i in t)if(e.call(n,t[i],i,t))return i}function xa(t,e){var n=wa(t,e,void 0);return n&&t[n]}function ya(t){for(var e in t)return!1;return!0}function za(t){var e,n={};for(e in t)n[e]=t[e];return n}function Aa(a){if(a=String(a),/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(t){}throw Error("Invalid JSON string: "+a)}function Ba(){this.Dd=void 0}function Ca(t,e,n){switch(typeof e){case"string":Da(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?e:"null");break;case"boolean":n.push(e);break;case"undefined":n.push("null");break;case"object":if(null==e){n.push("null");break}if(ea(e)){var i=e.length;n.push("[");for(var r="",o=0;oe?n+="000":256>e?n+="00":4096>e&&(n+="0"),Ea[t]=n+e.toString(16)}),'"')}function Oa(t,e){var n=Pa(t,e,void 0);return 0>n?null:p(t)?t.charAt(n):t[n]}function Pa(t,e,n){for(var i=t.length,r=p(t)?t.split(""):t,o=0;o=arguments.length?v.slice.call(t,e):v.slice.call(t,e,n)}function Sa(t,e){t.sort(e||Ta)}function Ta(t,e){return t>e?1:t>2,o=(3&o)<<4|a>>4,a=(15&a)<<2|c>>6,c=63&c;u||(c=64,s||(a=64)),i.push(n[h],n[o],n[a],n[c])}return i.join("")}function bb(){if(!Ya){Ya={},Za={},$a={};for(var t=0;65>t;t++)Ya[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Za[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t),$a[Za[t]]=t,62<=t&&($a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)]=t)}}function cb(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function w(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function db(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function x(t,e,n,i){var r;if(in&&(r=0===n?"none":"no more than "+n),r)throw Error(t+" failed: Was called with "+i+(1===i?" argument.":" arguments.")+" Expects "+r+".")}function y(t,e,n){var i="";switch(e){case 1:i=n?"first":"First";break;case 2:i=n?"second":"Second";break;case 3:i=n?"third":"Third";break;case 4:i=n?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?")}return t=t+" failed: "+(i+" argument ")}function A(t,e,i,r){if((!r||n(i))&&!ha(i))throw Error(y(t,e,r)+"must be a valid function.")}function eb(t,e,i){if(n(i)&&(!ia(i)||null===i))throw Error(y(t,e,!0)+"must be a valid context object.")}function fb(t){var e=[];return db(t,function(t,n){ea(n)?Ja(n,function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""}function hb(){var t=this;this.reject=this.resolve=null,this.ra=new gb(function(e,n){t.resolve=e,t.reject=n})}function ib(t,e){return function(n,i){n?t.reject(n):t.resolve(i),ha(e)&&(jb(t.ra),1===e.length?e(n):e(n,i))}}function jb(t){t.then(void 0,ba)}function kb(t,e){if(!t)throw lb(e)}function lb(t){return Error("Firebase Database ("+firebase.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)}function mb(t){for(var e=[],n=0,i=0;i=r&&(r-=55296,i++,kb(ir?e[n++]=r:(2048>r?e[n++]=r>>6|192:(65536>r?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return e}function nb(t){for(var e=0,n=0;ni?e++:2048>i?e+=2:55296<=i&&56319>=i?(e+=4,n++):e+=3}return e}function ob(t){return"undefined"!=typeof JSON&&n(JSON.parse)?JSON.parse(t):Aa(t)}function B(t){if("undefined"!=typeof JSON&&n(JSON.stringify))t=JSON.stringify(t);else{var e=[];Ca(new Ba,t,e),t=e.join("")}return t}function pb(t,e){this.committed=t,this.snapshot=e}function qb(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test("undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"")}function rb(t){this.qe=t,this.zd=[],this.Qb=0,this.Wd=-1,this.Fb=null}function sb(t,e,n){t.Wd=e,t.Fb=n,t.Wd>4),64!=a&&(i.push(s<<4&240|a>>2),64!=u&&i.push(a<<6&192|u))}if(8192>i.length)e=String.fromCharCode.apply(null,i);else{for(t="",n=0;nt.$b?t.update(t.xd,56-t.$b):t.update(t.xd,t.Wa-(t.$b-56));for(var i=t.Wa-1;56<=i;i--)t.Ud[i]=255&n,n/=256;for(oa(t,t.Ud),i=n=0;5>i;i++)for(var r=24;0<=r;r-=8)e[n]=t.M[i]>>r&255,++n;return ab(e)}function vc(t){for(var e="",n=0;n.firebaseio.com instead"),n&&"undefined"!=n||Ac("Cannot parse Firebase url. Please use https://.firebaseio.com"),i||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&O("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."),{jc:new Hb(e,i,n,"ws"===r||"wss"===r),path:new L(o)}}function Cc(t){return ga(t)&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)}function Dc(t){if("complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}function hc(t,e){if(t===e)return 0;if("[MIN_NAME]"===t||"[MAX_NAME]"===e)return-1;if("[MIN_NAME]"===e||"[MAX_NAME]"===t)return 1;var n=Ec(t),i=Ec(e);return null!==n?null!==i?0==n-i?t.length-e.length:n-i:-1:null!==i?1:tt?n.push(t.substring(i,t.length)):n.push(t.substring(i,i+e));return n}function Ic(t,e){if(ea(t))for(var n=0;nt,t=Math.abs(t),t>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023),n=i+1023,i=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,i=Math.round(t/Math.pow(2,-1074)))),r=[],t=52;t;--t)r.push(i%2?1:0),i=Math.floor(i/2);for(t=11;t;--t)r.push(n%2?1:0),n=Math.floor(n/2);for(r.push(e?1:0),r.reverse(),e=r.join(""),n="",t=0;64>t;t+=8)i=parseInt(e.substr(t,8),2).toString(16),1===i.length&&(i="0"+i),n+=i;return n.toLowerCase()}function Ec(t){return Kc.test(t)&&(t=Number(t),-2147483648<=t&&2147483647>=t)?t:null}function ub(t){try{t()}catch(t){setTimeout(function(){throw O("Exception was thrown by user callback.",t.stack||""),t},Math.floor(0))}}function Lc(t,e,n){Object.defineProperty(t,e,{get:n})}function Mc(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n}function Nc(t){var e={},n={},i={},r="";try{var o=t.split("."),e=ob(tc(o[0])||""),n=ob(tc(o[1])||""),r=o[2],i=n.d||{};delete n.d}catch(t){}return{tg:e,Ie:n,data:i,mg:r}}function Oc(t){t=Nc(t);var e=t.Ie;return!!t.mg&&!!e&&"object"==typeof e&&e.hasOwnProperty("iat")}function Pc(t){return t=Nc(t).Ie,"object"==typeof t&&!0===w(t,"admin")}function Qc(t,e,n){this.f=yc("p:rest:"),this.L=t,this.Gb=e,this.Td=n,this.$={}}function Rc(t,e){return n(e)?"tag$"+e:(H(Sc(t.m),"should have a tag if it's not a default query."),t.path.toString())}function Uc(t,e,n,i){n=n||{},n.format="export",t.Td.getToken(!1).then(function(r){(r=r&&r.accessToken)&&(n.auth=r);var o=(t.L.Rc?"https://":"http://")+t.L.host+e+"?"+fb(n);t.f("Sending REST request for "+o);var s=new XMLHttpRequest;s.onreadystatechange=function(){if(i&&4===s.readyState){t.f("REST Response for "+o+" received. status:",s.status,"response:",s.responseText);var e=null;if(200<=s.status&&300>s.status){try{e=ob(s.responseText)}catch(t){O("Failed to parse JSON response for "+o+": "+s.responseText)}i(null,e)}else 401!==s.status&&404!==s.status&&O("Got unsuccessful REST response for "+o+" Status: "+s.status),i(s.status);i=null}},s.open("GET",o,!0),s.send()})}function Vc(t,e,n){this.type=Wc,this.source=t,this.path=e,this.children=n}function Xc(t,e){this.rf={},this.Uc=new Mb(t),this.va=e;var n=1e4+2e4*Math.random();Mc(q(this.lf,this),Math.floor(n))}function $c(t){return t=t.toString(),Yc[t]||(Yc[t]=new Kb),Yc[t]}function ad(t,e){var n=t.toString();return Zc[n]||(Zc[n]=e()),Zc[n]}function cd(t,e,n,i){this.Xd=t,this.f=yc(this.Xd),this.frames=this.yc=null,this.pb=this.qb=this.Ce=0,this.Va=$c(e),t={v:"5"},"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f"),n&&(t.s=n),i&&(t.ls=i),this.Je=Jb(e,"websocket",t)}function fd(t,e){if(t.frames.push(e),t.frames.length==t.Ce){var n=t.frames.join("");t.frames=null,n=ob(n),t.Xf(n)}}function ed(t){clearInterval(t.yc),t.yc=setInterval(function(){t.Ia&&gd(t,"0"),ed(t)},Math.floor(45e3))}function gd(t,e){try{t.Ia.send(e)}catch(e){t.f("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(q(t.bb,t),0)}}function hd(){this.fb={}}function jd(t,e){var n=e.type,i=e.Xa;H("child_added"==n||"child_changed"==n||"child_removed"==n,"Only child changes supported for tracking"),H(".priority"!==i,"Only non-priority child changes can be tracked.");var r=w(t.fb,i);if(r){var o=r.type;if("child_added"==n&&"child_removed"==o)t.fb[i]=new I("child_changed",e.Ja,i,r.Ja);else if("child_removed"==n&&"child_added"==o)delete t.fb[i];else if("child_removed"==n&&"child_changed"==o)t.fb[i]=new I("child_removed",r.ne,i);else if("child_changed"==n&&"child_added"==o)t.fb[i]=new I("child_added",e.Ja,i);else{if("child_changed"!=n||"child_changed"!=o)throw sc("Illegal combination of changes: "+e+" occurred after "+r);t.fb[i]=new I("child_changed",e.Ja,i,r.ne)}}else t.fb[i]=e}function kd(t){this.V=t,this.g=t.m.g}function ld(t,e,n,i){var r=[],o=[];return Ja(e,function(e){"child_changed"===e.type&&t.g.ld(e.ne,e.Ja)&&o.push(new I("child_moved",e.Ja,e.Xa))}),md(t,r,"child_removed",e,i,n),md(t,r,"child_added",e,i,n),md(t,r,"child_moved",o,i,n),md(t,r,"child_changed",e,i,n),md(t,r,cc,e,i,n),r}function md(t,e,n,i,r,o){i=Ka(i,function(t){return t.type===n}),Sa(i,q(t.Ff,t)),Ja(i,function(n){var i=nd(t,n,o);Ja(r,function(r){r.nf(n.type)&&e.push(r.createEvent(i,t.V))})})}function nd(t,e,n){return"value"!==e.type&&"child_removed"!==e.type&&(e.Bd=n.Ve(e.Xa,e.Ja,t.g)),e}function od(t,e){this.Qd=t,this.Df=e}function pd(t){this.U=t}function xd(t,e,n,i,r,o){var s=e.N;if(null!=i.lc(n))return e;var a;if(n.e())H(dc(e.w()),"If change path is empty, we must have complete server data"),ec(e.w())?(r=ac(e),i=i.qc(r instanceof P?r:G)):i=i.Aa(ac(e)),o=t.U.ya(e.N.j(),i,o);else{var u=J(n);if(".priority"==u)H(1==Ad(n),"Can't have a priority with additional path components"),o=s.j(),a=e.w().j(),i=i.Zc(n,o,a),o=null!=i?t.U.fa(o,i):s.j();else{var c=D(n);Zb(s,u)?(a=e.w().j(),i=i.Zc(n,s.j(),a),i=null!=i?s.j().Q(u).F(c,i):s.j().Q(u)):i=i.pc(u,e.w()),o=null!=i?t.U.F(s.j(),u,i,c,r,o):s.j()}}return vd(e,o,s.da||n.e(),t.U.Na())}function rd(t,e,n,i,r,o,s,a){var u=e.w();if(s=s?t.U:t.U.Ub(),n.e())i=s.ya(u.j(),i,null);else if(s.Na()&&!u.Sb)i=u.j().F(n,i),i=s.ya(u.j(),i,null);else{var c=J(n);if(!fc(u,n)&&1document.domain="'+document.domain+'";'),t=""+t+"";try{this.Ea.gb.open(),this.Ea.gb.write(t),this.Ea.gb.close()}catch(t){E("frame writing exception"),t.stack&&E(t.stack),E(t)}}function we(t){if(t.Sd&&t.Id&&t.se.count()<(0=t.Pc[0].Oe.length+30+n.length;){var r=t.Pc.shift(),n=n+"&seg"+i+"="+r.jg+"&ts"+i+"="+r.pg+"&d"+i+"="+r.Oe;i++}return xe(t,e+n,t.Yd),!0}return!1}function xe(t,e,n){function i(){t.se.remove(n),we(t)}t.se.add(n,1);var r=setTimeout(i,Math.floor(25e3));ve(t,e,function(){clearTimeout(r),i()})}function ve(t,e,n){setTimeout(function(){try{if(t.Id){var i=t.Ea.gb.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){E("Long-poll script failed to load: "+e),t.Id=!1,t.close()},t.Ea.gb.body.appendChild(i)}}catch(t){}},Math.floor(1))}function ye(t){ze(this,t)}function ze(t,e){var n=cd&&cd.isAvailable(),i=n&&!(yb.Ze||!0===yb.get("previous_websocket_failure"));if(e.qg&&(n||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),i=!0),i)t.Vc=[cd];else{var r=t.Vc=[];Ic(Ae,function(t,e){e&&e.isAvailable()&&r.push(e)})}}function Be(t){if(0=t.pf?(t.f("Secondary connection is healthy."),t.Bb=!0,t.D.qd(),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.Wc=t.D,Ie(t)):(t.f("sending ping on secondary."),t.D.send({t:"c",d:{t:"p",d:{}}}))}function Ke(t){t.Bb||(t.ue--,0>=t.ue&&(t.f("Primary connection is healthy."),t.Bb=!0,t.I.qd()))}function He(t,e){t.D=new e("c:"+t.id+":"+t.Ke++,t.L,t.qf),t.pf=e.responsesRequiredToBeHealthy||0,t.D.open(Ee(t,t.D),Fe(t,t.D)),Mc(function(){t.D&&(t.f("Timed out trying to upgrade."),t.D.close())},Math.floor(6e4))}function Ge(t,e,n){t.f("Realtime connection established."),t.I=e,t.Ua=1,t.Kc&&(t.Kc(n,t.qf),t.Kc=null),0===t.ue?(t.f("Primary connection is healthy."),t.Bb=!0):Mc(function(){Le(t)},Math.floor(5e3))}function Le(t){t.Bb||1!==t.Ua||(t.f("sending ping on primary."),Ne(t,{t:"c",d:{t:"p",d:{}}}))}function Ne(t,e){if(1!==t.Ua)throw"Connection is not connected";t.Wc.send(e)}function Je(t){t.f("Shutting down all connections"),t.I&&(t.I.close(),t.I=null),t.D&&(t.D.close(),t.D=null),t.kd&&(clearTimeout(t.kd),t.kd=null)}function L(t,e){if(1==arguments.length){this.o=t.split("/");for(var n=0,i=0;i=t.o.length?null:t.o[t.Y]}function Ad(t){return t.o.length-t.Y}function D(t){var e=t.Y;return e10485760/3&&10485760n?i=i.left:0r)t=this.ie?t.left:t.right;else{if(0===r){this.Pa.push(t);break}this.Pa.push(t),t=this.ie?t.right:t.left}}function R(t){if(0===t.Pa.length)return null;var e,n=t.Pa.pop();if(e=t.Fd?t.Fd(n.key,n.value):{key:n.key,value:n.value},t.ie)for(n=n.left;!n.e();)t.Pa.push(n),n=n.right;else for(n=n.right;!n.e();)t.Pa.push(n),n=n.left;return e}function zf(t){if(0===t.Pa.length)return null;var e;return e=t.Pa,e=e[e.length-1],t.Fd?t.Fd(e.key,e.value):{key:e.key,value:e.value}}function Af(t,e,n,i,r){this.key=t,this.value=e,this.color=null==n||n,this.left=null!=i?i:wf,this.right=null!=r?r:wf}function Bf(t){return t.left.e()?t:Bf(t.left)}function Df(t){return t.left.e()?wf:(t.left.ea()||t.left.left.ea()||(t=Ef(t)),t=t.X(null,null,null,Df(t.left),null),Cf(t))}function Cf(t){return t.right.ea()&&!t.left.ea()&&(t=Hf(t)),t.left.ea()&&t.left.left.ea()&&(t=Ff(t)),t.left.ea()&&t.right.ea()&&(t=Gf(t)),t}function Ef(t){return t=Gf(t),t.right.left.ea()&&(t=t.X(null,null,null,null,Ff(t.right)),t=Hf(t),t=Gf(t)),t}function Hf(t){return t.right.X(null,null,t.color,t.X(null,null,!0,null,t.right.left),null)}function Ff(t){return t.left.X(null,null,t.color,null,t.X(null,null,!0,t.left.right,null))}function Gf(t){return t.X(null,null,!t.color,t.left.X(null,null,!t.left.color,null,null),t.right.X(null,null,!t.right.color,null,null))}function If(){}function P(t,e,n){this.k=t,(this.aa=e)&&Sd(this.aa),t.e()&&H(!this.aa||this.aa.e(),"An empty node cannot have a priority"),this.yb=n,this.Db=null}function Qd(t,e){var n;return n=(n=Kf(t,e))?(n=n.Fc())&&n.name:t.k.Fc(),n?new K(n,t.k.get(n)):null}function Rd(t,e){var n;return n=(n=Kf(t,e))?(n=n.ec())&&n.name:t.k.ec(),n?new K(n,t.k.get(n)):null}function Kf(t,e){return e===Fd?null:t.yb.get(e.toString())}function M(t,e){if(null===t)return G;var n=null;if("object"==typeof t&&".priority"in t?n=t[".priority"]:"undefined"!=typeof e&&(n=e),H(null===n||"string"==typeof n||"number"==typeof n||"object"==typeof n&&".sv"in n,"Invalid priority type found: "+typeof n),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t)return new qc(t,M(n));if(t instanceof Array){var i=G,o=t;return r(o,function(t,e){if(cb(o,e)&&"."!==e.substring(0,1)){var n=M(t);!n.J()&&n.e()||(i=i.T(e,n))}}),i.fa(M(n))}var s=[],a=!1,u=t;if(db(u,function(t){if("string"!=typeof t||"."!==t.substring(0,1)){var e=M(u[t]);e.e()||(a=a||!e.C().e(),s.push(new K(t,e)))}}),0==s.length)return G;var c=le(s,gc,function(t){return t.name},ic);if(a){var h=le(s,Pd(N));return new P(c,M(n),new je({".priority":h},{".priority":N}))}return new P(c,M(n),ne)}function Mf(t){this.count=parseInt(Math.log(t+1)/Lf,10),this.Ne=this.count-1,this.Cf=t+1&parseInt(Array(this.count+1).join("1"),2)}function Nf(t){var e=!(t.Cf&1<s.Ac,"Stacking an older write on top of newer ones"),n(a)||(a=!0),s.la.push({path:e,Ga:i,Yc:r,visible:a}),a&&(s.S=sg(s.S,e,i)),s.Ac=r,o?fh(t,new Ab(ng,e,i)):[]}function gh(t,e,n,i){var r=t.jb;return H(i>r.Ac,"Stacking an older merge on top of newer ones"),r.la.push({path:e,children:n,Yc:i,visible:!0}),r.S=tg(r.S,e,n),r.Ac=i,n=bg(n),fh(t,new Vc(ng,e,n))}function hh(t,e,n){n=n||!1;var i=Dg(t.jb,e);if(t.jb.Cd(e)){var r=Q;return null!=i.Ga?r=r.set(C,!0):db(i.children,function(t,e){r=r.set(new L(t),e)}),fh(t,new mg(i.path,r,n))}return[]}function ih(t,e,n){return n=bg(n),fh(t,new Vc(pg,e,n))}function jh(t,e,n,i){if(i=kh(t,i),null!=i){var r=lh(i);return i=r.path,r=r.Hb,e=T(i,e),n=new Ab(new og(!1,!0,r,!0),e,n),mh(t,i,n)}return[]}function nh(t,e,n,i){if(i=kh(t,i)){var r=lh(i);return i=r.path,r=r.Hb,e=T(i,e),n=bg(n),n=new Vc(new og(!1,!0,r,!0),e,n),mh(t,i,n)}return[]}function rh(t){return eg(t,function(t,e,n){if(e&&null!=zg(e))return[zg(e)];var i=[];return e&&(i=Ag(e)),r(n,function(t){i=i.concat(t)}),i})}function vh(t,e){for(var n=0;nn?Math.max(0,t.length+n):n,p(t))return p(e)&&1==e.length?t.indexOf(e,n):-1;for(;nparseFloat(n))?String(e):n)}();var Ya=null,Za=null,$a=null,gb=firebase.Promise;vb.prototype.set=function(t,e){null==e?delete this.oc[t]:this.oc[t]=e},vb.prototype.get=function(t){return cb(this.oc,t)?this.oc[t]:null},vb.prototype.remove=function(t){delete this.oc[t]},vb.prototype.Ze=!0,g=wb.prototype,g.set=function(t,e){null==e?this.tc.removeItem(this.Ad+t):this.tc.setItem(this.Ad+t,B(e))},g.get=function(t){return t=this.tc.getItem(this.Ad+t),null==t?null:ob(t)},g.remove=function(t){this.tc.removeItem(this.Ad+t)},g.Ze=!1,g.toString=function(){return this.tc.toString()};var yb=xb("localStorage"),zb=xb("sessionStorage");Ab.prototype.Lc=function(t){return this.path.e()?new Ab(this.source,C,this.Ga.Q(t)):new Ab(this.source,D(this.path),this.Ga)},Ab.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" overwrite: "+this.Ga.toString()+")"},Cb.prototype.Lc=function(){return this.path.e()?new Cb(this.source,C):new Cb(this.source,D(this.path))},Cb.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" listen_complete)"},Eb.prototype.getToken=function(t){return this.Ee.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(E("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})},Gb.prototype.j=function(t){return this.Hd.P(t)},Gb.prototype.toString=function(){return this.Hd.toString()},Hb.prototype.toString=function(){var t=(this.Rc?"https://":"http://")+this.host;return this.gf&&(t+="<"+this.gf+">"),t},Kb.prototype.get=function(){return za(this.sc)},Mb.prototype.get=function(){var t=this.Ef.get(),e=za(t);if(this.pd)for(var n in this.pd)e[n]-=this.pd[n];return this.pd=t,e},Pb.prototype.add=function(t){this.gd.push(t)},Pb.prototype.Yb=function(){return this.qa},Ub.prototype.Yb=function(){var t=this.Kd.wb();return"value"===this.fd?t.path:t.getParent().path},Ub.prototype.de=function(){return this.fd},Ub.prototype.Tb=function(){return this.Zd.Tb(this)},Ub.prototype.toString=function(){return this.Yb().toString()+":"+this.fd+":"+B(this.Kd.Qe())},Vb.prototype.Yb=function(){return this.path},Vb.prototype.de=function(){return"cancel"},Vb.prototype.Tb=function(){return this.Zd.Tb(this)},Vb.prototype.toString=function(){return this.path.toString()+":cancel"},Wb.prototype.Te=function(){return null},Wb.prototype.ce=function(){return null};var Xb=new Wb;Yb.prototype.Te=function(t){var e=this.Ka.N;return Zb(e,t)?e.j().Q(t):(e=null!=this.wd?new $b(this.wd,!0,!1):this.Ka.w(),this.xf.pc(t,e))},Yb.prototype.ce=function(t,e,n){var i=null!=this.wd?this.wd:ac(this.Ka);return t=this.xf.Vd(i,e,1,n,t),0===t.length?null:t[0]};var cc="value";$b.prototype.j=function(){return this.A};var rc=function(){var t=1;return function(){return t++}}(),H=kb,sc=lb,Tb=null,wc=!0,Kc=/^-?\d{1,10}$/;g=Qc.prototype,g.$e=function(t,e,n,i){var r=t.path.toString();this.f("Listen called for "+r+" "+t.ja());var o=Rc(t,n),s={};this.$[o]=s,t=Tc(t.m);var a=this;Uc(this,r+".json",t,function(t,e){var u=e;404===t&&(t=u=null),null===t&&a.Gb(r,u,!1,n),w(a.$,o)===s&&i(t?401==t?"permission_denied":"rest_error:"+t:"ok",null)})},g.uf=function(t,e){var n=Rc(t,e);delete this.$[n]},g.kf=function(){},g.oe=function(){},g.cf=function(){},g.vd=function(){},g.put=function(){},g.af=function(){},g.ve=function(){},Vc.prototype.Lc=function(t){return this.path.e()?(t=this.children.subtree(new L(t)),t.e()?null:t.value?new Ab(this.source,C,t.value):new Vc(this.source,C,t)):(H(J(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new Vc(this.source,D(this.path),this.children))},Vc.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},Xc.prototype.lf=function(){var t,e=this.Uc.get(),n={},i=!1;for(t in e)0=t.length){var e=Number(t);if(!isNaN(e)){i.Ce=e,i.frames=[],t=null;break t}}i.Ce=1,i.frames=[]}null!==t&&fd(i,t)}},this.Ia.onerror=function(t){i.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&i.f(t),i.bb()}},cd.prototype.start=function(){},cd.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!==bd&&!dd},cd.responsesRequiredToBeHealthy=2,cd.healthyTimeout=3e4,g=cd.prototype,g.qd=function(){yb.remove("previous_websocket_failure")},g.send=function(t){ed(this),t=B(t),this.qb+=t.length,Lb(this.Va,"bytes_sent",t.length),t=Hc(t,16384),1=this.g.compare(this.Tc,t)&&0>=this.g.compare(t,this.uc)},g.F=function(t,e,n,i,r,o){return this.matches(new K(e,n))||(n=G),this.ee.F(t,e,n,i,r,o)},g.ya=function(t,e,n){e.J()&&(e=G);var i=e.nb(this.g),i=i.fa(G),r=this;return e.O(N,function(t,e){r.matches(new K(t,e))||(i=i.T(t,G))}),this.ee.ya(t,i,n)},g.fa=function(t){return t},g.Na=function(){return!0},g.Ub=function(){return this.ee},g=Md.prototype,g.F=function(t,e,n,i,r,o){return this.sa.matches(new K(e,n))||(n=G),t.Q(e).Z(n)?t:t.Eb()=this.g.compare(this.sa.Tc,s):0>=this.g.compare(s,this.sa.uc)))break;i=i.T(s.name,s.R),r++}}else{i=e.nb(this.g),i=i.fa(G);var a,u,c;if(this.Ib){e=i.We(this.g),a=this.sa.uc,u=this.sa.Tc;var h=Pd(this.g);c=function(t,e){return h(e,t)}}else e=i.Wb(this.g),a=this.sa.Tc,u=this.sa.uc,c=Pd(this.g);for(var r=0,l=!1;0=c(a,s)&&(l=!0),(o=l&&r=c(s,u))?r++:i=i.T(s.name,G)}return this.sa.Ub().ya(t,i,n)},g.fa=function(t){return t},g.Na=function(){return!0},g.Ub=function(){return this.sa.Ub()};var Td=["object","boolean","number","string"];g=qc.prototype,g.J=function(){return!0},g.C=function(){return this.aa},g.fa=function(t){return new qc(this.B,t)},g.Q=function(t){return".priority"===t?this.aa:G},g.P=function(t){return t.e()?this:".priority"===J(t)?this.aa:G},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:G.T(t,e).fa(this.aa)},g.F=function(t,e){var n=J(t);return null===n?e:e.e()&&".priority"!==n?this:(H(".priority"!==n||1===Ad(t),".priority must be the last token in a path"),this.T(n,G.F(D(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:"+Ud(this.aa.H())+":");var e=typeof this.B,t=t+(e+":"),t="number"===e?t+Jc(this.B):t+this.B;this.Db=uc(t)}return this.Db},g.Ca=function(){return this.B},g.rc=function(t){if(t===G)return 1;if(t instanceof P)return-1;H(t.J(),"Unknown node type");var e=typeof t.B,n=typeof this.B,i=Ia(Td,e),r=Ia(Td,n);return H(0<=i,"Unknown leaf type: "+e),H(0<=r,"Unknown leaf type: "+n),i===r?"object"===n?0:this.B=this.o.length)return null;for(var t=[],e=this.Y;e=this.o.length},g.Z=function(t){if(Ad(this)!==Ad(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(Ad(this)>Ad(t))return!1;for(;eo;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return H(20===n.length,"nextPushId: Length should be 20."),n}}();g=vf.prototype,g.Oa=function(t,e){return new vf(this.La,this.ba.Oa(t,e,this.La).X(null,null,!1,null,null))},g.remove=function(t){return new vf(this.La,this.ba.remove(t,this.La).X(null,null,!1,null,null))},g.get=function(t){for(var e,n=this.ba;!n.e();){if(e=this.La(t,n.key),0===e)return n.value;0>e?n=n.left:0i?r.X(null,null,null,r.left.Oa(t,e,n),null):0===i?r.X(null,e,null,null,null):r.X(null,null,null,null,r.right.Oa(t,e,n)),Cf(r)},g.remove=function(t,e){var n,i;if(n=this,0>e(t,n.key))n.left.e()||n.left.ea()||n.left.left.ea()||(n=Ef(n)),n=n.X(null,null,null,n.left.remove(t,e),null);else{if(n.left.ea()&&(n=Ff(n)),n.right.e()||n.right.ea()||n.right.left.ea()||(n=Gf(n),n.left.left.ea()&&(n=Ff(n),n=Gf(n))),0===e(t,n.key)){if(n.right.e())return wf;i=Bf(n.right),n=n.X(i.key,i.value,null,null,Df(n.right))}n=n.X(null,null,null,null,n.right.remove(t,e))}return Cf(n)},g.ea=function(){return this.color},g=If.prototype,g.X=function(){return this},g.Oa=function(t,e){return new Af(t,e,null)},g.remove=function(){return this},g.count=function(){return 0},g.e=function(){return!0},g.ha=function(){return!1},g.Fc=function(){return null},g.ec=function(){return null},g.ea=function(){return!1};var wf=new If;g=P.prototype,g.J=function(){return!1},g.C=function(){return this.aa||G},g.fa=function(t){return this.k.e()?this:new P(this.k,t,this.yb)},g.Q=function(t){return".priority"===t?this.C():(t=this.k.get(t),null===t?G:t)},g.P=function(t){var e=J(t);return null===e?this:this.Q(e).P(D(t))},g.Da=function(t){return null!==this.k.get(t)},g.T=function(t,e){if(H(e,"We should always be passing snapshot nodes"),".priority"===t)return this.fa(e);var n,i,r=new K(t,e);return e.e()?(n=this.k.remove(t),r=me(this.yb,r,this.k)):(n=this.k.Oa(t,e),r=ke(this.yb,r,this.k)),i=n.e()?G:this.aa,new P(n,i,r)},g.F=function(t,e){var n=J(t);if(null===n)return e;H(".priority"!==J(t)||1===Ad(t),".priority must be the last token in a path");var i=this.Q(n).F(D(t),e);return this.T(n,i)},g.e=function(){return this.k.e()},g.Eb=function(){return this.k.count()};var Jf=/^(0|[1-9]\d*)$/;g=P.prototype,g.H=function(t){if(this.e())return null;var e={},n=0,i=0,r=!0;if(this.O(N,function(o,s){e[o]=s.H(t),n++,r&&Jf.test(o)?i=Math.max(i,Number(o)):r=!1}),!t&&r&&i<2*n){var o,s=[];for(o in e)s[o]=e[o];return s}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:"+Ud(this.C().H())+":"),this.O(N,function(e,n){var i=n.hash();""!==i&&(t+=":"+e+":"+i)}),this.Db=""===t?"":uc(t)}return this.Db},g.Ve=function(t,e,n){return(n=Kf(this,n))?(t=xf(n,new K(t,e)))?t.name:null:xf(this.k,t)},g.O=function(t,e){var n=Kf(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.Gc(),t)},g.Xb=function(t,e){var n=Kf(this,e);if(n)return n.Xb(t,function(t){return t});for(var n=this.k.Xb(t.name,jc),i=zf(n);null!=i&&0>e.compare(i,t);)R(n),i=zf(n);return n},g.We=function(t){return this.Zb(t.Ec(),t)},g.Zb=function(t,e){var n=Kf(this,e);if(n)return n.Zb(t,function(t){return t});for(var n=this.k.Zb(t.name,jc),i=zf(n);null!=i&&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.ke(t),this.Mc)},g.le=function(t){if(x("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.le(t),this.Mc)},g.ag=function(t){if(x("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.');lf("Query.orderByChild",t),Xf(this,"Query.orderByChild");var e=new L(t);if(e.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");return e=new Yd(e),e=he(this.m,e),Vf(e),new X(this.u,this.path,e,!0)},g.bg=function(){x("Query.orderByKey",0,0,arguments.length),Xf(this,"Query.orderByKey");var t=he(this.m,Fd);return Vf(t),new X(this.u,this.path,t,!0)},g.cg=function(){x("Query.orderByPriority",0,0,arguments.length),Xf(this,"Query.orderByPriority");var t=he(this.m,N);return Vf(t),new X(this.u,this.path,t,!0)},g.dg=function(){x("Query.orderByValue",0,0,arguments.length),Xf(this,"Query.orderByValue");var t=he(this.m,de);return Vf(t),new X(this.u,this.path,t,!0)},g.Ld=function(t,e){x("Query.startAt",0,2,arguments.length),df("Query.startAt",t,this.path,!0),kf("Query.startAt",e);var i=this.m.Ld(t,e);if(Wf(i),Vf(i),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,i,this.Mc)},g.ed=function(t,e){x("Query.endAt",0,2,arguments.length),df("Query.endAt",t,this.path,!0),kf("Query.endAt",e);var n=this.m.ed(t,e);if(Wf(n),Vf(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.Mc)},g.If=function(t,e){if(x("Query.equalTo",1,2,arguments.length),df("Query.equalTo",t,this.path,!1),kf("Query.equalTo",e),this.m.ka)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.m.na)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.Ld(t,e).ed(t,e)},g.toString=function(){x("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.Y;n=e&&Eg(a,n.path)?i=!1:n.path.contains(a.path)&&(o=!0)),s--}if(i){if(o)this.S=Fg(this.la,Gg,C),this.Ac=0 "},function(t,e){t.exports="
  • {{open ? '[-]' : '[+]'}} {{comment.by}} {{comment.time | fromNow}} ago

    {{{comment.text}}}

  • "},function(t,e){t.exports="
    {{index}}.

    {{{item.title}}} ({{item.url | domain}})

    {{item.score}} points by {{item.by}} {{item.time | fromNow}} ago | {{item.descendants}} {{item.descendants | pluralize 'comment'}}

    "},function(t,e){t.exports='

    • {{option.text}}

      {{option.score}} points

    No comments yet.

    '},function(t,e){t.exports=' '},function(t,e){t.exports="
    • user: {{user.id}}
    • created: {{user.created | fromNow}} ago
    • karma: {{user.karma}}
    • about:
      {{{user.about}}}
    "},function(t,e,n){var i,r,o={};n(69),r=n(57),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){var i,r,o={};n(70),i=n(18),r=n(58),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){var i,r,o={};n(72),i=n(20),r=n(60),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){var i,r,o={};n(73),i=n(21),r=n(61),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){var i,r,o={};n(74),i=n(22),r=n(62),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;r&&(s.template=r),s.computed||(s.computed={}),Object.keys(o).forEach(function(t){var e=o[t];s.computed[t]=function(){return e}})},function(t,e,n){/*! * vue-router v0.7.13 * (c) 2016 Evan You * Released under the MIT License. */ -!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e,n){this.path=t,this.matcher=e,this.delegate=n}function e(t){this.routes={},this.children={},this.target=t}function n(e,i,r){return function(o,s){var a=e+o;return s?void s(n(a,i,r)):new t(e+o,i,r)}}function i(t,e,n){for(var i=0,r=0,o=t.length;r can only be used inside a router-enabled app.");this._isDynamicLiteral=!0,n.bind.call(this);for(var e=void 0,i=this.vm;i;){if(i._routerView){e=i._routerView;break}i=i.$parent}if(e)this.parentView=e,e.childView=this;else{var r=t.router;r._rootView=this}var o=t.router._currentTransition;if(!e&&o.done||e&&e.activated){var s=e?e.depth+1:0;j(this,o,s)}},unbind:function(){this.parentView&&(this.parentView.childView=null),n.unbind.call(this)}}),t.elementDirective("router-view",i)}function W(t){function e(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port}function n(t,e,n){if(e=e.trim(),e.indexOf(" ")===-1)return void n(t,e);for(var i=e.split(/\s+/),r=0,o=i.length;r-1&&n.updateClasses(i,t.el)})},unbind:function(){this.vm.$off(h,this.cb)}}),t.directive("link",{priority:u-2,bind:function(){var t=this.vm;if(!t.$route)return void _("v-link can only be used inside a router-enabled app.");this.router=t.$route.router,this.unwatch=t.$watch("$route",r(this.onRouteUpdate,this));var e=this.el.getAttribute(h);e&&(this.el.removeAttribute(h),this.activeIds=e.split(",")),"A"===this.el.tagName&&"_blank"===this.el.getAttribute("target")||(this.handler=r(this.onClick,this),this.el.addEventListener("click",this.handler))},update:function(t){this.target=t,o(t)&&(this.append=t.append,this.exact=t.exact,this.prevActiveClass=this.activeClass,this.activeClass=t.activeClass),this.onRouteUpdate(this.vm.$route)},onClick:function(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0!==t.button)){var n=this.target;if(n)t.preventDefault(),this.router.go(n);else{for(var i=t.target;"A"!==i.tagName&&i!==this.el;)i=i.parentNode;if("A"===i.tagName&&e(i)){t.preventDefault();var r=i.pathname;this.router.history.root&&(r=r.replace(this.router.history.rootRE,"")),this.router.go({path:r,replace:n&&n.replace,append:n&&n.append})}}}},onRouteUpdate:function(t){var e=this.router.stringifyPath(this.target);this.path!==e&&(this.path=e,this.updateActiveMatch(),this.updateHref()),this.activeIds?this.vm.$emit(h,this,t.path):this.updateClasses(t.path,this.el)},updateActiveMatch:function(){this.activeRE=this.path&&!this.exact?new RegExp("^"+this.path.replace(/\/$/,"").replace(st,"").replace(ot,"\\$&")+"(\\/|$)"):null},updateHref:function(){if("A"===this.el.tagName){var t=this.path,e=this.router,n="/"===t.charAt(0),i=t&&("hash"===e.mode||n)?e.history.formatPath(t,this.append):t;i?this.el.href=i:this.el.removeAttribute("href")}},updateClasses:function(t,e){var i=this.activeClass||this.router._linkActiveClass;this.prevActiveClass&&this.prevActiveClass!==i&&n(e,this.prevActiveClass,a);var r=this.path.replace(st,"");t=t.replace(st,""),this.exact?r===t||"/"!==r.charAt(r.length-1)&&r===t.replace(rt,"")?n(e,i,s):n(e,i,a):this.activeRE&&this.activeRE.test(t)?n(e,i,s):n(e,i,a)},unbind:function(){this.el.removeEventListener("click",this.handler),this.unwatch&&this.unwatch()}})}function H(t,e){var n=e.component;ut.util.isPlainObject(n)&&(n=e.component=ut.extend(n)),"function"!=typeof n&&(e.component=null,_('invalid component for route "'+t+'".'))}var U={};U.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.prototype={to:function(t,e){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),e){if(0===e.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,e,this.delegate)}return this}},e.prototype={add:function(t,e){this.routes[t]=e},addChild:function(t,i,r,o){var s=new e(i);this.children[t]=s;var a=n(t,s,o);o&&o.contextEntered&&o.contextEntered(i,a),r(a)}};var q=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],B=new RegExp("(\\"+q.join("|\\")+")","g"),V=!1;h.prototype={eachChar:function(t){for(var e,n=this.string,i=0,r=n.length;i2&&"[]"===s.slice(a-2)&&(u=!0,s=s.slice(0,a-2),n[s]||(n[s]=[])),r=o[1]?w(o[1]):""),u?n[s].push(r):n[s]=r}return n},recognize:function(t,e){V=e;var n,i,r,o,s=[this.rootState],u={},h=!1;if(o=t.indexOf("?"),o!==-1){var c=t.substr(o+1,t.length);t=t.substr(0,o),c&&(u=this.parseQueryString(c))}if(t=a(t)){for("/"!==t.charAt(0)&&(t="/"+t),n=t.length,n>1&&"/"===t.charAt(n-1)&&(t=t.substr(0,n-1),h=!0),i=0,r=t.length;i-1?"&"+location.search.slice(1):location.search;t.onChange(e.replace(/^#!?/,"")+r)},window.addEventListener("hashchange",this.listener),this.listener()},t.prototype.stop=function(){window.removeEventListener("hashchange",this.listener)},t.prototype.go=function(t,e,n){t=this.formatPath(t,n),e?location.replace(t):location.hash=t},t.prototype.formatPath=function(t,e){var n="/"===t.charAt(0),i="#"+(this.hashbang?"!":"");return n?i+t:i+k(location.hash.replace(/^#!?/,""),t,e)},t}(),tt=function(){function t(e){var n=e.onChange;U.classCallCheck(this,t),this.onChange=n,this.currentPath="/"}return t.prototype.start=function(){this.onChange("/")},t.prototype.stop=function(){},t.prototype.go=function(t,e,n){t=this.currentPath=this.formatPath(t,n),this.onChange(t)},t.prototype.formatPath=function(t,e){return"/"===t.charAt(0)?t:k(this.currentPath,t,e)},t}(),et=function(){function t(e,n,i){U.classCallCheck(this,t),this.router=e,this.to=n,this.from=i,this.next=null,this.aborted=!1,this.done=!1}return t.prototype.abort=function(){if(!this.aborted){this.aborted=!0;var t=!this.from.path&&"/"===this.to.path;t||this.router.replace(this.from.path||"/")}},t.prototype.redirect=function(t){this.aborted||(this.aborted=!0,"string"==typeof t?t=A(t,this.to.params,this.to.query):(t.params=t.params||this.to.params,t.query=t.query||this.to.query),this.router.replace(t))},t.prototype.start=function(t){for(var e=this,n=[],i=this.router._rootView;i;)n.unshift(i),i=i.childView;var r=n.slice().reverse(),o=this.activateQueue=D(this.to.matched).map(function(t){return t.handler}),s=void 0,a=void 0;for(s=0;s0&&(a=r.slice(0,s),n=r.slice(s).reverse(),o=o.slice(s)),e.runQueue(n,S,function(){e.runQueue(o,T,function(){e.runQueue(n,F,function(){if(e.router._onTransitionValidated(e),a&&a.forEach(function(t){return $(t,e)}),n.length){var i=n[n.length-1],r=a?a.length:0;j(i,e,r,t)}else t()})})})},t.prototype.runQueue=function(t,e,n){function i(o){o>=t.length?n():e(t[o],r,function(){i(o+1)})}var r=this;i(0)},t.prototype.callHook=function(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],r=i.expectBoolean,o=void 0!==r&&r,s=i.postActivate,a=void 0!==s&&s,u=i.processData,h=i.cleanup,c=this,l=!1,f=function(){h&&h(),c.abort()},p=function(t){if(a?v():f(),t&&!c.router._suppress)throw _("Uncaught error during transition: "),t instanceof Error?t:new Error(t)},d=function(t){try{p(t)}catch(e){setTimeout(function(){throw e},0)}},v=function(){return l?void _("transition.next() should be called only once."):(l=!0,c.aborted?void(h&&h()):void(n&&n()))},g=function(e){"boolean"==typeof e?e?v():f():x(e)?e.then(function(t){t?v():f()},d):t.length||v()},m=function(t){var e=void 0;try{e=u(t)}catch(n){return p(n)}x(e)?e.then(v,d):v()},b={to:c.to,from:c.from,abort:f,next:u?m:v,redirect:function(){c.redirect.apply(c,arguments)}},y=void 0;try{y=t.call(e,b)}catch(w){return p(w)}o?g(y):x(y)?u?y.then(m,d):y.then(v,d):u&&M(y)?m(y):t.length||v()},t.prototype.callHooks=function(t,e,n,i){var r=this;Array.isArray(t)?this.runQueue(t,function(t,n,o){r.aborted||r.callHook(t,e,o,i)},n):this.callHook(t,e,n,i)},t}(),nt=/^(component|subRoutes|fullPath)$/,it=function ct(t,e){var n=this;U.classCallCheck(this,ct);var i=e._recognizer.recognize(t);i&&([].forEach.call(i,function(t){for(var e in t.handler)nt.test(e)||(n[e]=t.handler[e])}),this.query=i.queryParams,this.params=[].reduce.call(i,function(t,e){if(e.params)for(var n in e.params)t[n]=e.params[n];return t},{})),this.path=t,this.matched=i||e._notFoundHandler,Object.defineProperty(this,"router",{enumerable:!1,value:e}),Object.freeze(this)},rt=/\/$/,ot=/[-.*+?^${}()|[\]\/\\]/g,st=/\?.*$/,at={"abstract":tt,hash:Z,html5:G},ut=void 0,ht=function(){function t(){var e=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.hashbang,r=void 0===i||i,o=n["abstract"],s=void 0!==o&&o,a=n.history,u=void 0!==a&&a,h=n.saveScrollPosition,c=void 0!==h&&h,l=n.transitionOnLoad,f=void 0!==l&&l,p=n.suppressTransitionError,d=void 0!==p&&p,v=n.root,g=void 0===v?null:v,m=n.linkActiveClass,b=void 0===m?"v-link-active":m;if(U.classCallCheck(this,t),!t.installed)throw new Error("Please install the Router with Vue.use() before creating an instance.");this.app=null,this._children=[],this._recognizer=new Q,this._guardRecognizer=new Q,this._started=!1,this._startCb=null,this._currentRoute={},this._currentTransition=null,this._previousTransition=null,this._notFoundHandler=null,this._notFoundRedirect=null,this._beforeEachHooks=[],this._afterEachHooks=[],this._rendered=!1,this._transitionOnLoad=f,this._root=g,this._abstract=s,this._hashbang=r;var y="undefined"!=typeof window&&window.history&&window.history.pushState;this._history=u&&y,this._historyFallback=u&&!y;var w=ut.util.inBrowser;this.mode=!w||this._abstract?"abstract":this._history?"html5":"hash";var _=at[this.mode];this.history=new _({root:g,hashbang:this._hashbang,onChange:function(t,n,i){e._match(t,n,i)}}),this._saveScrollPosition=c,this._linkActiveClass=b,this._suppress=d}return t.prototype.map=function(t){for(var e in t)this.on(e,t[e]);return this},t.prototype.on=function(t,e){return"*"===t?this._notFound(e):this._addRoute(t,e,[]),this},t.prototype.redirect=function(t){for(var e in t)this._addRedirect(e,t[e]);return this},t.prototype.alias=function(t){for(var e in t)this._addAlias(e,t[e]);return this},t.prototype.beforeEach=function(t){return this._beforeEachHooks.push(t),this},t.prototype.afterEach=function(t){return this._afterEachHooks.push(t),this},t.prototype.go=function(t){var e=!1,n=!1;ut.util.isObject(t)&&(e=t.replace,n=t.append),t=this.stringifyPath(t),t&&this.history.go(t,e,n)},t.prototype.replace=function(t){"string"==typeof t&&(t={path:t}),t.replace=!0,this.go(t)},t.prototype.start=function(t,e,n){if(this._started)return void _("already started.");if(this._started=!0,this._startCb=n,!this.app){if(!t||!e)throw new Error("Must start vue-router with a component and a root container.");if(t instanceof ut)throw new Error("Must start vue-router with a component, not a Vue instance.");this._appContainer=e;var i=this._appConstructor="function"==typeof t?t:ut.extend(t);i.options.name=i.options.name||"RouterApp"}if(this._historyFallback){var r=window.location,o=new G({root:this._root}),s=o.root?r.pathname.replace(o.rootRE,""):r.pathname;if(s&&"/"!==s)return void r.assign((o.root||"")+"/"+this.history.formatPath(s)+r.search)}this.history.start()},t.prototype.stop=function(){this.history.stop(),this._started=!1},t.prototype.stringifyPath=function(t){var e="";if(t&&"object"==typeof t){if(t.name){var n=ut.util.extend,i=this._currentTransition&&this._currentTransition.to.params,r=t.params||{},o=i?n(n({},i),r):r;e=encodeURI(this._recognizer.generate(t.name,o))}else t.path&&(e=encodeURI(t.path));if(t.query){var s=this._recognizer.generateQueryString(t.query);e+=e.indexOf("?")>-1?"&"+s.slice(1):s}}else e=encodeURI(t?t+"":"");return e},t.prototype._addRoute=function(t,e,n){if(H(t,e),e.path=t,e.fullPath=(n.reduce(function(t,e){return t+e.path},"")+t).replace("//","/"),n.push({path:t,handler:e}),this._recognizer.add(n,{as:e.name}),e.subRoutes)for(var i in e.subRoutes)this._addRoute(i,e.subRoutes[i],n.slice())},t.prototype._notFound=function(t){H("*",t),this._notFoundHandler=[{handler:t}]},t.prototype._addRedirect=function(t,e){"*"===t?this._notFoundRedirect=e:this._addGuard(t,e,this.replace)},t.prototype._addAlias=function(t,e){this._addGuard(t,e,this._match)},t.prototype._addGuard=function(t,e,n){var i=this;this._guardRecognizer.add([{path:t,handler:function(t,r){var o=A(e,t.params,r);n.call(i,o)}}])},t.prototype._checkGuard=function(t){var e=this._guardRecognizer.recognize(t,!0);return e?(e[0].handler(e[0],e.queryParams),!0):this._notFoundRedirect&&(e=this._recognizer.recognize(t),!e)?(this.replace(this._notFoundRedirect),!0):void 0},t.prototype._match=function(t,e,n){var i=this;if(!this._checkGuard(t)){var r=this._currentRoute,o=this._currentTransition;if(o){if(o.to.path===t)return;if(r.path===t)return o.aborted=!0,void(this._currentTransition=this._prevTransition);o.aborted=!0}var s=new it(t,this),a=new et(this,s,r);this._prevTransition=o,this._currentTransition=a,this.app||!function(){var t=i;i.app=new i._appConstructor({el:i._appContainer,created:function(){this.$router=t},_meta:{$route:s}})}();var u=this._beforeEachHooks,h=function(){a.start(function(){i._postTransition(s,e,n)})};u.length?a.runQueue(u,function(t,e,n){a===i._currentTransition&&a.callHook(t,null,n,{expectBoolean:!0})},h):h(),!this._rendered&&this._startCb&&this._startCb.call(null),this._rendered=!0}},t.prototype._onTransitionValidated=function(t){var e=this._currentRoute=t.to;this.app.$route!==e&&(this.app.$route=e,this._children.forEach(function(t){t.$route=e})),this._afterEachHooks.length&&this._afterEachHooks.forEach(function(e){return e.call(null,{to:t.to,from:t.from})}),this._currentTransition.done=!0},t.prototype._postTransition=function(t,e,n){var i=e&&e.pos;i&&this._saveScrollPosition?ut.nextTick(function(){window.scrollTo(i.x,i.y)}):n&&ut.nextTick(function(){var t=document.getElementById(n.slice(1));t&&window.scrollTo(window.scrollX,t.offsetTop)})},t}();return ht.installed=!1,ht.install=function(t){return ht.installed?void _("already installed."):(ut=t,I(ut),L(ut),W(ut),z.Vue=ut,void(ht.installed=!0))},"undefined"!=typeof window&&window.Vue&&window.Vue.use(ht),ht})},function(t,e,n){var i=n(47);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(48);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(49);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(50);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(51);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(52);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){(function(e){/*! - * Vue.js v1.0.26 +!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e,n){this.path=t,this.matcher=e,this.delegate=n}function e(t){this.routes={},this.children={},this.target=t}function n(e,i,r){return function(o,s){var a=e+o;return s?void s(n(a,i,r)):new t(e+o,i,r)}}function i(t,e,n){for(var i=0,r=0,o=t.length;r can only be used inside a router-enabled app.");this._isDynamicLiteral=!0,n.bind.call(this);for(var e=void 0,i=this.vm;i;){if(i._routerView){e=i._routerView;break}i=i.$parent}if(e)this.parentView=e,e.childView=this;else{var r=t.router;r._rootView=this}var o=t.router._currentTransition;if(!e&&o.done||e&&e.activated){var s=e?e.depth+1:0;$(this,o,s)}},unbind:function(){this.parentView&&(this.parentView.childView=null),n.unbind.call(this)}}),t.elementDirective("router-view",i)}function H(t){function e(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port}function n(t,e,n){if(e=e.trim(),e.indexOf(" ")===-1)return void n(t,e);for(var i=e.split(/\s+/),r=0,o=i.length;r-1&&n.updateClasses(i,t.el)})},unbind:function(){this.vm.$off(c,this.cb)}}),t.directive("link",{priority:u-2,bind:function(){var t=this.vm;if(!t.$route)return void _("v-link can only be used inside a router-enabled app.");this.router=t.$route.router,this.unwatch=t.$watch("$route",r(this.onRouteUpdate,this));var e=this.el.getAttribute(c);e&&(this.el.removeAttribute(c),this.activeIds=e.split(",")),"A"===this.el.tagName&&"_blank"===this.el.getAttribute("target")||(this.handler=r(this.onClick,this),this.el.addEventListener("click",this.handler))},update:function(t){this.target=t,o(t)&&(this.append=t.append,this.exact=t.exact,this.prevActiveClass=this.activeClass,this.activeClass=t.activeClass),this.onRouteUpdate(this.vm.$route)},onClick:function(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0!==t.button)){var n=this.target;if(n)t.preventDefault(),this.router.go(n);else{for(var i=t.target;"A"!==i.tagName&&i!==this.el;)i=i.parentNode;if("A"===i.tagName&&e(i)){t.preventDefault();var r=i.pathname;this.router.history.root&&(r=r.replace(this.router.history.rootRE,"")),this.router.go({path:r,replace:n&&n.replace,append:n&&n.append})}}}},onRouteUpdate:function(t){var e=this.router.stringifyPath(this.target);this.path!==e&&(this.path=e,this.updateActiveMatch(),this.updateHref()),this.activeIds?this.vm.$emit(c,this,t.path):this.updateClasses(t.path,this.el)},updateActiveMatch:function(){this.activeRE=this.path&&!this.exact?new RegExp("^"+this.path.replace(/\/$/,"").replace(st,"").replace(ot,"\\$&")+"(\\/|$)"):null},updateHref:function(){if("A"===this.el.tagName){var t=this.path,e=this.router,n="/"===t.charAt(0),i=t&&("hash"===e.mode||n)?e.history.formatPath(t,this.append):t;i?this.el.href=i:this.el.removeAttribute("href")}},updateClasses:function(t,e){var i=this.activeClass||this.router._linkActiveClass;this.prevActiveClass&&this.prevActiveClass!==i&&n(e,this.prevActiveClass,a);var r=this.path.replace(st,"");t=t.replace(st,""),this.exact?r===t||"/"!==r.charAt(r.length-1)&&r===t.replace(rt,"")?n(e,i,s):n(e,i,a):this.activeRE&&this.activeRE.test(t)?n(e,i,s):n(e,i,a)},unbind:function(){this.el.removeEventListener("click",this.handler),this.unwatch&&this.unwatch()}})}function U(t,e){var n=e.component;ut.util.isPlainObject(n)&&(n=e.component=ut.extend(n)),"function"!=typeof n&&(e.component=null,_('invalid component for route "'+t+'".'))}var W={};W.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.prototype={to:function(t,e){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),e){if(0===e.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,e,this.delegate)}return this}},e.prototype={add:function(t,e){this.routes[t]=e},addChild:function(t,i,r,o){var s=new e(i);this.children[t]=s;var a=n(t,s,o);o&&o.contextEntered&&o.contextEntered(i,a),r(a)}};var B=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],V=new RegExp("(\\"+B.join("|\\")+")","g"),q=!1;c.prototype={eachChar:function(t){for(var e,n=this.string,i=0,r=n.length;i2&&"[]"===s.slice(a-2)&&(u=!0,s=s.slice(0,a-2),n[s]||(n[s]=[])),r=o[1]?w(o[1]):""),u?n[s].push(r):n[s]=r}return n},recognize:function(t,e){q=e;var n,i,r,o,s=[this.rootState],u={},c=!1;if(o=t.indexOf("?"),o!==-1){var h=t.substr(o+1,t.length);t=t.substr(0,o),h&&(u=this.parseQueryString(h))}if(t=a(t)){for("/"!==t.charAt(0)&&(t="/"+t),n=t.length,n>1&&"/"===t.charAt(n-1)&&(t=t.substr(0,n-1),c=!0),i=0,r=t.length;i-1?"&"+location.search.slice(1):location.search;t.onChange(e.replace(/^#!?/,"")+r)},window.addEventListener("hashchange",this.listener),this.listener()},t.prototype.stop=function(){window.removeEventListener("hashchange",this.listener)},t.prototype.go=function(t,e,n){t=this.formatPath(t,n),e?location.replace(t):location.hash=t},t.prototype.formatPath=function(t,e){var n="/"===t.charAt(0),i="#"+(this.hashbang?"!":"");return n?i+t:i+x(location.hash.replace(/^#!?/,""),t,e)},t}(),tt=function(){function t(e){var n=e.onChange;W.classCallCheck(this,t),this.onChange=n,this.currentPath="/"}return t.prototype.start=function(){this.onChange("/")},t.prototype.stop=function(){},t.prototype.go=function(t,e,n){t=this.currentPath=this.formatPath(t,n),this.onChange(t)},t.prototype.formatPath=function(t,e){return"/"===t.charAt(0)?t:x(this.currentPath,t,e)},t}(),et=function(){function t(e,n,i){W.classCallCheck(this,t),this.router=e,this.to=n,this.from=i,this.next=null,this.aborted=!1,this.done=!1}return t.prototype.abort=function(){if(!this.aborted){this.aborted=!0;var t=!this.from.path&&"/"===this.to.path;t||this.router.replace(this.from.path||"/")}},t.prototype.redirect=function(t){this.aborted||(this.aborted=!0,"string"==typeof t?t=E(t,this.to.params,this.to.query):(t.params=t.params||this.to.params,t.query=t.query||this.to.query),this.router.replace(t))},t.prototype.start=function(t){for(var e=this,n=[],i=this.router._rootView;i;)n.unshift(i),i=i.childView;var r=n.slice().reverse(),o=this.activateQueue=I(this.to.matched).map(function(t){return t.handler}),s=void 0,a=void 0;for(s=0;s0&&(a=r.slice(0,s),n=r.slice(s).reverse(),o=o.slice(s)),e.runQueue(n,j,function(){e.runQueue(o,T,function(){e.runQueue(n,O,function(){if(e.router._onTransitionValidated(e),a&&a.forEach(function(t){return N(t,e)}),n.length){var i=n[n.length-1],r=a?a.length:0;$(i,e,r,t)}else t()})})})},t.prototype.runQueue=function(t,e,n){function i(o){o>=t.length?n():e(t[o],r,function(){i(o+1)})}var r=this;i(0)},t.prototype.callHook=function(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],r=i.expectBoolean,o=void 0!==r&&r,s=i.postActivate,a=void 0!==s&&s,u=i.processData,c=i.cleanup,h=this,l=!1,f=function(){c&&c(),h.abort()},p=function(t){if(a?v():f(),t&&!h.router._suppress)throw _("Uncaught error during transition: "),t instanceof Error?t:new Error(t)},d=function(t){try{p(t)}catch(t){setTimeout(function(){throw t},0)}},v=function(){return l?void _("transition.next() should be called only once."):(l=!0,h.aborted?void(c&&c()):void(n&&n()))},g=function(e){"boolean"==typeof e?e?v():f():k(e)?e.then(function(t){t?v():f()},d):t.length||v()},b=function(t){var e=void 0;try{e=u(t)}catch(t){return p(t)}k(e)?e.then(v,d):v()},m={to:h.to,from:h.from,abort:f,next:u?b:v,redirect:function(){h.redirect.apply(h,arguments)}},y=void 0;try{y=t.call(e,m)}catch(t){return p(t)}o?g(y):k(y)?u?y.then(b,d):y.then(v,d):u&&M(y)?b(y):t.length||v()},t.prototype.callHooks=function(t,e,n,i){var r=this;Array.isArray(t)?this.runQueue(t,function(t,n,o){r.aborted||r.callHook(t,e,o,i)},n):this.callHook(t,e,n,i)},t}(),nt=/^(component|subRoutes|fullPath)$/,it=function t(e,n){var i=this;W.classCallCheck(this,t);var r=n._recognizer.recognize(e);r&&([].forEach.call(r,function(t){for(var e in t.handler)nt.test(e)||(i[e]=t.handler[e])}),this.query=r.queryParams,this.params=[].reduce.call(r,function(t,e){if(e.params)for(var n in e.params)t[n]=e.params[n];return t},{})),this.path=e,this.matched=r||n._notFoundHandler,Object.defineProperty(this,"router",{enumerable:!1,value:n}),Object.freeze(this)},rt=/\/$/,ot=/[-.*+?^${}()|[\]\/\\]/g,st=/\?.*$/,at={abstract:tt,hash:Z,html5:Y},ut=void 0,ct=function(){function t(){var e=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.hashbang,r=void 0===i||i,o=n.abstract,s=void 0!==o&&o,a=n.history,u=void 0!==a&&a,c=n.saveScrollPosition,h=void 0!==c&&c,l=n.transitionOnLoad,f=void 0!==l&&l,p=n.suppressTransitionError,d=void 0!==p&&p,v=n.root,g=void 0===v?null:v,b=n.linkActiveClass,m=void 0===b?"v-link-active":b;if(W.classCallCheck(this,t),!t.installed)throw new Error("Please install the Router with Vue.use() before creating an instance.");this.app=null,this._children=[],this._recognizer=new G,this._guardRecognizer=new G,this._started=!1,this._startCb=null,this._currentRoute={},this._currentTransition=null,this._previousTransition=null,this._notFoundHandler=null,this._notFoundRedirect=null,this._beforeEachHooks=[],this._afterEachHooks=[],this._rendered=!1,this._transitionOnLoad=f,this._root=g,this._abstract=s,this._hashbang=r;var y="undefined"!=typeof window&&window.history&&window.history.pushState;this._history=u&&y,this._historyFallback=u&&!y;var w=ut.util.inBrowser;this.mode=!w||this._abstract?"abstract":this._history?"html5":"hash";var _=at[this.mode];this.history=new _({root:g,hashbang:this._hashbang,onChange:function(t,n,i){e._match(t,n,i)}}),this._saveScrollPosition=h,this._linkActiveClass=m,this._suppress=d}return t.prototype.map=function(t){for(var e in t)this.on(e,t[e]);return this},t.prototype.on=function(t,e){return"*"===t?this._notFound(e):this._addRoute(t,e,[]),this},t.prototype.redirect=function(t){for(var e in t)this._addRedirect(e,t[e]);return this},t.prototype.alias=function(t){for(var e in t)this._addAlias(e,t[e]);return this},t.prototype.beforeEach=function(t){return this._beforeEachHooks.push(t),this},t.prototype.afterEach=function(t){return this._afterEachHooks.push(t),this},t.prototype.go=function(t){var e=!1,n=!1;ut.util.isObject(t)&&(e=t.replace,n=t.append),t=this.stringifyPath(t),t&&this.history.go(t,e,n)},t.prototype.replace=function(t){"string"==typeof t&&(t={path:t}),t.replace=!0,this.go(t)},t.prototype.start=function(t,e,n){if(this._started)return void _("already started.");if(this._started=!0,this._startCb=n,!this.app){if(!t||!e)throw new Error("Must start vue-router with a component and a root container.");if(t instanceof ut)throw new Error("Must start vue-router with a component, not a Vue instance.");this._appContainer=e;var i=this._appConstructor="function"==typeof t?t:ut.extend(t);i.options.name=i.options.name||"RouterApp"}if(this._historyFallback){var r=window.location,o=new Y({root:this._root}),s=o.root?r.pathname.replace(o.rootRE,""):r.pathname;if(s&&"/"!==s)return void r.assign((o.root||"")+"/"+this.history.formatPath(s)+r.search)}this.history.start()},t.prototype.stop=function(){this.history.stop(),this._started=!1},t.prototype.stringifyPath=function(t){var e="";if(t&&"object"==typeof t){if(t.name){var n=ut.util.extend,i=this._currentTransition&&this._currentTransition.to.params,r=t.params||{},o=i?n(n({},i),r):r;e=encodeURI(this._recognizer.generate(t.name,o))}else t.path&&(e=encodeURI(t.path));if(t.query){var s=this._recognizer.generateQueryString(t.query);e+=e.indexOf("?")>-1?"&"+s.slice(1):s}}else e=encodeURI(t?t+"":"");return e},t.prototype._addRoute=function(t,e,n){if(U(t,e),e.path=t,e.fullPath=(n.reduce(function(t,e){return t+e.path},"")+t).replace("//","/"),n.push({path:t,handler:e}),this._recognizer.add(n,{as:e.name}),e.subRoutes)for(var i in e.subRoutes)this._addRoute(i,e.subRoutes[i],n.slice())},t.prototype._notFound=function(t){U("*",t),this._notFoundHandler=[{handler:t}]},t.prototype._addRedirect=function(t,e){"*"===t?this._notFoundRedirect=e:this._addGuard(t,e,this.replace)},t.prototype._addAlias=function(t,e){this._addGuard(t,e,this._match)},t.prototype._addGuard=function(t,e,n){var i=this;this._guardRecognizer.add([{path:t,handler:function(t,r){var o=E(e,t.params,r);n.call(i,o)}}])},t.prototype._checkGuard=function(t){var e=this._guardRecognizer.recognize(t,!0);return e?(e[0].handler(e[0],e.queryParams),!0):this._notFoundRedirect&&(e=this._recognizer.recognize(t),!e)?(this.replace(this._notFoundRedirect),!0):void 0},t.prototype._match=function(t,e,n){var i=this;if(!this._checkGuard(t)){var r=this._currentRoute,o=this._currentTransition;if(o){if(o.to.path===t)return;if(r.path===t)return o.aborted=!0,void(this._currentTransition=this._prevTransition);o.aborted=!0}var s=new it(t,this),a=new et(this,s,r);this._prevTransition=o,this._currentTransition=a,this.app||!function(){var t=i;i.app=new i._appConstructor({el:i._appContainer,created:function(){this.$router=t},_meta:{$route:s}})}();var u=this._beforeEachHooks,c=function(){a.start(function(){i._postTransition(s,e,n)})};u.length?a.runQueue(u,function(t,e,n){a===i._currentTransition&&a.callHook(t,null,n,{expectBoolean:!0})},c):c(),!this._rendered&&this._startCb&&this._startCb.call(null),this._rendered=!0}},t.prototype._onTransitionValidated=function(t){var e=this._currentRoute=t.to;this.app.$route!==e&&(this.app.$route=e,this._children.forEach(function(t){t.$route=e})),this._afterEachHooks.length&&this._afterEachHooks.forEach(function(e){return e.call(null,{to:t.to,from:t.from})}),this._currentTransition.done=!0},t.prototype._postTransition=function(t,e,n){var i=e&&e.pos;i&&this._saveScrollPosition?ut.nextTick(function(){window.scrollTo(i.x,i.y)}):n&&ut.nextTick(function(){var t=document.getElementById(n.slice(1));t&&window.scrollTo(window.scrollX,t.offsetTop)})},t}();return ct.installed=!1,ct.install=function(t){return ct.installed?void _("already installed."):(ut=t,D(ut),L(ut),H(ut),K.Vue=ut,void(ct.installed=!0))},"undefined"!=typeof window&&window.Vue&&window.Vue.use(ct),ct})},function(t,e,n){var i=n(48);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(49);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(50);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(51);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(52);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(53);"string"==typeof i&&(i=[[t.id,i,""]]);n(2)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){/*! + * Vue.js v1.0.28 * (c) 2016 Evan You * Released under the MIT License. */ -"use strict";function n(t,e,i){if(r(t,e))return void(t[e]=i);if(t._isVue)return void n(t._data,e,i);var o=t.__ob__;if(!o)return void(t[e]=i);if(o.convert(e,i),o.dep.notify(),o.vms)for(var s=o.vms.length;s--;){var a=o.vms[s];a._proxy(e),a._digest()}return i}function i(t,e){if(r(t,e)){delete t[e];var n=t.__ob__;if(!n)return void(t._isVue&&(delete t._data[e],t._digest()));if(n.dep.notify(),n.vms)for(var i=n.vms.length;i--;){var o=n.vms[i];o._unproxy(e),o._digest()}}}function r(t,e){return Fn.call(t,e)}function o(t){return jn.test(t)}function s(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function a(t){return null==t?"":t.toString()}function u(t){if("string"!=typeof t)return t;var e=Number(t);return isNaN(e)?t:e}function h(t){return"true"===t||"false"!==t&&t}function c(t){var e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e!==n||34!==e&&39!==e?t:t.slice(1,-1)}function l(t){return t.replace($n,f)}function f(t,e){return e?e.toUpperCase():""}function p(t){return t.replace(Pn,"$1-$2").toLowerCase()}function d(t){return t.replace(Rn,f)}function v(t,e){return function(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}}function g(t,e){e=e||0;for(var n=t.length-e,i=new Array(n);n--;)i[n]=t[n+e];return i}function m(t,e){for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t}function b(t){return null!==t&&"object"==typeof t}function y(t){return Nn.call(t)===Mn}function w(t,e,n,i){Object.defineProperty(t,e,{value:n,enumerable:!!i,writable:!0,configurable:!0})}function _(t,e){var n,i,r,o,s,a=function u(){var a=Date.now()-o;a=0?n=setTimeout(u,e-a):(n=null,s=t.apply(r,i),n||(r=i=null))};return function(){return r=this,i=arguments,o=Date.now(),n||(n=setTimeout(a,e)),s}}function k(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function x(t){var e=function n(){if(!n.cancelled)return t.apply(this,arguments)};return e.cancel=function(){e.cancelled=!0},e}function C(t,e){return t==e||!(!b(t)||!b(e))&&JSON.stringify(t)===JSON.stringify(e)}function E(t){this.size=0,this.limit=t,this.head=this.tail=void 0,this._keymap=Object.create(null)}function A(){var t,e=ri.slice(ci,ui).trim();if(e){t={};var n=e.match(mi);t.name=n[0],n.length>1&&(t.args=n.slice(1).map(O))}t&&(oi.filters=oi.filters||[]).push(t),ci=ui+1}function O(t){if(bi.test(t))return{value:u(t),dynamic:!1};var e=c(t),n=e===t;return{value:n?t:e,dynamic:n}}function S(t){var e=gi.get(t);if(e)return e;for(ri=t,li=fi=!1,pi=di=vi=0,ci=0,oi={},ui=0,hi=ri.length;uih&&u.push({value:t.slice(h,i)}),r=xi.test(n[0]),o=r?n[1]:n[2],s=o.charCodeAt(0),a=42===s,o=a?o.slice(1):o,u.push({tag:!0,value:o.trim(),html:r,oneTime:a}),h=i+n[0].length;return h1?t.map(function(t){return P(t,e)}).join("+"):P(t[0],e,!0)}function P(t,e,n){return t.tag?t.oneTime&&e?'"'+e.$eval(t.value)+'"':R(t.value,n):'"'+t.value+'"'}function R(t,e){if(Ci.test(t)){var n=S(t);return n.filters?"this._applyFilters("+n.expression+",null,"+JSON.stringify(n.filters)+",false)":"("+t+")"}return e?t:"("+t+")"}function N(t,e,n,i){I(t,1,function(){e.appendChild(t)},n,i)}function M(t,e,n,i){I(t,1,function(){B(t,e)},n,i)}function D(t,e,n){I(t,-1,function(){X(t)},e,n)}function I(t,e,n,i,r){var o=t.__v_trans;if(!o||!o.hooks&&!Yn||!i._isCompiled||i.$parent&&!i.$parent._isCompiled)return n(),void(r&&r());var s=e>0?"enter":"leave";o[s](n,r)}function L(t){if("string"==typeof t){t=document.querySelector(t)}return t}function W(t){if(!t)return!1;var e=t.ownerDocument.documentElement,n=t.parentNode;return e===t||e===n||!(!n||1!==n.nodeType||!e.contains(n))}function H(t,e){var n=t.getAttribute(e);return null!==n&&t.removeAttribute(e),n}function U(t,e){var n=H(t,":"+e);return null===n&&(n=H(t,"v-bind:"+e)),n}function q(t,e){return t.hasAttribute(e)||t.hasAttribute(":"+e)||t.hasAttribute("v-bind:"+e)}function B(t,e){e.parentNode.insertBefore(t,e)}function V(t,e){e.nextSibling?B(t,e.nextSibling):e.parentNode.appendChild(t)}function X(t){t.parentNode.removeChild(t)}function Q(t,e){e.firstChild?B(t,e.firstChild):e.appendChild(t)}function K(t,e){var n=t.parentNode;n&&n.replaceChild(e,t)}function z(t,e,n,i){t.addEventListener(e,n,i)}function Y(t,e,n){t.removeEventListener(e,n)}function J(t){var e=t.className;return"object"==typeof e&&(e=e.baseVal||""),e}function G(t,e){qn&&!/svg$/.test(t.namespaceURI)?t.className=e:t.setAttribute("class",e)}function Z(t,e){if(t.classList)t.classList.add(e);else{var n=" "+J(t)+" ";n.indexOf(" "+e+" ")<0&&G(t,(n+e).trim())}}function tt(t,e){if(t.classList)t.classList.remove(e);else{for(var n=" "+J(t)+" ",i=" "+e+" ";n.indexOf(i)>=0;)n=n.replace(i," ");G(t,n.trim())}t.className||t.removeAttribute("class")}function et(t,e){var n,i;if(rt(t)&&ht(t.content)&&(t=t.content),t.hasChildNodes())for(nt(t),i=e?document.createDocumentFragment():document.createElement("div");n=t.firstChild;)i.appendChild(n);return i}function nt(t){for(var e;e=t.firstChild,it(e);)t.removeChild(e);for(;e=t.lastChild,it(e);)t.removeChild(e)}function it(t){return t&&(3===t.nodeType&&!t.data.trim()||8===t.nodeType)}function rt(t){return t.tagName&&"template"===t.tagName.toLowerCase()}function ot(t,e){var n=Si.debug?document.createComment(t):document.createTextNode(e?" ":"");return n.__v_anchor=!0,n}function st(t){if(t.hasAttributes())for(var e=t.attributes,n=0,i=e.length;n=u.length){for(var t=0;t=97&&e<=122||e>=65&&e<=90?"ident":e>=49&&e<=57?"number":"else"}function Tt(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(o(e)?c(e):"*"+e)}function Ft(t){function e(){var e=t[c+1];if(l===Zi&&"'"===e||l===tr&&'"'===e)return c++,i="\\"+e,p[Bi](),!0}var n,i,r,o,s,a,u,h=[],c=-1,l=Ki,f=0,p=[];for(p[Vi]=function(){void 0!==r&&(h.push(r),r=void 0)},p[Bi]=function(){void 0===r?r=i:r+=i},p[Xi]=function(){p[Bi](),f++},p[Qi]=function(){if(f>0)f--,l=Gi,p[Bi]();else{if(f=0,r=Tt(r),r===!1)return!1;p[Vi]()}};null!=l;)if(c++,n=t[c],"\\"!==n||!e()){if(o=St(n),u=ir[l],s=u[o]||u["else"]||nr,s===nr)return;if(l=s[0],a=p[s[1]],a&&(i=s[2],i=void 0===i?n:i,a()===!1))return;if(l===er)return h.raw=t,h}}function jt(t){var e=qi.get(t);return e||(e=Ft(t),e&&qi.put(t,e)),e}function $t(t,e){return Ht(e).get(t)}function Pt(t,e,i){var r=t;if("string"==typeof e&&(e=Ft(e)),!e||!b(t))return!1;for(var o,s,a=0,u=e.length;a-1?n.replace(pr,Dt):n,e+"scope."+n)}function Dt(t,e){return mr[e]}function It(t){hr.test(t),mr.length=0;var e=t.replace(fr,Nt).replace(cr,"");return e=(" "+e).replace(vr,Mt).replace(pr,Dt),Lt(e)}function Lt(t){try{return new Function("scope","return "+t+";")}catch(e){return Rt}}function Wt(t){var e=jt(t);if(e)return function(t,n){Pt(t,e,n)}}function Ht(t,e){t=t.trim();var n=or.get(t);if(n)return e&&!n.set&&(n.set=Wt(n.exp)),n;var i={exp:t};return i.get=Ut(t)&&t.indexOf("[")<0?Lt("scope."+t):It(t),e&&(i.set=Wt(t)),or.put(t,i),i}function Ut(t){return dr.test(t)&&!gr.test(t)&&"Math."!==t.slice(0,5)}function qt(){yr.length=0,wr.length=0,_r={},kr={},xr=!1}function Bt(){for(var t=!0;t;)t=!1,Vt(yr),Vt(wr),yr.length?t=!0:(Wn&&Si.devtools&&Wn.emit("flush"),qt())}function Vt(t){for(var e=0;e0){var s=o+(i?e:ct(e));r=Dr.get(s),r||(r=Me(n,t.$options,!0),Dr.put(s,r))}else r=Me(n,t.$options,!0);this.linker=r}function ue(t,e,n){var i=t.node.previousSibling;if(i){for(t=i.__v_frag;!(t&&t.forId===n&&t.inserted||i===e);){if(i=i.previousSibling,!i)return;t=i.__v_frag}return t}}function he(t){var e=t.node;if(t.end)for(;!e.__vue__&&e!==t.end&&e.nextSibling;)e=e.nextSibling;return e.__vue__}function ce(t){for(var e=-1,n=new Array(Math.floor(t));++e47&&e<58?parseInt(t,10):1===t.length&&(e=t.toUpperCase().charCodeAt(0),e>64&&e<91)?e:ro[t]});return n=[].concat.apply([],n),function(e){if(n.indexOf(e.keyCode)>-1)return t.call(this,e)}}function ve(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function ge(t){return function(e){return e.preventDefault(),t.call(this,e)}}function me(t){return function(e){if(e.target===e.currentTarget)return t.call(this,e)}}function be(t){if(ho[t])return ho[t];var e=ye(t);return ho[t]=ho[e]=e,e}function ye(t){t=p(t);var e=l(t),n=e.charAt(0).toUpperCase()+e.slice(1);co||(co=document.createElement("div"));var i,r=so.length;if("filter"!==e&&e in co.style)return{kebab:t,camel:e};for(;r--;)if(i=ao[r]+n,i in co.style)return{kebab:so[r]+t,camel:i}}function we(t){var e=[];if(Dn(t))for(var n=0,i=t.length;n=r?n():t[o].call(e,i)}var r=t.length,o=0;t[0].call(e,i)}function xe(t,e,n){for(var i,r,s,a,u,h,c,f=[],d=Object.keys(e),v=d.length;v--;)if(r=d[v],i=e[r]||Oo,u=l(r),So.test(u)){if(c={name:r,path:u,options:i,mode:Ao.ONE_WAY,raw:null},s=p(r),null===(a=U(t,s))&&(null!==(a=U(t,s+".sync"))?c.mode=Ao.TWO_WAY:null!==(a=U(t,s+".once"))&&(c.mode=Ao.ONE_TIME)),null!==a)c.raw=a,h=S(a),a=h.expression,c.filters=h.filters,o(a)&&!h.filters?c.optimizedLiteral=!0:c.dynamic=!0,c.parentPath=a;else if(null!==(a=H(t,s)))c.raw=a;else;f.push(c)}return Ce(f)}function Ce(t){return function(e,n){e._props={};for(var i,o,s,a,l,f=e.$options.propsData,d=t.length;d--;)if(i=t[d],l=i.raw,o=i.path,s=i.options,e._props[o]=i,f&&r(f,o)&&Ae(e,i,f[o]),null===l)Ae(e,i,void 0);else if(i.dynamic)i.mode===Ao.ONE_TIME?(a=(n||e._context||e).$get(i.parentPath),Ae(e,i,a)):e._context?e._bindDir({name:"prop",def:Fo,prop:i},null,null,n):Ae(e,i,e.$get(i.parentPath));else if(i.optimizedLiteral){var v=c(l);a=v===l?h(u(l)):v,Ae(e,i,a)}else a=s.type===Boolean&&(""===l||l===p(i.name))||l,Ae(e,i,a)}}function Ee(t,e,n,i){var r=e.dynamic&&Ut(e.parentPath),o=n;void 0===o&&(o=Se(t,e)),o=Fe(e,o,t);var s=o!==n;Te(e,o,t)||(o=void 0),r&&!s?_t(function(){i(o)}):i(o)}function Ae(t,e,n){Ee(t,e,n,function(n){At(t,e.path,n)})}function Oe(t,e,n){Ee(t,e,n,function(n){t[e.path]=n})}function Se(t,e){var n=e.options;if(!r(n,"default"))return n.type!==Boolean&&void 0;var i=n["default"];return b(i),"function"==typeof i&&n.type!==Function?i.call(t):i}function Te(t,e,n){if(!t.options.required&&(null===t.raw||null==e))return!0;var i=t.options,r=i.type,o=!r,s=[];if(r){Dn(r)||(r=[r]);for(var a=0;ae?-1:t===e?0:1}function Le(t,e,n,i){function r(r){We(t,e,r),n&&i&&We(n,i)}return r.dirs=e,r}function We(t,e,n){for(var i=e.length;i--;)e[i]._teardown()}function He(t,e,n,i){var r=xe(e,n,t),o=De(function(){r(t,i)},t);return Le(t,o)}function Ue(t,e,n){var i,r,o=e._containerAttrs,s=e._replacerAttrs;if(11!==t.nodeType)e._asComponent?(o&&n&&(i=nn(o,n)),s&&(r=nn(s,e))):r=nn(t.attributes,e);else;return e._containerAttrs=e._replacerAttrs=null,function(t,e,n){var o,s=t._context;s&&i&&(o=De(function(){i(s,e,null,n)},s));var a=De(function(){r&&r(t,e)},t);return Le(t,a,s,o)}}function qe(t,e){var n=t.nodeType;return 1!==n||an(t)?3===n&&t.data.trim()?Ve(t,e):null:Be(t,e)}function Be(t,e){if("TEXTAREA"===t.tagName){var n=j(t.value);n&&(t.setAttribute(":value",$(n)),t.value="")}var i,r=t.hasAttributes(),o=r&&g(t.attributes);return r&&(i=Ze(t,o,e)),i||(i=Je(t,e)),i||(i=Ge(t,e)),!i&&r&&(i=nn(o,e)),i}function Ve(t,e){if(t._skip)return Xe;var n=j(t.wholeText);if(!n)return null;for(var i=t.nextSibling;i&&3===i.nodeType;)i._skip=!0,i=i.nextSibling;for(var r,o,s=document.createDocumentFragment(),a=0,u=n.length;ap.priority)&&(p=f,c=r.name,a=rn(r.name),s=r.value,h=u[1],l=u[2]));return p?en(t,h,s,n,p,c,l,a):void 0}function tn(){}function en(t,e,n,i,r,o,s,a){var u=S(n),h={name:e,arg:s,expression:u.expression,filters:u.filters,raw:n,attr:o,modifiers:a,def:r};"for"!==e&&"router-view"!==e||(h.ref=st(t));var c=function(t,e,n,i,r){h.ref&&At((i||t).$refs,h.ref,null),t._bindDir(h,e,n,i,r)};return c.terminal=!0,c}function nn(t,e){function n(t,e,n){var i=n&&sn(n),r=!i&&S(o);v.push({name:t,attr:s,raw:a,def:e,arg:h,modifiers:c,expression:r&&r.expression,filters:r&&r.filters,interp:n,hasOneTime:i})}for(var i,r,o,s,a,u,h,c,l,f,p,d=t.length,v=[];d--;)if(i=t[d],r=s=i.name,o=a=i.value,f=j(o),h=null,c=rn(r),r=r.replace(Vo,""),f)o=$(f),h=r,n("bind",xo.bind,f);else if(Xo.test(r))c.literal=!Uo.test(r),n("transition",Ho.transition);else if(qo.test(r))h=r.replace(qo,""),n("on",xo.on);else if(Uo.test(r))u=r.replace(Uo,""),"style"===u||"class"===u?n(u,Ho[u]):(h=u,n("bind",xo.bind));else if(p=r.match(Bo)){if(u=p[1],h=p[2],"else"===u)continue;l=yt(e,"directives",u,!0),l&&n(u,l)}if(v.length)return on(v)}function rn(t){var e=Object.create(null),n=t.match(Vo);if(n)for(var i=n.length;i--;)e[n[i].slice(1)]=!0;return e}function on(t){return function(e,n,i,r,o){for(var s=t.length;s--;)e._bindDir(t[s],n,i,r,o)}}function sn(t){for(var e=t.length;e--;)if(t[e].oneTime)return!0}function an(t){return"SCRIPT"===t.tagName&&(!t.hasAttribute("type")||"text/javascript"===t.getAttribute("type"))}function un(t,e){return e&&(e._containerAttrs=cn(t)),rt(t)&&(t=Zt(t)),e&&(e._asComponent&&!e.template&&(e.template=""),e.template&&(e._content=et(t),t=hn(t,e))),ht(t)&&(Q(ot("v-start",!0),t),t.appendChild(ot("v-end",!0))),t}function hn(t,e){var n=e.template,i=Zt(n,!0);if(i){var r=i.firstChild,o=r.tagName&&r.tagName.toLowerCase();return e.replace?(t===document.body,i.childNodes.length>1||1!==r.nodeType||"component"===o||yt(e,"components",o)||q(r,"is")||yt(e,"elementDirectives",o)||r.hasAttribute("v-for")||r.hasAttribute("v-if")?i:(e._replacerAttrs=cn(r),ln(t,r),r)):(t.appendChild(i),t)}}function cn(t){if(1===t.nodeType&&t.hasAttributes())return g(t.attributes)}function ln(t,e){for(var n,i,r=t.attributes,o=r.length;o--;)n=r[o].name,i=r[o].value,e.hasAttribute(n)||zo.test(n)?"class"===n&&!j(i)&&(i=i.trim())&&i.split(/\s+/).forEach(function(t){Z(e,t)}):e.setAttribute(n,i)}function fn(t,e){if(e){for(var n,i,r=t._slotContents=Object.create(null),o=0,s=e.children.length;o1?g(n):n;var r=e&&n.some(function(t){return t._fromParent});r&&(i=!1);for(var o=g(arguments,1),s=0,a=n.length;se?o:-o}var n=null,i=void 0;t=ns(t);var r=g(arguments,1),o=r[r.length-1];"number"==typeof o?(o=o<0?-1:1,r=r.length>1?r.slice(0,-1):r):o=1;var s=r[0];return s?("function"==typeof s?n=function(t,e){return s(t,e)*o}:(i=Array.prototype.concat.apply([],r),n=function(t,r,o){return o=o||0,o>=i.length-1?e(t,r,o):e(t,r,o)||n(t,r,o+1)}),t.slice().sort(n)):t}function Sn(t,e){var n;if(y(t)){var i=Object.keys(t);for(n=i.length;n--;)if(Sn(t[i[n]],e))return!0}else if(Dn(t)){for(n=t.length;n--;)if(Sn(t[n],e))return!0}else if(null!=t)return t.toString().toLowerCase().indexOf(e)>-1}function Tn(t){function e(t){return new Function("return function "+d(t)+" (options) { this._init(options) }")()}t.options={directives:xo,elementDirectives:es,filters:rs,transitions:{},components:{},partials:{},replace:!0},t.util=Hi,t.config=Si,t.set=n,t["delete"]=i,t.nextTick=ei,t.compiler=Yo,t.FragmentFactory=ae,t.internalDirectives=Ho,t.parsers={path:rr,text:Ei,template:Nr,directive:yi,expression:br},t.cid=0;var r=1;t.extend=function(t){t=t||{};var n=this,i=0===n.cid;if(i&&t._Ctor)return t._Ctor;var o=t.name||n.options.name,s=e(o||"VueComponent");return s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.cid=r++,s.options=bt(n.options,t),s["super"]=n,s.extend=n.extend,Si._assetTypes.forEach(function(t){s[t]=n[t]}),o&&(s.options.components[o]=s),i&&(t._Ctor=s),s},t.use=function(t){if(!t.installed){var e=g(arguments,1);return e.unshift(this),"function"==typeof t.install?t.install.apply(t,e):t.apply(null,e),t.installed=!0,this}},t.mixin=function(e){t.options=bt(t.options,e)},Si._assetTypes.forEach(function(e){t[e]=function(n,i){return i?("component"===e&&y(i)&&(i.name||(i.name=n),i=t.extend(i)),this.options[e+"s"][n]=i,i):this.options[e+"s"][n]}}),m(t.transition,Fi)}var Fn=Object.prototype.hasOwnProperty,jn=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/,$n=/-(\w)/g,Pn=/([a-z\d])([A-Z])/g,Rn=/(?:^|[-_\/])(\w)/g,Nn=Object.prototype.toString,Mn="[object Object]",Dn=Array.isArray,In="__proto__"in{},Ln="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Wn=Ln&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Hn=Ln&&window.navigator.userAgent.toLowerCase(),Un=Hn&&Hn.indexOf("trident")>0,qn=Hn&&Hn.indexOf("msie 9.0")>0,Bn=Hn&&Hn.indexOf("android")>0,Vn=Hn&&/(iphone|ipad|ipod|ios)/i.test(Hn),Xn=Vn&&Hn.match(/os ([\d_]+)/),Qn=Xn&&Xn[1].split("_"),Kn=Qn&&Number(Qn[0])>=9&&Number(Qn[1])>=3&&!window.indexedDB,zn=void 0,Yn=void 0,Jn=void 0,Gn=void 0;if(Ln&&!qn){var Zn=void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend,ti=void 0===window.onanimationend&&void 0!==window.onwebkitanimationend;zn=Zn?"WebkitTransition":"transition",Yn=Zn?"webkitTransitionEnd":"transitionend",Jn=ti?"WebkitAnimation":"animation",Gn=ti?"webkitAnimationEnd":"animationend"}var ei=function(){function t(){r=!1;var t=i.slice(0);i=[];for(var e=0;e=this.length&&(this.length=Number(t)+1),this.splice(t,1,e)[0]}),w(Di,"$remove",function(t){if(this.length){var e=k(this,t);return e>-1?this.splice(e,1):void 0}});var Li=Object.getOwnPropertyNames(Ii),Wi=!0;kt.prototype.walk=function(t){for(var e=Object.keys(t),n=0,i=e.length;n",""],tr:[2,"","
    "],col:[2,"","
    "]};Tr.td=Tr.th=[3,"","
    "],Tr.option=Tr.optgroup=[1,'"],Tr.thead=Tr.tbody=Tr.colgroup=Tr.caption=Tr.tfoot=[1,"","
    "],Tr.g=Tr.defs=Tr.symbol=Tr.use=Tr.image=Tr.text=Tr.circle=Tr.ellipse=Tr.line=Tr.path=Tr.polygon=Tr.polyline=Tr.rect=[1,'',""];var Fr=/<([\w:-]+)/,jr=/&#?\w+?;/,$r=/