ohif-viewer/StandaloneViewer/SampleClientOnlyBuild/07ea9f48ca86e7470deb3a8cbe877b1e551e67b6.js

256 lines
1.9 MiB
JavaScript
Raw Normal View History

!function(){var n,t;(function(){n={}}).call(this),function(){(function(){var t=this,r=t._,e={},i=Array.prototype,u=Object.prototype,a=Function.prototype,c=i.push,o=i.slice,l=i.concat,f=u.toString,s=u.hasOwnProperty,p=i.forEach,h=i.map,v=i.reduce,y=i.reduceRight,d=i.filter,g=i.every,m=i.some,b=i.indexOf,_=i.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 i=0,u=n.length;i<u;i++)if(t.call(r,n[i],i,n)===e)return}else for(var a=A.keys(n),i=0,u=a.length;i<u;i++)if(t.call(r,n[a[i]],a[i],n)===e)return};A.map=A.collect=function(n,t,r){var e=[];return null==n?e:h&&n.map===h?n.map(t,r):(E(n,function(n,i,u){e.push(t.call(r,n,i,u))}),e)};var F="Reduce of empty array with no initial value";A.reduce=A.foldl=A.inject=function(n,t,r,e){var i=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=A.bind(t,e)),i?n.reduce(t,r):n.reduce(t);if(E(n,function(n,u,a){i?r=t.call(e,r,n,u,a):(r=n,i=!0)}),!i)throw new TypeError(F);return r},A.reduceRight=A.foldr=function(n,t,r,e){var i=arguments.length>2;if(null==n&&(n=[]),y&&n.reduceRight===y)return e&&(t=A.bind(t,e)),i?n.reduceRight(t,r):n.reduceRight(t);var u=n.length;if(!O(n)){var a=A.keys(n);u=a.length}if(E(n,function(c,o,l){o=a?a[--u]:--u,i?r=t.call(e,r,n[o],o,l):(r=n[o],i=!0)}),!i)throw new TypeError(F);return r},A.find=A.detect=function(n,t,r){var e;return M(n,function(n,i,u){if(t.call(r,n,i,u))return e=n,!0}),e},A.filter=A.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(E(n,function(n,i,u){t.call(r,n,i,u)&&e.push(n)}),e)},A.reject=function(n,t,r){return A.filter(n,function(n,e,i){return!t.call(r,n,e,i)},r)},A.every=A.all=function(n,t,r){t||(t=A.identity);var i=!0;return null==n?i:g&&n.every===g?n.every(t,r):(E(n,function(n,u,a){if(!(i=i&&t.call(r,n,u,a)))return e}),!!i)};var M=A.some=A.any=function(n,t,r){t||(t=A.identity);var i=!1;return null==n?i:m&&n.some===m?n.some(t,r):(E(n,function(n,u,a){if(i||(i=t.call(r,n,u,a)))return e}),!!i)};A.contains=A.include=function(n,t){return null!=n&&(b&&n.indexOf===b?n.indexOf(t)!=-1:M(n,function(n){return n===t}))},A.invoke=function(n,t){var r=o.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,i,u){var a=t?t.call(r,n,i,u):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,i,u){var a=t?t.call(r,n,i,u):n;a<e.computed&&(e={value:n,computed:a})}),e.value},A.shuffle=function(n){var t,r=0,e=[];return E(n,function(n){t=A.random(r++),e[r-1]=e[t],e[t]=n}),e},A.sample=function(n,t,r){return arguments.length<2||r?n[A.random(n.length-1)]:A.shuffle(n).slice(0,Math.max(0,t))};var R=function(n){return A.isFunction(n)?n:function(t){return t[n]}};A.sortBy=function(n,t,r){var e=R(t);return A.pluck(A.map(n,function(n,t,i){return{value:n,index:t,criteria:e.call(r,n,t,i)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")};var S=f
!function(){var t=Package.underscore._,e,n,r;(function(){e=this}).call(this),function(){n=__meteor_runtime_config__.meteorEnv,r={isProduction:"production"===n.NODE_ENV,isDevelopment:"production"!==n.NODE_ENV,isClient:!0,isServer:!1,isCordova:!1},"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.PUBLIC_SETTINGS&&(r.settings={public:__meteor_runtime_config__.PUBLIC_SETTINGS})}.call(this),function(){function e(t){if(t)return r._debug("Exception in callback of async function",t.stack?t.stack:t)}if(r.isServer)var n=Npm.require("fibers/future");"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.meteorRelease&&(r.release=__meteor_runtime_config__.meteorRelease),t.extend(r,{_get:function(t){for(var e=1;e<arguments.length;e++){if(!(arguments[e]in t))return;t=t[arguments[e]]}return t},_ensure:function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];n in t||(t[n]={}),t=t[n]}return t},_delete:function(t){for(var e=[t],n=!0,r=1;r<arguments.length-1;r++){var o=arguments[r];if(!(o in t)){n=!1;break}if(t=t[o],"object"!=typeof t)break;e.push(t)}for(var r=e.length-1;r>=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(r.isClient)u=e;else{var p=new n;u=p.resolver()}++c}s[c]=r.bindEnvironment(u);var _=o.apply(a,s);return p?p.wait():_}},_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;r._wrapAsync=function(t,e){return o||(r._debug("Meteor._wrapAsync has been renamed to Meteor.wrapAsync"),o=!0),r.wrapAsync.apply(r,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 e(){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 n(){var t=function(t){o.setTimeout(t,0)};return t.implementation="setTimeout",t}var o=this;r._setImmediate=t()||e()||n()}.call(this),function(){var e=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},n=function(t,n){return r.bindEnvironment(e(n),t)};t.extend(r,{setTimeout:function(t,e){return setTimeout(n("setTimeout callback",t),e)},setInterval:function(t,e){return setInterval(n("setInterval callback",t),e)},clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)},defer:function(t){r._setImmediate(n("defer callback",t))}})}.call(this),function(){r.makeErrorType=function(t,e){var n=function(){Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=(new Error).stack,e.apply(this,arguments),this.errorType=t};return r._inherits(n,Error),n},r.Error=r.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+"]"}),r.Error.prototype.clone=function(){var t=this;return new r.Error(t.error,t.reason,t.details)}}.call(this),function(){r._noYieldsAllowed=function(t){return t()},r._SynchronousQueue=function(){var t=this;t._tasks=[],t._running=!1,t._runTimeout=null},t.extend(r._SynchronousQueue.prototype,{runTask:function(e){var n=this;if(!n.safeToRunTask())throw new Error("Could not sync
!function(){"undefined"==typeof Package&&(Package={}),Package["meteor-base"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package["mobile-experience"]={}}();
!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,n=Package.meteor.meteorEnv,t,o;t=function(e){"use strict";function r(e,r){return o(e)&&(l(P,e,r),i(w)&&w(b)),b}function n(e){this.id=e,this.children=[]}function t(e,r){return x.call(e,r)&&e[r]}function o(e){return e&&"object"==typeof e}function i(e){return"function"==typeof e}function u(e){return"string"==typeof e}function f(e){function r(r){var n=m(e,r);if(n)return a(n,e.m);var t=new Error("Cannot find module '"+r+"'");if(i(q))return q(r,e.m.id,t);throw t}return i(g)&&(r=g(r,e.m.id)),r.resolve=function(r){var n=m(e,r);if(n)return n.m.id;var t=new Error("Cannot find module '"+r+"'");if(q&&i(q.resolve))return q.resolve(r,e.m.id,t);throw t},r}function c(e,r){var t=this;t.p=r=r||null,t.m=new n(e)}function a(e,r){var n=e&&e.c,t=e.m;if(!x.call(t,"exports")){if(r){t.parent=r;var o=r.children;Array.isArray(o)&&o.push(t)}i(t.useNode)&&t.useNode()||n(t.require=t.require||f(e),t.exports={},t,e.m.id,e.p.m.id),t.loaded=!0}return i(t.runModuleSetters)&&t.runModuleSetters(),t.exports}function s(e){return e&&o(e.c)}function l(e,r,n){if(Array.isArray(r)){var f=[];r.forEach(function(e){u(e)?f.push(e):i(e)&&(r=e)}),i(r)?r.d=f:r=null}else i(r)?r.d=r.d||[]:u(r)||o(r)||(r=null);r&&(e.c=e.c||(o(r)?{}:r),o(r)&&s(e)&&Object.keys(r).forEach(function(o){if(".."===o)i=e.p;else{var i=t(e.c,o);i||(i=e.c[o]=new c(e.m.id.replace(/\/*$/,"/")+o,e),i.o=n)}l(i,r[o],n)}))}function p(e){return e.o&&e.o.extensions||y}function d(e,r,n){for(;e&&!s(e);)e=e.p;if(!e||!r||"."===r)return e;if(".."===r)return e.p;var o=t(e.c,r);if(n&&(!o||s(o)))for(var i=0;i<n.length;++i){var u=t(e.c,r+n[i]);if(u)return u}return o}function v(e,r,n){var t=r.split("/");return t.every(function(r,o){return e=o<t.length-1?d(e,r):d(e,r,n)}),e}function m(e,r,n){var t=p(e);for(e="/"===r.charAt(0)?v(P,r,t):"."===r.charAt(0)?v(e,r,t):h(e,r,t);s(e);){if(n=n||[],n.indexOf(e)<0){n.push(e);var o=d(e,"package.json"),i=o&&a(o).main;if(u(i)&&(e=v(e,i,t)||m(e,i,n)))continue}e=d(e,"index.js")}return e&&u(e.c)&&(e=m(e,e.c,n)),e}function h(e,r,n){if(i(k)&&(r=k(r,e.m.id)),u(r)){for(var t;e&&!t;e=e.p)t=s(e)&&v(e,"node_modules/"+r,n);return t}}e=e||{};var y=e.extensions||[".js",".json"],w=e.onInstall,g=e.wrapRequire,k=e.override,q=e.fallback,x={}.hasOwnProperty,P=new c("/",new c("/..")),b=f(P);return n.prototype.resolve=function(e){return this.require.resolve(e)},r.Module=n,r},"object"==typeof exports&&(exports.makeInstaller=t),function(){var r={},n=r.hasOwnProperty,i=/^[^.\/]/;"function"==typeof Profile&&process.env.METEOR_PROFILE&&(r.wrapRequire=function(e){return Profile(function(e){return"require("+JSON.stringify(e)+")"},e)}),r.fallback=function(e,r,n){if(i.test(e)&&"object"==typeof Npm&&"function"==typeof Npm.require)return Npm.require(e);throw n},r.fallback.resolve=function(r,n,t){if(e.isServer&&i.test(r))return r;throw t},o=t(r);var u=o.Module.prototype;e.isServer&&(u.useNode=function(){if("function"!=typeof npmRequire)return!1;var e=this.id.split("/"),r=0;if(""===e[r]&&++r,"node_modules"===e[r]&&"meteor"===e[r+1]&&(r+=2),e.indexOf("node_modules",r)<0)return!1;try{npmRequire.resolve(this.id)}catch(e){return!1}return this.exports=npmRequire(this.id),!0})}.call(this),"undefined"==typeof Package&&(Package={}),function(e,r){for(var n in r)n in e||(e[n]=r[n])}(Package["modules-runtime"]={},{meteorInstall:o})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.underscore._,i=Package["modules-runtime"].meteorInstall,o,s,a=i({node_modules:{meteor:{modules:{"client.js":["./install-packages.js","./stubs.js","./buffer.js","./process.js","reify/lib/runtime","./css",function(e,t,r){e("./install-packages.js"),e("./stubs.js"),e("./buffer.js"),e("./process.js"),e("reify/lib/runtime").enable(r.constructor),t.addStyles=e("./css").addStyles}],"buffer.js":["buffer",function(e){try{o=t.Buffer||e("buffer").Buffer}catch(e){}}],"css.js":function(e,t){var r=document,n=r.getElementsByTagName("head").item(0);t.addStyles=function(e){var t=r.createElement("style");t.setAttribute("type","text/css");var i=t.sheet||t.styleSheet;return i?i.cssText=e:t.appendChild(r.createTextNode(e)),n.appendChild(t)}},"install-packages.js":function(e,t,r){function n(e,t){var r={};t?r[e+".js"]=[t,function(e,r,n){n.exports=e(t)}]:r[e+".js"]=function(t,r,n){n.exports=Package[e]},i({node_modules:{meteor:r}})}n("underscore"),n("meteor"),n("meteor-base"),n("mobile-experience"),n("modules-runtime"),n("modules","meteor/modules/client.js"),n("es5-shim","meteor/es5-shim/client.js"),n("promise","meteor/promise/client.js"),n("ecmascript-runtime","meteor/ecmascript-runtime/runtime.js"),n("babel-compiler"),n("ecmascript"),n("base64"),n("ejson"),n("id-map"),n("ordered-dict"),n("tracker"),n("babel-runtime","meteor/babel-runtime/babel-runtime.js"),n("random"),n("mongo-id"),n("diff-sequence"),n("geojson-utils","meteor/geojson-utils/main.js"),n("minimongo"),n("check","meteor/check/match.js"),n("retry"),n("ddp-common"),n("reload"),n("ddp-client"),n("ddp"),n("ddp-server"),n("allow-deny"),n("mongo"),n("blaze-html-templates"),n("reactive-var"),n("jquery","meteor/jquery/main.js"),n("standard-minifier-css"),n("standard-minifier-js"),n("shell-server"),n("standard-app-packages"),n("stylus"),n("observe-sequence"),n("deps"),n("htmljs"),n("blaze"),n("spacebars"),n("templating-compiler"),n("templating-runtime"),n("templating"),n("ui"),n("iron:core"),n("iron:dynamic-template"),n("iron:layout"),n("iron:url"),n("iron:middleware-stack"),n("iron:location"),n("reactive-dict"),n("iron:controller"),n("iron:router"),n("natestrauser:select2"),n("aldeed:simple-schema"),n("autoupdate"),n("meteor-platform"),n("webapp"),n("logging"),n("session"),n("livedata"),n("launch-screen"),n("ohif:core","meteor/ohif:core/main.js"),n("ohif:design"),n("ohif:cornerstone","meteor/ohif:cornerstone/main.js"),n("url"),n("http"),n("momentjs:moment"),n("validatejs"),n("coffeescript"),n("practicalmeteor:chai"),n("practicalmeteor:loglevel"),n("ohif:log"),n("ohif:viewerbase","meteor/ohif:viewerbase/main.js"),n("ohif:metadata","meteor/ohif:metadata/main.js"),n("silentcicero:jszip"),n("ddp-rate-limiter"),n("localstorage"),n("callback-hook"),n("accounts-base","meteor/accounts-base/client_main.js"),n("raix:eventemitter"),n("aldeed:collection2-core"),n("aldeed:schema-index"),n("aldeed:schema-deny"),n("aldeed:collection2"),n("gilbertwat:bootstrap3-daterangepicker"),n("ohif:dicom-services"),n("ohif:wadoproxy"),n("ohif:study-list"),n("ohif:hanging-protocols"),n("aldeed:template-extension"),n("twbs:bootstrap"),n("fortawesome:fontawesome"),n("mrt:moment"),n("fastclick"),n("peppelg:bootstrap-3-modal"),n("hot-code-push"),n("mdg:validation-error"),n("service-configuration")},"process.js":["process",function(o,a,u){try{s=t.process||o("process")}catch(e){s={}}e.isServer?i({node_modules:{"process.js":function(e,t,r){r.exports=s}}}):(s.platform="browser",s.nextTick=s.nextTick||e._setImmediate),"object"!=typeof s.env&&(s.env={}),n.extend(s.env,r)}],"stubs.js":["meteor-node-stubs",function(e){try{e("meteor-node-stubs")}catch(e){}}],node_modules:{reify:{lib:{"runtime.js":["./entry.js","./utils.js",function(e,t,r){var n=e("./entry.js").Entry,i=e("./utils.js");t.enable=function(t){function r(e){var t=e.exports;t&&"object"==typeof t&&(t.__esModule=!0)}var o=t.prototype;return"function"==typeof o.import&&"function"==typeof o.export?t:(o.resolve=o.resolve||function e(t){throw new Error("Module.prototype.resolve
}function o(e){if(h===setTimeout)return setTimeout(e,0);if((h===n||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function s(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){_&&g&&(_=!1,g.length?p=g.concat(p):b=-1,p.length&&u())}function u(){if(!_){var e=o(a);_=!0;for(var t=p.length;t;){for(g=p,p=[];++b<t;)g&&g[b].run();b=-1,t=p.length}g=null,_=!1,s(e)}}function f(e,t){this.fun=e,this.array=t}function c(){}var l=r.exports={},h,d;!function(){try{h="function"==typeof setTimeout?setTimeout:n}catch(e){h=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var p=[],_=!1,g,b=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];p.push(new f(e,t)),1!==p.length||_||o(u)},f.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}}},"domain-browser":{"package.json":function(e,t){t.name="domain-browser",t.version="1.1.7",t.main="./index.js"},"index.js":["events",function(e,t,r){"use strict";r.exports=function(){var t=e("events"),r={};return r.createDomain=r.create=function(){function e(e){r.emit("error",e)}var r=new t.EventEmitter;return r.add=function(t){t.on("error",e)},r.remove=function(t){t.removeListener("error",e)},r.bind=function(t){return function(){var r=Array.prototype.slice.call(arguments);try{t.apply(null,r)}catch(t){e(t)}}},r.intercept=function(t){return function(r){if(r)e(r);else{var n=Array.prototype.slice.call(arguments,1);try{t.apply(null,n)}catch(t){e(t)}}}},r.run=function(t){try{t()}catch(t){e(t)}return this},r.dispose=function(){return this.removeAllListeners(),this},r.enter=r.exit=function(){return this},r},r}.call(this)}]},events:{"package.json":function(e,t){t.name="events",t.version="1.1.1",t.main="./events.js"},"events.js":function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}r.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),f=r.slice(),n=f.length,u=0;u<n;u++)f[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0
this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){_(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new k(this)}function a(t){return S=S||e("./_stream_duplex"),z.call(a,this)||this instanceof S?(this._writableState=new o(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void O.call(this)):new a(t)}function u(e,t){var r=new Error("write after end");e.emit("error",r),E(t,r)}function f(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):L.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),E(n,o),i=!1),i}function c(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=T.from(t,r)),t}function l(e,t,r,n,o){r=c(t,r,n),L.isBuffer(r)&&(n="buffer");var s=t.objectMode?1:r.length;t.length+=s;var a=t.length<t.highWaterMark;if(a||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new i(r,n,o),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else h(e,t,!1,s,r,n,o);return a}function h(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function d(e,t,r,n,i){--t.pendingcb,r?E(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function _(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(p(r),t)d(e,r,n,t,i);else{var o=y(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),n?x(g,e,r,o,i):g(e,r,o,i)}}function g(e,t,r,n){r||b(e,t),t.pendingcb--,n(),w(e,t)}function b(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0;r;)i[s]=r,r=r.next,s+=1;h(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new k(t)}else{for(;r;){var a=r.chunk,u=r.encoding,f=r.callback,c=t.objectMode?1:a.length;if(h(e,t,!1,c,a,u,f),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var r=y(t);return r&&(0===t.pendingcb?(v(e,t),t.finished=!0,e.emit("finish")):v(e,t)),r}function j(e,t,r){t.ending=!0,w(e,t),r&&(t.finished?E(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function k(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}r.exports=a;var E=e("process-nextick-args"),x=!s.browser&&["v0.10","v0.9."].indexOf(s.version.slice(0,5))>-1?setImmediate:E,S;a.WritableState=o;var A=e("core-util-is");A.inherits=e("inherits");var R={deprecate:e("util-deprecate")},O;!function(){try{O=e("stream")}catch(e){}finally{O||(O=e("events").EventEmitter)}}();var L=e("buffer").Buffer,T=e("buffer-shims");A.inherits(a,O),o.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},function(){try{Object.defineProperty(o.prototype,"buffer",{get:R.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var z;"function"==typeof Symbol&&Symbol.hasInstance?(z=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!z.call(this,e)||e&&e._writableS
U}return t!==P?U:f.wrap<=0?D:(2===f.wrap?(a(f,255&e.adler),a(f,e.adler>>8&255),a(f,e.adler>>16&255),a(f,e.adler>>24&255),a(f,255&e.total_in),a(f,e.total_in>>8&255),a(f,e.total_in>>16&255),a(f,e.total_in>>24&255)):(u(f,e.adler>>>16),u(f,65535&e.adler)),o(e),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?U:D)}function S(e){var t;return e&&e.state?(t=e.state.status,t!==le&&t!==he&&t!==de&&t!==pe&&t!==_e&&t!==ge&&t!==be?r(e,F):(e.state=null,t===ge?r(e,C):U)):F}function A(e,t){var r=t.length,n,o,s,a,u,f,c,h;if(!e||!e.state)return F;if(n=e.state,a=n.wrap,2===a||1===a&&n.status!==le||n.lookahead)return F;for(1===a&&(e.adler=L(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(0===a&&(i(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new R.Buf8(n.w_size),R.arraySet(h,t,r-n.w_size,n.w_size,0),t=h,r=n.w_size),u=e.avail_in,f=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,l(n);n.lookahead>=ae;){o=n.strstart,s=n.lookahead-(ae-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+ae-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--s);n.strstart=o,n.lookahead=ae-1,l(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=ae-1,n.match_available=0,e.next_in=f,e.input=c,e.avail_in=u,n.wrap=a,U}var R=e("../utils/common"),O=e("./trees"),L=e("./adler32"),T=e("./crc32"),z=e("./messages"),M=0,B=1,I=3,P=4,N=5,U=0,D=1,F=-2,C=-3,Z=-5,Y=-1,q=1,W=2,G=3,H=4,K=0,V=2,X=8,J=9,$=15,Q=8,ee=29,te=256,re=te+1+ee,ne=30,ie=19,oe=2*re+1,se=15,ae=3,ue=258,fe=ue+ae+1,ce=32,le=42,he=69,de=73,pe=91,_e=103,ge=113,be=666,me=1,ye=2,ve=3,we=4,je=3,ke;ke=[new b(0,0,0,0,h),new b(4,4,8,4,d),new b(4,5,16,8,d),new b(4,6,32,32,d),new b(4,4,16,16,p),new b(8,16,32,32,p),new b(8,16,128,128,p),new b(8,32,128,256,p),new b(32,128,258,1024,p),new b(32,258,258,4096,p)],t.deflateInit=E,t.deflateInit2=k,t.deflateReset=w,t.deflateResetKeep=v,t.deflateSetHeader=j,t.deflate=x,t.deflateEnd=S,t.deflateSetDictionary=A,t.deflateInfo="pako deflate (from Nodeca project)"}],"trees.js":["../utils/common",function(e,t){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function n(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function i(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ae[e]:ae[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function a(e,t,r){e.bi_valid>K-r?(e.bi_buf|=t<<e.bi_valid&65535,s(e,e.bi_buf),e.bi_buf=t>>K-e.bi_valid,e.bi_valid+=r-K):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function u(e,t,r){a(e,r[2*t],r[2*t+1])}function f(e,t){var r=0;do r|=1&e,e>>>=1,r<<=1;while(--t>0);return r>>>1}function c(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function l(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length,f,c,l,h,d,p,_=0;for(h=0;h<=H;h++)e.bl_count[h]=0;for(r[2*e.heap[e.heap_max]+1]=0,f=e.heap_max+1;f<G;f++)c=e.heap[f],h=r[2*r[2*c+1]+1]+1,h>u&&(h=u,_++),r[2*c+1]=h,c>n||(e.bl_count[h]++,d=0,c>=a&&(d=s[c-a]),p=r[2*c],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[2*c+1]+d)));if(0!==_){do{for(h=u-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,_-=2}while(_>0);for(h=u;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--f],l>n||(r[2*l+1]!==h&&(e.opt_len+=(h-r[2*l+1])*r[2*l],r[2*l+1]=h),c--)}}function h(e,t,r){var n=new Array(H+1),i=0,o,s;for(o=1;o<=H;o++)n[o]=i=i+r[o-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=f(n[a]++,a))}}function d(){var e,t,r,i,o,s=new Array(H+1);for(r=0,i=0;i<C-1;i++)for(fe[i]=r,e=0;e<1<<ee[i];e++)ue[r++]=i;for(ue[r-1]=i,o=0,i=0;i<16;i++)for(ce[i]=o,e=0;e<1<<te[i];e++)ae[o++]=i;for(o>>=7;i<q;i++)for(ce[i]=o<<7,e=0;e<1<<te[i]-7;e++)ae[256+o++]=i;for(t=0;t<=H;t++)s[t]=0;for(e=0;e<=143;)oe[2*e+1]=8,e++,s[8]++;for(;e<=255;)oe[2*e+1]=9,e++,s[9]++;for(;e<=279;)oe[2*e+1]=7,e++,
"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=e("../core-js/object/assign"),i=r(n);t.default=i.default||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}}],"possibleConstructorReturn.js":["../helpers/typeof",function(e,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=e("../helpers/typeof"),i=r(n);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}}],"inherits.js":["../core-js/object/set-prototype-of","../core-js/object/create","../helpers/typeof",function(e,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=e("../core-js/object/set-prototype-of"),i=r(n),o=e("../core-js/object/create"),s=r(o),a=e("../helpers/typeof"),u=r(a);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,u.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}}],"createClass.js":["../core-js/object/define-property",function(e,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=e("../core-js/object/define-property"),i=r(n);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()}]},"core-js":{symbol:{"iterator.js":["core-js/library/fn/symbol/iterator",function(e,t,r){r.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}}]},"symbol.js":["core-js/library/fn/symbol",function(e,t,r){r.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}}],array:{"from.js":["core-js/library/fn/array/from",function(e,t,r){r.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}}]},object:{"assign.js":["core-js/library/fn/object/assign",function(e,t,r){r.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}}],"set-prototype-of.js":["core-js/library/fn/object/set-prototype-of",function(e,t,r){r.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}}],"create.js":["core-js/library/fn/object/create",function(e,t,r){r.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}}],"define-property.js":["core-js/library/fn/object/define-property",function(e,t,r){r.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}}]}}},"regenerator-runtime":{"package.json":function(e,t,r){t.name="regenerator-runtime",t.version="0.9.6",t.main="runtime-module.js"},"runtime-module.js":["./runtime",function(e,r,n){var i="object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this,o=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,s=o&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,n.exports=e("./runtime"),o)i.regeneratorRuntime=s;else try{delete i.regeneratorRuntime}catch(e){i.regeneratorRuntime=void 0}}],"runtime.js":function(e,r,n){!function(e){"use strict";function t(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,s=Object.create(o.prototype),a=new p(n||[]);return s._invoke=l(e,r,a),s}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function f(e){this.arg=e}function c(e){function t(n,i,o,s){var a=r(e[n],e,i);if("throw"!==a.type){var u=a.arg,c=u.value;return c instanceof f?Promise.resolve(c.arg).then(function(e){t("next",e,o,s)},function(e){t("throw",e,o,s)}):Promise.resolve(c).then(function(e){u.valu
var t=e("./_export");t(t.S+t.F,"Object",{assign:e("./_object-assign")})}],"_object-assign.js":["./_object-keys","./_object-gops","./_object-pie","./_to-object","./_iobject","./_fails",function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie"),s=e("./_to-object"),a=e("./_iobject"),u=Object.assign;r.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function e(t,r){for(var u=s(t),f=arguments.length,c=1,l=i.f,h=o.f;f>c;)for(var d=a(arguments[c++]),p=l?n(d).concat(l(d)):n(d),_=p.length,g=0,b;_>g;)h.call(d,b=p[g++])&&(u[b]=d[b]);return u}:u}],"es6.object.set-prototype-of.js":["./_export","./_set-proto",function(e){var t=e("./_export");t(t.S,"Object",{setPrototypeOf:e("./_set-proto").set})}],"_set-proto.js":["./_is-object","./_an-object","./_ctx","./_object-gopd",function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),o=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};r.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function e(t,i){return o(t,i),r?t.__proto__=i:n(t,i),t}}({},!1):void 0),check:o}}],"es6.object.create.js":["./_export","./_object-create",function(e){var t=e("./_export");t(t.S,"Object",{create:e("./_object-create")})}],"es6.object.define-property.js":["./_export","./_descriptors","./_object-dp",function(e){var t=e("./_export");t(t.S+t.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})}]}}}}},{extensions:[".js",".json"]}),u=a("./node_modules/meteor/modules/client.js");"undefined"==typeof Package&&(Package={}),function(e,t){for(var r in t)r in e||(e[r]=t[r])}(Package.modules=u,{meteorInstall:i,Buffer:o,process:s})}();
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.modules.meteorInstall,o=Package.modules.Buffer,i=Package.modules.process,a,c,u,f,s=n({node_modules:{meteor:{"es5-shim":{"client.js":["./import_globals.js","es5-shim/es5-shim.js","es5-shim/es5-sham.js","./console.js","./export_globals.js",function(t){t("./import_globals.js"),t("es5-shim/es5-shim.js"),t("es5-shim/es5-sham.js"),t("./console.js"),t("./export_globals.js")}],"console.js":function(){function t(t){var e=console[t];e&&"object"==typeof e&&(console[t]=function(){return Function.prototype.apply.call(e,console,arguments)})}var e=Object.prototype.hasOwnProperty;if("object"==typeof console&&"object"==typeof console.log)for(var r in console)e.call(console,r)&&t(r)},"export_globals.js":function(){e.Date!==a&&(e.Date=a),e.parseInt!==c&&(e.parseInt=c),e.parseFloat!==u&&(e.parseFloat=u);var t=String.prototype;t.replace!==f&&(t.replace=f)},"import_globals.js":function(){a=e.Date,c=e.parseInt,u=e.parseFloat,f=String.prototype.replace},node_modules:{"es5-shim":{"es5-shim.js":function(t,e,r){!function(t,n){"use strict";"function"==typeof define&&define.amd?define(n):"object"==typeof e?r.exports=n():t.returnExports=n()}(this,function(){var t=Array,e=t.prototype,r=Object,n=r.prototype,o=Function,i=o.prototype,f=String,s=f.prototype,l=Number,p=l.prototype,h=e.slice,y=e.splice,d=e.push,b=e.unshift,g=e.concat,v=e.join,w=i.call,j=i.apply,O=Math.max,m=Math.min,T=n.toString,E="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,x,S=Function.prototype.toString,_=/^\s*class /,P=function t(e){try{var r=S.call(e),n=r.replace(/\/\/.*\n/g,""),o=n.replace(/\/\*[.\s\S]*\*\//g,""),i=o.replace(/\n/gm," ").replace(/ {2}/g," ");return _.test(i)}catch(t){return!1}},M=function t(e){try{return!P(e)&&(S.call(e),!0)}catch(t){return!1}},I="[object Function]",D="[object GeneratorFunction]",x=function t(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(E)return M(e);if(P(e))return!1;var r=T.call(e);return r===I||r===D},k,F=RegExp.prototype.exec,U=function t(e){try{return F.call(e),!0}catch(t){return!1}},N="[object RegExp]";k=function t(e){return"object"==typeof e&&(E?U(e):T.call(e)===N)};var C,A=String.prototype.valueOf,R=function t(e){try{return A.call(e),!0}catch(t){return!1}},$="[object String]";C=function t(e){return"string"==typeof e||"object"==typeof e&&(E?R(e):T.call(e)===$)};var z=r.defineProperty&&function(){try{var t={};r.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}}(),J=function(t){var e;return e=z?function(t,e,n,o){!o&&e in t||r.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,r,n){!n&&e in t||(t[e]=r)},function r(n,o,i){for(var a in o)t.call(o,a)&&e(n,a,o[a],i)}}(n.hasOwnProperty),G=function t(e){var r=typeof e;return null===e||"object"!==r&&"function"!==r},Z=l.isNaN||function t(e){return e!==e},Y={ToInteger:function t(e){var r=+e;return Z(r)?r=0:0!==r&&r!==1/0&&r!==-(1/0)&&(r=(r>0||-1)*Math.floor(Math.abs(r))),r},ToPrimitive:function t(e){var r,n,o;if(G(e))return e;if(n=e.valueOf,x(n)&&(r=n.call(e),G(r)))return r;if(o=e.toString,x(o)&&(r=o.call(e),G(r)))return r;throw new TypeError},ToObject:function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return r(t)},ToUint32:function t(e){return e>>>0}},W=function t(){};J(i,{bind:function t(e){var n=this;if(!x(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i=h.call(arguments,1),a,c=function(){if(this instanceof a){var t=j.call(n,this,g.call(i,h.call(arguments)));return r(t)===t?t:this}return j.call(n,e,g.call(i,h.call(arguments)))},u=O(0,n.length-i.length),f=[],s=0;s<u;s++)d.call(f,"$"+s);return a=o("binder","return function ("+v.call(f,",")+"){ return binder.apply(this, arguments); }")(c),n.prototype&&(W.prototype=n.prototype,a.prototype=new W,W.prototype=null),a}});var B=w.bind(n.hasOwnProperty),X=w.bind(n.toString),H=w.bind(h),L=j.bind(h),q=w.bind(s.slice),K=w.bind(s.split),Q=w.bind(s.indexOf),V=w.bind(d),tt=w.b
!function(){var n=Package.meteor.Meteor,e=Package.meteor.global,t=Package.meteor.meteorEnv,o=Package.modules.meteorInstall,i=Package.modules.Buffer,r=Package.modules.process,u,c=o({node_modules:{meteor:{promise:{"client.js":["meteor-promise","./common.js",function(n,e){n("meteor-promise").makeCompatible(e.Promise=n("./common.js").Promise)}],"common.js":["promise/lib/es6-extensions",function(e,t){var o=this;"function"==typeof o.Promise?t.Promise=o.Promise:t.Promise=e("promise/lib/es6-extensions"),t.Promise.prototype.done=function(e,t){var o=this;arguments.length>0&&(o=this.then.apply(this,arguments)),o.then(null,function(e){n._setImmediate(function(){throw e})})}}],node_modules:{"meteor-promise":{"package.json":function(n,e){e.name="meteor-promise",e.version="0.8.0",e.main="promise_client.js"},"promise_client.js":function(e,t){function o(n){throw n}t.makeCompatible=function(e){var t=e.prototype.then;e.prototype.then=function(e,i){return"object"==typeof n&&"function"==typeof n.bindEnvironment?t.call(this,e&&n.bindEnvironment(e,o),i&&n.bindEnvironment(i,o)):t.call(this,e,i)}}}},promise:{lib:{"es6-extensions.js":["./core.js",function(n,e,t){"use strict";function o(n){var e=new i(i._61);return e._81=1,e._65=n,e}var i=n("./core.js");t.exports=i;var r=o(!0),u=o(!1),c=o(null),f=o(void 0),s=o(0),a=o("");i.resolve=function(n){if(n instanceof i)return n;if(null===n)return c;if(void 0===n)return f;if(n===!0)return r;if(n===!1)return u;if(0===n)return s;if(""===n)return a;if("object"==typeof n||"function"==typeof n)try{var e=n.then;if("function"==typeof e)return new i(e.bind(n))}catch(n){return new i(function(e,t){t(n)})}return o(n)},i.all=function(n){var e=Array.prototype.slice.call(n);return new i(function(n,t){function o(u,c){if(c&&("object"==typeof c||"function"==typeof c)){if(c instanceof i&&c.then===i.prototype.then){for(;3===c._81;)c=c._65;return 1===c._81?o(u,c._65):(2===c._81&&t(c._65),void c.then(function(n){o(u,n)},t))}var f=c.then;if("function"==typeof f){var s=new i(f.bind(c));return void s.then(function(n){o(u,n)},t)}}e[u]=c,0===--r&&n(e)}if(0===e.length)return n([]);for(var r=e.length,u=0;u<e.length;u++)o(u,e[u])})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(n){return new i(function(e,t){n.forEach(function(n){i.resolve(n).then(e,t)})})},i.prototype.catch=function(n){return this.then(null,n)}}],"core.js":["asap/raw",function(n,e,t){"use strict";function o(){}function i(n){try{return n.then}catch(n){return d=n,y}}function r(n,e){try{return n(e)}catch(n){return d=n,y}}function u(n,e,t){try{n(e,t)}catch(n){return d=n,y}}function c(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,n!==o&&_(n,this)}function f(n,e,t){return new n.constructor(function(i,r){var u=new c(o);u.then(i,r),s(n,new h(e,t,u))})}function s(n,e){for(;3===n._81;)n=n._65;return c._10&&c._10(n),0===n._81?0===n._45?(n._45=1,void(n._54=e)):1===n._45?(n._45=2,void(n._54=[n._54,e])):void n._54.push(e):void a(n,e)}function a(n,e){v(function(){var t=1===n._81?e.onFulfilled:e.onRejected;if(null===t)return void(1===n._81?l(e.promise,n._65):m(e.promise,n._65));var o=r(t,n._65);o===y?m(e.promise,d):l(e.promise,o)})}function l(n,e){if(e===n)return m(n,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var t=i(e);if(t===y)return m(n,d);if(t===n.then&&e instanceof c)return n._81=3,n._65=e,void p(n);if("function"==typeof t)return void _(t.bind(e),n)}n._81=1,n._65=e,p(n)}function m(n,e){n._81=2,n._65=e,c._97&&c._97(n,e),p(n)}function p(n){if(1===n._45&&(s(n,n._54),n._54=null),2===n._45){for(var e=0;e<n._54.length;e++)s(n,n._54[e]);n._54=null}}function h(n,e,t){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.promise=t}function _(n,e){var t=!1,o=u(n,function(n){t||(t=!0,l(e,n))},function(n){t||(t=!0,m(e,n))});t||o!==y||(t=!0,m(e,d))}var v=n("asap/raw"),d=null,y={};t.exports=c,c._10=null,c._97=n
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,o=Package.modules.meteorInstall,n=Package.modules.Buffer,s=Package.modules.process,i=Package.promise.Promise,c,u,a,_,f,l=o({node_modules:{meteor:{"ecmascript-runtime":{"runtime.js":["meteor-ecmascript-runtime",function(t,e,r){r.exports=t("meteor-ecmascript-runtime")}],node_modules:{"meteor-ecmascript-runtime":{"package.json":function(t,e){e.name="meteor-ecmascript-runtime",e.version="0.2.9",e.main="index.js"},"index.js":["core-js/es6/object","core-js/es6/array","core-js/es6/string","core-js/es6/function","core-js/fn/array/includes","core-js/fn/object/values","core-js/fn/object/entries","core-js/fn/object/get-own-property-descriptors","core-js/fn/string/pad-start","core-js/fn/string/pad-end","core-js/fn/string/trim-start","core-js/fn/string/trim-end","core-js/es6/symbol","core-js/es6/map","core-js/es6/set",function(t,r){t("core-js/es6/object"),t("core-js/es6/array"),t("core-js/es6/string"),t("core-js/es6/function"),t("core-js/fn/array/includes"),t("core-js/fn/object/values"),t("core-js/fn/object/entries"),t("core-js/fn/object/get-own-property-descriptors"),t("core-js/fn/string/pad-start"),t("core-js/fn/string/pad-end"),t("core-js/fn/string/trim-start"),t("core-js/fn/string/trim-end"),c=r.Symbol=e.Symbol||t("core-js/es6/symbol"),u=r.Map=t("core-js/es6/map"),a=r.Set=t("core-js/es6/set")}]},"core-js":{es6:{"object.js":["../modules/es6.symbol","../modules/es6.object.create","../modules/es6.object.define-property","../modules/es6.object.define-properties","../modules/es6.object.get-own-property-descriptor","../modules/es6.object.get-prototype-of","../modules/es6.object.keys","../modules/es6.object.get-own-property-names","../modules/es6.object.freeze","../modules/es6.object.seal","../modules/es6.object.prevent-extensions","../modules/es6.object.is-frozen","../modules/es6.object.is-sealed","../modules/es6.object.is-extensible","../modules/es6.object.assign","../modules/es6.object.is","../modules/es6.object.set-prototype-of","../modules/es6.object.to-string","../modules/_core",function(t,e,r){t("../modules/es6.symbol"),t("../modules/es6.object.create"),t("../modules/es6.object.define-property"),t("../modules/es6.object.define-properties"),t("../modules/es6.object.get-own-property-descriptor"),t("../modules/es6.object.get-prototype-of"),t("../modules/es6.object.keys"),t("../modules/es6.object.get-own-property-names"),t("../modules/es6.object.freeze"),t("../modules/es6.object.seal"),t("../modules/es6.object.prevent-extensions"),t("../modules/es6.object.is-frozen"),t("../modules/es6.object.is-sealed"),t("../modules/es6.object.is-extensible"),t("../modules/es6.object.assign"),t("../modules/es6.object.is"),t("../modules/es6.object.set-prototype-of"),t("../modules/es6.object.to-string"),r.exports=t("../modules/_core").Object}],"array.js":["../modules/es6.string.iterator","../modules/es6.array.is-array","../modules/es6.array.from","../modules/es6.array.of","../modules/es6.array.join","../modules/es6.array.slice","../modules/es6.array.sort","../modules/es6.array.for-each","../modules/es6.array.map","../modules/es6.array.filter","../modules/es6.array.some","../modules/es6.array.every","../modules/es6.array.reduce","../modules/es6.array.reduce-right","../modules/es6.array.index-of","../modules/es6.array.last-index-of","../modules/es6.array.copy-within","../modules/es6.array.fill","../modules/es6.array.find","../modules/es6.array.find-index","../modules/es6.array.species","../modules/es6.array.iterator","../modules/_core",function(t,e,r){t("../modules/es6.string.iterator"),t("../modules/es6.array.is-array"),t("../modules/es6.array.from"),t("../modules/es6.array.of"),t("../modules/es6.array.join"),t("../modules/es6.array.slice"),t("../modules/es6.array.sort"),t("../modules/es6.array.for-each"),t("../modules/es6.array.map"),t("../modules/es6.array.filter"),t("../modules/es6.array.some"),t("../modules/es6.array.every"),t("../modules/es6.array.reduce"),t("../modules/es6.array.reduce-right"),t("../modules/es6.array.index-of"),t("../modules/es6.array.last
var o=t("./_wks")("iterator"),n=!1;try{var s=[7][o]();s.return=function(){n=!0},Array.from(s,function(){throw 2})}catch(t){}r.exports=function(t,e){if(!e&&!n)return!1;var r=!1;try{var s=[7],i=s[o]();i.next=function(){return{done:r=!0}},s[o]=function(){return i},t(s)}catch(t){}return r}}],"es6.array.of.js":["./_export","./_create-property","./_fails",function(t){"use strict";var e=t("./_export"),r=t("./_create-property");e(e.S+e.F*t("./_fails")(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function t(){for(var e=0,o=arguments.length,n=new("function"==typeof this?this:Array)(o);o>e;)r(n,e,arguments[e++]);return n.length=o,n}})}],"es6.array.join.js":["./_export","./_to-iobject","./_iobject","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_to-iobject"),o=[].join;e(e.P+e.F*(t("./_iobject")!=Object||!t("./_strict-method")(o)),"Array",{join:function t(e){return o.call(r(this),void 0===e?",":e)}})}],"_strict-method.js":["./_fails",function(t,e,r){var o=t("./_fails");r.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}}],"es6.array.slice.js":["./_export","./_html","./_cof","./_to-index","./_to-length","./_fails",function(t){"use strict";var e=t("./_export"),r=t("./_html"),o=t("./_cof"),n=t("./_to-index"),s=t("./_to-length"),i=[].slice;e(e.P+e.F*t("./_fails")(function(){r&&i.call(r)}),"Array",{slice:function t(e,r){var c=s(this.length),u=o(this);if(r=void 0===r?c:r,"Array"==u)return i.call(this,e,r);for(var a=n(e,c),_=n(r,c),f=s(_-a),l=Array(f),d=0;d<f;d++)l[d]="String"==u?this.charAt(a+d):this[a+d];return l}})}],"es6.array.sort.js":["./_export","./_a-function","./_to-object","./_fails","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_a-function"),o=t("./_to-object"),n=t("./_fails"),s=[].sort,i=[1,2,3];e(e.P+e.F*(n(function(){i.sort(void 0)})||!n(function(){i.sort(null)})||!t("./_strict-method")(s)),"Array",{sort:function t(e){return void 0===e?s.call(o(this)):s.call(o(this),r(e))}})}],"es6.array.for-each.js":["./_export","./_array-methods","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_array-methods")(0),o=t("./_strict-method")([].forEach,!0);e(e.P+e.F*!o,"Array",{forEach:function t(e){return r(this,e,arguments[1])}})}],"_array-methods.js":["./_ctx","./_iobject","./_to-object","./_to-length","./_array-species-create",function(t,e,r){var o=t("./_ctx"),n=t("./_iobject"),s=t("./_to-object"),i=t("./_to-length"),c=t("./_array-species-create");r.exports=function(t,e){var r=1==t,u=2==t,a=3==t,_=4==t,f=6==t,l=5==t||f,d=e||c;return function(e,c,p){for(var j=s(e),g=n(j),b=o(c,p,3),m=i(g.length),h=0,y=r?d(e,m):u?d(e,0):void 0,v,x;m>h;h++)if((l||h in g)&&(v=g[h],x=b(v,h,j),t))if(r)y[h]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return h;case 2:y.push(v)}else if(_)return!1;return f?-1:a||_?_:y}}}],"_array-species-create.js":["./_array-species-constructor",function(t,e,r){var o=t("./_array-species-constructor");r.exports=function(t,e){return new(o(t))(e)}}],"_array-species-constructor.js":["./_is-object","./_is-array","./_wks",function(t,e,r){var o=t("./_is-object"),n=t("./_is-array"),s=t("./_wks")("species");r.exports=function(t){var e;return n(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!n(e.prototype)||(e=void 0),o(e)&&(e=e[s],null===e&&(e=void 0))),void 0===e?Array:e}}],"es6.array.map.js":["./_export","./_array-methods","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_array-methods")(1);e(e.P+e.F*!t("./_strict-method")([].map,!0),"Array",{map:function t(e){return r(this,e,arguments[1])}})}],"es6.array.filter.js":["./_export","./_array-methods","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_array-methods")(2);e(e.P+e.F*!t("./_strict-method")([].filter,!0),"Array",{filter:function t(e){return r(this,e,arguments[1])}})}],"es6.array.some.js":["./_export","./_array-methods","./_strict-method",function(t){"use strict";var e=t("./_export"),r=t("./_array-methods")(3);e(e.P+e.F*!t("./_strict-method")([].some,!0),"Array",{some:f
!function(){"undefined"==typeof Package&&(Package={}),Package["babel-compiler"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package.ecmascript={}}();
!function(){var n=Package.meteor.Meteor,r=Package.meteor.global,e=Package.meteor.meteorEnv,a;(function(){for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={},e=0;e<n.length;e++)r[n.charAt(e)]=e;a={},a.encode=function(n){if("string"==typeof n){var r=n;n=a.newBinary(r.length);for(var e=0;e<r.length;e++){var l=r.charCodeAt(e);if(l>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");n[e]=l}}for(var u=[],i=null,o=null,c=null,f=null,e=0;e<n.length;e++)switch(e%3){case 0:i=n[e]>>2&63,o=(3&n[e])<<4;break;case 1:o|=n[e]>>4&15,c=(15&n[e])<<2;break;case 2:c|=n[e]>>6&3,f=63&n[e],u.push(t(i)),u.push(t(o)),u.push(t(c)),u.push(t(f)),i=null,o=null,c=null,f=null}return null!=i&&(u.push(t(i)),u.push(t(o)),null==c?u.push("="):u.push(t(c)),null==f&&u.push("=")),u.join("")};var t=function(r){return n.charAt(r)},l=function(n){return"="===n?-1:r[n]};a.newBinary=function(n){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var r=[],e=0;e<n;e++)r.push(0);return r.$Uint8ArrayPolyfill=!0,r}return new Uint8Array(new ArrayBuffer(n))},a.decode=function(n){var r=Math.floor(3*n.length/4);"="==n.charAt(n.length-1)&&(r--,"="==n.charAt(n.length-2)&&r--);for(var e=a.newBinary(r),t=null,u=null,i=null,o=0,c=0;c<n.length;c++){var f=n.charAt(c),s=l(f);switch(c%4){case 0:if(s<0)throw new Error("invalid base64 string");t=s<<2;break;case 1:if(s<0)throw new Error("invalid base64 string");t|=s>>4,e[o++]=t,u=(15&s)<<4;break;case 2:s>=0&&(u|=s>>2,e[o++]=u,i=(3&s)<<6);break;case 3:s>=0&&(e[o++]=i|s)}}return e}}).call(this),"undefined"==typeof Package&&(Package={}),function(n,r){for(var e in r)e in n||(n[e]=r[e])}(Package.base64={},{Base64:a})}();
!function(){var n=Package.meteor.Meteor,e=Package.meteor.global,t=Package.meteor.meteorEnv,r=Package.underscore._,u=Package.base64.Base64,a,i;(function(){a={},i={};var e={};a.addType=function(n,t){if(r.has(e,n))throw new Error("Type "+n+" already present");e[n]=t};var t=function(n){return r.isNaN(n)||n===1/0||n===-(1/0)},o=[{matchJSONValue:function(n){return r.has(n,"$date")&&1===r.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 r.has(n,"$InfNaN")&&1===r.size(n)},matchObject:t,toJSONValue:function(n){var e;return e=r.isNaN(n)?0:n===1/0?1:-1,{$InfNaN:e}},fromJSONValue:function(n){return n.$InfNaN/0}},{matchJSONValue:function(n){return r.has(n,"$binary")&&1===r.size(n)},matchObject:function(n){return"undefined"!=typeof Uint8Array&&n instanceof Uint8Array||n&&r.has(n,"$Uint8ArrayPolyfill")},toJSONValue:function(n){return{$binary:u.encode(n)}},fromJSONValue:function(n){return u.decode(n.$binary)}},{matchJSONValue:function(n){return r.has(n,"$escape")&&1===r.size(n)},matchObject:function(n){return!(r.isEmpty(n)||r.size(n)>2)&&r.any(o,function(e){return e.matchJSONValue(n)})},toJSONValue:function(n){var e={};return r.each(n,function(n,t){e[t]=a.toJSONValue(n)}),{$escape:e}},fromJSONValue:function(n){var e={};return r.each(n.$escape,function(n,t){e[t]=a.fromJSONValue(n)}),e}},{matchJSONValue:function(n){return r.has(n,"$type")&&r.has(n,"$value")&&2===r.size(n)},matchObject:function(n){return a._isCustomType(n)},toJSONValue:function(e){var t=n._noYieldsAllowed(function(){return e.toJSONValue()});return{$type:e.typeName(),$value:t}},fromJSONValue:function(t){var u=t.$type;if(!r.has(e,u))throw new Error("Custom EJSON type "+u+" is not defined");var a=e[u];return n._noYieldsAllowed(function(){return a(t.$value)})}}];a._isCustomType=function(n){return n&&"function"==typeof n.toJSONValue&&"function"==typeof n.typeName&&r.has(e,n.typeName())},a._getTypes=function(){return e},a._getConverters=function(){return o};var f=a._adjustTypesToJSONValue=function(n){if(null===n)return null;var e=c(n);return void 0!==e?e:"object"!=typeof n?n:(r.each(n,function(e,r){if("object"==typeof e||void 0===e||t(e)){var u=c(e);return u?void(n[r]=u):void f(e)}}),n)},c=function(n){for(var e=0;e<o.length;e++){var t=o[e];if(t.matchObject(n))return t.toJSONValue(n)}};a.toJSONValue=function(n){var e=c(n);return void 0!==e?e:("object"==typeof n&&(n=a.clone(n),f(n)),n)};var l=a._adjustTypesFromJSONValue=function(n){if(null===n)return null;var e=s(n);return e!==n?e:"object"!=typeof n?n:(r.each(n,function(e,t){if("object"==typeof e){var r=s(e);if(e!==r)return void(n[t]=r);l(e)}}),n)},s=function(n){if("object"==typeof n&&null!==n&&r.size(n)<=2&&r.all(n,function(n,e){return"string"==typeof e&&"$"===e.substr(0,1)}))for(var e=0;e<o.length;e++){var t=o[e];if(t.matchJSONValue(n))return t.fromJSONValue(n)}return n};a.fromJSONValue=function(n){var e=s(n);return e===n&&"object"==typeof n?(n=a.clone(n),l(n),n):e},a.stringify=function(n,e){var t=a.toJSONValue(n);return e&&(e.canonical||e.indent)?a._canonicalStringify(t,e):JSON.stringify(t)},a.parse=function(n){if("string"!=typeof n)throw new Error("EJSON.parse argument should be a string");return a.fromJSONValue(JSON.parse(n))},a.isBinary=function(n){return!!("undefined"!=typeof Uint8Array&&n instanceof Uint8Array||n&&n.$Uint8ArrayPolyfill)},a.equals=function(n,e,t){var u,i=!(!t||!t.keyOrderSensitive);if(n===e)return!0;if(r.isNaN(n)&&r.isNaN(e))return!0;if(!n||!e)return!1;if("object"!=typeof n||"object"!=typeof e)return!1;if(n instanceof Date&&e instanceof Date)return n.valueOf()===e.valueOf();if(a.isBinary(n)&&a.isBinary(e)){if(n.length!==e.length)return!1;for(u=0;u<n.length;u++)if(n[u]!==e[u])return!1;return!0}if("function"==typeof n.equals)return n.equals(e,t);if("function"==typeof e.equals)return e.equals(n,t);if(n instanceof Array){if(!(e instanceof Array))return!1;if(n.length!==e.length)return!1;for(u=0;u<n.length;u++)if(!a.equals(n[u],e[u],t))return!1;return!0}switch(a._is
!function(){var i=Package.meteor.Meteor,t=Package.meteor.global,a=Package.meteor.meteorEnv,n=Package.underscore._,e=Package.ejson.EJSON,r;(function(){r=function(i,t){var a=this;a._map={},a._idStringify=i||JSON.stringify,a._idParse=t||JSON.parse},n.extend(r.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 t=this,a=t._idStringify(i);return n.has(t._map,a)},empty:function(){var i=this;return n.isEmpty(i._map)},clear:function(){var i=this;i._map={}},forEach:function(i){for(var t=this,a=n.keys(t._map),e=0;e<a.length;e++){var r=i.call(null,t._map[a[e]],t._idParse(a[e]));if(r===!1)return}},size:function(){var i=this;return n.size(i._map)},setDefault:function(i,t){var a=this,e=a._idStringify(i);return n.has(a._map,e)?a._map[e]:(a._map[e]=t,t)},clone:function(){var i=this,t=new r(i._idStringify,i._idParse);return i.forEach(function(i,a){t.set(a,e.clone(i))}),t}})}).call(this),"undefined"==typeof Package&&(Package={}),function(i,t){for(var a in t)a in i||(i[a]=t[a])}(Package["id-map"]={},{IdMap:r})}();
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.underscore._,i;(function(){var t=function(t,e,r,n){return{key:t,value:e,next:r,prev:n}};i=function(){var t=this;t._dict={},t._first=null,t._last=null,t._size=0;var e=n.toArray(arguments);t._stringify=function(t){return t},"function"==typeof e[0]&&(t._stringify=e.shift()),n.each(e,function(e){t.putBefore(e[0],e[1],null)})},n.extend(i.prototype,{_k:function(t){return" "+this._stringify(t)},empty:function(){var t=this;return!t._first},size:function(){var t=this;return t._size},_linkEltIn:function(t){var e=this;t.next?(t.prev=t.next.prev,t.next.prev=t,t.prev&&(t.prev.next=t)):(t.prev=e._last,e._last&&(e._last.next=t),e._last=t),null!==e._first&&e._first!==t.next||(e._first=t)},_linkEltOut:function(t){var e=this;t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t===e._last&&(e._last=t.prev),t===e._first&&(e._first=t.next)},putBefore:function(e,r,n){var i=this;if(i._dict[i._k(e)])throw new Error("Item "+e+" already present in OrderedDict");var o=n?t(e,r,i._dict[i._k(n)]):t(e,r,null);if(void 0===o.next)throw new Error("could not find item to put this one before");i._linkEltIn(o),i._dict[i._k(e)]=o,i._size++},append:function(t,e){var r=this;r.putBefore(t,e,null)},remove:function(t){var e=this,r=e._dict[e._k(t)];if(void 0===r)throw new Error("Item "+t+" not present in OrderedDict");return e._linkEltOut(r),e._size--,delete e._dict[e._k(t)],r.value},get:function(t){var e=this;if(e.has(t))return e._dict[e._k(t)].value},has:function(t){var e=this;return n.has(e._dict,e._k(t))},forEach:function(t){for(var e=this,r=0,n=e._first;null!==n;){var o=t(n.value,n.key,r);if(o===i.BREAK)return;n=n.next,r++}},first:function(){var t=this;if(!t.empty())return t._first.key},firstValue:function(){var t=this;if(!t.empty())return t._first.value},last:function(){var t=this;if(!t.empty())return t._last.key},lastValue:function(){var t=this;if(!t.empty())return t._last.value},prev:function(t){var e=this;if(e.has(t)){var r=e._dict[e._k(t)];if(r.prev)return r.prev.key}return null},next:function(t){var e=this;if(e.has(t)){var r=e._dict[e._k(t)];if(r.next)return r.next.key}return null},moveBefore:function(t,e){var r=this,n=r._dict[r._k(t)],i=e?r._dict[r._k(e)]:null;if(void 0===n)throw new Error("Item to move is not present");if(void 0===i)throw new Error("Could not find element to move this one before");i!==n.next&&(r._linkEltOut(n),n.next=i,r._linkEltIn(n))},indexOf:function(t){var e=this,r=null;return e.forEach(function(n,o,f){if(e._k(o)===e._k(t))return r=f,i.BREAK}),r},_checkRep:function(){var t=this;n.each(t._dict,function(t,e){if(e.next===e)throw new Error("Next is a loop");if(e.prev===e)throw new Error("Prev is a loop")})}}),i.BREAK={break:!0}}).call(this),"undefined"==typeof Package&&(Package={}),function(t,e){for(var r in e)r in t||(t[r]=e[r])}(Package["ordered-dict"]={},{OrderedDict:i})}();
!function(){var n=Package.meteor.Meteor,t=Package.meteor.global,e=Package.meteor.meteorEnv,o,r;(function(){o={},o.active=!1,o.currentComputation=null;var t=function(n){o.currentComputation=n,o.active=!!n},e=function(){return"undefined"!=typeof n?n._debug:"undefined"!=typeof console&&console.error?function(){console.error.apply(console,arguments)}:function(){}},r=function(t){"undefined"!=typeof n&&n._suppressed_log_expected()&&n._suppress_log(t-1)},i=function(n,t){if(l)throw t;var o=["Exception from Tracker "+n+" function:"];if(t.stack&&t.message&&t.name){var i=t.stack.indexOf(t.message);if(i<0||i>t.name.length+2){var a=t.name+": "+t.message;o.push(a)}}o.push(t.stack),r(o.length);for(var u=0;u<o.length;u++)e()(o[u])},a=function(t){return"undefined"==typeof n||n.isClient?t:function(){var e=arguments;n._noYieldsAllowed(function(){t.apply(null,e)})}},u=1,c=[],p=!1,s=!1,f=!1,l=!1,d=[],h=function(){p||("undefined"!=typeof n?n._setImmediate(o._runFlush):setTimeout(o._runFlush,0),p=!0)},v=!1;o.Computation=function(n,t,e){if(!v)throw new Error("Tracker.Computation constructor is private; use Tracker.autorun");v=!1;var o=this;o.stopped=!1,o.invalidated=!1,o.firstRun=!0,o._id=u++,o._onInvalidateCallbacks=[],o._onStopCallbacks=[],o._parent=t,o._func=n,o._onError=e,o._recomputing=!1;var r=!0;try{o._compute(),r=!1}finally{o.firstRun=!1,r&&o.stop()}},o.Computation.prototype.onInvalidate=function(n){var t=this;if("function"!=typeof n)throw new Error("onInvalidate requires a function");t.invalidated?o.nonreactive(function(){a(n)(t)}):t._onInvalidateCallbacks.push(n)},o.Computation.prototype.onStop=function(n){var t=this;if("function"!=typeof n)throw new Error("onStop requires a function");t.stopped?o.nonreactive(function(){a(n)(t)}):t._onStopCallbacks.push(n)},o.Computation.prototype.invalidate=function(){var n=this;if(!n.invalidated){n._recomputing||n.stopped||(h(),c.push(this)),n.invalidated=!0;for(var t=0,e;e=n._onInvalidateCallbacks[t];t++)o.nonreactive(function(){a(e)(n)});n._onInvalidateCallbacks=[]}},o.Computation.prototype.stop=function(){var n=this;if(!n.stopped){n.stopped=!0,n.invalidate();for(var t=0,e;e=n._onStopCallbacks[t];t++)o.nonreactive(function(){a(e)(n)});n._onStopCallbacks=[]}},o.Computation.prototype._compute=function(){var n=this;n.invalidated=!1;var e=o.currentComputation;t(n);var r=f;f=!0;try{a(n._func)(n)}finally{t(e),f=r}},o.Computation.prototype._needsRecompute=function(){var n=this;return n.invalidated&&!n.stopped},o.Computation.prototype._recompute=function(){var n=this;n._recomputing=!0;try{if(n._needsRecompute())try{n._compute()}catch(t){n._onError?n._onError(t):i("recompute",t)}}finally{n._recomputing=!1}},o.Computation.prototype.flush=function(){var n=this;n._recomputing||n._recompute()},o.Computation.prototype.run=function(){var n=this;n.invalidate(),n.flush()},o.Dependency=function(){this._dependentsById={}},o.Dependency.prototype.depend=function(n){if(!n){if(!o.active)return!1;n=o.currentComputation}var t=this,e=n._id;return!(e in t._dependentsById)&&(t._dependentsById[e]=n,n.onInvalidate(function(){delete t._dependentsById[e]}),!0)},o.Dependency.prototype.changed=function(){var n=this;for(var t in n._dependentsById)n._dependentsById[t].invalidate()},o.Dependency.prototype.hasDependents=function(){var n=this;for(var t in n._dependentsById)return!0;return!1},o.flush=function(n){o._runFlush({finishSynchronously:!0,throwFirstError:n&&n._throwFirstError})},o._runFlush=function(n){if(s)throw new Error("Can't call Tracker.flush while flushing");if(f)throw new Error("Can't flush inside Tracker.autorun");n=n||{},s=!0,p=!0,l=!!n.throwFirstError;var t=0,e=!1;try{for(;c.length||d.length;){for(;c.length;){var r=c.shift();if(r._recompute(),r._needsRecompute()&&c.unshift(r),!n.finishSynchronously&&++t>1e3)return void(e=!0)}if(d.length){var a=d.shift();try{a()}catch(n){i("afterFlush",n)}}}e=!0}finally{if(e||(s=!1,o._runFlush({finishSynchronously:n.finishSynchronously,throwFirstError:!1})),p=!1,s=!1,c.length||d.length){if(n.finishSynchronously)throw new Error("still have more to do?");setTimeout(h,10)}}},o.autorun=f
!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,n=Package.meteor.meteorEnv,t=Package.modules.meteorInstall,a=Package.modules.Buffer,o=Package.modules.process,i=Package.promise.Promise,l,u=t({node_modules:{meteor:{"babel-runtime":{"babel-runtime.js":["meteor-babel-helpers","babel-runtime/regenerator",function(e,r){r.meteorBabelHelpers=e("meteor-babel-helpers"),r.checkHelper=function e(r){return!1};try{var n=e("babel-runtime/regenerator")}catch(e){throw new Error(["The babel-runtime npm package could not be found in your node_modules ","directory. Please run the following command to install it:",""," meteor npm install --save babel-runtime",""].join("\n"))}if(n&&"function"==typeof i&&"function"==typeof i.asyncApply){var t=n.async;n.async=function(){return i.asyncApply(t,n,arguments)}}}],node_modules:{"meteor-babel-helpers":{"package.json":function(e,r){r.name="meteor-babel-helpers",r.version="0.0.3",r.main="index.js"},"index.js":function(e,r,n){function t(){var e={},r="t";try{Object.defineProperty(e,r,{enumerable:!1,value:e});for(var n in e)if(n===r)return!1}catch(e){return!1}return e[r]===e}function a(e){return e}function o(e){if(Array.isArray(e)){for(var r={},n=Object.keys(e),t=n.length,a=0;a<t;++a){var o=n[a];r[o]=e[o]}return r}return e}l=n.exports={sanitizeForInObject:t()?a:o,_sanitizeForInObjectHard:o}}}}}}}},{extensions:[".js",".json"]}),c=u("./node_modules/meteor/babel-runtime/babel-runtime.js");"undefined"==typeof Package&&(Package={}),function(e,r){for(var n in r)n in e||(e[n]=r[n])}(Package["babel-runtime"]=c,{meteorBabelHelpers:l})}();
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,r=Package.meteor.meteorEnv,t=Package.underscore._,o=Package.modules.meteorInstall,a=Package.modules.Buffer,i=Package.modules.process,d=Package["ecmascript-runtime"].Symbol,u=Package["ecmascript-runtime"].Map,c=Package["ecmascript-runtime"].Set,s=Package["babel-runtime"].meteorBabelHelpers,f=Package.promise.Promise,m,p=o({node_modules:{meteor:{random:{"random.js":function(n){function r(){return new d(d.Type.ALEA,{seeds:[new Date,u,c,s,Math.random()]})}if(e.isServer)var t=Npm.require("crypto");var o=function e(){function n(){var e=4022871197,n=function n(r){r=r.toString();for(var t=0;t<r.length;t++){e+=r.charCodeAt(t);var o=.02519603282416938*e;e=o>>>0,o-=e,o*=e,e=o>>>0,o-=e,e+=4294967296*o}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}return function(e){var r=0,t=0,o=0,a=1;0==e.length&&(e=[+new Date]);var i=n();r=i(" "),t=i(" "),o=i(" ");for(var d=0;d<e.length;d++)r-=i(e[d]),r<0&&(r+=1),t-=i(e[d]),t<0&&(t+=1),o-=i(e[d]),o<0&&(o+=1);i=null;var u=function e(){var n=2091639*r+2.3283064365386963e-10*a;return r=t,t=o,o=n-(a=0|n)};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=e,u}(Array.prototype.slice.call(arguments))},a="23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz",i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",d=function e(n,r){var t=this;if(t.type=n,!e.Type[n])throw new Error("Unknown random generator type: "+n);if(n===e.Type.ALEA){if(!r.seeds)throw new Error("No seeds were provided for Alea PRNG");t.alea=o.apply(null,r.seeds)}};d.Type={NODE_CRYPTO:"NODE_CRYPTO",BROWSER_CRYPTO:"BROWSER_CRYPTO",ALEA:"ALEA"},d.prototype.fraction=function(){var e=this;if(e.type===d.Type.ALEA)return e.alea();if(e.type===d.Type.NODE_CRYPTO){var n=parseInt(e.hexString(8),16);return 2.3283064365386963e-10*n}if(e.type===d.Type.BROWSER_CRYPTO){var r=new Uint32Array(1);return window.crypto.getRandomValues(r),2.3283064365386963e-10*r[0]}throw new Error("Unknown random generator type: "+e.type)},d.prototype.hexString=function(e){var n=this;if(n.type===d.Type.NODE_CRYPTO){var r=Math.ceil(e/2),o;try{o=t.randomBytes(r)}catch(e){o=t.pseudoRandomBytes(r)}var a=o.toString("hex");return a.substring(0,e)}return this._randomString(e,"0123456789abcdef")},d.prototype._randomString=function(e,n){for(var r=this,t=[],o=0;o<e;o++)t[o]=r.choice(n);return t.join("")},d.prototype.id=function(e){var n=this;return void 0===e&&(e=17),n._randomString(e,a)},d.prototype.secret=function(e){var n=this;return void 0===e&&(e=43),n._randomString(e,i)},d.prototype.choice=function(e){var n=Math.floor(this.fraction()*e.length);return"string"==typeof e?e.substr(n,1):e[n]};var u="undefined"!=typeof window&&window.innerHeight||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientHeight||"undefined"!=typeof document&&document.body&&document.body.clientHeight||1,c="undefined"!=typeof window&&window.innerWidth||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientWidth||"undefined"!=typeof document&&document.body&&document.body.clientWidth||1,s="undefined"!=typeof navigator&&navigator.userAgent||"";m=e.isServer?new d(d.Type.NODE_CRYPTO):"undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?new d(d.Type.BROWSER_CRYPTO):r(),m.createWithSeeds=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];if(0===n.length)throw new Error("No seeds were provided");return new d(d.Type.ALEA,{seeds:n})},m.insecure=r()},"deprecated.js":function(){e.uuid=function(){for(var e="0123456789abcdef",n=[],r=0;r<36;r++)n[r]=m.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 t=n.join("");return t}}}}}},{extensions:[".js",".json"]});p("./node_modules/meteor/random/random.js"),p("./node_modules/meteor/random/deprecated.js"),"undefined"==typeof Package&&(Package={}),function(e,n){for(var r in n)r in e||(e[r]=n[r])}(Package.random={},{Random:m})}()
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,o=Package.ejson.EJSON,n=Package["id-map"].IdMap,i=Package.random.Random,a;(function(){a={},a._looksLikeObjectID=function(t){return 24===t.length&&t.match(/^[0-9a-f]*$/)},a.ObjectID=function(t){var e=this;if(t){if(t=t.toLowerCase(),!a._looksLikeObjectID(t))throw new Error("Invalid hexadecimal string for creating an ObjectID");e._str=t}else e._str=i.hexString(24)},a.ObjectID.prototype.toString=function(){var t=this;return'ObjectID("'+t._str+'")'},a.ObjectID.prototype.equals=function(t){var e=this;return t instanceof a.ObjectID&&e.valueOf()===t.valueOf()},a.ObjectID.prototype.clone=function(){var t=this;return new a.ObjectID(t._str)},a.ObjectID.prototype.typeName=function(){return"oid"},a.ObjectID.prototype.getTimestamp=function(){var t=this;return parseInt(t._str.substr(0,8),16)},a.ObjectID.prototype.valueOf=a.ObjectID.prototype.toJSONValue=a.ObjectID.prototype.toHexString=function(){return this._str},o.addType("oid",function(t){return new a.ObjectID(t)}),a.idStringify=function(t){if(t instanceof a.ObjectID)return t.valueOf();if("string"==typeof t)return""===t?t:"-"===t.substr(0,1)||"~"===t.substr(0,1)||a._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)},a.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)):a._looksLikeObjectID(t)?new a.ObjectID(t):t}}).call(this),"undefined"==typeof Package&&(Package={}),function(t,e){for(var r in e)r in t||(t[r]=e[r])}(Package["mongo-id"]={},{MongoID:a})}();
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,d=Package.meteor.meteorEnv,i=Package.underscore._,a=Package.ejson.EJSON,r;(function(){r={},r.diffQueryChanges=function(e,n,d,i,a){e?r.diffQueryOrderedChanges(n,d,i,a):r.diffQueryUnorderedChanges(n,d,i,a)},r.diffQueryUnorderedChanges=function(e,n,d,o){o=o||{};var f=o.projectionFn||a.clone;if(d.movedBefore)throw new Error("_diffQueryUnordered called with a movedBefore observer!");n.forEach(function(n,o){var t=e.get(o);if(t){if(d.changed&&!a.equals(t,n)){var c=f(n),u=f(t),h=r.makeChangedFields(c,u);i.isEmpty(h)||d.changed(o,h)}}else if(d.added){var l=f(n);delete l._id,d.added(n._id,l)}}),d.removed&&e.forEach(function(e,i){n.has(i)||d.removed(i)})},r.diffQueryOrderedChanges=function(n,d,o,f){f=f||{};var t=f.projectionFn||a.clone,c={};i.each(d,function(n){c[n._id]&&e._debug("Duplicate _id in new_results"),c[n._id]=!0});var u={};i.each(n,function(n,d){n._id in u&&e._debug("Duplicate _id in old_results"),u[n._id]=d});for(var h=[],l=0,s=d.length,g=new Array(s),v=new Array(s),_=function(e){return u[d[e]._id]},m=0;m<s;m++)if(void 0!==u[d[m]._id]){for(var y=l;y>0&&!(_(g[y-1])<_(m));)y--;v[m]=0===y?-1:g[y-1],g[y]=m,y+1>l&&(l=y+1)}for(var k=0===l?-1:g[l-1];k>=0;)h.push(k),k=v[k];h.reverse(),h.push(d.length),i.each(n,function(e){c[e._id]||o.removed&&o.removed(e._id)});var p=0;i.each(h,function(e){for(var a=d[e]?d[e]._id:null,f,c,h,l,s,g=p;g<e;g++)c=d[g],i.has(u,c._id)?(f=n[u[c._id]],l=t(c),s=t(f),h=r.makeChangedFields(l,s),i.isEmpty(h)||o.changed&&o.changed(c._id,h),o.movedBefore&&o.movedBefore(c._id,a)):(h=t(c),delete h._id,o.addedBefore&&o.addedBefore(c._id,h,a),o.added&&o.added(c._id,h));a&&(c=d[e],f=n[u[c._id]],l=t(c),s=t(f),h=r.makeChangedFields(l,s),i.isEmpty(h)||o.changed&&o.changed(c._id,h)),p=e+1})},r.diffObjects=function(e,n,d){i.each(e,function(e,a){i.has(n,a)?d.both&&d.both(a,e,n[a]):d.leftOnly&&d.leftOnly(a,e)}),d.rightOnly&&i.each(n,function(n,a){i.has(e,a)||d.rightOnly(a,n)})},r.makeChangedFields=function(e,n){var d={};return r.diffObjects(n,e,{leftOnly:function(e,n){d[e]=void 0},rightOnly:function(e,n){d[e]=n},both:function(e,n,i){a.equals(n,i)||(d[e]=i)}}),d},r.applyChanges=function(e,n){i.each(n,function(n,d){void 0===n?delete e[d]:e[d]=n})}}).call(this),"undefined"==typeof Package&&(Package={}),function(e,n){for(var d in n)d in e||(e[d]=n[d])}(Package["diff-sequence"]={},{DiffSequence:r})}();
!function(){var n=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,e=Package.modules.meteorInstall,a=Package.modules.Buffer,r=Package.modules.process,i,s=e({node_modules:{meteor:{"geojson-utils":{"main.js":["./geojson-utils.js",function(n,t){t.GeoJSON=n("./geojson-utils.js")}],"geojson-utils.js":function(n,t,o){!function(){function n(n){for(var t=[],o=[],e=0;e<n[0].length;e++)t.push(n[0][e][1]),o.push(n[0][e][0]);return t=t.sort(function(n,t){return n-t}),o=o.sort(function(n,t){return n-t}),[[t[0],o[0]],[t[t.length-1],o[o.length-1]]]}function t(n,t,o){for(var e=[[0,0]],a=0;a<o.length;a++){for(var r=0;r<o[a].length;r++)e.push(o[a][r]);e.push([0,0])}for(var i=!1,a=0,r=e.length-1;a<e.length;r=a++)e[a][0]>t!=e[r][0]>t&&n<(e[r][1]-e[a][1])*(t-e[a][0])/(e[r][0]-e[a][0])+e[a][1]&&(i=!i);return i}var e={};"undefined"!=typeof o&&o.exports&&(o.exports=e),e.lineStringsIntersect=function(n,t){for(var o=[],e=0;e<=n.coordinates.length-2;++e)for(var a=0;a<=t.coordinates.length-2;++a){var r={x:n.coordinates[e][1],y:n.coordinates[e][0]},i={x:n.coordinates[e+1][1],y:n.coordinates[e+1][0]},s={x:t.coordinates[a][1],y:t.coordinates[a][0]},c={x:t.coordinates[a+1][1],y:t.coordinates[a+1][0]},u=(c.x-s.x)*(r.y-s.y)-(c.y-s.y)*(r.x-s.x),h=(i.x-r.x)*(r.y-s.y)-(i.y-r.y)*(r.x-s.x),d=(c.y-s.y)*(i.x-r.x)-(c.x-s.x)*(i.y-r.y);if(0!=d){var l=u/d,g=h/d;0<=l&&l<=1&&0<=g&&g<=1&&o.push({type:"Point",coordinates:[r.x+l*(i.x-r.x),r.y+l*(i.y-r.y)]})}}return 0==o.length&&(o=!1),o},e.pointInBoundingBox=function(n,t){return!(n.coordinates[1]<t[0][0]||n.coordinates[1]>t[1][0]||n.coordinates[0]<t[0][1]||n.coordinates[0]>t[1][1])},e.pointInPolygon=function(o,a){for(var r="Polygon"==a.type?[a.coordinates]:a.coordinates,i=!1,s=0;s<r.length;s++)e.pointInBoundingBox(o,n(r[s]))&&(i=!0);if(!i)return!1;for(var c=!1,s=0;s<r.length;s++)t(o.coordinates[1],o.coordinates[0],r[s])&&(c=!0);return c},e.numberToRadius=function(n){return n*Math.PI/180},e.numberToDegree=function(n){return 180*n/Math.PI},e.drawCircle=function(n,t,o){for(var a=[t.coordinates[1],t.coordinates[0]],r=n/1e3/6371,i=[e.numberToRadius(a[0]),e.numberToRadius(a[1])],o=o||15,s=[[a[0],a[1]]],c=0;c<o;c++){var u=2*Math.PI*c/o,h=Math.asin(Math.sin(i[0])*Math.cos(r)+Math.cos(i[0])*Math.sin(r)*Math.cos(u)),d=i[1]+Math.atan2(Math.sin(u)*Math.sin(r)*Math.cos(i[0]),Math.cos(r)-Math.sin(i[0])*Math.sin(h));s[c]=[],s[c][1]=e.numberToDegree(h),s[c][0]=e.numberToDegree(d)}return{type:"Polygon",coordinates:[s]}},e.rectangleCentroid=function(n){var t=n.coordinates[0],o=t[0][0],e=t[0][1],a=t[2][0],r=t[2][1],i=a-o,s=r-e;return{type:"Point",coordinates:[o+i/2,e+s/2]}},e.pointDistance=function(n,t){var o=n.coordinates[0],a=n.coordinates[1],r=t.coordinates[0],i=t.coordinates[1],s=e.numberToRadius(i-a),c=e.numberToRadius(r-o),u=Math.pow(Math.sin(s/2),2)+Math.cos(e.numberToRadius(a))*Math.cos(e.numberToRadius(i))*Math.pow(Math.sin(c/2),2),h=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*h*1e3},e.geometryWithinRadius=function(n,t,o){if("Point"==n.type)return e.pointDistance(n,t)<=o;if("LineString"==n.type||"Polygon"==n.type){var a={},r;r="Polygon"==n.type?n.coordinates[0]:n.coordinates;for(var i in r)if(a.coordinates=r[i],e.pointDistance(a,t)>o)return!1}return!0},e.area=function(n){for(var t=0,o=n.coordinates[0],e=o.length-1,a,r,i=0;i<o.length;e=i++){var a={x:o[i][1],y:o[i][0]},r={x:o[e][1],y:o[e][0]};t+=a.x*r.y,t-=a.y*r.x}return t/=2},e.centroid=function(n){for(var t,o=0,a=0,r=n.coordinates[0],i=r.length-1,s,c,u=0;u<r.length;i=u++){var s={x:r[u][1],y:r[u][0]},c={x:r[i][1],y:r[i][0]};t=s.x*c.y-c.x*s.y,o+=(s.x+c.x)*t,a+=(s.y+c.y)*t}return t=6*e.area(n),{type:"Point",coordinates:[a/t,o/t]}},e.simplify=function(n,t){t=t||20,n=n.map(function(n){return{lng:n.coordinates[0],lat:n.coordinates[1]}});var o,e,a,r,i,s,c,u,h,d,l,g,f,y,M,x,m,p,P,v=Math.PI/180*.5,b=new Array,T=new Array,j=new Array;if(n.length<3)return n;for(o=n.length,d=360*t/(2*Math.PI*6378137),d*=d,a=0,T[0]=0,j[0]=o-1,e=1;e>0;)if(r=T[e-1],i=j[e-1],e--,i-r>1){for(l=n[i].lng()-n[r].lng(),g=n[i].lat()-n[r].lat(),Math.abs(l)>180&&(l=360-Math.abs(l)),l*=M
!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,t=Package.meteor.meteorEnv,n=Package.underscore._,o=Package.ejson.EJSON,i=Package["id-map"].IdMap,a=Package["ordered-dict"].OrderedDict,s=Package.tracker.Tracker,c=Package.tracker.Deps,u=Package["mongo-id"].MongoID,d=Package.random.Random,f=Package["diff-sequence"].DiffSequence,l=Package["geojson-utils"].GeoJSON,h,p,v,_,m,y,g,w,$,b,E,I,C,O,k,S;(function(){h=function(r){var t=this;t.name=r,t._docs=new h._IdMap,t._observeQueue=new e._SynchronousQueue,t.next_qid=1,t.queries={},t._savedOriginals=null,t.paused=!1},p={},v={},_=function(e){var r=new Error(e);return r.name="MinimongoError",r},h.prototype.find=function(e,r){return 0===arguments.length&&(e={}),new h.Cursor(this,e,r)},h.Cursor=function(e,r,t){var n=this;t||(t={}),n.collection=e,n.sorter=null,n.matcher=new p.Matcher(r),h._selectorIsId(r)?n._selectorId=r:h._selectorIsIdPerhapsAsObject(r)?n._selectorId=r._id:(n._selectorId=void 0,(n.matcher.hasGeoQuery()||t.sort)&&(n.sorter=new p.Sorter(t.sort||[],{matcher:n.matcher}))),n.skip=t.skip,n.limit=t.limit,n.fields=t.fields,n._projectionFn=h._compileProjection(n.fields||{}),n._transform=h.wrapTransform(t.transform),"undefined"!=typeof s&&(n.reactive=void 0===t.reactive||t.reactive)},h.Cursor.prototype.rewind=function(){},h.prototype.findOne=function(e,r){return 0===arguments.length&&(e={}),r=r||{},r.limit=1,this.find(e,r).fetch()[0]},h.Cursor.prototype.forEach=function(e,r){var t=this,o=t._getRawObjects({ordered:!0});t.reactive&&t._depend({addedBefore:!0,removed:!0,changed:!0,movedBefore:!0}),n.each(o,function(n,o){n=t._projectionFn(n),t._transform&&(n=t._transform(n)),e.call(r,n,o,t)})},h.Cursor.prototype.getTransform=function(){return this._transform},h.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},h.Cursor.prototype.fetch=function(){var e=this,r=[];return e.forEach(function(e){r.push(e)}),r},h.Cursor.prototype.count=function(){var e=this;return e.reactive&&e._depend({added:!0,removed:!0},!0),e._getRawObjects({ordered:!0}).length},h.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)},h.Cursor.prototype._getCollectionName=function(){var e=this;return e.collection.name},h._observeChangesCallbacksAreOrdered=function(e){if(e.added&&e.addedBefore)throw new Error("Please specify only one of added() and addedBefore()");return!(!e.addedBefore&&!e.movedBefore)},h._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)},h.ObserveHandle=function(){},n.extend(h.Cursor.prototype,{observe:function(e){var r=this;return h._observeFromObserveChanges(r,e)},observeChanges:function(e){var r=this,t=h._observeChangesCallbacksAreOrdered(e);if(!e._allow_unordered&&!t&&(r.skip||r.limit))throw new Error("must use ordered observe (ie, 'addedBefore' instead of 'added') with skip or limit");if(r.fields&&(0===r.fields._id||r.fields._id===!1))throw Error("You may not observe a cursor with {fields: {_id: 0}}");var i={dirty:!1,matcher:r.matcher,sorter:t&&r.sorter,distances:r.matcher.hasGeoQuery()&&t&&new h._IdMap,resultsSnapshot:null,ordered:t,cursor:r,projectionFn:r._projectionFn},a;r.reactive&&(a=r.collection.next_qid++,r.collection.queries[a]=i),i.results=r._getRawObjects({ordered:t,distances:i.distances}),r.collection.paused&&(i.resultsSnapshot=t?[]:new h._IdMap);var c=function(e){return e?function(){var t=this,n=arguments;r.collection.paused||r.collection._observeQueue.queueTask(function(){e.apply(t,n)})}:function(){}};if(i.ad
if(!(n instanceof Array))throw _("$each must be an array");var o=void 0;if("$position"in t){if("number"!=typeof t.$position)throw _("$position must be a numeric value");if(t.$position<0)throw _("$position in $push must be zero or positive");o=t.$position}var i=void 0;if("$slice"in t){if("number"!=typeof t.$slice)throw _("$slice must be a numeric value");if(t.$slice>0)throw _("$slice in $push must be zero or negative");i=t.$slice}var a=void 0;if(t.$sort){if(void 0===i)throw _("$sort requires $slice to be present");a=new p.Sorter(t.$sort).getComparator();for(var s=0;s<n.length;s++)if(3!==h._f._type(n[s]))throw _("$push like modifiers using $sort require all elements to be objects")}if(void 0===o)for(var c=0;c<n.length;c++)e[r].push(n[c]);else{for(var u=[o,0],c=0;c<n.length;c++)u.push(n[c]);Array.prototype.splice.apply(e[r],u)}a&&e[r].sort(a),void 0!==i&&(0===i?e[r]=[]:e[r]=e[r].slice(i))},$pushAll:function(e,r,t){if(!("object"==typeof t&&t instanceof Array))throw _("Modifier $pushAll/pullAll allowed for arrays only");var n=e[r];if(void 0===n)e[r]=t;else{if(!(n instanceof Array))throw _("Cannot apply $pushAll modifier to non-array");for(var o=0;o<t.length;o++)n.push(t[o])}},$addToSet:function(e,r,t){var o=!1;if("object"==typeof t)for(var i in t){"$each"===i&&(o=!0);break}var a=o?t.$each:[t],s=e[r];if(void 0===s)e[r]=a;else{if(!(s instanceof Array))throw _("Cannot apply $addToSet modifier to non-array");n.each(a,function(e){for(var r=0;r<s.length;r++)if(h._f._equal(e,s[r]))return;s.push(e)})}},$pop:function(e,r,t){if(void 0!==e){var n=e[r];if(void 0!==n){if(!(n instanceof Array))throw _("Cannot apply $pop modifier to non-array");"number"==typeof t&&t<0?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 _("Cannot apply $pull/pullAll modifier to non-array");var o=[];if(null==t||"object"!=typeof t||t instanceof Array)for(var i=0;i<n.length;i++)h._f._equal(n[i],t)||o.push(n[i]);else for(var a=new p.Matcher(t),i=0;i<n.length;i++)a.documentMatches(n[i]).result||o.push(n[i]);e[r]=o}}},$pullAll:function(e,r,t){if(!("object"==typeof t&&t instanceof Array))throw _("Modifier $pushAll/pullAll allowed for arrays only");if(void 0!==e){var n=e[r];if(void 0!==n){if(!(n instanceof Array))throw _("Cannot apply $pull/pullAll modifier to non-array");for(var o=[],i=0;i<n.length;i++){for(var a=!1,s=0;s<t.length;s++)if(h._f._equal(n[i],t[s])){a=!0;break}a||o.push(n[i])}e[r]=o}}},$rename:function(r,t,n,o,i){if(o===n)throw _("$rename source must differ from target");if(null===r)throw _("$rename source field invalid");if("string"!=typeof n)throw _("$rename target must be a string");if(void 0!==r){var a=r[t];delete r[t];var s=n.split("."),c=e(i,s,{forbidArray:!0});if(null===c)throw _("$rename target field invalid");var u=s.pop();c[u]=a}},$bit:function(e,r,t){throw _("$bit is not supported")}}}.call(this),function(){h._diffQueryChanges=function(e,r,t,n,o){return f.diffQueryChanges(e,r,t,n,o)},h._diffQueryUnorderedChanges=function(e,r,t,n){return f.diffQueryUnorderedChanges(e,r,t,n)},h._diffQueryOrderedChanges=function(e,r,t,n){return f.diffQueryOrderedChanges(e,r,t,n)},h._diffObjects=function(e,r,t){return f.diffObjects(e,r,t)}}.call(this),function(){h._IdMap=function(){var e=this;i.call(e,u.idStringify,u.idParse)},e._inherits(h._IdMap,i)}.call(this),function(){h._CachingChangeObserver=function(e){var r=this;e=e||{};var t=e.callbacks&&h._observeChangesCallbacksAreOrdered(e.callbacks);if(n.has(e,"ordered")){if(r.ordered=e.ordered,e.callbacks&&e.ordered!==t)throw Error("ordered option doesn't match callbacks")}else{if(!e.callbacks)throw Error("must provide ordered or callbacks");r.ordered=t}var i=e.callbacks||{};r.ordered?(r.docs=new a(u.idStringify),r.applyChange={addedBefore:function(e,t,n){var a=o.clone(t);a._id=e,i.addedBefore&&i.addedBefore.call(r,e,t,n),i.added&&i.added.call(r,e,t),r.docs.putBefore(e,a,n||null)},movedBefore:function(e,t){var n=r.docs.get(e);i.movedBefore&&i.movedBefore.call(r,e,t),r.docs.moveBefore(e,t||null)}}):(r.docs=new h._IdMap,r.applyChange={added:function(e
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.modules.meteorInstall,a=Package.modules.Buffer,i=Package.modules.process,o=Package.underscore._,c=Package.ejson.EJSON,s,u,f=r({node_modules:{meteor:{check:{"match.js":["./isPlainObject.js",function(t,n){var r=new e.EnvironmentVariable,a=t("./isPlainObject.js").isPlainObject,i=n.check=function(e,t){var n=r.getOrNullIfOutsideFiber();n&&n.checking(e);var a=y(e,t);if(a){var i=new s.Error(a.message);throw a.path&&(i.message+=" in field "+a.path,i.path=a.path),i}},s=n.Match={Optional:function(e){return new u(e)},Maybe:function(e){return new f(e)},OneOf:function(){return new l(o.toArray(arguments))},Any:["__any__"],Where:function(e){return new h(e)},ObjectIncluding:function(e){return new p(e)},ObjectWithValues:function(e){return new g(e)},Integer:["__integer__"],Error:e.makeErrorType("Match.Error",function(t){this.message="Match error: "+t,this.path="",this.sanitizedError=new e.Error(400,"Match failed")}),test:function(e,t){return!y(e,t)},_failIfArgumentsAreNotAllChecked:function(e,t,n,a){var i=new v(n,a),o=r.withValue(i,function(){return e.apply(t,n)});return i.throwUnlessAllArgumentsHaveBeenChecked(),o}},u=function(e){this.pattern=e},f=function(e){this.pattern=e},l=function(e){if(o.isEmpty(e))throw new Error("Must provide at least one choice to Match.OneOf");this.choices=e},h=function(e){this.condition=e},p=function(e){this.pattern=e},g=function(e){this.pattern=e},d=function(e,t){if(t=t||{},null===e)return"null";if(t.onlyShowType)return typeof e;if("object"!=typeof e)return c.stringify(e);try{JSON.stringify(e)}catch(t){if("TypeError"===t.name)return typeof e}return c.stringify(e)},m=[[String,"string"],[Number,"number"],[Boolean,"boolean"],[Function,"function"],[void 0,"undefined"]],y=function(e,t){if(t===s.Any)return!1;for(var n=0;n<m.length;++n)if(t===m[n][0])return typeof e!==m[n][1]&&{message:"Expected "+m[n][1]+", got "+d(e,{onlyShowType:!0}),path:""};if(null===t)return null!==e&&{message:"Expected null, got "+d(e),path:""};if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return e!==t&&{message:"Expected "+t+", got "+d(e),path:""};if(t===s.Integer)return("number"!=typeof e||(0|e)!==e)&&{message:"Expected Integer, got "+d(e),path:""};if(t===Object&&(t=s.ObjectIncluding({})),t instanceof Array){if(1!==t.length)return{message:"Bad pattern: arrays must have one type element"+d(t),path:""};if(!o.isArray(e)&&!o.isArguments(e))return{message:"Expected array, got "+d(e),path:""};for(var n=0,r=e.length;n<r;n++){var i=y(e[n],t[0]);if(i)return i.path=k(n,i.path),i}return!1}if(t instanceof h){var i;try{i=t.condition(e)}catch(e){if(!(e instanceof s.Error))throw e;return{message:e.message,path:e.path}}return!i&&{message:"Failed Match.Where validation",path:""}}if(t instanceof f?t=s.OneOf(void 0,null,t.pattern):t instanceof u&&(t=s.OneOf(void 0,t.pattern)),t instanceof l){for(var n=0;n<t.choices.length;++n){var i=y(e,t.choices[n]);if(!i)return!1}return{message:"Failed Match.OneOf, Match.Maybe or Match.Optional validation",path:""}}if(t instanceof Function)return!(e instanceof t)&&{message:"Expected "+(t.name||"particular constructor"),path:""};var c=!1,v;if(t instanceof p&&(c=!0,t=t.pattern),t instanceof g&&(c=!0,v=[t.pattern],t={}),"object"!=typeof t)return{message:"Bad pattern: unknown pattern type",path:""};if("object"!=typeof e)return{message:"Expected object, got "+typeof e,path:""};if(null===e)return{message:"Expected object, got null",path:""};if(!a(e))return{message:"Expected plain object",path:""};var b={},w={};o.each(t,function(e,t){e instanceof u||e instanceof f?w[t]=e.pattern:b[t]=e});for(var O=function(e){var t=[];if(o.isObject(e))for(var n in e)t.push(n);return t},j=O(e),n=0,r=j.length;n<r;n++){var E=j[n],P=e[E];if(o.has(b,E)){var i=y(P,b[E]);if(i)return i.path=k(E,i.path),i;delete b[E]}else if(o.has(w,E)){var i=y(P,w[E]);if(i)return i.path=k(E,i.path),i}else{if(!c)return{message:"Unknown key",path:E};if(v){var i=y(P,v[0]);if(i)return i.path=k(E,i.path),i}}}var j=o.keys(b);return j.length?{message:"Missing ke
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.underscore._,i=Package.random.Random,a;(function(){a=function(e){var t=this;n.extend(t,n.defaults(n.clone(e||{}),{baseTimeout:1e3,exponent:2.2,maxTimeout:3e5,minTimeout:10,minCount:2,fuzz:.5})),t.retryTimer=null},n.extend(a.prototype,{clear:function(){var e=this;e.retryTimer&&clearTimeout(e.retryTimer),e.retryTimer=null},_timeout:function(e){var t=this;if(e<t.minCount)return t.minTimeout;var r=Math.min(t.maxTimeout,t.baseTimeout*Math.pow(t.exponent,e));return r*=i.fraction()*t.fuzz+(1-t.fuzz/2)},retryLater:function(t,r){var n=this,i=n._timeout(t);return n.retryTimer&&clearTimeout(n.retryTimer),n.retryTimer=e.setTimeout(r,i),i}})}).call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var r in t)r in e||(e[r]=t[r])}(Package.retry={},{Retry:a})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,a=Package.meteor.meteorEnv,n=Package.check.check,r=Package.check.Match,i=Package.random.Random,o=Package.ejson.EJSON,c=Package.underscore._,s=Package.tracker.Tracker,l=Package.tracker.Deps,u=Package.retry.Retry,d;(function(){d={}}).call(this),function(){d.Heartbeat=function(e){var t=this;t.heartbeatInterval=e.heartbeatInterval,t.heartbeatTimeout=e.heartbeatTimeout,t._sendPing=e.sendPing,t._onTimeout=e.onTimeout,t._seenPacket=!1,t._heartbeatIntervalHandle=null,t._heartbeatTimeoutHandle=null},c.extend(d.Heartbeat.prototype,{stop:function(){var e=this;e._clearHeartbeatIntervalTimer(),e._clearHeartbeatTimeoutTimer()},start:function(){var e=this;e.stop(),e._startHeartbeatIntervalTimer()},_startHeartbeatIntervalTimer:function(){var t=this;t._heartbeatIntervalHandle=e.setInterval(c.bind(t._heartbeatIntervalFired,t),t.heartbeatInterval)},_startHeartbeatTimeoutTimer:function(){var t=this;t._heartbeatTimeoutHandle=e.setTimeout(c.bind(t._heartbeatTimeoutFired,t),t.heartbeatTimeout)},_clearHeartbeatIntervalTimer:function(){var t=this;t._heartbeatIntervalHandle&&(e.clearInterval(t._heartbeatIntervalHandle),t._heartbeatIntervalHandle=null)},_clearHeartbeatTimeoutTimer:function(){var t=this;t._heartbeatTimeoutHandle&&(e.clearTimeout(t._heartbeatTimeoutHandle),t._heartbeatTimeoutHandle=null)},_heartbeatIntervalFired:function(){var e=this;e._seenPacket||e._heartbeatTimeoutHandle||(e._sendPing(),e._startHeartbeatTimeoutTimer()),e._seenPacket=!1},_heartbeatTimeoutFired:function(){var e=this;e._heartbeatTimeoutHandle=null,e._onTimeout()},messageReceived:function(){var e=this;e._seenPacket=!0,e._heartbeatTimeoutHandle&&e._clearHeartbeatTimeoutTimer()}})}.call(this),function(){d.SUPPORTED_DDP_VERSIONS=["1","pre2","pre1"],d.parseDDP=function(t){try{var a=JSON.parse(t)}catch(a){return e._debug("Discarding message with invalid JSON",t),null}return null===a||"object"!=typeof a?(e._debug("Discarding non-object DDP message",t),null):(c.has(a,"cleared")&&(c.has(a,"fields")||(a.fields={}),c.each(a.cleared,function(e){a.fields[e]=void 0}),delete a.cleared),c.each(["fields","params","result"],function(e){c.has(a,e)&&(a[e]=o._adjustTypesFromJSONValue(a[e]))}),a)},d.stringifyDDP=function(e){var t=o.clone(e);if(c.has(e,"fields")){var a=[];c.each(e.fields,function(e,n){void 0===e&&(a.push(n),delete t.fields[n])}),c.isEmpty(a)||(t.cleared=a),c.isEmpty(t.fields)&&delete t.fields}if(c.each(["fields","params","result"],function(e){c.has(t,e)&&(t[e]=o._adjustTypesToJSONValue(t[e]))}),e.id&&"string"!=typeof e.id)throw new Error("Message id is not a string");return JSON.stringify(t)}}.call(this),function(){d.MethodInvocation=function(e){var t=this;this.isSimulation=e.isSimulation,this._unblock=e.unblock||function(){},this._calledUnblock=!1,this.userId=e.userId,this._setUserId=e.setUserId||function(){},this.connection=e.connection,this.randomSeed=e.randomSeed,this.randomStream=null},c.extend(d.MethodInvocation.prototype,{unblock:function(){var e=this;e._calledUnblock=!0,e._unblock()},setUserId:function(e){var t=this;if(t._calledUnblock)throw new Error("Can't call setUserId in a method after calling unblock");t.userId=e,t._setUserId(e)}})}.call(this),function(){function e(){return i.hexString(20)}d.RandomStream=function(t){var a=this;this.seed=[].concat(t.seed||e()),this.sequences={}},d.RandomStream.get=function(e,t){if(t||(t="default"),!e)return i.insecure;var a=e.randomStream;return a||(e.randomStream=a=new d.RandomStream({seed:e.randomSeed})),a._sequence(t)},d.makeRpcSeed=function(e,t){var a=d.RandomStream.get(e,"/rpc/"+t);return a.hexString(20)},c.extend(d.RandomStream.prototype,{_sequence:function(e){var t=this,a=t.sequences[e]||null;if(null===a){for(var n=t.seed.concat(e),r=0;r<n.length;r++)c.isFunction(n[r])&&(n[r]=n[r]());t.sequences[e]=a=i.createWithSeeds.apply(null,n)}return a}})}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var a in t)a in e||(e[a]=t[a])}(Package["ddp-common"]={},{DDPCommon:d})}();
!function(){var a=Package.meteor.Meteor,e=Package.meteor.global,t=Package.meteor.meteorEnv,o=Package.underscore._,n=Package["ecmascript-runtime"].Symbol,r=Package["ecmascript-runtime"].Map,i=Package["ecmascript-runtime"].Set,c;(function(){c={};var e="Meteor_Reload",t={},n,r=null;try{r=window.sessionStorage,r?(r.setItem("__dummy__","1"),r.removeItem("__dummy__")):r=null}catch(a){r=null}c._getData=function(){return r&&r.getItem(e)},r&&(n=c._getData(),r.removeItem(e)),n||(n="{}");var i={};try{i=JSON.parse(n),"object"!=typeof i&&(a._debug("Got bad data on reload. Ignoring."),i={})}catch(e){a._debug("Got invalid JSON on reload. Ignoring.")}i.reload&&"object"==typeof i.data&&(t=i.data);var l=[];c._onMigrate=function(a,e){e||(e=a,a=void 0),l.push({name:a,callback:e})},c._migrationData=function(a){return t[a]};var d=function(a,e){a=a||function(){},e=e||{};for(var t={},n=o.clone(l),r=!0;n.length;){var i=n.shift(),c=i.callback(a,e);c[0]||(r=!1),c.length>1&&i.name&&(t[i.name]=c[1])}return r||e.immediateMigration?t:null};c._migrate=function(t,o){var n=d(t,o);if(null===n)return!1;try{var i=JSON.stringify({data:n,reload:!0})}catch(e){throw a._debug("Couldn't serialize data for migration",n),e}if(r)try{r.setItem(e,i)}catch(e){a._debug("Couldn't save data for migration to sessionStorage",e)}else a._debug("Browser does not support sessionStorage. Not saving migration state.");return!0},c._withFreshProvidersForTest=function(a){var e=o.clone(l);l=[];try{a()}finally{l=e}};var g=!1;c._reload=function(a){if(a=a||{},!g){g=!0;var e=function(){o.defer(function(){c._migrate(e,a)&&(window.location.hash||window.location.href.endsWith("#")?window.location.reload():window.location.replace(window.location.href))})};e()}}}).call(this),function(){a._reload={onMigrate:c._onMigrate,migrationData:c._migrationData,reload:c._reload}}.call(this),"undefined"==typeof Package&&(Package={}),function(a,e){for(var t in e)t in a||(a[t]=e[t])}(Package.reload={},{Reload:c})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.check.check,o=Package.check.Match,i=Package.random.Random,s=Package.ejson.EJSON,a=Package.underscore._,u=Package.tracker.Tracker,c=Package.tracker.Deps,d=Package.retry.Retry,l=Package["id-map"].IdMap,f=Package["ddp-common"].DDPCommon,_=Package["diff-sequence"].DiffSequence,p=Package["mongo-id"].MongoID,h,v,m,g,b,y,w;(function(){h={},v={}}).call(this),function(){m=function(){var e=this;l.call(e,p.idStringify,p.idParse)},e._inherits(m,l)}.call(this),function(){g=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];n.arrIndexOf(r,t)===-1&&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 o!==-1?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;r<this._listeners[t].length;r++)this._listeners[t][r].apply(this,n)};var o=function(e,t){if(this.type=e,"undefined"!=typeof t)for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])};o.prototype.toString=function(){var e=[];for(var t in this)if(this.hasOwnProperty(t)){var n=this[t];"function"==typeof n&&(n="[function]"),e.push(t+"="+n)}return"SimpleEvent("+e.join(", ")+")"};var i=function(e){var t=this;t._events=e||[],t._listeners={}};i.prototype.emit=function(e){var t=this;if(t._verifyType(e),!t._nuked){var n=Array.prototype.slice.call(arguments,1);if(t["on"+e]&&t["on"+e].apply(t,n),e in t._listeners)for(var r=0;r<t._listeners[e].length;r++)t._listeners[e][r].apply(t,n)}},i.prototype.on=function(e,t){var n=this;n._verifyType(e),n._nuked||(e in n._listeners||(n._listeners[e]=[]),n._listeners[e].push(t))},i.prototype._verifyType=function(e){var t=this;n.arrIndexOf(t._events,e)===-1&&n.log("Event "+JSON.stringify(e)+" not listed "+JSON.stringify(t._events)+" in "+t)},i.prototype.nuke=function(){var e=this;e._nuked=!0;for(var t=0;t<e._events.length;t++)delete e[e._events[t]];e._listeners={}};var s="abcdefghijklmnopqrstuvwxyz0123456789_";n.random_string=function(e,t){t=t||s.length;var n,r=[];for(n=0;n<e;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&&e<=4999},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 e.indexOf("?")===-1&&e.indexOf("#")===-1},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
},_sockjsProtocolsWhitelist:function(){var e=["xdr-polling","xhr-polling","iframe-xhr-polling","jsonp-polling"],t=navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent)&&/OS 4_|OS 5_/.test(navigator.userAgent);return t||(e=["websocket"].concat(e)),e},_launchConnection:function(){var t=this;t._cleanup();var n=a.extend({protocols_whitelist:t._sockjsProtocolsWhitelist()},t.options._sockjsOptions);t.socket=new g(b(t.rawUrl),(void 0),n),t.socket.onopen=function(e){t._connected()},t.socket.onmessage=function(e){t._heartbeat_received(),t.currentStatus.connected&&a.each(t.eventCallbacks.message,function(t){t(e.data)})},t.socket.onclose=function(){t._lostConnection()},t.socket.onerror=function(){e._debug("stream error",a.toArray(arguments),(new Date).toDateString())},t.socket.onheartbeat=function(){t._heartbeat_received()},t.connectionTimer&&clearTimeout(t.connectionTimer),t.connectionTimer=setTimeout(function(){t._lostConnection(new h.ConnectionError("DDP connection timed out"))},t.CONNECT_TIMEOUT)}})}.call(this),function(){var t=function(e,t){return e.length>=t.length&&e.substring(0,t.length)===t},n=function(e,t){return e.length>=t.length&&e.substring(e.length-t.length)===t},r=function(r,o,s){o||(o="http");var a=r.match(/^ddp(i?)\+sockjs:\/\//),u=r.match(/^http(s?):\/\//),c;if(a){var d=r.substr(a[0].length);c="i"===a[1]?o:o+"s";var l=d.indexOf("/"),f=l===-1?d:d.substr(0,l),_=l===-1?"":d.substr(l);return f=f.replace(/\*/g,function(){return Math.floor(10*i.fraction())}),c+"://"+f+_}if(u){c=u[1]?o+"s":o;var p=r.substr(u[0].length);r=c+"://"+p}return r.indexOf("://")!==-1||t(r,"/")||(r=o+"://"+r),r=e._relativeToSiteRootUrl(r),n(r,"/")?r+s:r+"/"+s};b=function(e){return r(e,"http","sockjs")},y=function(e){var t=r(e,"ws","websocket");return t},v.toSockjsUrl=b,a.extend(v.ClientStream.prototype,{on:function(e,t){var n=this;if("message"!==e&&"reset"!==e&&"disconnect"!==e)throw new Error("unknown event type: "+e);n.eventCallbacks[e]||(n.eventCallbacks[e]=[]),n.eventCallbacks[e].push(t)},_initCommon:function(e){var t=this;e=e||{},t.CONNECT_TIMEOUT=e.connectTimeoutMs||1e4,t.eventCallbacks={},t._forcedToDisconnect=!1,t.currentStatus={status:"connecting",connected:!1,retryCount:0},t.statusListeners="undefined"!=typeof u&&new u.Dependency,t.statusChanged=function(){t.statusListeners&&t.statusListeners.changed()},t._retry=new d,t.connectionTimer=null},reconnect:function(e){var t=this;return e=e||{},e.url&&t._changeUrl(e.url),e._sockjsOptions&&(t.options._sockjsOptions=e._sockjsOptions),t.currentStatus.connected?void((e._force||e.url)&&t._lostConnection(new h.ForcedReconnectError)):("connecting"===t.currentStatus.status&&t._lostConnection(),t._retry.clear(),t.currentStatus.retryCount-=1,void t._retryNow())},disconnect:function(e){var t=this;e=e||{},t._forcedToDisconnect||(e._permanent&&(t._forcedToDisconnect=!0),t._cleanup(),t._retry.clear(),t.currentStatus={status:e._permanent?"failed":"offline",connected:!1,retryCount:0},e._permanent&&e._error&&(t.currentStatus.reason=e._error),t.statusChanged())},_lostConnection:function(e){var t=this;t._cleanup(e),t._retryLater(e)},_online:function(){"offline"!=this.currentStatus.status&&this.reconnect()},_retryLater:function(e){var t=this,n=0;t.options.retry||e&&"DDP.ForcedReconnectError"===e.errorType?(n=t._retry.retryLater(t.currentStatus.retryCount,a.bind(t._retryNow,t)),t.currentStatus.status="waiting",t.currentStatus.retryTime=(new Date).getTime()+n):(t.currentStatus.status="failed",delete t.currentStatus.retryTime),t.currentStatus.connected=!1,t.statusChanged()},_retryNow:function(){var e=this;e._forcedToDisconnect||(e.currentStatus.retryCount+=1,e.currentStatus.status="connecting",e.currentStatus.connected=!1,delete e.currentStatus.retryTime,e.statusChanged(),e._launchConnection())},status:function(){var e=this;return e.statusListeners&&e.statusListeners.depend(),e.currentStatus}}),h.ConnectionError=e.makeErrorType("DDP.ConnectionError",function(e){var t=this;t.message=e}),h.ForcedReconnectError=e.makeErrorType("DDP.ForcedReconnectError",function(){})}.call(this),function(){v.SUPPORTED_DDP_VERSIONS
!function(){var a=Package["ddp-client"].DDP;"undefined"==typeof Package&&(Package={}),function(a,n){for(var e in n)e in a||(a[e]=n[e])}(Package.ddp={},{DDP:a})}();
!function(){"undefined"==typeof Package&&(Package={}),Package["ddp-server"]={}}();
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,r=Package.meteor.meteorEnv,t=Package.underscore._,o=Package.minimongo.LocalCollection,a=Package.minimongo.Minimongo,i=Package.check.check,c=Package.check.Match,l=Package.ejson.EJSON,s=Package["ddp-client"].DDP,d=Package.modules.meteorInstall,u=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,_=Package["ecmascript-runtime"].Map,m=Package["ecmascript-runtime"].Set,v=Package["babel-runtime"].meteorBabelHelpers,p=Package.promise.Promise,w,y=d({node_modules:{meteor:{"allow-deny":{"allow-deny.js":function(){function n(e,n){return e.transform?e.transform(n):n}function r(e,n,r){var t=n;return e.transform&&(t=l.clone(n),null!==r&&(t._id=r),t=e.transform(t)),t}function a(e,n,r){var a=["insert","update","remove","fetch","transform"];if(t.each(t.keys(r),function(e){if(!t.contains(a,e))throw new Error(n+": Invalid key: "+e)}),e._restricted=!0,t.each(["insert","update","remove"],function(t){if(r.hasOwnProperty(t)){if(!(r[t]instanceof Function))throw new Error(n+": Value for `"+t+"` must be a function");void 0===r.transform?r[t].transform=e._transform:r[t].transform=o.wrapTransform(r.transform),e._validators[t][n].push(r[t])}}),r.update||r.remove||r.fetch){if(r.fetch&&!(r.fetch instanceof Array))throw new Error(n+": Value for `fetch` must be an array");e._updateFetch(r.fetch)}}function d(n,r){if(!o._selectorIsIdPerhapsAsObject(n))throw new e.Error(403,"Not permitted. Untrusted code may only "+r+" documents by ID.")}function u(){var e=s._CurrentInvocation.get();return e&&e.isSimulation}w={CollectionPrototype:{}};var f=w.CollectionPrototype;f.allow=function(e){a(this,"allow",e)},f.deny=function(e){a(this,"deny",e)},f._defineMutationMethods=function(n){var r=this;n=n||{},r._restricted=!1,r._insecure=void 0,r._validators={insert:{allow:[],deny:[]},update:{allow:[],deny:[]},remove:{allow:[],deny:[]},upsert:{allow:[],deny:[]},fetch:[],fetchAllFields:!1},r._name&&(r._prefix="/"+r._name+"/",r._connection&&(r._connection===e.server||e.isClient)&&!function(){var o={};t.each(["insert","update","remove"],function(a){var l=r._prefix+a;if(n.useExisting){var s=e.isClient?"_methodHandlers":"method_handlers";if(r._connection[s]&&"function"==typeof r._connection[s][l])return}o[l]=function(){i(arguments,[c.Any]);var n=t.toArray(arguments);try{var o=null;if("insert"!==a||t.has(n[0],"_id")||(o=r._makeNewID()),this.isSimulation)return null!==o&&(n[0]._id=o),r._collection[a].apply(r._collection,n);if("insert"!==a&&d(n[0],a),r._restricted){if(0===r._validators[a].allow.length)throw new e.Error(403,"Access denied. No allow validators set on restricted collection for method '"+a+"'.");var l="_validated"+a.charAt(0).toUpperCase()+a.slice(1);return n.unshift(this.userId),"insert"===a&&n.push(o),r[l].apply(r,n)}if(r._isInsecure())return null!==o&&(n[0]._id=o),r._collection[a].apply(r._collection,n);throw new e.Error(403,"Access denied")}catch(n){throw"MongoError"===n.name||"MinimongoError"===n.name?new e.Error(409,n.toString()):n}}}),r._connection.methods(o)}())},f._updateFetch=function(e){var n=this;n._validators.fetchAllFields||(e?n._validators.fetch=t.union(n._validators.fetch,e):(n._validators.fetchAllFields=!0,n._validators.fetch=null))},f._isInsecure=function(){var e=this;return void 0===e._insecure?!!Package.insecure:e._insecure},f._validatedInsert=function(n,o,a){var i=this;if(t.any(i._validators.insert.deny,function(e){return e(n,r(e,o,a))}))throw new e.Error(403,"Access denied");if(t.all(i._validators.insert.allow,function(e){return!e(n,r(e,o,a))}))throw new e.Error(403,"Access denied");null!==a&&(o._id=a),i._collection.insert.call(i._collection,o)},f._validatedUpdate=function(r,a,c,l){var s=this;if(i(c,Object),l=t.clone(l)||{},!o._selectorIsIdPerhapsAsObject(a))throw new Error("validated update should be of a single ID");if(l.upsert)throw new e.Error(403,"Access denied. Upserts not allowed in a restricted collection.");var d="Access denied. In a restricted collection you can only update documents, not replace them. Use a Mongo update operator, such as
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,o=Package.meteor.meteorEnv,t=Package["allow-deny"].AllowDeny,r=Package.random.Random,i=Package.ejson.EJSON,c=Package.underscore._,l=Package.minimongo.LocalCollection,a=Package.minimongo.Minimongo,s=Package["ddp-client"].DDP,u=Package.tracker.Tracker,d=Package.tracker.Deps,f=Package["diff-sequence"].DiffSequence,_=Package["mongo-id"].MongoID,p=Package.check.check,m=Package.check.Match,g=Package.modules.meteorInstall,v=Package.modules.Buffer,h=Package.modules.process,w=Package["ecmascript-runtime"].Symbol,C=Package["ecmascript-runtime"].Map,y=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,O=Package.promise.Promise,b,I,P=g({node_modules:{meteor:{mongo:{"local_collection_driver.js":function(){b=function e(){var n=this;n.noConnCollections={}};var e=function e(n,o){return n in o||(o[n]=new l(n)),o[n]};c.extend(b.prototype,{open:function(){function n(n,o){var t=this;return n?o?(o._mongo_livedata_collections||(o._mongo_livedata_collections={}),e(n,o._mongo_livedata_collections)):e(n,t.noConnCollections):new l}return n}()}),b=new b},"collection.js":function(n,o,i){function a(e){p(e,RegExp);var n={$regex:e.source},o="";return e.ignoreCase&&(o+="i"),e.multiline&&(o+="m"),o&&(n.$options=o),n}function u(e,n){if(e)return n=n||c.identity,function(o,t){e(o,!o&&n(t))}}function d(e){if(e.length&&(void 0===e[e.length-1]||e[e.length-1]instanceof Function))return e.pop()}I={},I.Collection=function(n,o){var t=this;if(!(t instanceof I.Collection))throw new Error('use "new" to construct a Mongo.Collection');if(n||null===n||(e._debug("Warning: creating anonymous collection. It will not be saved or synchronized over the network. (Pass null for the collection name to turn off this warning.)"),n=null),null!==n&&"string"!=typeof n)throw new Error("First argument to new Mongo.Collection must be a string or null");switch(o&&o.methods&&(o={connection:o}),o&&o.manager&&!o.connection&&(o.connection=o.manager),o=c.extend({connection:void 0,idGeneration:"STRING",transform:null,_driver:void 0,_preventAutopublish:!1},o),o.idGeneration){case"MONGO":t._makeNewID=function(){var e=n?s.randomStream("/collection/"+n):r.insecure;return new I.ObjectID(e.hexString(24))};break;case"STRING":default:t._makeNewID=function(){var e=n?s.randomStream("/collection/"+n):r.insecure;return e.id()}}if(t._transform=l.wrapTransform(o.transform),n&&null!==o.connection?o.connection?t._connection=o.connection:e.isClient?t._connection=e.connection:t._connection=e.server:t._connection=null,o._driver||(n&&t._connection===e.server&&"undefined"!=typeof MongoInternals&&MongoInternals.defaultRemoteCollectionDriver?o._driver=MongoInternals.defaultRemoteCollectionDriver():o._driver=b),t._collection=o._driver.open(n,t._connection),t._name=n,t._driver=o._driver,t._connection&&t._connection.registerStore){var i=t._connection.registerStore(n,{beginUpdate:function(){function e(e,n){(e>1||n)&&t._collection.pauseObservers(),n&&t._collection.remove({})}return e}(),update:function(){function e(e){var n=_.idParse(e.id),o=t._collection.findOne(n);if("replace"===e.msg){var r=e.replace;return void(r?o?t._collection.update(n,r):t._collection.insert(r):o&&t._collection.remove(n))}if("added"===e.msg){if(o)throw new Error("Expected not to find a document already present for an add");t._collection.insert(c.extend({_id:n},e.fields))}else if("removed"===e.msg){if(!o)throw new Error("Expected to find a document already present for removed");t._collection.remove(n)}else{if("changed"!==e.msg)throw new Error("I don't know how to deal with this message");if(!o)throw new Error("Expected to find a document to change");if(!c.isEmpty(e.fields)){var i={};c.each(e.fields,function(e,n){void 0===e?(i.$unset||(i.$unset={}),i.$unset[n]=1):(i.$set||(i.$set={}),i.$set[n]=e)}),t._collection.update(n,i)}}}return e}(),endUpdate:function(){function e(){t._collection.resumeObservers()}return e}(),saveOriginals:function(){function e(){t._collection.saveOriginals()}return e}(),retrieveOriginals:function(){function e(){return t._collection.r
!function(){"undefined"==typeof Package&&(Package={}),Package["blaze-html-templates"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.tracker.Tracker,r=Package.tracker.Deps,i;(function(){i=function(e,t){return this instanceof i?(this.curValue=e,this.equalsFunc=t,void(this.dep=new a.Dependency)):new i(e,t)},i._isEqual=function(e,t){var n=e,a=t;return n===a&&(!n||"number"==typeof n||"boolean"==typeof n||"string"==typeof n)},i.prototype.get=function(){return a.active&&this.dep.depend(),this.curValue},i.prototype.set=function(e){var t=this.curValue;(this.equalsFunc||i._isEqual)(t,e)||(this.curValue=e,this.dep.changed())},i.prototype.toString=function(){return"ReactiveVar{"+this.get()+"}"},i.prototype._numListeners=function(){var e=0;for(var t in this.dep._dependentsById)e++;return e}}).call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["reactive-var"]={},{ReactiveVar:i})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.modules.meteorInstall,i=Package.modules.Buffer,o=Package.modules.process,a,s,l=r({node_modules:{meteor:{jquery:{"main.js":["jquery","./jquery.js",function(e,t){var n=this;try{var r=e("jquery")}catch(t){r=e("./jquery.js")}t.$=t.jQuery=r,n.$=n.$||r,n.jQuery=n.jQuery||r}],"jquery.js":function(e,t,n){!function(e,t){"object"==typeof n&&"object"==typeof n.exports?n.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ie.type(e);return"function"!==n&&!ie.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function r(e,t,n){if(ie.isFunction(t))return ie.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ie.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(de.test(t))return ie.filter(t,e,n);t=ie.filter(t,e)}return ie.grep(e,function(e){return ie.inArray(e,t)>=0!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=xe[e]={};return ie.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function a(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(he.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(a(),ie.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Ee,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ne.test(n)?ie.parseJSON(n):n)}catch(e){}ie.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!ie.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(ie.acceptData(e)){var i,o,a=ie.expando,s=e.nodeType,l=s?ie.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=Q.pop()||ie.guid++:a),l[u]||(l[u]=s?{}:{toJSON:ie.noop}),"object"!=typeof t&&"function"!=typeof t||(r?l[u]=ie.extend(l[u],t):l[u].data=ie.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ie.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[ie.camelCase(t)])):i=o,i}}function f(e,t,n){if(ie.acceptData(e)){var r,i,o=e.nodeType,a=o?ie.cache:e,s=o?e[ie.expando]:ie.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){ie.isArray(t)?t=t.concat(ie.map(t,ie.camelCase)):t in r?t=[t]:(t=ie.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!ie.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?ie.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function d(){return!0}function p(){return!1}function h(){try{return he.activeElement}catch(e){}}function m(e){var t=Fe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==Te?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Te?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ie.nodeName(r,t)?o.push(r):ie.merge(o,g(r,t));return void 0===t||t&&ie.nodeName(e,t)?ie.merge([e],o):o}function y(e){De.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==ie.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,r=0;null!=(n=e[r]);r++)ie._data(n,"globalEval",!t||ie._data(t[r],"globalEval"))}function T(e,t){if(1===t.nodeType&&ie.hasData(e)){var n,r,i,o=ie._data(e),a=ie._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r<i;r++)ie.event.ad
T.setFilters=new f,E=t.tokenize=function(e,n){var r,i,o,a,s,l,u,c=I[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=T.preFilter;s;){r&&!(i=ue.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ce.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(le," ")}),s=s.slice(r.length));for(a in T.filter)!(i=he[a].exec(s))||u[a]&&!(i=u[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):I(e,l).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=E(e)),n=t.length;n--;)o=v(t[n]),o[B]?r.push(o):i.push(o);o=X(e,b(i,r)),o.selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,f=!r&&E(e=u.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(we,Te),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((l=T.find[s])&&(r=l(a.matches[0].replace(we,Te),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return K.apply(n,r),n;break}}return(u||k(e,f))(r,t,!_,n,be.test(e)&&c(t.parentNode)||t),n},w.sortStable=B.split("").sort(U).join("")===B,w.detectDuplicates=!!D,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ie.find=ue,ie.expr=ue.selectors,ie.expr[":"]=ie.expr.pseudos,ie.unique=ue.uniqueSort,ie.text=ue.getText,ie.isXMLDoc=ue.isXML,ie.contains=ue.contains;var ce=ie.expr.match.needsContext,fe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,de=/^.[^:#\[\.,]*$/;ie.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ie.find.matchesSelector(r,e)?[r]:[]:ie.find.matches(e,ie.grep(t,function(e){return 1===e.nodeType}))},ie.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(ie(e).filter(function(){for(t=0;t<i;t++)if(ie.contains(r[t],this))return!0}));for(t=0;t<i;t++)ie.find(e,r[t],n);return n=this.pushStack(i>1?ie.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ce.test(e)?ie(e):e||[],!1).length}});var pe,he=e.document,me=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ge=ie.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:me.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||pe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof ie?t[0]:t,ie.merge(this,ie.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:he,!0)),fe.test(n[1])&&ie.isPlainObject(t))for(n in t)ie.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(r=he.getElementById(n[2]),r&&r.parentNode){if(r.id!==n[2])return pe.find(e);this.length=1,this[0]=r}return this.context=he,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ie.isFunction(e)?"undefined"!=typeof pe.ready?pe.ready(e):e(ie):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ie.makeArray(e,this))};ge.prototype=ie.fn,pe=ie(he);var ye=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};ie.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeT
return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},rt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||nt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||ie.contains(e.ownerDocument,e)||(a=ie.style(e,t)),tt.test(a)&&et.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):he.documentElement.currentStyle&&(nt=function(e){return e.currentStyle},rt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||nt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),tt.test(a)&&!it.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),function(){function t(){var t,n,r,i;n=he.getElementsByTagName("body")[0],n&&n.style&&(t=he.createElement("div"),r=he.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,l=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,i=t.appendChild(he.createElement("div")),i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight),t.removeChild(i)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=t.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===i[0].offsetHeight,s&&(i[0].style.display="",i[1].style.display="none",s=0===i[0].offsetHeight),n.removeChild(r))}var n,r,i,o,a,s,l;n=he.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=n.getElementsByTagName("a")[0],r=i&&i.style,r&&(r.cssText="float:left;opacity:.5",ne.opacity="0.5"===r.opacity,ne.cssFloat=!!r.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,ie.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),ie.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};var ot=/alpha\([^)]*\)/i,at=/opacity\s*=\s*([^)]*)/,st=/^(none|table(?!-c[ea]).+)/,lt=new RegExp("^("+ke+")(.*)$","i"),ut=new RegExp("^([+-])=("+ke+")","i"),ct={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","O","Moz","ms"];ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=rt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ie.camelCase(t),l=e.style;if(t=ie.cssProps[s]||(ie.cssProps[s]=S(l,s)),a=ie.cssHooks[t]||ie.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if(o=typeof n,"string"===o&&(i=ut.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(ie.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||ie.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=ie.camelCase(t);return t=ie.cssProps[s]||(ie.cssProps[s]=S(e.style,s)),a=ie.cssHook
tt.test(n)?ie(e).position()[t]+"px":n})}),ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ie.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Ae(this,function(t,n,r){var i;return ie.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?ie.css(t,n,a):ie.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),ie.fn.size=function(){return this.length},ie.fn.andSelf=ie.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var rn=e.jQuery,on=e.$;return ie.noConflict=function(t){return e.$===ie&&(e.$=on),t&&e.jQuery===ie&&(e.jQuery=rn),ie},typeof t===Te&&(e.jQuery=e.$=ie),ie})}}}}},{extensions:[".js",".json"]}),u=l("./node_modules/meteor/jquery/main.js");"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package.jquery=u,{$:a,jQuery:s})}();
!function(){"undefined"==typeof Package&&(Package={}),Package["standard-minifier-css"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package["standard-minifier-js"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package["shell-server"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package["standard-app-packages"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package.stylus={}}();
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,r=Package.meteor.meteorEnv,o=Package.tracker.Tracker,t=Package.tracker.Deps,i=Package["mongo-id"].MongoID,a=Package["diff-sequence"].DiffSequence,c=Package.underscore._,f=Package.random.Random,u,d,s,l;(function(){var e=function(){u._suppressWarnings?u._suppressWarnings--:("undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments),u._loggedWarnings++)},n=i.idStringify,r=i.idParse;u={_suppressWarnings:0,_loggedWarnings:0,observe:function(e,n){var r=null,i=null,f=[],u=o.autorun(function(){var u=e();o.nonreactive(function(){var e;if(i&&(f=c.map(r.fetch(),function(e){return{_id:e._id,item:e}}),i.stop(),i=null),u)if(u instanceof Array)e=s(f,u,n);else{if(!a(u))throw t();var o=l(f,u,n);e=o[0],i=o[1]}else e=d(f,n);v(f,e,n),r=u,f=e})});return{stop:function(){u.stop(),i&&i.stop()}}},fetch:function(e){if(e){if(e instanceof Array)return e;if(a(e))return e.fetch();throw t()}return[]}};var t=function(){return new Error("{{#each}} currently only accepts arrays, cursors or falsey values.")},a=function(e){return e&&c.isObject(e)&&c.isFunction(e.observe)&&c.isFunction(e.fetch)},v=function(e,o,t){var i=Package["diff-sequence"].DiffSequence.diffQueryOrderedChanges,a=[],f=[],u={},d={},s={},l=e.length;c.each(o,function(e,r){f.push({_id:e._id}),d[n(e._id)]=r}),c.each(e,function(e,r){a.push({_id:e._id}),u[n(e._id)]=r,s[n(e._id)]=r}),i(a,f,{addedBefore:function(e,r,i){var a=i?s[n(i)]:l;i&&c.each(s,function(e,n){e>=a&&s[n]++}),l++,s[n(e)]=a,t.addedAt(e,o[d[n(e)]].item,a,i)},movedBefore:function(e,r){if(e!==r){var i=s[n(e)],a=r?s[n(r)]:l;a>i&&a--,c.each(s,function(e,n){i<e&&e<a?s[n]--:a<=e&&e<i&&s[n]++}),s[n(e)]=a,t.movedTo(e,o[d[n(e)]].item,i,a,r)}},removed:function(r){var o=s[n(r)];c.each(s,function(e,n){e>=o&&s[n]--}),delete s[n(r)],l--,t.removedAt(r,e[u[n(r)]].item,o)}}),c.each(d,function(n,i){var a=r(i);if(c.has(u,i)){var f=o[n].item,d=e[u[i]].item;"object"!=typeof f&&f===d||t.changedAt(a,f,d,n)}})};d=function(e,n){return[]},s=function(r,o,t){var i={},a=c.map(o,function(r,t){var a;if("string"==typeof r)a="-"+r;else if("number"==typeof r||"boolean"==typeof r||void 0===r||null===r)a=r;else{if("object"!=typeof r)throw new Error("{{#each}} doesn't support arrays with elements of type "+typeof r);a=r&&"_id"in r?r._id:t}var c=n(a);return i[c]?(r&&"object"==typeof r&&"_id"in r&&e("duplicate id "+a+" in",o),a=f.id()):i[c]=!0,{_id:a,item:r}});return a},l=function(e,n,r){var o=!0,t=[],i=n.observe({addedAt:function(e,n,i){if(o){if(null!==i)throw new Error("Expected initial data from observe in order");t.push({_id:e._id,item:e})}else r.addedAt(e._id,e,n,i)},changedAt:function(e,n,o){r.changedAt(e._id,e,n,o)},removedAt:function(e,n){r.removedAt(e._id,e,n)},movedTo:function(e,n,o,t){r.movedTo(e._id,e,n,o,t)}});return o=!1,[t,i]}}).call(this),"undefined"==typeof Package&&(Package={}),function(e,n){for(var r in n)r in e||(e[r]=n[r])}(Package["observe-sequence"]={},{ObserveSequence:u})}();
!function(){var a=Package.tracker.Tracker,e=Package.tracker.Deps;"undefined"==typeof Package&&(Package={}),function(a,e){for(var c in e)c in a||(a[c]=e[c])}(Package.deps={},{Tracker:a,Deps:e})}();
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,i=Package.meteor.meteorEnv,r=Package.tracker.Tracker,n=Package.tracker.Deps,o,a,s;(function(){o={},a=function(t){return t},s=Array.prototype.slice}).call(this),function(){var t=Object.prototype.hasOwnProperty,e=function(e,i){for(var r in i)t.call(i,r)&&(e[r]=i[r]);return e};o.Visitor=function(t){e(this,t)},o.Visitor.def=function(t){e(this.prototype,t)},o.Visitor.extend=function(t){var i=this,r=function t(){o.Visitor.apply(this,arguments)};return r.prototype=new i,r.extend=i.extend,r.def=i.def,t&&e(r.prototype,t),r},o.Visitor.def({visit:function(t){if(null==t)return this.visitNull.apply(this,arguments);if("object"==typeof t){if(t.htmljsType)switch(t.htmljsType){case o.Tag.htmljsType:return this.visitTag.apply(this,arguments);case o.CharRef.htmljsType:return this.visitCharRef.apply(this,arguments);case o.Comment.htmljsType:return this.visitComment.apply(this,arguments);case o.Raw.htmljsType:return this.visitRaw.apply(this,arguments);default:throw new Error("Unknown htmljs type: "+t.htmljsType)}return o.isArray(t)?this.visitArray.apply(this,arguments):this.visitObject.apply(this,arguments)}if("string"==typeof t||"boolean"==typeof t||"number"==typeof t)return this.visitPrimitive.apply(this,arguments);if("function"==typeof t)return this.visitFunction.apply(this,arguments);throw new Error("Unexpected object in htmljs: "+t)},visitNull:function(t){},visitPrimitive:function(t){},visitArray:function(t){},visitComment:function(t){},visitCharRef:function(t){},visitRaw:function(t){},visitTag:function(t){},visitObject:function(t){throw new Error("Unexpected object in htmljs: "+t)},visitFunction:function(t){throw new Error("Unexpected function in htmljs: "+t)}}),o.TransformingVisitor=o.Visitor.extend(),o.TransformingVisitor.def({visitNull:a,visitPrimitive:a,visitArray:function(t){for(var e=s.call(arguments),i=t,r=0;r<t.length;r++){var n=t[r];e[0]=n;var o=this.visit.apply(this,e);o!==n&&(i===t&&(i=t.slice()),i[r]=o)}return i},visitComment:a,visitCharRef:a,visitRaw:a,visitObject:a,visitFunction:a,visitTag:function(t){var e=t.children,i=s.call(arguments);i[0]=e;var r=this.visitChildren.apply(this,i),n=t.attrs;i[0]=n;var a=this.visitAttributes.apply(this,i);if(a===n&&r===e)return t;var l=o.getTag(t.tagName).apply(null,r);return l.attrs=a,l},visitChildren:function(t){return this.visitArray.apply(this,arguments)},visitAttributes:function(t){if(o.isArray(t)){for(var i=s.call(arguments),r=t,n=0;n<t.length;n++){var a=t[n];i[0]=a;var l=this.visitAttributes.apply(this,i);l!==a&&(r===t&&(r=t.slice()),r[n]=l)}return r}if(t&&o.isConstructedObject(t))throw new Error("The basic HTML.TransformingVisitor does not support foreign objects in attributes. Define a custom visitAttributes for this case.");var u=t,f=u;if(u){var c=[null,null];c.push.apply(c,arguments);for(var h in u){var p=u[h];c[0]=h,c[1]=p;var m=this.visitAttribute.apply(this,c);m!==p&&(f===u&&(f=e({},u)),f[h]=m)}}return f},visitAttribute:function(t,e,i){var r=s.call(arguments,2);return r[0]=e,this.visit.apply(this,r)}}),o.ToTextVisitor=o.Visitor.extend(),o.ToTextVisitor.def({visitNull:function(t){return""},visitPrimitive:function(t){var e=String(t);return this.textMode===o.TEXTMODE.RCDATA?e.replace(/&/g,"&amp;").replace(/</g,"&lt;"):this.textMode===o.TEXTMODE.ATTRIBUTE?e.replace(/&/g,"&amp;").replace(/"/g,"&quot;"):e},visitArray:function(t){for(var e=[],i=0;i<t.length;i++)e.push(this.visit(t[i]));return e.join("")},visitComment:function(t){throw new Error("Can't have a comment here")},visitCharRef:function(t){return this.textMode===o.TEXTMODE.RCDATA||this.textMode===o.TEXTMODE.ATTRIBUTE?t.html:t.str},visitRaw:function(t){return t.value},visitTag:function(t){return this.visit(this.toHTML(t))},visitObject:function(t){throw new Error("Unexpected object in htmljs in toText: "+t)},toHTML:function(t){return o.toHTML(t)}}),o.ToHTMLVisitor=o.Visitor.extend(),o.ToHTMLVisitor.def({visitNull:function(t){return""},visitPrimitive:function(t){var e=String(t);return e.replace(/&/g,"&amp;").replace(/</g,"&lt;")},visitArray:function(t){for(var
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.jquery.$,i=Package.jquery.jQuery,a=Package.tracker.Tracker,o=Package.tracker.Deps,s=Package.check.check,l=Package.check.Match,c=Package.underscore._,u=Package["observe-sequence"].ObserveSequence,d=Package["reactive-var"].ReactiveVar,p=Package.htmljs.HTML,f,h,m,w,v;(function(){f={},f._escape=function(){var e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","&":"&amp;"},t=function(t){return e[t]};return function(e){return e.replace(/[&<>"'`]/g,t)}}(),f._warn=function(e){e="Warning: "+e,"undefined"!=typeof console&&console.warn&&console.warn(e)};var e=Function.prototype.bind;e?f._bind=function(t,n){if(2===arguments.length)return e.call(t,n);for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return e.apply(t,r.slice(1))}:f._bind=c.bind}).call(this),function(){var e={};f._DOMBackend=e;var t="undefined"!=typeof i?i:"undefined"!=typeof Package?Package.jquery&&Package.jquery.jQuery:null;if(!t)throw new Error("jQuery not found");e._$jq=t,e.parseHTML=function(e){return t.parseHTML(e)||[]},e.Events={delegateEvents:function(e,n,r,i){t(e).on(n,r,i)},undelegateEvents:function(e,n,r){t(e).off(n,"**",r)},bindEventCapturer:function(n,r,i,a){var o=t(n),s=function(e){e=t.event.fix(e),e.currentTarget=e.target;var r=t(e.currentTarget);r.is(o.find(i))&&a.call(n,e)};a._meteorui_wrapper=s,r=e.Events.parseEventType(r),n.addEventListener(r,s,!0)},unbindEventCapturer:function(t,n,r){n=e.Events.parseEventType(n),t.removeEventListener(n,r._meteorui_wrapper,!0)},parseEventType:function(e){var t=e.indexOf(".");return t>=0?e.slice(0,t):e}};var n=function(){},r=function(e){this.next=this,this.prev=this,this.func=e};r.prototype.linkBefore=function(e){this.prev=e.prev,this.next=e,e.prev.next=this,e.prev=this},r.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},r.prototype.go=function(){var e=this.func;e&&e()},r.prototype.stop=r.prototype.unlink,e.Teardown={_JQUERY_EVENT_NAME:"blaze_teardown_watcher",_CB_PROP:"$blaze_teardown_callbacks",onElementTeardown:function(i,a){var o=new r(a),s=e.Teardown._CB_PROP;return i[s]||(i[s]=new r,t(i).on(e.Teardown._JQUERY_EVENT_NAME,n)),o.linkBefore(i[s]),o},tearDownElement:function(e){for(var n=[],r=e.getElementsByTagName("*"),i=0;i<r.length;i++)n.push(r[i]);n.push(e),t.cleanData(n)}},t.event.special[e.Teardown._JQUERY_EVENT_NAME]={setup:function(){},teardown:function(){var t=this,n=t[e.Teardown._CB_PROP];if(n){for(var r=n.next;r!==n;)r.go(),r=r.next;n.go(),t[e.Teardown._CB_PROP]=null}}},e.findBySelector=function(e,n){return t(e,n)}}.call(this),function(){var e=Object.freeze?Object.freeze([]):[];f._DOMRange=function(n){if(!(this instanceof t))return new t(n);var r=n||e;if(!r||"number"!=typeof r.length)throw new Error("Expected array");for(var i=0;i<r.length;i++)this._memberIn(r[i]);this.members=r,this.emptyRangePlaceholder=null,this.attached=!1,this.parentElement=null,this.parentRange=null,this.attachedCallbacks=e};var t=f._DOMRange;t._USE_COMMENT_PLACEHOLDERS=function(){var e=!1,t=document.createTextNode("");try{t.someProp=!0}catch(t){e=!0}return e}(),t._insert=function(e,n,r,i){var a=e;a instanceof t?a.attach(n,r,i):i?t._moveNodeWithHooks(a,n,r):t._insertNodeWithHooks(a,n,r)},t._remove=function(e){var n=e;n instanceof t?n.detach():t._removeNodeWithHooks(n)},t._removeNodeWithHooks=function(e){e.parentNode&&(1===e.nodeType&&e.parentNode._uihooks&&e.parentNode._uihooks.removeElement?e.parentNode._uihooks.removeElement(e):e.parentNode.removeChild(e))},t._insertNodeWithHooks=function(e,t,n){n=n||null,1===e.nodeType&&t._uihooks&&t._uihooks.insertElement?t._uihooks.insertElement(e,n):t.insertBefore(e,n)},t._moveNodeWithHooks=function(e,t,n){e.parentNode===t&&(n=n||null,1===e.nodeType&&t._uihooks&&t._uihooks.moveElement?t._uihooks.moveElement(e,n):t.insertBefore(e,n))},t.forElement=function(e){if(1!==e.nodeType)throw new Error("Expected element, found: "+e);for(var t=null;e&&!t;)t=e.$blaze_range||null,t||(e=e.parentNode);return t},t.prototype.attach=function(e,n,
return"function"!=typeof e?e:function(){var n=this,r=arguments;return f.Template._withTemplateInstanceFunc(t,function(){return f._wrapCatchingExceptions(e,"template helper").apply(n,r)})}};f._lexicalBindingLookup=function(e,t){var n=e,r=[];do if(c.has(n._scopeBindings,t)){var i=n._scopeBindings[t];return function(){return i.get()}}while((!n.__startsNewLexicalScope||n.parentView&&n.parentView.__childDoesntStartNewLexicalScope)&&(n=n.parentView));return null},f._getTemplate=function(e,t){return e in f.Template&&f.Template[e]instanceof f.Template?f.Template[e]:null},f._getGlobalHelper=function(e,r){return null!=f._globalHelpers[e]?n(t(f._globalHelpers[e]),r):null},f.View.prototype.lookup=function(e,t){var n=this.template,r=t&&t.template,i,a,o,s;if(this.templateInstance&&(o=f._bind(this.templateInstance,this)),/^\./.test(e)){if(!/^(\.)+$/.test(e))throw new Error("id starting with dot must be a series of dots");return f._parentData(e.length-1,!0)}return n&&null!=(i=f._getTemplateHelper(n,e,o))?i:n&&null!=(a=f._lexicalBindingLookup(f.currentView,e))?a:r&&null!=(s=f._getTemplate(e,o))?s:null!=(i=f._getGlobalHelper(e,o))?i:function(){var t=arguments.length>0,n=f.getData(),i=n&&n[e];if(!i){if(r)throw new Error("No such template: "+e);if(t)throw new Error("No such function: "+e);if("@"===e.charAt(0)&&(null===i||void 0===i))throw new Error("Unsupported directive: "+e)}if(!n)return null;if("function"!=typeof i){if(t)throw new Error("Can't call non-function: "+i);return i}return i.apply(n,arguments)}},f._parentData=function(e,t){null==e&&(e=1);for(var n=f.getView("with"),r=0;r<e&&n;r++)n=f.getView(n,"with");return n?t?function(){return n.dataVar.get()}:n.dataVar.get():null},f.View.prototype.lookupTemplate=function(e){return this.lookup(e,{template:!0})}}.call(this),function(){f.Template=function(e,n){if(!(this instanceof f.Template))return new f.Template(e,n);if("function"==typeof e&&(n=e,e=""),"string"!=typeof e)throw new Error("viewName must be a String (or omitted)");if("function"!=typeof n)throw new Error("renderFunction must be a function");this.viewName=e,this.renderFunction=n,this.__helpers=new t,this.__eventMaps=[],this._callbacks={created:[],rendered:[],destroyed:[]}};var e=f.Template,t=function(){};t.prototype.get=function(e){return this[" "+e]},t.prototype.set=function(e,t){this[" "+e]=t},t.prototype.has=function(e){return" "+e in this},f.isTemplate=function(e){return e instanceof f.Template},e.prototype.onCreated=function(e){this._callbacks.created.push(e)},e.prototype.onRendered=function(e){this._callbacks.rendered.push(e)},e.prototype.onDestroyed=function(e){this._callbacks.destroyed.push(e)},e.prototype._getCallbacks=function(e){var t=this,n=t[e]?[t[e]]:[];return n=n.concat(t._callbacks[e])};var n=function(t,n){e._withTemplateInstanceFunc(function(){return n},function(){for(var e=0,r=t.length;e<r;e++)t[e].call(n)})};e.prototype.constructView=function(t,r){var i=this,a=f.View(i.viewName,i.renderFunction);a.template=i,a.templateContentBlock=t?new e("(contentBlock)",t):null,a.templateElseBlock=r?new e("(elseBlock)",r):null,(i.__eventMaps||"object"==typeof i.events)&&a._onViewRendered(function(){1===a.renderCount&&(i.__eventMaps.length||"object"!=typeof i.events||e.prototype.events.call(i,i.events),c.each(i.__eventMaps,function(e){f._addEventMap(a,e,a)}))}),a._templateInstance=new f.TemplateInstance(a),a.templateInstance=function(){var e=a._templateInstance;return e.data=f.getData(a),a._domrange&&!a.isDestroyed?(e.firstNode=a._domrange.firstNode(),e.lastNode=a._domrange.lastNode()):(e.firstNode=null,e.lastNode=null),e};var o=i._getCallbacks("created");a.onViewCreated(function(){n(o,a.templateInstance())});var s=i._getCallbacks("rendered");a.onViewReady(function(){n(s,a.templateInstance())});var l=i._getCallbacks("destroyed");return a.onViewDestroyed(function(){n(l,a.templateInstance())}),a},f.TemplateInstance=function(e){if(!(this instanceof f.TemplateInstance))return new f.TemplateInstance(e);if(!(e instanceof f.View))throw new Error("View required");e._templateInstance=this,this.view=e,this.data=null,this.firstNode=null
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package["observe-sequence"].ObserveSequence,a=Package.underscore._,u=Package.tracker.Tracker,i=Package.tracker.Deps,o=Package.htmljs.HTML,c=Package.blaze.Blaze,l=Package.blaze.UI,f=Package.blaze.Handlebars,p;(function(){p={};var e=function(e,t){return e===t};p.include=function(t,n,r){if(!t)return null;if("function"!=typeof t){var a=t;if(!c.isTemplate(a))throw new Error("Expected template or null, found: "+a);var u=t.constructView(n,r);return u.__startsNewLexicalScope=!0,u}var i=c.ReactiveVar(null,e),u=c.View("Spacebars.include",function(){var e=i.get();if(null===e)return null;if(!c.isTemplate(e))throw new Error("Expected template or null, found: "+e);return e.constructView(n,r)});return u.__templateVar=i,u.onViewCreated(function(){this.autorun(function(){i.set(t())})}),u.__startsNewLexicalScope=!0,u},p.mustacheImpl=function(e){var t=arguments;if(t.length>1){var n=t[t.length-1];if(n instanceof p.kw){var r={};for(var a in n.hash){var u=n.hash[a];r[a]="function"==typeof u?u():u}t[t.length-1]=p.kw(r)}else n=p.kw(),t=Array.prototype.slice.call(arguments),t.push(n)}return p.call.apply(null,t)},p.mustache=function(e){var t=p.mustacheImpl.apply(null,arguments);return t instanceof p.SafeString?o.Raw(t.toString()):null==t||t===!1?null:String(t)},p.attrMustache=function(e){var t=p.mustacheImpl.apply(null,arguments);if(null==t||""===t)return null;if("object"==typeof t)return t;if("string"==typeof t&&o.isValidAttributeName(t)){var n={};return n[t]="",n}throw new Error("Expected valid attribute name, '', null, or object")},p.dataMustache=function(e){var t=p.mustacheImpl.apply(null,arguments);return t},p.makeRaw=function(e){return null==e?null:e instanceof o.Raw?e:o.Raw(e)},p.call=function(e){if("function"==typeof e){for(var t=[],n=1;n<arguments.length;n++){var r=arguments[n];t[n-1]="function"==typeof r?r():r}return e.apply(null,t)}if(null!=e&&arguments.length>1)throw new Error("Can't call non-function: "+e);return e},p.kw=function(e){return this instanceof p.kw?void(this.hash=e||{}):new p.kw(e)},p.SafeString=function(e){return this instanceof p.SafeString?new f.SafeString(e):new p.SafeString(e)},p.SafeString.prototype=f.SafeString.prototype,p.dot=function(e,t){if(arguments.length>2){var n=[];return n.push(p.dot(e,t)),n.push.apply(n,Array.prototype.slice.call(arguments,2)),p.dot.apply(null,n)}if("function"==typeof e&&(e=e()),!e)return e;var r=e[t];return"function"!=typeof r?r:function(){return r.apply(e,arguments)}},p.With=function(e,t,n){var r=new c.ReactiveVar,a=c.View("Spacebars_with",function(){return c.If(function(){return r.get()},function(){return c.With(function(){return r.get()},t)},n)});return a.onViewCreated(function(){this.autorun(function(){r.set(e()),u.onInvalidate(function(){r.dep.changed()})})}),a},p.TemplateWith=c._TemplateWith}).call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package.spacebars={},{Spacebars:p})}();
!function(){"undefined"==typeof Package&&(Package={}),Package["templating-compiler"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.underscore._,o=Package.blaze.Blaze,c=Package.blaze.UI,r=Package.blaze.Handlebars,i=Package.spacebars.Spacebars,u=Package.htmljs.HTML,l;(function(){l=o.Template;var e="__proto__ name".split(" ");l.__checkName=function(t){if(t in l||a.contains(e,t)){if(l[t]instanceof l&&"body"!==t)throw new Error("There are multiple templates named '"+t+"'. Each template needs a unique name.");throw new Error("This template name is reserved: "+t)}},l.__define__=function(e,t){l.__checkName(e),l[e]=new l("Template."+e,t),l[e]._NOWARN_OLDSTYLE_HELPERS=!0},l.body=new l("body",function(){var e=this;return a.map(l.body.contentRenderFuncs,function(t){return t.apply(e)})}),l.body.contentRenderFuncs=[],l.body.view=null,l.body.addContent=function(e){l.body.contentRenderFuncs.push(e)},l.body.renderToDocument=function(){if(!l.body.view){var e=o.render(l.body,document.body);l.body.view=e}},c.body=l.body,l.__body__=l.body,l.__body__.__contentParts=l.body.contentViews,l.__body__.__instantiate=l.body.renderToDocument}).call(this),function(){l.__checkName("__dynamic"),l.__dynamic=new l("Template.__dynamic",function(){var e=this;return[o.View("lookup:checkContext",function(){return i.mustache(e.lookup("checkContext"))}),"\n ",o.If(function(){return i.call(e.lookup("dataContextPresent"))},function(){return["\n ",i.include(e.lookupTemplate("__dynamicWithDataContext"),function(){return o._InOuterTemplateScope(e,function(){return i.include(function(){return i.call(e.templateContentBlock)})})}),"\n "]},function(){return["\n \n ",o._TemplateWith(function(){return{template:i.call(e.lookup("template")),data:i.call(e.lookup(".."))}},function(){return i.include(e.lookupTemplate("__dynamicWithDataContext"),function(){return o._InOuterTemplateScope(e,function(){return i.include(function(){return i.call(e.templateContentBlock)})})})}),"\n "]})]}),l.__checkName("__dynamicWithDataContext"),l.__dynamicWithDataContext=new l("Template.__dynamicWithDataContext",function(){var e=this;return i.With(function(){return i.dataMustache(e.lookup("chooseTemplate"),e.lookup("template"))},function(){return["\n \n ",o._TemplateWith(function(){return i.call(i.dot(e.lookup(".."),"data"))},function(){return i.include(e.lookupTemplate(".."),function(){return o._InOuterTemplateScope(e,function(){return i.include(function(){return i.call(e.templateContentBlock)})})})}),"\n "]})})}.call(this),function(){var e=o.Template;e.__dynamicWithDataContext.helpers({chooseTemplate:function(t){return o._getTemplate(t,function(){return e.instance()})}}),e.__dynamic.helpers({dataContextPresent:function(){return a.has(this,"data")},checkContext:function(){if(!a.has(this,"template"))throw new Error("Must specify name in the 'template' argument to {{> Template.dynamic}}.");a.each(this,function(e,t){if("template"!==t&&"data"!==t)throw new Error("Invalid argument to {{> Template.dynamic}}: "+t)})}})}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["templating-runtime"]={},{Template:l})}();
!function(){var a=Package["templating-runtime"].Template;"undefined"==typeof Package&&(Package={}),function(a,e){for(var n in e)n in a||(a[n]=e[n])}(Package.templating={},{Template:a})}();
!function(){var a=Package.blaze.Blaze,e=Package.blaze.UI,n=Package.blaze.Handlebars;"undefined"==typeof Package&&(Package={}),function(a,e){for(var n in e)n in a||(a[n]=e[n])}(Package.ui={},{Blaze:a,UI:e,Handlebars:n})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.underscore._,o=Package.ejson.EJSON,i;(function(){if(Package["cmather:iron-core"])throw new Error("\n\n Sorry! The cmather:iron-{x} packages were migrated to the new package system with the wrong name, and you have duplicate copies.\n You can see which cmather:iron-{x} packages have been installed by using this command:\n\n > meteor list\n\n Can you remove any installed cmather:iron-{x} packages like this: \n\n > meteor remove cmather:iron-core\n > meteor remove cmather:iron-router\n > meteor remove cmather:iron-dynamic-template\n > meteor remove cmather:iron-dynamic-layout\n \n The new packages are named iron:{x}. For example:\n\n > meteor add iron:router\n\n Sorry for the hassle, but thank you! \n\n ")}).call(this),function(){i={},i.utils={},i.utils.assert=function(e,t){if(!e)throw new Error(t)},i.utils.warn=function(e,t){e||console&&console.warn&&console.warn(t)},i.utils.defaultValue=function(e,t,n){return"undefined"==typeof e[t]?(e[t]=n,n):e[t]},i.utils.inherits=function(e,t,n){i.utils.assert("undefined"!=typeof e,"Child is undefined in inherits function"),i.utils.assert("undefined"!=typeof t,"Parent is undefined in inherits function");for(var a in t)r.has(t,a)&&(e[a]=o.clone(t[a]));var s=function(){this.constructor=e};return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,r.isObject(n)&&r.extend(e.prototype,n),e},i.utils.extend=function(e,t){t=t||{};var n=function(){var e;e=r.has(t,"constructor")?t.constructor:n.__super__.constructor,e.apply(this,arguments)};return i.utils.inherits(n,e,t)},i.utils.global=function(){return e.isClient?window:t}(),i.utils.namespace=function(e,t){var n=i.utils.global,r,o,a,s;i.utils.assert("string"==typeof e,"namespace must be a string"),r=e.split("."),a=r.pop(),s=n;for(var c=0;c<r.length;c++)o=r[c],s=s[o]=s[o]||{};return 2===arguments.length?(s[a]=t,t):s[a]},i.utils.resolve=function(e){var t=i.utils.global,n,r;if("string"==typeof e){n=e.split("."),r=t;for(var o=0;o<n.length;o++)if(r=r[n[o]],!r)return}else r=e;return r},i.utils.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1,e.length)},i.utils.classCase=function(e){var t=/_|-|\.|\//;return e?r.map(e.split(t),function(e){return i.utils.capitalize(e)}).join(""):""},i.utils.camelCase=function(e){var t=i.utils.classCase(e);return t=t.charAt(0).toLowerCase()+t.slice(1,t.length)},i.utils.notifyDeprecated=function(e){var t,n,o,i,a="[:where] ':name' is deprecated. Please use ':instead' instead.";r.isObject(e)?(t=e.name,n=e.instead,o=e.message||a,i=e.where||"IronRouter"):(o=e,t="",n="",i=""),"undefined"!=typeof console&&console.warn&&console.warn("<deprecated> "+o.replace(":name",t).replace(":instead",n).replace(":where",i)+" "+(new Error).stack)},i.utils.withDeprecatedNotice=function(e,t,n){return function(){return Utils.notifyDeprecated(e),t&&t.apply(n||this,arguments)}},Function.prototype.deprecate=function(e){var t=this;return i.utils.withDeprecatedNotice(e,t)},i.utils.debug=function(e){return i.utils.assert("string"==typeof e,"debug requires a package name"),function t(){if(console&&console.log&&i.debug===!0){var n=r.toArray(arguments).join(" ");console.log("%c<"+e+"> %c"+n,"color: #999;","color: #000;")}}},i.utils.get=function(e){for(var t=1;t<arguments.length;t++){if(!(e&&arguments[t]in e))return;e=e[arguments[t]]}return e},i.utils.global.Iron=i}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["iron:core"]={},{Iron:i})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.ui.Blaze,r=Package.ui.UI,i=Package.ui.Handlebars,o=Package.underscore._,s=Package.jquery.$,u=Package.jquery.jQuery,c=Package.tracker.Tracker,l=Package.tracker.Deps,p=Package["reactive-var"].ReactiveVar,h=Package["templating-runtime"].Template,d=Package.random.Random,m=Package["iron:core"].Iron,f=Package.htmljs.HTML,_=Package.spacebars.Spacebars,v;(function(){if(Package["cmather:iron-dynamic-template"])throw new Error("\n\n Sorry! The cmather:iron-{x} packages were migrated to the new package system with the wrong name, and you have duplicate copies.\n You can see which cmather:iron-{x} packages have been installed by using this command:\n\n > meteor list\n\n Can you remove any installed cmather:iron-{x} packages like this: \n\n > meteor remove cmather:iron-core\n > meteor remove cmather:iron-router\n > meteor remove cmather:iron-dynamic-template\n > meteor remove cmather:iron-dynamic-layout\n \n The new packages are named iron:{x}. For example:\n\n > meteor add iron:router\n\n Sorry for the hassle, but thank you! \n\n ")}).call(this),function(){h.__checkName("__DynamicTemplateError__"),h.__DynamicTemplateError__=new h("Template.__DynamicTemplateError__",function(){var e=this;return f.DIV({style:"margin: 0 auto; color: red;"},"\n ",a.View("lookup:msg",function(){return _.mustache(e.lookup("msg"))}),"\n ")})}.call(this),function(){var e=m.utils.debug("iron:dynamic-template"),t=m.utils.assert,n=m.utils.get,i=m.utils.camelCase,u=function(e){return Object.prototype.toString.call(e)};v=function(e){this._id=d.id(),this.options=e=e||{},this._template=e.template,this._defaultTemplate=e.defaultTemplate,this._content=e.content,this._data=e.data,this._templateDep=new c.Dependency,this._dataDep=new c.Dependency,this._lookupHostDep=new c.Dependency,this._lookupHostValue=null,this._hooks={},this._eventMap=null,this._eventHandles=null,this._eventThisArg=null,this.name=e.name||this.constructor.prototype.name||"DynamicTemplate",this.isCreated=!1,this.isDestroyed=!1},v.prototype.template=function(e){if(1===arguments.length&&e!==this._template)return this._template=e,void this._templateDep.changed();if(!(arguments.length>0))return this._templateDep.depend(),this._template?"function"==typeof this._template?this._template():this._template:this._defaultTemplate?"function"==typeof this._defaultTemplate?this._defaultTemplate():this._defaultTemplate:void 0},v.prototype.defaultTemplate=function(e){return 1!==arguments.length?this._defaultTemplate:void(this._defaultTemplate=e)},v.prototype.clear=function(){this._template=void 0,this._data=void 0,this._templateDep.changed()},v.prototype.data=function(e){return 1===arguments.length&&e!==this._data?(this._data=e,void this._dataDep.changed()):(this._dataDep.depend(),"function"==typeof this._data?this._data():this._data)},v.prototype.create=function(e){var t=this;if(this.isCreated)throw new Error("DynamicTemplate view is already created");this.isCreated=!0,this.isDestroyed=!1;var n=p(null),r=a.View("DynamicTemplate",function(){var e=this,r=n.get();return a.With(function(){var n=t.data();return"undefined"!=typeof n?n:v.getParentDataContext(e)},function(){return t.renderView(r)})});return r.onViewCreated(function(){this.autorun(function(){n.set(t.template())})}),o.each(["onViewCreated","onViewReady","_onViewRendered","onViewDestroyed"],function(e){r[e](function(){t._runHooks(e,this)})}),r._onViewRendered(function(){t.isInserted=!0,1===r.renderCount&&t._attachEvents()}),r.onViewDestroyed(function(){t._detachEvents()}),r._templateInstance=new a.TemplateInstance(r),r.templateInstance=function(){var e=r._templateInstance;return e.data=a.getData(r),r._domrange&&!r.isDestroyed?(e.firstNode=r._domrange.firstNode(),e.lastNode=r._domrange.lastNode()):(e.firstNode=null,e.lastNode=null),e},this.view=r,r.__dynamicTemplate__=this,r.name=this.name,r},v.prototype.renderView=function(e){var t=this,n=null;return"string"==typeof e?(n=h[e],n||(n=h[i(e)]),n||(n=a.With({msg:"Coul
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,t=Package.meteor.meteorEnv,r=Package["templating-runtime"].Template,o=Package.blaze.Blaze,i=Package.blaze.UI,a=Package.blaze.Handlebars,s=Package.underscore._,c=Package.tracker.Tracker,u=Package.tracker.Deps,h=Package["iron:core"].Iron,l=Package.htmljs.HTML,g=Package.spacebars.Spacebars,d,p,m;(function(){var e=[];if(Package["cmather:iron-layout"]&&e.push("\n\n The cmather:iron-{x} packages were migrated to the new package system with the wrong name, and you have duplicate copies.\n You can see which cmather:iron-{x} packages have been installed by using this command:\n\n > meteor list\n\n Can you remove any installed cmather:iron-{x} packages like this: \n\n > meteor remove cmather:iron-core\n > meteor remove cmather:iron-router\n > meteor remove cmather:iron-dynamic-template\n > meteor remove cmather:iron-dynamic-layout\n \n The new packages are named iron:{x}. For example:\n\n > meteor add iron:router\n\n Sorry for the hassle, but thank you! \n\n "),Package["cmather:blaze-layout"]&&e.push("The blaze-layout package has been replaced by iron-layout. Please remove the package like this:\n> meteor remove cmather:blaze-layout\n"),e.length>0)throw new Error("Sorry! Looks like there's a few errors related to iron:layout\n\n"+e.join("\n\n"))}).call(this),function(){r.__checkName("__IronDefaultLayout__"),r.__IronDefaultLayout__=new r("Template.__IronDefaultLayout__",function(){var e=this;return g.include(e.lookupTemplate("yield"))})}.call(this),function(){var e=h.DynamicTemplate,n=h.utils.inherits;d=function(e){for(;e;){if("Iron.Layout"===e.name)return e.__dynamicTemplate__;e=e.parentView}return null},p=function(e){var n=this;p.__super__.constructor.apply(this,arguments),e=e||{},this.name="Iron.Layout",this._regions={},this._regionHooks={},this.defaultTemplate("__IronDefaultLayout__"),e.content&&this.render(e.content)},m=p.DEFAULT_REGION="main",n(p,h.DynamicTemplate),p.prototype.region=function(e,n){return this._ensureRegion(e,n)},p.prototype.destroyRegions=function(){s.each(this._regions,function(e){e.destroy()}),this._regions={}},p.prototype.render=function(e,n){n=n||{};var t=n.to||n.region||m,r=this.region(t);this._trackRenderedRegion(t),r.template(e),r.data(n.data)},p.prototype.has=function(e){return e=e||p.DEFAULT_REGION,!!this._regions[e]},p.prototype.regionKeys=function(){return s.keys(this._regions)},p.prototype.clear=function(e){return e=e||p.DEFAULT_REGION,this.has(e)&&this.region(e).template(null),this},p.prototype.clearAll=function(){return s.each(this._regions,function(e){e.template(null)}),this},p.prototype.beginRendering=function(e){var n=this;if(this._finishRenderingTransaction&&this._finishRenderingTransaction(),this._finishRenderingTransaction=s.once(function(){var t=n._endRendering({flush:!1});e&&e(t)}),u.afterFlush(this._finishRenderingTransaction),this._renderedRegions)throw new Error("You called beginRendering again before calling endRendering");this._renderedRegions={}},p.prototype._trackRenderedRegion=function(e){this._renderedRegions&&(this._renderedRegions[e]=!0)},p.prototype._endRendering=function(e){e=e||{},e.flush!==!1&&u.flush();var n=this._renderedRegions||{};return this._renderedRegions=null,s.keys(n)},s.each(["onRegionCreated","onRegionRendered","onRegionDestroyed"],function(e){p.prototype[e]=function(n){var t=this._regionHooks[e]=this._regionHooks[e]||[];return t.push(n),this}}),p.prototype._ensureRegion=function(e,n){return this._regions[e]=this._regions[e]||this._createDynamicTemplate(e,n)},p.prototype._createDynamicTemplate=function(e,n){var t=this,r=new h.DynamicTemplate(n),o=h.utils.capitalize;return r._region=e,s.each(["viewCreated","viewReady","viewDestroyed"],function(e){e=o(e),r["on"+e](function(n){var r=this,o={viewCreated:"regionCreated",viewReady:"regionRendered",viewDestroyed:"regionDestroyed"}[e];t._runRegionHooks("on"+o,r,n)})}),r},p.prototype._runRegionHooks=function(e,n,t){for(var r=this,o=this._regionHooks[e]||[],i,a=0;a<o.length;a++)i=o[a],i.call(n,t.region,t,this)},"un
!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,t=Package.meteor.meteorEnv,n=Package.underscore._,i=Package["iron:core"].Iron,o,a;(function(){function e(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function r(o,a,s){a&&"[object Array]"!==t(a)&&(s=a,a=null),a=a||[],s=s||{};var c=s.strict,u=s.end!==!1,p=s.sensitive?"":"i",l=0;if(o instanceof RegExp){var h=o.source.match(/\((?!\?)/g)||[];return a.push.apply(a,h.map(function(e,r){return{name:r,delimiter:null,optional:!1,repeat:!1}})),i(o,a)}if("[object Array]"===t(o))return o=o.map(function(e){return r(e,a,s).source}),i(new RegExp("(?:"+o.join("|")+")",p),a);o=o.replace(n,function(r,t,n,i,o,s,c,u){if(t)return t;if(u)return"\\"+u;var p="+"===c||"*"===c,h="?"===c||"*"===c;return a.push({name:i||l++,delimiter:n||"/",optional:h,repeat:p}),n=n?"\\"+n:"",o=e(o||s||"[^"+(n||"\\/")+"]+?"),p&&(o=o+"(?:"+n+o+")*"),h?"(?:"+n+"("+o+"))?":n+"("+o+")"});var f="/"===o[o.length-1];return c||(o=(f?o.slice(0,-2):o)+"(?:\\/(?=$))?"),u||(o+=c&&f?"":"(?=\\/|$)"),i(new RegExp("^"+o+(u?"$":""),p),a)}var t=function(e){return Object.prototype.toString.call(e)},n=new RegExp(["(\\\\.)","([\\/.])?(?:\\:(\\w+)(?:\\(((?:\\\\.|[^)])*)\\))?|\\(((?:\\\\.|[^)])*)\\))([+*?])?","([.+*?=^!:${}()[\\]|\\/])"].join("|"),"g"),i=function(e,r){return e.keys=r,e};o=r}).call(this),function(){function e(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(r){return void(r.constructor==URIError&&t("Tried to decode an invalid URI component: "+JSON.stringify(e)+" "+r.stack))}}function r(e){try{return decodeURI(e.replace(/\+/g," "))}catch(r){return void(r.constructor==URIError&&t("Tried to decode an invalid URI: "+JSON.stringify(e)+" "+r.stack))}}var t=i.utils.warn;a=function(e,r){r=r||{},this.options=r,this.keys=[],this.regexp=o(e,this.keys,r),this._originalPath=e,n.extend(this,a.parse(e))},a.normalize=function(e){if(e instanceof RegExp)return e;if("string"!=typeof e)return"/";var r=a.parse(e),t=r.pathname;return"/"!==t.charAt(0)&&(t="/"+t),t.length>1&&"/"===t.charAt(t.length-1)&&(t=t.slice(0,t.length-1)),t},a.isSameOrigin=function(e,r){var t=a.parse(e),n=a.parse(r),i=t.origin===n.origin;return i},a.fromQueryString=function(r){if(!r)return{};if("string"!=typeof r)throw new Error("expected string");"?"===r.charAt(0)&&(r=r.slice(1));var t=r.split("&"),i={},o;return n.each(t,function(r){var t=r.split("="),n=t[0],o=e(t[1]);"[]"===n.slice(-2)?(n=n.slice(0,-2),i[n]=i[n]||[],i[n].push(o)):i[n]=o}),i},a.toQueryString=function(e){var r=[];return"string"==typeof e?"?"!==e.charAt(0)?"?"+e:e:(n.each(e,function(e,t){n.isArray(e)?n.each(e,function(e){r.push(encodeURIComponent(t)+"[]="+encodeURIComponent(e))}):r.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),r.length>0?"?"+r.join("&"):"")},a.parse=function(e){if("string"!=typeof e)return{};var r=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t=e.match(r),n=t[1]?t[1].toLowerCase():void 0,i=t[3],o=!!i,s=t[4]?t[4].toLowerCase():void 0,c=s?s.split("@"):[],u,p;2==c.length?(p=c[0],u=c[1]):1==c.length?(u=c[0],p=void 0):(u=void 0,p=void 0);var l=u&&u.split(":")||[],h=l[0],f=l[1],g=n&&u?n+"//"+u:void 0,d=t[5],m=t[8],y=e,v=t[6],w,R=m&&m.indexOf("?")||-1;~R&&!v?(v=m.slice(R),m=m.substr(0,R),w=v.slice(1)):w=t[7];var x=d+(v||""),U=a.fromQueryString(w),S=[n||"",o?"//":"",s||""].join(""),k=[n||"",o?"//":"",s||"",d||"",v||"",m||""].join("");return{rootUrl:S||"",originalUrl:e||"",href:k||"",protocol:n||"",auth:p||"",host:u||"",hostname:h||"",port:f||"",origin:g||"",path:x||"",pathname:d||"",search:v||"",query:w||"",queryObject:U||"",hash:m||"",slashes:o}},a.prototype.test=function(e){return this.regexp.test(a.normalize(e))},a.prototype.exec=function(e){return this.regexp.exec(a.normalize(e))},a.prototype.params=function(t){if(!t)return[];var n=[],i=this.exec(t),o,s=this.keys,c,u;if(!i)throw new Error('The route named "'+this.name+'" does not match the path "'+t+'"');for(var p=1,l=i.length;p<l;++p)c=s[p-1],u="string"==typeof i[p]?e(i[p]):i[p],c?n[c.name]=void 0!==n[c.name]?n[c.name]:u:n.push(u);return t=r(t),"undefined"!=typeof t&&(o=t.split("?")[1],o&&(o=
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.underscore._,i=Package.ejson.EJSON,o=Package["iron:core"].Iron,a,s;(function(){var t=o.Url;a=function(e,n,i){r.isFunction(e)&&(i=i||n||{},n=e,e="/",this.middleware=!0,"undefined"==typeof i.mount&&(i.mount=!0)),"object"==typeof n&&(i=n,n=i.action||"action"),i=i||{},this.options=i,this.mount=i.mount,this.method=i.method&&i.method.toLowerCase()||!1,this.where=i.where||"client",this.mount&&(i.end=!1),i.name?this.name=i.name:"string"==typeof e&&"/"!==e.charAt(0)?this.name=e:"string"==typeof e&&"/"!==e&&(this.name=e.split("/").slice(1).join(".")),e=i.path||e,"string"==typeof e&&"/"!==e.charAt(0)&&(e="/"+e),this.path=e,this.compiledUrl=new t(e,i),r.isString(n)?this.handle=function t(){var e=this[n];if("function"!=typeof e)throw new Error("No method named "+JSON.stringify(n)+" found on handler.");return e.apply(this,arguments)}:r.isFunction(n)&&(this.handle=n)},a.prototype.test=function(t,e){e=e||{};var n=this.compiledUrl.test(t),r=!0,i=!0;return this.method&&e.method&&(r=this.method==e.method.toLowerCase()),e.where&&(i=this.where==e.where),n&&r&&i},a.prototype.params=function(t){return this.compiledUrl.params(t)},a.prototype.resolve=function(t,e){return this.compiledUrl.resolve(t,e)},a.prototype.clone=function(){var t=new a(this.path,this.handle,this.options);return t.name=this.name,t}}).call(this),function(){var e=o.Url,n=o.utils.assert,h=o.utils.defaultValue;s=function(){this._stack=[],this.length=0},s.prototype._create=function(t,e,n){var i=new a(t,e,n),o=i.name;if(o){if(r.has(this._stack,o))throw new Error("Handler with name '"+o+"' already exists.");this._stack[o]=i}return i},s.prototype.findByName=function(t){return this._stack[t]},s.prototype.push=function(t,e,n){var r=this._create(t,e,n);return this._stack.push(r),this.length++,r},s.prototype.append=function(){var t=this,e=r.toArray(arguments),n={};return"object"==typeof e[e.length-1]&&(n=e.pop()),r.each(e,function(e){if("undefined"!=typeof e)if("function"==typeof e)t.push(e,n);else{if(!r.isArray(e))throw new Error("Can only append functions or arrays to the MiddlewareStack");t.append.apply(t,e.concat([n]))}}),this},s.prototype.insertAt=function(t,e,n,r){var i=this._create(e,n,r);return this._stack.splice(t,0,i),this.length=this._stack.length,this},s.prototype.insertBefore=function(t,e,n,i){var o,a;if(!(o=this._stack[t]))throw new Error("Couldn't find a handler named '"+t+"' on the path stack");return a=r.indexOf(this._stack,o),this.insertAt(a,e,n,i),this},s.prototype.insertAfter=function(t,e,n,i){var o,a;if(!(o=this._stack[t]))throw new Error("Couldn't find a handler named '"+t+"' on the path stack");return a=r.indexOf(this._stack,o),this.insertAt(a+1,e,n,i),this},s.prototype.concat=function(){var t=new s,e=Array.prototype.concat,n=i.clone(this._stack),o=r.map(r.toArray(arguments),function(t){return i.clone(t._stack)});return t._stack=e.apply(n,o),t.length=t._stack.length,t},s.prototype.dispatch=function r(i,o,a){var s=this,l=i;n("string"==typeof i,"Requires url"),n("object"==typeof o,"Requires context object"),i=e.normalize(i||"/"),h(o,"request",{}),h(o,"response",{}),h(o,"originalUrl",i),h(o,"_method",o.method),h(o,"_handlersForEnv",{client:!1,server:!1}),h(o,"_handled",!1),h(o,"isHandled",function(){return o._handled}),h(o,"willBeHandledOnClient",function(){return o._handlersForEnv.client}),h(o,"willBeHandledOnServer",function(){return o._handlersForEnv.server});var c=function(){if(a)try{a.apply(this,arguments)}catch(t){throw t._punt=!0,t}},u=0,p=t.bindEnvironment(function n(r){var a=s._stack[u++];if(o.url=o.request.url=o.originalUrl,!a)return c.call(o,r);if(!a.test(i,{method:o._method}))return p(r);var h=t.isClient?"client":"server";if(a.middleware||(o._handlersForEnv[a.where]=!0),a.where!==h)return p(r);if(o.next=p,a.mount){var l=e.normalize(a.compiledUrl.pathname),d=i.substr(l.length,i.length);d=e.normalize(d),o.url=o.request.url=d}try{var f=a.handle.length,m=o.request,y=o.response;return r&&4===f?a.handle.call(o,r,m,y,p):!r&&f<4?a.handle.call(o,m,y,p):p(r)}catch
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.underscore._,r=Package.tracker.Tracker,o=Package.tracker.Deps,i=Package.jquery.$,c=Package.jquery.jQuery,s=Package["iron:core"].Iron,h,u,l,f,p;(function(){var t=s.Url,e="__hash__";h=function(n){var a=t.parse(n),r=a.hash&&a.hash.replace("#",""),o=a.search,i=a.pathname,c=a.rootUrl;if(r&&"!"!==r.charAt(0)){var s=e+"="+r;o=o?o+"&":"?",o+=s,r=""}return!r&&i?r="#!"+i.substring(1):r&&(r="#"+r),[c,r,o].join("")},u=function(n){var r=t.parse(n),o=r.hash&&r.hash.replace("#!","/"),i=r.search,c=r.rootUrl,s;return a.has(r.queryObject,e)?(s="#"+r.queryObject[e],delete r.queryObject[e]):s="",[c,o,t.toQueryString(r.queryObject),s].join("")},l=function(n){var a=t.parse(n),r=a.queryObject;return a.hash&&(r[e]=a.hash.replace("#","")),["!",a.pathname.substring(1),t.toQueryString(r)].join("")}}).call(this),function(){var t=s.Url;f=function(e,n){a.extend(this,t.parse(e),{options:n||{}})},f.prototype.equals=function(t){return!!t&&(t instanceof f&&(t.pathname==this.pathname&&t.search==this.search&&t.hash==this.hash&&t.options.historyState===this.options.historyState))},f.prototype.isCancelled=function(){return!!this._isCancelled},f.prototype.cancelUrlChange=function(){this._isCancelled=!0}}.call(this),function(){var e=s.Url,n=null,r=new o.Dependency,c={go:[],popState:[]},g=function(){return/MSIE 9/.test(navigator.appVersion)},y=function(){return/MSIE 8/.test(navigator.appVersion)},d=function(){return!!Package.appcache},S=function(){return"undefined"==typeof history||"function"!=typeof history.pushState},v=function(){return p.options.useHashPaths||y()||g()||d()||S()},k=function(){return!!p.options.useHashPaths},w=function(t,e){a.each(c[t],function(t){t.call(e)})},P=function(t){if(!(t instanceof f))throw new Error("Expected a State instance");return!t.equals(n)&&(n=t,r.changed(),!0)},m=function(){var t=location.href,e;e=k()?new f(u(t)):new f(t,{historyState:history.state}),w("popState",e),P(e)},j=function(t){var e=q;e&&e(t)},_=function(t,e){e=e||{};var n=new f(t,e);w("go",n),P(n)&&o.afterFlush(function(){n.isCancelled()||(k()?location.hash=l(t):e.replaceState===!0?history.replaceState(e.historyState,null,t):history.pushState(e.historyState,null,t))})},q=function(t){try{var n=t.currentTarget,a=n.href,r=n.pathname+n.search+n.hash;if(r=r.replace(/(^\/?)/,"/"),t.isDefaultPrevented())return void t.preventDefault();if(t.metaKey||t.ctrlKey||t.shiftKey)return;if(n.target)return;if(!e.isSameOrigin(a,location.href))return;t.preventDefault(),_(r)}catch(e){throw t.preventDefault(),e}};p={},p.options={linkSelector:"a[href]",useHashPaths:!1},p.configure=function(t){a.extend(this.options,t||{})},p.get=function(){return r.depend(),n},p.start=function(){if(!this._isStarted){var n=e.parse(location.href);if(v()){if(n.pathname.length>1){var a=h(location.href);window.location=a}this.configure({useHashPaths:!0})}var r=location.href;if(k()){var o=new f(u(r));P(o)}else{if("!"===n.hash.replace("#","")[0])var r=u(r);var c={initial:!0};history.replaceState(c,null,r);var o=new f(r,{historyState:c});P(o)}i(window).on("popstate.iron-location",m),i(window).on("hashchange.iron-location",m),t.startup(function(){i(document).on("click.iron-location",p.options.linkSelector,j)}),this._isStarted=!0}},p.stop=function(){this._isStarted&&(i(window).on("popstate.iron-location"),i(window).on("hashchange.iron-location"),i(document).off("click.iron-location"),this._isStarted=!1)},p.onClick=function(t){q=t},p.go=function(t,e){return _(t,e)},p.onGo=function(t){c.go.push(t)},p.onPopState=function(t){c.popState.push(t)},p.start(),s.Location=p}.call(this),"undefined"==typeof Package&&(Package={}),function(t,e){for(var n in e)n in t||(t[n]=e[n])}(Package["iron:location"]={},{urlToHashStyle:h,urlFromHashStyle:u})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.underscore._,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.ejson.EJSON,s=Package.modules.meteorInstall,o=Package.modules.Buffer,u=Package.modules.process,d=Package["ecmascript-runtime"].Symbol,f=Package["ecmascript-runtime"].Map,l=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,p=Package.promise.Promise,y,g=s({node_modules:{meteor:{"reactive-dict":{"reactive-dict.js":["babel-runtime/helpers/typeof",function(e,t,n){var r;n.import("babel-runtime/helpers/typeof",{default:function(e){r=e}});var s=function e(t){return void 0===t?"undefined":c.stringify(t)},o=function e(t){if(void 0!==t&&"undefined"!==t)return c.parse(t)},u=function e(t){t&&t.changed()};y=function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){if(e)if("string"==typeof e)y._registerDictForMigrate(e,this),this.keys=y._loadMigratedDict(e)||{},this.name=e;else{if("object"!==("undefined"==typeof e?"undefined":r(e)))throw new Error("Invalid ReactiveDict argument: "+e);this.keys=e}else this.keys={};this.allDeps=new i.Dependency,this.keyDeps={},this.keyValueDeps={}}),a.extend(y.prototype,{set:function(){function e(e,t){var n=this;if("object"===("undefined"==typeof e?"undefined":r(e))&&void 0===t)return void n._setObject(e);var i=e;t=s(t);var c=a.has(n.keys,i),o=c?n.keys[i]:"undefined",d=t!==o;n.keys[i]=t,!d&&c||n.allDeps.changed(),d&&(u(n.keyDeps[i]),n.keyValueDeps[i]&&(u(n.keyValueDeps[i][o]),u(n.keyValueDeps[i][t])))}return e}(),setDefault:function(){function e(e,t){var n=this;if("object"===("undefined"==typeof e?"undefined":r(e))&&void 0===t)return void n._setDefaultObject(e);var i=e;a.has(n.keys,i)||n.set(i,t)}return e}(),get:function(){function e(e){var t=this;return t._ensureKey(e),t.keyDeps[e].depend(),o(t.keys[e])}return e}(),equals:function(){function e(e,t){var n=this,r=null;if(Package.mongo&&(r=Package.mongo.Mongo.ObjectID),!("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"undefined"==typeof t||t instanceof Date||r&&t instanceof r||null===t))throw new Error("ReactiveDict.equals: value must be scalar");var u=s(t);if(i.active){n._ensureKey(e),a.has(n.keyValueDeps[e],u)||(n.keyValueDeps[e][u]=new i.Dependency);var d=n.keyValueDeps[e][u].depend();d&&i.onInvalidate(function(){n.keyValueDeps[e][u].hasDependents()||delete n.keyValueDeps[e][u]})}var f=void 0;return a.has(n.keys,e)&&(f=o(n.keys[e])),c.equals(f,t)}return e}(),all:function(){function e(){this.allDeps.depend();var e={};return a.each(this.keys,function(t,n){e[n]=o(t)}),e}return e}(),clear:function(){function e(){var e=this,t=e.keys;e.keys={},e.allDeps.changed(),a.each(t,function(t,n){u(e.keyDeps[n]),e.keyValueDeps[n]&&(u(e.keyValueDeps[n][t]),u(e.keyValueDeps[n].undefined))})}return e}(),delete:function(){function e(e){var t=this,n=!1;if(a.has(t.keys,e)){var i=t.keys[e];delete t.keys[e],u(t.keyDeps[e]),t.keyValueDeps[e]&&(u(t.keyValueDeps[e][i]),u(t.keyValueDeps[e].undefined)),t.allDeps.changed(),n=!0}return n}return e}(),_setObject:function(){function e(e){var t=this;a.each(e,function(e,n){t.set(n,e)})}return e}(),_setDefaultObject:function(){function e(e){var t=this;a.each(e,function(e,n){t.setDefault(n,e)})}return e}(),_ensureKey:function(){function e(e){var t=this;e in t.keyDeps||(t.keyDeps[e]=new i.Dependency,t.keyValueDeps[e]={})}return e}(),_getMigrationData:function(){function e(){return this.keys}return e}()})}],"migration.js":function(){if(y._migratedDictData={},y._dictsToMigrate={},y._loadMigratedDict=function(e){return a.has(y._migratedDictData,e)?y._migratedDictData[e]:null},y._registerDictForMigrate=function(e,t){if(a.has(y._dictsToMigrate,e))throw new Error("Duplicate ReactiveDict name: "+e);y._dictsToMigrate[e]=t},e.isClient&&Package.reload){var t=Package.reload.Reload._migrationData("reactive-dict");t&&t.dicts&&(y._migratedDictData=t.dicts),Package.reload.Reload._onMigrate("reactive-dict",function(){var e=y._dictsToMigrate,t={};for(var n in k.sanitizeForInObject(e
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.underscore._,o=Package.tracker.Tracker,i=Package.tracker.Deps,r=Package["reactive-dict"].ReactiveDict,u=Package["templating-runtime"].Template,s=Package["iron:core"].Iron,c=Package.blaze.Blaze,l=Package.blaze.UI,p=Package.blaze.Handlebars,d=Package.spacebars.Spacebars,y=Package.htmljs.HTML,h,f;(function(){var t=s.utils.assert,e=function(){for(var t={},e=i.currentComputation;e;)t[String(e._id)]=!0,e=e._parent;return t},n=function(n){var o=e(),i=a.keys(n._dependentsById);a.each(i,function(e){t(!o[e],"\n\nYou called wait() after calling ready() inside the same computation tree.\n\nYou can fix this problem in two possible ways:\n\n1) Put all of your wait() calls before any ready() calls.\n2) Put your ready() call in its own computation with Deps.autorun.")})};h=function(){this._readyDep=new i.Dependency,this._comps=[],this._notReadyCount=0},h.prototype.wait=function(t){var e=this,o=i.currentComputation;n(e._readyDep),i.nonreactive(function(){var n=null,r=i.autorun(function(a){var o=!!t(),i=e._notReadyCount;a.firstRun&&!o?e._notReadyCount++:null!==n&&o!==n&&o===!0?e._notReadyCount--:null!==n&&o!==n&&o===!1&&e._notReadyCount++,n=o,0===i&&e._notReadyCount>0?e._readyDep.changed():i>0&&0===e._notReadyCount&&e._readyDep.changed()});e._comps.push(r),o&&o.onInvalidate(function(){i.afterFlush(function(){r.stop(),e._comps.splice(a.indexOf(e._comps,r),1),n===!1&&(e._notReadyCount--,0===e._notReadyCount&&e._readyDep.changed())})})})},h.prototype.ready=function(){return this._readyDep.depend(),0===this._notReadyCount},h.prototype.stop=function(){a.each(this._comps,function(t){t.stop()}),this._comps=[]},s.WaitList=h}).call(this),function(){var t=s.utils.debug("iron:controller"),e=s.Layout,n=s.DynamicTemplate,o=function(t,e){return function(){return"function"==typeof t?t.apply(e,arguments):t}};f=function(t){var n=this;this.options=t||{},this._layout=this.options.layout||new e(this.options),this._isController=!0,this._layout._setLookupHost(this);var a=f._collectEventMaps.call(this.constructor);this._layout.events(a,this),this.init(t)},f.prototype.layout=function(t,e){var n=this;return this._layout.template(t),e&&a.has(e,"data")&&this._layout.data(o(e.data,this)),{data:function(t){return n._layout.data(o(t,n))}}},f.prototype.render=function(t,e){var n=this;e&&"undefined"!=typeof e.data&&(e.data=o(e.data,this));var a=this._layout.render(t,e);return{data:function(t){return a.data(o(t,n))}}},f.prototype.beginRendering=function(t){return this._layout.beginRendering(t)},f.extend=function(t){return s.utils.extend(this,t)},f.events=function(t){return this._eventMap=t,this};var i=function(t,e){var n={};return t.__super__&&a.extend(n,i(t.__super__.constructor,e)),a.has(t,e)?a.extend(n,t[e]):n};f._collectEventMaps=function(){return i(this,"_eventMap")},f._helpers={},f.helpers=function(t){return a.extend(this._helpers,t),this},"undefined"!=typeof u&&(s.controller=function(){return n.findLookupHostWithProperty(c.getView(),"_isController")},u.registerHelper("get",function(t){var e=s.controller();if(e&&e.state)return e.state.get(t)})),s.Controller=f}.call(this),function(){var t=s.Layout,e=s.utils.debug("iron:controller"),n=s.utils.defaultValue,o=function(t,e){return function(){return"function"==typeof t?t.apply(e,arguments):t}};f.prototype.init=function(t){this._waitlist=new h,this.state=new r},f.prototype.insert=function(t){return this._layout.insert.apply(this._layout,arguments)},f.prototype.wait=function(t){var e=this;if(t)return a.isArray(t)?a.each(t,function t(n){e.wait(n)}):t.ready?this._waitlist.wait(function(){return t.ready()}):this._waitlist.wait(t),this},f.prototype.ready=function(){return this._waitlist.ready()},f.prototype.stop=function(){this._waitlist.stop()}}.call(this),"undefined"==typeof Package&&(Package={}),Package["iron:controller"]={}}();
!function(){var t=Package.underscore._,o=Package.tracker.Tracker,e=Package.tracker.Deps,r=Package.blaze.Blaze,n=Package.blaze.UI,i=Package.blaze.Handlebars,a=Package["templating-runtime"].Template,u=Package.ejson.EJSON,s=Package.meteor.Meteor,l=Package.meteor.global,c=Package.meteor.meteorEnv,p=Package["iron:core"].Iron,h=Package.htmljs.HTML,f=Package.spacebars.Spacebars,d,y,_,m,g;(function(){d=new s.EnvironmentVariable}).call(this),function(){y=["get","post","put","delete","patch"]}.call(this),function(){var o=p.Controller,e=p.Url,r=p.MiddlewareStack,n=p.utils.assert;_=o.extend({constructor:function(o){_.__super__.constructor.apply(this,arguments),o=o||{},this.options=o,this._onStopCallbacks=[],this.route=o.route,this.params=[];var e=this.lookupOption("data");"function"==typeof e?this.data=t.bind(e,this):"undefined"!=typeof e&&(this.data=function(){return e}),this.init(o)}}),_.prototype.lookupOption=function(o){if(this.route&&this.route.options&&t.has(this.route.options,o))return this.route.options[o];if(t.has(this.options,o))return this.options[o];if("undefined"!=typeof this[o])return this[o];var e=d.get();return e&&t.has(e,o)?e[o]:this.router&&this.router.options&&t.has(this.router.options,o)?this.router.options[o]:void 0},_.prototype.configureFromUrl=function(t,o,e){n("string"==typeof t,"url must be a string"),o=o||{},this.request=o.request||{},this.response=o.response||{},this.url=o.url||t,this.originalUrl=o.originalUrl||t,this.method=this.request.method,this.route&&this.setParams(this.route.params(t),e)},_.prototype._collectHooks=function(){var o=this,e=t.toArray(arguments),r=function(e){if(!e)return[];var r=o.router.lookupHook,n=t.isArray(e)?e:[e];return t.map(n,function(t){return r(t)})},n=function(o,e){var i=[];return o.__super__&&(i=i.concat(n(o.__super__.constructor,e))),t.has(o.prototype,e)?i.concat(r(o.prototype[e])):i},i=function(t){for(var o=0;o<e.length;o++)t(e[o])},a=[];i(function(t){var e=o.route&&o.route.getName(),r=o.router.getHooks(t,e);a=a.concat(r)});var u=[];i(function(t){var e=n(o.constructor,t);u=u.concat(e)});var s=[];i(function(e){if(t.has(o,e)){var n=r(o[e]);s=s.concat(n)}});var l=[];o.route&&i(function(t){var e=r(o.route.options[t]);l=l.concat(e)});var c=a.concat(l).concat(u).concat(s);return c},_.prototype.runHooks=function(){for(var t=this._collectHooks.apply(this,arguments),o=0,e=t.length;o<e;o++){var r=t[o];r.call(this)}return t.length},_.prototype.getParams=function(){return this.params},_.prototype.setParams=function(t){return this.params=t,this},p.RouteController=_}.call(this),function(){var r=p.Controller,n=p.Url,i=p.MiddlewareStack,a=p.utils.debug("iron-router:RouteController");if(_.prototype.init=function(t){_.__super__.init.apply(this,arguments),this._computation=null,this._paramsDep=new o.Dependency,this.location=p.Location},_.prototype.getParams=function(){return this._paramsDep.depend(),this.params},_.prototype.setParams=function(o,e){var r=function(o,r){if(!(o instanceof Array))throw new Error("you called equals with a non array value in setParams");if(!(r instanceof Array))return!1;if(o.length!==r.length)return!1;for(var n=0;n<o.length;n++)if(!u.equals(o[n],r[n],e))return!1;var i=t.keys(o),a=t.keys(r),s;if(i.length!==a.length)return!1;for(var n=0;n<i.length;n++){if(s=i[n],!t.has(r,s))return!1;if(!u.equals(o[s],r[s]))return!1}return!0};if(!r(this.params,o))return this.params=o,e=e||{},e.reactive!==!1&&this._paramsDep.changed(),this},_.prototype.dispatch=function(t,o,r){if(this._computation&&!this._computation.stopped)throw new Error("RouteController computation is already running. Stop it first.");var n=this;return e.nonreactive(function(){e.autorun(function(e){n._computation=e,t.dispatch(o,n,r)})}),n},_.prototype._runRoute=function(o,r,n){var a=this,u=this._collectHooks("subscriptions");t.each(u,function(t){a.wait(t.call(a))});var s=this._collectHooks("waitOn");t.each(s,function(t){a.wait(t.call(a))});var l=s.length>0,c,h,f=function(){return e.nonreactive(function(){return a._layout.template()})},d=function(){return e.nonreactive(function(){var t=a._layout._regions.main;retu
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.jquery.$,i=Package.jquery.jQuery;!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):i)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,r;!function(t){function i(e,t){return $.call(e,t)}function o(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"),s=e.length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),e=h.slice(0,h.length-1).concat(e),u=0;u<e.length;u+=1)if(p=e[u],"."===p)e.splice(u,1),u-=1;else if(".."===p){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||g)&&f){for(n=e.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),h)for(d=h.length;d>0;d-=1)if(i=f[h.slice(0,d).join("/")],i&&(i=i[r])){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function s(e,n){return function(){var r=w.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),h.apply(t,r.concat([e,n]))}}function a(e){return function(t){return o(t,e)}}function l(e){return function(t){m[e]=t}}function c(e){if(i(v,e)){var n=v[e];delete v[e],_[e]=!0,p.apply(t,n)}if(!i(m,e)&&!i(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var p,h,f,g,m={},v={},y={},_={},$=Object.prototype.hasOwnProperty,w=[].slice,b=/\.js$/;f=function(e,t){var n,r=u(e),i=r[0];return e=r[1],i&&(i=o(i,t),n=c(i)),i?e=n&&n.normalize?n.normalize(e,a(t)):o(e,t):(e=o(e,t),r=u(e),i=r[0],e=r[1],i&&(n=c(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=m[e];return"undefined"!=typeof t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:d(e)}}},p=function(e,n,r,o){var a,u,d,p,h,y=[],$=typeof r,w;if(o=o||e,"undefined"===$||"function"===$){for(n=!n.length&&r.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(p=f(n[h],o),u=p.f,"require"===u)y[h]=g.require(e);else if("exports"===u)y[h]=g.exports(e),w=!0;else if("module"===u)a=y[h]=g.module(e);else if(i(m,u)||i(v,u)||i(_,u))y[h]=c(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,s(o,!0),l(u),{}),y[h]=m[u]}d=r?r.apply(m[e],y):void 0,e&&(a&&a.exports!==t&&a.exports!==m[e]?m[e]=a.exports:d===t&&w||(m[e]=d))}else e&&(m[e]=r)},e=n=h=function(e,n,r,i,o){if("string"==typeof e)return g[e]?g[e](n):c(f(e,n).f);if(!e.splice){if(y=e,y.deps&&h(y.deps,y.callback),!n)return;n.splice?(e=n,n=r,r=null):e=t}return n=n||function(){},"function"==typeof r&&(r=i,i=o),i?p(t,e,n,r):setTimeout(function(){p(t,e,n,r)},4),h},h.config=function(e){return h(e)},e._defined=m,r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),i(m,e)||i(v,e)||(v[e]=[e,t,n])},r.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=r}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||r;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var r in t){var i=t[r];"function"==typeof i&&"constructor"!==r&&n.push(r)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var r={}.hasOwnProperty;for(var i in t)r.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function r(){var t=Array.prototype.unshift,r=n.prototype.constructor.length,i=e.prototype.constructor;r>0&&(t.call(arguments,e.prototy
},r.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(r){var i=[];e=[e],e.push.apply(e,r);for(var o=0;o<e.length;o++){var s=e[o].id;n.inArray(s,i)===-1&&i.push(s)}t.$element.val(i),t.$element.trigger("change")});else{var r=e.id;this.$element.val(r),this.$element.trigger("change")}},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(r){for(var i=[],o=0;o<r.length;o++){var s=r[o].id;s!==e.id&&n.inArray(s,i)===-1&&i.push(s)}t.$element.val(i),t.$element.trigger("change")})},r.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},r.prototype.query=function(e,t){var r=[],i=this,o=this.$element.children();o.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var o=i.item(t),s=i.matches(e,o);null!==s&&r.push(s)}}),t({results:r})},r.prototype.addOptions=function(e){t.appendMany(this.$element,e)},r.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.textContent?t.textContent=e.text:t.innerText=e.text),e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var r=n(t),i=this._normalizeItem(e);return i.element=t,n.data(t,"data",i),r},r.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"),null!=t)return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var r=e.children("option"),i=[],o=0;o<r.length;o++){var s=n(r[o]),a=this.item(s);i.push(a)}t.children=i}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},r.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},r.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},r}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){var n=t.get("data")||[];r.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(r,e),r.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){function r(e){return function(){return n(this).val()==e.id}}for(var i=this,o=this.$element.find("option"),s=o.map(function(){return i.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=o.filter(r(c)),d=this.item(u),p=n.extend(!0,{},c,d),h=this.option(p);u.replaceWith(h)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);t.appendMany(f,g)}a.push(f)}}return a},r}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,r){var i=n.ajax(e);return i.then(t),i.fail(r),i}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=f
this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},i.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},i}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,r){if(null==e.fn.select2){var i=["open","close","destroy"];e.fn.select2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var r=e.extend(!0,{},t),i=new n(e(this),r)}),this;if("string"==typeof t){var r,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),r=n[t].apply(n,o)}),e.inArray(t,i)>-1?this:r}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n}),"undefined"==typeof Package&&(Package={}),Package["natestrauser:select2"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,i=Package.tracker.Tracker,r=Package.tracker.Deps,o=Package.underscore._,a=Package.check.check,s=Package.check.Match,u=Package.random.Random,l,c,f,d,p,m,y;(function(){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})}).call(this),function(){function e(e){return e=e||"",e=e.trim(),e[0]&&(e=e[0].toUpperCase()+e.substr(1).toLowerCase()),e}function t(e){return e=e||"",e=e.toString(),e=e.trim(),e=e.replace(/([a-z\d])([A-Z]+)/g,"$1_$2"),e=e.replace(/[-\s]+/g,"_").toLowerCase()}function n(e){var t=e.lastIndexOf("."),n=e.substring(t,e.length);return t===-1?"":n}l=function i(r){return r=r||"",r=r.toString(),r=r.trim(),r=r.replace(n(r),""),r=t(r),r=r.replace(/[\W_]+/g," "),e(r)}}.call(this),function(){var e=function(e){return e===Object(e)};"function"!=typeof Object.getPrototypeOf&&("object"==typeof"".__proto__?Object.getPrototypeOf=function(e){return e.__proto__}:Object.getPrototypeOf=function(e){return e.constructor.prototype});var t=function(t){return e(t)&&Object.getPrototypeOf(t)===Object.prototype},n=function e(t){return"string"!=typeof t?null:t.replace(/\.[0-9]+\./g,".$.").replace(/\.[0-9]+$/g,".$")},i=function e(t,n){return"$each"===n?t:t?t+"."+n:n},r=function e(t){var n=t.slice(0,t.indexOf("["));return"$"===n.substring(0,1)?n:null};c=function(e,a){function s(e,r,u,c,f,d){!c&&u&&"$"===u.substring(0,1)&&(c=u,u=null);var p=!1,m,y=!1;u&&(f||("$push"===c||"$addToSet"===c||"$pop"===c?(t(e)&&"$each"in e?(e=e.$each,r+="[$each]"):u+=".0",f=!0):"$pull"===c&&(u+=".0",t(e)&&(y=!0),f=!0)),m=n(u),p=o.contains(a,m),r&&(l._affectedKeys[r]=u,l._genericAffectedKeys[r]=m,d&&l._positionsInsideArrays.push(r))),y||(o.isArray(e)&&!o.isEmpty(e)?(r&&l._parentPositions.push(r),o.each(e,function(e,t){s(e,r?r+"["+t+"]":t,u+"."+t,c,f,!0)})):(t(e)&&!p||!r)&&(r&&!o.isEmpty(e)&&(l._parentPositions.push(r),l._objectPositions.push(r)),o.each(e,function(t,n){void 0===t?delete e[n]:"$slice"!==n&&s(t,r?r+"["+n+"]":n,i(u,n),c,f,d)})))}function u(){l._affectedKeys={},l._genericAffectedKeys={},l._parentPositions=[],l._positionsInsideArrays=[],l._objectPositions=[],s(l._obj)}var l=this;l._obj=e,l._affectedKeys={},l._genericAffectedKeys={},l._parentPositions=[],l._positionsInsideArrays=[],l._objectPositions=[],s(l._obj),l.forEachNode=function(e,t){if("function"!=typeof e)throw new Error("filter requires a loop function");t=o.extend({endPointsOnly:!0},t);var n={};o.each(l._affectedKeys,function(i,a){t.endPointsOnly&&o.contains(l._parentPositions,a)||e.call({value:l.getValueForPosition(a),operator:r(a),position:a,key:i,genericKey:l._genericAffectedKeys[a],updateValue:function(e){n[a]=e},remove:function(){n[a]=void 0}})}),o.each(n,function(e,t){l.setValueForPosition(t,e)})},l.getValueForPosition=function(e){for(var n,i=e.split("["),r=l._obj,a=0,s=i.length;a<s;a++)if(n=i[a],"]"===n.slice(-1)&&(n=n.slice(0,-1)),r=r[n],!o.isArray(r)&&!t(r)&&a<s-1)return;return r},l.setValueForPosition=function(e,n){for(var i,r,a=e.split("["),s=l._obj,c=0,f=a.length;c<f;c++)if(r=a[c],"]"===r.slice(-1)&&(r=r.slice(0,-1)),c===f-1)s[r]=n,void 0===n&&delete s[r];else if(void 0===s[r]&&void 0!==n&&(i=a[c+1],i=parseInt(i,10),s[r]=isNaN(i)?{}:[]),s=s[r],!o.isArray(s)&&!t(s)&&c<f-1)return;u()},l.removeValueForPosition=function(e){l.setValueForPosition(e,void 0)},l.getKeyForPosition=function(e){return l._affectedKeys[e]},l.getGenericKeyForPosition=function(e){return l._genericAffectedKeys[e]},l.getInfoForKey=function(e){var t=l.getPositionForKey(e);if(t)return{value:l.getValueForPosition(t),operator:r(t)};for(var n=l.getPositionsForGenericKey(e+".$"),i,o,a=0,s=n.length;a<s;a++)if(i=n[a],o=l.getValueForPosition(i)||l.getValueForPosition(i.slice(0,i.lastIndexOf("["))))return{value:o,operator:r(i)}},l.getPositionForKey=function(e){for(var t in l._affectedKeys)if(l._affectedKeys.hasOwnProperty(t)&&l._affectedKeys[t]===e)return t},l.g
n._simpleSchema=t,n._schema=t.schema(),n._schemaKeys=o.keys(n._schema),n._invalidKeys=[],n._deps={},n._depsAny=new r.Dependency,o.each(n._schemaKeys,function(e){n._deps[e]=new r.Dependency})},y.prototype.validate=function n(i,r){var a=this;r=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},r||{}),e.isClient&&void 0===r.extendedCustomContext.userId&&(r.extendedCustomContext.userId=e.userId&&e.userId()||null);var s=t(i,r.modifier,r.upsert,null,a._simpleSchema,r.extendedCustomContext),u=o.pluck(a._invalidKeys,"name");a._invalidKeys=s;var l=o.pluck(a._invalidKeys,"name"),c=o.union(l,u);return a._markKeysChanged(c),0===a._invalidKeys.length},y.prototype.validateOne=function n(i,r,a){var s=this,u,l,c;a=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},a||{}),e.isClient&&void 0===a.extendedCustomContext.userId&&(a.extendedCustomContext.userId=e.userId&&e.userId()||null);var f=t(i,a.modifier,a.upsert,r,s._simpleSchema,a.extendedCustomContext),d=[];for(u=0,l=s._invalidKeys.length;u<l;u++)c=s._invalidKeys[u],c.name!==r&&d.push(c);for(s._invalidKeys=d,u=0,l=f.length;u<l;u++)c=f[u],s._invalidKeys.push(c);return s._markKeysChanged([r]),!s._keyIsInvalid(r)},y.prototype.resetValidation=function e(){var t=this,n=o.pluck(t._invalidKeys,"name");t._invalidKeys=[],t._markKeysChanged(n)},y.prototype.isValid=function e(){var t=this;return t._depsAny.depend(),!t._invalidKeys.length},y.prototype.invalidKeys=function e(){var t=this;return t._depsAny.depend(),t._invalidKeys},y.prototype.addInvalidKeys=function e(t){var n=this;if(t&&t.length){var i=[];o.each(t,function(e){i.push(e.name),n._invalidKeys.push(e)}),n._markKeysChanged(i)}},y.prototype._markKeysChanged=function e(t){var n=this;t&&t.length&&(o.each(t,function(e){var t=d._makeGeneric(e);t in n._deps&&n._deps[t].changed()}),n._depsAny.changed())},y.prototype._getInvalidKeyObject=function e(t,n){var i=this;n=n||d._makeGeneric(t);var r=o.findWhere(i._invalidKeys,{name:t});return r||(r=o.findWhere(i._invalidKeys,{name:n})),r},y.prototype._keyIsInvalid=function e(t,n){return!!this._getInvalidKeyObject(t,n)},y.prototype.keyIsInvalid=function e(t){var n=this,i=d._makeGeneric(t);return n._deps[i]&&n._deps[i].depend(),n._keyIsInvalid(t,i)},y.prototype.keyErrorMessage=function e(t){var n=this,i=d._makeGeneric(t);n._deps[i]&&n._deps[i].depend();var r=n._getInvalidKeyObject(t,i);return r?n._simpleSchema.messageForError(r.type,r.name,null,r.value):""},y.prototype.getErrorObject=function t(){var n=this,i,r=this._invalidKeys;r.length?(i=n.keyErrorMessage(r[0].name),r=o.map(r,function(e){return o.extend({message:n.keyErrorMessage(e.name)},e)})):i="Failed validation";var a=new Error(i);return a.invalidKeys=r,e.isServer&&(a.sanitizedError=new e.Error(400,i)),a}}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["aldeed:simple-schema"]={},{SimpleSchema:d,MongoObject:c,humanize:l})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.tracker.Tracker,r=Package.tracker.Deps,o=Package.retry.Retry,i=Package["ddp-client"].DDP,s=Package.mongo.Mongo,c=Package.underscore._,u,l;(function(){var t=__meteor_runtime_config__.autoupdateVersion||"unknown",n=__meteor_runtime_config__.autoupdateVersionRefreshable||"unknown";u=new s.Collection("meteor_autoupdate_clientVersions"),l={},l.newClientAvailable=function(){return!!u.findOne({_id:"version",version:{$ne:t}})||!!u.findOne({_id:"version-refreshable",version:{$ne:n}})},l._ClientVersions=u;var a=!1,r=new o({minCount:0,baseTimeout:3e4}),i=0;l._retrySubscription=function(){e.subscribe("meteor_autoupdate_clientVersions",{onError:function(t){e._debug("autoupdate subscription failed:",t),i++,r.retryLater(i,function(){l._retrySubscription()})},onReady:function(){if(Package.reload)var r=function(r){var i=this;if("version-refreshable"===r._id&&r.version!==n){n=r.version;var s=r.assets&&r.assets.allCss||[],u=[];c.each(document.getElementsByTagName("link"),function(e){"__meteor-css__"===e.className&&u.push(e)});var l=function(t,n){var r=c.once(n);if(t.onload=function(){a=!0,r()},!a)var o=e.setInterval(function(){t.sheet&&(r(),e.clearInterval(o))},50)},d=c.after(s.length,function(){c.each(u,function(e){e.parentNode.removeChild(e)})}),f=function(t){document.getElementsByTagName("head").item(0).appendChild(t),l(t,function(){e.setTimeout(d,200)})};0!==s.length?c.each(s,function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("class","__meteor-css__"),t.setAttribute("href",e.url),f(t)}):d()}else"version"===r._id&&r.version!==t&&(o&&o.stop(),Package.reload&&Package.reload.Reload._reload())},o=u.find().observe({added:r,changed:r})}})},l._retrySubscription()}).call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package.autoupdate={},{Autoupdate:l})}();
!function(){"undefined"==typeof Package&&(Package={}),Package["meteor-platform"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,a=Package.meteor.meteorEnv,n=Package.underscore._,o=Package.modules.meteorInstall,r=Package.modules.Buffer,s=Package.modules.process,c=Package["ecmascript-runtime"].Symbol,u=Package["ecmascript-runtime"].Map,m=Package["ecmascript-runtime"].Set,i=Package["babel-runtime"].meteorBabelHelpers,l=Package.promise.Promise,p,d=o({node_modules:{meteor:{webapp:{"webapp_client.js":function(){p={_isCssLoaded:function(){function e(){return 0===document.styleSheets.length||n.find(document.styleSheets,function(e){return e.cssText&&!e.cssRules?!e.cssText.match(/meteor-css-not-found-error/):!n.find(e.cssRules,function(e){return".meteor-css-not-found-error"===e.selectorText})})}return e}()}}}}}},{extensions:[".js",".json"]});d("./node_modules/meteor/webapp/webapp_client.js"),"undefined"==typeof Package&&(Package={}),function(e,t){for(var a in t)a in e||(e[a]=t[a])}(Package.webapp={},{WebApp:p})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.underscore._,i=Package.ejson.EJSON,a=Package.modules.meteorInstall,f=Package.modules.Buffer,o=Package.modules.process,c,l,s=a({node_modules:{meteor:{logging:{"logging.js":["cli-color",function(t){c=function(){return c.info.apply(this,arguments)};var n=0,a=[],f=0;c._intercept=function(e){n+=e},c._suppress=function(e){f+=e},c._intercepted=function(){var e=a;return a=[],n=0,e},c.outputFormat="json";var o={debug:"green",warn:"magenta",error:"red"},l="blue",s=["time","timeInexact","level","file","line","program","originApp","satellite","stderr"],u=s.concat(["app","message"]),d=function(t){var n=c.format(t),r=t.level;"undefined"!=typeof console&&console[r]?console[r](n):e._debug(n)};c._getCallerDetails=function(){var e=function(){var e=new Error,t=e.stack;return t},t=e();if(!t)return{};for(var n=t.split("\n"),r,i=1;i<n.length;++i){if(r=n[i],r.match(/^\s*at eval \(eval/))return{file:"eval"};if(!r.match(/packages\/(?:local-test[:_])?logging(?:\/|\.js)/))break}var a={},f=/(?:[@(]| at )([^(]+?):([0-9:]+)(?:\)|$)/.exec(r);return f?(a.line=f[2].split(":")[0],a.file=f[1].split("/").slice(-1)[0].split("?")[0],a):a},r.each(["debug","info","warn","error"],function(t){c[t]=function(o){if(f)return void f--;var l=!1;n&&(n--,l=!0);var u=!r.isObject(o)||r.isRegExp(o)||r.isDate(o)?{message:new String(o).toString()}:o;if(r.each(s,function(e){if(u[e])throw new Error("Can't set '"+e+"' in log message")}),r.has(u,"message")&&!r.isString(u.message))throw new Error("The 'message' field in log objects must be a string");if(u.omitCallerDetails||(u=r.extend(c._getCallerDetails(),u)),u.time=new Date,u.level=t,"debug"!==t)if(l)a.push(i.stringify(u));else if(e.isServer)if("colored-text"===c.outputFormat)console.log(c.format(u,{color:!0}));else{if("json"!==c.outputFormat)throw new Error("Unknown logging output format: "+c.outputFormat);console.log(i.stringify(u))}else d(u)}}),c.parse=function(e){var t=null;if(e&&"{"===e.charAt(0))try{t=i.parse(e)}catch(e){}return t&&t.time&&t.time instanceof Date?t:null},c.format=function(n,a){n=i.clone(n),a=a||{};var f=n.time;if(!(f instanceof Date))throw new Error("'time' must be a Date object");var c=n.timeInexact,s=n.level||"info",d=n.file,p=n.line,b=n.app||"",m=n.originApp,h=n.message||"",v=n.program||"",g=n.satellite,x=n.stderr||"";r.each(u,function(e){delete n[e]}),r.isEmpty(n)||(h&&(h+=" "),h+=i.stringify(n));var y=function(e){return e<10?"0"+e:e.toString()},j=function(e){return e<100?"0"+y(e):e.toString()},O=f.getFullYear().toString()+y(f.getMonth()+1)+y(f.getDate()),_=y(f.getHours())+":"+y(f.getMinutes())+":"+y(f.getSeconds())+"."+j(f.getMilliseconds()),w="("+-((new Date).getTimezoneOffset()/60)+")",A="";b&&(A+=b),m&&m!==b&&(A+=" via "+m),A&&(A="["+A+"] ");var N=[];v&&N.push(v),d&&N.push(d),p&&N.push(p);var S=r.isEmpty(N)?"":"("+N.join(":")+") ";g&&(S+=["[",g,"]"].join(""));var P=x?"(STDERR) ":"",z=[s.charAt(0).toUpperCase(),O,"-",_,w,c?"? ":" ",A,S,P].join(""),k=function(n,r){return a.color&&e.isServer&&r?t("cli-color")[r](n):n};return k(z,a.metaColor||l)+k(h,o[s])},c.objFromText=function(e,t){var n={message:e,level:"info",time:new Date,timeInexact:!0};return r.extend(n,t)}}],node_modules:{"cli-color":{"package.json":function(e,t){t.name="cli-color",t.version="0.2.3",t.main="lib"},lib:{"index.js":["es5-ext/lib/Object/descriptor","es5-ext/lib/Object/extend","es5-ext/lib/Object/map","es5-ext/lib/Object/reduce","es5-ext/lib/String/prototype/repeat","memoizee","tty","./_xterm-match",function(e,t,n){"use strict";var r=e("es5-ext/lib/Object/descriptor"),i=e("es5-ext/lib/Object/extend"),a=e("es5-ext/lib/Object/map"),f=e("es5-ext/lib/Object/reduce"),c=e("es5-ext/lib/String/prototype/repeat"),l=e("memoizee"),s=e("tty"),u=Array.prototype.join,d=Object.defineProperty,p=Object.defineProperties,b=Math.abs,m=Math.floor,h=Math.max,v=Math.min,g,x,y,j,O,_,w,A,N,S,P;g=i({bold:{_bold:[1,22]},italic:{_italic:[3,23]},underline:{_underline:[4,24]},blink:{_blink:[5,25]},inverse:{_inverse:[7,27]},strike:{_strike:[9,29]}},["black","red
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,c=Package.meteor.meteorEnv,n=Package.underscore._,o=Package["reactive-dict"].ReactiveDict,i=Package.ejson.EJSON,t;(function(){t=new o("session")}).call(this),"undefined"==typeof Package&&(Package={}),function(e,a){for(var c in a)c in e||(e[c]=a[c])}(Package.session={},{Session:t})}();
!function(){var a=Package["ddp-client"].DDP,e;"undefined"==typeof Package&&(Package={}),function(a,e){for(var n in e)n in a||(a[n]=e[n])}(Package.livedata={},{DDP:a,LivedataTest:e})}();
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,a=Package.meteor.meteorEnv,r;(function(){var n=0,a=!1;r={hold:function(){if(!e.isCordova)return{release:function(){}};if(a)throw new Error("Can't show launch screen once it's hidden");n++;var r=!1,o=function(){e.isCordova&&(r||(r=!0,n--,0===n&&"undefined"!=typeof navigator&&navigator.splashscreen&&(a=!0,navigator.splashscreen.hide())))};return{release:o}}}}).call(this),function(){var n=r.hold(),a=Package.templating&&Package.templating.Template;e.startup(function(){a?Package["iron:router"]?Package["iron:router"].Router.onAfterAction(function(){n.release()}):(a.body.onRendered(function(){n.release()}),setTimeout(function(){n.release()},6e3)):n.release()})}.call(this),"undefined"==typeof Package&&(Package={}),function(e,n){for(var a in n)a in e||(e[a]=n[a])}(Package["launch-screen"]={},{LaunchScreen:r})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,r=Package.jquery.jQuery,i=Package.underscore._,a=Package["templating-runtime"].Template,u=Package["reactive-var"].ReactiveVar,l=Package["iron:router"].Router,s=Package["iron:router"].RouteController,c=Package["aldeed:simple-schema"].SimpleSchema,p=Package["aldeed:simple-schema"].MongoObject,m=Package.modules.meteorInstall,d=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,g=Package["ecmascript-runtime"].Map,v=Package["ecmascript-runtime"].Set,b=Package["babel-runtime"].meteorBabelHelpers,k=Package.promise.Promise,y=Package["iron:core"].Iron,x=Package.webapp.WebApp,w=Package.logging.Log,j=Package.deps.Tracker,T=Package.deps.Deps,C=Package.session.Session,I=Package["ddp-client"].DDP,_=Package.mongo.Mongo,M=Package.ui.Blaze,H=Package.ui.UI,P=Package.ui.Handlebars,O=Package.spacebars.Spacebars,F=Package.check.check,D=Package.check.Match,$=Package.random.Random,S=Package.ejson.EJSON,z=Package["launch-screen"].LaunchScreen,R=Package.htmljs.HTML,A=m({node_modules:{meteor:{"ohif:core":{"main.js":["meteor/meteor",function(e,t,n){n.export({OHIF:function(){return r}});var o;n.import("meteor/meteor",{Meteor:function(e){o=e}});var r={log:{},ui:{},utils:{},viewer:{},cornerstone:{}};o.isClient&&(window.OHIF=r)}],client:{"index.js":["./lib","./helpers","./components","./ui","./routes.js",function(e,t,n){n.import("./lib"),n.import("./helpers"),n.import("./components"),n.import("./ui"),n.import("./routes.js")}],"routes.js":["meteor/iron:router",function(e,t,n){var o;n.import("meteor/iron:router",{Router:function(e){o=e}}),o.route("/playground",function(){this.render("componentPlayground")})}],components:{"index.js":["./base","./bootstrap","./playground/playground.html","./playground/playground.styl","./playground/playground.js",function(e,t,n){n.import("./base"),n.import("./bootstrap"),n.import("./playground/playground.html"),n.import("./playground/playground.styl"),n.import("./playground/playground.js")}],base:{"component.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var i=function(){function e(t){o(this,e),t.view._component=this,t.sections={},this.templateInstance=t,this.registeredItems=new v}return e.prototype.registerSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(this.parent=e,e.registeredItems.add(this))}return e}(),e.prototype.unregisterSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(delete this.parent,e.registeredItems.delete(this))}return e}(),e}();r.Component=i}],"index.js":["./component.js","./mixin.js","./template.js","./section/section.html","./section/section.js","./mixins/action.js","./mixins/button.js","./mixins/checkbox.js","./mixins/component.js","./mixins/form.js","./mixins/formItem.js","./mixins/group.js","./mixins/groupRadio.js","./mixins/input.js","./mixins/link.js","./mixins/schemaData.js","./mixins/select.js","./mixins/select2.js","./templates/button.html","./templates/custom.html","./templates/div.html","./templates/form.html","./templates/input.html","./templates/link.html","./templates/select.html","./wrappers/label.html","./wrappers/labelContent.html",function(e,t,n){n.import("./component.js"),n.import("./mixin.js"),n.import("./template.js"),n.import("./section/section.html"),n.import("./section/section.js"),n.import("./mixins/action.js"),n.import("./mixins/button.js"),n.import("./mixins/checkbox.js"),n.import("./mixins/component.js"),n.import("./mixins/form.js"),n.import("./mixins/formItem.js"),n.import("./mixins/group.js"),n.import("./mixins/groupRadio.js"),n.import("./mixins/input.js"),n.import("./mixins/link.js"),n.import("./mixins/schemaData.js"),n.import("./mixins/select.js"),n.import("./mixins/select2.js"),n.import("./templates/button.html"),n.import("./templates/custom.html"),n.import("./templat
n.import("./dialog/unsavedChangesDialog.html"),n.import("./dialog/unsavedChangesDialog.js"),n.import("./dropdown/backdrop.html"),n.import("./dropdown/form.html"),n.import("./dropdown/form.js"),n.import("./form/button.html"),n.import("./form/form.html"),n.import("./form/group.html"),n.import("./form/link.html"),n.import("./input/checkbox.html"),n.import("./input/hidden.html"),n.import("./input/groupRadio.html"),n.import("./input/password.html"),n.import("./input/radio.html"),n.import("./input/range.html"),n.import("./input/select.html"),n.import("./input/text.html")}],dialog:{"confirm.html":["./template.confirm.js",function(e,t,n){n.exports=e("./template.confirm.js")}],"template.confirm.js":function(){a.__checkName("dialogConfirm"),a.dialogConfirm=new a("Template.dialogConfirm",function(){var e=this;return M._TemplateWith(function(){return O.dataMustache(e.lookup("extend"),e.lookup("."),O.kw({dialogClass:"modal-sm",title:O.dataMustache(e.lookup("choose"),O.dot(e.lookup("."),"title"),"Confirmation")}))},function(){return O.include(e.lookupTemplate("dialogForm"),function(){return["\n ",R.P(M.View("lookup:choose",function(){return O.mustache(e.lookup("choose"),O.dot(e.lookup("."),"message"),"Are you sure you want to perform this action?")})),"\n "]})})})},"form.html":["./template.form.js",function(e,t,n){n.exports=e("./template.form.js")}],"template.form.js":function(){a.__checkName("dialogForm"),a.dialogForm=new a("Template.dialogForm",function(){var e=this;return R.DIV({id:function(){return O.mustache(O.dot(e.lookup("."),"id"))},class:"modal fade",tabindex:"-1",role:"dialog"},"\n ",R.DIV({class:function(){return["modal-dialog ",O.mustache(O.dot(e.lookup("."),"dialogClass"))]},role:"document"},"\n ",M._TemplateWith(function(){return{class:O.call("modal-content"),hideValidationBox:O.call(!0),api:O.call(O.dataMustache(e.lookup("extend"),O.dot(e.lookup("instance"),"api"),O.dot(e.lookup("instance"),"data","api"))),schema:O.call(O.dot(e.lookup("."),"schema"))}},function(){return O.include(e.lookupTemplate("form"),function(){return["\n ",R.DIV({class:"modal-header"},"\n ",M._TemplateWith(function(){return{class:O.call("close"),action:O.call("cancel"),tagAttributes:O.call(O.dataMustache(e.lookup("extend"),O.dot(e.lookup("."),"tagAttributes"),O.kw({"data-dismiss":"modal","aria-label":"Close"})))}},function(){return O.include(e.lookupTemplate("button"),function(){return R.SPAN({"aria-hidden":"true"},R.CharRef({html:"&times;",str:"×"}))})}),"\n ",R.H4({class:"modal-title"},M.View("lookup:..title",function(){return O.mustache(O.dot(e.lookup("."),"title"))})),"\n "),"\n ",R.DIV({class:"modal-body"},"\n ",M._InOuterTemplateScope(e,function(){return O.include(function(){return O.call(e.templateContentBlock)})}),"\n "),"\n ",R.DIV({class:"modal-footer"},"\n ",M._TemplateWith(function(){return{action:O.call("cancel"),class:O.call(O.dataMustache(e.lookup("concat"),"btn btn-cancel ",O.dataMustache(e.lookup("choose"),O.dot(e.lookup("."),"cancelClass"),"btn-default"))),tagAttributes:O.call(O.dataMustache(e.lookup("extend"),O.dot(e.lookup("."),"tagAttributes"),O.kw({"data-dismiss":"modal"})))}},function(){return O.include(e.lookupTemplate("button"),function(){return M.View("lookup:choose",function(){return O.mustache(e.lookup("choose"),O.dot(e.lookup("."),"cancelLabel"),"Cancel")})})}),"\n ",M._TemplateWith(function(){return{action:O.call("confirm"),class:O.call(O.dataMustache(e.lookup("concat"),"btn btn-confirm ",O.dataMustache(e.lookup("choose"),O.dot(e.lookup("."),"confirmClass"),"btn-primary")))}},function(){return O.include(e.lookupTemplate("button"),function(){return M.View("lookup:choose",function(){return O.mustache(e.lookup("choose"),O.dot(e.lookup("."),"confirmLabel"),"Confirm")})})}),"\n "),"\n "]})}),"\n "),"\n ")})},"form.js":["meteor/templating","meteor/underscore","meteor/ohif:core",function(e,t,n)
"playground.styl":["./playground.styl.css",function(e,t,n){n.exports=e("./playground.styl.css")}],"playground.styl.css":["meteor/modules",function(e,t,n){n.exports=e("meteor/modules").addStyles(".layout-container {\n align-items: stretch;\n display: flex;\n flex-flow: column nowrap;\n height: 100vh;\n}\n.layout-container .layout-header {\n background-color: #0ff;\n flex-grow: 0;\n}\n.layout-container .layout-body {\n align-items: stretch;\n display: flex;\n flex-grow: 1;\n}\n.layout-sidebar {\n background-color: #0f0;\n flex-grow: 0;\n}\n.layout-main {\n background-color: #fff;\n flex-grow: 1;\n}\n.toolbar-drawer {\n overflow: hidden;\n transition: max-height 0.3s ease;\n}\n.toolbar-drawer:not(.open) {\n max-height: 0 !important;\n}\n.layout-sidebar-left,\n.layout-sidebar-right {\n overflow: hidden;\n transition: max-width 0.3s ease;\n}\n.layout-sidebar-left:not(.open),\n.layout-sidebar-right:not(.open) {\n max-width: 0 !important;\n}\n")}]}},helpers:{"blaze.js":["meteor/meteor","meteor/templating","meteor/session","meteor/reactive-var",function(e,t,n){var o;n.import("meteor/meteor",{Meteor:function(e){o=e}});var r;n.import("meteor/templating",{Template:function(e){r=e}});var i;n.import("meteor/session",{Session:function(e){i=e}});var a;n.import("meteor/reactive-var",{ReactiveVar:function(e){a=e}}),r.registerHelper("absoluteUrl",function(e){return o.absoluteUrl(e)}),r.registerHelper("instance",function(){return r.instance()}),r.registerHelper("session",function(e){return i.get(e)}),r.registerHelper("reactive",function(e){return e instanceof a?e.get():e})}],"data.js":["babel-runtime/helpers/toConsumableArray","babel-runtime/helpers/typeof","meteor/underscore","meteor/templating",function(e,t,n){var o;n.import("babel-runtime/helpers/toConsumableArray",{default:function(e){o=e}});var r;n.import("babel-runtime/helpers/typeof",{default:function(e){r=e}});var i;n.import("meteor/underscore",{_:function(e){i=e}});var a;n.import("meteor/templating",{Template:function(e){a=e}});var u=function e(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var a=n[0]||{},u=i.last(n).hash,l=i.initial(n);return i.each(l,function(e){"object"===("undefined"==typeof e?"undefined":r(e))&&i.extend(a,e)}),i.extend(a,u),a};a.registerHelper("extend",function(){return u.apply(void 0,arguments)}),a.registerHelper("clone",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.slice();return r.unshift({}),u.apply(void 0,o(r))}),a.registerHelper("choose",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=void 0;return i.each(i.initial(t,1),function(e){o||(o=e)}),o})}],"debug.js":["meteor/underscore","meteor/meteor","meteor/templating",function(e,t,n){var o;n.import("meteor/underscore",{_:function(e){o=e}});var r;n.import("meteor/meteor",{Meteor:function(e){r=e}});var i;n.import("meteor/templating",{Template:function(e){i=e}}),r.isDevelopment&&i.registerHelper("debug",function(){var e;(e=console).debug.apply(e,arguments)})}],"index.js":["./blaze.js","./data.js","./debug.js","./logical.js","./number.js","./string.js","./typing.js","./ui.js",function(e,t,n){n.import("./blaze.js"),n.import("./data.js"),n.import("./debug.js"),n.import("./logical.js"),n.import("./number.js"),n.import("./string.js"),n.import("./typing.js"),n.import("./ui.js")}],"logical.js":["meteor/underscore","meteor/templating",function(e,t,n){var o;n.import("meteor/underscore",{_:function(e){o=e}});var r;n.import("meteor/templating",{Template:function(e){r=e}}),r.registerHelper("bool",function(e){return!!e}),r.registerHelper("eq",function(e,t){return e===t}),r.registerHelper("ne",function(e,t){return e!==t}),r.registerHelper("gt",function(e,t){return e>t}),r.registerHelper("lt",function(e,t){return e<t}),r.registerHelper("gte",function(e,t){return e>=t}),r.registerHelper("lte",function(e,t){return e<=t}),r.registerHelper("not",function(e){return!e}),r.registerHelper("and",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0;return o.each(o.initial(t,1),fun
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,a=Package.jquery.jQuery,u=Package.modules.meteorInstall,r=Package.modules.Buffer,c=Package.modules.process,l=Package["ecmascript-runtime"].Symbol,s=Package["ecmascript-runtime"].Map,i=Package["ecmascript-runtime"].Set,d=Package["babel-runtime"].meteorBabelHelpers,p=Package.promise.Promise,m=Package.webapp.WebApp,k=Package.logging.Log,g=Package.deps.Tracker,f=Package.deps.Deps,P=Package.session.Session,h=Package["ddp-client"].DDP,b=Package.mongo.Mongo,v=Package.ui.Blaze,B=Package.ui.UI,G=Package.ui.Handlebars,V=Package.spacebars.Spacebars,j=Package["templating-runtime"].Template,I=Package.check.check,y=Package.check.Match,L=Package.underscore._,S=Package.random.Random,x=Package.ejson.EJSON,D=Package["launch-screen"].LaunchScreen,_=Package.htmljs.HTML,M=u({node_modules:{meteor:{"ohif:design":{components:{roundedButtonGroup:{"template.roundedButtonGroup.js":function(){j.__checkName("roundedButtonGroup"),j.roundedButtonGroup=new j("Template.roundedButtonGroup",function(){var e=this;return _.DIV({class:function(){return[V.mustache(e.lookup("class"))," roundedButtonGroup clearfix center-table"]}},"\n ",v.Each(function(){return{_sequence:V.call(V.dot(e.lookup("."),"options")),_variable:"item"}},function(){return["\n ",_.A({class:function(){return["roundedButtonWrapper noselect ",v.If(function(){return V.dataMustache(e.lookup("eq"),e.lookup("getValue"),V.dot(e.lookup("item"),"value"))},function(){return"active"})]},"data-value":function(){return V.mustache(V.dot(e.lookup("item"),"value"))}},"\n ",_.DIV({class:"roundedButton"},"\n ",v.If(function(){return V.call(V.dot(e.lookup("item"),"svgLink"))},function(){return["\n ",_.SVG({style:function(){return["width: ",V.mustache(V.dot(e.lookup("item"),"svgWidth")),"px; height: ",V.mustache(V.dot(e.lookup("item"),"svgHeight")),"px"]}},"\n ",_.USE({"xlink:href":function(){return V.mustache(e.lookup("absoluteUrl"),V.dot(e.lookup("item"),"svgLink"))}}),"\n "),"\n "]}),"\n ",v.If(function(){return V.call(V.dot(e.lookup("item"),"text"))},function(){return["\n ",_.SPAN(v.View("lookup:item.text",function(){return V.mustache(V.dot(e.lookup("item"),"text"))})),"\n "]}),"\n ",v.If(function(){return V.call(V.dot(e.lookup("item"),"iconClasses"))},function(){return["\n ",_.I({class:function(){return V.mustache(V.dot(e.lookup("item"),"iconClasses"))}}),"\n "]}),"\n "),"\n ",v.If(function(){return V.call(V.dot(e.lookup("item"),"bottomLabel"))},function(){return["\n ",_.DIV({class:"bottomLabel"},v.View("lookup:item.bottomLabel",function(){return V.mustache(V.dot(e.lookup("item"),"bottomLabel"))})),"\n "]}),"\n "),"\n "]}),"\n ")})},"roundedButtonGroup.js":function(){j.roundedButtonGroup.onCreated(function(){var e=j.instance(),t=e.data.value;e.getValue=function(){return t.get(e.data.key)},e.setValue=function(n){var o=[n];t instanceof ReactiveDict&&o.unshift(e.data.key),t.set.apply(t,o)},e.getValue()||e.data.toggleable||e.setValue(e.data.options[0].value)}),j.roundedButtonGroup.events({"click [data-value]":function(){function e(e,t){e.preventDefault();var n=o(e.currentTarget);if(!n.hasClass("disabled")){var a=n.hasClass("active")&&t.data.toggleable,u=a?null:n.attr("data-value");t.setValue(u)}}return e}()}),j.roundedButtonGroup.helpers({getValue:function(){function e(){return j.instance().getValue()}return e}()})}}}}}}},{extensions:[".js",".json",".styl",".html"]});M("./node_modules/meteor/ohif:design/components/roundedButtonGroup/template.roundedButtonGroup.js"),M("./node_modules/meteor/ohif:design/components/roundedButtonGroup/roundedButtonGroup.js"),"undefined"==typeof Package&&(Package={}),Package["ohif:design"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,a=Package.jquery.jQuery,r=Package.modules.meteorInstall,i=Package.modules.Buffer,s=Package.modules.process,l=Package["ecmascript-runtime"].Symbol,u=Package["ecmascript-runtime"].Map,c=Package["ecmascript-runtime"].Set,d=Package["babel-runtime"].meteorBabelHelpers,f=Package.promise.Promise,m,h,g,p,v,y=r({node_modules:{meteor:{"ohif:cornerstone":{"main.js":["./namespace.js","./client/",function(e,t,n){n.export({OHIF:function(){return o},Cornerstone:function(){return a}});var o,a;n.import("./namespace.js",{OHIF:function(e){o=e},Cornerstone:function(e){a=e}}),n.import("./client/")}],"namespace.js":["babel-runtime/helpers/extends","meteor/ohif:core",function(e,t,n){n.export({OHIF:function(){return a},Cornerstone:function(){return r}});var o;n.import("babel-runtime/helpers/extends",{default:function(e){o=e}});var a;n.import("meteor/ohif:core",{OHIF:function(e){a=e}});var r=o({},a.cornerstone);a.cornerstone=r}],client:{"index.js":["../namespace","./lib/classes/MetadataProvider",function(e,t,n){var o;n.import("../namespace",{Cornerstone:function(e){o=e}});var a;n.import("./lib/classes/MetadataProvider",{MetadataProvider:function(e){a=e}}),o.metadataProvider=new a}],lib:{"parsingUtils.js":function(e,t,n){n.export({parsingUtils:function(){return o}});var o={isValidDataSet:function(){function e(e){return e instanceof h.DataSet}return e}(),attributeTag:function(){function e(e,t){if(this.isValidDataSet(e)&&t in e.elements){var n=e.elements[t];if(n&&4===n.length){var o=e.byteArrayParser.readUint16,a=e.byteArray,r=n.dataOffset;return"x"+("00000000"+(256*o(a,r)*256+o(a,r+2)).toString(16)).substr(-8)}}return null}return e}(),multiValue:function(){function e(e,t,n){if(this.isValidDataSet(e)&&t in e.elements){var o=e.elements[t];if(o&&o.length>0){var a=h.readFixedString(e.byteArray,o.dataOffset,o.length);if("string"==typeof a&&a.length>0)return"function"!=typeof n&&(n=null),a.split("\\").map(function(e){return e=e.trim(),null!==n?n(e):e})}}return null}return e}(),floatArray:function(){function e(e,t){return this.multiValue(e,t,parseFloat)}return e}()}},classes:{"MetadataProvider.js":["babel-runtime/helpers/classCallCheck","../parsingUtils",function(e,t,n){n.export({MetadataProvider:function(){return r}});var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var a;n.import("../parsingUtils",{parsingUtils:function(e){a=e}});var r=function(){function e(){o(this,e),this.metadataLookup=new u}return e.prototype.addMetadata=function(){function e(e,t){var n=t.instance,o=t.series,a=t.study,r=t.numImages,i={};i.study={accessionNumber:a.accessionNumber,patientId:a.patientId,studyInstanceUid:a.studyInstanceUid,studyDate:a.studyDate,studyTime:a.studyTime,studyDescription:a.studyDescription,institutionName:a.institutionName,patientHistory:a.patientHistory},i.series={seriesDescription:o.seriesDescription,seriesNumber:o.seriesNumber,modality:o.modality,seriesInstanceUid:o.seriesInstanceUid,numImages:r},i.instance=n,i.patient={name:a.patientName,id:a.patientId,birthDate:a.patientBirthDate,sex:a.patientSex},i.imagePlane=this.getImagePlane(n),this.metadataLookup.set(e,i)}return e}(),e.prototype.getMetadata=function(){function e(e){return this.metadataLookup.get(e)}return e}(),e.prototype.addSpecificMetadata=function(){function e(e,t,n){var o={};o[t]=n;var a=this.metadataLookup.get(e);this.metadataLookup.set(e,Object.assign(a,o))}return e}(),e.prototype.getFromDataSet=function(){function e(e,t,n){if(e){var o=e[t];if(o)return o.call(e,n)}}return e}(),e.prototype.updateMetadata=function(){function e(e){var t=this.metadataLookup.get(e.imageId);t&&(t.instance.rows=t.instance.rows||e.rows,t.instance.columns=t.instance.columns||e.columns,t.instance.sopClassUid=t.instance.sopClassUid||this.getFromDataSet(e.data,"string","x00080016"),t.instance.sopInstanceUid=t.instance.sopInstanceUid||this.getFromDataSet(e.data,"string","x00080018"),t.instance.pixelSpacing=t.instance.pixelSpacing||this.getFromDataSet(e.data,"string","x00280030"),
this},clampScalar:function(){var t,n;return function(o,a){return void 0===t&&(t=new e.Vector3,n=new e.Vector3),t.set(o,o,o),n.set(a,a,a),this.clamp(t,n)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.multiplyScalar(-1)},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(e){var t=this.length();return 0!==t&&e!==t&&this.multiplyScalar(e/t),this},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},cross:function(e,t){if(void 0!==t)return console.warn("DEPRECATED: Vector3's .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t);var n=this.x,o=this.y,a=this.z;return this.x=o*e.z-a*e.y,this.y=a*e.x-n*e.z,this.z=n*e.y-o*e.x,this},crossVectors:function(e,t){var n=e.x,o=e.y,a=e.z,r=t.x,i=t.y,s=t.z;return this.x=o*s-a*i,this.y=a*r-n*s,this.z=n*i-o*r,this},projectOnVector:function(){var t,n;return function(o){return void 0===t&&(t=new e.Vector3),t.copy(o).normalize(),n=this.dot(t),this.copy(t).multiplyScalar(n)}}(),projectOnPlane:function(){var t;return function(n){return void 0===t&&(t=new e.Vector3),t.copy(this).projectOnVector(n),this.sub(t)}}(),reflect:function(){var t;return function(n){return void 0===t&&(t=new e.Vector3),this.sub(t.copy(n).multiplyScalar(2*this.dot(n)))}}(),angleTo:function(t){var n=this.dot(t)/(this.length()*t.length());return Math.acos(e.clamp(n,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,o=this.z-e.z;return t*t+n*n+o*o},setEulerFromRotationMatrix:function(e,t){console.error("REMOVED: Vector3's setEulerFromRotationMatrix has been removed in favor of Euler.setFromRotationMatrix(), please update your code.")},setEulerFromQuaternion:function(e,t){console.error("REMOVED: Vector3's setEulerFromQuaternion: has been removed in favor of Euler.setFromQuaternion(), please update your code.")},getPositionFromMatrix:function(e){return console.warn("DEPRECATED: Vector3's .getPositionFromMatrix() has been renamed to .setFromMatrixPosition(). Please update your code."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("DEPRECATED: Vector3's .getScaleFromMatrix() has been renamed to .setFromMatrixScale(). Please update your code."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("DEPRECATED: Vector3's .getColumnFromMatrix() has been renamed to .setFromMatrixColumn(). Please update your code."),this.setFromMatrixColumn(e,t)},setFromMatrixPosition:function(e){return this.x=e.elements[12],this.y=e.elements[13],this.z=e.elements[14],this},setFromMatrixScale:function(e){var t=this.set(e.elements[0],e.elements[1],e.elements[2]).length(),n=this.set(e.elements[4],e.elements[5],e.elements[6]).length(),o=this.set(e.elements[8],e.elements[9],e.elements[10]).length();return this.x=t,this.y=n,this.z=o,this},setFromMatrixColumn:function(e,t){var n=4*e,o=t.elements;return this.x=o[n],this.y=o[n+1],this.z=o[n+2],this},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e){return this.x=e[0],this.y=e[1],this.z=e[2],this},toArray:function(){return[this.x,this.y,this.z]},clone:function(){return new e.Vector3(this.x,this.y,this.z)}},e}(v),v=function(e
e(o).on("CornerstoneImageRendered",n.onImageRendered),t.updateImage(o)}function c(o,a){var l={mouseButtonMask:a};e(o).off("CornerstoneImageRendered",n.onImageRendered),e(o).off("CornerstoneToolsMouseMove",n.mouseMoveCallback||i),e(o).off("CornerstoneToolsMouseDown",n.mouseDownCallback||s),e(o).off("CornerstoneToolsMouseDownActivate",n.mouseDownActivateCallback||r),e(o).on("CornerstoneImageRendered",n.onImageRendered),e(o).on("CornerstoneToolsMouseMove",l,n.mouseMoveCallback||i),e(o).on("CornerstoneToolsMouseDown",l,n.mouseDownCallback||s),e(o).on("CornerstoneToolsMouseDownActivate",l,n.mouseDownActivateCallback||r),n.mouseDoubleClickCallback&&(e(o).off("CornerstoneToolsMouseDoubleClick",n.mouseDoubleClickCallback),e(o).on("CornerstoneToolsMouseDoubleClick",l,n.mouseDoubleClickCallback)),t.updateImage(o)}function d(o,a){var l={mouseButtonMask:a},u="CornerstoneToolsToolDeactivated",c={mouseButtonMask:a,toolType:n.toolType,type:u},d=e.Event(u,c);e(o).trigger(d,c),e(o).off("CornerstoneImageRendered",n.onImageRendered),e(o).off("CornerstoneToolsMouseMove",n.mouseMoveCallback||i),e(o).off("CornerstoneToolsMouseDown",n.mouseDownCallback||s),e(o).off("CornerstoneToolsMouseDownActivate",n.mouseDownActivateCallback||r),e(o).on("CornerstoneImageRendered",n.onImageRendered),e(o).on("CornerstoneToolsMouseMove",l,n.mouseMoveCallback||i),e(o).on("CornerstoneToolsMouseDown",l,n.mouseDownCallback||s),n.mouseDoubleClickCallback&&(e(o).off("CornerstoneToolsMouseDoubleClick",n.mouseDoubleClickCallback),e(o).on("CornerstoneToolsMouseDoubleClick",l,n.mouseDoubleClickCallback)),t.updateImage(o)}function f(){return h}function m(e){h=e}var h={},g={enable:u,disable:l,activate:c,deactivate:d,getConfiguration:f,setConfiguration:m,mouseDownCallback:s,mouseMoveCallback:i,mouseDownActivateCallback:r};return n.pointNearTool&&(g.pointNearTool=n.pointNearTool),n.mouseDoubleClickCallback&&(g.mouseDoubleClickCallback=n.mouseDoubleClickCallback),n.addNewMeasurement&&(g.addNewMeasurement=n.addNewMeasurement),g}o.mouseButtonTool=a}(o,m,v,g),function(e,t,n,o){"use strict";function a(n,a){function r(t){var r=n.createNewMeasurement(t);r&&(o.addToolState(t.element,n.toolType,r),e(t.element).off("CornerstoneToolsMouseMove",s),o.moveHandle(t,n.toolType,r,r.handles.end,function(){r.active=!1,o.anyHandlesOutsideImage(t,r.handles)&&o.removeToolState(t.element,n.toolType,r),e(t.element).on("CornerstoneToolsMouseMove",s)},a))}function i(e,t){if(o.isMouseButtonEnabled(t.which,e.data.mouseButtonMask))return r(t),!1}function s(e,a){if(o.toolCoordinates.setCoords(a),0===a.which){var r=o.getToolState(a.element,n.toolType);if(void 0!==r){for(var i=!1,s=a.currentPoints.canvas,l=0;l<r.data.length;l++){var u=r.data[l];o.handleActivator(a.element,u.handles,s)===!0&&(i=!0),(n.pointInsideRect(a.element,u,s)&&!u.active||!n.pointInsideRect(a.element,u,s)&&u.active)&&(u.active=!u.active,i=!0)}i===!0&&t.updateImage(a.element)}}}function l(r,i){function l(){u.active=!1,o.anyHandlesOutsideImage(i,u.handles)&&o.removeToolState(i.element,n.toolType,u),t.updateImage(i.element),e(i.element).on("CornerstoneToolsMouseMove",s)}var u;if(o.isMouseButtonEnabled(i.which,r.data.mouseButtonMask)){var c=i.startPoints.canvas,d=o.getToolState(r.currentTarget,n.toolType),f,m=25;if(void 0!==d)for(f=0;f<d.data.length;f++){u=d.data[f];var h=o.getHandleNearImagePoint(i.element,u.handles,c,m);if(void 0!==h)return e(i.element).off("CornerstoneToolsMouseMove",s),u.active=!0,o.moveHandle(i,n.toolType,u,h,l,a),r.stopImmediatePropagation(),!1}var g={deleteIfHandleOutsideImage:!0,preventHandleOutsideImage:a};if(void 0!==d&&void 0!==n.pointInsideRect)for(f=0;f<d.data.length;f++)if(u=d.data[f],n.pointInsideRect(i.element,u,c))return e(i.element).off("CornerstoneToolsMouseMove",s),o.moveAllHandles(r,u,d,n.toolType,g,l),e(i.element).on("CornerstoneToolsMouseMove",s),r.stopImmediatePropagation(),!1}}function u(o){e(o).off("CornerstoneImageRendered",n.onImageRendered),e(o).off("CornerstoneToolsMouseMove",s),e(o).off("CornerstoneToolsMouseDown",l),e(o).off("CornerstoneToolsMouseDownActivate",i),t.updateImage(o)}function
var q={start:{},end:{x:H.x,y:H.y}},_=[{x:w+b/2,y:C},{x:w,y:C+P/2},{x:w+b/2,y:C+P},{x:w+b,y:C+P/2}];q.start=n.point.findClosestPoint(_,q.end);var Y=[{x:W.left+W.width/2,y:W.top},{x:W.left,y:W.top+W.height/2},{x:W.left+W.width/2,y:W.top+W.height},{x:W.left+W.width,y:W.top+W.height/2}];q.end=n.point.findClosestPoint(Y,q.start),m.beginPath(),m.strokeStyle=y,m.lineWidth=u,m.setLineDash([2,3]),m.moveTo(q.start.x,q.start.y),m.lineTo(q.end.x,q.end.y),m.stroke()}m.restore()}}}var f="ellipticalRoi";o.ellipticalRoi=o.mouseButtonTool({createNewMeasurement:a,onImageRendered:d,pointNearTool:l,toolType:f}),o.ellipticalRoiTouch=o.touchTool({createNewMeasurement:a,onImageRendered:d,pointNearTool:u,toolType:f})}(o,m,v,g),function(e,t,n,o){"use strict";function a(e){var n=o.getToolState(e.element,T);if(void 0!==n){var a=o.freehand.getConfiguration(),r=n.data[a.currentTool],i={x:e.currentPoints.image.x,y:e.currentPoints.image.y,highlight:!0,active:!0,lines:[]};r.handles.length&&r.handles[a.currentHandle-1].lines.push(e.currentPoints.image),r.handles.push(i),a.currentHandle+=1,a.freehand=!1,t.updateImage(e.element)}}function r(e,a){var r=o.getToolState(e.element,T);if(void 0!==r){var i=r.data[a];if(void 0!==i.handles)for(var s=e.currentPoints.canvas,l=0;l<i.handles.length;l++){var u=t.pixelToCanvas(e.element,i.handles[l]);if(n.point.distance(u,s)<5)return l}}}function i(e){var t=o.getToolState(e.element,T);if(t)for(var n,a=0;a<t.data.length;a++)if(n=r(e,a),void 0!==n)return{handleNearby:n,toolIndex:a}}function s(n,a){e(a.element).off("CornerstoneToolsMouseUp",s);var r=o.getToolState(a.element,T);if(void 0!==r){var i=o.freehand.getConfiguration();a.event.shiftKey||(i.freehand=!1),t.updateImage(a.element)}}function l(e,n){var a=o.getToolState(n.element,T);if(a){var i=o.freehand.getConfiguration(),s=a.data[i.currentTool],l=Math.max(n.currentPoints.image.x,0);l=Math.min(l,n.image.width),i.mouseLocation.handles.start.x=l;var u=Math.max(n.currentPoints.image.y,0);u=Math.min(u,n.image.height),i.mouseLocation.handles.start.y=u;var c=i.currentHandle;if(i.modifying&&(s.active=!0,s.highlight=!0,s.handles[c].x=i.mouseLocation.handles.start.x,s.handles[c].y=i.mouseLocation.handles.start.y,c)){var d=s.handles[c-1].lines.length-1,f=s.handles[c-1].lines[d];f.x=i.mouseLocation.handles.start.x,f.y=i.mouseLocation.handles.start.y}if(i.freehand)s.handles[c-1].lines.push(n.currentPoints.image);else{var m=r(n,i.currentTool);void 0!==m&&m<s.handles.length-1&&(i.mouseLocation.handles.start.x=s.handles[m].x,i.mouseLocation.handles.start.y=s.handles[m].y)}t.updateImage(n.element)}}function u(t){e(t.element).on("CornerstoneToolsMouseMove",l),e(t.element).on("CornerstoneToolsMouseUp",s);var n={visible:!0,active:!0,handles:[]},a=o.freehand.getConfiguration();a.mouseLocation.handles.start.x=t.currentPoints.image.x,a.mouseLocation.handles.start.y=t.currentPoints.image.y,o.addToolState(t.element,T,n);var r=o.getToolState(t.element,T);a.currentTool=r.data.length-1}function c(n,a){var r=o.getToolState(n.element,T);if(r){var i=o.freehand.getConfiguration(),s=r.data[i.currentTool];s.active=!1,s.highlight=!1,void 0!==a&&s.handles[i.currentHandle-1].lines.push(s.handles[a]),i.modifying&&(i.modifying=!1),i.currentHandle=0,i.currentTool=-1,e(n.element).off("CornerstoneToolsMouseMove",l),t.updateImage(n.element)}}function d(t,n){if(o.isMouseButtonEnabled(n.which,t.data.mouseButtonMask)){var d=o.getToolState(n.element,T),f,m,h=o.freehand.getConfiguration(),g=h.currentTool;if(h.modifying)return void c(n);if(g<0){var p=i(n);p?(f=p.handleNearby,m=p.toolIndex,void 0!==f&&(e(n.element).on("CornerstoneToolsMouseMove",l),e(n.element).on("CornerstoneToolsMouseUp",s),h.modifying=!0,h.currentHandle=f,h.currentTool=m)):(u(n),a(n))}else g>=0&&d.data[g].active&&(f=r(n,g),void 0!==f?c(n,f):n.event.shiftKey?h.freehand=!0:a(n));return!1}}function f(e,n){var a=o.getToolState(e.currentTarget,T);if(void 0!==a){var r=o.freehand.getConfiguration(),i=n.canvasContext.canvas.getContext("2d");i.setTransform(1,0,0,1,0,0);for(var s,l=o.toolStyle.getToolWidth(),u=o.toolColors.getFillColor(),c=0;c<a.data.lengt
D*=180/Math.PI;var E=o.roundToDecimal(D,2);if(E){var A="00B0",O=E.toString()+String.fromCharCode(parseInt(A,16))+C,B=15,R;if(g.handles.textBox.hasMoved)R=t.pixelToCanvas(a.element,g.handles.textBox);else{R={x:v.x,y:v.y},l.font=f;var L=l.measureText(O).width;v.x<p.x?R.x-=B+L+10:R.x+=B;var F=t.internal.getTransform(s);F.invert();var U=F.transformPoint(R.x,R.y);g.handles.textBox.x=U.x,g.handles.textBox.y=U.y}var z={centering:{x:!1,y:!0}},V=o.drawTextBox(l,O,R.x,R.y,u,z);if(g.handles.textBox.boundingBox=V,g.handles.textBox.hasMoved){var H={start:{},end:{}},N=[p,y,v];H.end.x=R.x,H.end.y=R.y,H.start=n.point.findClosestPoint(N,H.end);var W=[{x:V.left+V.width/2,y:V.top},{x:V.left,y:V.top+V.height/2},{x:V.left+V.width/2,y:V.top+V.height},{x:V.left+V.width,y:V.top+V.height/2}];H.end=n.point.findClosestPoint(W,H.start),l.beginPath(),l.strokeStyle=u,l.lineWidth=d,l.setLineDash([2,3]),l.moveTo(H.start.x,H.start.y),l.lineTo(H.end.x,H.end.y),l.stroke()}}l.restore()}}}function l(n){var r=a(n),i=n.element,s={mouseButtonMask:n.which};o.addToolState(i,c,r),e(i).off("CornerstoneToolsMouseMove",o.simpleAngle.mouseMoveCallback),e(i).off("CornerstoneToolsMouseDrag",o.simpleAngle.mouseMoveCallback),e(i).off("CornerstoneToolsMouseDown",o.simpleAngle.mouseDownCallback),e(i).off("CornerstoneToolsMouseDownActivate",o.simpleAngle.mouseDownActivateCallback),t.updateImage(i),o.moveNewHandle(n,c,r,r.handles.middle,function(){return r.active=!1,o.anyHandlesOutsideImage(n,r.handles)?(o.removeToolState(i,c,r),e(i).on("CornerstoneToolsMouseMove",o.simpleAngle.mouseMoveCallback),e(i).on("CornerstoneToolsMouseDrag",o.simpleAngle.mouseMoveCallback),e(i).on("CornerstoneToolsMouseDown",s,o.simpleAngle.mouseDownCallback),e(i).on("CornerstoneToolsMouseDownActivate",s,o.simpleAngle.mouseDownActivateCallback),void t.updateImage(i)):(r.handles.end.active=!0,t.updateImage(i),void o.moveNewHandle(n,c,r,r.handles.end,function(){r.active=!1,o.anyHandlesOutsideImage(n,r.handles)&&o.removeToolState(i,c,r),e(i).on("CornerstoneToolsMouseMove",o.simpleAngle.mouseMoveCallback),e(i).on("CornerstoneToolsMouseDrag",o.simpleAngle.mouseMoveCallback),e(i).on("CornerstoneToolsMouseDown",s,o.simpleAngle.mouseDownCallback),e(i).on("CornerstoneToolsMouseDownActivate",s,o.simpleAngle.mouseDownActivateCallback),t.updateImage(i)}))})}function u(n){var r=a(n),i=n.element;o.addToolState(i,c,r),e(i).off("CornerstoneToolsTouchDrag",o.simpleAngleTouch.touchMoveCallback),e(i).off("CornerstoneToolsTouchStartActive",o.simpleAngleTouch.touchDownActivateCallback),e(i).off("CornerstoneToolsTouchStart",o.simpleAngleTouch.touchStartCallback),e(i).off("CornerstoneToolsTap",o.simpleAngleTouch.tapCallback),t.updateImage(i),o.moveNewHandleTouch(n,c,r,r.handles.middle,function(){return o.anyHandlesOutsideImage(n,r.handles)?(o.removeToolState(i,c,r),e(i).on("CornerstoneToolsTouchDrag",o.simpleAngleTouch.touchMoveCallback),e(i).on("CornerstoneToolsTouchStart",o.simpleAngleTouch.touchStartCallback),e(i).on("CornerstoneToolsTouchStartActive",o.simpleAngleTouch.touchDownActivateCallback),e(i).on("CornerstoneToolsTap",o.simpleAngleTouch.tapCallback),void t.updateImage(i)):void o.moveNewHandleTouch(n,c,r,r.handles.end,function(){o.anyHandlesOutsideImage(n,r.handles)&&(o.removeToolState(i,c,r),t.updateImage(i)),e(i).on("CornerstoneToolsTouchDrag",o.simpleAngleTouch.touchMoveCallback),e(i).on("CornerstoneToolsTouchStart",o.simpleAngleTouch.touchStartCallback),e(i).on("CornerstoneToolsTouchStartActive",o.simpleAngleTouch.touchDownActivateCallback),e(i).on("CornerstoneToolsTap",o.simpleAngleTouch.tapCallback)})})}var c="simpleAngle";o.simpleAngle=o.mouseButtonTool({createNewMeasurement:a,addNewMeasurement:l,onImageRendered:s,pointNearTool:r,toolType:c}),o.simpleAngleTouch=o.touchTool({createNewMeasurement:a,addNewMeasurement:u,onImageRendered:s,pointNearTool:r,toolType:c})}(o,m,v,g),function(e,t,n){"use strict";function o(e){var t=n.textMarker.getConfiguration();if(t.current){var o={visible:!0,active:!0,text:t.current,handles:{end:{x:e.currentPoints.image.x,y:e.currentPoints.image.y,highlight:!0,active:!0,hasBoundin
!1)}function h(){return o}var g={addRequest:n,clearRequestStack:u,startGrabbing:f,getRequestPool:h};return g}var o={interaction:[],thumbnail:[],prefetch:[]},a={interaction:0,thumbnail:0,prefetch:0},r={interaction:6,thumbnail:6,prefetch:5},i,s=!1,l=20;t.requestPoolManager=n()}(m,g),function(e,t,n){"use strict";function o(o,a){if(void 0===o)throw"playClip: element must not be undefined";var i=n.getToolState(o,"stack");if(i&&i.data&&i.data.length){var s=i.data[0],l=n.getToolState(o,r),u;l&&l.data&&l.data.length?u=l.data[0]:(u={intervalId:void 0,framesPerSecond:30,lastFrameTimeStamp:void 0,frameRate:0,loop:!0},n.addToolState(o,r,u)),a&&(u.framesPerSecond=a),void 0===u.intervalId&&(u.intervalId=setInterval(function(){var a=s.currentImageIdIndex;if(u.framesPerSecond>0?a++:a--,!u.loop&&(a>=s.imageIds.length||a<0)){var r={element:o},i=e.Event("CornerstoneToolsClipStopped",r);return e(o).trigger(i,r),clearInterval(u.intervalId),void(u.intervalId=void 0)}if(a>=s.imageIds.length&&(a=0),a<0&&(a=s.imageIds.length-1),a!==s.currentImageIdIndex){var l=n.loadHandlerManager.getStartLoadHandler(),c=n.loadHandlerManager.getEndLoadHandler(),d=n.loadHandlerManager.getErrorLoadingHandler();l&&l(o);var f=t.getViewport(o),m;m=s.preventCache===!0?t.loadImage(s.imageIds[a]):t.loadAndCacheImage(s.imageIds[a]),m.then(function(e){s.currentImageIdIndex=a,t.displayImage(o,e,f),c&&c(o)},function(e){var t=s.imageIds[a];d&&d(o,t,e)})}},1e3/Math.abs(u.framesPerSecond)))}}function a(e){var t=n.getToolState(e,r);if(t&&t.data&&t.data.length){var o=t.data[0];clearInterval(o.intervalId),o.intervalId=void 0}}var r="playClip";n.playClip=o,n.stopClip=a}(o,m,g),function(e,t,n){"use strict";function o(e,t){var o=t.element,r=t.enabledElement.canvas.width,i=t.enabledElement.canvas.height;if(!r||!i)return!1;var s=t.enabledElement.canvas.getContext("2d");s.setTransform(1,0,0,1,0,0),s.save();var l=n.scrollIndicator.getConfiguration();s.fillStyle=l.backgroundColor,s.fillRect(0,i-a,r,a);var u=n.getToolState(o,"stack");if(u&&u.data&&u.data.length){var c=u.data[0].imageIds,d=u.data[0].currentImageIdIndex,f=r/c.length,m=f*d;s.fillStyle=l.fillColor,s.fillRect(m,i-a,f,a),s.restore()}}var a=6,r={backgroundColor:"rgb(19, 63, 141)",fillColor:"white"};n.scrollIndicator=n.displayTool(o),n.scrollIndicator.setConfiguration(r)}(o,m,g),function(e,t,n){"use strict";function o(e,t){return e-t}function a(e,t){e=Math.round(e)||0,t=Math.round(t)||0;var n=[],o=t-e+1;if(o<=0)return n;for(;o--;)n[o]=t--;return n}function r(e,t){var n=[],o=[];return e.forEach(function(e){e<t?n.push(e):e>t&&o.push(e)}),{low:e.indexOf(T(n)),high:e.indexOf(x(o))}}function i(e){function a(e){var t=d.indicesToRequest.indexOf(e);t>-1&&d.indicesToRequest.splice(t,1)}function i(e){var t=u.imageIds.indexOf(e.imageId);a(t)}function s(t){console.log("prefetch errored: "+t),x&&x(e,v,t,"stackPrefetch")}var l=n.getToolState(e,"stack");if(l&&l.data&&l.data.length){var u=l.data[0],c=n.getToolState(e,h);if(c){var d=c.data[0];if(d&&d.indicesToRequest&&d.indicesToRequest.length||(d.enabled=!1),d.enabled!==!1){c.data[0].indicesToRequest.sort(o);var f=d.indicesToRequest.slice();if(f.forEach(function(e){var n=u.imageIds[e];if(n){var o=t.imageCache.getImagePromise(n);o&&"resolved"===o.state()&&a(e)}}),d.indicesToRequest.length){var m=n.requestPoolManager;m.clearRequestStack(g);for(var p=r(d.indicesToRequest,u.currentImageIdIndex),v,y,T=!1,x=n.loadHandlerManager.getErrorLoadingHandler(),w=p.low,C=p.high;w>0||C<d.indicesToRequest.length;)w>=0&&(y=d.indicesToRequest[w--],v=u.imageIds[y],m.addRequest(e,v,g,T,i,s)),C<d.indicesToRequest.length&&(y=d.indicesToRequest[C++],v=u.imageIds[y],m.addRequest(e,v,g,T,i,s));m.startGrabbing()}}}}}function s(e){var t=e.data.element,o=n.getToolState(t,h);o&&o.data&&o.data.length&&n.requestPoolManager.clearRequestStack(g)}function l(e,t){var o=e.data.element,a=n.getToolState(o,"stack");if(a&&a.data&&a.data.length){var r=a.data[0],i=r.imageIds.indexOf(t.imageId);if(!(i<0)){var s=n.getToolState(o,h);s&&s.data&&s.data.length&&s.data[0].indicesToRequest.push(i)}}}function u(e){clearTimeout(v),v=setTimeout(fu
imageCreated:function(e){}}}}),function(e,t,n){"use strict";function o(e){e.decache=function(){var t=n.wadouri.parseImageId(e.imageId);n.wadouri.dataSetCacheManager.unload(t.url)}}function a(e,t){var o=e.elements.x7fe00010;return o.encapsulatedPixelData?n.wadouri.getEncapsulatedImageFrame(e,t):n.wadouri.getUncompressedImageFrame(e,t)}function r(t,r,i,s,l){var u=(new Date).getTime();i=i||0;var c=e.Deferred();return t.then(function(e){var t=a(e,i),s=e.string("x00020010"),d=(new Date).getTime(),f=n.createImage(r,t,s,l);f.then(function(t){t.data=e;var n=(new Date).getTime();t.loadTimeInMS=d-u,t.totalTimeInMS=n-u,o(t),c.resolve(t)})},function(e){c.reject(e)}),c.promise()}function i(e){return"dicomweb"===e||"wadouri"===e?n.internal.xhrRequest:"dicomfile"===e?n.wadouri.loadFileRequest:void 0}function s(e,t){var o=n.wadouri.parseImageId(e),a=i(o.scheme);return n.wadouri.dataSetCacheManager.isLoaded(o.url)?r(n.wadouri.dataSetCacheManager.load(o.url,a,e),e,o.frame,o.url,t):r(n.wadouri.dataSetCacheManager.load(o.url,a,e),e,o.frame,o.url,t)}t.registerImageLoader("dicomweb",s),t.registerImageLoader("wadouri",s),t.registerImageLoader("dicomfile",s)}(o,m,p),function(e){"use strict";function t(e,t){var n=e.columns*e.rows,o=0,a=0,r=e.pixelData,i=e.redPaletteColorLookupTableDescriptor[1],s=e.redPaletteColorLookupTableData,l=e.greenPaletteColorLookupTableData,u=e.bluePaletteColorLookupTableData,c=8===e.redPaletteColorLookupTableDescriptor[2]?0:8,d=e.redPaletteColorLookupTableData.length;0===d&&(d=65535);for(var f=0;f<n;++f){var m=r[o++];m<i?m=0:m>i+d-1?m=d-1:m-=i,t[a++]=s[m]>>c,t[a++]=l[m]>>c,t[a++]=u[m]>>c,t[a++]=255}}e.convertPALETTECOLOR=t}(p),function(e){"use strict";function t(e,t){if(void 0===e)throw"decodeRGB: rgbBuffer must not be undefined";if(e.length%3!==0)throw"decodeRGB: rgbBuffer length must be divisible by 3";for(var n=e.length/3,o=0,a=0,r=0;r<n;r++)t[a++]=e[o++],t[a++]=e[o++],t[a++]=e[o++],t[a++]=255}e.convertRGBColorByPixel=t}(p),function(e){"use strict";function t(e,t){if(void 0===e)throw"decodeRGB: rgbBuffer must not be undefined";if(e.length%3!==0)throw"decodeRGB: rgbBuffer length must be divisible by 3";for(var n=e.length/3,o=0,a=0,r=n,i=2*n,s=0;s<n;s++)t[o++]=e[a++],t[o++]=e[r++],t[o++]=e[i++],t[o++]=255}e.convertRGBColorByPlane=t}(p),function(e){"use strict";function t(e,t){if(void 0===e)throw"decodeRGB: ybrBuffer must not be undefined";if(e.length%3!==0)throw"decodeRGB: ybrBuffer length must be divisble by 3";for(var n=e.length/3,o=0,a=0,r=0;r<n;r++){var i=e[o++],s=e[o++],l=e[o++];t[a++]=i+1.402*(l-128),t[a++]=i-.34414*(s-128)-.71414*(l-128),t[a++]=i+1.772*(s-128),t[a++]=255}}e.convertYBRFullByPixel=t}(p),function(e){"use strict";function t(e,t){if(void 0===e)throw"decodeRGB: ybrBuffer must not be undefined";if(e.length%3!==0)throw"decodeRGB: ybrBuffer length must be divisble by 3";for(var n=e.length/3,o=0,a=0,r=n,i=2*n,s=0;s<n;s++){var l=e[a++],u=e[r++],c=e[i++];t[o++]=l+1.402*(c-128),t[o++]=l-.34414*(u-128)-.71414*(c-128),t[o++]=l+1.772*(u-128),t[o++]=255}}e.convertYBRFullByPlane=t}(p),function(e){"use strict";function t(t){e.internal.options=t}e.configure=t}(p),function(e){"use strict";function t(t,n){0===t.planarConfiguration?e.convertRGBColorByPixel(t.pixelData,n):e.convertRGBColorByPlane(t.pixelData,n)}function n(t,n){0===t.planarConfiguration?e.convertYBRFullByPixel(t.pixelData,n):e.convertYBRFullByPlane(t.pixelData,n)}function o(o,a){var r=a.data;if(console.time("convertColorSpace"),"RGB"===o.photometricInterpretation)t(o,r);else if("YBR_RCT"===o.photometricInterpretation)t(o,r);else if("YBR_ICT"===o.photometricInterpretation)t(o,r);else if("PALETTE COLOR"===o.photometricInterpretation)e.convertPALETTECOLOR(o,r);else if("YBR_FULL_422"===o.photometricInterpretation)t(o,r);else{if("YBR_FULL"!==o.photometricInterpretation)throw"no color space conversion for photometric interpretation "+o.photometricInterpretation;n(o,r)}console.timeEnd("convertColorSpace")}e.convertColorSpace=o}(p),function(e,t,n){"use strict";function o(e){return"1.2.840.10008.5.1.4.1.1.12.1"!==e&&"1.2.840.10008.5.1.4.1.1.12.2.1\t"!==e}functi
if(t+2>e.length)throw"bigEndianByteArrayParser.readInt16: attempt to read past end of buffer";var n=(e[t]<<8)+e[t+1];return 32768&n&&(n=n-65535-1),n},readUint32:function(e,t){if(t<0)throw"bigEndianByteArrayParser.readUint32: position cannot be less than 0";if(t+4>e.length)throw"bigEndianByteArrayParser.readUint32: attempt to read past end of buffer";var n=256*(256*(256*e[t]+e[t+1])+e[t+2])+e[t+3];return n},readInt32:function(e,t){if(t<0)throw"bigEndianByteArrayParser.readInt32: position cannot be less than 0";if(t+4>e.length)throw"bigEndianByteArrayParser.readInt32: attempt to read past end of buffer";var n=(e[t]<<24)+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];return n},readFloat:function(e,t){if(t<0)throw"bigEndianByteArrayParser.readFloat: position cannot be less than 0";if(t+4>e.length)throw"bigEndianByteArrayParser.readFloat: attempt to read past end of buffer";var n=new Uint8Array(4);n[3]=e[t],n[2]=e[t+1],n[1]=e[t+2],n[0]=e[t+3];var o=new Float32Array(n.buffer);return o[0]},readDouble:function(e,t){if(t<0)throw"bigEndianByteArrayParser.readDouble: position cannot be less than 0";if(t+8>e.length)throw"bigEndianByteArrayParser.readDouble: attempt to read past end of buffer";var n=new Uint8Array(8);n[7]=e[t],n[6]=e[t+1],n[5]=e[t+2],n[4]=e[t+3],n[3]=e[t+4],n[2]=e[t+5],n[1]=e[t+6],n[0]=e[t+7];var o=new Float64Array(n.buffer);return o[0]}},e}(e),e=function(e){"use strict";return void 0===e&&(e={}),e.readFixedString=function(e,t,n){if(n<0)throw"dicomParser.readFixedString - length cannot be less than 0";if(t+n>e.length)throw"dicomParser.readFixedString: attempt to read past end of buffer";for(var o="",a,r=0;r<n;r++){if(a=e[t+r],0===a)return t+=n,o;o+=String.fromCharCode(a)}return o},e}(e),e=function(e){"use strict";return void 0===e&&(e={}),e.ByteStream=function(e,t,n){if(void 0===e)throw"dicomParser.ByteStream: missing required parameter 'byteArrayParser'";if(void 0===t)throw"dicomParser.ByteStream: missing required parameter 'byteArray'";if(t instanceof Uint8Array==!1&&t instanceof i==!1)throw"dicomParser.ByteStream: parameter byteArray is not of type Uint8Array or Buffer";if(n<0)throw"dicomParser.ByteStream: parameter 'position' cannot be less than 0";if(n>=t.length)throw"dicomParser.ByteStream: parameter 'position' cannot be greater than or equal to 'byteArray' length";this.byteArrayParser=e,this.byteArray=t,this.position=n?n:0,this.warnings=[]},e.ByteStream.prototype.seek=function(e){if(this.position+e<0)throw"dicomParser.ByteStream.prototype.seek: cannot seek to position < 0";this.position+=e},e.ByteStream.prototype.readByteStream=function(t){if(this.position+t>this.byteArray.length)throw"dicomParser.ByteStream.prototype.readByteStream: readByteStream - buffer overread";var n=e.sharedCopy(this.byteArray,this.position,t);return this.position+=t,new e.ByteStream(this.byteArrayParser,n)},e.ByteStream.prototype.readUint16=function(){var e=this.byteArrayParser.readUint16(this.byteArray,this.position);return this.position+=2,e},e.ByteStream.prototype.readUint32=function(){var e=this.byteArrayParser.readUint32(this.byteArray,this.position);return this.position+=4,e},e.ByteStream.prototype.readFixedString=function(t){var n=e.readFixedString(this.byteArray,this.position,t);return this.position+=t,n},e}(e),e=function(e){"use strict";function t(e,t){return void 0!==e.parser?e.parser:t}return void 0===e&&(e={}),e.DataSet=function(e,t,n){this.byteArrayParser=e,this.byteArray=t,this.elements=n},e.DataSet.prototype.uint16=function(e,n){var o=this.elements[e];if(n=void 0!==n?n:0,o&&0!==o.length)return t(o,this.byteArrayParser).readUint16(this.byteArray,o.dataOffset+2*n)},e.DataSet.prototype.int16=function(e,n){var o=this.elements[e];if(n=void 0!==n?n:0,o&&0!==o.length)return t(o,this.byteArrayParser).readInt16(this.byteArray,o.dataOffset+2*n)},e.DataSet.prototype.uint32=function(e,n){var o=this.elements[e];if(n=void 0!==n?n:0,o&&0!==o.length)return t(o,this.byteArrayParser).readUint32(this.byteArray,o.dataOffset+4*n)},e.DataSet.prototype.int32=function(e,n){var o=this.elements[e];if(n=void 0!==n?n:0,o&&0!==o.length)return t(o,this.byteArrayPa
this}},{key:"recognizeWith",value:function e(t){if(c(t,"recognizeWith",this))return this;var n=this.simultaneous;return t=h(t,this),n[t.id]||(n[t.id]=t,t.recognizeWith(this)),this}},{key:"dropRecognizeWith",value:function e(t){return c(t,"dropRecognizeWith",this)?this:(t=h(t,this),delete this.simultaneous[t.id],this)}},{key:"requireFailure",value:function e(t){if(c(t,"requireFailure",this))return this;var n=this.requireFail;return t=h(t,this),d(n,t)===-1&&(n.push(t),t.requireFailure(this)),this}},{key:"dropRequireFailure",value:function e(t){if(c(t,"dropRequireFailure",this))return this;t=h(t,this);var n=d(this.requireFail,t);return n>-1&&this.requireFail.splice(n,1),this}},{key:"hasRequireFailures",value:function e(){return this.requireFail.length>0}},{key:"canRecognizeWith",value:function e(t){return!!this.simultaneous[t.id]}},{key:"emit",value:function e(t){function e(e){n.manager.emit(e,t)}var n=this,o=this.state;o<Ue&&e(n.options.event+g(o)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),o>=Ue&&e(n.options.event+g(o))}},{key:"tryEmit",value:function e(t){return this.canEmit()?this.emit(t):void(this.state=He)}},{key:"canEmit",value:function e(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(He|Re)))return!1;t++}return!0}},{key:"recognize",value:function e(t){var n=We({},t);return m(this.options.enable,[this,n])?(this.state&(ze|Ve|He)&&(this.state=Re),this.state=this.process(n),void(this.state&(Le|Fe|Ue|Ve)&&this.tryEmit(n))):(this.reset(),void(this.state=He))}},{key:"process",value:function e(t){}},{key:"getTouchAction",value:function e(){}},{key:"reset",value:function e(){}}]),e}();Ze.prototype.defaults={};var $e=function(e){function t(){return je(this,t),Qe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ke(t,e),Xe(t,[{key:"attrTest",value:function e(t){var n=this.options.pointers;return 0===n||t.pointers.length===n}},{key:"process",value:function e(t){var n=this.state,o=t.eventType,a=n&(Le|Fe),r=this.attrTest(t);return a&&(o&be||!r)?n|Ve:a||r?o&Ce?n|Ue:n&Le?n|Fe:Le:He}}]),t}(Ze);$e.prototype.defaults={pointers:1};var et=function(e){function t(){return je(this,t),Qe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ke(t,e),Xe(t,[{key:"getTouchAction",value:function e(){return[se]}},{key:"attrTest",value:function e(n){return Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attrTest",this).call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Le)}}]),t}($e);et.prototype.defaults={event:"rotate",threshold:0,pointers:2};var tt=function(e){function t(){return je(this,t),Qe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ke(t,e),Xe(t,[{key:"getTouchAction",value:function e(){return[se]}},{key:"attrTest",value:function e(n){return Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attrTest",this).call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Le)}},{key:"emit",value:function e(n){if(1!==n.scale){var o=n.scale<1?"in":"out";n.additionalEvent=this.options.event+o}Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).call(this,n)}}]),t}($e);tt.prototype.defaults={event:"pinch",threshold:0,pointers:2};var nt=function(e){function t(){je(this,t);var e=Qe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.pX=null,e.pY=null,e}return Ke(t,e),Xe(t,[{key:"getTouchAction",value:function e(){var t=this.options.direction,n=[];return t&De&&n.push(ue),t&Ee&&n.push(le),n}},{key:"directionTest",value:function e(t){var n=this.options,o=!0,a=t.distance,r=t.direction,i=t.deltaX,s=t.deltaY;return r&n.direction||(n.direction&De?(r=0===i?Pe:i<0?Me:Ie,o=i!==this.pX,a=Math.abs(t.deltaX)):(r=0===s?Pe:s<0?Se:ke,o=s!==this.pY,a=Math.abs(t.deltaY))),t.direction=r,o&&a>n.threshold&&r&n.direction}},{key:"attrTest",value:function e(t){return $e.prototype.attrTest.call(this,t)&&(this.state&Le||!(this.state&Le)&&this.directionTest(t))}},{key:"emit",value:function e(n){this.pX=n.deltaX,this.pY=n.deltaY;var o=p(n.direction);o&&(n.additi
!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,a=Package.meteor.meteorEnv,r=Package.underscore._,c,t;(function(){c={};var e=function(e){return encodeURIComponent(e).replace(/[!'()]/g,escape).replace(/\*/g,"%2A")};c._encodeParams=function(n){var a=[];return r.each(n,function(n,r){a.length&&a.push("&"),a.push(e(r),"=",e(n))}),a.join("").replace(/%20/g,"+")},t=function(e,n,a,r){var t=e,o=n?n.slice(1):null;if("string"==typeof a&&(o=String(a)),r){o=o||"";var u=c._encodeParams(r);o&&u&&(o+="&"),o+=u}var i=t;return null!==o&&(i+="?"+o),i}}).call(this),function(){c._constructUrl=function(e,n,a){var r=/^(.*?)(\?.*)?$/.exec(e);return t(r[1],r[2],n,a)}}.call(this),"undefined"==typeof Package&&(Package={}),function(e,n){for(var a in n)a in e||(e[a]=n[a])}(Package.url={},{URL:c})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.underscore._,r=Package.url.URL,o=Package.modules.meteorInstall,c=Package.modules.Buffer,s=Package.modules.process,i=Package["ecmascript-runtime"].Symbol,l=Package["ecmascript-runtime"].Map,p=Package["ecmascript-runtime"].Set,u=Package["babel-runtime"].meteorBabelHelpers,f=Package.promise.Promise,d,m,h,g=o({node_modules:{meteor:{http:{"httpcall_common.js":function(){function e(e,t){return e.length>t?e.slice(0,t)+"...":e}var t=500;d=function n(a,r){var o="failed ["+a+"]";if(r){var c="string"==typeof r?r:r.toString();o+=" "+e(c.replace(/\n/g," "),t)}return new Error(o)},m=function e(t){var n=(t.headers["content-type"]||";").split(";")[0];if(a.include(["application/json","text/javascript","application/javascript","application/x-javascript"],n))try{t.data=JSON.parse(t.content)}catch(e){t.data=null}else t.data=null},h={},h.get=function(){return h.call.apply(this,["GET"].concat(a.toArray(arguments)))},h.post=function(){return h.call.apply(this,["POST"].concat(a.toArray(arguments)))},h.put=function(){return h.call.apply(this,["PUT"].concat(a.toArray(arguments)))},h.del=function(){return h.call.apply(this,["DELETE"].concat(a.toArray(arguments)))},h.patch=function(){return h.call.apply(this,["PATCH"].concat(a.toArray(arguments)))}},"httpcall_client.js":function(t,n,o){h.call=function(t,n,o,c){if(c||"function"!=typeof o||(c=o,o=null),o=o||{},"function"!=typeof c)throw new Error("Can't make a blocking HTTP call from the client; callback required.");t=(t||"").toUpperCase();var s={},i=o.content;o.data&&(i=JSON.stringify(o.data),s["Content-Type"]="application/json");var l,p;if(i||"GET"===t||"HEAD"===t?l=o.params:p=o.params,n=r._constructUrl(n,o.query,l),o.followRedirects===!1)throw new Error("Option followRedirects:false not supported on client.");if(a.has(o,"npmRequestOptions"))throw new Error("Option npmRequestOptions not supported on client.");var f,h;if(o.auth){var g=o.auth.indexOf(":");if(g<0)throw new Error('auth option should be of the form "username:password"');f=o.auth.substring(0,g),h=o.auth.substring(g+1)}p&&(i=r._encodeParams(p)),a.extend(s,o.headers||{}),c=function(e){return function(t,n){t&&n&&(t.response=n),e(t,n)}}(c),c=a.once(c);try{var y;if("undefined"!=typeof XMLHttpRequest)y=new XMLHttpRequest;else{if("undefined"==typeof ActiveXObject)throw new Error("Can't create XMLHttpRequest");y=new ActiveXObject("Microsoft.XMLHttp")}y.open(t,n,!0,f,h);for(var v in u.sanitizeForInObject(s))y.setRequestHeader(v,s[v]);var P=!1,k;if(o.timeout&&(k=e.setTimeout(function(){P=!0,y.abort()},o.timeout)),y.onreadystatechange=function(t){if(4===y.readyState)if(k&&e.clearTimeout(k),P)c(new Error("timeout"));else if(y.status){var n={};n.statusCode=y.status,n.content=y.responseText,n.headers={};var r=y.getAllResponseHeaders();""===r&&y.getResponseHeader("content-type")&&(r="content-type: "+y.getResponseHeader("content-type"));var o=r.split(/\r?\n/);a.each(o,function(e){var t=/^(.*?):(?:\s+)(.*)$/.exec(e);t&&3===t.length&&(n.headers[t[1].toLowerCase()]=t[2])}),m(n);var s=null;n.statusCode>=400&&(s=d(n.statusCode,n.content)),c(s,n)}else c(new Error("network"))},o.beforeSend){var w=a.once(o.beforeSend);if(!1===w.call(null,y,o))return y.abort()}y.send(i)}catch(e){c(e)}}},"deprecated.js":function(){e.http=h}}}}},{extensions:[".js",".json"]});g("./node_modules/meteor/http/httpcall_common.js"),g("./node_modules/meteor/http/httpcall_client.js"),g("./node_modules/meteor/http/deprecated.js"),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package.http={},{HTTP:h})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,s;(function(){!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function e(){return _s.apply(null,arguments)}function t(e){_s=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){var t;for(t in e)return!1;return!0}function r(e){return"number"==typeof value||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function o(e,t){var n=[],s;for(s=0;s<e.length;++s)n.push(t(e[s],s));return n}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,s){return gt(e,t,n,s,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function c(e){return null==e._pf&&(e._pf=h()),e._pf}function f(e){if(null==e._isValid){var t=c(e),n=gs.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function m(e){var t=d(NaN);return null!=e?l(c(t),e):c(t).userInvalidated=!0,t}function _(e){return void 0===e}function y(e,t){var n,s,i;if(_(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),_(t._i)||(e._i=t._i),_(t._f)||(e._f=t._f),_(t._l)||(e._l=t._l),_(t._strict)||(e._strict=t._strict),_(t._tzm)||(e._tzm=t._tzm),_(t._isUTC)||(e._isUTC=t._isUTC),_(t._offset)||(e._offset=t._offset),_(t._pf)||(e._pf=c(t)),_(t._locale)||(e._locale=t._locale),ps.length>0)for(n in ps)s=ps[n],i=t[s],_(i)||(e[s]=i);return e}function g(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),vs===!1&&(vs=!0,e.updateOffset(this),vs=!1)}function p(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=v(t)),n}function k(e,t,n){var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a;for(a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&w(e[a])!==w(t[a]))&&r++;return r+i}function S(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function M(t,n){var s=!0;return l(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),s){for(var i=[],r,a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){r+="\n["+a+"] ";for(var o in arguments[0])r+=o+": "+arguments[0][o]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}S(t+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),s=!1}return n.apply(this,arguments)},n)}function D(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),ws[t]||(S(n),ws[t]=!0)}function Y(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)t=e[n],Y(t)?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function x(e,t){var n=l({},e),i;for(i in t)u(t,i)&&(s(e[i])&&s(t[i])?(n[i]={},l(n[i],e[i]),l(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)u(e,i)&&!u(t,i)&&s(e[i])&&(n[i]=l({},n[i]));return n}function T(e){null!=e&&this.set(e)}function b(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return Y(s)?s.call(t,n):s}function P(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.t
var s,i=[];for(s=0;s<12;s++)i[s]=En(e,s,n,"month");return i}function An(e,t,n,s){"boolean"==typeof e?(r(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,r(t)&&(n=t,t=void 0),t=t||"");var i=tt(),a=e?i._week.dow:0;if(null!=n)return En(t,(n+a)%7,s,"day");var o,u=[];for(o=0;o<7;o++)u[o]=En(t,(o+a)%7,s,"day");return u}function In(e,t){return Nn(e,t,"months")}function zn(e,t){return Nn(e,t,"monthsShort")}function Zn(e,t,n){return An(e,t,n,"weekdays")}function $n(e,t,n){return An(e,t,n,"weekdaysShort")}function qn(e,t,n){return An(e,t,n,"weekdaysMin")}function Bn(){var e=this._data;return this._milliseconds=Xi(this._milliseconds),this._days=Xi(this._days),this._months=Xi(this._months),e.milliseconds=Xi(e.milliseconds),e.seconds=Xi(e.seconds),e.minutes=Xi(e.minutes),e.hours=Xi(e.hours),e.months=Xi(e.months),e.years=Xi(e.years),this}function Jn(e,t,n,s){var i=Vt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function Qn(e,t){return Jn(this,e,t,1)}function Xn(e,t){return Jn(this,e,t,-1)}function Kn(e){return e<0?Math.floor(e):Math.ceil(e)}function es(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data,i,r,a,o,u;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=864e5*Kn(ns(n)+t),t=0,n=0),s.milliseconds=e%1e3,i=v(e/1e3),s.seconds=i%60,r=v(i/60),s.minutes=r%60,a=v(r/60),s.hours=a%24,t+=v(a/24),u=v(ts(t)),n+=u,t-=Kn(ns(u)),o=v(n/12),n%=12,s.days=t,s.months=n,s.years=o,this}function ts(e){return 4800*e/146097}function ns(e){return 146097*e/4800}function ss(e){var t,n,s=this._milliseconds;if(e=H(e),"month"===e||"year"===e)return t=this._days+s/864e5,n=this._months+ts(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ns(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function is(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function rs(e){return function(){return this.as(e)}}function as(e){return e=H(e),this[e+"s"]()}function os(e){return function(){return this._data[e]}}function us(){return v(this.days()/7)}function ls(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}function ds(e,t,n){var s=Vt(e).abs(),i=mr(s.as("s")),r=mr(s.as("m")),a=mr(s.as("h")),o=mr(s.as("d")),u=mr(s.as("M")),l=mr(s.as("y")),d=i<_r.s&&["s",i]||r<=1&&["m"]||r<_r.m&&["mm",r]||a<=1&&["h"]||a<_r.h&&["hh",a]||o<=1&&["d"]||o<_r.d&&["dd",o]||u<=1&&["M"]||u<_r.M&&["MM",u]||l<=1&&["y"]||["yy",l];return d[2]=t,d[3]=+e>0,d[4]=n,ls.apply(null,d)}function hs(e){return void 0===e?mr:"function"==typeof e&&(mr=e,!0)}function cs(e,t){return void 0!==_r[e]&&(void 0===t?_r[e]:(_r[e]=t,!0))}function fs(e){var t=this.localeData(),n=ds(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function ms(){var e=yr(this._milliseconds)/1e3,t=yr(this._days),n=yr(this._months),s,i,r;s=v(e/60),i=v(s/60),e%=60,s%=60,r=v(n/12),n%=12;var a=r,o=n,u=t,l=i,d=s,h=e,c=this.asSeconds();return c?(c<0?"-":"")+"P"+(a?a+"Y":"")+(o?o+"M":"")+(u?u+"D":"")+(l||d||h?"T":"")+(l?l+"H":"")+(d?d+"M":"")+(h?h+"S":""):"P0D"}var _s,ys;ys=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var gs=ys,ps=e.momentProperties=[],vs=!1,ws={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var ks;ks=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n};var Ss=ks,Ms={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ds={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ys="Invalid date",Os="%d",xs=/\d{1,2}/,Ts={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.modules.meteorInstall,i=Package.modules.Buffer,o=Package.modules.process,u=Package["ecmascript-runtime"].Symbol,a=Package["ecmascript-runtime"].Map,s=Package["ecmascript-runtime"].Set,c=Package["babel-runtime"].meteorBabelHelpers,f=Package.promise.Promise,l,d=r({node_modules:{meteor:{validatejs:{lib:{"validate.js":["babel-runtime/helpers/typeof",function(t,e,n){var r;n.import("babel-runtime/helpers/typeof",{default:function(t){r=t}}),function(t,e,n){"use strict";var i=function t(e,n,r){r=o.extend({},o.options,r);var i=o.runValidations(e,n,r),u,a;for(u in c.sanitizeForInObject(i))for(a in c.sanitizeForInObject(i[u]))if(o.isPromise(i[u][a]))throw new Error("Use validate.async if you want support for promises");return t.processValidationResults(i,r)},o=i;o.extend=function(t){return[].slice.call(arguments,1).forEach(function(e){for(var n in c.sanitizeForInObject(e))t[n]=e[n]}),t},o.extend(i,{version:{major:0,minor:9,patch:0,metadata:"development",toString:function(){function t(){var t=o.format("%{major}.%{minor}.%{patch}",o.version);return o.isEmpty(o.version.metadata)||(t+="+"+o.version.metadata),t}return t}()},Promise:"undefined"!=typeof f?f:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(){function t(t,e,n){var r=[],i,u,a,s,f,l,d;(o.isDomElement(t)||o.isJqueryElement(t))&&(t=o.collectFormValues(t));for(i in c.sanitizeForInObject(e)){a=o.getDeepObjectValue(t,i),s=o.result(e[i],a,t,i,n,e);for(u in c.sanitizeForInObject(s)){if(f=o.validators[u],!f)throw d=o.format("Unknown validator %{name}",{name:u}),new Error(d);l=s[u],l=o.result(l,a,t,i,n,e),l&&r.push({attribute:i,value:a,validator:u,globalOptions:n,attributes:t,options:l,error:f.call(f,a,l,i,t,n)})}}return r}return t}(),processValidationResults:function(){function t(t,e){var n;switch(t=o.pruneEmptyErrors(t,e),t=o.expandMultipleErrors(t,e),t=o.convertErrorMessages(t,e),e.format||"grouped"){case"detailed":break;case"flat":t=o.flattenErrorsToArray(t);break;case"grouped":t=o.groupErrorsByAttribute(t);for(n in c.sanitizeForInObject(t))t[n]=o.flattenErrorsToArray(t[n]);break;default:throw new Error(o.format("Unknown format %{format}",e))}return o.isEmpty(t)?void 0:t}return t}(),async:function(){function t(t,e,n){n=o.extend({},o.async.options,n);var r=n.wrapErrors||function(t){return t};n.cleanAttributes!==!1&&(t=o.cleanAttributes(t,e));var i=o.runValidations(t,e,n);return new o.Promise(function(u,a){o.waitForResults(i).then(function(){var s=o.processValidationResults(i,n);s?a(new r(s,n,t,e)):u(t)},function(t){a(t)})})}return t}(),single:function(){function t(t,e,n){return n=o.extend({},o.single.options,n,{format:"flat",fullMessages:!1}),o({single:t},{single:e},n)}return t}(),waitForResults:function(){function t(t){return t.reduce(function(t,e){return o.isPromise(e.error)?t.then(function(){return e.error.then(function(t){e.error=t||null},function(t){if(t instanceof Error)throw t;o.error("Rejecting promises with the result is deprecated. Please use the resolve callback instead."),e.error=t})}):t},new o.Promise(function(t){t()}))}return t}(),result:function(){function t(t){var e=[].slice.call(arguments,1);return"function"==typeof t&&(t=t.apply(null,e)),t}return t}(),isNumber:function(){function t(t){return"number"==typeof t&&!isNaN(t)}return t}(),isFunction:function(){function t(t){return"function"==typeof t}return t}(),isInteger:function(){function t(t){return o.isNumber(t)&&t%1===0}return t}(),isObject:function(){function t(t){return t===Object(t)}return t}(),isDate:function(){function t(t){return t instanceof Date}return t}(),isDefined:function(){function t(t){return null!==t&&void 0!==t}return t}(),isPromise:function(){function t(t){return!!t&&o.isFunction(t.then)}return t}(),isJqueryElement:function(){function t(t){return t&&o.isString(t.jquery)}return t}(),isDomElement:function(){function t(t){return!!t&&(!(!o.isFunction(t.querySelectorAll)||!o.isFunction(t.querySelector))&&(!(!o.isObject(document)||t!==document)||("object"===("undefined"==typeof HTMLElement?"undef
!function(){"undefined"==typeof Package&&(Package={}),Package.coffeescript={}}();
!function(){var Meteor=Package.meteor.Meteor,global=Package.meteor.global,meteorEnv=Package.meteor.meteorEnv,Symbol=Package["ecmascript-runtime"].Symbol,Map=Package["ecmascript-runtime"].Map,Set=Package["ecmascript-runtime"].Set,meteorBabelHelpers=Package["babel-runtime"].meteorBabelHelpers,Promise=Package.promise.Promise,html,chai,__coffeescriptShare,assert,expect,should;(function(){(function(){!function(){function require(e){var t=require.modules[e];if(!t)throw new Error('failed to require "'+e+'"');return"exports"in t||"function"!=typeof t.definition||(t.client=t.component=!0,t.definition.call(this,t.exports={},t),delete t.definition),t.exports}require.loader="component",require.helper={},require.helper.semVerSort=function(e,t){for(var i=e.version.split("."),n=t.version.split("."),r=0;r<i.length;++r){var o=parseInt(i[r],10),s=parseInt(n[r],10);if(o!==s)return o>s?1:-1;var a=i[r].substr((""+o).length),c=n[r].substr((""+s).length);if(""===a&&""!==c)return 1;if(""!==a&&""===c)return-1;if(""!==a&&""!==c)return a>c?1:-1}return 0},require.latest=function(e,t){function i(e){throw new Error('failed to find latest module of "'+e+'"')}var n=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/,r=/(.*)~(.*)/;r.test(e)||i(e);for(var o=Object.keys(require.modules),s=[],a=[],c=0;c<o.length;c++){var h=o[c];if(new RegExp(e+"@").test(h)){var u=h.substr(e.length+1),l=n.exec(h);null!=l?s.push({version:u,name:h}):a.push({version:u,name:h})}}if(0===s.concat(a).length&&i(e),s.length>0){var f=s.sort(require.helper.semVerSort).pop().name;return t===!0?f:require(f)}var f=a.sort(function(e,t){return e.name>t.name})[0].name;return t===!0?f:require(f)},require.modules={},require.register=function(e,t){require.modules[e]={definition:t}},require.define=function(e,t){require.modules[e]={exports:t}},require.register("chaijs~assertion-error@1.0.0",function(e,t){function i(){function e(e,i){Object.keys(i).forEach(function(n){~t.indexOf(n)||(e[n]=i[n])})}var t=[].slice.call(arguments);return function t(){for(var i=[].slice.call(arguments),n=0,r={};n<i.length;n++)e(r,i[n]);return r}}function n(e,t,n){var r=i("name","message","stack","constructor","toJSON"),o=r(t||{});this.message=e||"Unspecified AssertionError",this.showDiff=!1;for(var s in o)this[s]=o[s];n=n||arguments.callee,n&&Error.captureStackTrace&&Error.captureStackTrace(this,n)}t.exports=n,n.prototype=Object.create(Error.prototype),n.prototype.name="AssertionError",n.prototype.constructor=n,n.prototype.toJSON=function(e){var t=i("constructor","toJSON","stack"),n=t({name:this.name},this);return!1!==e&&this.stack&&(n.stack=this.stack),n}}),require.register("chaijs~type-detect@0.1.1",function(e,t){function i(e){var t=Object.prototype.toString.call(e);return r[t]?r[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function n(){this.tests={}}var e=t.exports=i,r={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};e.Library=n,n.prototype.of=i,n.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},n.prototype.test=function(e,t){if(t===i(e))return!0;var n=this.tests[t];if(n&&"regexp"===i(n))return n.test(e);if(n&&"function"===i(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}}),require.register("chaijs~deep-eql@0.1.3",function(e,t){function i(e,t,i){return!!n(e,t)||("date"===p(e)?o(e,t):"regexp"===p(e)?s(e,t):d.isBuffer(e)?u(e,t):"arguments"===p(e)?a(e,t,i):!!r(e,t)&&("object"!==p(e)&&"object"!==p(t)&&"array"!==p(e)&&"array"!==p(t)?n(e,t):f(e,t,i)))}function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){return p(e)===p(t)}function o(e,t){return"date"===p(t)&&n(e.getTime(),t.getTime())}function s(e,t){return"regexp"===p(t)&&n(e.toString(),t.toString())}function a(e,t,n){return"arguments"===p(t)&&(e=[].slice.call(e),t=[].slice.call(t),i(e,t,n))}function c(e){var t=[];for(var i in e)t.push(i);return t}function h(e,t){if(e.length!==t.length)return!1;for(var i=0,n=!0;i<e.length;i++)if(e[i]!==t[i]){n=!1;break}return
if(0===A.length||f(i)&&(1===A.length&&"stack"===A[0]||2===A.length&&"description"===A[0]&&"stack"===A[1])){if("function"==typeof i){var M=d(i),O=M?": "+M:"";return t.stylize("[Function"+O+"]","special")}if(u(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(l(i))return t.stylize(Date.prototype.toUTCString.call(i),"date");if(f(i))return o(i)}var _="",P=!1,S=["{","}"];if(h(i)&&(P=!0,S=["[","]"]),"function"==typeof i){var M=d(i),O=M?": "+M:"";_=" [Function"+O+"]"}if(u(i)&&(_=" "+RegExp.prototype.toString.call(i)),l(i)&&(_=" "+Date.prototype.toUTCString.call(i)),f(i))return o(i);if(0===A.length&&(!P||0==i.length))return S[0]+_+S[1];if(p<0)return u(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special");t.seen.push(i);var k;return k=P?s(t,i,p,q,A):A.map(function(e){return a(t,i,p,q,e,P)}),t.seen.pop(),c(k,_,S)}function r(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string");case"number":return 0===t&&1/t===-(1/0)?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(null===t)return e.stylize("null","null")}function o(e){return"["+Error.prototype.toString.call(e)+"]"}function s(e,t,i,n,r){for(var o=[],s=0,c=t.length;s<c;++s)Object.prototype.hasOwnProperty.call(t,String(s))?o.push(a(e,t,i,n,String(s),!0)):o.push("");return r.forEach(function(r){r.match(/^\d+$/)||o.push(a(e,t,i,n,r,!0))}),o}function a(e,t,i,r,o,s){var a,c;if(t.__lookupGetter__&&(t.__lookupGetter__(o)?c=t.__lookupSetter__(o)?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):t.__lookupSetter__(o)&&(c=e.stylize("[Setter]","special"))),r.indexOf(o)<0&&(a="["+o+"]"),c||(e.seen.indexOf(t[o])<0?(c=null===i?n(e,t[o],null):n(e,t[o],i-1),c.indexOf("\n")>-1&&(c=s?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n"))):c=e.stylize("[Circular]","special")),"undefined"==typeof a){if(s&&o.match(/^\d+$/))return c;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function c(e,t,i){var n=0,r=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.length+1},0);return r>60?i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}function h(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===p(e)}function u(e){return"object"==typeof e&&"[object RegExp]"===p(e)}function l(e){return"object"==typeof e&&"[object Date]"===p(e)}function f(e){return"object"==typeof e&&"[object Error]"===p(e)}function p(e){return Object.prototype.toString.call(e)}var d=require("chai/lib/chai/utils/getName.js"),b=require("chai/lib/chai/utils/getProperties.js"),g=require("chai/lib/chai/utils/getEnumerableProperties.js");t.exports=i;var v=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}}),require.register("chai/lib/chai/utils/objDisplay.js",function(e,t){var i=require("chai/lib/chai/utils/inspect.js"),n=require("chai/lib/chai/config.js");t.exports=function(e){var t=i(e),r=Object.prototype.toString.call(e);if(n.truncateThreshold&&t.length>=n.truncateThreshold){if("[object Function]"===r)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===r)return"[ Array("+e.length+") ]";if("[object Object]"===r){var o=Object.keys(e),s=o.length>2?o.splice(0,2).join(", ")+", ...":o.join(", ");return"{ Object ("+s+") }"}return t}return t}}),require.register("chai/lib/chai/utils/overwriteMethod.js",function(e,t){t.exports=function(e,t,i){var n=e[t],r=function(){return this};n&&"function"==typeof n&&(r=n),e[t]=function(){var e=i(r).apply(this,arguments);return void 0===e?this:e}}}),require.register("chai/lib/chai/utils/overwriteProperty.js",fu
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,l=Package.meteor.meteorEnv,o=Package["practicalmeteor:chai"].chai,n=Package["practicalmeteor:chai"].assert,i=Package["practicalmeteor:chai"].expect,r=Package["practicalmeteor:chai"].should,a=Package["ecmascript-runtime"].Symbol,c=Package["ecmascript-runtime"].Map,s=Package["ecmascript-runtime"].Set,u=Package["babel-runtime"].meteorBabelHelpers,g=Package.promise.Promise,f,p,h,v,d;(function(){(function(){f=function(e){function t(e){return typeof console!==s&&(void 0!==console[e]?l(console,e):void 0!==console.log?l(console,"log"):c)}function l(e,t){var l=e[t];if("function"==typeof l.bind)return l.bind(e,a.prefix);try{return Function.prototype.bind.call(l,e,a.prefix)}catch(t){return function(){return Function.prototype.apply.apply(l,[e,arguments])}}}function o(e,t){return function(){typeof console!==s&&(n(t),a[e].apply(a,arguments))}}function n(e){for(var t=0;t<u.length;t++){var l=u[t];a[l]=t<e?c:a.methodFactory(l,e)}}function i(e){var t=(u[e]||"silent").toUpperCase();try{return void(window.localStorage.loglevel=t)}catch(e){}try{window.document.cookie="loglevel="+t+";"}catch(e){}}function r(){var e;try{e=window.localStorage.loglevel}catch(e){}if(typeof e===s)try{e=/loglevel=([^;]+)/.exec(window.document.cookie)[1]}catch(e){}void 0===a.levels[e]&&(e="WARN"),a.setLevel(a.levels[e])}var a={};e&&e.prefix?a.prefix=e.prefix:a.prefix="",e&&e.level?a.level=e.level:a.level="info";var c=function(){},s="undefined",u=["trace","fine","debug","info","warn","error"];a.levels={TRACE:0,FINE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,SILENT:6},a.methodFactory=function(e,l){return t(e)||o(e,l)},a.setLevel=function(e){if("string"==typeof e&&void 0!==a.levels[e.toUpperCase()]&&(e=a.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(a.level=e,n(e),typeof console===s&&e<a.levels.SILENT)return"No console available for logging"},a.enableAll=function(){a.setLevel(a.levels.TRACE)},a.disableAll=function(){a.setLevel(a.levels.SILENT)};var g=typeof window!==s?window.log:void 0;return a.noConflict=function(){return typeof window!==s&&window.log===a&&(window.log=g),a},a.setPrefix=function(e){typeof e!==s&&null!==e||(e=""),a.prefix=e,a.setLevel(a.level)},a.setLevel(a.level),a},p=f({prefix:"practicalmeteor:loglevel:"})}).call(this),function(){h="object"==typeof h?h:{};var t=h;null==this.practical&&(this.practical={}),practical.LoggerFactory=function(){function t(){}var l;return l=null,t.get=function(){return null!=l?l:l=new practical.LoggerFactory},t.prototype._getSettingsLoglevel=function(e,t){var l,o;return null==e&&(e=""),null==t&&(t="info"),i(e).to.be.a("string"),i(t).to.be.a("string").that.has.length.above(0),l=this._getNamespaceLoglevel("global"),null!=l?l:(e.length>0&&(o=this._getNamespaceLoglevel(e)),null==o&&(o=this._getNamespaceLoglevel("default")),null!=o?o:o=t)},t.prototype._getNamespaceLoglevel=function(t){var l,o,n,r,a,c,s;return i(t).to.be.a("string").that.has.length.above(0),l=null!=(n=e.settings)&&null!=(r=n.public)&&null!=(a=r.loglevel)?a[t]:void 0,e.isServer&&(o=null!=(c=e.settings)&&null!=(s=c.loglevel)?s[t]:void 0,null!=o&&(l=o)),l},t.prototype.createLogger=function(e,t){var l;return null==e&&(e=""),null==t&&(t="info"),p.debug("LoggerFactory.createLogger()",arguments),i(e).to.be.a("string"),i(t).to.be.a("string").that.has.length.above(0),i(f).to.be.a("function"),l={},e.length>0&&(l.prefix=e+":"),l.level=this._getSettingsLoglevel(e,t),f(l)},t.prototype.createPackageLogger=function(e,t){return null==t&&(t="info"),this.createLogger(e,t)},t.prototype.createAppLogger=function(e,t){return null==e&&(e="app"),null==t&&(t="info"),this.createLogger(e,t)},t}(),v=practical.LoggerFactory.get()}.call(this),function(){h="object"==typeof h?h:{};var e=h,t=[].slice;d=function(){function e(e,t){return this.className=e,this.defaultLevel=null!=t?t:"info",this.log=v.createLogger(this.className,this.defaultLevel),this.callStack=[],this.log.enter=this.bindMethod(this.enter,"debug"),this.log.fineEnter=this.bindMethod(this.enter,"fine
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,c=Package.meteor.meteorEnv,o=Package["practicalmeteor:loglevel"].loglevel,r=Package["practicalmeteor:loglevel"].ObjectLogger,g=Package.modules.meteorInstall,t=Package.modules.Buffer,l=Package.modules.process,m=Package["ecmascript-runtime"].Symbol,k=Package["ecmascript-runtime"].Map,n=Package["ecmascript-runtime"].Set,P=Package["babel-runtime"].meteorBabelHelpers,i=Package.promise.Promise,s=Package.webapp.WebApp,p=Package.logging.Log,u=Package.deps.Tracker,d=Package.deps.Deps,f=Package.session.Session,h=Package["ddp-client"].DDP,b=Package.mongo.Mongo,v=Package.ui.Blaze,j=Package.ui.UI,S=Package.ui.Handlebars,y=Package.spacebars.Spacebars,L=Package["templating-runtime"].Template,M=Package.check.check,H=Package.check.Match,B=Package.underscore._,D=Package.jquery.$,I=Package.jquery.jQuery,O=Package.random.Random,T=Package.ejson.EJSON,_=Package["launch-screen"].LaunchScreen,q=Package.htmljs.HTML,E=g({node_modules:{meteor:{"ohif:log":{"main.js":["meteor/ohif:core","meteor/practicalmeteor:loglevel",function(a,c,o){var r;o.import("meteor/ohif:core",{OHIF:function(e){r=e}});var g;o.import("meteor/practicalmeteor:loglevel",{loglevel:function(e){g=e}});var t=e.isProduction?"error":"trace";r.log=g.createLogger("",t)}]}}}},{extensions:[".js",".json"]});E("./node_modules/meteor/ohif:log/main.js"),"undefined"==typeof Package&&(Package={}),Package["ohif:log"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.http.HTTP,i=Package.jquery.$,r=Package.jquery.jQuery,a=Package["momentjs:moment"].moment,s=Package.validatejs.validate,c=Package.modules.meteorInstall,u=Package.modules.Buffer,l=Package.modules.process,m=Package["ecmascript-runtime"].Symbol,d=Package["ecmascript-runtime"].Map,p=Package["ecmascript-runtime"].Set,f=Package["babel-runtime"].meteorBabelHelpers,x=Package.promise.Promise,g=Package.webapp.WebApp,h=Package.logging.Log,v=Package.deps.Tracker,S=Package.deps.Deps,y=Package.session.Session,I=Package["ddp-client"].DDP,T=Package.mongo.Mongo,D=Package.ui.Blaze,b=Package.ui.UI,w=Package.ui.Handlebars,C=Package.spacebars.Spacebars,P=Package["templating-runtime"].Template,R=Package.check.check,k=Package.check.Match,V=Package.underscore._,O=Package.random.Random,M=Package.ejson.EJSON,A=Package["launch-screen"].LaunchScreen,q=Package.htmljs.HTML,N,L,E,F=c({node_modules:{meteor:{"ohif:viewerbase":{client:{components:{basic:{layout:{"template.layout.js":function(){P.__checkName("layout"),P.layout=new P("Template.layout",function(){var e=this;return C.include(e.lookupTemplate("yield"))})}},loadingText:{"template.loadingText.js":function(){P.__checkName("loadingText"),P.loadingText=new P("Template.loadingText",function(){var e=this;return q.Raw('<div class="loadingTextDiv">\n Loading... <i class="fa fa-spin fa-circle-o-notch fa-fw"></i>\n </div>')})}},removableBackdrop:{"template.removableBackdrop.js":function(){P.__checkName("removableBackdrop"),P.removableBackdrop=new P("Template.removableBackdrop",function(){var e=this;return q.Raw('<div class="removableBackdrop noselect" oncontextmenu="return false;" unselectable="on" onselectstart="return false;">\n </div>')})}},aboutModal:{"template.aboutModal.js":function(){P.__checkName("aboutModal"),P.aboutModal=new P("Template.aboutModal",function(){var e=this;return q.DIV({class:"modal fade",id:"aboutModal",tabindex:"-1",role:"dialog","aria-labelledby":"aboutModalLabel"},"\n ",q.DIV({class:"modal-dialog modal-lg",role:"document"},"\n ",q.DIV({class:"modal-content"},"\n ",q.Raw('<div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n <h4 class="modal-title" id="aboutModalLabel">\n About\n </h4>\n </div>'),"\n ",q.DIV({class:"modal-body"},"\n ",q.A({target:"_blank",class:"forkOnGithub",href:function(){return C.mustache(e.lookup("githubUrl"))}},"\n ",q.Raw('<img src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png">'),"\n "),"\n ",q.DIV({class:"logo p-x-3 p-y-3"},"\n ",q.SVG({class:"logoImage"},"\n ",q.USE({"xlink:href":function(){return C.mustache(e.lookup("absoluteUrl"),"packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo")}}),"\n "),"\n ",q.Raw('<a class="logoText" target="_blank" href="http://ohif.org">\n Open Health Imaging Foundation DICOM Viewer\n </a>'),"\n "),"\n ",q.Raw('<div class="p-x-1 p-y-1 m-y-2">\n <a class="btn btn-default inline" target="_blank" href="https://groups.google.com/forum/#!forum/cornerstone-platform">\n Visit the forum\n </a>\n <a class="btn btn-default inline" target="_blank" href="https://github.com/OHIF/Viewers/issues">\n
},"\n ",q.DIV(D.View("lookup:formatPN",function(){return C.mustache(e.lookup("formatPN"),e.lookup("patientName"))})),"\n ",q.DIV(D.View("lookup:patientId",function(){return C.mustache(e.lookup("patientId"))})),"\n ",q.DIV({class:"priorIndicator"},D.View("lookup:prior",function(){return C.mustache(e.lookup("prior"))})),"\n "),"\n ",q.DIV({class:"topright dicomTag"},"\n ",q.DIV(D.View("lookup:studyDescription",function(){return C.mustache(e.lookup("studyDescription"))})),"\n ",q.DIV(D.View("lookup:formatDA",function(){return C.mustache(e.lookup("formatDA"),e.lookup("studyDate"))})," ",D.View("lookup:formatTM",function(){return C.mustache(e.lookup("formatTM"),e.lookup("studyTime"))})),"\n "),"\n ",q.DIV({class:"bottomright dicomTag"},"\n ",q.DIV(D.If(function(){return C.call(e.lookup("zoom"))},function(){return["Zoom: ",D.View("lookup:formatNumberPrecision",function(){return C.mustache(e.lookup("formatNumberPrecision"),e.lookup("zoom"),0)}),"%"]})),"\n ",q.DIV({class:"compressionIndicator"},D.View("lookup:compression",function(){return C.mustache(e.lookup("compression"))})),"\n ",q.DIV(D.View("lookup:wwwc",function(){return C.mustache(e.lookup("wwwc"))})),"\n "),"\n ",q.DIV({class:"bottomleft dicomTag"},"\n ",q.DIV(D.If(function(){return C.call(e.lookup("seriesNumber"))},function(){return["Ser: ",D.View("lookup:seriesNumber",function(){return C.mustache(e.lookup("seriesNumber"))})]})),"\n ",q.DIV(D.If(function(){return C.dataMustache(e.lookup("gt"),e.lookup("numImages"),1)},function(){return["Img: ",D.View("lookup:instanceNumber",function(){return C.mustache(e.lookup("instanceNumber"))})," (",D.View("lookup:imageIndex",function(){return C.mustache(e.lookup("imageIndex"))}),"/",D.View("lookup:numImages",function(){return C.mustache(e.lookup("numImages"))}),")"]})),"\n ",q.DIV(D.If(function(){return C.call(e.lookup("frameRate"))},function(){return[D.View("lookup:formatNumberPrecision",function(){return C.mustache(e.lookup("formatNumberPrecision"),e.lookup("frameRate"),2)})," FPS"]})),"\n ",q.DIV(D.View("lookup:imageDimensions",function(){return C.mustache(e.lookup("imageDimensions"))})),"\n ",q.DIV("\n ",q.SPAN(D.If(function(){return C.dataMustache(e.lookup("isValidNumber"),e.lookup("location"))},function(){return["Loc: ",D.View("lookup:formatNumberPrecision",function(){return C.mustache(e.lookup("formatNumberPrecision"),e.lookup("location"),2)})," mm"]})),"\n ",q.SPAN(D.If(function(){return C.call(e.lookup("thickness"))},function(){return["Thick: ",D.View("lookup:formatNumberPrecision",function(){return C.mustache(e.lookup("formatNumberPrecision"),e.lookup("thickness"),2)})," mm"]})),"\n ",q.SPAN(D.If(function(){return C.call(e.lookup("spacingBetweenSlices"))},function(){return["Spacing: ",D.View("lookup:formatNumberPrecision",function(){return C.mustache(e.lookup("formatNumberPrecision"),e.lookup("spacingBetweenSlices"),2)})," mm"]})),"\n "),"\n ",q.DIV(D.View("lookup:seriesDescription",function(){return C.mustache(e.lookup("seriesDescription"))})),"\n "),"\n "]}),"\n\n ",D.If(function(){return C.call(e.lookup("tagDisplayRightOnly"))},function(){return["\n ",q.DIV({class:"topright dicomTag"},"\n ",q.DIV(D.View("lookup:formatPN",function(){return C.mustache(e.lookup("formatPN"),e.lookup("patientName"))})),"\n ",q.DIV(D.View("lookup:patientId",function(){return C.mustache(e.lookup("patientId"))})),"\n ",q.DIV({class:"priorIndicator"},D.View("lookup:prior",function(){return C.mustache(e.lookup("prior"))})),"\n ",q.DIV(D.View("lookup:studyDescription",function(){return C.mustache(e.lookup("studyDescription"))})),"\n ",q.DIV(D.View("lookup:formatDA",function(){return C.mustache
function e(){return u.hasMultipleFrames()}return e}(),getClassNames:function(){function e(e){return e+" "+(c.uiSettings.displayEchoUltrasoundWorkflow?"single":"double")+"-row-style"}return e}()})}]},toolbarSectionButton:{"template.toolbarSectionButton.js":function(){P.__checkName("toolbarSectionButton"),P.toolbarSectionButton=new P("Template.toolbarSectionButton",function(){var e=this;return D.If(function(){return C.call(C.dot(e.lookup("."),"buttonTemplateName"))},function(){return["\n ",D._TemplateWith(function(){return{template:C.call(C.dot(e.lookup("."),"buttonTemplateName")),data:C.call(e.lookup("."))}},function(){return C.include(function(){return C.call(P.__dynamic)})}),"\n "]},function(){return["\n ",q.DIV({id:function(){return C.mustache(C.dot(e.lookup("."),"id"))},tabindex:"1",class:function(){return["toolbarSectionButton rp-x-1 ",C.mustache(C.dot(e.lookup("."),"classes"))," ",C.mustache(e.lookup("activeClass"))," ",D.If(function(){return C.dataMustache(e.lookup("or"),C.dot(e.lookup("."),"disabled"),C.dataMustache(e.lookup("disableButton")))},function(){return"disabled"})," ",D.If(function(){return C.call(C.dot(e.lookup("."),"subTools"))},function(){return"expandable"})]},title:function(){return C.mustache(C.dot(e.lookup("."),"tooltipTitle"))}},"\n ",q.DIV({class:"svgContainer"},"\n ",D.Let({svg:function(){return C.call(e.lookup("svgLink"))},icon:function(){return C.call(e.lookup("iconClasses"))}},function(){return["\n ",D.If(function(){return C.call(e.lookup("svg"))},function(){return["\n ",q.SVG("\n ",q.USE({"xlink:href":function(){return C.mustache(e.lookup("absoluteUrl"),e.lookup("svg"))}}),"\n "),"\n "]},function(){return["\n ",q.I({class:function(){return C.mustache(e.lookup("icon"))}}),"\n "]}),"\n "]}),"\n "),"\n ",q.DIV({class:"buttonLabel"},"\n ",q.SPAN(D.View("lookup:..title",function(){return C.mustache(C.dot(e.lookup("."),"title"))})),"\n ",D.If(function(){return C.call(C.dot(e.lookup("."),"subTools"))},function(){return["\n ",q.I({class:"fa fa-caret-down expanded-status","aria-hidden":"true"}),"\n "]}),"\n "),"\n ",D.If(function(){return C.call(C.dot(e.lookup("."),"subTools"))},function(){return["\n ",q.DIV({class:"toolbarSectionDrawerContainer"},"\n ",q.DIV({class:"toolbarSectionDrawer"},"\n ",D.Each(function(){return{_sequence:C.call(C.dot(e.lookup("."),"subTools")),_variable:"subTool"}},function(){return["\n ",D._TemplateWith(function(){return C.call(e.lookup("subTool"))},function(){return C.include(e.lookupTemplate("toolbarSectionButton"))}),"\n "]}),"\n "),"\n "),"\n "]}),"\n "),"\n "]})})},"toolbarSectionButton.js":["meteor/ohif:core","meteor/templating","meteor/session","meteor/underscore","../../../lib/toolManager",function(e,t,n){var o;n.import("meteor/ohif:core",{OHIF:function(e){o=e}});var r;n.import("meteor/templating",{Template:function(e){r=e}});var a;n.import("meteor/session",{Session:function(e){a=e}});var s;n.import("meteor/underscore",{_:function(e){s=e}});var c;n.import("../../../lib/toolManager",{toolManager:function(e){c=e}}),r.toolbarSectionButton.onCreated(function(){var e=r.instance();e.isActive=function(e){var t=r.instance(),n=t.data.subTools,o=t.data.id,i=o===e,c=n&&s.findWhere(n,{id:e}),u=a.get("ToolManagerActiveCommandButtons")||[],l=u.indexOf(t.data.id)!==-1;return i||c||l},e.getActiveToolSubProperty=function(e,t){var n=r.instance(),o=n.data.subTools,i=n.data[e],a=n.data.id;if(o&&t!==a&&n.isActive(t)){var c=s.findWhere(o,{id:t});return c?c[e]:i}return i}}),r.toolbarSectionButton.helpers({activeClass:function(){function e(){var e=r.instance(),t=a.get("ToolManagerActiveTool"),n=e.isActive(t);return
studies:e.lookup("studies")}))},function(){return C.include(e.lookupTemplate("studyTimepoint"))}),"\n "),"\n "]}),"\n "),"\n "),"\n "),"\n "]})})},"studyTimepointBrowser.js":["meteor/templating","meteor/reactive-var","meteor/tracker","meteor/underscore","meteor/ohif:core","../../../lib/classes/OHIFError",function(e,t,n){var o;n.import("meteor/templating",{Template:function(e){o=e}});var r;n.import("meteor/reactive-var",{ReactiveVar:function(e){r=e}});var a;n.import("meteor/tracker",{Tracker:function(e){a=e}});var s;n.import("meteor/underscore",{_:function(e){s=e}});var c;n.import("meteor/ohif:core",{OHIF:function(e){c=e}});var u;n.import("../../../lib/classes/OHIFError",{OHIFError:function(e){u=e}}),o.studyTimepointBrowser.onCreated(function(){var e=o.instance();e.timepointViewType=new r(e.data.timepointViewType),e.showAdditionalTimepoints=new r((!0)),e.getCurrentStudy=function(){return e.data.currentStudy&&e.data.currentStudy.get()},e.getStudies=function(e){return e?e.studyInstanceUids.map(function(t){var n={patientId:e.patientId,studyInstanceUid:t},o=c.viewer.Studies.findBy(n);if(o)return o;var i=StudyListStudies.findOne(n);if(!i)throw new u("No study data available for Study: "+t);return i}):c.viewer.Studies.all()}}),o.studyTimepointBrowser.onRendered(function(){var e=o.instance();e.autorun(function(){var t=e.timepointViewType.get();e.$(".timepointEntry, .studyTimepointStudy").removeClass("active"),"key"!==t||e.data.currentStudy||e.$(".timepointEntry:first").addClass("active")});var t=void 0,n=[];e.refreshActiveStudies=function(){return a.afterFlush(function(){s.each(n,function(t){e.$(".studyTimepointStudy[data-uid='"+t+"']").addClass("active")}),e.$(".timepointEntry:first").addClass("active")})},e.autorun(function(){var o=e.data.currentStudy&&e.data.currentStudy.get();o&&(o!==t&&(e.showAdditionalTimepoints.set(!1),t=o,n=[o.studyInstanceUid]),e.refreshActiveStudies())})}),o.studyTimepointBrowser.events({"click .timepointHeader":function(){function e(e,t){var n=i(e.currentTarget).closest(".timepointEntry");n.find(".studyTimepoint").trigger("displayStateChanged"),n.toggleClass("active")}return e}(),"click .studyModality.additional":function(){function e(e,t){t.showAdditionalTimepoints.set(!0)}return e}()}),o.studyTimepointBrowser.helpers({shallShowViewType:function(){function e(e){var t=o.instance();return e.length&&!t.data.timepointViewType}return e}(),viewTypeButtonGroupData:function(){function e(){return{value:o.instance().timepointViewType,options:[{value:"key",text:"Key Timepoints"},{value:"all",text:"All Timepoints"}]}}return e}(),showAdditionalTimepoints:function(){function e(){return o.instance().showAdditionalTimepoints.get()}return e}(),timepoints:function(){function e(){var e=o.instance(),t=e.getCurrentStudy(),n=void 0;return n=t&&!e.showAdditionalTimepoints.get()?e.data.timepointApi.study(t.studyInstanceUid):e.data.timepointApi?"all"===e.timepointViewType.get()?e.data.timepointApi.all():e.data.timepointApi.key():[]}return e}(),studies:function(){function e(e){return o.instance().getStudies(e)}return e}(),modalitiesSummary:function(){function e(e){var t=o.instance(),n=t.getStudies(e),i={};n.forEach(function(e){var t=e.modalities||"UN";i[t]=i[t]+1||1});var r=[];return s.each(i,function(e,t){r.push(e+" "+t)}),r.join(", ")}return e}()})}],"template.studyTimepointStudy.js":function(){P.__checkName("studyTimepointStudy"),P.studyTimepointStudy=new P("Template.studyTimepointStudy",function(){var e=this;return D.Let({isSidebar:function(){return C.call(C.dataMustache(e.lookup("isUndefined"),e.lookup("viewportIndex")))}},function(){return["\n ",q.DIV({class:function(){return["studyTimepointStudy ",D.If(function(){return C.call(e.lookup("isSidebar"))},function(){return"studySidebarTimepoint"},function(){return"studyQuickSwitchTimepoint"})," ",D.If(function(){return C.call(C.dot(e.lookup("."),"active"))},function(){return"active"})," ",D.If(function(){return C.call(e.lookup("isLoading"))},function(){return"loading"})]},"data-uid":functi
x00120063:"DeidentificationMethod",x00120064:"DeidentificationMethodCodeSequence",x00120071:"ClinicalTrialSeriesID",x00120072:"ClinicalTrialSeriesDescription",x00120084:"DistributionType",x00120085:"ConsentForDistributionFlag",x00180000:"AcquisitionGroupLength",x00180010:"ContrastBolusAgent",x00180012:"ContrastBolusAgentSequence",x00180014:"ContrastBolusAdministrationRoute",x00180015:"BodyPartExamined",x00180020:"ScanningSequence",x00180021:"SequenceVariant",x00180022:"ScanOptions",x00180023:"MRAcquisitionType",x00180024:"SequenceName",x00180025:"AngioFlag",x00180026:"InterventionDrugInformationSeq",x00180027:"InterventionDrugStopTime",x00180028:"InterventionDrugDose",x00180029:"InterventionDrugSequence",x0018002a:"AdditionalDrugSequence",x00180030:"Radionuclide",x00180031:"Radiopharmaceutical",x00180032:"EnergyWindowCenterline",x00180033:"EnergyWindowTotalWidth",x00180034:"InterventionDrugName",x00180035:"InterventionDrugStartTime",x00180036:"InterventionSequence",x00180037:"TherapyType",x00180038:"InterventionStatus",x00180039:"TherapyDescription",x0018003a:"InterventionDescription",x00180040:"CineRate",x00180042:"InitialCineRunState",x00180050:"SliceThickness",x00180060:"KVP",x00180070:"CountsAccumulated",x00180071:"AcquisitionTerminationCondition",x00180072:"EffectiveDuration",x00180073:"AcquisitionStartCondition",x00180074:"AcquisitionStartConditionData",x00180075:"AcquisitionEndConditionData",x00180080:"RepetitionTime",x00180081:"EchoTime",x00180082:"InversionTime",x00180083:"NumberOfAverages",x00180084:"ImagingFrequency",x00180085:"ImagedNucleus",x00180086:"EchoNumber",x00180087:"MagneticFieldStrength",x00180088:"SpacingBetweenSlices",x00180089:"NumberOfPhaseEncodingSteps",x00180090:"DataCollectionDiameter",x00180091:"EchoTrainLength",x00180093:"PercentSampling",x00180094:"PercentPhaseFieldOfView",x00180095:"PixelBandwidth",x00181000:"DeviceSerialNumber",x00181002:"DeviceUID",x00181003:"DeviceID",x00181004:"PlateID",x00181005:"GeneratorID",x00181006:"GridID",x00181007:"CassetteID",x00181008:"GantryID",x00181010:"SecondaryCaptureDeviceID",x00181011:"HardcopyCreationDeviceID",x00181012:"DateOfSecondaryCapture",x00181014:"TimeOfSecondaryCapture",x00181016:"SecondaryCaptureDeviceManufacturer",x00181017:"HardcopyDeviceManufacturer",x00181018:"SecondaryCaptureDeviceModelName",x00181019:"SecondaryCaptureDeviceSoftwareVers",x0018101a:"HardcopyDeviceSoftwareVersion",x0018101b:"HardcopyDeviceModelName",x00181020:"SoftwareVersion",x00181022:"VideoImageFormatAcquired",x00181023:"DigitalImageFormatAcquired",x00181030:"ProtocolName",x00181040:"ContrastBolusRoute",x00181041:"ContrastBolusVolume",x00181042:"ContrastBolusStartTime",x00181043:"ContrastBolusStopTime",x00181044:"ContrastBolusTotalDose",x00181045:"SyringeCounts",x00181046:"ContrastFlowRate",x00181047:"ContrastFlowDuration",x00181048:"ContrastBolusIngredient",x00181049:"ContrastBolusConcentration",x00181050:"SpatialResolution",x00181060:"TriggerTime",x00181061:"TriggerSourceOrType",x00181062:"NominalInterval",x00181063:"FrameTime",x00181064:"CardiacFramingType",x00181065:"FrameTimeVector",x00181066:"FrameDelay",x00181067:"ImageTriggerDelay",x00181068:"MultiplexGroupTimeOffset",x00181069:"TriggerTimeOffset",x0018106a:"SynchronizationTrigger",x0018106c:"SynchronizationChannel",x0018106e:"TriggerSamplePosition",x00181070:"RadiopharmaceuticalRoute",x00181071:"RadiopharmaceuticalVolume",x00181072:"RadiopharmaceuticalStartTime",x00181073:"RadiopharmaceuticalStopTime",x00181074:"RadionuclideTotalDose",x00181075:"RadionuclideHalfLife",x00181076:"RadionuclidePositronFraction",x00181077:"RadiopharmaceuticalSpecActivity",x00181078:"RadiopharmaceuticalStartDateTime",x00181079:"RadiopharmaceuticalStopDateTime",x00181080:"BeatRejectionFlag",x00181081:"LowRRValue",x00181082:"HighRRValue",x00181083:"IntervalsAcquired",x00181084:"IntervalsRejected",x00181085:"PVCRejection",x00181086:"SkipBeats",x00181088:"HeartRate",x00181090:"CardiacNumberOfImages",x00181094:"TriggerWindow",x00181100:"ReconstructionDiameter",x00181110:"DistanceSourceToDetector",x00181111:"DistanceSourceToPatient",x00
x0022004e:"MydriaticAgentConcentration",x00220055:"IlluminationWaveLength",x00220056:"IlluminationPower",x00220057:"IlluminationBandwidth",x00220058:"MydriaticAgentSequence",x00231001:"NumberOfSeriesInStudy",x00231002:"NumberOfUnarchivedSeries",x00231010:"ReferenceImageField",x00231050:"SummaryImage",x00231070:"StartTimeSecsInFirstAxial",x00231074:"NoofUpdatesToHeader",x0023107d:"IndicatesIfTheStudyHasCompleteInfo",x00251006:"LastPulseSequenceUsed",x00251007:"ImagesInSeries",x00251010:"LandmarkCounter",x00251011:"NumberOfAcquisitions",x00251014:"IndicatesNoofUpdatesToHeader",x00251017:"SeriesCompleteFlag",x00251018:"NumberOfImagesArchived",x00251019:"LastImageNumberUsed",x0025101a:"PrimaryReceiverSuiteAndHost",x00271006:"ImageArchiveFlag",x00271010:"ScoutType",x0027101c:"VmaMamp",x0027101d:"VmaPhase",x0027101e:"VmaMod",x0027101f:"VmaClip",x00271020:"SmartScanOnOffFlag",x00271030:"ForeignImageRevision",x00271031:"ImagingMode",x00271032:"PulseSequence",x00271033:"ImagingOptions",x00271035:"PlaneType",x00271036:"ObliquePlane",x00271040:"RASLetterOfImageLocation",x00271041:"ImageLocation",x00271042:"CenterRCoordOfPlaneImage",x00271043:"CenterACoordOfPlaneImage",x00271044:"CenterSCoordOfPlaneImage",x00271045:"NormalRCoord",x00271046:"NormalACoord",x00271047:"NormalSCoord",x00271048:"RCoordOfTopRightCorner",x00271049:"ACoordOfTopRightCorner",x0027104a:"SCoordOfTopRightCorner",x0027104b:"RCoordOfBottomRightCorner",x0027104c:"ACoordOfBottomRightCorner",x0027104d:"SCoordOfBottomRightCorner",x00271050:"TableStartLocation",x00271051:"TableEndLocation",x00271052:"RASLetterForSideOfImage",x00271053:"RASLetterForAnteriorPosterior",x00271054:"RASLetterForScoutStartLoc",x00271055:"RASLetterForScoutEndLoc",x00271060:"ImageDimensionX",x00271061:"ImageDimensionY",x00271062:"NumberOfExcitations",x00280000:"ImagePresentationGroupLength",x00280002:"SamplesPerPixel",x00280003:"SamplesPerPixelUsed",x00280004:"PhotometricInterpretation",x00280005:"ImageDimensions",x00280006:"PlanarConfiguration",x00280008:"NumberOfFrames",x00280009:"FrameIncrementPointer",x0028000a:"FrameDimensionPointer",x00280010:"Rows",x00280011:"Columns",x00280012:"Planes",x00280014:"UltrasoundColorDataPresent",x00280030:"PixelSpacing",x00280031:"ZoomFactor",x00280032:"ZoomCenter",x00280034:"PixelAspectRatio",x00280040:"ImageFormat",x00280050:"ManipulatedImage",x00280051:"CorrectedImage",x0028005f:"CompressionRecognitionCode",x00280060:"CompressionCode",x00280061:"CompressionOriginator",x00280062:"CompressionLabel",x00280063:"CompressionDescription",x00280065:"CompressionSequence",x00280066:"CompressionStepPointers",x00280068:"RepeatInterval",x00280069:"BitsGrouped",x00280070:"PerimeterTable",x00280071:"PerimeterValue",x00280080:"PredictorRows",x00280081:"PredictorColumns",x00280082:"PredictorConstants",x00280090:"BlockedPixels",x00280091:"BlockRows",x00280092:"BlockColumns",x00280093:"RowOverlap",x00280094:"ColumnOverlap",x00280100:"BitsAllocated",x00280101:"BitsStored",x00280102:"HighBit",x00280103:"PixelRepresentation",x00280104:"SmallestValidPixelValue",x00280105:"LargestValidPixelValue",x00280106:"SmallestImagePixelValue",x00280107:"LargestImagePixelValue",x00280108:"SmallestPixelValueInSeries",x00280109:"LargestPixelValueInSeries",x00280110:"SmallestImagePixelValueInPlane",x00280111:"LargestImagePixelValueInPlane",x00280120:"PixelPaddingValue",x00280121:"PixelPaddingRangeLimit",x00280200:"ImageLocation",x00280300:"QualityControlImage",x00280301:"BurnedInAnnotation",x00280400:"TransformLabel",x00280401:"TransformVersionNumber",x00280402:"NumberOfTransformSteps",x00280403:"SequenceOfCompressedData",x00280404:"DetailsOfCoefficients",x002804x2:"CoefficientCoding",x002804x3:"CoefficientCodingPointers",x00280700:"DCTLabel",x00280701:"DataBlockDescription",x00280702:"DataBlock",x00280710:"NormalizationFactorFormat",x00280720:"ZonalMapNumberFormat",x00280721:"ZonalMapLocation",x00280722:"ZonalMapFormat",x00280730:"AdaptiveMapFormat",x00280740:"CodeNumberFormat",x002808x0:"CodeLabel",x002808x2:"NumberOfTables",x002808x3:"CodeTableLocation",x002808x4:"BitsForCodeWord",x002808x8
x00720040:"ImageSetLabel",x00720050:"SelectorAttributeVR",x00720052:"SelectorSequencePointer",x00720054:"SelectorSeqPointerPrivateCreator",x00720056:"SelectorAttributePrivateCreator",x00720060:"SelectorATValue",x00720062:"SelectorCSValue",x00720064:"SelectorISValue",x00720066:"SelectorLOValue",x00720068:"SelectorLTValue",x0072006a:"SelectorPNValue",x0072006c:"SelectorSHValue",x0072006e:"SelectorSTValue",x00720070:"SelectorUTValue",x00720072:"SelectorDSValue",x00720074:"SelectorFDValue",x00720076:"SelectorFLValue",x00720078:"SelectorULValue",x0072007a:"SelectorUSValue",x0072007c:"SelectorSLValue",x0072007e:"SelectorSSValue",x00720080:"SelectorCodeSequenceValue",x00720100:"NumberOfScreens",x00720102:"NominalScreenDefinitionSequence",x00720104:"NumberOfVerticalPixels",x00720106:"NumberOfHorizontalPixels",x00720108:"DisplayEnvironmentSpatialPosition",x0072010a:"ScreenMinimumGrayscaleBitDepth",x0072010c:"ScreenMinimumColorBitDepth",x0072010e:"ApplicationMaximumRepaintTime",x00720200:"DisplaySetsSequence",x00720202:"DisplaySetNumber",x00720203:"DisplaySetLabel",x00720204:"DisplaySetPresentationGroup",x00720206:"DisplaySetPresentationGroupDescr",x00720208:"PartialDataDisplayHandling",x00720210:"SynchronizedScrollingSequence",x00720212:"DisplaySetScrollingGroup",x00720214:"NavigationIndicatorSequence",x00720216:"NavigationDisplaySet",x00720218:"ReferenceDisplaySets",x00720300:"ImageBoxesSequence",x00720302:"ImageBoxNumber",x00720304:"ImageBoxLayoutType",x00720306:"ImageBoxTileHorizontalDimension",x00720308:"ImageBoxTileVerticalDimension",x00720310:"ImageBoxScrollDirection",x00720312:"ImageBoxSmallScrollType",x00720314:"ImageBoxSmallScrollAmount",x00720316:"ImageBoxLargeScrollType",x00720318:"ImageBoxLargeScrollAmount",x00720320:"ImageBoxOverlapPriority",x00720330:"CineRelativeToRealTime",x00720400:"FilterOperationsSequence",x00720402:"FilterByCategory",x00720404:"FilterByAttributePresence",x00720406:"FilterByOperator",x00720432:"SynchronizedImageBoxList",x00720434:"TypeOfSynchronization",x00720500:"BlendingOperationType",x00720510:"ReformattingOperationType",x00720512:"ReformattingThickness",x00720514:"ReformattingInterval",x00720516:"ReformattingOpInitialViewDir",x00720520:"RenderingType3D",x00720600:"SortingOperationsSequence",x00720602:"SortByCategory",x00720604:"SortingDirection",x00720700:"DisplaySetPatientOrientation",x00720702:"VOIType",x00720704:"PseudoColorType",x00720706:"ShowGrayscaleInverted",x00720710:"ShowImageTrueSizeFlag",x00720712:"ShowGraphicAnnotationFlag",x00720714:"ShowPatientDemographicsFlag",x00720716:"ShowAcquisitionTechniquesFlag",x00720717:"DisplaySetHorizontalJustification",x00720718:"DisplaySetVerticalJustification",x00741000:"UnifiedProcedureStepState",x00741002:"UPSProgressInformationSequence",x00741004:"UnifiedProcedureStepProgress",x00741006:"UnifiedProcedureStepProgressDescr",x00741008:"UnifiedProcedureStepComURISeq",x0074100a:"ContactURI",x0074100c:"ContactDisplayName",x00741020:"BeamTaskSequence",x00741022:"BeamTaskType",x00741024:"BeamOrderIndex",x00741030:"DeliveryVerificationImageSequence",x00741032:"VerificationImageTiming",x00741034:"DoubleExposureFlag",x00741036:"DoubleExposureOrdering",x00741038:"DoubleExposureMeterset",x0074103a:"DoubleExposureFieldDelta",x00741040:"RelatedReferenceRTImageSequence",x00741042:"GeneralMachineVerificationSequence",x00741044:"ConventionalMachineVerificationSeq",x00741046:"IonMachineVerificationSequence",x00741048:"FailedAttributesSequence",x0074104a:"OverriddenAttributesSequence",x0074104c:"ConventionalControlPointVerifySeq",x0074104e:"IonControlPointVerificationSeq",x00741050:"AttributeOccurrenceSequence",x00741052:"AttributeOccurrencePointer",x00741054:"AttributeItemSelector",x00741056:"AttributeOccurrencePrivateCreator",x00741200:"ScheduledProcedureStepPriority",x00741202:"StudyListLabel",x00741204:"ProcedureStepLabel",x00741210:"ScheduledProcessingParametersSeq",x00741212:"PerformedProcessingParametersSeq",x00741216:"UPSPerformedProcedureSequence",x00741220:"RelatedProcedureStepSequence",x00741222:"ProcedureStepRelationshipType",x00741230:"DeletionLock
x60xx1101:"OverlayDescriptorRed",x60xx1102:"OverlayDescriptorGreen",x60xx1103:"OverlayDescriptorBlue",x60xx1200:"OverlaysGray",x60xx1201:"OverlaysRed",x60xx1202:"OverlaysGreen",x60xx1203:"OverlaysBlue",x60xx1301:"ROIArea",x60xx1302:"ROIMean",x60xx1303:"ROIStandardDeviation",x60xx1500:"OverlayLabel",x60xx3000:"OverlayData",x60xx4000:"OverlayComments",x7fxx0000:"PixelDataGroupLength",x7fxx0010:"PixelData",x7fxx0011:"VariableNextDataGroup",x7fxx0020:"VariableCoefficientsSDVN",x7fxx0030:"VariableCoefficientsSDHN",x7fxx0040:"VariableCoefficientsSDDN",xfffafffa:"DigitalSignaturesSequence",xfffcfffc:"DataSetTrailingPadding",xfffee000:"StartOfItem",xfffee00d:"EndOfItems",xfffee0dd:"EndOfSequence"};!function(e){var t=Object.prototype.hasOwnProperty;for(var n in f.sanitizeForInObject(e))t.call(e,n)&&(o[n]=e[n])}(i),i=null},"displayReferenceLines.js":["meteor/ohif:core",function(e,t,n){function o(e){var t=cornerstone.getEnabledElement(e);if(!t||!t.image)return void r.log.info("displayReferenceLines enabled element is undefined or it's image is not rendered");var n=t.image.imageId,o=cornerstoneTools.metaData.get("imagePlane",n);return cornerstoneTools.referenceLines.tool.disable(e),r.viewer.refLinesEnabled&&o&&o.frameOfReferenceUID?(r.log.info("displayReferenceLines for image with id: "+n),void i(".imageViewerViewport").not(e).each(function(e,t){var n=void 0;if(i(t).find("canvas").length){try{var o=cornerstone.getEnabledElement(t);n=o.image.imageId}catch(e){return}if(!n)return;cornerstoneTools.referenceLines.tool.enable(t,r.viewer.updateImageSynchronizer)}})):void r.log.info("displayReferenceLines refLinesEnabled is not enabled, no imagePlane or no frameOfReferenceUID")}n.export({displayReferenceLines:function(){return o}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}})}],"enablePrefetchOnElement.js":["meteor/session","meteor/jquery","meteor/ohif:core","./StackManager.js","./classes/OHIFError",function(e,t,n){function o(e){if(a.log.info("enablePrefetchOnElement"),r(".viewportContainer .imageViewerViewport").each(function(e,t){r(t).find("canvas").length&&cornerstoneTools.stackPrefetch.disable(t)}),r(e).find("canvas").length){var t=cornerstoneTools.getToolState(e,"stack");if(t&&t.data.length&&t.data[0].imageIds.length>1){var n=i.get("activeViewport"),o=i.get("activeContentId"),u=ViewerData[o].loadedSeriesData[n].displaySetInstanceUid,l=s.findStack(u);if(!l)throw new c("Requested stack "+u+" was not created");cornerstoneTools.stackPrefetch.enable(e)}}}n.export({enablePrefetchOnElement:function(){return o}});var i;n.import("meteor/session",{Session:function(e){i=e}});var r;n.import("meteor/jquery",{$:function(e){r=e}});var a;n.import("meteor/ohif:core",{OHIF:function(e){a=e}});var s;n.import("./StackManager.js",{StackManager:function(e){s=e}});var c;n.import("./classes/OHIFError",{OHIFError:function(e){c=e}})}],"getElementIfNotEmpty.js":["meteor/jquery",function(e,t,n){function o(e){var t=i(".imageViewerViewport"),n=t.get(e),o=t.eq(e).find("canvas");if(n&&!i(n).hasClass("empty")&&0!==o.length){try{var r=cornerstone.getEnabledElement(n)}catch(e){return}return n}}n.export({getElementIfNotEmpty:function(){return o}});var i;n.import("meteor/jquery",{$:function(e){i=e}})}],"getFrameOfReferenceUID.js":function(e,t,n){function o(e){var t;try{t=cornerstone.getEnabledElement(e)}catch(e){return}if(t&&t.image){var n=t.image.imageId,o=cornerstoneTools.metaData.get("imagePlane",n);if(o&&o.frameOfReferenceUID)return o.frameOfReferenceUID}}n.export({getFrameOfReferenceUID:function(){return o}})},"getImageId.js":["meteor/meteor","./getWADORSImageId",function(e,t,n){function o(e,t){if(e){if(e.url)return e.url;if(e.wadouri){var n="dicomweb:"+i.absoluteUrl(e.wadouri);return void 0!==t&&(n+="&frame="+t),n}return r(e)}}n.export({getImageId:function(){return o}});var i;n.import("meteor/meteor",{Meteor:function(e){i=e}});var r;n.import("./getWADORSImageId",{getWADORSImageId:function(e){r=e}})}],"getStackDataIfNotEmpty.js":["./getElementIfNotEmpty.js",function(e,t,n){function o(e){var t=i(e);if(t){var n=cornerstoneTools.getToolState(t,"stack");if(
}(),configureTools:function(){function e(){var e=cornerstoneTools,t=e.panMultiTouch,n=e.textStyle,i=e.toolStyle,a=e.toolColors,s=e.length,c=e.arrowAnnotate,u=e.zoom,d=e.ellipticalRoi,p=e.textMarker,f=e.magnify,x={testPointers:function(){function e(e){return e.numPointers>=3}return e}()};t.setConfiguration(x),n.setBackgroundColor("transparent");var g="Roboto, OpenSans, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif";n.setFont("15px "+g),i.setToolWidth(2),a.setToolColor("rgb(255, 255, 0)"),a.setActiveColor("rgb(0, 255, 0)");var h=v.getToolDefaultStates().shadowConfig,S=s.getConfiguration(),y=d.getConfiguration();s.setConfiguration(o({},S,h,{drawHandlesOnHover:!0})),d.setConfiguration(o({},y,h));var I=r("#startFrom"),T=r("#ascending"),D={markers:["L5","L4","L3","L2","L1","T12","T11","T10","T9","T8","T7","T6","T5","T4","T3","T2","T1","C7","C6","C5","C4","C3","C2","C1"],current:I.val(),ascending:T.is(":checked"),loop:!0,changeTextCallback:m.changeTextCallback,shadow:h.shadow,shadowColor:h.shadowColor,shadowOffsetX:h.shadowOffsetX,shadowOffsetY:h.shadowOffsetY};p.setConfiguration(D);var b={getTextCallback:l.getTextCallback,changeTextCallback:l.changeTextCallback,drawHandles:!1,arrowFirst:!0};c.setConfiguration(b);var w={minScale:.05,maxScale:10};u.setConfiguration(w);var C={magnifySize:300,magnificationLevel:3};f.setConfiguration(C)}return e}(),getKeysByValue:function(){function e(e,t){return Object.keys(e).filter(function(n){return e[n]===t})}return e}(),configureLoadProcess:function(){function e(){var e=this;r(cornerstone).on("CornerstoneImageLoadProgress",function(t,n){L=e.getKeysByValue(window.ViewportLoading,n.imageId),L.forEach(function(e){i.set("CornerstoneLoadProgress"+e,n.percentComplete)});var o=a.string.encodeId(n.imageId);i.set("CornerstoneThumbnailLoadProgress"+o,n.percentComplete)})}return e}(),setGestures:function(){function e(e){x=e}return e}(),getGestures:function(){function e(){return x}return e}(),addTool:function(){function e(e,t){f[e]=t}return e}(),getTools:function(){function e(){return f}return e}(),setToolDefaultStates:function(){function e(e){g=e}return e}(),getToolDefaultStates:function(){function e(){return g}return e}(),setActiveToolForElement:function(){function e(e,t){var n=r(t).find("canvas");if(!t.classList.contains("empty")&&n.length){f[p].mouse.deactivate(t,1),f[p].touch&&f[p].touch.deactivate(t),Object.keys(g).forEach(function(e){var n=g[e];n&&n.length&&"disabledToolButtons"!==e&&n.forEach(function(n){"deactivate"===e&&n===p||(f[n].mouse[e](t,"activate"===e||"deactivate"===e?1:void 0),f[n].touch[e](t))})});var o=cornerstoneTools.getToolState(t,"stack");if(o&&o.data&&o.data.length){var i=o.data[0].imageIds;cornerstoneTools.pan.deactivate(t),cornerstoneTools.zoom.deactivate(t),cornerstoneTools.zoomWheel.deactivate(t),cornerstoneTools.stackScrollWheel.deactivate(t),cornerstoneTools.panMultiTouch.disable(t),cornerstoneTools.zoomTouchPinch.disable(t),cornerstoneTools.stackScrollMultiTouch.disable(t),cornerstoneTools.doubleTapZoom.disable(t),cornerstoneTools.zoom.activate(t,4);var a=void 0;if(i.length>1?(cornerstoneTools.stackScrollWheel.activate(t),x.stackScrollMultiTouch.enabled===!0&&cornerstoneTools.stackScrollMultiTouch.activate(t),a={testPointers:function(){function e(e){return 2===e.numPointers}return e}()},cornerstoneTools.panMultiTouch.setConfiguration(a)):(cornerstoneTools.zoomWheel.activate(t),a={testPointers:function(){function e(e){return e.numPointers>=2}return e}()},cornerstoneTools.panMultiTouch.setConfiguration(a)),"pan"===e)cornerstoneTools.pan.activate(t,3);else if("crosshairs"===e){cornerstoneTools.pan.activate(t,2);var l=s(t);if(l){c(l);var m=u.synchronizers[l];f[e].mouse.activate(t,1,m)}}else"zoom"===e?(cornerstoneTools.pan.activate(t,2),cornerstoneTools.zoom.activate(t,5)):(cornerstoneTools.pan.activate(t,2),f[e].mouse.activate(t,1));f[e].touch&&f[e].touch.activate(t),x.zoomTouchPinch.enabled===!0&&cornerstoneTools.zoomTouchPinch.activate(t),x.panMultiTouch.enabled===!0&&cornerstoneTools.panMultiTouch.activate(t),x.doub
if(++i>=n)return 0}}return e}())}()}n.export({TypeSafeCollection:function(){return y}});var l;n.import("babel-runtime/helpers/typeof",{default:function(e){l=e}});var m;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){m=e}});var d;n.import("meteor/random",{Random:function(e){d=e}});var p;n.import("meteor/reactive-var",{ReactiveVar:function(e){p=e}});var x=".",g="asc",h="desc",v=0,S=2147483647,y=function(){function e(){m(this,e),this._operationCount=new p(v),this._elementList=[]}return e.prototype._invalidate=function(){function e(){var e=this._operationCount.get();this._operationCount.set(e<S?e+1:v)}return e}(),e.prototype._elements=function(){function e(e){return e===!0||this._operationCount.get(),this._elementList}return e}(),e.prototype._elementWithPayload=function(){function e(e,t){return this._elements(t).find(function(t){return t.payload===e})}return e}(),e.prototype._elementWithId=function(){function e(e,t){return this._elements(t).find(function(t){return t.id===e})}return e}(),e.prototype.updateById=function(){function e(e,t){var n=!1,o=this._elementWithPayload(t,!0);return o?o.id===e&&(n=!0,this._invalidate()):(o=this._elementWithId(e,!0),o&&(o.payload=t,n=!0,this._invalidate())),n}return e}(),e.prototype.update=function(){function e(e){var t=!1,n=this._elementWithPayload(e,!0);return n&&(t=!0,this._invalidate()),t}return e}(),e.prototype.insert=function(){function e(e){var t=null,n=this._elementWithPayload(e,!0);return n||(t=d.id(),this._elements(!0).push({id:t,payload:e}),this._invalidate()),t}return e}(),e.prototype.removeAll=function(){function e(){for(var e=this._elements(!0),t=e.length,n=t-1;n>=0;n--){var o=e[n];delete o.id,delete o.payload,e[n]=null}e.splice(0,t),this._invalidate()}return e}(),e.prototype.remove=function(){function e(e){var t=this.findAllEntriesBy(e),n=t.length,o=[];if(n>0){for(var i=this._elements(!0),r=n-1;r>=0;r--){var a=t[r];i.splice(a[2],1),o.push(a[0])}this._invalidate()}return o}return e}(),e.prototype.getElementId=function(){function e(e){var t=this._elementWithPayload(e);return t&&t.id}return e}(),e.prototype.findById=function(){function e(e){var t=this._elementWithId(e);return t&&t.payload}return e}(),e.prototype.indexOfElement=function(){function e(e){return this._elements().indexOf(this._elementWithPayload(e,!0))}return e}(),e.prototype.indexOfId=function(){function e(e){return this._elements().indexOf(this._elementWithId(e,!0))}return e}(),e.prototype.getElementByIndex=function(){function e(e){var t=this._elements()[e>=0?e:-1];return t&&t.payload}return e}(),e.prototype.find=function(){function e(e){var t=this,n=void 0;return r(e)&&(n=this._elements().find(function(n,o){return e.call(t,n.payload,n.id,o)})),n&&n.payload}return e}(),e.prototype.findBy=function(){function e(e,t){var n=void 0;if(o(t)){var i=this.all(t);i.length>0&&(n=o(e)?i.find(function(t){return s(e,t)}):i[0])}else o(e)&&(n=this._elements().find(function(t){return s(e,t.payload)}),n&&(n=n.payload));return n}return e}(),e.prototype.findAllEntriesBy=function(){function e(e){var t=[];return o(e)&&this._elements().forEach(function(n,o){s(e,n.payload)&&t.push([n.payload,n.id,o])}),t}return e}(),e.prototype.findAllBy=function(){function e(e,t){var n=this.findAllEntriesBy(e).map(function(e){return e[0]});return o(t)&&"sort"in t&&u(n,t.sort),n}return e}(),e.prototype.forEach=function(){function e(e){var t=this;r(e)&&this._elements().forEach(function(n,o){e.call(t,n.payload,n.id,o)})}return e}(),e.prototype.count=function(){function e(){return this._elements().length}return e}(),e.prototype.all=function(){function e(e){var t=this._elements().map(function(e){return e.payload});return o(e)&&"sort"in e&&u(t,e.sort),t}return e}(),e}(),I=Object.prototype.hasOwnProperty}],metadata:{"InstanceMetadata.js":["babel-runtime/helpers/typeof","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","./Metadata","../../dicomTagDescriptions",function(e,t,n){n.export({InstanceMetadata:function(){return p}});var o;n.import("babel-runtime/helpers/typeof",
F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/confirmDeleteDialog/confirmDeleteDialog.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/textMarkerDialogs/template.textMarkerDialogs.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/textMarkerDialogs/textMarkerDialogs.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/displaySetNavigation/template.displaySetNavigation.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/displaySetNavigation/displaySetNavigation.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studySeriesQuickSwitch/template.studySeriesQuickSwitch.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studySeriesQuickSwitch/studySeriesQuickSwitch.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/template.studyTimepoint.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/studyTimepoint.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/template.studyTimepointBrowser.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/studyTimepointBrowser.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/template.studyTimepointStudy.js"),F("./node_modules/meteor/ohif:viewerbase/client/components/viewer/studyTimepointBrowser/studyTimepointStudy.js");var B=F("./node_modules/meteor/ohif:viewerbase/main.js");"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["ohif:viewerbase"]=B,{dialogPolyfill:E})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,a=Package.meteor.meteorEnv,r=Package["ohif:viewerbase"].dialogPolyfill,n=Package.modules.meteorInstall,i=Package.modules.Buffer,o=Package.modules.process,s=Package["ecmascript-runtime"].Symbol,c=Package["ecmascript-runtime"].Map,u=Package["ecmascript-runtime"].Set,l=Package["babel-runtime"].meteorBabelHelpers,m=Package.promise.Promise,f=n({node_modules:{meteor:{"ohif:metadata":{"main.js":["./namespace.js","./client/",function(e,t,a){a.export({OHIF:function(){return r},Metadata:function(){return n}});var r,n;a.import("./namespace.js",{OHIF:function(e){r=e},Metadata:function(e){n=e}}),a.import("./client/")}],"namespace.js":["meteor/ohif:core",function(e,t,a){a.export({OHIF:function(){return r},Metadata:function(){return n}});var r;a.import("meteor/ohif:core",{OHIF:function(e){r=e}});var n={};r.metadata=n}],client:{"OHIFInstanceMetadata.js":["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","meteor/ohif:viewerbase",function(e,t,a){a.export({OHIFInstanceMetadata:function(){return c}});var r;a.import("babel-runtime/helpers/classCallCheck",{default:function(e){r=e}});var n;a.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(e){n=e}});var i;a.import("babel-runtime/helpers/inherits",{default:function(e){i=e}});var o;a.import("meteor/ohif:viewerbase",{Viewerbase:function(e){o=e}});var s=o.metadata.InstanceMetadata,c=function(e){function t(a){r(this,t);var i=n(this,e.call(this,a));return i._cache=Object.create(null),i.init(),i}return i(t,e),t.prototype.init=function(){function e(){var e=this.getData();this._sopInstanceUID=e.sopInstanceUid}return e}(),t.prototype.getRawValue=function(){function e(e,a,r){if(e in this._cache&&r!==!0)return this._cache[e];var n=t.getPropertyName(e),i=this.getData(),o=i[n];return void 0!==o?(this._cache[e]=o,o):a}return e}(),t.prototype.tagExists=function(){function e(e){var a=t.getPropertyName(e),r=this.getData();return a in r}return e}(),t.getPropertyName=function(){function e(e){var t=void 0,a=s.getTagInfo(e);return null!==a.propertyName&&(t=a.propertyName.replace(/^SOP/,"sop").replace(/UID$/,"Uid"),t=t.charAt(0).toLowerCase()+t.substr(1)),t}return e}(),t}(s)}],"OHIFSeriesMetadata.js":["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","meteor/ohif:viewerbase","./OHIFInstanceMetadata",function(e,t,a){a.export({OHIFSeriesMetadata:function(){return c}});var r;a.import("babel-runtime/helpers/classCallCheck",{default:function(e){r=e}});var n;a.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(e){n=e}});var i;a.import("babel-runtime/helpers/inherits",{default:function(e){i=e}});var o;a.import("meteor/ohif:viewerbase",{Viewerbase:function(e){o=e}});var s;a.import("./OHIFInstanceMetadata",{OHIFInstanceMetadata:function(e){s=e}});var c=function(e){function t(a){r(this,t);var i=n(this,e.call(this,a));return i.init(),i}return i(t,e),t.prototype.init=function(){function e(){var e=this,t=this.getData();this._seriesInstanceUID=t.seriesInstanceUid,t.instances.forEach(function(t){e.addInstance(new s(t))})}return e}(),t}(o.metadata.SeriesMetadata)}],"OHIFStudyMetadata.js":["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","meteor/ohif:viewerbase","./OHIFSeriesMetadata",function(e,t,a){a.export({OHIFStudyMetadata:function(){return c}});var r;a.import("babel-runtime/helpers/classCallCheck",{default:function(e){r=e}});var n;a.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(e){n=e}});var i;a.import("babel-runtime/helpers/inherits",{default:function(e){i=e}});var o;a.import("meteor/ohif:viewerbase",{Viewerbase:function(e){o=e}});var s;a.import("./OHIFSeriesMetadata",{OHIFSeriesMetadata:function(e){s=e}});var c=function(e){function t(a){r(this,t);var i=n(this,e.call(this,a));return i.init(),i}return i(t,e),t.prototype.init=function(){function e(){var e=this,t=this.getDat
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,n;(function(){(function(){!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof e?r=e:"undefined"!=typeof self&&(r=self),r.JSZip=t()}}(function(){var t,e,r;return function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var d="function"==typeof require&&require;if(!o&&d)return d(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t,e){for(var r="",i,a,s,o,d,l,h,f=0;f<t.length;)i=t.charCodeAt(f++),a=t.charCodeAt(f++),s=t.charCodeAt(f++),o=i>>2,d=(3&i)<<4|a>>4,l=(15&a)<<2|s>>6,h=63&s,isNaN(a)?l=h=64:isNaN(s)&&(h=64),r=r+n.charAt(o)+n.charAt(d)+n.charAt(l)+n.charAt(h);return r},r.decode=function(t,e){var r="",i,a,s,o,d,l,h,f=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");f<t.length;)o=n.indexOf(t.charAt(f++)),d=n.indexOf(t.charAt(f++)),l=n.indexOf(t.charAt(f++)),h=n.indexOf(t.charAt(f++)),i=o<<2|d>>4,a=(15&d)<<4|l>>2,s=(3&l)<<6|h,r+=String.fromCharCode(i),64!=l&&(r+=String.fromCharCode(a)),64!=h&&(r+=String.fromCharCode(s));return r}},{}],2:[function(t,e,r){"use strict";function n(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}n.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},e.exports=n},{}],3:[function(t,e,r){"use strict";r.STORE={magic:"\0\0",compress:function(t,e){return t},uncompress:function(t){return t},compressInputType:null,uncompressInputType:null},r.DEFLATE=t("./flate")},{"./flate":8}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,155
null!==e&&(this.fileComment=e)}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=new i(t.value);return 1!==e.readInt(1)?null:o.crc32(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readString(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=new i(t.value);return 1!==e.readInt(1)?null:o.crc32(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readString(t.length-5))}return null}},e.exports=n},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(t,e,r){"use strict";var n=t("./lib/utils/common").assign,i=t("./lib/deflate"),a=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};n(o,i,a,s),e.exports=o},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(t,e,r){"use strict";function n(t,e){var r=new b(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function i(t,e){return e=e||{},e.raw=!0,n(t,e)}function a(t,e){return e=e||{},e.gzip=!0,n(t,e)}var s=t("./zlib/deflate.js"),o=t("./utils/common"),d=t("./utils/strings"),l=t("./zlib/messages"),h=t("./zlib/zstream"),f=0,u=4,c=0,p=1,_=-1,m=0,g=8,b=function(t){this.options=o.assign({level:_,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==c)throw new Error(l[r]);e.header&&s.deflateSetHeader(this.strm,e.header)};b.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=e===~~e?e:e===!0?u:f,"string"==typeof t?r.input=d.string2buf(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new o.Buf8(n),r.next_out=0,r.avail_out=n),i=s.deflate(r,a),i!==p&&i!==c)return this.onEnd(i),this.ended=!0,!1;(0===r.avail_out||0===r.avail_in&&a===u)&&("string"===this.options.to?this.onData(d.buf2binstring(o.shrinkBuf(r.output,r.next_out))):this.onData(o.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&i!==p);return a!==u||(i=s.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===c)},b.prototype.onData=function(t){this.chunks.push(t)},b.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=b,r.deflate=n,r.deflateRaw=i,r.gzip=a},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(t,e,r){"use strict";function n(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function i(t,e){return e=e||{},e.raw=!0,n(t,e)}var a=t("./zlib/inflate.js"),s=t("./utils/common"),o=t("./utils/strings"),d=t("./zlib/constants"),l=t("./zlib/messages"),h=t("./zlib/zstream"),f=t("./zlib/gzheader"),u=function(t){this.options=s.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,e.windowBits);if(r!==d.Z_OK)throw new Error(l[r]);this.header=new f,a.inflateGetHeader(this.strm,this.header)};u.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,i,l,h,f,u;if(this.ended)return!1;l=e===~~e?e:e===!0?d.Z_FINISH:d.Z_NO_FLUSH,"string"==typeof t?r.input=o.binstring2buf(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new s.Buf8(n),r.next_out=0,r.avail_out=n),i=a.inflate(r,d.Z_NO_FLUSH),i!==d.Z_STREAM_END&&i!==d.Z_OK)return this.onEnd(i),this.ended=!0,!1;r.next_out&&(0===r.avail_ou
},zt=w(k,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Et),r.distbits=Et.bits,zt){t.msg="invalid distances set",r.mode=lt;break}if(r.mode=$,e===A)break t;case $:r.mode=tt;case tt:if(d>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=d,r.hold=u,r.bits=c,b(t,ut),o=t.next_out,a=t.output,l=t.avail_out,s=t.next_in,i=t.input,d=t.avail_in,u=r.hold,c=r.bits,r.mode===K&&(r.back=-1);break}for(r.back=0;mt=r.lencode[u&(1<<r.lenbits)-1],gt=mt>>>24,bt=mt>>>16&255,wt=65535&mt,!(gt<=c);){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}if(bt&&0===(240&bt)){for(vt=gt,yt=bt,kt=wt;mt=r.lencode[kt+((u&(1<<vt+yt)-1)>>vt)],gt=mt>>>24,bt=mt>>>16&255,wt=65535&mt,!(vt+gt<=c);){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}u>>>=vt,c-=vt,r.back+=vt}if(u>>>=gt,c-=gt,r.back+=gt,r.length=wt,0===bt){r.mode=at;break}if(32&bt){r.back=-1,r.mode=K;break}if(64&bt){t.msg="invalid literal/length code",r.mode=lt;break}r.extra=15&bt,r.mode=et;case et:if(r.extra){for(St=r.extra;c<St;){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=rt;case rt:for(;mt=r.distcode[u&(1<<r.distbits)-1],gt=mt>>>24,bt=mt>>>16&255,wt=65535&mt,!(gt<=c);){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}if(0===(240&bt)){for(vt=gt,yt=bt,kt=wt;mt=r.distcode[kt+((u&(1<<vt+yt)-1)>>vt)],gt=mt>>>24,bt=mt>>>16&255,wt=65535&mt,!(vt+gt<=c);){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}u>>>=vt,c-=vt,r.back+=vt}if(u>>>=gt,c-=gt,r.back+=gt,64&bt){t.msg="invalid distance code",r.mode=lt;break}r.offset=wt,r.extra=15&bt,r.mode=nt;case nt:if(r.extra){for(St=r.extra;c<St;){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=lt;break}r.mode=it;case it:if(0===l)break t;if(ct=ut-l,r.offset>ct){if(ct=r.offset-ct,ct>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=lt;break}ct>r.wnext?(ct-=r.wnext,pt=r.wsize-ct):pt=r.wnext-ct,ct>r.length&&(ct=r.length),_t=r.window}else _t=a,pt=o-r.offset,ct=r.length;ct>l&&(ct=l),l-=ct,r.length-=ct;do a[o++]=_t[pt++];while(--ct);0===r.length&&(r.mode=tt);break;case at:if(0===l)break t;a[o++]=r.length,l--,r.mode=tt;break;case st:if(r.wrap){for(;c<32;){if(0===d)break t;d--,u|=i[s++]<<c,c+=8}if(ut-=l,t.total_out+=ut,r.total+=ut,ut&&(t.adler=r.check=r.flags?g(r.check,a,ut,o-ut):m(r.check,a,ut,o-ut)),ut=l,(r.flags?u:n(u))!==r.check){t.msg="incorrect data check",r.mode=lt;break}u=0,c=0}r.mode=ot;case ot:if(r.wrap&&r.flags){for(;c<32;){if(0===d)break t;d--,u+=i[s++]<<c,c+=8}if(u!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=lt;break}u=0,c=0}r.mode=dt;case dt:zt=S;break t;case lt:zt=B;break t;case ht:return O;case ft:default:return I}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=d,r.hold=u,r.bits=c,(r.wsize||ut!==t.avail_out&&r.mode<lt&&(r.mode<st||e!==x))&&f(t,t.output,t.next_out,ut-t.avail_out)?(r.mode=ht,O):(p-=t.avail_in,ut-=t.avail_out,t.total_in+=p,t.total_out+=ut,r.total+=ut,r.wrap&&ut&&(t.adler=r.check=r.flags?g(r.check,a,ut,t.next_out-ut):m(r.check,a,ut,t.next_out-ut)),t.data_type=r.bits+(r.last?64:0)+(r.mode===K?128:0)+(r.mode===$||r.mode===W?256:0),(0===p&&0===ut||e===x)&&zt===E&&(zt=R),zt)}function c(t){if(!t||!t.state)return I;var e=t.state;return e.window&&(e.window=null),t.state=null,E}function p(t,e){var r;return t&&t.state?(r=t.state,0===(2&r.wrap)?I:(r.head=e,e.done=!1,E)):I}var _=t("../utils/common"),m=t("./adler32"),g=t("./crc32"),b=t("./inffast"),w=t("./inftrees"),v=0,y=1,k=2,x=4,z=5,A=6,E=0,S=1,C=2,I=-2,B=-3,O=-4,R=-5,T=8,D=1,L=2,N=3,U=4,F=5,P=6,Z=7,M=8,j=9,H=10,X=11,K=12,V=13,Y=14,W=15,q=16,G=17,J=18,Q=19,$=20,tt=21,et=22,rt=23,nt=24,it=25,at=26,st=27,ot=28,dt=29,lt=30,ht=31,ft=32,ut=852,ct=592,pt=15,_t=pt,mt=!0,gt,bt;r.inflateReset=s,r.inflateReset2=o,r.inflateResetKeep=a,r.inflateInit=l,r.inflateInit2=d,r.inflate=u,r.inflateEnd=c,r.inflateGetHeader=p,r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(t,e,r){"use strict";var n=t("../utils/common"),i=15,
!function(){"undefined"==typeof Package&&(Package={}),Package["ddp-rate-limiter"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,a=Package.random.Random;(function(){var t="_localstorage_test_"+a.id(),o;try{window.localStorage&&(window.localStorage.setItem(t,t),o=window.localStorage.getItem(t),window.localStorage.removeItem(t))}catch(e){}t===o&&(e._localStorage={getItem:function(e){return window.localStorage.getItem(e)},setItem:function(e,t){window.localStorage.setItem(e,t)},removeItem:function(e){window.localStorage.removeItem(e)}}),e._localStorage||(e._debug("You are running a browser with no localStorage or userData support. Logging in from one tab will not cause another tab to be logged in."),e._localStorage={_data:{},setItem:function(e,t){this._data[e]=t},removeItem:function(e){delete this._data[e]},getItem:function(e){var t=this._data[e];return void 0===t?null:t}})}).call(this),"undefined"==typeof Package&&(Package={}),Package.localstorage={}}();
!function(){var n=Package.meteor.Meteor,e=Package.meteor.global,t=Package.meteor.meteorEnv,a=Package.underscore._,r;(function(){r=function(n){var e=this;if(n=n||{},e.nextCallbackId=0,e.callbacks={},e.bindEnvironment=!0,n.bindEnvironment===!1&&(e.bindEnvironment=!1),n.exceptionHandler)e.exceptionHandler=n.exceptionHandler;else if(n.debugPrintExceptions){if(!a.isString(n.debugPrintExceptions))throw new Error("Hook option debugPrintExceptions should be a string");e.exceptionHandler=n.debugPrintExceptions}},a.extend(r.prototype,{register:function(t){var a=this,r=a.exceptionHandler||function(n){throw n};t=a.bindEnvironment?n.bindEnvironment(t,r):e(t,r);var i=a.nextCallbackId++;return a.callbacks[i]=t,{stop:function(){delete a.callbacks[i]}}},each:function(e){var t=this;n._nodeCodeMustBeInFiber();for(var r=a.keys(t.callbacks),i=0;i<r.length;++i){var o=r[i];if(a.has(t.callbacks,o)){var c=t.callbacks[o];if(!e(c))break}}}});var e=function(e,t,r){if(!t||"string"==typeof t){var i=t||"callback of async function";t=function(e){n._debug("Exception in "+i+":",e&&e.stack||e)}}return function(){var n=a.toArray(arguments),i=function(){try{var a=e.apply(r,n)}catch(n){t(n)}return a};return i()}}}).call(this),"undefined"==typeof Package&&(Package={}),function(n,e){for(var t in e)t in n||(n[t]=e[t])}(Package["callback-hook"]={},{Hook:r})}();
!function(){var n=Package.meteor.Meteor,e=Package.meteor.global,o=Package.meteor.meteorEnv,t=Package.underscore._,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.random.Random,a=Package["callback-hook"].Hook,s=Package["ddp-client"].DDP,u=Package.mongo.Mongo,l=Package.modules.meteorInstall,g=Package.modules.Buffer,_=Package.modules.process,p=Package["ecmascript-runtime"].Symbol,f=Package["ecmascript-runtime"].Map,h=Package["ecmascript-runtime"].Set,d=Package["babel-runtime"].meteorBabelHelpers,m=Package.promise.Promise,k,L,E,I=l({node_modules:{meteor:{"accounts-base":{"client_main.js":["./accounts_client.js","./url_client.js","./localstorage_token.js",function(e,o,t){t.export({AccountsClient:function(){return i},AccountsTest:function(){return r}});var i;t.import("./accounts_client.js",{AccountsClient:function(n){i=n}});var r;t.import("./url_client.js",{AccountsTest:function(n){r=n}}),t.import("./localstorage_token.js"),k=new i,n.users=k.users}],"accounts_client.js":["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","./accounts_common.js",function(e,o,r){r.export({AccountsClient:function(){return l}});var c;r.import("babel-runtime/helpers/classCallCheck",{default:function(n){c=n}});var a;r.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(n){a=n}});var s;r.import("babel-runtime/helpers/inherits",{default:function(n){s=n}});var u;r.import("./accounts_common.js",{AccountsCommon:function(n){u=n}});var l=function(n){function e(o){c(this,e);var t=a(this,n.call(this,o));return t._loggingIn=!1,t._loggingInDeps=new i.Dependency,t._loginServicesHandle=t.connection.subscribe("meteor.loginServiceConfiguration"),t._pageLoadLoginCallbacks=[],t._pageLoadLoginAttemptInfo=null,t._initUrlMatching(),t._initLocalStorage(),t}return s(e,n),e.prototype.userId=function(){function n(){return this.connection.userId()}return n}(),e.prototype._setLoggingIn=function(){function n(n){this._loggingIn!==n&&(this._loggingIn=n,this._loggingInDeps.changed())}return n}(),e.prototype.loggingIn=function(){function n(){return this._loggingInDeps.depend(),this._loggingIn}return n}(),e.prototype.logout=function(){function n(n){var e=this;e.connection.apply("logout",[],{wait:!0},function(o,t){o?n&&n(o):(e.makeClientLoggedOut(),n&&n())})}return n}(),e.prototype.logoutOtherClients=function(){function n(n){var e=this;e.connection.apply("getNewToken",[],{wait:!0},function(n,o){n||e._storeLoginToken(e.userId(),o.token,o.tokenExpires)}),e.connection.apply("removeOtherTokens",[],{wait:!0},function(e){n&&n(e)})}return n}(),e}(u),g=l.prototype;n.loggingIn=function(){return k.loggingIn()},g.callLoginMethod=function(n){var e=this;n=t.extend({methodName:"login",methodArguments:[{}],_suppressLoggingIn:!1},n),t.each(["validateResult","userCallback"],function(e){n[e]||(n[e]=function(){})});var o=t.once(function(o){o?e._onLoginFailureHook.each(function(n){return n({error:o}),!0}):e._onLoginHook.each(function(n){return n(),!0}),n.userCallback.apply(this,arguments)}),i=!1,r=function n(t,r){!t&&r&&r.token&&(e.connection.onReconnect=function(){i=!0;var n=e._storedLoginToken();n&&(r={token:n,tokenExpires:e._storedLoginTokenExpires()}),r.tokenExpires||(r.tokenExpires=e._tokenExpiration(new Date)),e._tokenExpiresSoon(r.tokenExpires)?e.makeClientLoggedOut():e.callLoginMethod({methodArguments:[{resume:r.token}],_suppressLoggingIn:!0,userCallback:function(){function n(n){var t=e._storedLoginToken();n&&t&&t===r.token&&e.makeClientLoggedOut(),o(n)}return n}()})})},c=function t(r,c){if(!i){if(e._setLoggingIn(!1),r||!c)return r=r||new Error("No result from call to "+n.methodName),void o(r);try{n.validateResult(c)}catch(n){return void o(n)}e.makeClientLoggedIn(c.id,c.token,c.tokenExpires),o()}};n._suppressLoggingIn||e._setLoggingIn(!0),e.connection.apply(n.methodName,n.methodArguments,{wait:!0,onResultReceived:r},c)},g.makeClientLoggedOut=function(){this.connection._userId&&this._onLogoutHook.each(function(n){return n(),!0}),this._unstoreLoginToken(),this.connection.setUserId(null),this.
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package.underscore._,i;(function(){(function(){i=function(e){var t=this;if(!(t instanceof i))throw new Error('use "new" to construct an EventEmitter');e=e||{},t._eventEmitter={onListeners:{},onceListeners:{},maxListeners:e.maxListeners||10}};var e=function(e,t){var n=this;if(n._eventEmitter.maxListeners&&t>n._eventEmitter.maxListeners)return"warning: possible EventEmitter memory leak detected. "+t+' listeners added on event "'+e+'". Use emitter.setMaxListeners() to increase limit. ('+n._eventEmitter.maxListeners+")"};i.prototype.setMaxListeners=function(e){this._eventEmitter.maxListeners=e};var t=function(t,n,r){return"undefined"==typeof t[n]&&(t[n]=[]),e.apply(this,[n,t[n].push(r)])};i.prototype.on=function(e,n){var r=t.apply(this,[this._eventEmitter.onListeners,e,n]);return r&&console.warn(new Error(r).stack),this},i.prototype.once=function(e,n){var r=t.apply(this,[this._eventEmitter.onceListeners,e,n]);return r&&console.warn(new Error(r).stack),this};var n=function(e,t){var n=this,i=0;return"undefined"!=typeof e&&r.each(e,function(e){i++,e.apply(n,t)}),i};i.prototype.emit=function(e){var t=this,i=r.rest(arguments),o=0,s=t._eventEmitter.onceListeners[e];return t._eventEmitter.onceListeners[e]=[],o+=n.call(t,t._eventEmitter.onListeners[e],i),o+=n.call(t,s,i),o>0};var o=function(e,t){for(var n=!1,r=[],i=0;i<e.length;i++)n||e[i]!==t?r.push(e[i]):n=!0;return r};i.prototype.off=function(e,t){var n=this;e?"function"==typeof t?("undefined"!=typeof n._eventEmitter.onListeners[e]&&(n._eventEmitter.onListeners[e]=o(n._eventEmitter.onListeners[e],t)),"undefined"!=typeof n._eventEmitter.onceListeners[e]&&(n._eventEmitter.onceListeners[e]=o(n._eventEmitter.onceListeners[e],t))):(n._eventEmitter.onListeners[e]=[],n._eventEmitter.onceListeners[e]=[]):(n._eventEmitter.onListeners={},n._eventEmitter.onceListeners={})},i.prototype.addListener=i.prototype.on,i.prototype.removeListener=i.prototype.off,i.prototype.removeAllListeners=i.prototype.off,i.prototype.one=i.prototype.once,i.prototype.trigger=i.prototype.emit}).call(this)}).call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["raix:eventemitter"]={},{EventEmitter:i})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,i=Package["aldeed:simple-schema"].SimpleSchema,r=Package["aldeed:simple-schema"].MongoObject,o=Package.underscore._,a=Package.check.check,s=Package.check.Match,c=Package.mongo.Mongo,l=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,m=Package.ejson.EJSON,d=Package["raix:eventemitter"].EventEmitter,f;(function(){function t(t,i,r,l,u){function m(e,n,i,r,a,s){E.clean(e,{mutate:!0,filter:i,autoConvert:r,getAutoValues:n,isModifier:"insert"!==t,removeEmptyStrings:a,trimStrings:s,extendAutoValueContext:o.extend({isInsert:"insert"===t,isUpdate:"update"===t&&_.upsert!==!0,isUpsert:v,userId:l,isFromTrustedCode:u,docId:I,isLocalCollection:k},_.extendAutoValueContext||{})})}var d=this,f,p,h,_,v,g,y,S;if(!i.length)throw new Error(t+" requires an argument");if("insert"===t)f=i[0],_=i[1],p=i[2],i="function"==typeof _?[f,_]:"function"==typeof p?[f,p]:[f];else{if("update"!==t)throw new Error("invalid type argument");g=i[0],f=i[1],_=i[2],p=i[3]}var C=o.isEmpty(f);p||"function"!=typeof _||(p=_,_={}),_=_||{},y=i.length-1,S="function"==typeof i[y],v="update"===t&&_.upsert===!0;var E=d.simpleSchema(f,_,g),k=null===d._connection;(e.isServer||k)&&_.getAutoValues===!1&&(r=!1);var w=_.validationContext;w?"string"==typeof w&&(w=E.namedContext(w)):w=E.namedContext(),e.isClient&&!p&&(p=function(n){n&&e._debug(t+" failed: "+(n.reason||n.stack))}),e.isClient&&S&&(p=i[y]=s(w,p));var x=E.allowsKey("_id");"insert"===t&&!f._id&&x&&(f._id=d._makeNewID());var I;"insert"===t?I=f._id:"update"===t&&g&&(I="string"==typeof g||g instanceof c.ObjectID?g:g._id);var P;f._id&&!x&&(P=f._id,delete f._id),m(f,r,_.filter!==!1,_.autoConvert!==!1,_.removeEmptyStrings!==!1,_.trimStrings!==!1);var A={};for(var M in f)f.hasOwnProperty(M)&&(A[M]=f[M]);if(e.isServer&&v&&o.isObject(g)){var O=A.$set||{};A.$set=o.clone(g),x||delete A.$set._id,o.extend(A.$set,O)}if(e.isClient&&!k&&m(A,!0,!1,!1,!1,!1),!C&&o.isEmpty(A))throw new Error("After filtering out keys not in the schema, your "+("update"===t?"modifier":"object")+" is now empty");var V;if(V=_.validate===!1||w.validate(A,{modifier:"update"===t||"upsert"===t,upsert:v,extendedCustomContext:o.extend({isInsert:"insert"===t,isUpdate:"update"===t&&_.upsert!==!0,isUpsert:v,userId:l,isFromTrustedCode:u,docId:I,isLocalCollection:k},_.extendedCustomContext||{})}))return P&&(f._id=P),"insert"===t?i[0]=f:i[1]=f,e.isServer&&S&&(i[y]=a(w,i[y])),i;if(h=n(w),!p)throw h;p(h,!1)}function n(t){var n,r=i.version>=2?t.validationErrors():t.invalidKeys();n=r.length?t.keyErrorMessage(r[0].name):"Failed validation";var o=new Error(n);return o.invalidKeys=r,o.validationContext=t,e.isServer&&(o.sanitizedError=new e.Error(400,n,m.stringify(o.invalidKeys))),o}function r(e,t){var n=t.split("c2_")[1].split(" ")[0],i=t.split("dup key:")[1].split('"')[1];e[h]([{name:n,type:"notUnique",value:i}])}function a(e,t){return function i(a){var s=o.toArray(arguments);return a&&("MongoError"===a.name&&11001===a.code||a.message.indexOf(!0))&&a.message.indexOf("c2_")!==-1&&(r(e,a.message),s[0]=n(e)),t.apply(this,s)}}function s(t,i){return function a(s){var c=o.toArray(arguments);if(s instanceof e.Error&&400===s.error&&"INVALID"===s.reason&&"string"==typeof s.details){var l=m.parse(s.details);t[h](l),c[0]=n(t)}else s instanceof e.Error&&409===s.error&&s.reason&&s.reason.indexOf("E11000")!==-1&&s.reason.indexOf("c2_")!==-1&&(r(t,s.reason),c[0]=n(t));return i.apply(this,c)}}function u(e){Package&&Package.insecure&&!_[e._name]&&(e.allow({insert:function(){return!0},update:function(){return!0},remove:function(){return!0},fetch:[],transform:null}),_[e._name]=!0)}function p(n,i){if(!v[n._name]){var r=null===n._connection;n.deny({insert:function(e,t){return n.simpleSchema(t).clean(t,{mutate:!0,isModifier:!1,filter:!1,autoConvert:!1,removeEmptyStrings:!1,trimStrings:!1,extendAutoValueContext:{isInsert:!0,isUpdate:!1,isUpsert:!1,userId:e,isFromTrustedCode:!1,docId:t._id,isLocalCollection:r}}),!1},update:function(e,t,i,o){return n.simpleSchema(o).clean(o,{mutate:!0,isModifier:!
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package["aldeed:collection2-core"].Collection2,c=Package.underscore._,i=Package.minimongo.LocalCollection,s=Package.minimongo.Minimongo,t=Package.check.check,m=Package.check.Match,r=Package.modules.meteorInstall,l=Package.modules.Buffer,u=Package.modules.process,g=Package["ecmascript-runtime"].Symbol,d=Package["ecmascript-runtime"].Map,k=Package["ecmascript-runtime"].Set,P=Package["babel-runtime"].meteorBabelHelpers,p=Package.promise.Promise,h=Package["aldeed:simple-schema"].SimpleSchema,b=Package["aldeed:simple-schema"].MongoObject,f=Package.mongo.Mongo,x=r({node_modules:{meteor:{"aldeed:schema-index":{lib:{"indexing.js":function(){h.extendOptions({index:m.Optional(m.OneOf(Number,String,Boolean)),unique:m.Optional(Boolean),sparse:m.Optional(Boolean)}),(!h.version||h.version<2)&&h.messages({notUnique:"[label] must be unique"}),e.isServer&&o.on("schema.attached",function(a,n){function o(n,o,c,i){e.startup(function(){a._collection._ensureIndex(n,{background:!0,name:o,unique:c,sparse:i})})}function i(n){e.startup(function(){try{a._collection._dropIndex(n)}catch(e){}})}n.version>=2&&n.messageBox.messages({notUnique:"{{label}} must be unique"});var s=2===n.version?"mergedSchema":"schema";c.each(n[s](),function(e,a){if("index"in e||e.unique===!0){var n={},c;"index"in e?(c=e.index,c===!0&&(c=1)):c=1;var s="c2_"+a,t=a.replace(/\.\$\./g,".");n[t]=c;var m=!!e.unique&&(1===c||c===-1),r=e.sparse||!1;!r&&m&&e.optional&&(r=!0),c===!1?i(s):o(n,s,m,r)}})})}}}}}},{extensions:[".js",".json"]});x("./node_modules/meteor/aldeed:schema-index/lib/indexing.js"),"undefined"==typeof Package&&(Package={}),Package["aldeed:schema-index"]={}}();
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package["aldeed:collection2-core"].Collection2,t=Package.underscore._,i=Package.minimongo.LocalCollection,c=Package.minimongo.Minimongo,l=Package.check.check,s=Package.check.Match,d=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,r=Package.mongo.Mongo;(function(){d.extendOptions({denyInsert:s.Optional(Boolean),denyUpdate:s.Optional(Boolean)}),(!d.version||d.version<2)&&d.messages({insertNotAllowed:"[label] cannot be set during an insert",updateNotAllowed:"[label] cannot be set during an update"}),o.on("schema.attached",function(e,a){a.version>=2&&a.messageBox.messages({insertNotAllowed:"{{label}} cannot be set during an insert",updateNotAllowed:"{{label}} cannot be set during an update"}),a.addValidator(function(){if(this.isSet){var e=this.definition;return e.denyInsert&&this.isInsert?"insertNotAllowed":e.denyUpdate&&(this.isUpdate||this.isUpsert)?"updateNotAllowed":void 0}})})}).call(this),"undefined"==typeof Package&&(Package={}),Package["aldeed:schema-deny"]={}}();
!function(){"undefined"==typeof Package&&(Package={}),Package["aldeed:collection2"]={}}();
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,a=Package.meteor.meteorEnv,i=Package["momentjs:moment"].moment;(function(){(function(){this.moment=i}).call(this),function(){!function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(a,i,s){t.daterangepicker=e(t,s,a,i)});else if("undefined"!=typeof exports){var a=require("moment"),i;try{i=require("jquery")}catch(t){if(i=window.jQuery,!i)throw new Error("jQuery dependency not found")}e(t,exports,a,i)}else t.daterangepicker=e(t,{},t.moment,t.jQuery||t.Zepto||t.ender||t.$)}(this,function(t,e,a,i){var s=function(t,e,a){this.parentEl="body",this.element=i(t),this.isShowing=!1;var s='<div class="daterangepicker dropdown-menu"><div class="calendar first left"></div><div class="calendar second right"></div><div class="ranges"><div class="range_inputs"><div class="daterangepicker_start_input"><label for="daterangepicker_start"></label><input class="input-mini" type="text" name="daterangepicker_start" value="" /></div><div class="daterangepicker_end_input"><label for="daterangepicker_end"></label><input class="input-mini" type="text" name="daterangepicker_end" value="" /></div><button class="applyBtn" disabled="disabled"></button>&nbsp;<button class="cancelBtn"></button></div></div></div>';"object"==typeof e&&null!==e||(e={}),this.parentEl=i("object"==typeof e&&e.parentEl&&i(e.parentEl).length?e.parentEl:this.parentEl),this.container=i(s).appendTo(this.parentEl),this.setOptions(e,a),this.container.find(".calendar").on("click.daterangepicker",".prev",i.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",i.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",i.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",i.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",i.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",i.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",i.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",i.proxy(this.updateTime,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",i.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",i.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",i.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",i.proxy(this.inputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",i.proxy(this.inputsKeydown,this)).on("click.daterangepicker","li",i.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",i.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",i.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":i.proxy(this.show,this),"focus.daterangepicker":i.proxy(this.show,this),"keyup.daterangepicker":i.proxy(this.updateFromControl,this),"keydown.daterangepicker":i.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",i.proxy(this.toggle,this))};s.prototype={constructor:s,setOptions:function(t,e){if(this.startDate=a().startOf("day"),this.endDate=a().endOf("day"),this.timeZone=a().utcOffset(),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePickerSeconds=!1,this.timePickerIncrement=30,this.timePicker12Hour=!0,this.singleDatePicker=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses=["btn","btn-small btn-sm"],this.applyClass="btn-success",this.cancelClass="btn-default",this.format="MM/DD/YYYY",this.separator=" - ",this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfW
!function(){"undefined"==typeof Package&&(Package={}),Package["ohif:dicom-services"]={}}();
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,c=Package.meteor.meteorEnv,r=Package["iron:router"].Router,o=Package["iron:router"].RouteController,n=Package.modules.meteorInstall,g=Package.modules.Buffer,s=Package.modules.process,t=Package["ecmascript-runtime"].Symbol,k=Package["ecmascript-runtime"].Map,i=Package["ecmascript-runtime"].Set,P=Package["babel-runtime"].meteorBabelHelpers,u=Package.promise.Promise,m=Package["iron:core"].Iron,l=Package.webapp.WebApp,p=Package.logging.Log,d=Package.deps.Tracker,f=Package.deps.Deps,y=Package.session.Session,b=Package["ddp-client"].DDP,h=Package.mongo.Mongo,j=Package.ui.Blaze,S=Package.ui.UI,v=Package.ui.Handlebars,x=Package.spacebars.Spacebars,M=Package["templating-runtime"].Template,w=Package.check.check,D=Package.check.Match,L=Package.underscore._,R=Package.jquery.$,q=Package.jquery.jQuery,B=Package.random.Random,H=Package.ejson.EJSON,I=Package["launch-screen"].LaunchScreen,O=Package.htmljs.HTML,T,_=n({node_modules:{meteor:{"ohif:wadoproxy":{server:{"namespace.js":function(){T={},T.convertURL=function(e,a){return Settings.enabled?e?Settings.uri+"?"+querystring.stringify({url:e,options:a?JSON.stringify(a):null}):null:e}}}}}}},{extensions:[".js",".json"]});_("./node_modules/meteor/ohif:wadoproxy/server/namespace.js"),"undefined"==typeof Package&&(Package={}),function(e,a){for(var c in a)c in e||(e[c]=a[c])}(Package["ohif:wadoproxy"]={},{WADOProxy:T})}();
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,i=Package.jquery.jQuery,a=Package.http.HTTP,r=Package.random.Random,s=Package["silentcicero:jszip"].JSZip,l=Package["aldeed:simple-schema"].SimpleSchema,d=Package["aldeed:simple-schema"].MongoObject,u=Package["accounts-base"].Accounts,c=Package["momentjs:moment"].moment,p=Package["ohif:viewerbase"].dialogPolyfill,m=Package["ohif:wadoproxy"].WADOProxy,b=Package.modules.meteorInstall,h=Package.modules.Buffer,y=Package.modules.process,f=Package["ecmascript-runtime"].Symbol,g=Package["ecmascript-runtime"].Map,v=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,S=Package.promise.Promise,x=Package["aldeed:collection2-core"].Collection2,T=Package.webapp.WebApp,w=Package.logging.Log,I=Package.deps.Tracker,D=Package.deps.Deps,C=Package.session.Session,L=Package["ddp-client"].DDP,P=Package.mongo.Mongo,M=Package.ui.Blaze,j=Package.ui.UI,N=Package.ui.Handlebars,V=Package.spacebars.Spacebars,R=Package["templating-runtime"].Template,O=Package.check.check,_=Package.check.Match,q=Package.underscore._,E=Package.ejson.EJSON,W=Package["launch-screen"].LaunchScreen,z=Package.htmljs.HTML,F,A,B,U,H,$,Q,G,Y,K,J,X,Z,tt,et,nt=b({node_modules:{meteor:{"ohif:study-list":{both:{"index.js":["./lib","./schema","./base.js","./collections.js",function(t,e,n){n.import("./lib"),n.import("./schema"),n.import("./base.js"),n.import("./collections.js")}],"base.js":["meteor/ohif:core",function(t,e,n){var o;n.import("meteor/ohif:core",{OHIF:function(t){o=t}}),o.studylist={collections:{},actions:{}}}],"collections.js":["meteor/mongo","meteor/ohif:core","meteor/ohif:study-list/both/schema/servers.js",function(t,e,n){n.export({StudyImportStatus:function(){return r},Servers:function(){return F},CurrentServer:function(){return A}});var o;n.import("meteor/mongo",{Mongo:function(t){o=t}});var i;n.import("meteor/ohif:core",{OHIF:function(t){i=t}});var a;n.import("meteor/ohif:study-list/both/schema/servers.js",{Servers:function(t){a=t}});var r=new o.Collection("studyImportStatus");r._debugName="StudyImportStatus",i.studylist.collections.StudyImportStatus=r,n.runModuleSetters(F=new o.Collection("servers")),F._debugName="Servers",n.runModuleSetters(A=new o.Collection("currentServer")),A._debugName="CurrentServer"}],lib:{"getCurrentServer.js":function(){B=function t(){var e=A.findOne();if(e){var n=F.findOne({_id:e.serverId});return n}}},"index.js":["./getCurrentServer.js",function(t,e,n){n.import("./getCurrentServer.js")}]},schema:{"index.js":["./servers.js",function(t,e,n){n.import("./servers.js")}],"servers.js":["meteor/aldeed:simple-schema",function(t,e,n){n.export({DICOMWebRequestOptions:function(){return s},DICOMWebServer:function(){return l},DIMSEPeer:function(){return d},DIMSEServer:function(){return u},UISettings:function(){return c},PublicServerConfig:function(){return p},Servers:function(){return m},ServerConfiguration:function(){return b}});var o;n.import("meteor/aldeed:simple-schema",{SimpleSchema:function(t){o=t}});var i={type:String,label:"Server Name",max:100},a={type:String,label:"Server Type",allowedValues:["dicomWeb","dimse"],valuesLabels:["DICOM Web","DIMSE"],optional:!0},r={type:String,label:"WADO URI root",max:1e3},s=new o({auth:{type:String,label:"Authentication",optional:!0},logRequests:{type:Boolean,defaultValue:!0,label:"Requests"},logResponses:{type:Boolean,defaultValue:!1,label:"Responses"},logTiming:{type:Boolean,defaultValue:!0,label:"Timing"}}),l=new o({name:i,type:a,wadoUriRoot:r,wadoRoot:{type:String,label:"WADO root",max:1e3},imageRendering:{type:String,label:"Image rendering",allowedValues:["","wadouri","orthanc"],valuesLabels:["","WADO URI","ORTHANC"]},qidoRoot:{type:String,label:"QIDO root",max:1e3},qidoSupportsIncludeField:{type:Boolean,label:"QIDO supports including fields",defaultValue:!1},requestOptions:{type:s,label:"Request Options"}}),d=new o({aeTitle:{type:String,label:"AE Title"},hostAE:{type:String,label:"AE Host",optional:!0},host:{type:String,label:"Host Domain/IP",regEx:o.RegEx.WeakDom
return{class:V.call("btn btn-primary"),action:V.call("save")}},function(){return V.include(t.lookupTemplate("button"),function(){return"Save"})}),"\n "),"\n "]}),"\n "]})})})},"serverInformationForm.js":["meteor/meteor","meteor/templating","meteor/reactive-var","meteor/ohif:study-list/both/schema/servers.js",function(t,e,n){var o;n.import("meteor/meteor",{Meteor:function(t){o=t}});var i;n.import("meteor/templating",{Template:function(t){i=t}});var a;n.import("meteor/reactive-var",{ReactiveVar:function(t){a=t}});var r;n.import("meteor/ohif:study-list/both/schema/servers.js",{DICOMWebServer:function(t){r=t}});var s;n.import("meteor/ohif:study-list/both/schema/servers.js",{DIMSEServer:function(t){s=t}}),i.serverInformationForm.onCreated(function(){var t=i.instance();t.data.api={save:function(){function e(){if(t.data.form.validate()){var e=t.data.form.value();o.call("serverSave",e,function(e){t.data.resetState()})}}return e}()},t.currentSchema=new a(r)}),i.serverInformationForm.onRendered(function(){var t=i.instance();t.data.$form=t.$("form:first"),t.data.form=t.data.$form.data("component"),t.autorun(function(){var e=t.$("[data-key=type] :input").data("component");e.depend();var n=e.value();t.data.serverType.set(n),"dimse"===n?t.currentSchema.set(s):t.currentSchema.set(r)}),t.autorun(function(){var e=t.data.mode.get();if("edit"===e){var n=t.data.currentItem.get();t.data.form.value(n)}})})}]},serverInformationList:{"serverInformationList.html":["./template.serverInformationList.js",function(t,e,n){n.exports=t("./template.serverInformationList.js")}],"template.serverInformationList.js":function(){R.__checkName("serverInformationList"),R.serverInformationList=new R("Template.serverInformationList",function(){var t=this;return M._TemplateWith(function(){return{api:V.call(V.dot(t.lookup("instance"),"api"))}},function(){return V.include(t.lookupTemplate("form"),function(){return["\n ",z.TABLE({id:"tblServer",class:"table"},"\n ",z.THEAD("\n ",z.TR("\n ",z.TH("Name"),"\n ",z.TH("Type"),"\n ",z.TH({class:"text-right"},"Actions"),"\n "),"\n "),"\n ",z.TBODY("\n ",M.Each(function(){return{_sequence:V.call(t.lookup("servers")),_variable:"server"}},function(){return["\n ",z.TR("\n ",z.TD(M.View("lookup:server.name",function(){return V.mustache(V.dot(t.lookup("server"),"name"))})),"\n ",z.TD(M.View("lookup:server.type",function(){return V.mustache(V.dot(t.lookup("server"),"type"))})),"\n ",z.TD({class:"text-right"},"\n ",z.DIV({class:"btn-group",role:"group","aria-label":"Actions"},"\n ",M._TemplateWith(function(){return{class:V.call("btn btn-sm btn-default"),action:V.call("use"),params:V.call(t.lookup("server")),title:V.call("Use this server"),disabled:V.call(V.dataMustache(t.lookup("isActive"),t.lookup("server")))}},function(){return V.include(t.lookupTemplate("button"),function(){return["\n ",M.If(function(){return V.dataMustache(t.lookup("isActive"),t.lookup("server"))},function(){return["\n ",z.I({class:"fa fa-check-square-o"}),"\n "]},function(){return["\n ",z.I({class:"fa fa-square-o"}),"\n "]}),"\n "]})}),"\n ",M._TemplateWith(function(){return{class:V.call("btn btn-sm btn-default"),action:V.call("edit"),params:V.call(t.lookup("server")),title:V.call("Edit"),disabled:V.call(V.dataMustache(t.lookup("eq"),V.dot(t.lookup("server"),"origin"),"json"))}},function(){return V.include(t.lookupTemplate("button"),function(){return["\n ",z.I({class:"fa fa-pencil"}),"\n "]})}),"\n ",M._TemplateWith(func
return V.mustache(t.lookup("numberOfStudies"))}),"\n "),"\n ",z.DIV({class:"pull-right"},"\n ",V.include(t.lookupTemplate("studylistToolbar")),"\n "),"\n "),z.Raw('\n <div class="theadBackground">\n </div>\n '),z.DIV({id:"studyListContainer"},"\n ",z.TABLE({id:"tblStudyList",class:"studylistResult table noselect"},"\n ",z.THEAD("\n ",z.TR("\n ",z.TH({class:"patientName"},"\n ",z.DIV({id:"_patientName",class:"sortingCell"},"\n ",z.SPAN("Patient Name"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"patientName"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",id:"patientName"}),"\n "),"\n ",z.TH({class:"patientId"},"\n ",z.DIV({id:"_patientId",class:"sortingCell"},"\n ",z.SPAN("MRN"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"patientId"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",id:"patientId"}),"\n "),"\n ",z.TH({class:"accessionNumber"},"\n ",z.DIV({id:"_accessionNumber",class:"sortingCell "},"\n ",z.SPAN("Accession #"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"accessionNumber"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",id:"accessionNumber"}),"\n "),"\n ",z.TH({class:"studyDate"},"\n ",z.DIV({id:"_studyDate",class:"sortingCell"},"\n ",z.SPAN("Study Date"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"studyDate"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",name:"daterange",id:"studyDate"}),"\n "),"\n ",z.TH({class:"modalities"},"\n ",z.DIV({id:"_modalities",class:"sortingCell"},"\n ",z.SPAN("Modality"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"modalities"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",id:"modality"}),"\n "),"\n ",z.TH({class:"studyDescription"},"\n ",z.DIV({id:"_studyDescription",class:"sortingCell"},"\n ",z.SPAN("Study Description"),"\n ",z.I({class:function(){return V.mustache(V.dot(t.lookup("sortingColumnsIcons"),"studyDescription"))}},z.CharRef({html:"&nbsp;",str:" "})),"\n "),"\n ",z.INPUT({type:"text",class:"form-control studylist-search",id:"studyDescription"}),"\n "),"\n "),"\n "),"\n ",z.TBODY({id:"studyListData"},"\n ",M.Each(function(){return{_sequence:V.call(t.lookup("studies")),_variable:"study"}},function(){return["\n ",M._TemplateWith(function(){return V.dataMustache(t.lookup("clone"),t.lookup("study"),t.lookup("."))},function(){return V.include(t.lookupTemplate("studylistStudy"))}),"\n "]}),"\n "),"\n "),"\n\n ",z.Raw("<!-- Pagination -->"),"\n ",V.include(t.lookupTemplate("studylistPagination")),"\n\n ",M.If(function(){r
"aria-labelledby":"themeSelectorModalLabel"},"\n ",z.DIV({class:"modal-dialog modal-lg",role:"document"},"\n ",z.DIV({class:"modal-content"},"\n ",z.Raw('<div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\n <h4 class="modal-title" id="themeSelectorModalLabel"><i class="fa fa-sliders"></i> Themes</h4>\n </div>'),"\n ",z.DIV({class:"modal-body"},"\n ",z.UL({class:"theme-list text-center"},"\n ",M.Each(function(){return{_sequence:V.call(t.lookup("themes")),_variable:"theme"}},function(){return["\n ",z.LI({class:function(){return["text-center preview-theme ",V.mustache(t.lookup("addClassIfSelected"),t.lookup("theme"))]},"data-theme":function(){return V.mustache(t.lookup("theme"))}},"\n ",z.DIV({class:"icon-wrapper"},"\n ",z.SPAN({class:function(){return["theme-icon-",V.mustache(t.lookup("theme"))]}}),"\n "),"\n ",z.H4({class:"theme-title"},M.View("lookup:ucFirst",function(){return V.mustache(t.lookup("ucFirst"),t.lookup("theme"))})),"\n "),"\n "]}),"\n "),"\n "),"\n ",z.Raw('<div class="modal-footer">\n <button type="button" class="btn btn-default js-cancel" data-dismiss="modal">Cancel</button>\n <button type="button" class="btn btn-primary js-apply" data-dismiss="modal">Apply theme</button>\n </div>'),"\n "),"\n "),"\n ")})},"themeSelectorModal.js":function(){var t="tide",e=function t(){return sessionStorage.getItem("theme")},n=function t(e){return sessionStorage.setItem("theme",e)},o=function t(e){return document.body.classList.add("theme-"+e)},i=function t(){for(var e=document.body.classList,n=e.length-1;n>=0;n--)e[n].search("theme-")!==-1&&document.body.classList.remove(e[n])};R.themeSelectorModal.onCreated(function(){var a=R.instance(),r=e();r||(r=t,n(r)),a.state=new ReactiveDict,a.state.set("selectedTheme",r),o(r),a.container={actualTheme:r,previewTheme:function(){function t(t,e){e.set("selectedTheme",t),i(),o(t)}return t}(),applyTheme:function(){function t(t){n(t.get("selectedTheme"))}return t}(),resetState:function(){function t(t){var n=e();t.set("selectedTheme",n),i(),o(n)}return t}()}}),R.themeSelectorModal.helpers({themes:["crickets","honeycomb","mint","overcast","quartz","tide","tigerlily"],ucFirst:function(){function t(t){return t.charAt(0).toUpperCase()+t.slice(1)}return t}(),addClassIfSelected:function(){function t(t){var e=R.instance();return t===e.state.get("selectedTheme")?"selected":""}return t}()}),R.themeSelectorModal.events({"click .js-cancel, click .close":function(){function t(t,e){return e.container.resetState(e.state)}return t}(),"click .js-apply":function(){function t(t,e){return e.container.applyTheme(e.state)}return t}(),"click .preview-theme":function(){function t(t,e){return e.container.previewTheme(t.currentTarget.dataset.theme,e.state)}return t}()})},"themeSelectorModal.styl":["./themeSelectorModal.styl.css",function(t,e,n){n.exports=t("./themeSelectorModal.styl.css")}],"themeSelectorModal.styl.css":["meteor/modules",function(t,e,n){n.exports=t("meteor/modules").addStyles('.theme-icon-crickets,\n.theme-icon-tide,\n.theme-icon-tigerlily,\n.theme-icon-quartz,\n.theme-icon-overcast,\n.theme-icon-mint,\n.theme-icon-honeycomb {\n display: inline-block;\n background: url("/packages/design/assets/theme-icons.png") no-repeat;\n overflow: hidden;\n text-indent: -9999px;\n text-align: left;\n}\n.theme-icon-crickets {\n background-position: 0px 0px;\n width: 64px;\n height: 56px;\n}\n.theme-icon-tide {\n background-position: 0px -56px;\n width: 64px;\n height: 54px;\n}\n.theme-icon-tigerlily {\n background-position: 0px -110px;
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,r=Package.jquery.jQuery,i=Package.random.Random,a=Package["templating-runtime"].Template,s=Package["iron:router"].Router,c=Package["iron:router"].RouteController,u=Package["momentjs:moment"].moment,l=Package.validatejs.validate,d=Package["ohif:viewerbase"].dialogPolyfill,p=Package.modules.meteorInstall,f=Package.modules.Buffer,g=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,m=Package["ecmascript-runtime"].Map,v=Package["ecmascript-runtime"].Set,y=Package["babel-runtime"].meteorBabelHelpers,b=Package.promise.Promise,w=Package["iron:core"].Iron,k=Package.webapp.WebApp,S=Package.logging.Log,P=Package.deps.Tracker,D=Package.deps.Deps,I=Package.session.Session,V=Package["ddp-client"].DDP,T=Package.mongo.Mongo,E=Package.ui.Blaze,R=Package.ui.UI,M=Package.ui.Handlebars,x=Package.spacebars.Spacebars,j=Package.check.check,C=Package.check.Match,O=Package.underscore._,N=Package.ejson.EJSON,U=Package["launch-screen"].LaunchScreen,A=Package.htmljs.HTML,B,_,L,H,q,G,W,$,F,Y,z=p({node_modules:{meteor:{"ohif:hanging-protocols":{both:{"namespace.js":function(){B={}},"collections.js":function(){_=new t.Collection("hangingprotocols"),_._debugName="HangingProtocols",_.allow({insert:function(){function t(){return!0}return t}(),update:function(){function t(){return!0}return t}(),remove:function(){function t(){return!0}return t}()})},"schema.js":["babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","babel-runtime/helpers/classCallCheck",function(e,n,r){function a(t,e){return!(!t||!t.length)&&(t.forEach(function(t,n){if(O.isEqual(t,e))return L=n,!1}),void 0!==L&&(t.splice(L,1),!0))}var s;r.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(t){s=t}});var c;r.import("babel-runtime/helpers/inherits",{default:function(t){c=t}});var u;r.import("babel-runtime/helpers/classCallCheck",{default:function(t){u=t}}),B.Protocol=function(){function e(n){u(this,e),this.id=i.id(),this.locked=!1,this.name=n,this.createdDate=new Date,this.modifiedDate=new Date,t.users&&t.userId&&(this.createdBy=t.userId,this.modifiedBy=t.userId),this.availableTo=new v,this.editableBy=new v,this.protocolMatchingRules=[],this.stages=[],this.numberOfPriorsReferenced=0}return e.prototype.updateNumberOfPriorsReferenced=function(){function t(){var t=0;this.stages.forEach(function(e){e.viewports&&e.viewports.forEach(function(e){e.studyMatchingRules&&e.studyMatchingRules.forEach(function(e){"abstractPriorValue"===e.attribute?t++:"relativeTime"===e.attribute&&t++})})}),this.numberOfPriorsReferenced=t}return t}(),e.prototype.protocolWasModified=function(){function e(){t.users&&t.userId&&(this.modifiedBy=t.userId),this.updateNumberOfPriorsReferenced(),this.modifiedDate=new Date}return e}(),e.prototype.fromObject=function(){function t(t){var e=this;this.id=t.id||i.id(),this.name=t.name,this.locked=!!t.locked,t.protocolMatchingRules&&t.protocolMatchingRules.forEach(function(t){var n=new B.ProtocolMatchingRule;n.fromObject(t),e.protocolMatchingRules.push(n)}),t.stages&&t.stages.forEach(function(t){var n=new B.Stage;n.fromObject(t),e.stages.push(n)})}return t}(),e.prototype.createClone=function(){function t(t){var e=o.extend({},this),n=new B.Protocol;return e.id=n.id,n.fromObject(e),t&&(n.name=t),n.locked=!1,n}return t}(),e.prototype.addStage=function(){function t(t){this.stages.push(t),this.protocolWasModified()}return t}(),e.prototype.addProtocolMatchingRule=function(){function t(t){this.protocolMatchingRules.push(t),this.protocolWasModified()}return t}(),e.prototype.removeProtocolMatchingRule=function(){function t(t){var e=a(this.protocolMatchingRules,t);e&&this.protocolWasModified()}return t}(),e}();var l=function(){function t(e,n,o,r){u(this,t),this.id=i.id(),this.weight=r||1,e&&(this.attribute=e),n&&(this.constraint=n),void 0===o?this.required=!1:this.required=o}return t.prototype.fromObject=function(){function t(t){this.id=t.id||i.id(),this.required=t.required,this.weight=t.weight,this.attribute=t.attribute,t
},"\n ",A.H3("Stages"),"\n ",A.HR(),"\n ",E._TemplateWith(function(){return{stages:x.call(t.lookup("stages"))}},function(){return x.include(t.lookupTemplate("stageSortable"))}),"\n "),"\n "),"\n "]}),"\n "),"\n\n ",A.DIV({id:"activeViewportEditor",class:"tab-pane"},"\n ",E.If(function(){return x.call(t.lookup("activeViewportUndefined"))},function(){return["\n ",A.DIV({class:"noActiveViewport"},"\n ",A.H2("Select a Viewport"),"\n ",A.HR(),"\n ",A.P("\n Upon selecting a Viewport, this section will show a list of rules that can be used\n to determine which images will populate the specified Viewport. You can specify these\n rules to be evaluated at the study, series, or image level.\n "),"\n "),"\n "]}),"\n ",x.With(function(){return x.call(t.lookup("activeStage"))},function(){return["\n ",x.include(t.lookupTemplate("stageDetails")),"\n "]}),"\n "),"\n "),"\n\n ",x.With(function(){return x.call(t.lookup("activeProtocol"))},function(){return["\n ",A.DIV({id:"protocolOptions",class:"protocolEditorSection"},"\n ",E.If(function(){return x.call(t.lookup("locked"))},function(){return["\n ",A.BUTTON({id:"saveProtocol",type:"button",class:"btn btn-sm",disabled:""},"\n Locked ",A.I({class:"fa fa-lock","aria-hidden":"true"}),"\n "),"\n "]},function(){return["\n ",A.BUTTON({id:"saveProtocol",type:"button",class:"btn btn-sm"},"\n Save Changes ",A.I({class:"fa fa-floppy-o","aria-hidden":"true"}),"\n "),"\n "]}),"\n\n ",E.If(function(){return x.call(t.lookup("modifiedDate"))},function(){return["\n ",A.P({class:"lastSavedText"},"Last saved ",E.View("lookup:jsDateFromNow",function(){return x.mustache(t.lookup("jsDateFromNow"),t.lookup("modifiedDate"))})),"\n "]}),"\n "),"\n ",A.A({id:"downloadElement",style:"display:none;"}),"\n "]}),"\n ")})},"protocolEditor.js":["meteor/meteor","meteor/templating","meteor/session","meteor/random","meteor/jquery","meteor/ohif:core","meteor/ohif:viewerbase",function(t,e,n){function o(){if(G){var t=B.ProtocolStore.getProtocol().map(function(t){return{id:t.id,text:t.name}}),e=c("#protocolSelect");e.select2().empty(),e.select2({data:t}),e.select2().val(G.protocol.id).trigger("change")}}var r;n.import("meteor/meteor",{Meteor:function(t){r=t}});var i;n.import("meteor/templating",{Template:function(t){i=t}});var a;n.import("meteor/session",{Session:function(t){a=t}});var s;n.import("meteor/random",{Random:function(t){s=t}});var c;n.import("meteor/jquery",{$:function(t){c=t}});var l;n.import("meteor/ohif:core",{OHIF:function(t){l=t}});var d;n.import("meteor/ohif:viewerbase",{Viewerbase:function(t){d=t}}),n.import("meteor/ohif:viewerbase"),i.protocolEditor.onRendered(function(){var t=i.instance();t.timeAgoInterval=r.setInterval(function(){a.set("timeAgoVariable",new Date)},6e4),B.ProtocolStore.onReady(function(){o()})}),i.protocolEditor.onDestroyed(function(){var t=i.instance();r.clearInterval(t.timeAgoInterval)}),i.protocolEditor.helpers({activeProtocol:function(){function t(){if(a.get("LayoutManagerUpdated"),G&&G.protocol&&G.LayoutManager&&void 0!==G.stage)return o(),G.protocol.updateNumberOfPriorsReferenced(),G.protocol}return t}(),activeStage:function(){function t(){if(a.get("LayoutManagerUpdated"),G&&G.protocol&&G.LayoutManager&&void 0!==G.stage){var t=G.getCurrentStageModel();if(t){t.viewportStructure.layoutTemplateName=G.LayoutManager.layoutTemplateName,t.viewportStructure.properties=G.LayoutManager.layoutProps;var e=t.viewportStructure.getNumViewports()-t.viewports.length;if(e<0){var n=Math.abs(
z("./node_modules/meteor/ohif:hanging-protocols/both/collections.js"),z("./node_modules/meteor/ohif:hanging-protocols/both/schema.js"),z("./node_modules/meteor/ohif:hanging-protocols/both/hardcodedData.js"),z("./node_modules/meteor/ohif:hanging-protocols/both/testData.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/collections.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/protocolEngine.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/helpers/displayConstraint.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/helpers/attributes.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/protocolStore/protocolStore.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/protocolStore/defaultStrategy.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/previousPresentationGroupButton/template.previousPresentationGroupButton.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/previousPresentationGroupButton/previousPresentationGroupButton.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/nextPresentationGroupButton/template.nextPresentationGroupButton.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/nextPresentationGroupButton/nextPresentationGroupButton.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/matchedProtocols/template.matchedProtocols.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/matchedProtocols/matchedProtocols.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/protocolEditor/template.protocolEditor.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/protocolEditor/protocolEditor.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/ruleTable/template.ruleTable.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/ruleTable/ruleTable.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/ruleEntryDialog/template.ruleEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/ruleEntryDialog/ruleEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/settingEntryDialog/template.settingEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/settingEntryDialog/settingEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/textEntryDialog/template.textEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/textEntryDialog/textEntryDialog.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/settingsTable/template.settingsTable.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/settingsTable/settingsTable.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/stageDetails/template.stageDetails.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/stageDetails/stageDetails.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/stageSortable/template.stageSortable.js"),z("./node_modules/meteor/ohif:hanging-protocols/client/components/stageSortable/stageSortable.js"),"undefined"==typeof Package&&(Package={}),function(t,e){for(var n in e)n in t||(t[n]=e[n])}(Package["ohif:hanging-protocols"]={},{HP:B})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,r=Package["templating-runtime"].Template,a=Package.blaze.Blaze,o=Package.blaze.UI,s=Package.blaze.Handlebars,i=Package.jquery.$,l=Package.jquery.jQuery,d=Package.underscore._,c=Package.tracker.Tracker,p=Package.tracker.Deps,u=Package.modules.meteorInstall,m=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,y=Package["ecmascript-runtime"].Map,b=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,v=Package.promise.Promise,g=Package.htmljs.HTML,_=Package.spacebars.Spacebars,j,P=u({node_modules:{meteor:{"aldeed:template-extension":{lib:{"hooks.js":function(){j={global:{created:[],rendered:[],destroyed:[]},master:{created:function(){function e(){j.runGlobal("created",this,arguments)}return e}(),rendered:function(){function e(){j.runGlobal("rendered",this,arguments)}return e}(),destroyed:function(){function e(){j.runGlobal("destroyed",this,arguments)}return e}()}},j.addGlobal=function(e){e._hasTemplateExtensionMasterHooks||(e.onCreated(j.master.created),e.onRendered(j.master.rendered),e.onDestroyed(j.master.destroyed),e._hasTemplateExtensionMasterHooks=!0)},j.runGlobal=function(e,t,n){for(var r=j.global[e],a=Array.isArray(r),o=0,r=a?r:r[h.iterator]();;){var s;if(a){if(o>=r.length)break;s=r[o++]}else{if(o=r.next(),o.done)break;s=o.value}var i=s;i.apply(t,n)}}},"template-for-each.js":function(){r.forEach=function(e){var t=!1;for(var n in k.sanitizeForInObject(r))if(r.hasOwnProperty(n)){var o=r[n];if(a.isTemplate(o)){var s=o.viewName;"body"===s?t||(t=!0,e(o)):"Template.__dynamic"!==s&&"Template.__dynamicWithDataContext"!==s&&e(o)}}}},"template-hooks.js":["babel-runtime/helpers/typeof",function(e,t,n){var a;n.import("babel-runtime/helpers/typeof",{default:function(e){a=e}}),r.prototype.hooks=function(e){if(!e||"object"!==("undefined"==typeof e?"undefined":a(e)))throw new Error("hooks argument must be an object with created, rendered, and/or destroyed properties, each set to a function");"function"==typeof e.created&&this.onCreated(e.created),"function"==typeof e.rendered&&this.onRendered(e.rendered),"function"==typeof e.destroyed&&this.onDestroyed(e.destroyed)}}],"template-global-hooks.js":function(){e.startup(function(){r.forEach(function(e){j.addGlobal(e)})}),r.onCreated=function(e){j.global.created.push(e)},r.onRendered=function(e){j.global.rendered.push(e)},r.onDestroyed=function(e){j.global.destroyed.push(e)}},"template-for-each-instance.js":function(){r._renderedInstances=[],r.onRendered(function(){r._renderedInstances.push(this)}),r.onDestroyed(function(){var e=r._renderedInstances.indexOf(this);e>-1&&r._renderedInstances.splice(e,1)}),r.forEachCurrentlyRenderedInstance=function(e){r._renderedInstances.forEach(e)}},"template-inherits-events-from.js":function(){r.prototype.inheritsEventsFrom=function(){function e(e){function t(e){"string"==typeof e&&(e=r[e]),e&&(n.__eventMaps=n.__eventMaps.concat(e.__eventMaps))}var n=this;n.__eventMaps=n.__eventMaps||[],d.isArray(e)?d.each(e,t):t(e)}return e}()},"template-inherits-helpers-from.js":function(){r.prototype.inheritsHelpersFrom=function(){function e(e){function t(e){if("string"==typeof e&&(e=r[e]),e){var t={};d.each(e.__helpers,function(e,n){" "===n.charAt(0)&&(t[n.slice(1)]=e)}),n.helpers(t)}}var n=this;d.isArray(e)?d.each(e,t):t(e)}return e}()},"template-inherits-hooks-from.js":function(){r.prototype.inheritsHooksFrom=function(){function e(e){function t(e){if("string"==typeof e&&(e=r[e]),e){j.addGlobal(e);for(var t=e._callbacks.created,a=Array.isArray(t),o=0,t=a?t:t[h.iterator]();;){var s;if(a){if(o>=t.length)break;s=t[o++]}else{if(o=t.next(),o.done)break;s=o.value}var i=s;i!==j.master.created&&n.onCreated(i)}for(var l=e._callbacks.rendered,d=Array.isArray(l),c=0,l=d?l:l[h.iterator]();;){var p;if(d){if(c>=l.length)break;p=l[c++]}else{if(c=l.next(),c.done)break;p=c.value}var u=p;u!==j.master.rendered&&n.onRendered(u)}for(var m=e._callbacks.destroyed,f=Array.isArray(m),y=0,m=f?m:m[h.iterator]();;){var b;if(f){if(y>=m.length
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,i=Package.meteor.meteorEnv,o=Package.jquery.$,n=Package.jquery.jQuery;(function(){if("undefined"==typeof n)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(n),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(n),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.6",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(n),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.6",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(n),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.car
o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var o=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=o,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(n),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(n),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.6",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top,h=r?a:e;return null!=i&&n<=i?"top":null!=o&&l+h>=t-o&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affi
!function(){"undefined"==typeof Package&&(Package={}),Package["fortawesome:fontawesome"]={}}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,a;(function(){(function(){(function(e){function n(e,t,n){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:n;default:throw new Error("Implement me")}}function a(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function s(e){De.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function r(e,t){var n=!0;return h(function(){return n&&(s(e),n=!1),t.apply(this,arguments)},t)}function i(e,t){mt[e]||(s(t),mt[e]=!0)}function o(e,t){return function(n){return m(e.call(this,n),t)}}function u(e,t){return function(n){return this.localeData().ordinal(e.call(this,n),t)}}function c(){}function l(e,t){t!==!1&&F(e),f(this,e),this._d=new Date((+e._d))}function d(e){var t=v(e),n=t.year||0,a=t.quarter||0,s=t.month||0,r=t.week||0,i=t.day||0,o=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+36e5*o,this._days=+i+7*r,this._months=+s+3*a+12*n,this._data={},this._locale=De.localeData(),this._bubble()}function h(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return t.hasOwnProperty("toString")&&(e.toString=t.toString),t.hasOwnProperty("valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t){var n,a,s;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),Pe.length>0)for(n in Pe)a=Pe[n],s=t[a],"undefined"!=typeof s&&(e[a]=s);return e}function _(e){return e<0?Math.ceil(e):Math.floor(e)}function m(e,t,n){for(var a=""+Math.abs(e),s=e>=0;a.length<t;)a="0"+a;return(s?n?"+":"":"-")+a}function y(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function p(e,t){var n;return t=L(t,e),e.isBefore(t)?n=y(e,t):(n=y(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function D(e,t){return function(n,a){var s,r;return null===a||isNaN(+a)||(i(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),r=n,n=a,a=r),n="string"==typeof n?+n:n,s=De.duration(n,a),g(this,s,e),this}}function g(e,t,n,a){var s=t._milliseconds,r=t._days,i=t._months;a=null==a||a,s&&e._d.setTime(+e._d+s*n),r&&he(e,"Date",de(e,"Date")+r*n),i&&le(e,de(e,"Month")+i*n),a&&De.updateOffset(e,r||i)}function M(e){return"[object Array]"===Object.prototype.toString.call(e)}function w(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function Y(e,t,n){var a=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0,i;for(i=0;i<a;i++)(n&&e[i]!==t[i]||!n&&S(e[i])!==S(t[i]))&&r++;return r+s}function k(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=ut[e]||ct[t]||t}return e}function v(e){var t={},n,a;for(a in e)e.hasOwnProperty(a)&&(n=k(a),n&&(t[n]=e[a]));return t}function b(t){var n,a;if(0===t.indexOf("week"))n=7,a="day";else{if(0!==t.indexOf("month"))return;n=12,a="month"}De[t]=function(s,r){var i,o,u=De._locale[t],c=[];if("number"==typeof s&&(r=s,s=e),o=function(e){var t=De().utc().set(a,e);return u.call(De._locale,t,s||"")},null!=r)return o(r);for(i=0;i<n;i++)c.push(o(i));return c}}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function T(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function O(e,t,n){return ie(De([e,11,31+t-n]),t,n).week}function W(e){return G(e)?366:365}function G(e){return e%4===0&&e%100!==0||e%400===0}function F(e){var t;e._a&&e._pf.overflow===-2&&(
!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o,i;(function(){o={exports:{}}}).call(this),function(){function t(e,o){"use strict";function i(t,e){return function(){return t.apply(e,arguments)}}var r;if(o=o||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=o.touchBoundary||10,this.layer=e,this.tapDelay=o.tapDelay||200,this.tapTimeout=o.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,s=0,u=a.length;s<u;s++)c[a[s]]=i(c[a[s]],c);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,i=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,r=i&&/OS 4_\d(_\d)?/.test(navigator.userAgent),a=i&&/OS [6-7]_\d/.test(navigator.userAgent),c=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(i&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;i&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,o;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],i){if(o=window.getSelection(),o.rangeCount&&!o.isCollapsed)return!0;if(!r){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTime<this.tapDelay&&t.preventDefault(),!0},t.prototype.touchHasMoved=function(t){var e=t.changedTouches[0],n=this.touchBoundary;return Math.abs
!function(){var a=Package.meteor.Meteor,e=Package.meteor.global,o=Package.meteor.meteorEnv,l=Package["templating-runtime"].Template,n=Package.jquery.$,t=Package.jquery.jQuery,c=Package.blaze.Blaze,i=Package.blaze.UI,d=Package.blaze.Handlebars,r=Package.spacebars.Spacebars,u=Package.htmljs.HTML,m;(function(){var a=null;m={allowMultiple:!1,show:function(e,o,n){if(null==a||this.allowMultiple){var t=document.body,i=c.renderWithData(l[e],o,t),d=i._domrange,r=d.$(".modal");r.on("shown.bs.modal",function(a){r.find("[autofocus]").focus()}),r.on("hidden.bs.modal",function(e){c.remove(i),a=null}),a=r,r.modal(n?n:{})}},hide:function(e){e instanceof c.TemplateInstance?e.$(".modal").modal("hide"):null!=a&&a.modal("hide")}}}).call(this),"undefined"==typeof Package&&(Package={}),function(a,e){for(var o in e)o in a||(a[o]=e[o])}(Package["peppelg:bootstrap-3-modal"]={},{Modal:m})}();
!function(){"undefined"==typeof Package&&(Package={}),Package["hot-code-push"]={}}();
Mongo=Package.mongo.Mongo,ReactiveVar=Package["reactive-var"].ReactiveVar,$=Package.jquery.$,jQuery=Package.jquery.jQuery,Tracker=Package.tracker.Tracker,Deps=Package.tracker.Deps,cornerstone=Package["ohif:cornerstone"].cornerstone,cornerstoneMath=Package["ohif:cornerstone"].cornerstoneMath,cornerstoneTools=Package["ohif:cornerstone"].cornerstoneTools,cornerstoneWADOImageLoader=Package["ohif:cornerstone"].cornerstoneWADOImageLoader,dicomParser=Package["ohif:cornerstone"].dicomParser,dialogPolyfill=Package["ohif:viewerbase"].dialogPolyfill,Servers=Package["ohif:study-list"].Servers,CurrentServer=Package["ohif:study-list"].CurrentServer,getCurrentServer=Package["ohif:study-list"].getCurrentServer,getStudyMetadata=Package["ohif:study-list"].getStudyMetadata,openNewTab=Package["ohif:study-list"].openNewTab,switchToTab=Package["ohif:study-list"].switchToTab,StudyList=Package["ohif:study-list"].StudyList,ViewerData=Package["ohif:study-list"].ViewerData,StudyListStudies=Package["ohif:study-list"].StudyListStudies,StudyListSelectedStudies=Package["ohif:study-list"].StudyListSelectedStudies,HP=Package["ohif:hanging-protocols"].HP,SimpleSchema=Package["aldeed:simple-schema"].SimpleSchema,MongoObject=Package["aldeed:simple-schema"].MongoObject,Router=Package["iron:router"].Router,RouteController=Package["iron:router"].RouteController,Session=Package.session.Session,loglevel=Package["practicalmeteor:loglevel"].loglevel,ObjectLogger=Package["practicalmeteor:loglevel"].ObjectLogger,ReactiveDict=Package["reactive-dict"].ReactiveDict,moment=Package["mrt:moment"].moment,FastClick=Package.fastclick.FastClick,Modal=Package["peppelg:bootstrap-3-modal"].Modal,Random=Package.random.Random,Meteor=Package.meteor.Meteor,global=Package.meteor.global,meteorEnv=Package.meteor.meteorEnv,WebApp=Package.webapp.WebApp,_=Package.underscore._,DDP=Package["ddp-client"].DDP,LaunchScreen=Package["launch-screen"].LaunchScreen,Blaze=Package.ui.Blaze,UI=Package.ui.UI,Handlebars=Package.ui.Handlebars,Spacebars=Package.spacebars.Spacebars,Template=Package["templating-runtime"].Template,meteorInstall=Package.modules.meteorInstall,Buffer=Package.modules.Buffer,process=Package.modules.process,Symbol=Package["ecmascript-runtime"].Symbol,Map=Package["ecmascript-runtime"].Map,Set=Package["ecmascript-runtime"].Set,meteorBabelHelpers=Package["babel-runtime"].meteorBabelHelpers,Promise=Package.promise.Promise,Iron=Package["iron:core"].Iron,Autoupdate=Package.autoupdate.Autoupdate,Reload=Package.reload.Reload,HTML=Package.htmljs.HTML;
var require=meteorInstall({client:{components:{flexboxLayout:{"template.flexboxLayout.js":function(){Template.__checkName("flexboxLayout"),Template.flexboxLayout=new Template("Template.flexboxLayout",function(){var e=this;return HTML.DIV({class:"viewerSection"},"\n ",HTML.DIV({class:function(){return["sidebarMenu sidebar-left ",Blaze.If(function(){return Spacebars.call(e.lookup("leftSidebarOpen"))},function(){return"sidebar-open"})]}},"\n ",Blaze._TemplateWith(function(){return Spacebars.dataMustache(e.lookup("clone"),e.lookup("."))},function(){return Spacebars.include(e.lookupTemplate("studyBrowser"))}),"\n "),"\n ",HTML.DIV({class:function(){return["mainContent ",Blaze.If(function(){return Spacebars.call(e.lookup("leftSidebarOpen"))},function(){return"sidebar-left-open"})]}},"\n ",Blaze._TemplateWith(function(){return Spacebars.dataMustache(e.lookup("clone"),e.lookup("."))},function(){return Spacebars.include(e.lookupTemplate("standaloneViewerMain"))}),"\n "),"\n ")})},"flexboxLayout.js":function(){Template.flexboxLayout.events({"transitionend .sidebarMenu":function(){function e(e){e.target.classList.contains("sidebarMenu")&&window.ResizeViewportManager.handleResize()}return e}()}),Template.flexboxLayout.helpers({leftSidebarOpen:function(){function e(){return Template.instance().data.state.get("leftSidebar")}return e}()})}},standaloneViewer:{"template.standaloneViewer.js":function(){Template.__checkName("standaloneViewer"),Template.standaloneViewer=new Template("Template.standaloneViewer",function(){var e=this;return[HTML.DIV({class:"topBar noselect"},"\n ",HTML.DIV({class:"clearfix"},"\n ",HTML.A({target:"_blank",class:"brandSection pull-left",href:"http://ohif.org"},"\n ",HTML.SVG({class:"logoImage"},"\n ",HTML.USE({"xlink:href":function(){return Spacebars.mustache(e.lookup("absoluteUrl"),"packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo")}}),"\n "),"\n ",HTML.Raw('<div class="logoText">\n Open Health Imaging Foundation\n </div>'),"\n "),"\n "),"\n "),"\n ",Spacebars.include(e.lookupTemplate("viewer"))]})},"standaloneViewer.js":function(){Template.standaloneViewer.onCreated(function(){ViewerData=Session.get("ViewerData")||{}})}},standaloneViewerMain:{"template.standaloneViewerMain.js":function(){Template.__checkName("standaloneViewerMain"),Template.standaloneViewerMain=new Template("Template.standaloneViewerMain",function(){var e=this;return HTML.Raw('<div class="viewerMain">\n <div id="layoutManagerTarget">\n </div>\n </div>')})},"standaloneViewerMain.js":["meteor/ohif:core","meteor/ohif:viewerbase",function(e,t,a){var n;a.import("meteor/ohif:core",{OHIF:function(e){n=e}}),a.import("meteor/ohif:viewerbase"),Meteor.startup(function(){window.ResizeViewportManager=window.ResizeViewportManager||new n.viewerbase.ResizeViewportManager}),Template.standaloneViewerMain.onCreated(function(){window.addEventListener("resize",window.ResizeViewportManager.getResizeHandler()),n.viewer.updateImageSynchronizer=new cornerstoneTools.Synchronizer("CornerstoneNewImage",cornerstoneTools.updateImageSynchronizer),n.viewer.metadataProvider=n.cornerstone.metadataProvider;var e=n.viewer.metadataProvider;cornerstoneTools.metaData.addProvider(e.provider.bind(e))}),Template.standaloneViewerMain.onRendered(function(){var e=Template.instance(),t=e.data.studies,a=e.$("#layoutManagerTarget").get(0);n.viewerbase.layoutManager=new n.viewerbase.LayoutManager(a,t),n.viewerbase.layoutManager.updateViewports(),n.viewerbase.hotkeyUtils.enableHotkeys()}),Template.standaloneViewerMain.onDestroyed(function(){window.removeEventListener("resize",window.ResizeViewportManager.getResizeHandler()),n.viewer.updateImageSynchronizer.destroy(),delete n.viewerbase.layoutManager})}]},toolbarSection:{"template.toolbarSection.js":function(){Template.__checkName("toolbarSection"),Template.toolbarSection=new Template("Template.toolbarSection",function(){var e=
!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,a=Package.meteor.meteorEnv,t=Package.check.check,n=Package.check.Match,i=Package.modules.meteorInstall,o=Package.modules.Buffer,c=Package.modules.process,l=Package["ecmascript-runtime"].Symbol,s=Package["ecmascript-runtime"].Map,u=Package["ecmascript-runtime"].Set,m=Package["babel-runtime"].meteorBabelHelpers,d=Package.promise.Promise,g,k=i({node_modules:{meteor:{"mdg:validation-error":{"validation-error.js":["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits",function(r,a,i){var o;i.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var c;i.import("babel-runtime/helpers/possibleConstructorReturn",{default:function(e){c=e}});var l;i.import("babel-runtime/helpers/inherits",{default:function(e){l=e}});var s=[n.ObjectIncluding({name:String,type:String})];g=function(r){function a(e){var n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.DEFAULT_MESSAGE;return o(this,a),t(e,s),t(l,String),i=n=c(this,r.call(this,g.ERROR_CODE,l,e)),c(n,i)}return l(a,r),a.is=function(){function r(r){return r instanceof e.Error&&r.error===g.ERROR_CODE}return r}(),a}(e.Error),g.ERROR_CODE="validation-error",g.DEFAULT_MESSAGE="Validation failed"}]}}}},{extensions:[".js",".json"]});k("./node_modules/meteor/mdg:validation-error/validation-error.js"),"undefined"==typeof Package&&(Package={}),function(e,r){for(var a in r)a in e||(e[a]=r[a])}(Package["mdg:validation-error"]={},{ValidationError:g})}();
!function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,i=Package["accounts-base"].Accounts,r=Package.mongo.Mongo,t;(function(){"undefined"==typeof t&&(t={}),t.configurations=new r.Collection("meteor_accounts_loginServiceConfiguration",{_preventAutopublish:!0,connection:e.isClient?i.connection:e.connection}),t.ConfigError=function(o){e.isClient&&!i.loginServicesConfigured()?this.message="Login service configuration not yet loaded":o?this.message="Service "+o+" not configured":this.message="Service not configured"},t.ConfigError.prototype=new Error,t.ConfigError.prototype.name="ServiceConfiguration.ConfigError"}).call(this),"undefined"==typeof Package&&(Package={}),function(e,o){for(var n in o)n in e||(e[n]=o[n])}(Package["service-configuration"]={},{ServiceConfiguration:t})}();