From fd18f95a954d66778d6c5baad4505b32c036ae7f Mon Sep 17 00:00:00 2001 From: Rhea Myers Date: Wed, 23 Mar 2016 21:11:31 -0700 Subject: [PATCH] Starting to put dapps and tokens live. --- README | 13 +- .../hot-cold/app/.meteor/.finished-upgraders | 12 ++ dapps/hot-cold/app/.meteor/.gitignore | 1 + dapps/hot-cold/app/.meteor/.id | 7 + dapps/hot-cold/app/.meteor/packages | 23 +++ dapps/hot-cold/app/.meteor/platforms | 2 + dapps/hot-cold/app/.meteor/release | 1 + dapps/hot-cold/app/.meteor/versions | 80 +++++++++ dapps/hot-cold/app/hot-cold.css | 20 +++ dapps/hot-cold/app/hot-cold.html | 21 +++ dapps/hot-cold/app/hot-cold.js | 109 ++++++++++++ dapps/hot-cold/contracts/HotCold.sol | 43 +++++ .../environments/development/config.json | 1 + .../development/contracts/HotCold.sol.js | 54 ++++++ ...a12b0c587d0c3fc86e13eb88dd682075bee7571.js | 160 ++++++++++++++++++ ...83e79be77b9c80950c57a5fe6dc91e7ae62f89.css | 1 + .../development/meteor/index.html | 12 ++ .../ethereum_elements/identicon-load.gif | Bin 0 -> 313159 bytes .../environments/production/config.json | 1 + .../hot-cold/environments/staging/config.json | 1 + dapps/hot-cold/environments/test/config.json | 1 + .../test/contracts/HotCold.sol.js | 54 ++++++ dapps/hot-cold/test/hotcold.js | 48 ++++++ dapps/hot-cold/truffle.json | 30 ++++ dapps/is-art/app/.meteor/.finished-upgraders | 12 ++ dapps/is-art/app/.meteor/.gitignore | 1 + dapps/is-art/app/.meteor/.id | 7 + dapps/is-art/app/.meteor/packages | 23 +++ dapps/is-art/app/.meteor/platforms | 2 + dapps/is-art/app/.meteor/release | 1 + dapps/is-art/app/.meteor/versions | 80 +++++++++ dapps/is-art/app/is-art.css | 18 ++ dapps/is-art/app/is-art.html | 18 ++ dapps/is-art/app/is-art.js | 94 ++++++++++ dapps/is-art/contracts/IsArt.sol | 37 ++++ .../environments/development/config.json | 1 + .../development/contracts/IsArt.sol.js | 54 ++++++ ...33c4f5086e14f1bf08b5a2b7872f3d4f2c9b36.css | 1 + ...d24f86999e903b61ab658420b20d584bf400bc1.js | 160 ++++++++++++++++++ .../development/meteor/index.html | 12 ++ .../ethereum_elements/identicon-load.gif | Bin 0 -> 313159 bytes .../environments/production/config.json | 8 + .../production/contracts/IsArt.sol.js | 65 +++++++ dapps/is-art/environments/staging/config.json | 1 + dapps/is-art/environments/test/config.json | 1 + .../environments/test/contracts/IsArt.sol.js | 54 ++++++ dapps/is-art/test/isart.js | 32 ++++ dapps/is-art/truffle.json | 31 ++++ tokens/contracts/MyToken.sol | 115 +++++++++++++ tokens/details/aesthetic.md | 24 +++ tokens/details/star.md | 24 +++ 51 files changed, 1569 insertions(+), 2 deletions(-) create mode 100644 dapps/hot-cold/app/.meteor/.finished-upgraders create mode 100644 dapps/hot-cold/app/.meteor/.gitignore create mode 100644 dapps/hot-cold/app/.meteor/.id create mode 100644 dapps/hot-cold/app/.meteor/packages create mode 100644 dapps/hot-cold/app/.meteor/platforms create mode 100644 dapps/hot-cold/app/.meteor/release create mode 100644 dapps/hot-cold/app/.meteor/versions create mode 100644 dapps/hot-cold/app/hot-cold.css create mode 100644 dapps/hot-cold/app/hot-cold.html create mode 100644 dapps/hot-cold/app/hot-cold.js create mode 100644 dapps/hot-cold/contracts/HotCold.sol create mode 100644 dapps/hot-cold/environments/development/config.json create mode 100644 dapps/hot-cold/environments/development/contracts/HotCold.sol.js create mode 100644 dapps/hot-cold/environments/development/meteor/3a12b0c587d0c3fc86e13eb88dd682075bee7571.js create mode 100644 dapps/hot-cold/environments/development/meteor/8983e79be77b9c80950c57a5fe6dc91e7ae62f89.css create mode 100644 dapps/hot-cold/environments/development/meteor/index.html create mode 100644 dapps/hot-cold/environments/development/meteor/packages/ethereum_elements/identicon-load.gif create mode 100644 dapps/hot-cold/environments/production/config.json create mode 100644 dapps/hot-cold/environments/staging/config.json create mode 100644 dapps/hot-cold/environments/test/config.json create mode 100644 dapps/hot-cold/environments/test/contracts/HotCold.sol.js create mode 100644 dapps/hot-cold/test/hotcold.js create mode 100644 dapps/hot-cold/truffle.json create mode 100644 dapps/is-art/app/.meteor/.finished-upgraders create mode 100644 dapps/is-art/app/.meteor/.gitignore create mode 100644 dapps/is-art/app/.meteor/.id create mode 100644 dapps/is-art/app/.meteor/packages create mode 100644 dapps/is-art/app/.meteor/platforms create mode 100644 dapps/is-art/app/.meteor/release create mode 100644 dapps/is-art/app/.meteor/versions create mode 100644 dapps/is-art/app/is-art.css create mode 100644 dapps/is-art/app/is-art.html create mode 100644 dapps/is-art/app/is-art.js create mode 100644 dapps/is-art/contracts/IsArt.sol create mode 100644 dapps/is-art/environments/development/config.json create mode 100644 dapps/is-art/environments/development/contracts/IsArt.sol.js create mode 100644 dapps/is-art/environments/development/meteor/b733c4f5086e14f1bf08b5a2b7872f3d4f2c9b36.css create mode 100644 dapps/is-art/environments/development/meteor/fd24f86999e903b61ab658420b20d584bf400bc1.js create mode 100644 dapps/is-art/environments/development/meteor/index.html create mode 100644 dapps/is-art/environments/development/meteor/packages/ethereum_elements/identicon-load.gif create mode 100644 dapps/is-art/environments/production/config.json create mode 100644 dapps/is-art/environments/production/contracts/IsArt.sol.js create mode 100644 dapps/is-art/environments/staging/config.json create mode 100644 dapps/is-art/environments/test/config.json create mode 100644 dapps/is-art/environments/test/contracts/IsArt.sol.js create mode 100644 dapps/is-art/test/isart.js create mode 100644 dapps/is-art/truffle.json create mode 100644 tokens/contracts/MyToken.sol create mode 100644 tokens/details/aesthetic.md create mode 100644 tokens/details/star.md diff --git a/README b/README index f4b8b65..0a9fe5a 100644 --- a/README +++ b/README @@ -3,9 +3,11 @@ Artworld Ethereum Ethereum art projects. -See projects/ for project sources. +See dapps/ for project sources. -truffle-meteor-build is a build helper script +truffle-meteor-build is a build helper script for dapps. + +See tokens/ for token details. Dependencies ------------ @@ -36,3 +38,10 @@ Then open the UI in a web browser chromium environments/development/meteor/index.html If you stop testrpc you'll need to deploy again when you restart it. + +Deploying +--------- + +Note that we use port 8546. + +geth --unlock --rpc --rpcport 8546 --rpccorsdomain localhost diff --git a/dapps/hot-cold/app/.meteor/.finished-upgraders b/dapps/hot-cold/app/.meteor/.finished-upgraders new file mode 100644 index 0000000..61ee313 --- /dev/null +++ b/dapps/hot-cold/app/.meteor/.finished-upgraders @@ -0,0 +1,12 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes diff --git a/dapps/hot-cold/app/.meteor/.gitignore b/dapps/hot-cold/app/.meteor/.gitignore new file mode 100644 index 0000000..4083037 --- /dev/null +++ b/dapps/hot-cold/app/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/dapps/hot-cold/app/.meteor/.id b/dapps/hot-cold/app/.meteor/.id new file mode 100644 index 0000000..682a57d --- /dev/null +++ b/dapps/hot-cold/app/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +lqwpxe55lh9nnszrp6 diff --git a/dapps/hot-cold/app/.meteor/packages b/dapps/hot-cold/app/.meteor/packages new file mode 100644 index 0000000..6853f18 --- /dev/null +++ b/dapps/hot-cold/app/.meteor/packages @@ -0,0 +1,23 @@ +# Meteor packages used by this project, one per line. +# Check this file (and the other files in this directory) into your repository. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +meteor-base # Packages every Meteor app needs to have +mobile-experience # Packages for a great mobile UX +mongo # The database Meteor supports right now +blaze-html-templates # Compile .html files into Meteor Blaze views +session # Client-side reactive dictionary for your app +jquery # Helpful client-side library +tracker # Meteor's client-side reactive programming library + +standard-minifiers # JS/CSS minifiers run for production mode +es5-shim # ECMAScript 5 compatibility for older browsers. +ecmascript # Enable ECMAScript2015+ syntax in app code + +autopublish # Publish all data to the clients (for prototyping) +insecure # Allow all DB writes from clients (for prototyping) +ethereum:elements +ethereum:accounts +frozeman:template-var diff --git a/dapps/hot-cold/app/.meteor/platforms b/dapps/hot-cold/app/.meteor/platforms new file mode 100644 index 0000000..efeba1b --- /dev/null +++ b/dapps/hot-cold/app/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/dapps/hot-cold/app/.meteor/release b/dapps/hot-cold/app/.meteor/release new file mode 100644 index 0000000..3a05e0a --- /dev/null +++ b/dapps/hot-cold/app/.meteor/release @@ -0,0 +1 @@ +METEOR@1.2.1 diff --git a/dapps/hot-cold/app/.meteor/versions b/dapps/hot-cold/app/.meteor/versions new file mode 100644 index 0000000..d515a69 --- /dev/null +++ b/dapps/hot-cold/app/.meteor/versions @@ -0,0 +1,80 @@ +3stack:bignumber@2.0.0 +alexvandesande:identicon@2.0.2 +amplify@1.0.0 +autopublish@1.0.4 +autoupdate@1.2.4 +babel-compiler@5.8.24_1 +babel-runtime@0.1.4 +base64@1.0.4 +binary-heap@1.0.4 +blaze@2.1.3 +blaze-html-templates@1.0.1 +blaze-tools@1.0.4 +boilerplate-generator@1.0.4 +caching-compiler@1.0.0 +caching-html-compiler@1.0.2 +callback-hook@1.0.4 +check@1.1.0 +ddp@1.2.2 +ddp-client@1.2.1 +ddp-common@1.2.2 +ddp-server@1.2.2 +deps@1.0.9 +diff-sequence@1.0.1 +ecmascript@0.1.6 +ecmascript-runtime@0.2.6 +ejson@1.0.7 +es5-shim@4.1.14 +ethereum:accounts@0.3.9 +ethereum:elements@0.6.5 +ethereum:tools@0.2.96 +ethereum:web3@0.15.1 +fastclick@1.0.7 +frozeman:animation-helper@0.2.6 +frozeman:persistent-minimongo@0.1.8 +frozeman:storage@0.1.9 +frozeman:template-var@1.2.3 +geojson-utils@1.0.4 +hot-code-push@1.0.0 +html-tools@1.0.5 +htmljs@1.0.5 +http@1.1.1 +id-map@1.0.4 +insecure@1.0.4 +jquery@1.11.4 +launch-screen@1.0.4 +less@2.5.1 +livedata@1.0.15 +localstorage@1.0.5 +logging@1.0.8 +meteor@1.1.10 +meteor-base@1.0.1 +minifiers@1.1.7 +minimongo@1.0.10 +mobile-experience@1.0.1 +mobile-status-bar@1.0.6 +mongo@1.1.3 +mongo-id@1.0.1 +npm-mongo@1.4.39_1 +numeral:numeral@1.5.3_1 +observe-sequence@1.0.7 +ordered-dict@1.0.4 +promise@0.5.1 +random@1.0.5 +reactive-dict@1.1.3 +reactive-var@1.0.6 +reload@1.1.4 +retry@1.0.4 +routepolicy@1.0.6 +session@1.1.1 +spacebars@1.0.7 +spacebars-compiler@1.0.7 +standard-minifiers@1.0.2 +templating@1.1.5 +templating-tools@1.0.0 +tracker@1.0.9 +ui@1.0.8 +underscore@1.0.4 +url@1.0.5 +webapp@1.2.3 +webapp-hashing@1.0.5 diff --git a/dapps/hot-cold/app/hot-cold.css b/dapps/hot-cold/app/hot-cold.css new file mode 100644 index 0000000..9147428 --- /dev/null +++ b/dapps/hot-cold/app/hot-cold.css @@ -0,0 +1,20 @@ +body { + text-align: center; + font-family: sans; +} + +h1 { + font-size: 72pt; +} + +h1 { + font-size: 128pt; +} + +#hot { + color: #550000; +} + +#cold { + color: #000044; +} diff --git a/dapps/hot-cold/app/hot-cold.html b/dapps/hot-cold/app/hot-cold.html new file mode 100644 index 0000000..f263eda --- /dev/null +++ b/dapps/hot-cold/app/hot-cold.html @@ -0,0 +1,21 @@ + + Hot/Cold + + + + {{> hot_cold }} + {{> dapp_modalPlaceholder}} + + + + + diff --git a/dapps/hot-cold/app/hot-cold.js b/dapps/hot-cold/app/hot-cold.js new file mode 100644 index 0000000..2a87e5d --- /dev/null +++ b/dapps/hot-cold/app/hot-cold.js @@ -0,0 +1,109 @@ +/* HotCold - Ethereum contract of relational physical/perceptual properties. + Copyright (C) 2015, 2016 Rhea Myers + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +var SWAP_ACCOUNT_SELECTOR = '.dapp-modal-container .dapp-select-account'; + +var bytesToString = function (value) { + return web3.toAscii(value).replace(/\0+$/, ""); +}; + +if (Meteor.isClient) { + + Template.hot_cold.helpers({ + hot: function () { + return Session.get('hot'); + }, + cold: function () { + return Session.get('cold'); + } + }); + + // Keep track of when we're updating the contract state on the blockchain + // and don't show the update dialog during that time so the user doesn't + // waste gas trying to change it again. + var updating = false; + + Template.hot_cold.events({ + 'click': function(){ + if (! updating) { + EthElements.Modal.question({ + template: 'swap_hot_cold', + data: { + my_accounts: EthAccounts.find().fetch() + }, + ok: function(){ + updating = true; + var hot_cold = HotCold.deployed(); + // Update the state on the blockchain + var account = TemplateVar.getFrom(SWAP_ACCOUNT_SELECTOR, 'value'); + hot_cold.swap({ from: account }).then(function(value) { + updating = false; + }).catch(function(e) { + console.log(e); + alert("Error sending toggling; see log."); + }); + }, + cancel: true + }); + } + } + }); + + // Why do we put this inside window.onload? + // Truffle adds init code *after* this file is inlined, so we can't access + // HotCold.deployed here as it doesn't exist until the init code is called. + window.onload = function() { + + EthAccounts.init(); + + var hot_cold = HotCold.deployed(); + + hot_cold.hot.call().then(function(value) { + var string_value = bytesToString(value); + Session.setDefault('hot', string_value); + }); + + hot_cold.cold.call().then(function(value) { + var string_value = bytesToString(value); + Session.setDefault('cold', string_value); + }); + + hot_cold.Swap({}, function(error, result){ + if (! error) { + // Store the new state in local storage, updating the UI as a result + // Session.set('hot', bytesToString(result.args.hot)); + // Session.set('hot', bytesToString(result.args.cold)); + // BUT events with more than one value are borked in webthree.js atm + hot_cold.hot.call().then(function(value) { + var string_value = bytesToString(value); + Session.set('hot', string_value); + }); + + hot_cold.cold.call().then(function(value) { + var string_value = bytesToString(value); + Session.set('cold', string_value); + }); + } + }); + }; +} + +if (Meteor.isServer) { + Meteor.startup(function () { + // code to run on server at startup + }); +} diff --git a/dapps/hot-cold/contracts/HotCold.sol b/dapps/hot-cold/contracts/HotCold.sol new file mode 100644 index 0000000..f234f40 --- /dev/null +++ b/dapps/hot-cold/contracts/HotCold.sol @@ -0,0 +1,43 @@ +/* HotCold - Ethereum contract of relational physical/perceptual properties. + Copyright (C) 2015, 2016 Rhea Myers + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +contract HotCold { + + // Public generates a getter, e.g contract.hot() + + bytes4 public hot; + bytes4 public cold; + + event Swap (bytes4 hot, bytes4 cold); + + // Swaps the values, so not const. And doesn't return a value, so no return. + + function swap () { + bytes4 temp = hot; + hot = cold; + cold = temp; + Swap(hot, cold); + } + + // Constructor, called during contract creation, cannot be called after + + function HotCold () { + cold = "cold"; + hot = "hot"; + } + +} diff --git a/dapps/hot-cold/environments/development/config.json b/dapps/hot-cold/environments/development/config.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/dapps/hot-cold/environments/development/config.json @@ -0,0 +1 @@ +{} diff --git a/dapps/hot-cold/environments/development/contracts/HotCold.sol.js b/dapps/hot-cold/environments/development/contracts/HotCold.sol.js new file mode 100644 index 0000000..7734cc2 --- /dev/null +++ b/dapps/hot-cold/environments/development/contracts/HotCold.sol.js @@ -0,0 +1,54 @@ +"use strict"; + +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var factory = function factory(Pudding) { + // Inherit from Pudding. The dependency on Babel sucks, but it's + // the easiest way to extend a Babel-based class. Note that the + // resulting .js file does not have a dependency on Babel. + + var HotCold = (function (_Pudding) { + _inherits(HotCold, _Pudding); + + function HotCold() { + _classCallCheck(this, HotCold); + + _get(Object.getPrototypeOf(HotCold.prototype), "constructor", this).apply(this, arguments); + } + + return HotCold; + })(Pudding); + + ; + + // Set up specific data for this class. + HotCold.abi = [{ "constant": true, "inputs": [], "name": "cold", "outputs": [{ "name": "", "type": "bytes4" }], "type": "function" }, { "constant": false, "inputs": [], "name": "swap", "outputs": [], "type": "function" }, { "constant": true, "inputs": [], "name": "hot", "outputs": [{ "name": "", "type": "bytes4" }], "type": "function" }, { "inputs": [], "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "hot", "type": "bytes4" }, { "indexed": false, "name": "cold", "type": "bytes4" }], "name": "Swap", "type": "event" }]; + HotCold.binary = "60606040526000805467ffffffff00000000191667636f6c64000000001763ffffffff191663686f740017815560d890819061003a90396000f3606060405260e060020a6000350463578e9dc58114602e5780638119c065146044578063dde9c2971460c0575b005b60ce600054640100000000900460e060020a0281565b6000805463ffffffff19811660e060020a64010000000080840482028290049290921767ffffffff00000000191692810281810483029390931793849055838102606090815291909304909202608052602c917f62258dc242c94c7f047f3265c30b72955e97185dd53c59ad9c27521829ba986190604090a150565b60ce60005460e060020a0281565b6060908152602090f3"; + + if ("0xfa4a489985caa9f11f81ae8ef0c912febef2df1d" != "") { + HotCold.address = "0xfa4a489985caa9f11f81ae8ef0c912febef2df1d"; + + // Backward compatibility; Deprecated. + HotCold.deployed_address = "0xfa4a489985caa9f11f81ae8ef0c912febef2df1d"; + } + + HotCold.generated_with = "1.0.3"; + HotCold.contract_name = "HotCold"; + + return HotCold; +}; + +// Nicety for Node. +factory.load = factory; + +if (typeof module != "undefined") { + module.exports = factory; +} else { + // There will only be one version of Pudding in the browser, + // and we can use that. + window.HotCold = factory; +} \ No newline at end of file diff --git a/dapps/hot-cold/environments/development/meteor/3a12b0c587d0c3fc86e13eb88dd682075bee7571.js b/dapps/hot-cold/environments/development/meteor/3a12b0c587d0c3fc86e13eb88dd682075bee7571.js new file mode 100644 index 0000000..18dc300 --- /dev/null +++ b/dapps/hot-cold/environments/development/meteor/3a12b0c587d0c3fc86e13eb88dd682075bee7571.js @@ -0,0 +1,160 @@ +!function(){var e,t,r;(function(){var n=this;e=n.Date,t=n.parseInt,r=String.prototype.replace}).call(this),function(){function e(e){var t=console[e];t&&"object"==typeof t&&(console[e]=function(){return Function.prototype.apply.call(t,console,arguments)})}var t=Object.prototype.hasOwnProperty;if("object"==typeof console&&"object"==typeof console.log)for(var r in console)t.call(console,r)&&e(r)}.call(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var r=Array,n=r.prototype,o=Object,i=o.prototype,a=Function.prototype,c=String,u=c.prototype,l=Number,f=l.prototype,s=n.slice,p=n.splice,y=n.push,h=n.unshift,d=n.concat,b=a.call,g=Math.max,v=Math.min,w=i.toString,m="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,O,j=Function.prototype.toString,T=function ze(e){try{return j.call(e),!0}catch(t){return!1}},_="[object Function]",x="[object GeneratorFunction]";O=function $e(e){if("function"!=typeof e)return!1;if(m)return T(e);var t=w.call(e);return t===_||t===x};var E,S=RegExp.prototype.exec,P=function Ce(e){try{return S.call(e),!0}catch(t){return!1}},I="[object RegExp]";E=function De(e){return"object"!=typeof e?!1:m?P(e):w.call(e)===I};var k,F=String.prototype.valueOf,N=function Ue(e){try{return F.call(e),!0}catch(t){return!1}},M="[object String]";k=function Ze(e){return"string"==typeof e?!0:"object"!=typeof e?!1:m?N(e):w.call(e)===M};var R=function(e){var t=o.defineProperty&&function(){try{var e={};o.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(r){return!1}}(),r;return r=t?function(e,t,r,n){!n&&t in e||o.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)},function n(t,o,i){for(var a in o)e.call(o,a)&&r(t,a,o[a],i)}}(i.hasOwnProperty),A=function Je(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},z={ToInteger:function Ge(e){var t=+e;return t!==t?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function Xe(e){var t,r,n;if(A(e))return e;if(r=e.valueOf,O(r)&&(t=r.call(e),A(t)))return t;if(n=e.toString,O(n)&&(t=n.call(e),A(t)))return t;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return o(e)},ToUint32:function Be(e){return e>>>0}},$=function Le(){};R(a,{bind:function We(e){var t=this;if(!O(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r=s.call(arguments,1),n,i=function(){if(this instanceof n){var i=t.apply(this,d.call(r,s.call(arguments)));return o(i)===i?i:this}return t.apply(e,d.call(r,s.call(arguments)))},a=g(0,t.length-r.length),c=[],u=0;a>u;u++)y.call(c,"$"+u);return n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this, arguments); }")(i),t.prototype&&($.prototype=t.prototype,n.prototype=new $,$.prototype=null),n}});var C=b.bind(i.hasOwnProperty),D=b.bind(i.toString),U=b.bind(u.slice),Z=b.bind(u.split),J=r.isArray||function He(e){return"[object Array]"===D(e)},G=1!==[].unshift(0);R(n,{unshift:function(){return h.apply(this,arguments),this.length}},G),R(r,{isArray:J});var X=o("a"),B="a"!==X[0]||!(0 in X),L=function Ye(e){var t=!0,r=!0;return e&&(e.call("foo",function(e,r,n){"object"!=typeof n&&(t=!1)}),e.call([1],function(){"use strict";r="string"==typeof this},"x")),!!e&&t&&r};R(n,{forEach:function qe(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=-1,o=r.length>>>0,i;if(arguments.length>1&&(i=arguments[1]),!O(e))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++n>>0,i=r(o),a;if(arguments.length>1&&(a=arguments[1]),!O(e))throw new TypeError("Array.prototype.map callback must be a function");for(var c=0;o>c;c++)c in n&&("undefined"!=typeof a?i[c]=e.call(a,n[c],c,t):i[c]=e(n[c],c,t));return i}},!L(n.map)),R(n,{filter:function Qe(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=r.length>>>0,o=[],i,a;if(arguments.length>1&&(a=arguments[1]),!O(e))throw new TypeError("Array.prototype.filter callback must be a function");for(var c=0;n>c;c++)c in r&&(i=r[c],("undefined"==typeof a?e(i,c,t):e.call(a,i,c,t))&&y.call(o,i));return o}},!L(n.filter)),R(n,{every:function Ve(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=r.length>>>0,o;if(arguments.length>1&&(o=arguments[1]),!O(e))throw new TypeError("Array.prototype.every callback must be a function");for(var i=0;n>i;i++)if(i in r&&!("undefined"==typeof o?e(r[i],i,t):e.call(o,r[i],i,t)))return!1;return!0}},!L(n.every)),R(n,{some:function et(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=r.length>>>0,o;if(arguments.length>1&&(o=arguments[1]),!O(e))throw new TypeError("Array.prototype.some callback must be a function");for(var i=0;n>i;i++)if(i in r&&("undefined"==typeof o?e(r[i],i,t):e.call(o,r[i],i,t)))return!0;return!1}},!L(n.some));var W=!1;n.reduce&&(W="object"==typeof n.reduce.call("es5",function(e,t,r,n){return n})),R(n,{reduce:function tt(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=r.length>>>0;if(!O(e))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===n&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o=0,i;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in r){i=r[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;n>o;o++)o in r&&(i=e(i,r[o],o,t));return i}},!W);var H=!1;n.reduceRight&&(H="object"==typeof n.reduceRight.call("es5",function(e,t,r,n){return n})),R(n,{reduceRight:function rt(e){var t=z.ToObject(this),r=B&&k(this)?Z(this,""):t,n=r.length>>>0;if(!O(e))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===n&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,i=n-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(i in r){o=r[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return o;do i in r&&(o=e(o,r[i],i,t));while(i--);return o}},!H);var Y=n.indexOf&&-1!==[0,1].indexOf(1,2);R(n,{indexOf:function nt(e){var t=B&&k(this)?Z(this,""):z.ToObject(this),r=t.length>>>0;if(0===r)return-1;var n=0;for(arguments.length>1&&(n=z.ToInteger(arguments[1])),n=n>=0?n:g(0,r+n);r>n;n++)if(n in t&&t[n]===e)return n;return-1}},Y);var q=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);R(n,{lastIndexOf:function ot(e){var t=B&&k(this)?Z(this,""):z.ToObject(this),r=t.length>>>0;if(0===r)return-1;var n=r-1;for(arguments.length>1&&(n=v(n,z.ToInteger(arguments[1]))),n=n>=0?n:r-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}},q);var K=function(){var e=[1,2],t=e.splice();return 2===e.length&&J(t)&&0===t.length}();R(n,{splice:function it(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!K);var Q=function(){var e={};return n.splice.call(e,0,0,1),1===e.length}();R(n,{splice:function at(e,t){if(0===arguments.length)return[];var r=arguments;return this.length=g(z.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(r=s.call(arguments),r.length<2?y.call(r,this.length-e):r[1]=z.ToInteger(t)),p.apply(this,r)}},!Q);var V=function(){var e=new r(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),ee=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();R(n,{splice:function ct(e,t){for(var r=z.ToObject(this),n=[],o=z.ToUint32(r.length),i=z.ToInteger(e),a=0>i?g(o+i,0):v(i,o),u=v(g(z.ToInteger(t),0),o-a),l=0,f;u>l;)f=c(a+l),C(r,f)&&(n[l]=r[f]),l+=1;var p=s.call(arguments,2),y=p.length,h;if(u>y){for(l=a;o-u>l;)f=c(l+u),h=c(l+y),C(r,f)?r[h]=r[f]:delete r[h],l+=1;for(l=o;l>o-u+y;)delete r[l-1],l-=1}else if(y>u)for(l=o-u;l>a;)f=c(l+u-1),h=c(l+y-1),C(r,f)?r[h]=r[f]:delete r[h],l-=1;l=a;for(var d=0;d=0&&!J(e)&&O(e.callee)},pe=fe(arguments)?fe:se;R(o,{keys:function ft(e){var t=O(e),r=pe(e),n=null!==e&&"object"==typeof e,o=n&&k(e);if(!n&&!t&&!r)throw new TypeError("Object.keys called on a non-object");var i=[],a=re&&t;if(o&&ne||r)for(var u=0;us;s++){var p=ue[s];f&&"constructor"===p||!C(e,p)||y.call(i,p)}return i}});var ye=o.keys&&function(){return 2===o.keys(arguments).length}(1,2),he=o.keys&&function(){var e=o.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),de=o.keys;R(o,{keys:function st(e){return de(pe(e)?s.call(e):e)}},!ye||he);var be=-621987552e5,ge="-000001",ve=e.prototype.toISOString&&-1===new e(be).toISOString().indexOf(ge),we=e.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new e(-1).toISOString();R(e.prototype,{toISOString:function pt(){var e,t,r,n,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(n=this.getUTCFullYear(),o=this.getUTCMonth(),n+=Math.floor(o/12),o=(o%12+12)%12,e=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],n=(0>n?"-":n>9999?"+":"")+U("00000"+Math.abs(n),n>=0&&9999>=n?-4:-6),t=e.length;t--;)r=e[t],10>r&&(e[t]="0"+r);return n+"-"+s.call(e,0,2).join("-")+"T"+s.call(e,2).join(":")+"."+U("000"+this.getUTCMilliseconds(),-3)+"Z"}},ve||we);var me=function(){try{return e.prototype.toJSON&&null===new e(0/0).toJSON()&&-1!==new e(be).toJSON().indexOf(ge)&&e.prototype.toJSON.call({toISOString:function(){return!0}})}catch(t){return!1}}();me||(e.prototype.toJSON=function yt(e){var t=o(this),r=z.ToPrimitive(t);if("number"==typeof r&&!isFinite(r))return null;var n=t.toISOString;if(!O(n))throw new TypeError("toISOString property is not callable");return n.call(t)});var Oe=1e15===e.parse("+033658-09-27T01:46:40.000Z"),je=!isNaN(e.parse("2012-04-04T24:00:00.500Z"))||!isNaN(e.parse("2012-11-31T23:59:59.000Z"))||!isNaN(e.parse("2012-12-31T23:59:60.000Z")),Te=isNaN(e.parse("2000-01-01T00:00:00.000Z"));(Te||je||!Oe)&&(e=function(e){var t=function f(r,n,o,i,a,u,l){var f=arguments.length,s;return s=this instanceof e?1===f&&c(r)===r?new e(t.parse(r)):f>=7?new e(r,n,o,i,a,u,l):f>=6?new e(r,n,o,i,a,u):f>=5?new e(r,n,o,i,a):f>=4?new e(r,n,o,i):f>=3?new e(r,n,o):f>=2?new e(r,n):f>=1?new e(r):new e:e.apply(this,arguments),A(s)||R(s,{constructor:t},!0),s},r=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),n=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function s(e,t){var r=t>1?1:0;return n[t]+Math.floor((e-1969+r)/4)-Math.floor((e-1901+r)/100)+Math.floor((e-1601+r)/400)+365*(e-1970)},i=function p(t){return l(new e(1970,0,1,0,0,0,t))};for(var a in e)C(e,a)&&(t[a]=e[a]);R(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,R(t.prototype,{constructor:t},!0);var u=function y(t){var n=r.exec(t);if(n){var a=l(n[1]),c=l(n[2]||1)-1,u=l(n[3]||1)-1,f=l(n[4]||0),s=l(n[5]||0),p=l(n[6]||0),y=Math.floor(1e3*l(n[7]||0)),h=Boolean(n[4]&&!n[8]),d="-"===n[9]?1:-1,b=l(n[10]||0),g=l(n[11]||0),v;return(s>0||p>0||y>0?24:25)>f&&60>s&&60>p&&1e3>y&&c>-1&&12>c&&24>b&&60>g&&u>-1&&u=-864e13&&864e13>=v)?v:0/0}return e.parse.apply(this,arguments)};return R(t,{parse:u}),t}(e)),e.now||(e.now=function ht(){return(new e).getTime()});var _e=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),xe={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function dt(e,t){for(var r=-1,n=t;++r=0;)r+=xe.data[t],xe.data[t]=Math.floor(r/e),r=r%e*xe.base},numToString:function gt(){for(var e=xe.size,t="";--e>=0;)if(""!==t||0===e||0!==xe.data[e]){var r=c(xe.data[e]);""===t?t=r:t+=U("0000000",0,7-r.length)+r}return t},pow:function vt(e,t,r){return 0===t?r:t%2===1?vt(e,t-1,r*e):vt(e*e,t/2,r)},log:function wt(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}};R(f,{toFixed:function mt(e){var t,r,n,o,i,a,u,f;if(t=l(e),t=t!==t?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(r=l(this),r!==r)return"NaN";if(-1e21>=r||r>=1e21)return c(r);if(n="",0>r&&(n="-",r=-r),o="0",r>1e-21)if(i=xe.log(r*xe.pow(2,69,1))-69,a=0>i?r*xe.pow(2,-i,1):r/xe.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(xe.multiply(0,a),u=t;u>=7;)xe.multiply(1e7,0),u-=7;for(xe.multiply(xe.pow(10,u,1),0),u=i-1;u>=23;)xe.divide(1<<23),u-=23;xe.divide(1<0?(f=o.length,o=t>=f?n+U("0.0000000000000000000",0,t-f+2)+o:n+U(o,0,f-t)+"."+U(o,f-t)):o=n+o,o}},_e),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1];u.split=function(t,r){var n=this;if("undefined"==typeof t&&0===r)return[];if(!E(t))return Z(this,t,r);var o=[],i=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),a=0,c,u,l,f,p=new RegExp(t.source,i+"g");n+="",e||(c=new RegExp("^"+p.source+"$(?!\\s)",i));var h="undefined"==typeof r?-1>>>0:z.ToUint32(r);for(u=p.exec(n);u&&(l=u.index+u[0].length,!(l>a&&(y.call(o,U(n,a,u.index)),!e&&u.length>1&&u[0].replace(c,function(){for(var e=1;e1&&u.index=h)));)p.lastIndex===u.index&&p.lastIndex++,u=p.exec(n);return a===n.length?(f||!p.test(""))&&y.call(o,""):y.call(o,U(n,a)),o.length>h?U(o,0,h):o}}():"0".split(void 0,0).length&&(u.split=function Ot(e,t){return"undefined"==typeof e&&0===t?[]:Z(this,e,t)});var Ee=u.replace,Se=function(){var e=[];return"x".replace(/x(.)?/g,function(t,r){y.call(e,r)}),1===e.length&&"undefined"==typeof e[0]}();Se||(u.replace=function jt(e,t){var r=O(t),n=E(e)&&/\)[*?]/.test(e.source);if(r&&n){var o=function(r){var n=arguments.length,o=e.lastIndex;e.lastIndex=0;var i=e.exec(r)||[];return e.lastIndex=o,y.call(i,arguments[n-2],arguments[n-1]),t.apply(this,i)};return Ee.call(this,e,o)}return Ee.call(this,e,t)});var Pe=u.substr,Ie="".substr&&"b"!=="0b".substr(-1);R(u,{substr:function Tt(e,t){var r=e;return 0>e&&(r=g(this.length+e,0)),Pe.call(this,r,t)}},Ie);var ke=" \n \f\r   ᠎              \u2028\u2029\ufeff",Fe="​",Ne="["+ke+"]",Me=new RegExp("^"+Ne+Ne+"*"),Re=new RegExp(Ne+Ne+"*$"),Ae=u.trim&&(ke.trim()||!Fe.trim());R(u,{trim:function _t(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return c(this).replace(Me,"").replace(Re,"")}},Ae),(8!==t(ke+"08")||22!==t(ke+"0x16"))&&(t=function(e){var t=/^0[xX]/;return function r(n,o){var i=c(n).trim(),a=l(o)||(t.test(i)?16:10);return e(i,a)}}(t))}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e=Function.prototype.call,t=Object.prototype,r=e.bind(t.hasOwnProperty),n=e.bind(t.propertyIsEnumerable),o=e.bind(t.toString),i,a,c,u,l=r(t,"__defineGetter__");l&&(i=e.bind(t.__defineGetter__),a=e.bind(t.__defineSetter__),c=e.bind(t.__lookupGetter__),u=e.bind(t.__lookupSetter__)),Object.getPrototypeOf||(Object.getPrototypeOf=function I(e){var r=e.__proto__;return r||null===r?r:"[object Function]"===o(e.constructor)?e.constructor.prototype:e instanceof Object?t:null});var f=function k(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var s=f({}),p="undefined"==typeof document||f(document.createElement("div"));if(!p||!s)var y=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||y){var h="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function F(e,o){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(h+e);if(y)try{return y.call(Object,e,o)}catch(i){}var a;if(!r(e,o))return a;if(a={enumerable:n(e,o),configurable:!0},l){var f=e.__proto__,s=e!==t;s&&(e.__proto__=t);var p=c(e,o),d=u(e,o);if(s&&(e.__proto__=f),p||d)return p&&(a.get=p),d&&(a.set=d),a}return a.value=e[o],a.writable=!0,a}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function N(e){return Object.keys(e)}),!Object.create){var d,b=!({__proto__:null}instanceof Object),g=function M(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},v=function R(){var e,t;return t=new ActiveXObject("htmlfile"),t.write(""),t.close(),e=t.parentWindow.Object.prototype,t=null,e},w=function A(){var e=document.createElement("iframe"),t=document.body||document.documentElement,r;return e.style.display="none",t.appendChild(e),e.src="javascript:",r=e.contentWindow.Object.prototype,t.removeChild(e),e=null,r};d=b||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=g()?v():w();delete e.constructor,delete e.hasOwnProperty,delete e.propertyIsEnumerable,delete e.isPrototypeOf,delete e.toLocaleString,delete e.toString,delete e.valueOf;var t=function r(){};return t.prototype=e,d=function(){return new t},new t},Object.create=function z(e,t){var r,n=function o(){};if(null===e)r=d();else{if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object prototype may only be an Object or null");n.prototype=e,r=new n,r.__proto__=e}return void 0!==t&&Object.defineProperties(r,t),r}}var m=function $(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var O=m({}),j="undefined"==typeof document||m(document.createElement("div"));if(!O||!j)var T=Object.defineProperty,_=Object.defineProperties}if(!Object.defineProperty||T){var x="Property description must be an object: ",E="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function C(e,r,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(E+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError(x+n);if(T)try{return T.call(Object,e,r,n)}catch(o){}if("value"in n)if(l&&(c(e,r)||u(e,r))){var f=e.__proto__;e.__proto__=t,delete e[r],e[r]=n.value,e.__proto__=f}else e[r]=n.value;else{if(!l&&("get"in n||"set"in n))throw new TypeError(S);"get"in n&&i(e,r,n.get),"set"in n&&a(e,r,n.set)}return e}}(!Object.defineProperties||_)&&(Object.defineProperties=function D(e,t){if(_)try{return _.call(Object,e,t)}catch(r){}return Object.keys(t).forEach(function(r){"__proto__"!==r&&Object.defineProperty(e,r,t[r])}),e}),Object.seal||(Object.seal=function U(e){if(Object(e)!==e)throw new TypeError("Object.seal can only be called on Objects.");return e}),Object.freeze||(Object.freeze=function Z(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e});try{Object.freeze(function(){})}catch(P){Object.freeze=function(e){return function t(r){return"function"==typeof r?r:e(r)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function J(e){if(Object(e)!==e)throw new TypeError("Object.preventExtensions can only be called on Objects.");return e}),Object.isSealed||(Object.isSealed=function G(e){if(Object(e)!==e)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function X(e){if(Object(e)!==e)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function B(e){if(Object(e)!==e)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var t="";r(e,t);)t+="?";e[t]=!0;var n=r(e,t);return delete e[t],n})}),function(){var n=this;n.Date!==e&&(n.Date=e),n.parseInt!==t&&(n.parseInt=t);var o=String.prototype;o.replace!==r&&(o.replace=r)}.call(this),"undefined"==typeof Package&&(Package={}),Package["es5-shim"]={Date:e,parseInt:t}}(); + +!function(){var n,t;(function(){n={}}).call(this),function(){(function(){var t=this,r=t._,e={},u=Array.prototype,i=Object.prototype,a=Function.prototype,o=u.push,c=u.slice,l=u.concat,f=i.toString,s=i.hasOwnProperty,p=u.forEach,v=u.map,h=u.reduce,d=u.reduceRight,g=u.filter,m=u.every,y=u.some,b=u.indexOf,_=u.lastIndexOf,w=Array.isArray,x=Object.keys,j=a.bind,A=function(n){return n instanceof A?n:this instanceof A?void(this._wrapped=n):new A(n)};"undefined"!=typeof n?("undefined"!=typeof module&&module.exports&&(n=module.exports=A),n._=A):t._=A,A.VERSION="1.5.2";var k=function(n){return"[object Arguments]"===f.call(n)};k(arguments)||(k=function(n){return!(!n||!s.call(n,"callee")||"function"!=typeof n.callee)});var O=function(n){return n.length===+n.length&&(k(n)||n.constructor!==Object)},E=A.each=A.forEach=function(n,t,r){if(null!=n)if(p&&n.forEach===p)n.forEach(t,r);else if(O(n)){for(var u=0,i=n.length;i>u;u++)if(t.call(r,n[u],u,n)===e)return}else for(var a=A.keys(n),u=0,i=a.length;i>u;u++)if(t.call(r,n[a[u]],a[u],n)===e)return};A.map=A.collect=function(n,t,r){var e=[];return null==n?e:v&&n.map===v?n.map(t,r):(E(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var F="Reduce of empty array with no initial value";A.reduce=A.foldl=A.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=A.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(E(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(F);return r},A.reduceRight=A.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),d&&n.reduceRight===d)return e&&(t=A.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(!O(n)){var a=A.keys(n);i=a.length}if(E(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(F);return r},A.find=A.detect=function(n,t,r){var e;return M(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},A.filter=A.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(E(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},A.reject=function(n,t,r){return A.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},A.every=A.all=function(n,t,r){t||(t=A.identity);var u=!0;return null==n?u:m&&n.every===m?n.every(t,r):(E(n,function(n,i,a){return(u=u&&t.call(r,n,i,a))?void 0:e}),!!u)};var M=A.some=A.any=function(n,t,r){t||(t=A.identity);var u=!1;return null==n?u:y&&n.some===y?n.some(t,r):(E(n,function(n,i,a){return u||(u=t.call(r,n,i,a))?e:void 0}),!!u)};A.contains=A.include=function(n,t){return null==n?!1:b&&n.indexOf===b?-1!=n.indexOf(t):M(n,function(n){return n===t})},A.invoke=function(n,t){var r=c.call(arguments,2),e=A.isFunction(t);return A.map(n,function(n){return(e?t:n[t]).apply(n,r)})},A.pluck=function(n,t){return A.map(n,function(n){return n[t]})},A.where=function(n,t,r){return A.isEmpty(t)?r?void 0:[]:A[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},A.findWhere=function(n,t){return A.where(n,t,!0)},A.max=function(n,t,r){if(!t&&A.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&A.isEmpty(n))return-(1/0);var e={computed:-(1/0),value:-(1/0)};return E(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},A.min=function(n,t,r){if(!t&&A.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&A.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return E(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;ae||void 0===r)return 1;if(e>r||void 0===e)return-1}return n.index-t.index}),"value")};var S=function(n){return function(t,r,e){var u={},i=null==r?A.identity:R(r);return E(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};A.groupBy=S(function(n,t,r){(A.has(n,t)?n[t]:n[t]=[]).push(r)}),A.indexBy=S(function(n,t,r){n[t]=r}),A.countBy=S(function(n,t){A.has(n,t)?n[t]++:n[t]=1}),A.sortedIndex=function(n,t,r,e){r=null==r?A.identity:R(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])=0})})},A.difference=function(n){var t=l.apply(u,c.call(arguments,1));return A.filter(n,function(n){return!A.contains(t,n)})},A.zip=function(){for(var n=A.max(A.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=A.pluck(arguments,""+r);return t},A.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},A.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=A.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(b&&n.indexOf===b)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},A.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(_&&n.lastIndexOf===_)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},A.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var T=function(){};A.bind=function(n,t){var r,e;if(j&&n.bind===j)return j.apply(n,c.call(arguments,1));if(!A.isFunction(n))throw new TypeError;return r=c.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(c.call(arguments)));T.prototype=n.prototype;var u=new T;T.prototype=null;var i=n.apply(u,r.concat(c.call(arguments)));return Object(i)===i?i:u}},A.partial=function(n){var t=c.call(arguments,1);return function(){return n.apply(this,t.concat(c.call(arguments)))}},A.bindAll=function(n){var t=c.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return E(t,function(t){n[t]=A.bind(n[t],n)}),n},A.memoize=function(n,t){var r={};return t||(t=A.identity),function(){var e=t.apply(this,arguments);return A.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},A.delay=function(n,t){var r=c.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},A.defer=function(n){return A.delay.apply(A,[n,1].concat(c.call(arguments,1)))},A.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},A.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},A.once=function(n){var t=!1,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},A.wrap=function(n,t){return function(){var r=[n];return o.apply(r,arguments),t.apply(this,r)}},A.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},A.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},A.keys=x||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)A.has(n,r)&&t.push(r);return t},A.values=function(n){for(var t=A.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},A.pairs=function(n){for(var t=A.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},A.invert=function(n){for(var t={},r=A.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},A.functions=A.methods=function(n){var t=[];for(var r in n)A.isFunction(n[r])&&t.push(r);return t.sort()},A.extend=function(n){return E(c.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},A.pick=function(n){var t={},r=l.apply(u,c.call(arguments,1));return E(r,function(r){r in n&&(t[r]=n[r])}),t},A.omit=function(n){var t={},r=l.apply(u,c.call(arguments,1));for(var e in n)A.contains(r,e)||(t[e]=n[e]);return t},A.defaults=function(n){return E(c.call(arguments,1),function(t){if(t)for(var r in t)void 0===n[r]&&(n[r]=t[r])}),n},A.clone=function(n){return A.isObject(n)?A.isArray(n)?n.slice():A.extend({},n):n},A.tap=function(n,t){return t(n),n};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof A&&(n=n._wrapped),t instanceof A&&(t=t._wrapped);var u=f.call(n);if(u!=f.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(A.isFunction(a)&&a instanceof a&&A.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,l=!0;if("[object Array]"==u){if(c=n.length,l=c==t.length)for(;c--&&(l=N(n[c],t[c],r,e)););}else{for(var s in n)if(A.has(n,s)&&(c++,!(l=A.has(t,s)&&N(n[s],t[s],r,e))))break;if(l){for(s in t)if(A.has(t,s)&&!c--)break;l=!c}}return r.pop(),e.pop(),l};A.isEqual=function(n,t){return N(n,t,[],[])},A.isEmpty=function(n){if(null==n)return!0;if(A.isArray(n)||A.isString(n))return 0===n.length;for(var t in n)if(A.has(n,t))return!1;return!0},A.isElement=function(n){return!(!n||1!==n.nodeType)},A.isArray=w||function(n){return"[object Array]"==f.call(n)},A.isObject=function(n){return n===Object(n)},E(["Arguments","Function","String","Number","Date","RegExp"],function(n){A["is"+n]=function(t){return f.call(t)=="[object "+n+"]"}}),A.isArguments(arguments)||(A.isArguments=function(n){return!(!n||!A.has(n,"callee"))}),"function"!=typeof/./&&(A.isFunction=function(n){return"function"==typeof n}),A.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},A.isNaN=function(n){return A.isNumber(n)&&n!=+n},A.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==f.call(n)},A.isNull=function(n){return null===n},A.isUndefined=function(n){return void 0===n},A.has=function(n,t){return s.call(n,t)},A.noConflict=function(){return t._=r,this},A.identity=function(n){return n},A.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},A.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var q={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};q.unescape=A.invert(q.escape);var B={escape:new RegExp("["+A.keys(q.escape).join("")+"]","g"),unescape:new RegExp("("+A.keys(q.unescape).join("|")+")","g")};A.each(["escape","unescape"],function(n){A[n]=function(t){return null==t?"":(""+t).replace(B[n],function(t){return q[n][t]})}}),A.result=function(n,t){if(null==n)return void 0;var r=n[t];return A.isFunction(r)?r.call(n):r},A.mixin=function(n){E(A.functions(n),function(t){var r=A[t]=n[t];A.prototype[t]=function(){var n=[this._wrapped];return o.apply(n,arguments),U.call(this,r.apply(A,n))}})};var D=0;A.uniqueId=function(n){var t=++D+"";return n?n+t:t},A.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\t|\u2028|\u2029/g;A.template=function(n,t,r){var e;r=A.defaults({},r,A.templateSettings);var u=new RegExp([(r.escape||P).source,(r.interpolate||P).source,(r.evaluate||P).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(C,function(n){return"\\"+z[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,A);var c=function(n){return e.call(this,n,A)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},A.chain=function(n){return A(n).chain()};var U=function(n){return this._chain?A(n).chain():n};A.mixin(A),E(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=u[n];A.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],U.call(this,r)}}),E(["concat","join","slice"],function(n){var t=u[n];A.prototype[n]=function(){return U.call(this,t.apply(this._wrapped,arguments))}}),A.extend(A.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)}.call(this),function(){t=n._}.call(this),"undefined"==typeof Package&&(Package={}),Package.underscore={_:t}}(); + +!function(){var t=Package.underscore._,e;(function(){e={isClient:!0,isServer:!1,isCordova:!1},"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.PUBLIC_SETTINGS&&(e.settings={"public":__meteor_runtime_config__.PUBLIC_SETTINGS})}).call(this),function(){function n(t){return t?e._debug("Exception in callback of async function",t.stack?t.stack:t):void 0}if(e.isServer)var r=Npm.require("fibers/future");"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.meteorRelease&&(e.release=__meteor_runtime_config__.meteorRelease),t.extend(e,{_get:function(t){for(var e=1;e=0;r--){var o=arguments[r+1];if(n)n=!1;else for(var i in e[r][o])return;delete e[r][o]}},wrapAsync:function(o,i){return function(){for(var a=i||this,s=t.toArray(arguments),u,c=s.length-1;c>=0;--c){var l=s[c],f=typeof l;if("undefined"!==f){"function"===f&&(u=l);break}}if(!u){if(e.isClient)u=n;else{var _=new r;u=_.resolver()}++c}s[c]=e.bindEnvironment(u);var p=o.apply(a,s);return _?_.wait():p}},_inherits:function(e,n){for(var r in n)t.has(n,r)&&(e[r]=n[r]);var o=function(){this.constructor=e};return o.prototype=n.prototype,e.prototype=new o,e.__super__=n.prototype,e}});var o=!1;e._wrapAsync=function(t,n){return o||(e._debug("Meteor._wrapAsync has been renamed to Meteor.wrapAsync"),o=!0),e.wrapAsync.apply(e,arguments)}}.call(this),function(){"use strict";function t(){if(o.setImmediate){var t=function(t){o.setImmediate(t)};return t.implementation="setImmediate",t}return null}function n(){function t(t,e){return"string"==typeof t&&t.substring(0,e.length)===e}function e(e){if(e.source===o&&t(e.data,s)){var n=e.data.substring(s.length);try{a[n]&&a[n]()}finally{delete a[n]}}}if(!o.postMessage||o.importScripts)return null;var n=!0,r=o.onmessage;if(o.onmessage=function(){n=!1},o.postMessage("","*"),o.onmessage=r,!n)return null;var i=0,a={},s="Meteor._setImmediate."+Math.random()+".";o.addEventListener?o.addEventListener("message",e,!1):o.attachEvent("onmessage",e);var u=function(t){++i,a[i]=t,o.postMessage(s+i,"*")};return u.implementation="postMessage",u}function r(){var t=function(t){o.setTimeout(t,0)};return t.implementation="setTimeout",t}var o=this;e._setImmediate=t()||n()||r()}.call(this),function(){var n=function(t){if(Package.ddp){var e=Package.ddp.DDP._CurrentInvocation;if(e.get()&&e.get().isSimulation)throw new Error("Can't set timers inside simulations");return function(){e.withValue(null,t)}}return t},r=function(t,r){return e.bindEnvironment(n(r),t)};t.extend(e,{setTimeout:function(t,e){return setTimeout(r("setTimeout callback",t),e)},setInterval:function(t,e){return setInterval(r("setInterval callback",t),e)},clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)},defer:function(t){e._setImmediate(r("defer callback",t))}})}.call(this),function(){e.makeErrorType=function(t,n){var r=function(){var e=this;if(Error.captureStackTrace)Error.captureStackTrace(e,r);else{var o=new Error;o.__proto__=r.prototype,o instanceof r&&(e=o)}return n.apply(e,arguments),e.errorType=t,e};return e._inherits(r,Error),r},e.Error=e.makeErrorType("Meteor.Error",function(t,e,n){var r=this;r.error=t,r.reason=e,r.details=n,r.reason?r.message=r.reason+" ["+r.error+"]":r.message="["+r.error+"]"}),e.Error.prototype.clone=function(){var t=this;return new e.Error(t.error,t.reason,t.details)}}.call(this),function(){e._noYieldsAllowed=function(t){return t()},e._SynchronousQueue=function(){var t=this;t._tasks=[],t._running=!1,t._runTimeout=null},t.extend(e._SynchronousQueue.prototype,{runTask:function(n){var r=this;if(!r.safeToRunTask())throw new Error("Could not synchronously run a task from a running task");r._tasks.push(n);var o=r._tasks;r._tasks=[],r._running=!0,r._runTimeout&&(clearTimeout(r._runTimeout),r._runTimeout=null);try{for(;!t.isEmpty(o);){var i=o.shift();try{i()}catch(a){if(t.isEmpty(o))throw a;e._debug("Exception in queued task: "+(a.stack||a))}}}finally{r._running=!1}},queueTask:function(e){var n=this;n._tasks.push(e),n._runTimeout||(n._runTimeout=setTimeout(t.bind(n.flush,n),0))},flush:function(){var t=this;t.runTask(function(){})},drain:function(){var e=this;if(e.safeToRunTask())for(;!t.isEmpty(e._tasks);)e.flush()},safeToRunTask:function(){var t=this;return!t._running}})}.call(this),function(){var t=[],n=!e.isCordova&&("loaded"===document.readyState||"complete"==document.readyState),r=1,o=function(){if(r--,!(r>0)){n=!0;var o=function(){if(e.isCordova&&(!cordova.plugins||!cordova.plugins.CordovaUpdate))return void e.setTimeout(o,20);for(;t.length;)t.shift()()};o()}};document.addEventListener?(document.addEventListener("DOMContentLoaded",o,!1),e.isCordova&&(r++,document.addEventListener("deviceready",o,!1)),window.addEventListener("load",o,!1)):(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&o()}),window.attachEvent("load",o)),e.startup=function(r){var o=!document.addEventListener&&document.documentElement.doScroll;if(o&&window===top){try{o("left")}catch(i){return void setTimeout(function(){e.startup(r)},50)}r()}else n?r():t.push(r)}}.call(this),function(){var t=0;e._debug=function(){if(t)return void t--;if("undefined"!=typeof console&&"undefined"!=typeof console.log)if(0==arguments.length)console.log("");else if("function"==typeof console.log.apply){for(var e=!0,n=0;n255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");n[a]=l}}for(var u=[],i=null,o=null,c=null,s=null,a=0;a>2&63,o=(3&n[a])<<4;break;case 1:o|=n[a]>>4&15,c=(15&n[a])<<2;break;case 2:c|=n[a]>>6&3,s=63&n[a],u.push(t(i)),u.push(t(o)),u.push(t(c)),u.push(t(s)),i=null,o=null,c=null,s=null}return null!=i&&(u.push(t(i)),u.push(t(o)),u.push(null==c?"=":t(c)),null==s&&u.push("=")),u.join("")};var t=function(r){return n.charAt(r)},l=function(n){return"="===n?-1:e[n]};r.newBinary=function(n){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var r=[],e=0;n>e;e++)r.push(0);return r.$Uint8ArrayPolyfill=!0,r}return new Uint8Array(new ArrayBuffer(n))},r.decode=function(n){var e=Math.floor(3*n.length/4);"="==n.charAt(n.length-1)&&(e--,"="==n.charAt(n.length-2)&&e--);for(var a=r.newBinary(e),t=null,u=null,i=null,o=0,c=0;cf)throw new Error("invalid base64 string");t=f<<2;break;case 1:if(0>f)throw new Error("invalid base64 string");t|=f>>4,a[o++]=t,u=(15&f)<<4;break;case 2:f>=0&&(u|=f>>2,a[o++]=u,i=(3&f)<<6);break;case 3:f>=0&&(a[o++]=i|f)}}return a}}).call(this),"undefined"==typeof Package&&(Package={}),Package.base64={Base64:r}}(); + +!function(){var n=Package.meteor.Meteor,e=Package.underscore._,t=Package.base64.Base64,r,u;(function(){r={},u={};var a={};r.addType=function(n,t){if(e.has(a,n))throw new Error("Type "+n+" already present");a[n]=t};var i=function(n){return e.isNaN(n)||n===1/0||n===-(1/0)},o=[{matchJSONValue:function(n){return e.has(n,"$date")&&1===e.size(n)},matchObject:function(n){return n instanceof Date},toJSONValue:function(n){return{$date:n.getTime()}},fromJSONValue:function(n){return new Date(n.$date)}},{matchJSONValue:function(n){return e.has(n,"$InfNaN")&&1===e.size(n)},matchObject:i,toJSONValue:function(n){var t;return t=e.isNaN(n)?0:n===1/0?1:-1,{$InfNaN:t}},fromJSONValue:function(n){return n.$InfNaN/0}},{matchJSONValue:function(n){return e.has(n,"$binary")&&1===e.size(n)},matchObject:function(n){return"undefined"!=typeof Uint8Array&&n instanceof Uint8Array||n&&e.has(n,"$Uint8ArrayPolyfill")},toJSONValue:function(n){return{$binary:t.encode(n)}},fromJSONValue:function(n){return t.decode(n.$binary)}},{matchJSONValue:function(n){return e.has(n,"$escape")&&1===e.size(n)},matchObject:function(n){return e.isEmpty(n)||e.size(n)>2?!1:e.any(o,function(e){return e.matchJSONValue(n)})},toJSONValue:function(n){var t={};return e.each(n,function(n,e){t[e]=r.toJSONValue(n)}),{$escape:t}},fromJSONValue:function(n){var t={};return e.each(n.$escape,function(n,e){t[e]=r.fromJSONValue(n)}),t}},{matchJSONValue:function(n){return e.has(n,"$type")&&e.has(n,"$value")&&2===e.size(n)},matchObject:function(n){return r._isCustomType(n)},toJSONValue:function(e){var t=n._noYieldsAllowed(function(){return e.toJSONValue()});return{$type:e.typeName(),$value:t}},fromJSONValue:function(t){var r=t.$type;if(!e.has(a,r))throw new Error("Custom EJSON type "+r+" is not defined");var u=a[r];return n._noYieldsAllowed(function(){return u(t.$value)})}}];r._isCustomType=function(n){return n&&"function"==typeof n.toJSONValue&&"function"==typeof n.typeName&&e.has(a,n.typeName())},r._getTypes=function(){return a},r._getConverters=function(){return o};var f=r._adjustTypesToJSONValue=function(n){if(null===n)return null;var t=c(n);return void 0!==t?t:"object"!=typeof n?n:(e.each(n,function(e,t){if("object"==typeof e||void 0===e||i(e)){var r=c(e);return r?void(n[t]=r):void f(e)}}),n)},c=function(n){for(var e=0;e=f.length?!1:e!==f[a]?!1:r.equals(n,t[f[a]],u)?(a++,!0):!1}),o&&a===f.length}return a=0,o=e.all(n,function(n,i){return e.has(t,i)&&r.equals(n,t[i],u)?(a++,!0):!1}),o&&e.size(t)===a},r.clone=function(n){var t;if("object"!=typeof n)return n;if(null===n)return null;if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return n;if(r.isBinary(n)){t=r.newBinary(n.length);for(var u=0;uf;f+=1)h[f]=t(f,N,a,y,o)||"null";return l=0===h.length?"[]":y?"[\n"+y+h.join(",\n"+y)+"\n"+i+"]":"["+h.join(",")+"]"}var p=e.keys(N);return o&&(p=p.sort()),e.each(p,function(e){l=t(e,N,a,y,o),l&&h.push(n(e)+(y?": ":":")+l)}),l=0===h.length?"{}":y?"{\n"+y+h.join(",\n"+y)+"\n"+i+"}":"{"+h.join(",")+"}"}};r._canonicalStringify=function(n,r){if(r=e.extend({indent:"",canonical:!1},r),r.indent===!0)r.indent=" ";else if("number"==typeof r.indent){for(var u="",a=0;ai;i++){var l=p(e[i],r[0]);if(l)return l.path=d(i,l.path),l}return!1}if(r instanceof c){var l;try{l=r.condition(e)}catch(m){if(!(m instanceof a.Error))throw m;return{message:m.message,path:m.path}}return r.condition(e)?!1:{message:"Failed Match.Where validation",path:""}}if(r instanceof o&&(r=a.OneOf(void 0,r.pattern)),r instanceof s){for(var i=0;ii;i++){var O=b[i],E=e[O];if(t.has(k,O)){var l=p(E,k[O]);if(l)return l.path=d(O,l.path),l;delete k[O]}else if(t.has(w,O)){var l=p(E,w[O]);if(l)return l.path=d(O,l.path),l}else{if(!y)return{message:"Unknown key",path:O};if(v){var l=p(E,v[0]);if(l)return l.path=d(O,l.path),l}}}var b=t.keys(k);return b.length?{message:"Missing key '"+b[0]+"'",path:""}:void 0},g=function(e,n){var r=this;r.args=t.clone(e),r.args.reverse(),r.description=n};t.extend(g.prototype,{checking:function(e){var n=this;n._checkingOneValue(e)||(t.isArray(e)||t.isArguments(e))&&t.each(e,t.bind(n._checkingOneValue,n))},_checkingOneValue:function(e){for(var n=this,r=0;ro;++o){var a=e[o];r[a]=t[a]}return r}return t},taggedTemplateLiteralLoose:function(t,r){return t.raw=r,t},classCallCheck:function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},inherits:function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);if(r){if(Object.create)t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});else{var n=function(){this.constructor=t};n.prototype=r.prototype,t.prototype=new n}for(var o in r)e.call(r,o)&&(t[o]=r[o])}},createClass:function(){function t(t,r){for(var e=0;eb;b++)a.call(y,"$"+b);return l=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this, arguments); }")(f),u.prototype&&(c.prototype=u.prototype,l.prototype=new c,c.prototype=null),l}}(),slice:Array.prototype.slice}}).call(this),"undefined"==typeof Package&&(Package={}),Package["babel-runtime"]={babelHelpers:r}}(); + +!function(){var t=Package.meteor.Meteor,n,r,e,o,i;!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,o,i){i(1),i(50),i(77),i(96),n=o.Symbol=i(99),r=o.Map=i(100),e=o.Set=i(108)},function(t,n,r){r(2),r(28),r(31),r(33),r(37),r(39),r(41),r(42),r(43),r(44),r(45),r(46),r(47),r(48),r(49),t.exports=r(9).Object},function(t,n,r){"use strict";var e=r(3),o=r(4),i=r(5),u=r(6),c=r(8),f=r(12),s=r(7),a=r(14),p=r(15),l=r(13),v=r(16),h=r(17),g=r(22),y=r(23),d=r(24),m=r(25),x=r(26),S=r(18),b=r(11),_=e.getDesc,w=e.setDesc,O=e.create,P=g.get,j=o.Symbol,A=o.JSON,E=A&&A.stringify,F=!1,k=v("_hidden"),M=e.isEnum,D=a("symbol-registry"),N=a("symbols"),T="function"==typeof j,C=Object.prototype,W=u&&s(function(){return 7!=O(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=_(C,n);e&&delete C[n],w(t,n,r),e&&t!==C&&w(C,n,e)}:w,I=function(t){var n=N[t]=O(j.prototype);return n._k=t,u&&F&&W(C,t,{configurable:!0,set:function(n){i(this,k)&&i(this[k],t)&&(this[k][t]=!1),W(this,t,b(1,n))}}),n},R=function(t){return"symbol"==typeof t},z=function Q(t,n,r){return r&&i(N,n)?(r.enumerable?(i(t,k)&&t[k][n]&&(t[k][n]=!1),r=O(r,{enumerable:b(0,!1)})):(i(t,k)||w(t,k,b(1,{})),t[k][n]=!0),W(t,n,r)):w(t,n,r)},G=function V(t,n){x(t);for(var r=y(n=S(n)),e=0,o=r.length,i;o>e;)z(t,i=r[e++],n[i]);return t},J=function X(t,n){return void 0===n?O(t):G(O(t),n)},L=function Y(t){var n=M.call(this,t);return n||!i(this,t)||!i(N,t)||i(this,k)&&this[k][t]?n:!0},K=function Z(t,n){var r=_(t=S(t),n);return!r||!i(N,n)||i(t,k)&&t[k][n]||(r.enumerable=!0),r},B=function tt(t){for(var n=P(S(t)),r=[],e=0,o;n.length>e;)i(N,o=n[e++])||o==k||r.push(o);return r},H=function nt(t){for(var n=P(S(t)),r=[],e=0,o;n.length>e;)i(N,o=n[e++])&&r.push(N[o]);return r},q=function rt(t){for(var n=[t],r=1,e,o;arguments.length>r;)n.push(arguments[r++]);return e=n[1],"function"==typeof e&&(o=e),(o||!d(e))&&(e=function(t,n){return o&&(n=o.call(this,t,n)),R(n)?void 0:n}),n[1]=e,E.apply(A,n)},U=s(function(){var t=j();return"[null]"!=E([t])||"{}"!=E({a:t})||"{}"!=E(Object(t))});T||(j=function et(){if(R(this))throw TypeError("Symbol is not a constructor");return I(l(arguments[0]))},f(j.prototype,"toString",function ot(){return this._k}),R=function(t){return t instanceof j},e.create=J,e.isEnum=L,e.getDesc=K,e.setDesc=z,e.setDescs=G,e.getNames=g.get=B,e.getSymbols=H,u&&!r(27)&&f(C,"propertyIsEnumerable",L,!0));var $={"for":function(t){return i(D,t+="")?D[t]:D[t]=j(t)},keyFor:function it(t){return h(D,t)},useSetter:function(){F=!0},useSimple:function(){F=!1}};e.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var n=v(t);$[t]=T?n:I(n)}),F=!0,c(c.G+c.W,{Symbol:j}),c(c.S,"Symbol",$),c(c.S+c.F*!T,"Object",{create:J,defineProperty:z,defineProperties:G,getOwnPropertyDescriptor:K,getOwnPropertyNames:B,getOwnPropertySymbols:H}),A&&c(c.S+c.F*(!T||U),"JSON",{stringify:q}),p(j,"Symbol"),p(Math,"Math",!0),p(o.JSON,"JSON",!0)},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r="undefined",e=t.exports=typeof window!=r&&window.Math==Math?window:typeof self!=r&&self.Math==Math?self:Function("return this")();"number"==typeof o&&(o=e)},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){t.exports=!r(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(4),o=r(9),i=r(10),u=r(12),c="prototype",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,v,h=t&s.G,g=t&s.P,y=h?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],d=h?o:o[n]||(o[n]={});h&&(r=n);for(a in r)p=!(t&s.F)&&y&&a in y,l=(p?y:r)[a],v=t&s.B&&p?f(l,e):g&&"function"==typeof l?f(Function.call,l):l,y&&!p&&u(y,a,l),d[a]!=l&&i(d,a,v),g&&((d[c]||(d[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n){var r=t.exports={version:"1.2.1"};"number"==typeof i&&(i=r)},function(t,n,r){var e=r(3),o=r(11);t.exports=r(6)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(4),o=r(10),i=r(13)("src"),u="toString",c=Function[u],f=(""+c).split(u);r(9).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){"function"==typeof r&&(o(r,i,t[n]?""+t[n]:f.join(String(n))),"name"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function s(){return"function"==typeof this&&this[i]||c.call(this)})},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(4),o="__core-js_shared__",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(5),o=r(10),i=r(16)("toStringTag");t.exports=function(t,n,r){t&&!e(t=r?t:t.prototype,i)&&o(t,i,n)}},function(t,n,r){var e=r(14)("wks"),o=r(4).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(13))("Symbol."+t))}},function(t,n,r){var e=r(3),o=r(18);t.exports=function(t,n){for(var r=o(t),i=e.getKeys(r),u=i.length,c=0,f;u>c;)if(r[f=i[c++]]===n)return f}},function(t,n,r){var e=r(19),o=r(21);t.exports=function(t){return e(o(t))}},function(t,n,r){var e=r(20);t.exports=0 in Object("z")?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e={}.toString,o=r(18),i=r(3).getNames,u="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(n){return u.slice()}};t.exports.get=function f(t){return u&&"[object Window]"==e.call(t)?c(t):i(o(t))}},function(t,n,r){var e=r(3);t.exports=function(t){var n=e.getKeys(t),r=e.getSymbols;if(r)for(var o=r(t),i=e.isEnum,u=0,c;o.length>u;)i.call(t,c=o[u++])&&n.push(c);return n}},function(t,n,r){var e=r(20);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(25);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=!1},function(t,n,r){var e=r(8);e(e.S+e.F,"Object",{assign:r(29)})},function(t,r,e){var o=e(30),i=e(19),u=e(23),c=e(5);t.exports=e(7)(function(){var t=Object.assign,r={},e={},o=n(),i="abcdefghijklmnopqrst";return r[o]=7,i.split("").forEach(function(t){e[t]=t}),7!=t({},r)[o]||Object.keys(t({},e)).join("")!=i})?function f(t,n){for(var r=o(t),e=arguments.length,f=1;e>f;)for(var s=i(arguments[f++]),a=u(s),p=a.length,l=0,v;p>l;)c(s,v=a[l++])&&(r[v]=s[v]);return r}:Object.assign},function(t,n,r){var e=r(21);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(8);e(e.S,"Object",{is:r(32)})},function(t,n){t.exports=Object.is||function r(t,n){return t===n?0!==t||1/t===1/n:t!=t&&n!=n}},function(t,n,r){var e=r(8);e(e.S,"Object",{setPrototypeOf:r(34).set})},function(t,n,r){var e=r(3).getDesc,o=r(25),i=r(26),u=function(t,n){if(i(t),!o(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,o){try{o=r(35)(Function.call,e(Object.prototype,"__proto__").set,2),o(t,[]),n=!(t instanceof Array)}catch(i){n=!0}return function c(t,r){return u(t,r),n?t.__proto__=r:o(t,r),t}}({},!1):void 0),check:u}},function(t,n,r){var e=r(36);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){"use strict";var e=r(38),o={};o[r(16)("toStringTag")]="z",o+""!="[object z]"&&r(12)(Object.prototype,"toString",function i(){return"[object "+e(this)+"]"},!0)},function(t,n,r){var e=r(20),o=r(16)("toStringTag"),i="Arguments"==e(function(){return arguments}());t.exports=function(t){var n,r,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=(n=Object(t))[o])?r:i?e(n):"Object"==(u=e(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,r){var e=r(25);r(40)("freeze",function(t){return function n(r){return t&&e(r)?t(r):r}})},function(t,n,r){t.exports=function(t,n){var e=r(8),o=(r(9).Object||{})[t]||Object[t],i={};i[t]=n(o),e(e.S+e.F*r(7)(function(){o(1)}),"Object",i)}},function(t,n,r){var e=r(25);r(40)("seal",function(t){return function n(r){return t&&e(r)?t(r):r}})},function(t,n,r){var e=r(25);r(40)("preventExtensions",function(t){return function n(r){return t&&e(r)?t(r):r}})},function(t,n,r){var e=r(25);r(40)("isFrozen",function(t){return function n(r){return e(r)?t?t(r):!1:!0}})},function(t,n,r){var e=r(25);r(40)("isSealed",function(t){return function n(r){return e(r)?t?t(r):!1:!0}})},function(t,n,r){var e=r(25);r(40)("isExtensible",function(t){return function n(r){return e(r)?t?t(r):!0:!1}})},function(t,n,r){var e=r(18);r(40)("getOwnPropertyDescriptor",function(t){return function n(r,o){return t(e(r),o)}})},function(t,n,r){var e=r(30);r(40)("getPrototypeOf",function(t){return function n(r){return t(e(r))}})},function(t,n,r){var e=r(30);r(40)("keys",function(t){return function n(r){return t(e(r))}})},function(t,n,r){r(40)("getOwnPropertyNames",function(){return r(22).get})},function(t,n,r){r(51),r(57),r(63),r(64),r(66),r(69),r(72),r(74),r(76),t.exports=r(9).Array},function(t,n,r){"use strict";var e=r(52)(!0);r(54)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t=this._t,n=this._i,r;return n>=t.length?{value:void 0,done:!0}:(r=e(t,n),this._i+=r.length,{value:r,done:!1})})},function(t,n,r){var e=r(53),o=r(21);t.exports=function(t){return function(n,r){var i=String(o(n)),u=e(r),c=i.length,f,s;return 0>u||u>=c?t?"":void 0:(f=i.charCodeAt(u),55296>f||f>56319||u+1===c||(s=i.charCodeAt(u+1))<56320||s>57343?t?i.charAt(u):f:t?i.slice(u,u+2):(f-55296<<10)+(s-56320)+65536)}}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){"use strict";var e=r(27),o=r(8),i=r(12),u=r(10),c=r(5),f=r(16)("iterator"),s=r(55),a=!([].keys&&"next"in[].keys()),p="@@iterator",l="keys",v="values",h=function(){return this};t.exports=function(t,n,g,y,d,m,x){r(56)(g,n,y);var S=function(t){switch(t){case l:return function n(){return new g(this,t)};case v:return function r(){return new g(this,t)}}return function e(){return new g(this,t)}},b=n+" Iterator",_=t.prototype,w=_[f]||_[p]||d&&_[d],O=w||S(d),P,j;if(w){var A=r(3).getProto(O.call(new t));r(15)(A,b,!0),!e&&c(_,p)&&u(A,f,h)}if((!e||x)&&u(_,f,O),s[n]=O,s[b]=h,d)if(P={keys:m?O:S(l),values:d==v?O:S(v),entries:d!=v?O:S("entries")},x)for(j in P)j in _||i(_,j,P[j]);else o(o.P+o.F*a,n,P)}},function(t,n){t.exports={}},function(t,n,r){"use strict";var e=r(3),o={};r(10)(o,r(16)("iterator"),function(){return this}),t.exports=function(t,n,i){t.prototype=e.create(o,{next:r(11)(1,i)}),r(15)(t,n+" Iterator")}},function(t,n,r){"use strict";var e=r(35),o=r(8),i=r(30),u=r(58),c=r(59),f=r(60),s=r(61);o(o.S+o.F*!r(62)(function(t){Array.from(t)}),"Array",{from:function a(t){var n=i(t),r="function"==typeof this?this:Array,o=arguments[1],a=void 0!==o,p=0,l=s(n),v,h,g,y;if(a&&(o=e(o,arguments[2],2)),void 0==l||r==Array&&c(l))for(v=f(n.length),h=new r(v);v>p;p++)h[p]=a?o(n[p],p):n[p];else for(y=l.call(n),h=new r;!(g=y.next()).done;p++)h[p]=a?u(y,o,[g.value,p],!0):g.value;return h.length=p,h}})},function(t,n,r){var e=r(26);t.exports=function(t,n,r,o){try{return o?n(e(r)[0],r[1]):n(r)}catch(i){var u=t["return"];throw void 0!==u&&e(u.call(t)),i}}},function(t,n,r){var e=r(55),o=r(16)("iterator");t.exports=function(t){return(e.Array||Array.prototype[o])===t}},function(t,n,r){var e=r(53),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){var e=r(38),o=r(16)("iterator"),i=r(55);t.exports=r(9).getIteratorMethod=function(t){return void 0!=t?t[o]||t["@@iterator"]||i[e(t)]:void 0}},function(t,n,r){var e=r(16)("iterator"),o=!1;try{var i=[7][e]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}t.exports=function(t){if(!o)return!1;var n=!1;try{var r=[7],i=r[e]();i.next=function(){n=!0},r[e]=function(){return i},t(r)}catch(u){}return n}},function(t,n,r){"use strict";var e=r(8);e(e.S+e.F*r(7)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function o(){for(var t=0,n=arguments.length,r=new("function"==typeof this?this:Array)(n);n>t;)r[t]=arguments[t++];return r.length=n,r}})},function(t,n,r){r(65)(Array)},function(t,n,r){"use strict";var e=r(3),o=r(16)("species");t.exports=function(t){!r(6)||o in t||e.setDesc(t,o,{configurable:!0,get:function(){return this}})}},function(t,n,r){"use strict";var e=r(67),o=r(68),i=r(55),u=r(18);r(54)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,r):"values"==n?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,e("keys"),e("values"),e("entries")},function(t,n,r){var e=r(16)("unscopables");void 0==[][e]&&r(10)(Array.prototype,e,{}),t.exports=function(t){[][e][t]=!0}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(8);e(e.P,"Array",{copyWithin:r(70)}),r(67)("copyWithin")},function(t,n,r){"use strict";var e=r(30),o=r(71),i=r(60);t.exports=[].copyWithin||function u(t,n){var r=e(this),u=i(r.length),c=o(t,u),f=o(n,u),s=arguments[2],a=Math.min((void 0===s?u:o(s,u))-f,u-c),p=1;for(c>f&&f+a>c&&(p=-1,f+=a-1,c+=a-1);a-->0;)f in r?r[c]=r[f]:delete r[c],c+=p,f+=p;return r}},function(t,n,r){var e=r(53),o=Math.max,i=Math.min;t.exports=function(t,n){return t=e(t),0>t?o(t+n,0):i(t,n)}},function(t,n,r){var e=r(8);e(e.P,"Array",{fill:r(73)}),r(67)("fill")},function(t,n,r){"use strict";var e=r(30),o=r(71),i=r(60);t.exports=[].fill||function u(t){for(var n=e(this,!0),r=i(n.length),u=o(arguments[1],r),c=arguments[2],f=void 0===c?r:o(c,r);f>u;)n[u++]=t;return n}},function(t,n,r){"use strict";var e="find",o=r(8),i=!0,u=r(75)(5);e in[]&&Array(1)[e](function(){i=!1}),o(o.P+o.F*i,"Array",{find:function c(t){return u(this,t,arguments[1])}}),r(67)(e)},function(t,n,r){var e=r(35),o=r(25),i=r(19),u=r(30),c=r(60),f=r(24),s=r(16)("species"),a=function(t,n){var r;return f(t)&&o(r=t.constructor)&&(r=r[s],null===r&&(r=void 0)),new(void 0===r?Array:r)(n)};t.exports=function(t){var n=1==t,r=2==t,o=3==t,f=4==t,s=6==t,p=5==t||s;return function(l,v,h){for(var g=u(l),y=i(g),d=e(v,h,3),m=c(y.length),x=0,S=n?a(l,m):r?a(l,0):void 0,b,_;m>x;x++)if((p||x in y)&&(b=y[x],_=d(b,x,g),t))if(n)S[x]=_;else if(_)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:S.push(b)}else if(f)return!1;return s?-1:o||f?f:S}}},function(t,n,r){"use strict";var e="findIndex",o=r(8),i=!0,u=r(75)(6);e in[]&&Array(1)[e](function(){i=!1}),o(o.P+o.F*i,"Array",{findIndex:function c(t){return u(this,t,arguments[1])}}),r(67)(e)},function(t,n,r){r(78),r(79),r(80),r(51),r(82),r(83),r(87),r(88),r(90),r(91),r(93),r(94),r(95),t.exports=r(9).String},function(t,n,r){var e=r(8),o=r(71),i=String.fromCharCode,u=String.fromCodePoint;e(e.S+e.F*(!!u&&1!=u.length),"String",{fromCodePoint:function c(t){for(var n=[],r=arguments.length,e=0,u;r>e;){if(u=+arguments[e++],o(u,1114111)!==u)throw RangeError(u+" is not a valid code point");n.push(65536>u?i(u):i(((u-=65536)>>10)+55296,u%1024+56320))}return n.join("")}})},function(t,n,r){var e=r(8),o=r(18),i=r(60);e(e.S,"String",{raw:function u(t){for(var n=o(t.raw),r=i(n.length),e=arguments.length,u=[],c=0;r>c;)u.push(String(n[c++])),e>c&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,r){"use strict";r(81)("trim",function(t){return function n(){return t(this,3)}})},function(t,n,r){var e=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(a,"")),t},o=r(8),i=r(21),u=" \n \f\r   ᠎              \u2028\u2029\ufeff",c="["+u+"]",f="​…",s=RegExp("^"+c+c+"*"),a=RegExp(c+c+"*$");t.exports=function(t,n){var i={};i[t]=n(e),o(o.P+o.F*r(7)(function(){return!!u[t]()||f[t]()!=f}),"String",i)}},function(t,n,r){"use strict";var e=r(8),o=r(52)(!1);e(e.P,"String",{codePointAt:function i(t){return o(this,t)}})},function(t,n,r){"use strict";var e=r(8),o=r(60),i=r(84),u="endsWith",c=""[u];e(e.P+e.F*r(86)(u),"String",{endsWith:function f(t){var n=i(this,t,u),r=arguments[1],e=o(n.length),f=void 0===r?e:Math.min(o(r),e),s=String(t);return c?c.call(n,s,f):n.slice(f-s.length,f)===s}})},function(t,n,r){var e=r(85),o=r(21);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,n,r){var e=r(25),o=r(20),i=r(16)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n,r){t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r(16)("match")]=!1,!"/./"[t](n)}catch(e){}}return!0}},function(t,n,r){"use strict";var e=r(8),o=r(84),i="includes";e(e.P+e.F*r(86)(i),"String",{includes:function u(t){return!!~o(this,t,i).indexOf(t,arguments[1])}})},function(t,n,r){var e=r(8);e(e.P,"String",{repeat:r(89)})},function(t,n,r){"use strict";var e=r(53),o=r(21);t.exports=function i(t){var n=String(o(this)),r="",i=e(t);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(n+=n))1&i&&(r+=n);return r}},function(t,n,r){"use strict";var e=r(8),o=r(60),i=r(84),u="startsWith",c=""[u];e(e.P+e.F*r(86)(u),"String",{startsWith:function f(t){var n=i(this,t,u),r=o(Math.min(arguments[1],n.length)),e=String(t);return c?c.call(n,e,r):n.slice(r,r+e.length)===e}})},function(t,n,r){r(92)("match",1,function(t,n){return function r(e){"use strict";var o=t(this),i=void 0==e?void 0:e[n];return void 0!==i?i.call(e,o):new RegExp(e)[n](String(o))}})},function(t,n,r){"use strict";t.exports=function(t,n,e){var o=r(21),i=r(16)(t),u=""[t];r(7)(function(){var n={};return n[i]=function(){return 7},7!=""[t](n)})&&(r(12)(String.prototype,t,e(o,i,u)),r(10)(RegExp.prototype,i,2==n?function(t,n){return u.call(t,this,n)}:function(t){return u.call(t,this)}))}},function(t,n,r){r(92)("replace",2,function(t,n,r){return function e(o,i){"use strict";var u=t(this),c=void 0==o?void 0:o[n];return void 0!==c?c.call(o,u,i):r.call(String(u),o,i)}})},function(t,n,r){r(92)("search",1,function(t,n){return function r(e){"use strict";var o=t(this),i=void 0==e?void 0:e[n];return void 0!==i?i.call(e,o):new RegExp(e)[n](String(o))}})},function(t,n,r){r(92)("split",2,function(t,n,r){return function e(o,i){"use strict";var u=t(this),c=void 0==o?void 0:o[n];return void 0!==c?c.call(o,u,i):r.call(String(u),o,i)}})},function(t,n,r){r(97),r(98),t.exports=r(9).Function},function(t,n,r){var e=r(3).setDesc,o=r(11),i=r(5),u=Function.prototype,c=/^\s*function ([^ (]*)/,f="name";f in u||r(6)&&e(u,f,{configurable:!0,get:function(){var t=(""+this).match(c),n=t?t[1]:"";return i(this,f)||e(this,f,o(5,n)),n}})},function(t,n,r){"use strict";var e=r(3),o=r(25),i=r(16)("hasInstance"),u=Function.prototype;i in u||e.setDesc(u,i,{value:function(t){if("function"!=typeof this||!o(t))return!1;if(!o(this.prototype))return t instanceof this;for(;t=e.getProto(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,r){r(2),t.exports=r(9).Symbol},function(t,n,r){r(37),r(51),r(101),r(102),t.exports=r(9).Map},function(t,n,r){r(66);var e=r(4),o=r(10),i=r(55),u=r(16)("iterator"),c=e.NodeList,f=e.HTMLCollection,s=c&&c.prototype,a=f&&f.prototype,p=i.NodeList=i.HTMLCollection=i.Array;!c||u in s||o(s,u,p),!f||u in a||o(a,u,p)},function(t,n,r){"use strict";var e=r(103);r(107)("Map",function(t){return function n(){return t(this,arguments[0])}},{get:function o(t){var n=e.getEntry(this,t);return n&&n.v},set:function i(t,n){return e.def(this,0===t?0:t,n)}},e,!0)},function(t,n,r){"use strict";var e=r(3),o=r(10),i=r(35),u=r(65),c=r(104),f=r(21),s=r(105),a=r(68),p=r(13)("id"),l=r(5),v=r(25),h=Object.isExtensible||v,g=r(6),y=g?"_s":"size",d=0,m=function(t,n){if(!v(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,p)){if(!h(t))return"F";if(!n)return"E";o(t,p,++d)}return"O"+t[p]},x=function(t,n){var r=m(n),e;if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,o,u){var a=t(function(t,r){c(t,a,n),t._i=e.create(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&s(r,o,t[u],t)});return r(106)(a.prototype,{clear:function p(){for(var t=this,n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},"delete":function(t){var n=this,r=x(n,t);if(r){var e=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=e),e&&(e.p=o),n._f==r&&(n._f=e),n._l==r&&(n._l=o),n[y]--}return!!r},forEach:function l(t){for(var n=i(t,arguments[1],3),r;r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function v(t){return!!x(this,t)}}),g&&e.setDesc(a.prototype,"size",{get:function(){return f(this[y])}}),a},def:function(t,n,r){var e=x(t,n),o,i;return e?e.v=r:(t._l=e={i:i=m(n,!0),k:n,v:r,p:o=t._l,n:void 0,r:!1},t._f||(t._f=e),o&&(o.n=e),t[y]++,"F"!==i&&(t._i[i]=e)),t},getEntry:x,setStrong:function(t,n,e){r(54)(t,n,function(t,n){this._t=t,this._k=n,this._l=void 0},function(){for(var t=this,n=t._k,r=t._l;r&&r.r;)r=r.p;return t._t&&(t._l=r=r?r.n:t._t._f)?"keys"==n?a(0,r.k):"values"==n?a(0,r.v):a(0,[r.k,r.v]):(t._t=void 0,a(1))},e?"entries":"values",!e,!0),u(t),u(r(9)[n])}}},function(t,n){t.exports=function(t,n,r){if(!(t instanceof n))throw TypeError(r+": use the 'new' operator!");return t}},function(t,n,r){var e=r(35),o=r(58),i=r(59),u=r(26),c=r(60),f=r(61);t.exports=function(t,n,r,s){var a=f(t),p=e(r,s,n?2:1),l=0,v,h,g;if("function"!=typeof a)throw TypeError(t+" is not iterable!");if(i(a))for(v=c(t.length);v>l;l++)n?p(u(h=t[l])[0],h[1]):p(t[l]);else for(g=a.call(t);!(h=g.next()).done;)o(g,p,h.value,n)}},function(t,n,r){var e=r(12);t.exports=function(t,n){for(var r in n)e(t,r,n[r]);return t}},function(t,n,r){"use strict";var e=r(4),o=r(8),i=r(105),u=r(104);t.exports=function(t,n,c,f,s,a){var p=e[t],l=p,v=s?"set":"add",h=l&&l.prototype,g={},y=function(t){var n=h[t];r(12)(h,t,"delete"==t?function(t){return n.call(this,0===t?0:t)}:"has"==t?function e(t){return n.call(this,0===t?0:t)}:"get"==t?function o(t){return n.call(this,0===t?0:t)}:"add"==t?function i(t){return n.call(this,0===t?0:t),this}:function u(t,r){return n.call(this,0===t?0:t,r),this})};if("function"==typeof l&&(a||h.forEach&&!r(7)(function(){(new l).entries().next()}))){var d=new l,m=d[v](a?{}:-0,1),x;r(62)(function(t){new l(t)})||(l=n(function(n,r){u(n,l,t);var e=new p;return void 0!=r&&i(r,s,e[v],e),e}),l.prototype=h,h.constructor=l),a||d.forEach(function(t,n){x=1/n===-(1/0)}),x&&(y("delete"),y("has"),s&&y("get")),(x||m!==d)&&y(v),a&&h.clear&&delete h.clear}else l=f.getConstructor(n,t,s,v),r(106)(l.prototype,c);return r(15)(l,t),g[t]=l,o(o.G+o.W+o.F*(l!=p),g),a||f.setStrong(l,t,s),l}},function(t,n,r){r(37),r(51),r(101),r(109),t.exports=r(9).Set},function(t,n,r){"use strict";var e=r(103);r(107)("Set",function(t){return function n(){return t(this,arguments[0])}},{add:function o(t){return e.def(this,t=0===t?0:t,t)}},e)}]),"undefined"==typeof Package&&(Package={}),Package["ecmascript-runtime"]={Symbol:n,Map:r,Set:e}}(); + +!function(){var t=Package.meteor.Meteor,n;(function(){!function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(e,o,r){function i(t){throw t}var u=r(1),c=u.prototype.then;u.prototype.then=function(n,e){return"object"==typeof t&&"function"==typeof t.bindEnvironment?c.call(this,n&&t.bindEnvironment(n,i),e&&t.bindEnvironment(e,i)):c.call(this,n,e)},n=u},function(t,n,e){(function(n){function o(t,n){Object.keys(n).forEach(function(e){var o=n[e];"function"!=typeof o||r.call(t,e)||(t[e]=o)})}var r=Object.prototype.hasOwnProperty,i="object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this,u=i.Promise,c=e(2);"function"==typeof u?(o(u,c),o(u.prototype,c.prototype),t.exports=u):t.exports=c}).call(n,function(){return this}())},function(t,n,e){"use strict";t.exports=e(3)},function(t,n,e){"use strict";t.exports=e(4),e(6),e(7),e(8),e(9)},function(t,n,e){"use strict";function o(){}function r(t){try{return t.then}catch(n){return d=n,w}}function i(t,n){try{return t(n)}catch(e){return d=e,w}}function u(t,n,e){try{t(n,e)}catch(o){return d=o,w}}function c(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._37=0,this._12=null,this._59=[],t!==o&&y(t,this)}function f(t,n,e){return new t.constructor(function(r,i){var u=new c(o);u.then(r,i),s(t,new h(n,e,u))})}function s(t,n){for(;3===t._37;)t=t._12;return 0===t._37?void t._59.push(n):void v(function(){var e=1===t._37?n.onFulfilled:n.onRejected;if(null===e)return void(1===t._37?a(n.promise,t._12):l(n.promise,t._12));var o=i(e,t._12);o===w?l(n.promise,d):a(n.promise,o)})}function a(t,n){if(n===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(n&&("object"==typeof n||"function"==typeof n)){var e=r(n);if(e===w)return l(t,d);if(e===t.then&&n instanceof c)return t._37=3,t._12=n,void p(t);if("function"==typeof e)return void y(e.bind(n),t)}t._37=1,t._12=n,p(t)}function l(t,n){t._37=2,t._12=n,p(t)}function p(t){for(var n=0;na){for(var n=0,e=u.length-s;e>n;n++)u[n]=u[n+s];u.length-=s,s=0}}u.length=0,s=0,c=!1}function r(t){var n=1,e=new l(t),o=document.createTextNode("");return e.observe(o,{characterData:!0}),function r(){n=-n,o.data=n}}function i(t){return function n(){function n(){clearTimeout(e),clearInterval(o),t()}var e=setTimeout(n,0),o=setInterval(n,50)}}t.exports=e;var u=[],c=!1,f,s=0,a=1024,l=n.MutationObserver||n.WebKitMutationObserver;f="function"==typeof l?r(o):i(o),e.requestFlush=f,e.makeRequestCallFromTimer=i}).call(n,function(){return this}())},function(t,n,e){"use strict";var o=e(4);t.exports=o,o.prototype.done=function(t,n){var e=arguments.length?this.then.apply(this,arguments):this;e.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,n,e){"use strict";var o=e(4);t.exports=o,o.prototype["finally"]=function(t){return this.then(function(n){return o.resolve(t()).then(function(){return n})},function(n){return o.resolve(t()).then(function(){throw n})})}},function(t,n,e){"use strict";function o(t){var n=new r(r._99);return n._37=1,n._12=t,n}var r=e(4);t.exports=r;var i=o(!0),u=o(!1),c=o(null),f=o(void 0),s=o(0),a=o("");r.resolve=function(t){if(t instanceof r)return t;if(null===t)return c;if(void 0===t)return f;if(t===!0)return i;if(t===!1)return u;if(0===t)return s;if(""===t)return a;if("object"==typeof t||"function"==typeof t)try{var n=t.then;if("function"==typeof n)return new r(n.bind(t))}catch(e){return new r(function(t,n){n(e)})}return o(t)},r.all=function(t){var n=Array.prototype.slice.call(t);return new r(function(t,e){function o(u,c){if(c&&("object"==typeof c||"function"==typeof c)){if(c instanceof r&&c.then===r.prototype.then){for(;3===c._37;)c=c._12;return 1===c._37?o(u,c._12):(2===c._37&&e(c._12),void c.then(function(t){o(u,t)},e))}var f=c.then;if("function"==typeof f){var s=new r(f.bind(c));return void s.then(function(t){o(u,t)},e)}}n[u]=c,0===--i&&t(n)}if(0===n.length)return t([]);for(var i=n.length,u=0;u0?n:0);return new o(function(n,o){r.push(function(t,e){t?o(t):n(e)});var i=t.apply(e,r);!i||"object"!=typeof i&&"function"!=typeof i||"function"!=typeof i.then||n(i)})}},o.nodeify=function(t){return function(){var n=Array.prototype.slice.call(arguments),e="function"==typeof n[n.length-1]?n.pop():null,i=this;try{return t.apply(this,arguments).nodeify(e,i)}catch(u){if(null===e||"undefined"==typeof e)return new o(function(t,n){n(u)});r(function(){e.call(i,u)})}}},o.prototype.nodeify=function(t,n){return"function"!=typeof t?this:void this.then(function(e){r(function(){t.call(n,null,e)})},function(e){r(function(){t.call(n,e)})})}},function(t,n,e){"use strict";function o(){if(f.length)throw f.shift()}function r(t){var n;n=c.length?c.pop():new i,n.task=t,u(n)}function i(){this.task=null}var u=e(5),c=[],f=[],s=u.makeRequestCallFromTimer(o);t.exports=r,i.prototype.call=function(){try{this.task.call()}catch(t){r.onerror?r.onerror(t):(f.push(t),s())}finally{this.task=null,c[c.length]=this}}}])}).call(this),"undefined"==typeof Package&&(Package={}),Package.promise={Promise:n}}(); + +!function(){var e=Package.meteor.Meteor,n=Package.underscore._,t=Package.ecmascript.ECMAScript,r=Package["babel-runtime"].babelHelpers,o=Package["ecmascript-runtime"].Symbol,i=Package["ecmascript-runtime"].Map,a=Package["ecmascript-runtime"].Set,c=Package.promise.Promise,u;(function(){function n(){return new a(a.Type.ALEA,{seeds:[new Date,c,d,p,Math.random()]})}if(e.isServer)var t=Npm.require("crypto");var r=function(){function e(){var e=4022871197,n=function(n){n=n.toString();for(var t=0;t>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=4294967296*r}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}return function(n){var t=0,r=0,o=0,i=1;0==n.length&&(n=[+new Date]);var a=e();t=a(" "),r=a(" "),o=a(" ");for(var c=0;ct&&(t+=1),r-=a(n[c]),0>r&&(r+=1),o-=a(n[c]),0>o&&(o+=1);a=null;var u=function(){var e=2091639*t+2.3283064365386963e-10*i;return t=r,r=o,o=e-(i=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+1.1102230246251565e-16*(2097152*u()|0)},u.version="Alea 0.9",u.args=n,u}(Array.prototype.slice.call(arguments))},o="23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz",i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",a=function(e,n){var t=this;if(t.type=e,!a.Type[e])throw new Error("Unknown random generator type: "+e);if(e===a.Type.ALEA){if(!n.seeds)throw new Error("No seeds were provided for Alea PRNG");t.alea=r.apply(null,n.seeds)}};a.Type={NODE_CRYPTO:"NODE_CRYPTO",BROWSER_CRYPTO:"BROWSER_CRYPTO",ALEA:"ALEA"},a.prototype.fraction=function(){var e=this;if(e.type===a.Type.ALEA)return e.alea();if(e.type===a.Type.NODE_CRYPTO){var n=parseInt(e.hexString(8),16);return 2.3283064365386963e-10*n}if(e.type===a.Type.BROWSER_CRYPTO){var t=new Uint32Array(1);return window.crypto.getRandomValues(t),2.3283064365386963e-10*t[0]}throw new Error("Unknown random generator type: "+e.type)},a.prototype.hexString=function(e){var n=this;if(n.type===a.Type.NODE_CRYPTO){var r=Math.ceil(e/2),o;try{o=t.randomBytes(r)}catch(i){o=t.pseudoRandomBytes(r)}var c=o.toString("hex");return c.substring(0,e)}return this._randomString(e,"0123456789abcdef")},a.prototype._randomString=function(e,n){for(var t=this,r=[],o=0;e>o;o++)r[o]=t.choice(n);return r.join("")},a.prototype.id=function(e){var n=this;return void 0===e&&(e=17),n._randomString(e,o)},a.prototype.secret=function(e){var n=this;return void 0===e&&(e=43),n._randomString(e,i)},a.prototype.choice=function(e){var n=Math.floor(this.fraction()*e.length);return"string"==typeof e?e.substr(n,1):e[n]};var c="undefined"!=typeof window&&window.innerHeight||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientHeight||"undefined"!=typeof document&&document.body&&document.body.clientHeight||1,d="undefined"!=typeof window&&window.innerWidth||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientWidth||"undefined"!=typeof document&&document.body&&document.body.clientWidth||1,p="undefined"!=typeof navigator&&navigator.userAgent||"";u=e.isServer?new a(a.Type.NODE_CRYPTO):"undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?new a(a.Type.BROWSER_CRYPTO):n(),u.createWithSeeds=function(){for(var e=arguments.length,n=Array(e),t=0;e>t;t++)n[t]=arguments[t];if(0===n.length)throw new Error("No seeds were provided");return new a(a.Type.ALEA,{seeds:n})},u.insecure=n()}).call(this),function(){e.uuid=function(){for(var e="0123456789abcdef",n=[],t=0;36>t;t++)n[t]=u.choice(e);n[14]="4",n[19]=e.substr(3&parseInt(n[19],16)|8,1),n[8]=n[13]=n[18]=n[23]="-";var r=n.join("");return r}}.call(this),"undefined"==typeof Package&&(Package={}),Package.random={Random:u}}(); + +!function(){var i=Package.meteor.Meteor,t=Package.underscore._,a=Package.ejson.EJSON,n;(function(){n=function(i,t){var a=this;a._map={},a._idStringify=i||JSON.stringify,a._idParse=t||JSON.parse},t.extend(n.prototype,{get:function(i){var t=this,a=t._idStringify(i);return t._map[a]},set:function(i,t){var a=this,n=a._idStringify(i);a._map[n]=t},remove:function(i){var t=this,a=t._idStringify(i);delete t._map[a]},has:function(i){var a=this,n=a._idStringify(i);return t.has(a._map,n)},empty:function(){var i=this;return t.isEmpty(i._map)},clear:function(){var i=this;i._map={}},forEach:function(i){for(var a=this,n=t.keys(a._map),e=0;ei||i>t.name.length+2){var a=t.name+": "+t.message;e.push(a)}}e.push(t.stack),r(e.length);for(var u=0;u1e3)return void(o=!0)}if(d.length){var a=d.shift();try{a()}catch(u){i("afterFlush",u)}}}o=!0}finally{if(o||(p=!1,t._runFlush({finishSynchronously:n.finishSynchronously,throwFirstError:!1})),s=!1,p=!1,c.length||d.length){if(n.finishSynchronously)throw new Error("still have more to do?");setTimeout(h,10)}}},t.autorun=function(n,e){if("function"!=typeof n)throw new Error("Tracker.autorun requires a function argument");e=e||{},v=!0;var o=new t.Computation(n,t.currentComputation,e.onError);return t.active&&t.onInvalidate(function(){o.stop()}),o},t.nonreactive=function(n){var o=t.currentComputation;e(null);try{return n()}finally{e(o)}},t.onInvalidate=function(n){if(!t.active)throw new Error("Tracker.onInvalidate requires a currentComputation");t.currentComputation.onInvalidate(n)},t.afterFlush=function(n){d.push(n),h()}}).call(this),function(){n.flush=t.flush,n.autorun=t.autorun,n.autosubscribe=t.autorun,t.depend=function(n){return n.depend()},e=t}.call(this),"undefined"==typeof Package&&(Package={}),Package.tracker={Tracker:t,Deps:e}}(); + +!function(){var t=Package.meteor.Meteor,e=Package.ejson.EJSON,r=Package["id-map"].IdMap,o=Package.random.Random,n;(function(){n={},n._looksLikeObjectID=function(t){return 24===t.length&&t.match(/^[0-9a-f]*$/)},n.ObjectID=function(t){var e=this;if(t){if(t=t.toLowerCase(),!n._looksLikeObjectID(t))throw new Error("Invalid hexadecimal string for creating an ObjectID");e._str=t}else e._str=o.hexString(24)},n.ObjectID.prototype.toString=function(){var t=this;return'ObjectID("'+t._str+'")'},n.ObjectID.prototype.equals=function(t){var e=this;return t instanceof n.ObjectID&&e.valueOf()===t.valueOf()},n.ObjectID.prototype.clone=function(){var t=this;return new n.ObjectID(t._str)},n.ObjectID.prototype.typeName=function(){return"oid"},n.ObjectID.prototype.getTimestamp=function(){var t=this;return parseInt(t._str.substr(0,8),16)},n.ObjectID.prototype.valueOf=n.ObjectID.prototype.toJSONValue=n.ObjectID.prototype.toHexString=function(){return this._str},e.addType("oid",function(t){return new n.ObjectID(t)}),n.idStringify=function(t){if(t instanceof n.ObjectID)return t.valueOf();if("string"==typeof t)return""===t?t:"-"===t.substr(0,1)||"~"===t.substr(0,1)||n._looksLikeObjectID(t)||"{"===t.substr(0,1)?"-"+t:t;if(void 0===t)return"-";if("object"==typeof t&&null!==t)throw new Error("Meteor does not currently support objects other than ObjectID as ids");return"~"+JSON.stringify(t)},n.idParse=function(t){return""===t?t:"-"===t?void 0:"-"===t.substr(0,1)?t.substr(1):"~"===t.substr(0,1)?JSON.parse(t.substr(1)):n._looksLikeObjectID(t)?new n.ObjectID(t):t}}).call(this),"undefined"==typeof Package&&(Package={}),Package["mongo-id"]={MongoID:n}}(); + +!function(){var e=Package.meteor.Meteor,d=Package.underscore._,n=Package.ejson.EJSON,i;(function(){i={},i.diffQueryChanges=function(e,d,n,a,r){e?i.diffQueryOrderedChanges(d,n,a,r):i.diffQueryUnorderedChanges(d,n,a,r)},i.diffQueryUnorderedChanges=function(e,a,r,o){o=o||{};var f=o.projectionFn||n.clone;if(r.movedBefore)throw new Error("_diffQueryUnordered called with a movedBefore observer!");a.forEach(function(a,o){var c=e.get(o);if(c){if(r.changed&&!n.equals(c,a)){var t=f(a),u=f(c),h=i.makeChangedFields(t,u);d.isEmpty(h)||r.changed(o,h)}}else if(r.added){var l=f(a);delete l._id,r.added(a._id,l)}}),r.removed&&e.forEach(function(e,d){a.has(d)||r.removed(d)})},i.diffQueryOrderedChanges=function(a,r,o,f){f=f||{};var c=f.projectionFn||n.clone,t={};d.each(r,function(d){t[d._id]&&e._debug("Duplicate _id in new_results"),t[d._id]=!0});var u={};d.each(a,function(d,n){d._id in u&&e._debug("Duplicate _id in old_results"),u[d._id]=n});for(var h=[],l=0,s=r.length,g=new Array(s),_=new Array(s),v=function(e){return u[r[e]._id]},y=0;s>y;y++)if(void 0!==u[r[y]._id]){for(var m=l;m>0&&!(v(g[m-1])l&&(l=m+1)}for(var p=0===l?-1:g[l-1];p>=0;)h.push(p),p=_[p];h.reverse(),h.push(r.length),d.each(a,function(e){t[e._id]||o.removed&&o.removed(e._id)});var O=0;d.each(h,function(e){for(var n=r[e]?r[e]._id:null,f,t,h,l,s,g=O;e>g;g++)t=r[g],d.has(u,t._id)?(f=a[u[t._id]],l=c(t),s=c(f),h=i.makeChangedFields(l,s),d.isEmpty(h)||o.changed&&o.changed(t._id,h),o.movedBefore&&o.movedBefore(t._id,n)):(h=c(t),delete h._id,o.addedBefore&&o.addedBefore(t._id,h,n),o.added&&o.added(t._id,h));n&&(t=r[e],f=a[u[t._id]],l=c(t),s=c(f),h=i.makeChangedFields(l,s),d.isEmpty(h)||o.changed&&o.changed(t._id,h)),O=e+1})},i.diffObjects=function(e,n,i){d.each(e,function(e,a){d.has(n,a)?i.both&&i.both(a,e,n[a]):i.leftOnly&&i.leftOnly(a,e)}),i.rightOnly&&d.each(n,function(n,a){d.has(e,a)||i.rightOnly(a,n)})},i.makeChangedFields=function(e,d){var a={};return i.diffObjects(d,e,{leftOnly:function(e,d){a[e]=void 0},rightOnly:function(e,d){a[e]=d},both:function(e,d,i){n.equals(d,i)||(a[e]=i)}}),a},i.applyChanges=function(e,n){d.each(n,function(d,n){void 0===d?delete e[n]:e[n]=d})}}).call(this),"undefined"==typeof Package&&(Package={}),Package["diff-sequence"]={DiffSequence:i}}(); + +!function(){var t=Package.meteor.Meteor,n,o;(function(){n={exports:{}}}).call(this),function(){!function(){function t(t){for(var n=[],o=[],a=0;an!=a[e][0]>n&&t<(a[e][1]-a[r][1])*(n-a[r][0])/(a[e][0]-a[r][0])+a[r][1]&&(i=!i);return i}var a={};"undefined"!=typeof n&&n.exports&&(n.exports=a),a.lineStringsIntersect=function(t,n){for(var o=[],a=0;a<=t.coordinates.length-2;++a)for(var r=0;r<=n.coordinates.length-2;++r){var e={x:t.coordinates[a][1],y:t.coordinates[a][0]},i={x:t.coordinates[a+1][1],y:t.coordinates[a+1][0]},s={x:n.coordinates[r][1],y:n.coordinates[r][0]},c={x:n.coordinates[r+1][1],y:n.coordinates[r+1][0]},u=(c.x-s.x)*(e.y-s.y)-(c.y-s.y)*(e.x-s.x),h=(i.x-e.x)*(e.y-s.y)-(i.y-e.y)*(e.x-s.x),d=(c.y-s.y)*(i.x-e.x)-(c.x-s.x)*(i.y-e.y);if(0!=d){var l=u/d,y=h/d;l>=0&&1>=l&&y>=0&&1>=y&&o.push({type:"Point",coordinates:[e.x+l*(i.x-e.x),e.y+l*(i.y-e.y)]})}}return 0==o.length&&(o=!1),o},a.pointInBoundingBox=function(t,n){return!(t.coordinates[1]n[1][0]||t.coordinates[0]n[1][1])},a.pointInPolygon=function(n,r){for(var e="Polygon"==r.type?[r.coordinates]:r.coordinates,i=!1,s=0;sc;c++){var u=2*Math.PI*c/o,h=Math.asin(Math.sin(i[0])*Math.cos(e)+Math.cos(i[0])*Math.sin(e)*Math.cos(u)),d=i[1]+Math.atan2(Math.sin(u)*Math.sin(e)*Math.cos(i[0]),Math.cos(e)-Math.sin(i[0])*Math.sin(h));s[c]=[],s[c][1]=a.numberToDegree(h),s[c][0]=a.numberToDegree(d)}return{type:"Polygon",coordinates:[s]}},a.rectangleCentroid=function(t){var n=t.coordinates[0],o=n[0][0],a=n[0][1],r=n[2][0],e=n[2][1],i=r-o,s=e-a;return{type:"Point",coordinates:[o+i/2,a+s/2]}},a.pointDistance=function(t,n){var o=t.coordinates[0],r=t.coordinates[1],e=n.coordinates[0],i=n.coordinates[1],s=a.numberToRadius(i-r),c=a.numberToRadius(e-o),u=Math.pow(Math.sin(s/2),2)+Math.cos(a.numberToRadius(r))*Math.cos(a.numberToRadius(i))*Math.pow(Math.sin(c/2),2),h=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*h*1e3},a.geometryWithinRadius=function(t,n,o){if("Point"==t.type)return a.pointDistance(t,n)<=o;if("LineString"==t.type||"Polygon"==t.type){var r={},e;e="Polygon"==t.type?t.coordinates[0]:t.coordinates;for(var i in e)if(r.coordinates=e[i],a.pointDistance(r,n)>o)return!1}return!0},a.area=function(t){for(var n=0,o=t.coordinates[0],a=o.length-1,r,e,i=0;i0;)if(e=T[a-1],i=I[a-1],a--,i-e>1){for(l=t[i].lng()-t[e].lng(),y=t[i].lat()-t[e].lat(),Math.abs(l)>180&&(l=360-Math.abs(l)),l*=Math.cos(b*(t[i].lat()+t[e].lat())),M=l*l+y*y,s=e+1,c=e,h=-1;i>s;s++)f=t[s].lng()-t[e].lng(),g=t[s].lat()-t[e].lat(),Math.abs(f)>180&&(f=360-Math.abs(f)),f*=Math.cos(b*(t[s].lat()+t[e].lat())),x=f*f+g*g,p=t[s].lng()-t[i].lng(),v=t[s].lat()-t[i].lat(),Math.abs(p)>180&&(p=360-Math.abs(p)),p*=Math.cos(b*(t[s].lat()+t[i].lat())),P=p*p+v*v,u=x>=M+P?P:P>=M+x?x:(f*y-g*l)*(f*y-g*l)/M,u>h&&(c=s,h=u);d>h?(m[r]=e,r++):(a++,T[a-1]=c,I[a-1]=i,a++,T[a-1]=e,I[a-1]=c)}else m[r]=e,r++;m[r]=o-1,r++;for(var R=new Array,s=0;r>s;s++)R.push(t[m[s]]);return R.map(function(t){return{type:"Point",coordinates:[t.lng,t.lat]}})},a.destinationPoint=function(t,n,o){o/=6371,n=a.numberToRadius(n);var r=a.numberToRadius(t.coordinates[0]),e=a.numberToRadius(t.coordinates[1]),i=Math.asin(Math.sin(r)*Math.cos(o)+Math.cos(r)*Math.sin(o)*Math.cos(n)),s=e+Math.atan2(Math.sin(n)*Math.sin(o)*Math.cos(r),Math.cos(o)-Math.sin(r)*Math.sin(i));return s=(s+3*Math.PI)%(2*Math.PI)-Math.PI,{type:"Point",coordinates:[a.numberToDegree(i),a.numberToDegree(s)]}}}()}.call(this),function(){o=n.exports}.call(this),"undefined"==typeof Package&&(Package={}),Package["geojson-utils"]={GeoJSON:o}}(); + +!function(){var e=Package.meteor.Meteor,r=Package.underscore._,t=Package.ejson.EJSON,n=Package["id-map"].IdMap,o=Package["ordered-dict"].OrderedDict,i=Package.tracker.Tracker,a=Package.tracker.Deps,s=Package["mongo-id"].MongoID,c=Package.random.Random,u=Package["diff-sequence"].DiffSequence,d=Package["geojson-utils"].GeoJSON,f,l,h,p,v,_,m,y,g,w,$,b,E,I,C,O;(function(){f=function(r){var t=this;t.name=r,t._docs=new f._IdMap,t._observeQueue=new e._SynchronousQueue,t.next_qid=1,t.queries={},t._savedOriginals=null,t.paused=!1},l={},h={},p=function(e){var r=new Error(e);return r.name="MinimongoError",r},f.prototype.find=function(e,r){return 0===arguments.length&&(e={}),new f.Cursor(this,e,r)},f.Cursor=function(e,r,t){var n=this;t||(t={}),n.collection=e,n.sorter=null,n.matcher=new l.Matcher(r),f._selectorIsId(r)?n._selectorId=r:f._selectorIsIdPerhapsAsObject(r)?n._selectorId=r._id:(n._selectorId=void 0,(n.matcher.hasGeoQuery()||t.sort)&&(n.sorter=new l.Sorter(t.sort||[],{matcher:n.matcher}))),n.skip=t.skip,n.limit=t.limit,n.fields=t.fields,n._projectionFn=f._compileProjection(n.fields||{}),n._transform=f.wrapTransform(t.transform),"undefined"!=typeof i&&(n.reactive=void 0===t.reactive?!0:t.reactive)},f.Cursor.prototype.rewind=function(){},f.prototype.findOne=function(e,r){return 0===arguments.length&&(e={}),r=r||{},r.limit=1,this.find(e,r).fetch()[0]},f.Cursor.prototype.forEach=function(e,t){var n=this,o=n._getRawObjects({ordered:!0});n.reactive&&n._depend({addedBefore:!0,removed:!0,changed:!0,movedBefore:!0}),r.each(o,function(r,o){r=n._projectionFn(r),n._transform&&(r=n._transform(r)),e.call(t,r,o,n)})},f.Cursor.prototype.getTransform=function(){return this._transform},f.Cursor.prototype.map=function(e,r){var t=this,n=[];return t.forEach(function(o,i){n.push(e.call(r,o,i,t))}),n},f.Cursor.prototype.fetch=function(){var e=this,r=[];return e.forEach(function(e){r.push(e)}),r},f.Cursor.prototype.count=function(){var e=this;return e.reactive&&e._depend({added:!0,removed:!0},!0),e._getRawObjects({ordered:!0}).length},f.Cursor.prototype._publishCursor=function(e){var r=this;if(!r.collection.name)throw new Error("Can't publish a cursor from a collection without a name.");var t=r.collection.name;if(!Package.mongo)throw new Error("Can't publish from Minimongo without the `mongo` package.");return Package.mongo.Mongo.Collection._publishCursor(r,e,t)},f.Cursor.prototype._getCollectionName=function(){var e=this;return e.collection.name},f._observeChangesCallbacksAreOrdered=function(e){if(e.added&&e.addedBefore)throw new Error("Please specify only one of added() and addedBefore()");return!(!e.addedBefore&&!e.movedBefore)},f._observeCallbacksAreOrdered=function(e){if(e.addedAt&&e.added)throw new Error("Please specify only one of added() and addedAt()");if(e.changedAt&&e.changed)throw new Error("Please specify only one of changed() and changedAt()");if(e.removed&&e.removedAt)throw new Error("Please specify only one of removed() and removedAt()");return!!(e.addedAt||e.movedTo||e.changedAt||e.removedAt)},f.ObserveHandle=function(){},r.extend(f.Cursor.prototype,{observe:function(e){var r=this;return f._observeFromObserveChanges(r,e)},observeChanges:function(e){var n=this,o=f._observeChangesCallbacksAreOrdered(e);if(!e._allow_unordered&&!o&&(n.skip||n.limit))throw new Error("must use ordered observe (ie, 'addedBefore' instead of 'added') with skip or limit");if(n.fields&&(0===n.fields._id||n.fields._id===!1))throw Error("You may not observe a cursor with {fields: {_id: 0}}");var a={matcher:n.matcher,sorter:o&&n.sorter,distances:n.matcher.hasGeoQuery()&&o&&new f._IdMap,resultsSnapshot:null,ordered:o,cursor:n,projectionFn:n._projectionFn},s;n.reactive&&(s=n.collection.next_qid++,n.collection.queries[s]=a),a.results=n._getRawObjects({ordered:o,distances:a.distances}),n.collection.paused&&(a.resultsSnapshot=o?[]:new f._IdMap);var c=function(e){return e?function(){var r=this,t=arguments;n.collection.paused||n.collection._observeQueue.queueTask(function(){e.apply(r,t)})}:function(){}};if(a.added=c(e.added),a.changed=c(e.changed),a.removed=c(e.removed),o&&(a.addedBefore=c(e.addedBefore),a.movedBefore=c(e.movedBefore)),!e._suppress_initial&&!n.collection.paused){var u=o?r.bind(r.each,null,a.results):r.bind(a.results.forEach,a.results);u(function(e){var r=t.clone(e);delete r._id,o&&a.addedBefore(e._id,n._projectionFn(r),null),a.added(e._id,n._projectionFn(r))})}var d=new f.ObserveHandle;return r.extend(d,{collection:n.collection,stop:function(){n.reactive&&delete n.collection.queries[s]}}),n.reactive&&i.active&&i.onInvalidate(function(){d.stop()}),n.collection._observeQueue.drain(),d}}),f.Cursor.prototype._getRawObjects=function(e){var r=this;e=e||{};var t=e.ordered?[]:new f._IdMap;if(void 0!==r._selectorId){if(r.skip)return t;var n=r.collection._docs.get(r._selectorId);return n&&(e.ordered?t.push(n):t.set(r._selectorId,n)),t}var o;if(r.matcher.hasGeoQuery()&&e.ordered&&(e.distances?(o=e.distances,o.clear()):o=new f._IdMap),r.collection._docs.forEach(function(n,i){var a=r.matcher.documentMatches(n);return a.result&&(e.ordered?(t.push(n),o&&void 0!==a.distance&&o.set(i,a.distance)):t.set(i,n)),!r.limit||r.skip||r.sorter||t.length!==r.limit?!0:!1}),!e.ordered)return t;if(r.sorter){var i=r.sorter.getComparator({distances:o});t.sort(i)}var a=r.skip||0,s=r.limit?r.limit+a:t.length;return t.slice(a,s)},f.Cursor.prototype._depend=function(e,t){var n=this;if(i.active){var o=new i.Dependency;o.depend();var a=r.bind(o.changed,o),s={_suppress_initial:!0,_allow_unordered:t};r.each(["added","changed","removed","addedBefore","movedBefore"],function(r){e[r]&&(s[r]=a)}),n.observeChanges(s)}},f.prototype.insert=function(n,o){var i=this;n=t.clone(n),r.has(n,"_id")||(n._id=f._useOID?new s.ObjectID:c.id());var a=n._id;if(i._docs.has(a))throw p("Duplicate _id '"+a+"'");i._saveOriginal(a,void 0),i._docs.set(a,n);var u=[];for(var d in i.queries){var l=i.queries[d],h=l.matcher.documentMatches(n);h.result&&(l.distances&&void 0!==h.distance&&l.distances.set(a,h.distance),l.cursor.skip||l.cursor.limit?u.push(d):f._insertInResults(l,n))}return r.each(u,function(e){i.queries[e]&&i._recomputeResults(i.queries[e])}),i._observeQueue.drain(),o&&e.defer(function(){o(null,a)}),a},f.prototype._eachPossiblyMatchingDoc=function(e,r){var t=this,n=f._idsMatchedBySelector(e);if(n)for(var o=0;o0;){var i=Math.floor(o/2);e(t,r[n+i])>=0?(n+=i+1,o-=i+1):o=i}return n},f._insertInSortedList=function(e,r,t){if(0===r.length)return r.push(t),0;var n=f._binarySearch(e,r,t);return r.splice(n,0,t),n},f.prototype.saveOriginals=function(){var e=this;if(e._savedOriginals)throw new Error("Called saveOriginals twice without retrieveOriginals");e._savedOriginals=new f._IdMap},f.prototype.retrieveOriginals=function(){var e=this;if(!e._savedOriginals)throw new Error("Called retrieveOriginals without saveOriginals");var r=e._savedOriginals;return e._savedOriginals=null,r},f.prototype._saveOriginal=function(e,r){var n=this;n._savedOriginals&&(n._savedOriginals.has(e)||n._savedOriginals.set(e,t.clone(r)))},f.prototype.pauseObservers=function(){if(!this.paused){this.paused=!0;for(var e in this.queries){var r=this.queries[e];r.resultsSnapshot=t.clone(r.results)}}},f.prototype.resumeObservers=function(){var e=this;if(this.paused){this.paused=!1;for(var r in this.queries){var t=e.queries[r];f._diffQueryChanges(t.ordered,t.resultsSnapshot,t.results,t,{projectionFn:t.projectionFn}),t.resultsSnapshot=null}e._observeQueue.drain()}}}).call(this),function(){f.wrapTransform=function(e){if(!e)return null;if(e.__wrappedTransform__)return e;var n=function(n){if(!r.has(n,"_id"))throw new Error("can only transform documents with _id");var o=n._id,a=i.nonreactive(function(){return e(n)});if(!_(a))throw new Error("transform must return object");if(r.has(a,"_id")){if(!t.equals(a._id,o))throw new Error("transformed document can't have different _id")}else a._id=o;return a};return n.__wrappedTransform__=!0,n}}.call(this),function(){v=function(e){return r.isArray(e)&&!t.isBinary(e)},_=f._isPlainObject=function(e){return e&&3===f._f._type(e)},m=function(e){return v(e)||_(e)},y=function(e,t){if(!_(e))return!1;var n=void 0;return r.each(e,function(r,o){var i="$"===o.substr(0,1);if(void 0===n)n=i;else if(n!==i){if(!t)throw new Error("Inconsistent operator: "+JSON.stringify(e));n=!1}}),!!n},g=function(e){return/^[0-9]+$/.test(e)}}.call(this),function(){l.Matcher=function(e){var r=this;r._paths={},r._hasGeoQuery=!1,r._hasWhere=!1,r._isSimple=!0,r._matchingDocument=void 0,r._selector=null,r._docMatcher=r._compileSelector(e)},r.extend(l.Matcher.prototype,{documentMatches:function(e){if(!e||"object"!=typeof e)throw Error("documentMatches needs a document");return this._docMatcher(e)},hasGeoQuery:function(){return this._hasGeoQuery},hasWhere:function(){return this._hasWhere},isSimple:function(){return this._isSimple},_compileSelector:function(r){var n=this;if(r instanceof Function)return n._isSimple=!1,n._selector=r,n._recordPathUsed(""),function(e){return{result:!!r.call(e)}};if(f._selectorIsId(r))return n._selector={_id:r},n._recordPathUsed("_id"),function(e){return{result:t.equals(e._id,r)}};if(!r||"_id"in r&&!r._id)return n._isSimple=!1,S;if("boolean"==typeof r||v(r)||t.isBinary(r))throw new Error("Invalid selector: "+r);return n._selector=t.clone(r),e(r,n,{isRoot:!0})},_recordPathUsed:function(e){this._paths[e]=!0},_getPaths:function(){return r.keys(this._paths)}});var e=function(e,t,o){o=o||{};var i=[];return r.each(e,function(e,a){if("$"===a.substr(0,1)){if(!r.has(c,a))throw new Error("Unrecognized logical operator: "+a);t._isSimple=!1,i.push(c[a](e,t,o.inElemMatch))}else{o.inElemMatch||t._recordPathUsed(a);var s=E(a),u=n(e,t,o.isRoot);i.push(function(e){var r=s(e);return u(r)})}}),M(i)},n=function(e,r,t){return e instanceof RegExp?(r._isSimple=!1,o(w(e))):y(e)?i(e,r,t):o($(e))},o=function(e,t){return t=t||{},function(n){var o=n;t.dontExpandLeafArrays||(o=I(n,t.dontIncludeLeafArrays));var i={};return i.result=r.any(o,function(r){var t=e(r.value);return"number"==typeof t&&(r.arrayIndices||(r.arrayIndices=[t]),t=!0),t&&r.arrayIndices&&(i.arrayIndices=r.arrayIndices),t}),i}};w=function(e){return function(t){return t instanceof RegExp?r.isEqual(t,e):"string"!=typeof t?!1:(e.lastIndex=0,e.test(t))}},$=function(e){if(y(e))throw Error("Can't create equalityValueSelector for operator object");return null==e?function(e){return null==e}:function(r){return f._f._equal(e,r)}};var i=function(e,t,n){var i=[];return r.each(e,function(a,s){var c=r.contains(["$lt","$lte","$gt","$gte"],s)&&r.isNumber(a),u="$ne"===s&&!r.isObject(a),d=r.contains(["$in","$nin"],s)&&r.isArray(a)&&!r.any(a,r.isObject);if("$eq"===s||c||d||u||(t._isSimple=!1),r.has(p,s))i.push(p[s](a,e,t,n));else{if(!r.has(b,s))throw new Error("Unrecognized operator: "+s);var f=b[s];i.push(o(f.compileElementSelector(a,e,t),f))}}),P(i)},a=function(t,n,o){if(!v(t)||r.isEmpty(t))throw Error("$and/$or/$nor must be nonempty array");return r.map(t,function(r){if(!_(r))throw Error("$or/$and/$nor entries need to be full objects");return e(r,n,{inElemMatch:o})})},c={$and:function(e,r,t){var n=a(e,r,t);return M(n)},$or:function(e,t,n){var o=a(e,t,n);return 1===o.length?o[0]:function(e){var t=r.any(o,function(r){return r(e).result});return{result:t}}},$nor:function(e,t,n){var o=a(e,t,n);return function(e){var t=r.all(o,function(r){return!r(e).result});return{result:t}}},$where:function(e,r){return r._recordPathUsed(""),r._hasWhere=!0,e instanceof Function||(e=Function("obj","return "+e)),function(r){return{result:e.call(r,r)}}},$comment:function(){return function(){return{result:!0}}}},u=function(e){return function(r){var t=e(r);return{result:!t.result}}},p={$not:function(e,r,t){return u(n(e,t))},$ne:function(e){return u(o($(e)))},$nin:function(e){return u(o(b.$in.compileElementSelector(e)))},$exists:function(e){var r=o(function(e){return void 0!==e});return e?r:u(r)},$options:function(e,t){if(!r.has(t,"$regex"))throw Error("$options needs a $regex");return j},$maxDistance:function(e,r){if(!r.$near)throw Error("$maxDistance needs a $near");return j},$all:function(e,t,o){if(!v(e))throw Error("$all requires array");if(r.isEmpty(e))return S;var i=[];return r.each(e,function(e){if(y(e))throw Error("no $ expressions in $all");i.push(n(e,o))}),P(i)},$near:function(e,t,n,o){if(!o)throw Error("$near can't be inside another $ operator");n._hasGeoQuery=!0;var i,a,s;if(_(e)&&r.has(e,"$geometry"))i=e.$maxDistance,a=e.$geometry,s=function(e){return e&&e.type?"Point"===e.type?d.pointDistance(a,e):d.geometryWithinRadius(e,a,i)?0:i+1:null};else{if(i=t.$maxDistance,!v(e)&&!_(e))throw Error("$near argument must be coordinate pair or GeoJSON");a=O(e),s=function(e){return v(e)||_(e)?C(a,e):null}}return function(e){e=I(e);var t={result:!1};return r.each(e,function(e){var r=s(e.value);null===r||r>i||void 0!==t.distance&&t.distance<=r||(t.result=!0,t.distance=r,e.arrayIndices?t.arrayIndices=e.arrayIndices:delete t.arrayIndices)}),t}}},C=function(e,t){e=O(e),t=O(t);var n=e[0]-t[0],o=e[1]-t[1];return r.isNaN(n)||r.isNaN(o)?null:Math.sqrt(n*n+o*o)},O=function(e){return r.map(e,r.identity)},k=function(e){return{compileElementSelector:function(r){if(v(r))return function(){return!1};void 0===r&&(r=null);var t=f._f._type(r);return function(n){return void 0===n&&(n=null),f._f._type(n)!==t?!1:e(f._f._cmp(n,r))}}}};b={$lt:k(function(e){return 0>e}),$gt:k(function(e){return e>0}),$lte:k(function(e){return 0>=e}),$gte:k(function(e){return e>=0}),$mod:{compileElementSelector:function(e){if(!v(e)||2!==e.length||"number"!=typeof e[0]||"number"!=typeof e[1])throw Error("argument to $mod must be an array of two numbers");var r=e[0],t=e[1];return function(e){return"number"==typeof e&&e%r===t}}},$in:{compileElementSelector:function(e){if(!v(e))throw Error("$in needs an array");var t=[];return r.each(e,function(e){if(e instanceof RegExp)t.push(w(e));else{if(y(e))throw Error("cannot nest $ under $in");t.push($(e))}}),function(e){return void 0===e&&(e=null),r.any(t,function(r){return r(e)})}}},$size:{dontExpandLeafArrays:!0,compileElementSelector:function(e){if("string"==typeof e)e=0;else if("number"!=typeof e)throw Error("$size needs a number");return function(r){return v(r)&&r.length===e}}},$type:{dontIncludeLeafArrays:!0,compileElementSelector:function(e){if("number"!=typeof e)throw Error("$type needs a number");return function(r){return void 0!==r&&f._f._type(r)===e}}},$regex:{compileElementSelector:function(e,r){if(!("string"==typeof e||e instanceof RegExp))throw Error("$regex has to be a string or RegExp");var t;if(void 0!==r.$options){if(/[^gim]/.test(r.$options))throw new Error("Only the i, m, and g regexp options are supported");var n=e instanceof RegExp?e.source:e;t=new RegExp(n,r.$options)}else t=e instanceof RegExp?e:new RegExp(e);return w(t)}},$elemMatch:{dontExpandLeafArrays:!0,compileElementSelector:function(r,t,o){if(!_(r))throw Error("$elemMatch need an object");var i,a;return y(r,!0)?(i=n(r,o),a=!1):(i=e(r,o,{inElemMatch:!0}),a=!0),function(e){if(!v(e))return!1;for(var r=0;r=2&&g(n[1]),s;n.length>1&&(s=E(n.slice(1).join(".")));var c=function(e){return e.dontIterate||delete e.dontIterate,e.arrayIndices&&!e.arrayIndices.length&&delete e.arrayIndices,e};return function(e,n){if(n||(n=[]),v(e)){if(!(i&&oo?-1:1;if(t!==n)throw Error("Missing type coercion logic in _cmp");if(7===t&&(t=n=2,e=e.toHexString(),r=r.toHexString()),9===t&&(t=n=1,e=e.getTime(),r=r.getTime()),1===t)return e-r;if(2===n)return r>e?-1:e===r?0:1;if(3===t){var a=function(e){var r=[];for(var t in e)r.push(t),r.push(e[t]);return r};return f._f._cmp(a(e),a(r))}if(4===t)for(var s=0;;s++){if(s===e.length)return s===r.length?0:-1;if(s===r.length)return 1;var c=f._f._cmp(e[s],r[s]);if(0!==c)return c}if(5===t){if(e.length!==r.length)return e.length-r.length;for(s=0;sr[s])return 1}return 0}if(8===t)return e?r?0:1:r?-1:0;if(10===t)return 0;if(11===t)throw Error("Sorting not supported on regular expression");if(13===t)throw Error("Sorting not supported on Javascript code");throw Error("Unknown type to sort")}},f._removeDollarOperators=function(e){var r={};for(var t in e)"$"!==t.substr(0,1)&&(r[t]=e[t]);return r}}.call(this),function(){l.Sorter=function(t,n){var o=this;n=n||{},o._sortSpecParts=[];var i=function(e,r){if(!e)throw Error("sort keys must be non-empty");if("$"===e.charAt(0))throw Error("unsupported sort key: "+e);o._sortSpecParts.push({path:e,lookup:E(e,{forSort:!0}),ascending:r})};if(t instanceof Array)for(var a=0;a=0)})}if(o.affectedByModifier){var s={};r.each(o._sortSpecParts,function(e){s[e.path]=1}),o._selectorForAffectedByModifier=new l.Matcher(s)}o._keyComparator=e(r.map(o._sortSpecParts,function(e,r){return o._keyFieldComparator(r)})),o._keyFilter=null,n.matcher&&o._useWithMatcher(n.matcher)},r.extend(l.Sorter.prototype,{getComparator:function(r){var t=this;if(!r||!r.distances)return t._getBaseComparator();var n=r.distances;return e([t._getBaseComparator(),function(e,r){if(!n.has(e._id))throw Error("Missing distance for "+e._id);if(!n.has(r._id))throw Error("Missing distance for "+r._id);return n.get(e._id)-n.get(r._id)}])},_getPaths:function(){var e=this;return r.pluck(e._sortSpecParts,"path")},_getMinKeyFromDoc:function(e){var r=this,t=null;if(r._generateKeysFromDoc(e,function(e){return r._keyCompatibleWithSelector(e)?null===t?void(t=e):void(r._compareKeys(e,t)<0&&(t=e)):void 0}),null===t)throw Error("sort selector found no keys in doc?");return t},_keyCompatibleWithSelector:function(e){var r=this;return!r._keyFilter||r._keyFilter(e)},_generateKeysFromDoc:function(e,t){var n=this;if(0===n._sortSpecParts.length)throw new Error("can't generate keys without a spec");var o=[],i=function(e){return e.join(",")+","},a=null;if(r.each(n._sortSpecParts,function(t,n){var s=I(t.lookup(e),!0);s.length||(s=[{value:null}]);var c=!1;if(o[n]={},r.each(s,function(e){if(!e.arrayIndices){if(s.length>1)throw Error("multiple branches but no array used?");return void(o[n][""]=e.value)}c=!0;var t=i(e.arrayIndices);if(r.has(o[n],t))throw Error("duplicate path: "+t);if(o[n][t]=e.value,a&&!r.has(a,t))throw Error("cannot index parallel arrays")}),a){if(!r.has(o[n],"")&&r.size(a)!==r.size(o[n]))throw Error("cannot index parallel arrays!")}else c&&(a={},r.each(o[n],function(e,r){a[r]=!0}))}),!a){var s=r.map(o,function(e){if(!r.has(e,""))throw Error("no value in sole key case?");return e[""]});return void t(s)}r.each(a,function(e,n){var i=r.map(o,function(e){if(r.has(e,""))return e[""];if(!r.has(e,n))throw Error("missing path?");return e[n]});t(i)})},_compareKeys:function(e,r){var t=this;if(e.length!==t._sortSpecParts.length||r.length!==t._sortSpecParts.length)throw Error("Key has wrong length");return t._keyComparator(e,r)},_keyFieldComparator:function(e){var r=this,t=!r._sortSpecParts[e].ascending;return function(r,n){var o=f._f._cmp(r[e],n[e]);return t&&(o=-o),o}},_getBaseComparator:function(){var e=this;return e._sortSpecParts.length?function(r,t){var n=e._getMinKeyFromDoc(r),o=e._getMinKeyFromDoc(t);return e._compareKeys(n,o)}:function(e,r){return 0}},_useWithMatcher:function(e){var t=this;if(t._keyFilter)throw Error("called _useWithMatcher twice?");if(!r.isEmpty(t._sortSpecParts)){var n=e._selector;if(!(n instanceof Function)){var o={};r.each(t._sortSpecParts,function(e,r){o[e.path]=[]}),r.each(n,function(e,t){var n=o[t];if(n){if(e instanceof RegExp){if(e.ignoreCase||e.multiline)return;return void n.push(w(e))}return y(e)?void r.each(e,function(t,o){r.contains(["$lt","$lte","$gt","$gte"],o)&&n.push(b[o].compileElementSelector(t)),"$regex"!==o||e.$options||n.push(b.$regex.compileElementSelector(t,e))}):void n.push($(e))}}),r.isEmpty(o[t._sortSpecParts[0].path])||(t._keyFilter=function(e){return r.all(t._sortSpecParts,function(t,n){return r.all(o[t.path],function(r){return r(e[n])})})})}}}});var e=function(e){return function(r,t){for(var n=0;n0)||1===t.length&&"_id"===t[0]||r.contains(t,"_id")&&e._id||(t=r.reject(t,function(e){return"_id"===e}));var n=null;r.each(t,function(r){var t=!!e[r];if(null===n&&(n=t),n!==t)throw p("You cannot currently mix including and excluding fields.")});var o=O(t,function(e){return n},function(e,r,t){var n=t,o=r;throw p("both "+n+" and "+o+" found in fields option, using both of them may trigger unexpected behavior. Did you mean to use only one of them?")});return{tree:o,including:n}},O=function(e,t,n,o){return o=o||{},r.each(e,function(e){var i=o,a=e.split("."),s=r.all(a.slice(0,-1),function(t,o){if(r.has(i,t)){if(!r.isObject(i[t])&&(i[t]=n(i[t],a.slice(0,o+1).join("."),e),!r.isObject(i[t])))return!1}else i[t]={};return i=i[t],!0});if(s){var c=r.last(a);r.has(i,c)?i[c]=n(i[c],e,e):i[c]=t(e)}}),o},f._checkSupportedProjection=function(e){if(!r.isObject(e)||r.isArray(e))throw p("fields option must be an object");r.each(e,function(e,t){if(r.contains(t.split("."),"$"))throw p("Minimongo doesn't support $ operator in projections yet.");if("object"==typeof e&&r.intersection(["$elemMatch","$meta","$slice"],r.keys(e)).length>0)throw p("Minimongo doesn't support operators in projections yet.");if(-1===r.indexOf([1,0,!0,!1],e))throw p("Projection values should be one of 1, 0, true, or false")})}}.call(this),function(){f._modify=function(i,a,s){if(s=s||{},!_(a))throw p("Modifier must be an object");a=t.clone(a);var c=y(a),u;if(c)u=t.clone(i),r.each(a,function(t,i){var a=o[i];if(s.isInsert&&"$setOnInsert"===i&&(a=o.$set),!a)throw p("Invalid modifier specified "+i);r.each(t,function(t,o){if(""===o)throw p("An empty update path is not valid.");if("_id"===o)throw p("Mod on _id not allowed");var c=o.split(".");if(!r.all(c,r.identity))throw p("The update path '"+o+"' contains an empty field name, which is not allowed.");var d=r.has(n,i),f="$rename"===i,l=e(u,c,{noCreate:n[i],forbidArray:"$rename"===i,arrayIndices:s.arrayIndices}),h=c.pop();a(l,h,t,o,u)})});else{if(a._id&&!t.equals(i._id,a._id))throw p("Cannot change the _id of a document");for(var d in a)if(/\./.test(d))throw p("When replacing document, field name may not contain '.'");u=a}r.each(r.keys(i),function(e){"_id"!==e&&delete i[e]}),r.each(u,function(e,r){i[r]=e})};var e=function(e,r,t){t=t||{};for(var n=!1,o=0;o=e.length)return void 0;for(;e.length0)throw p("$slice in $push must be zero or negative");i=t.$slice}var a=void 0;if(t.$sort){if(void 0===i)throw p("$sort requires $slice to be present");a=new l.Sorter(t.$sort).getComparator();for(var s=0;st?n.splice(0,1):n.pop()}}},$pull:function(e,r,t){if(void 0!==e){var n=e[r];if(void 0!==n){if(!(n instanceof Array))throw p("Cannot apply $pull/pullAll modifier to non-array");var o=[];if(null==t||"object"!=typeof t||t instanceof Array)for(var i=0;ia&&--c,n.movedTo(o(t.clone(i.docs.get(e))),a,c,r||null)}},removed:function(e){var r=this;if(n.removedAt||n.removed){var t=o(r.docs.get(e));if(n.removedAt){var i=s?r.docs.indexOf(e):-1;n.removedAt(t,i)}else n.removed(t)}}}}else a={added:function(e,t){if(!i&&n.added){var a=r.extend(t,{_id:e});n.added(o(a))}},changed:function(e,r){var i=this;if(n.changed){var a=i.docs.get(e),s=t.clone(a);u.applyChanges(s,r),n.changed(o(s),o(t.clone(a)))}},removed:function(e){var r=this;n.removed&&n.removed(o(r.docs.get(e)))}};var c=new f._CachingChangeObserver({callbacks:a}),d=e.observeChanges(c.applyChange);return i=!1,d}}.call(this),function(){f._selectorIsId=function(e){return"string"==typeof e||"number"==typeof e||e instanceof s.ObjectID},f._selectorIsIdPerhapsAsObject=function(e){return f._selectorIsId(e)||e&&"object"==typeof e&&e._id&&f._selectorIsId(e._id)&&1===r.size(e)},f._idsMatchedBySelector=function(e){if(f._selectorIsId(e))return[e];if(!e)return null;if(r.has(e,"_id"))return f._selectorIsId(e._id)?[e._id]:e._id&&e._id.$in&&r.isArray(e._id.$in)&&!r.isEmpty(e._id.$in)&&r.all(e._id.$in,f._selectorIsId)?e._id.$in:null;if(e.$and&&r.isArray(e.$and))for(var t=0;t1&&i.name&&(o[i.name]=l[1])}return n||e.immediateMigration?o:null};e._migrate=function(t,e){var r=u(t,e);if(null===r)return!1;try{var n=JSON.stringify({data:r,reload:!0})}catch(l){throw a._debug("Couldn't serialize data for migration",r),l}if(i)try{i.setItem(o,n)}catch(l){a._debug("Couldn't save data for migration to sessionStorage",l)}else a._debug("Browser does not support sessionStorage. Not saving migration state.");return!0},e._withFreshProvidersForTest=function(a){var e=t.clone(g);g=[];try{a()}finally{g=e}};var s=!1;e._reload=function(a){if(a=a||{},!s){s=!0;var o=function(){t.defer(function(){e._migrate(o,a)&&window.location.reload()})};o()}}}).call(this),function(){a._reload={onMigrate:e._onMigrate,migrationData:e._migrationData,reload:e._reload}}.call(this),"undefined"==typeof Package&&(Package={}),Package.reload={Reload:e}}(); + +!function(){var e=Package.meteor.Meteor,t=Package.check.check,n=Package.check.Match,r=Package.random.Random,o=Package.ejson.EJSON,i=Package.underscore._,s=Package.tracker.Tracker,a=Package.tracker.Deps,u=Package.retry.Retry,c=Package["id-map"].IdMap,d=Package["ddp-common"].DDPCommon,l=Package["diff-sequence"].DiffSequence,f=Package["mongo-id"].MongoID,p,_,h,v,m,g,b;(function(){p={},_={}}).call(this),function(){h=function(){var e=this;c.call(e,f.idStringify,f.idParse)},e._inherits(h,c)}.call(this),function(){v=function(){var e=document,t=window,n={},r=function(){};r.prototype.addEventListener=function(e,t){this._listeners||(this._listeners={}),e in this._listeners||(this._listeners[e]=[]);var r=this._listeners[e];-1===n.arrIndexOf(r,t)&&r.push(t)},r.prototype.removeEventListener=function(e,t){if(this._listeners&&e in this._listeners){var r=this._listeners[e],o=n.arrIndexOf(r,t);return-1!==o?void(r.length>1?this._listeners[e]=r.slice(0,o).concat(r.slice(o+1)):delete this._listeners[e]):void 0}},r.prototype.dispatchEvent=function(e){var t=e.type,n=Array.prototype.slice.call(arguments,0);if(this["on"+t]&&this["on"+t].apply(this,n),this._listeners&&t in this._listeners)for(var r=0;rn;n++)r.push(s.substr(Math.floor(Math.random()*t),1));return r.join("")},n.random_number=function(e){return Math.floor(Math.random()*e)},n.random_number_string=function(e){var t=(""+(e-1)).length,r=Array(t+1).join("0");return(r+n.random_number(e)).slice(-t)},n.getOrigin=function(e){e+="/";var t=e.split("/").slice(0,3);return t.join("/")},n.isSameOriginUrl=function(e,n){return n||(n=t.location.href),e.split("/").slice(0,3).join("/")===n.split("/").slice(0,3).join("/")},n.isSameOriginScheme=function(e,n){return n||(n=t.location.href),e.split(":")[0]===n.split(":")[0]},n.getParentDomain=function(e){if(/^[0-9.]*$/.test(e))return e;if(/^\[/.test(e))return e;if(!/[.]/.test(e))return e;var t=e.split(".").slice(1);return t.join(".")},n.objectExtend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e};var a="_jp";n.polluteGlobalNamespace=function(){a in t||(t[a]={})},n.closeFrame=function(e,t){return"c"+JSON.stringify([e,t])},n.userSetCode=function(e){return 1e3===e||e>=3e3&&4999>=e},n.countRTO=function(e){var t;return t=e>100?3*e:e+200},n.log=function(){t.console&&console.log&&console.log.apply&&console.log.apply(console,arguments)},n.bind=function(e,t){return e.bind?e.bind(t):function(){return e.apply(t,arguments)}},n.flatUrl=function(e){return-1===e.indexOf("?")&&-1===e.indexOf("#")},n.amendUrl=function(t,r){var o;if(void 0===r)o=e.location;else{var i=/^([a-z0-9.+-]+:)/i.exec(r);if(i){var s=i[0].toLowerCase(),a=r.substring(s.length),u=/[a-z0-9\.-]+(:[0-9]+)?/.exec(a);if(u)var c=u[0]}if(!s||!c)throw new Error("relativeTo must be an absolute url");o={protocol:s,host:c}}if(!t)throw new Error("Wrong url for SockJS");if(!n.flatUrl(t))throw new Error("Only basic urls are supported in SockJS");0===t.indexOf("//")&&(t=o.protocol+t),0===t.indexOf("/")&&(t=o.protocol+"//"+o.host+t),t=t.replace(/[/]+$/,"");var d=t.split("/");return("http:"===d[0]&&/:80$/.test(d[2])||"https:"===d[0]&&/:443$/.test(d[2]))&&(d[2]=d[2].replace(/:(80|443)$/,"")),t=d.join("/")},n.arrIndexOf=function(e,t){for(var n=0;n=0},n.delay=function(e,t){return"function"==typeof e&&(t=e,e=0),setTimeout(t,e)};var u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\x00":"\\u0000","":"\\u0001","":"\\u0002","":"\\u0003","":"\\u0004","":"\\u0005","":"\\u0006","":"\\u0007","\b":"\\b"," ":"\\t","\n":"\\n"," ":"\\u000b","\f":"\\f","\r":"\\r","":"\\u000e","":"\\u000f","":"\\u0010","":"\\u0011","":"\\u0012","":"\\u0013","":"\\u0014","":"\\u0015","":"\\u0016","":"\\u0017","":"\\u0018","":"\\u0019","":"\\u001a","":"\\u001b","":"\\u001c","":"\\u001d","":"\\u001e","":"\\u001f",'"':'\\"',"\\":"\\\\","":"\\u007f","€":"\\u0080","":"\\u0081","‚":"\\u0082","ƒ":"\\u0083","„":"\\u0084","…":"\\u0085","†":"\\u0086","‡":"\\u0087","ˆ":"\\u0088","‰":"\\u0089","Š":"\\u008a","‹":"\\u008b","Œ":"\\u008c","":"\\u008d","Ž":"\\u008e","":"\\u008f","":"\\u0090","‘":"\\u0091","’":"\\u0092","“":"\\u0093","”":"\\u0094","•":"\\u0095","–":"\\u0096","—":"\\u0097","˜":"\\u0098","™":"\\u0099","š":"\\u009a","›":"\\u009b","œ":"\\u009c","":"\\u009d","ž":"\\u009e","Ÿ":"\\u009f","­":"\\u00ad","؀":"\\u0600","؁":"\\u0601","؂":"\\u0602","؃":"\\u0603","؄":"\\u0604","܏":"\\u070f","឴":"\\u17b4","឵":"\\u17b5","‌":"\\u200c","‍":"\\u200d","‎":"\\u200e","‏":"\\u200f","\u2028":"\\u2028","\u2029":"\\u2029","‪":"\\u202a","‫":"\\u202b","‬":"\\u202c","‭":"\\u202d","‮":"\\u202e"," ":"\\u202f","⁠":"\\u2060","⁡":"\\u2061","⁢":"\\u2062","⁣":"\\u2063","⁤":"\\u2064","⁥":"\\u2065","⁦":"\\u2066","⁧":"\\u2067","⁨":"\\u2068","⁩":"\\u2069","":"\\u206a","":"\\u206b","":"\\u206c","":"\\u206d","":"\\u206e","":"\\u206f","\ufeff":"\\ufeff","￰":"\\ufff0","￱":"\\ufff1","￲":"\\ufff2","￳":"\\ufff3","￴":"\\ufff4","￵":"\\ufff5","￶":"\\ufff6","￷":"\\ufff7","￸":"\\ufff8","":"\\ufff9","":"\\ufffa","":"\\ufffb","":"\\ufffc","�":"\\ufffd","￾":"\\ufffe","￿":"\\uffff"},d=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,l,f=JSON&&JSON.stringify||function(e){return u.lastIndex=0,u.test(e)&&(e=e.replace(u,function(e){return c[e]})),'"'+e+'"'},p=function(e){var t,n={},r=[];for(t=0;65536>t;t++)r.push(String.fromCharCode(t));return e.lastIndex=0,r.join("").replace(e,function(e){return n[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""}),e.lastIndex=0,n};n.quote=function(e){var t=f(e);return d.lastIndex=0,d.test(t)?(l||(l=p(d)),t.replace(d,function(e){return l[e]})):t};var _=["websocket","xdr-streaming","xhr-streaming","iframe-eventsource","iframe-htmlfile","xdr-polling","xhr-polling","iframe-xhr-polling","jsonp-polling"];n.probeProtocols=function(){for(var e={},t=0;t<_.length;t++){var n=_[t];e[n]=C[n]&&C[n].enabled()}return e},n.detectProtocols=function(e,t,n){var r={},o=[];t||(t=_);for(var i=0;i0&&a(e)};return n.websocket!==!1&&a(["websocket"]),r["xhr-streaming"]&&!n.null_origin?o.push("xhr-streaming"):!r["xdr-streaming"]||n.cookie_needed||n.null_origin?a(["iframe-eventsource","iframe-htmlfile"]):o.push("xdr-streaming"),r["xhr-polling"]&&!n.null_origin?o.push("xhr-polling"):!r["xdr-polling"]||n.cookie_needed||n.null_origin?a(["iframe-xhr-polling","jsonp-polling"]):o.push("xdr-polling"),o};var h="_sockjs_global";n.createHook=function(){var e="a"+n.random_string(8);if(!(h in t)){var r={};t[h]=function(e){return e in r||(r[e]={id:e,del:function(){delete r[e]}}),r[e]}}return t[h](e)},n.attachMessage=function(e){n.attachEvent("message",e)},n.attachEvent=function(n,r){"undefined"!=typeof t.addEventListener?t.addEventListener(n,r,!1):(e.attachEvent("on"+n,r),t.attachEvent("on"+n,r))},n.detachMessage=function(e){n.detachEvent("message",e)},n.detachEvent=function(n,r){"undefined"!=typeof t.addEventListener?t.removeEventListener(n,r,!1):(e.detachEvent("on"+n,r),t.detachEvent("on"+n,r))};var v={},m=!1,g=function(){for(var e in v)v[e](),delete v[e]},b=function(){m||(m=!0,g())};n.attachEvent("unload",b),n.unload_add=function(e){var t=n.random_string(8);return v[t]=e,m&&n.delay(g),t},n.unload_del=function(e){e in v&&delete v[e]},n.createIframe=function(t,r){var o=e.createElement("iframe"),i,s,a=function(){clearTimeout(i);try{o.onload=null}catch(e){}o.onerror=null},u=function(){o&&(a(),setTimeout(function(){o&&o.parentNode.removeChild(o),o=null},0),n.unload_del(s))},c=function(e){o&&(u(),r(e))},d=function(e,t){try{o&&o.contentWindow&&o.contentWindow.postMessage(e,t)}catch(n){}};return o.src=t,o.style.display="none",o.style.position="absolute",o.onerror=function(){c("onerror")},o.onload=function(){clearTimeout(i),i=setTimeout(function(){c("onload timeout")},2e3)},e.body.appendChild(o),i=setTimeout(function(){c("timeout")},15e3),s=n.unload_add(u),{post:d,cleanup:u,loaded:a}},n.createHtmlfile=function(e,r){var o=new ActiveXObject("htmlfile"),i,s,u,c=function(){clearTimeout(i)},d=function(){o&&(c(),n.unload_del(s),u.parentNode.removeChild(u),u=o=null,CollectGarbage())},l=function(e){o&&(d(),r(e))},f=function(e,t){try{u&&u.contentWindow&&u.contentWindow.postMessage(e,t)}catch(n){}};o.open(),o.write(''),o.close(),o.parentWindow[a]=t[a];var p=o.createElement("div");return o.body.appendChild(p),u=o.createElement("iframe"),p.appendChild(u),u.src=e,i=setTimeout(function(){l("timeout")},15e3),s=n.unload_add(d),{post:f,cleanup:d,loaded:c}};var y=function(){};y.prototype=new i(["chunk","finish"]),y.prototype._start=function(e,r,o,i){var s=this;try{s.xhr=new XMLHttpRequest}catch(a){}if(!s.xhr)try{s.xhr=new t.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}(t.ActiveXObject||t.XDomainRequest)&&(r+=(-1===r.indexOf("?")?"?":"&")+"t="+ +new Date),s.unload_ref=n.unload_add(function(){s._cleanup(!0)});try{s.xhr.open(e,r,!0)}catch(u){return s.emit("finish",0,""),void s._cleanup()}if(i&&i.no_credentials||(s.xhr.withCredentials="true"),i&&i.headers)for(var c in i.headers)s.xhr.setRequestHeader(c,i.headers[c]);s.xhr.onreadystatechange=function(){if(s.xhr){var e=s.xhr;switch(e.readyState){case 3:try{var t=e.status,n=e.responseText}catch(e){}1223===t&&(t=204),n&&n.length>0&&s.emit("chunk",t,n);break;case 4:var t=e.status;1223===t&&(t=204),s.emit("finish",t,e.responseText),s._cleanup(!1)}}},s.xhr.send(o)},y.prototype._cleanup=function(e){var t=this;if(t.xhr){if(n.unload_del(t.unload_ref),t.xhr.onreadystatechange=function(){},e)try{t.xhr.abort()}catch(r){}t.unload_ref=t.xhr=null}},y.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)};var w=n.XHRCorsObject=function(){var e=this,t=arguments;n.delay(function(){e._start.apply(e,t)})};w.prototype=new y;var S=n.XHRLocalObject=function(e,t,r){var o=this;n.delay(function(){o._start(e,t,r,{no_credentials:!0})})};S.prototype=new y;var k=n.XDRObject=function(e,t,r){var o=this;n.delay(function(){o._start(e,t,r)})};k.prototype=new i(["chunk","finish"]),k.prototype._start=function(e,t,r){var o=this,i=new XDomainRequest;t+=(-1===t.indexOf("?")?"?":"&")+"t="+ +new Date;var s=i.ontimeout=i.onerror=function(){o.emit("finish",0,""),o._cleanup(!1)};i.onprogress=function(){o.emit("chunk",200,i.responseText)},i.onload=function(){o.emit("finish",200,i.responseText),o._cleanup(!1)},o.xdr=i,o.unload_ref=n.unload_add(function(){o._cleanup(!0)});try{o.xdr.open(e,t),o.xdr.send(r)}catch(a){s()}},k.prototype._cleanup=function(e){var t=this;if(t.xdr){if(n.unload_del(t.unload_ref),t.xdr.ontimeout=t.xdr.onerror=t.xdr.onprogress=t.xdr.onload=null,e)try{t.xdr.abort()}catch(r){}t.unload_ref=t.xdr=null}},k.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)},n.isXHRCorsCapable=function(){return t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?1:t.XDomainRequest&&e.domain?2:A.enabled()?3:4};var C=function(e,t,r){if(!(this instanceof C))return new C(e,t,r);var o=this,i;o._options={devel:!1,debug:!1,protocols_whitelist:[],info:void 0,rtt:void 0},r&&n.objectExtend(o._options,r),o._base_url=n.amendUrl(e),o._server=o._options.server||n.random_number_string(1e3),o._options.protocols_whitelist&&o._options.protocols_whitelist.length?i=o._options.protocols_whitelist:(i="string"==typeof t&&t.length>0?[t]:n.isArray(t)?t:null,i&&o._debug('Deprecated API: Use "protocols_whitelist" option instead of supplying protocol list as a second parameter to SockJS constructor.')),o._protocols=[],o.protocol=null,o.readyState=C.CONNECTING,o._ir=V(o._base_url),o._ir.onfinish=function(e,t){o._ir=null,e?(o._options.info&&(e=n.objectExtend(e,o._options.info)),o._options.rtt&&(t=o._options.rtt),o._applyInfo(e,t,i),o._didClose()):o._didClose(1002,"Can't connect to server",!0)}};C.prototype=new r,C.version="0.3.4",C.CONNECTING=0,C.OPEN=1,C.CLOSING=2,C.CLOSED=3,C.prototype._debug=function(){this._options.debug&&n.log.apply(n,arguments)},C.prototype._dispatchOpen=function(){var e=this;e.readyState===C.CONNECTING?(e._transport_tref&&(clearTimeout(e._transport_tref),e._transport_tref=null),e.readyState=C.OPEN,e.dispatchEvent(new o("open"))):e._didClose(1006,"Server lost session")},C.prototype._dispatchMessage=function(e){var t=this;t.readyState===C.OPEN&&t.dispatchEvent(new o("message",{data:e}))},C.prototype._dispatchHeartbeat=function(e){var t=this;t.readyState===C.OPEN&&t.dispatchEvent(new o("heartbeat",{}))},C.prototype._didClose=function(e,t,r){var i=this;if(i.readyState!==C.CONNECTING&&i.readyState!==C.OPEN&&i.readyState!==C.CLOSING)throw new Error("INVALID_STATE_ERR");i._ir&&(i._ir.nuke(),i._ir=null),i._transport&&(i._transport.doCleanup(),i._transport=null);var s=new o("close",{code:e,reason:t,wasClean:n.userSetCode(e)});if(!n.userSetCode(e)&&i.readyState===C.CONNECTING&&!r){if(i._try_next_protocol(s))return;s=new o("close",{code:2e3,reason:"All transports failed",wasClean:!1,last_event:s})}i.readyState=C.CLOSED,n.delay(function(){i.dispatchEvent(s)})},C.prototype._didMessage=function(e){var t=this,n=e.slice(0,1);switch(n){case"o":t._dispatchOpen();break;case"a":for(var r=JSON.parse(e.slice(1)||"[]"),o=0;o0){var t="["+e.send_buffer.join(",")+"]";e.send_stop=e.sender(e.trans_url,t,function(t,n){e.send_stop=null,t===!1?e.ri._didClose(1006,"Sending error "+n):e.send_schedule_wait()}),e.send_buffer=[]}},O.prototype.send_destructor=function(){var e=this;e._send_stop&&e._send_stop(),e._send_stop=null};var T=function(t,r,o){var i=this;if(!("_send_form"in i)){var s=i._send_form=e.createElement("form"),a=i._send_area=e.createElement("textarea");a.name="d",s.style.display="none",s.style.position="absolute",s.method="POST",s.enctype="application/x-www-form-urlencoded",s.acceptCharset="UTF-8",s.appendChild(a),e.body.appendChild(s)}var s=i._send_form,a=i._send_area,u="a"+n.random_string(8);s.target=u,s.action=t+"/jsonp_send?i="+u;var c;try{c=e.createElement('