Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gear

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gear - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

lib/index.js

78

bin/gear.js
#!/usr/bin/env node
'use strict';

@@ -7,5 +8,9 @@ /* Gear task runner. Executes Gearfile using a tasks workflow.

* Usage:
* > gear
*/
var gear = require('../index'),
* > gear [options]
*
* Available options:
* --cwd <dir> change working directory
* --Gearfile <path> execute a specific gearfile
*/
var Liftoff = require('liftoff'),
vm = require('vm'),

@@ -17,31 +22,50 @@ path = require('path'),

if (!existsSync(filename)) {
notify(filename + ' not found');
return 1;
}
var GearCLI = new Liftoff({
name: 'Gear',
configName: filename,
extensions: {
'': null,
'.js': null
}
});
try {
var tasks = vm.runInNewContext('var tasks = ' + fs.readFileSync(filename) + '; tasks;', {
require: require,
process: process,
console: console,
gear: gear
}, filename, true);
} catch(e) {
notify(e);
return 1;
}
GearCLI.launch(function(env) {
// Loads a local install of gear. Falls back to the global install.
var gear = require(env.modulePath || '../index');
if(process.cwd !== env.cwd) {
process.chdir(env.cwd);
}
if (tasks) {
new gear.Queue({registry: new gear.Registry({module: 'gear-lib'})})
.tasks(tasks)
.run(function(err, res) {
if (err) {
notify(err);
}
});
}
if (!env.configPath) {
notify(filename + ' not found');
process.exit(1);
}
var tasks;
try {
tasks = vm.runInNewContext('var tasks = ' + fs.readFileSync(filename) + '; tasks;', {
require: require,
process: process,
console: console,
gear: gear
}, env.configPath, true);
} catch(e) {
notify(e);
process.exit(1);
}
if (tasks) {
new gear.Queue({registry: new gear.Registry({module: 'gear-lib'})})
.tasks(tasks)
.run(function(err, res) {
if (err) {
notify(err);
}
});
}
});
function notify(msg) {
console.error('gear: ', msg);
}

@@ -1,7 +0,7 @@

/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.Gear=t()}}(function(){var t;return function n(t,e,r){function i(a,u){if(!e[a]){if(!t[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var s=e[a]={exports:{}};t[a][0].call(s.exports,function(n){var e=t[a][1][n];return i(e?e:n)},s,s.exports,n,t,e,r)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,n,e){(function(n){var r=e.Blob=function a(t,n){function e(t,n){Object.keys(n).forEach(function(e){t[e]=n[e]})}t="undefined"==typeof t?[]:Array.prototype.concat(t),n=n||{};var r=t.length?t.shift():"",i={},o=this;r instanceof a&&(e(i,r),r=r.result),t.forEach(function(t){t instanceof a?(e(i,t),r+=t.result):r+=t}),e(i,n),Object.keys(i).forEach(function(t){"result"!==t&&Object.defineProperty(o,t,{enumerable:!0,value:i[t]})}),Object.defineProperty(this,"result",{value:r})};r.prototype.toString=function(){return this.result};var i={server:function(n,e,o,a){var u=t("fs");a?i.serverSync(n,e,o):u.readFile(n,"bin"===e?void 0:e,function(t,e){t?o(t):o(null,new r(e,{name:n}))})},serverSync:function(n,e,i){var o,a=t("fs");try{o=a.readFileSync(n,"bin"===e?void 0:e),i(null,new r(o,{name:n}))}catch(u){i(u)}},client:function(t,n,e){t in localStorage?e(null,new r(localStorage[t],{name:t})):e("localStorage has no item "+t)}};r.readFile=r.prototype.readFile=n.browser?i.client:i.server;var o={server:function(n,e,i,o){function a(t,n){c.writeFile(t,n.result,"bin"===i?void 0:i,function(e){o(e,new r(n,{name:t}))})}var u,c=t("fs"),s=t("path"),f=c.exists||s.exists,l=t("mkdirp").mkdirp,h=t("crypto"),p=s.resolve(s.dirname(n));n.indexOf("{checksum}")>-1&&(u=h.createHash("md5"),u.update(e.result),n=n.replace("{checksum}",u.digest("hex"))),f(p,function(t){t?a(n,e):l(p,"0755",function(t){t?o(t):a(n,e)})})},client:function(t,n,e,r){localStorage[t]=n.result,r(null,new n.constructor(n,{name:t}))}};r.writeFile=r.prototype.writeFile=n.browser?o.client:o.server}).call(this,t("FWaASH"))},{FWaASH:25,crypto:19,fs:14,mkdirp:26,path:24}],2:[function(t,n){n.exports={Registry:t("./registry").Registry,Blob:t("./blob").Blob,Queue:t("./queue").Queue,tasks:t("./tasks")}},{"./blob":1,"./queue":3,"./registry":4,"./tasks":7}],3:[function(t,n,e){function r(t,n){for(var e=[],r=0;r<Math.min(t.length,n.length);r++)e.push([t[r],n[r]]);return e}function i(t){return"undefined"==typeof t?[]:Array.prototype.concat(t)}var o=t("async"),a=t("./registry").Registry,u=t("./blob").Blob,c=e.Queue=function(t){var n=this;t=t||{},this._logger=t.logger||console,this._registry="string"==typeof t.registry?new a({module:t.registry}):t.registry||new a,this._clear(),this._registry.tasks.forEach(function(t){n[t]=n.task.bind(n,t)})};c.prototype._clear=function(){this._queue=[function(t){t(null,[])}]},c.prototype._log=function(t){this._logger.log(t)},c.prototype._dispatch=function(t,n,e,a){function c(n,e){n&&(n={task:t,error:n}),a(n,e)}var s=this._registry.task(t),f={2:"append",3:"map",4:"reduce"},l=s.type?s.type:f[s.length];switch(l){case"append":o.map(i(n),s.bind(this),function(t,n){c(t,e.concat(n))});break;case"prepend":o.map(i(n),s.bind(this),function(t,n){c(t,n.concat(e))});break;case"collect":s.call(this,n,e,c);break;case"slice":o.map(r(i(n),e),function(t,n){s.call(this,t[0],t[1],n)}.bind(this),c);break;case"each":o.forEach(e,s.bind(this,n),function(t){c(t,e)});break;case"map":o.map(e,s.bind(this,n),c);break;case"syncmap":o.mapSeries(e,s.bind(this,n),c);break;case"reduce":o.reduce(e,new u,s.bind(this,n),function(t,n){c(t,[n])});break;default:throw new Error('Task "'+t+'" has unknown type. Add a type property to the task function.')}},c.prototype.task=function(t,n){return this._queue.push(this._dispatch.bind(this,t,n)),this},c.prototype.run=function(t){var n=this;o.waterfall(this._queue,t||function(t){t&&n._log(t)})}},{"./blob":1,"./registry":4,async:13}],4:[function(t,n,e){(function(n,r){var i=t("fs"),o=t("path"),a=e.Registry=function(e){var i=this;this._tasks={},this.load(n.browser?{tasks:t("./tasks")}:{dirname:r+"/tasks"}),e&&this.load(e),Object.defineProperty(this,"tasks",{get:function(){return Object.keys(i._tasks)}})};a.prototype={load:function(t){t=t||{};var n=t.module,e=t.dirname,r=t.filename,i=t.tasks;if(n&&!this._loadModule(n))throw new Error("Module "+n+" doesn't exist");if(e&&!this._loadDir(e))throw new Error("Directory "+e+" doesn't exist");if(r&&!this._loadFile(r))throw new Error("File "+r+" doesn't exist");if(i&&!this._loadTasks(i))throw new Error("Failed to load tasks");return this},_loadModule:function(n){if(t)try{return this._loadTasks(t(n))}catch(e){}return this._loadDir(o.resolve("node_modules",n,"lib"))},_loadDir:function(t){if(!i.existsSync(t))return!1;var n=i.readdirSync(t),e=this;return n.forEach(function(n){var r=o.join(t,n);".js"===o.extname(r)&&e._loadFile(r)}),!0},_loadFile:function(n){return i.existsSync(n)?this._loadTasks(t(n)):!1},_loadTasks:function(t){var n;for(n in t)this._tasks[n]=t[n];return!0},task:function(t){if(!(t in this._tasks))throw new Error("Task "+t+" doesn't exist");return this._tasks[t]}}}).call(this,t("FWaASH"),"/")},{"./tasks":7,FWaASH:25,fs:14,path:24}],5:[function(t,n,e){e.concat=function(t,n,e,r){t=t||{},r(null,new e.constructor([n,t.callback?t.callback(e):e]))}},{}],6:[function(t,n,e){function r(){return function(t,n){n(null,new i(t))}}var i=t("../blob").Blob;e.append=e.load=r();var o=e.prepend=r();o.type="prepend";var a=e.test=function(t,n,e){t=t||{},e(t.callback?t.callback(n):null)};a.type="each";var u=e.get=function(t,n,e){e(null,n.slice(t,t+1))};u.type="collect";var c=e.log=function(t,n,e){this._log(t),e(null,n)};c.type="collect";var s=e.inspect=function(t,n,e){var r=this;n.forEach(function(t,n){var e={result:t.result};Object.keys(t).forEach(function(n){e[n]=t[n]}),r._log("blob "+(n+1)+": "+JSON.stringify(e,null," "))}),e(null,n)};s.type="collect",e.noop=function(t,n,e){e(null,n)}},{"../blob":1}],7:[function(t,n){function e(t){Object.keys(t).map(function(n){r[n]=t[n]})}var r={write:t("./write").write,tasks:t("./tasks").tasks,stamp:t("./stamp").stamp,replace:t("./replace").replace,concat:t("./concat").concat};e(t("./core")),e(t("./read")),n.exports=r},{"./concat":5,"./core":6,"./read":8,"./replace":9,"./stamp":10,"./tasks":11,"./write":12}],8:[function(t,n,e){function r(){return function(t,n){t="string"==typeof t?{name:t}:t;var e=t.encoding||"utf8";i.readFile(t.name,e,n,t.sync)}}var i=t("../blob").Blob;e.read=r();var o=e.readBefore=r();o.type="prepend"},{"../blob":1}],9:[function(t,n,e){e.replace=function(t,n,e){var r=n.result;Array.isArray(t)||(t=[t]),t.forEach(function(t){var n=t.replace||"",e=void 0!==t.flags?t.flags:"mg",i="string"==typeof t.regex?new RegExp(t.regex,e):t.regex;r=r.replace(i,n)}),e(null,new n.constructor(r,n))}},{}],10:[function(t,n,e){e.stamp=function(t,n,e){t=t||{},t.prefix=t.prefix||"",t.postfix=t.postfix||"";var r=t.callback?t.callback(n):n.result,i=t.prefix+r+t.postfix;e(null,new n.constructor(i,n))}},{}],11:[function(t,n,e){var r=t("async"),i=e.tasks=function(t,n,e){function i(t,e,r){return function(i,o){var a=r.length?[]:n;o=o||[],r.forEach(function(t){a=a.concat(o[t])}),f._dispatch(t,e,a,i)}}var o,a,u,c,s={},f=this;for(o in t)a=t[o].task,void 0===a?a=["noop"]:Array.isArray(a)||(a=[a]),u=t[o].requires,void 0===u?u=[]:Array.isArray(u)||(u=[u]),c=i(a[0],a[1],u),s[o]=u?u.concat(c):c;r.auto(s,function(t,n){return t?void e(t):void e(t,n&&n.join?n.join:[])})};i.type="collect"},{async:13}],12:[function(t,n,e){var r=e.write=function(t,n,e){t="string"==typeof t?{name:t}:t;var r=t.encoding||"utf8";n.writeFile(t.name,n,r,e)};r.type="slice"},{}],13:[function(n,e){(function(n){!function(){function r(t){var n=!1;return function(){if(n)throw new Error("Callback was already called.");n=!0,t.apply(i,arguments)}}var i,o,a={};i=this,null!=i&&(o=i.async),a.noConflict=function(){return i.async=o,a};var u=function(t,n){if(t.forEach)return t.forEach(n);for(var e=0;e<t.length;e+=1)n(t[e],e,t)},c=function(t,n){if(t.map)return t.map(n);var e=[];return u(t,function(t,r,i){e.push(n(t,r,i))}),e},s=function(t,n,e){return t.reduce?t.reduce(n,e):(u(t,function(t,r,i){e=n(e,t,r,i)}),e)},f=function(t){if(Object.keys)return Object.keys(t);var n=[];for(var e in t)t.hasOwnProperty(e)&&n.push(e);return n};"undefined"!=typeof n&&n.nextTick?(a.nextTick=n.nextTick,a.setImmediate="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:a.nextTick):"function"==typeof setImmediate?(a.nextTick=function(t){setImmediate(t)},a.setImmediate=a.nextTick):(a.nextTick=function(t){setTimeout(t,0)},a.setImmediate=a.nextTick),a.each=function(t,n,e){if(e=e||function(){},!t.length)return e();var i=0;u(t,function(o){n(o,r(function(n){n?(e(n),e=function(){}):(i+=1,i>=t.length&&e(null))}))})},a.forEach=a.each,a.eachSeries=function(t,n,e){if(e=e||function(){},!t.length)return e();var r=0,i=function(){n(t[r],function(n){n?(e(n),e=function(){}):(r+=1,r>=t.length?e(null):i())})};i()},a.forEachSeries=a.eachSeries,a.eachLimit=function(t,n,e,r){var i=l(n);i.apply(null,[t,e,r])},a.forEachLimit=a.eachLimit;var l=function(t){return function(n,e,r){if(r=r||function(){},!n.length||0>=t)return r();var i=0,o=0,a=0;!function u(){if(i>=n.length)return r();for(;t>a&&o<n.length;)o+=1,a+=1,e(n[o-1],function(t){t?(r(t),r=function(){}):(i+=1,a-=1,i>=n.length?r():u())})}()}},h=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[a.each].concat(n))}},p=function(t,n){return function(){var e=Array.prototype.slice.call(arguments);return n.apply(null,[l(t)].concat(e))}},d=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[a.eachSeries].concat(n))}},g=function(t,n,e,r){var i=[];n=c(n,function(t,n){return{index:n,value:t}}),t(n,function(t,n){e(t.value,function(e,r){i[t.index]=r,n(e)})},function(t){r(t,i)})};a.map=h(g),a.mapSeries=d(g),a.mapLimit=function(t,n,e,r){return y(n)(t,e,r)};var y=function(t){return p(t,g)};a.reduce=function(t,n,e,r){a.eachSeries(t,function(t,r){e(n,t,function(t,e){n=e,r(t)})},function(t){r(t,n)})},a.inject=a.reduce,a.foldl=a.reduce,a.reduceRight=function(t,n,e,r){var i=c(t,function(t){return t}).reverse();a.reduce(i,n,e,r)},a.foldr=a.reduceRight;var v=function(t,n,e,r){var i=[];n=c(n,function(t,n){return{index:n,value:t}}),t(n,function(t,n){e(t.value,function(e){e&&i.push(t),n()})},function(){r(c(i.sort(function(t,n){return t.index-n.index}),function(t){return t.value}))})};a.filter=h(v),a.filterSeries=d(v),a.select=a.filter,a.selectSeries=a.filterSeries;var m=function(t,n,e,r){var i=[];n=c(n,function(t,n){return{index:n,value:t}}),t(n,function(t,n){e(t.value,function(e){e||i.push(t),n()})},function(){r(c(i.sort(function(t,n){return t.index-n.index}),function(t){return t.value}))})};a.reject=h(m),a.rejectSeries=d(m);var b=function(t,n,e,r){t(n,function(t,n){e(t,function(e){e?(r(t),r=function(){}):n()})},function(){r()})};a.detect=h(b),a.detectSeries=d(b),a.some=function(t,n,e){a.each(t,function(t,r){n(t,function(t){t&&(e(!0),e=function(){}),r()})},function(){e(!1)})},a.any=a.some,a.every=function(t,n,e){a.each(t,function(t,r){n(t,function(t){t||(e(!1),e=function(){}),r()})},function(){e(!0)})},a.all=a.every,a.sortBy=function(t,n,e){a.map(t,function(t,e){n(t,function(n,r){n?e(n):e(null,{value:t,criteria:r})})},function(t,n){if(t)return e(t);var r=function(t,n){var e=t.criteria,r=n.criteria;return r>e?-1:e>r?1:0};e(null,c(n.sort(r),function(t){return t.value}))})},a.auto=function(t,n){n=n||function(){};var e=f(t);if(!e.length)return n(null);var r={},i=[],o=function(t){i.unshift(t)},c=function(t){for(var n=0;n<i.length;n+=1)if(i[n]===t)return void i.splice(n,1)},l=function(){u(i.slice(0),function(t){t()})};o(function(){f(r).length===e.length&&(n(null,r),n=function(){})}),u(e,function(e){var i=t[e]instanceof Function?[t[e]]:t[e],h=function(t){var i=Array.prototype.slice.call(arguments,1);if(i.length<=1&&(i=i[0]),t){var o={};u(f(r),function(t){o[t]=r[t]}),o[e]=i,n(t,o),n=function(){}}else r[e]=i,a.setImmediate(l)},p=i.slice(0,Math.abs(i.length-1))||[],d=function(){return s(p,function(t,n){return t&&r.hasOwnProperty(n)},!0)&&!r.hasOwnProperty(e)};if(d())i[i.length-1](h,r);else{var g=function(){d()&&(c(g),i[i.length-1](h,r))};o(g)}})},a.waterfall=function(t,n){if(n=n||function(){},t.constructor!==Array){var e=new Error("First argument to waterfall must be an array of functions");return n(e)}if(!t.length)return n();var r=function(t){return function(e){if(e)n.apply(null,arguments),n=function(){};else{var i=Array.prototype.slice.call(arguments,1),o=t.next();i.push(o?r(o):n),a.setImmediate(function(){t.apply(null,i)})}}};r(a.iterator(t))()};var w=function(t,n,e){if(e=e||function(){},n.constructor===Array)t.map(n,function(t,n){t&&t(function(t){var e=Array.prototype.slice.call(arguments,1);e.length<=1&&(e=e[0]),n.call(null,t,e)})},e);else{var r={};t.each(f(n),function(t,e){n[t](function(n){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[t]=i,e(n)})},function(t){e(t,r)})}};a.parallel=function(t,n){w({map:a.map,each:a.each},t,n)},a.parallelLimit=function(t,n,e){w({map:y(n),each:l(n)},t,e)},a.series=function(t,n){if(n=n||function(){},t.constructor===Array)a.mapSeries(t,function(t,n){t&&t(function(t){var e=Array.prototype.slice.call(arguments,1);e.length<=1&&(e=e[0]),n.call(null,t,e)})},n);else{var e={};a.eachSeries(f(t),function(n,r){t[n](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),e[n]=i,r(t)})},function(t){n(t,e)})}},a.iterator=function(t){var n=function(e){var r=function(){return t.length&&t[e].apply(null,arguments),r.next()};return r.next=function(){return e<t.length-1?n(e+1):null},r};return n(0)},a.apply=function(t){var n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,n.concat(Array.prototype.slice.call(arguments)))}};var E=function(t,n,e,r){var i=[];t(n,function(t,n){e(t,function(t,e){i=i.concat(e||[]),n(t)})},function(t){r(t,i)})};a.concat=h(E),a.concatSeries=d(E),a.whilst=function(t,n,e){t()?n(function(r){return r?e(r):void a.whilst(t,n,e)}):e()},a.doWhilst=function(t,n,e){t(function(r){return r?e(r):void(n()?a.doWhilst(t,n,e):e())})},a.until=function(t,n,e){t()?e():n(function(r){return r?e(r):void a.until(t,n,e)})},a.doUntil=function(t,n,e){t(function(r){return r?e(r):void(n()?e():a.doUntil(t,n,e))})},a.queue=function(t,n){function e(t,e,r,i){e.constructor!==Array&&(e=[e]),u(e,function(e){var o={data:e,callback:"function"==typeof i?i:null};r?t.tasks.unshift(o):t.tasks.push(o),t.saturated&&t.tasks.length===n&&t.saturated(),a.setImmediate(t.process)})}void 0===n&&(n=1);var i=0,o={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(t,n){e(o,t,!1,n)},unshift:function(t,n){e(o,t,!0,n)},process:function(){if(i<o.concurrency&&o.tasks.length){var n=o.tasks.shift();o.empty&&0===o.tasks.length&&o.empty(),i+=1;var e=function(){i-=1,n.callback&&n.callback.apply(n,arguments),o.drain&&o.tasks.length+i===0&&o.drain(),o.process()},a=r(e);t(n.data,a)}},length:function(){return o.tasks.length},running:function(){return i}};return o},a.cargo=function(t,n){var e=!1,r=[],i={tasks:r,payload:n,saturated:null,empty:null,drain:null,push:function(t,e){t.constructor!==Array&&(t=[t]),u(t,function(t){r.push({data:t,callback:"function"==typeof e?e:null}),i.saturated&&r.length===n&&i.saturated()}),a.setImmediate(i.process)},process:function o(){if(!e){if(0===r.length)return void(i.drain&&i.drain());var a="number"==typeof n?r.splice(0,n):r.splice(0),s=c(a,function(t){return t.data});i.empty&&i.empty(),e=!0,t(s,function(){e=!1;var t=arguments;u(a,function(n){n.callback&&n.callback.apply(null,t)}),o()})}},length:function(){return r.length},running:function(){return e}};return i};var k=function(t){return function(n){var e=Array.prototype.slice.call(arguments,1);n.apply(null,e.concat([function(n){var e=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(n?console.error&&console.error(n):console[t]&&u(e,function(n){console[t](n)}))}]))}};a.log=k("log"),a.dir=k("dir"),a.memoize=function(t,n){var e={},r={};n=n||function(t){return t};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),a=n.apply(null,i);a in e?o.apply(null,e[a]):a in r?r[a].push(o):(r[a]=[o],t.apply(null,i.concat([function(){e[a]=arguments;var t=r[a];delete r[a];for(var n=0,i=t.length;i>n;n++)t[n].apply(null,arguments)}])))};return i.memo=e,i.unmemoized=t,i},a.unmemoize=function(t){return function(){return(t.unmemoized||t).apply(null,arguments)}},a.times=function(t,n,e){for(var r=[],i=0;t>i;i++)r.push(i);return a.map(r,n,e)},a.timesSeries=function(t,n,e){for(var r=[],i=0;t>i;i++)r.push(i);return a.mapSeries(r,n,e)},a.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var n=this,e=Array.prototype.slice.call(arguments),r=e.pop();a.reduce(t,e,function(t,e,r){e.apply(n,t.concat([function(){var t=arguments[0],n=Array.prototype.slice.call(arguments,1);r(t,n)}]))},function(t,e){r.apply(n,[t].concat(e))})}};var A=function(t,n){var e=function(){var e=this,r=Array.prototype.slice.call(arguments),i=r.pop();return t(n,function(t,n){t.apply(e,r.concat([n]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return e.apply(this,r)}return e};a.applyEach=h(A),a.applyEachSeries=d(A),a.forever=function(t,n){function e(r){if(r){if(n)return n(r);throw r}t(e)}e()},"undefined"!=typeof t&&t.amd?t([],function(){return a}):"undefined"!=typeof e&&e.exports?e.exports=a:i.async=a}()}).call(this,n("FWaASH"))},{FWaASH:25}],14:[function(){},{}],15:[function(t,n,e){function r(t,n,e){if(!(this instanceof r))return new r(t,n,e);var i=typeof t;if("base64"===n&&"string"===i)for(t=L(t);t.length%4!==0;)t+="=";var o;if("number"===i)o=U(t);else if("string"===i)o=r.byteLength(t,n);else{if("object"!==i)throw new Error("First argument needs to be a number, array or string.");o=U(t.length)}var a;r._useTypedArrays?a=r._augment(new Uint8Array(o)):(a=this,a.length=o,a._isBuffer=!0);var u;if(r._useTypedArrays&&"number"==typeof t.byteLength)a._set(t);else if(F(t))for(u=0;o>u;u++)a[u]=r.isBuffer(t)?t.readUInt8(u):t[u];else if("string"===i)a.write(t,0,n);else if("number"===i&&!r._useTypedArrays&&!e)for(u=0;o>u;u++)a[u]=0;return a}function i(t,n,e,r){e=Number(e)||0;var i=t.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=n.length;P(o%2===0,"Invalid hex string"),r>o/2&&(r=o/2);for(var a=0;r>a;a++){var u=parseInt(n.substr(2*a,2),16);P(!isNaN(u),"Invalid hex string"),t[e+a]=u}return a}function o(t,n,e,r){var i=O(M(n),t,e,r);return i}function a(t,n,e,r){var i=O(C(n),t,e,r);return i}function u(t,n,e,r){return a(t,n,e,r)}function c(t,n,e,r){var i=O(D(n),t,e,r);return i}function s(t,n,e,r){var i=O(N(n),t,e,r);return i}function f(t,n,e){return z.fromByteArray(0===n&&e===t.length?t:t.slice(n,e))}function l(t,n,e){var r="",i="";e=Math.min(t.length,e);for(var o=n;e>o;o++)t[o]<=127?(r+=q(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return r+q(i)}function h(t,n,e){var r="";e=Math.min(t.length,e);for(var i=n;e>i;i++)r+=String.fromCharCode(t[i]);return r}function p(t,n,e){return h(t,n,e)}function d(t,n,e){var r=t.length;(!n||0>n)&&(n=0),(!e||0>e||e>r)&&(e=r);for(var i="",o=n;e>o;o++)i+=j(t[o]);return i}function g(t,n,e){for(var r=t.slice(n,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function y(t,n,e,r){r||(P("boolean"==typeof e,"missing or invalid endian"),P(void 0!==n&&null!==n,"missing offset"),P(n+1<t.length,"Trying to read beyond buffer length"));var i=t.length;if(!(n>=i)){var o;return e?(o=t[n],i>n+1&&(o|=t[n+1]<<8)):(o=t[n]<<8,i>n+1&&(o|=t[n+1])),o}}function v(t,n,e,r){r||(P("boolean"==typeof e,"missing or invalid endian"),P(void 0!==n&&null!==n,"missing offset"),P(n+3<t.length,"Trying to read beyond buffer length"));var i=t.length;if(!(n>=i)){var o;return e?(i>n+2&&(o=t[n+2]<<16),i>n+1&&(o|=t[n+1]<<8),o|=t[n],i>n+3&&(o+=t[n+3]<<24>>>0)):(i>n+1&&(o=t[n+1]<<16),i>n+2&&(o|=t[n+2]<<8),i>n+3&&(o|=t[n+3]),o+=t[n]<<24>>>0),o}}function m(t,n,e,r){r||(P("boolean"==typeof e,"missing or invalid endian"),P(void 0!==n&&null!==n,"missing offset"),P(n+1<t.length,"Trying to read beyond buffer length"));var i=t.length;if(!(n>=i)){var o=y(t,n,e,!0),a=32768&o;return a?-1*(65535-o+1):o}}function b(t,n,e,r){r||(P("boolean"==typeof e,"missing or invalid endian"),P(void 0!==n&&null!==n,"missing offset"),P(n+3<t.length,"Trying to read beyond buffer length"));var i=t.length;if(!(n>=i)){var o=v(t,n,e,!0),a=2147483648&o;return a?-1*(4294967295-o+1):o}}function w(t,n,e,r){return r||(P("boolean"==typeof e,"missing or invalid endian"),P(n+3<t.length,"Trying to read beyond buffer length")),J.read(t,n,e,23,4)}function E(t,n,e,r){return r||(P("boolean"==typeof e,"missing or invalid endian"),P(n+7<t.length,"Trying to read beyond buffer length")),J.read(t,n,e,52,8)}function k(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+1<t.length,"trying to write beyond buffer length"),H(n,65535));var o=t.length;if(!(e>=o)){for(var a=0,u=Math.min(o-e,2);u>a;a++)t[e+a]=(n&255<<8*(r?a:1-a))>>>8*(r?a:1-a);return e+2}}function A(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+3<t.length,"trying to write beyond buffer length"),H(n,4294967295));var o=t.length;if(!(e>=o)){for(var a=0,u=Math.min(o-e,4);u>a;a++)t[e+a]=n>>>8*(r?a:3-a)&255;return e+4}}function I(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+1<t.length,"Trying to write beyond buffer length"),W(n,32767,-32768));var o=t.length;if(!(e>=o))return n>=0?k(t,n,e,r,i):k(t,65535+n+1,e,r,i),e+2}function B(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+3<t.length,"Trying to write beyond buffer length"),W(n,2147483647,-2147483648));var o=t.length;if(!(e>=o))return n>=0?A(t,n,e,r,i):A(t,4294967295+n+1,e,r,i),e+4}function S(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+3<t.length,"Trying to write beyond buffer length"),R(n,3.4028234663852886e38,-3.4028234663852886e38));var o=t.length;if(!(e>=o))return J.write(t,n,e,r,23,4),e+4}function x(t,n,e,r,i){i||(P(void 0!==n&&null!==n,"missing value"),P("boolean"==typeof r,"missing or invalid endian"),P(void 0!==e&&null!==e,"missing offset"),P(e+7<t.length,"Trying to write beyond buffer length"),R(n,1.7976931348623157e308,-1.7976931348623157e308));var o=t.length;if(!(e>=o))return J.write(t,n,e,r,52,8),e+8}function L(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function _(t,n,e){return"number"!=typeof t?e:(t=~~t,t>=n?n:t>=0?t:(t+=n,t>=0?t:0))}function U(t){return t=~~Math.ceil(+t),0>t?0:t}function T(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function F(t){return T(t)||r.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function j(t){return 16>t?"0"+t.toString(16):t.toString(16)}function M(t){for(var n=[],e=0;e<t.length;e++){var r=t.charCodeAt(e);if(127>=r)n.push(r);else{var i=e;r>=55296&&57343>=r&&e++;for(var o=encodeURIComponent(t.slice(i,e+1)).substr(1).split("%"),a=0;a<o.length;a++)n.push(parseInt(o[a],16))}}return n}function C(t){for(var n=[],e=0;e<t.length;e++)n.push(255&t.charCodeAt(e));return n}function N(t){for(var n,e,r,i=[],o=0;o<t.length;o++)n=t.charCodeAt(o),e=n>>8,r=n%256,i.push(r),i.push(e);return i}function D(t){return z.toByteArray(t)}function O(t,n,e,r){for(var i=0;r>i&&!(i+e>=n.length||i>=t.length);i++)n[i+e]=t[i];return i}function q(t){try{return decodeURIComponent(t)}catch(n){return String.fromCharCode(65533)}}function H(t,n){P("number"==typeof t,"cannot write a non-number as a number"),P(t>=0,"specified a negative value for writing an unsigned value"),P(n>=t,"value is larger than maximum value for type"),P(Math.floor(t)===t,"value has a fractional component")}function W(t,n,e){P("number"==typeof t,"cannot write a non-number as a number"),P(n>=t,"value larger than maximum allowed value"),P(t>=e,"value smaller than minimum allowed value"),P(Math.floor(t)===t,"value has a fractional component")}function R(t,n,e){P("number"==typeof t,"cannot write a non-number as a number"),P(n>=t,"value larger than maximum allowed value"),P(t>=e,"value smaller than minimum allowed value")}function P(t,n){if(!t)throw new Error(n||"Failed assertion")}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var requirejs,require,define;!function(global){function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var n;for(n=0;n<e.length&&(!e[n]||!t(e[n],n,e));n+=1);}}function eachReverse(e,t){if(e){var n;for(n=e.length-1;n>-1&&(!e[n]||!t(e[n],n,e));n-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){(n||!hasProp(e,i))&&(r&&"string"!=typeof t?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t)}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function t(e){var t,n;for(t=0;e[t];t+=1)if(n=e[t],"."===n)e.splice(t,1),t-=1;else if(".."===n){if(1===t&&(".."===e[2]||".."===e[0]))break;t>0&&(e.splice(t-1,2),t-=2)}}function n(e,n,r){var i,o,a,u,c,s,l,f,p,d,h,m=n&&n.split("/"),g=m,v=q.map,y=v&&v["*"];if(e&&"."===e.charAt(0)&&(n?(g=getOwn(q.pkgs,n)?m=[n]:m.slice(0,m.length-1),e=g.concat(e.split("/")),t(e),o=getOwn(q.pkgs,i=e[0]),e=e.join("/"),o&&e===i+"/"+o.main&&(e=i)):0===e.indexOf("./")&&(e=e.substring(2))),r&&v&&(m||y)){for(u=e.split("/"),c=u.length;c>0;c-=1){if(l=u.slice(0,c).join("/"),m)for(s=m.length;s>0;s-=1)if(a=getOwn(v,m.slice(0,s).join("/")),a&&(a=getOwn(a,l))){f=a,p=c;break}if(f)break;!d&&y&&getOwn(y,l)&&(d=getOwn(y,l),h=c)}!f&&d&&(f=d,p=h),f&&(u.splice(0,p,f),e=u.join("/"))}return e}function r(e){isBrowser&&each(scripts(),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===x.contextName?(t.parentNode.removeChild(t),!0):void 0})}function i(e){var t=getOwn(q.paths,e);return t&&isArray(t)&&t.length>1?(r(e),t.shift(),x.require.undef(e),x.require([e]),!0):void 0}function o(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 a(e,t,r,i){var a,u,c,s,l=null,f=t?t.name:null,p=e,d=!0,h="";return e||(d=!1,e="_@r"+(j+=1)),s=o(e),l=s[0],e=s[1],l&&(l=n(l,f,i),u=getOwn(M,l)),e&&(l?h=u&&u.normalize?u.normalize(e,function(e){return n(e,f,i)}):n(e,f,i):(h=n(e,f,i),s=o(h),l=s[0],h=s[1],r=!0,a=x.nameToUrl(h))),c=!l||u||r?"":"_unnormalized"+(T+=1),{prefix:l,name:h,parentMap:t,unnormalized:!!c,url:a,originalName:p,isDefine:d,id:(l?l+"!"+h:h)+c}}function u(e){var t=e.id,n=getOwn(E,t);return n||(n=E[t]=new x.Module(e)),n}function c(e,t,n){var r=e.id,i=getOwn(E,r);!hasProp(M,r)||i&&!i.defineEmitComplete?u(e).on(t,n):"defined"===t&&n(M[r])}function s(e,t){var n=e.requireModules,r=!1;t?t(e):(each(n,function(t){var n=getOwn(E,t);n&&(n.error=e,n.events.error&&(r=!0,n.emit("error",e)))}),r||req.onError(e))}function l(){globalDefQueue.length&&(apsp.apply(O,[O.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function f(e){delete E[e],delete S[e]}function p(e,t,n){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,function(r,i){var o=r.id,a=getOwn(E,o);!a||e.depMatched[i]||n[o]||(getOwn(t,o)?(e.defineDep(i,M[o]),e.check()):p(a,t,n))}),n[r]=!0)}function d(){var e,t,n,o,a=1e3*q.waitSeconds,u=a&&x.startTime+a<(new Date).getTime(),c=[],l=[],f=!1,h=!0;if(!y){if(y=!0,eachProp(S,function(n){if(e=n.map,t=e.id,n.enabled&&(e.isDefine||l.push(n),!n.error))if(!n.inited&&u)i(t)?(o=!0,f=!0):(c.push(t),r(t));else if(!n.inited&&n.fetched&&e.isDefine&&(f=!0,!e.prefix))return h=!1}),u&&c.length)return n=makeError("timeout","Load timeout for modules: "+c,null,c),n.contextName=x.contextName,s(n);h&&each(l,function(e){p(e,{},{})}),u&&!o||!f||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,d()},50)),y=!1}}function h(e){hasProp(M,e[0])||u(a(e[0],null,!0)).init(e[1],e[2])}function m(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return m(t,x.onScriptLoad,"load","onreadystatechange"),m(t,x.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(l();O.length;){if(e=O.shift(),null===e[0])return s(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));h(e)}}var y,b,x,k,w,q={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},E={},S={},A={},O=[],M={},_={},j=1,T=1;return k={require:function(e){return e.require?e.require:e.require=x.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?e.exports:e.exports=M[e.map.id]={}:void 0},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return q.config&&getOwn(q.config,e.map.id)||{}},exports:M[e.map.id]}}},b=function(e){this.events=getOwn(A,e.id)||{},this.map=e,this.shim=getOwn(q.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(e,t,n,r){r=r||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,x.startTime=(new Date).getTime();var e=this.map;return this.shim?void x.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;_[e]||(_[e]=!0,x.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,r=this.depExports,i=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error)try{i=x.execCb(n,o,r,i)}catch(a){e=a}else i=x.execCb(n,o,r,i);if(this.map.isDefine&&(t=this.module,t&&void 0!==t.exports&&t.exports!==this.exports?i=t.exports:void 0===i&&this.usingExports&&(i=this.exports)),e)return e.requireMap=this.map,e.requireModules=[this.map.id],e.requireType="define",s(this.error=e)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(M[n]=i,req.onResourceLoad&&req.onResourceLoad(x,this.map,this.depMaps)),f(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=a(e.prefix);this.depMaps.push(r),c(r,"defined",bind(this,function(r){var i,o,l,p=this.map.name,d=this.map.parentMap?this.map.parentMap.name:null,h=x.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(p=r.normalize(p,function(e){return n(e,d,!0)})||""),o=a(e.prefix+"!"+p,this.map.parentMap),c(o,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),l=getOwn(E,o.id),void(l&&(this.depMaps.push(o),this.events.error&&l.on("error",bind(this,function(e){this.emit("error",e)})),l.enable()))):(i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),i.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(E,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&f(e.map.id)}),s(e)}),i.fromText=bind(this,function(n,r){var o=e.name,c=a(o),l=useInteractive;r&&(n=r),l&&(useInteractive=!1),u(c),hasProp(q.config,t)&&(q.config[o]=q.config[t]);try{req.exec(n)}catch(f){return s(makeError("fromtexteval","fromText eval for "+t+" failed: "+f,f,[t]))}l&&(useInteractive=!0),this.depMaps.push(c),x.completeLoad(o),h([o],i)}),void r.load(e.name,h,i,q))})),x.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){S[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,r,i;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,i=getOwn(k,e.id))return void(this.depExports[t]=i(this));this.depCount+=1,c(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&c(e,"error",this.errback)}n=e.id,r=E[n],hasProp(k,n)||!r||r.enabled||x.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(E,e.id);t&&!t.enabled&&x.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},x={config:q,contextName:e,registry:E,defined:M,urlFetched:_,defQueue:O,Module:b,makeModuleMap:a,nextTick:req.nextTick,onError:s,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=q.pkgs,n=q.shim,r={paths:!0,config:!0,map:!0};eachProp(e,function(e,t){r[t]?"map"===t?(q.map||(q.map={}),mixin(q[t],e,!0,!0)):mixin(q[t],e,!0):q[t]=e}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=x.makeShimExports(e)),n[t]=e}),q.shim=n),e.packages&&(each(e.packages,function(e){var n;e="string"==typeof e?{name:e}:e,n=e.location,t[e.name]={name:e.name,location:n||e.name,main:(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),q.pkgs=t),eachProp(E,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t))}),(e.deps||e.callback)&&x.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,r){function i(n,o,c){var l,f,p;return r.enableBuildCallback&&o&&isFunction(o)&&(o.__requireJsBuild=!0),"string"==typeof n?isFunction(o)?s(makeError("requireargs","Invalid require call"),c):t&&hasProp(k,n)?k[n](E[t.id]):req.get?req.get(x,n,t,i):(f=a(n,t,!1,!0),l=f.id,hasProp(M,l)?M[l]:s(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),x.nextTick(function(){v(),p=u(a(null,t)),p.skipMap=r.skipMap,p.init(n,o,c,{enabled:!0}),d()}),i)}return r=r||{},mixin(i,{isBrowser:isBrowser,toUrl:function(e){var r,i=e.lastIndexOf("."),o=e.split("/")[0],a="."===o||".."===o;return-1!==i&&(!a||i>1)&&(r=e.substring(i,e.length),e=e.substring(0,i)),x.nameToUrl(n(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(M,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(M,e)||hasProp(E,e)}}),t||(i.undef=function(e){l();var n=a(e,t,!0),r=getOwn(E,e);delete M[e],delete _[n.url],delete A[e],r&&(r.events.defined&&(A[e]=r.events),f(e))}),i},enable:function(e){var t=getOwn(E,e.id);t&&u(e).enable()},completeLoad:function(e){var t,n,r,o=getOwn(q.shim,e)||{},a=o.exports;for(l();O.length;){if(n=O.shift(),null===n[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);h(n)}if(r=getOwn(E,e),!t&&!hasProp(M,e)&&r&&!r.inited){if(!(!q.enforceDefine||a&&getGlobal(a)))return i(e)?void 0:s(makeError("nodefine","No define call for "+e,null,[e]));h([e,o.deps||[],o.exportsFn])}d()},nameToUrl:function(e,t,n){var r,i,o,a,u,c,s,l,f;if(req.jsExtRegExp.test(e))l=e+(t||"");else{for(r=q.paths,i=q.pkgs,u=e.split("/"),c=u.length;c>0;c-=1){if(s=u.slice(0,c).join("/"),o=getOwn(i,s),f=getOwn(r,s)){isArray(f)&&(f=f[0]),u.splice(0,c,f);break}if(o){a=e===o.name?o.location+"/"+o.main:o.location,u.splice(0,c,a);break}}l=u.join("/"),l+=t||(/\?/.test(l)||n?"":".js"),l=("/"===l.charAt(0)||l.match(/^[\w\+\.\-]+:/)?"":q.baseUrl)+l}return q.urlArgs?l+((-1===l.indexOf("?")?"?":"&")+q.urlArgs):l},load:function(e,t){req.load(x,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);x.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);return i(t.id)?void 0:s(makeError("scripterror","Script error",e,[t.id]))}},x.require=x.makeRequire(),x}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){return"interactive"===e.readyState?interactiveScript=e:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.5",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,n,r){var i,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(a=o.context),i=getOwn(contexts,a),i||(i=contexts[a]=req.s.newContext(a)),o&&i.configure(o),i.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(e){throw e},req.load=function(e,t,n){var r,i=e&&e.config||{};if(isBrowser)return r=i.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),r.type=i.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=n,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(n),e.completeLoad(t)}catch(o){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,o,[t]))}},isBrowser&&eachReverse(scripts(),function(e){return head||(head=e.parentNode),dataMain=e.getAttribute("data-main"),dataMain?(cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0):void 0}),define=function(e,t,n){var r,i;"string"!=typeof e&&(n=t,t=e,e=null),isArray(t)||(n=t,t=[]),!t.length&&isFunction(n)&&n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),function(){function e(e){var n=!1;return function(){if(n)throw new Error("Callback was already called.");n=!0,e.apply(t,arguments)}}var t,n,r={};t=this,null!=t&&(n=t.async),r.noConflict=function(){return t.async=n,r};var i=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n+=1)t(e[n],n,e)},o=function(e,t){if(e.map)return e.map(t);var n=[];return i(e,function(e,r,i){n.push(t(e,r,i))}),n},a=function(e,t,n){return e.reduce?e.reduce(t,n):(i(e,function(e,r,i){n=t(n,e,r,i)}),n)},u=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};r.nextTick="undefined"!=typeof process&&process.nextTick?process.nextTick:"function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){setTimeout(e,0)},r.each=function(t,n,r){if(r=r||function(){},!t.length)return r();var o=0;i(t,function(i){n(i,e(function(e){e?(r(e),r=function(){}):(o+=1,o>=t.length&&r(null))}))})},r.forEach=r.each,r.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var i=0,o=function(){var a=!0;t(e[i],function(t){t?(n(t),n=function(){}):(i+=1,i>=e.length?n(null):a?r.nextTick(o):o())}),a=!1};o()},r.forEachSeries=r.eachSeries,r.eachLimit=function(e,t,n,r){var i=c(t);i.apply(null,[e,n,r])},r.forEachLimit=r.eachLimit;var c=function(e){return function(t,n,r){if(r=r||function(){},!t.length||0>=e)return r();var i=0,o=0,a=0;!function u(){if(i>=t.length)return r();for(;e>a&&o<t.length;)o+=1,a+=1,n(t[o-1],function(e){e?(r(e),r=function(){}):(i+=1,a-=1,i>=t.length?r():u())})}()}},s=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.each].concat(t))}},l=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[c(e)].concat(n))}},f=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.eachSeries].concat(t))}},p=function(e,t,n,r){var i=[];t=o(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})};r.map=s(p),r.mapSeries=f(p),r.mapLimit=function(e,t,n,r){return d(t)(e,n,r)};var d=function(e){return l(e,p)};r.reduce=function(e,t,n,i){r.eachSeries(e,function(e,r){n(t,e,function(e,n){t=n,r(e)})},function(e){i(e,t)})},r.inject=r.reduce,r.foldl=r.reduce,r.reduceRight=function(e,t,n,i){var a=o(e,function(e){return e}).reverse();r.reduce(a,t,n,i)},r.foldr=r.reduceRight;var h=function(e,t,n,r){var i=[];t=o(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(){r(o(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.filter=s(h),r.filterSeries=f(h),r.select=r.filter,r.selectSeries=r.filterSeries;var m=function(e,t,n,r){var i=[];t=o(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(){r(o(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.reject=s(m),r.rejectSeries=f(m);var g=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(){r()})};r.detect=s(g),r.detectSeries=f(g),r.some=function(e,t,n){r.each(e,function(e,r){t(e,function(e){e&&(n(!0),n=function(){}),r()})},function(){n(!1)})},r.any=r.some,r.every=function(e,t,n){r.each(e,function(e,r){t(e,function(e){e||(n(!1),n=function(){}),r()})},function(){n(!0)})},r.all=r.every,r.sortBy=function(e,t,n){r.map(e,function(e,n){t(e,function(t,r){t?n(t):n(null,{value:e,criteria:r})})},function(e,t){if(e)return n(e);var r=function(e,t){var n=e.criteria,r=t.criteria;return r>n?-1:n>r?1:0};n(null,o(t.sort(r),function(e){return e.value}))})},r.auto=function(e,t){t=t||function(){};var n=u(e);if(!n.length)return t(null);var o={},c=[],s=function(e){c.unshift(e)},l=function(e){for(var t=0;t<c.length;t+=1)if(c[t]===e)return void c.splice(t,1)},f=function(){i(c.slice(0),function(e){e()})};s(function(){u(o).length===n.length&&(t(null,o),t=function(){})}),i(n,function(n){var c=e[n]instanceof Function?[e[n]]:e[n],p=function(e){var a=Array.prototype.slice.call(arguments,1);if(a.length<=1&&(a=a[0]),e){var c={};i(u(o),function(e){c[e]=o[e]}),c[n]=a,t(e,c),t=function(){}}else o[n]=a,r.nextTick(f)},d=c.slice(0,Math.abs(c.length-1))||[],h=function(){return a(d,function(e,t){return e&&o.hasOwnProperty(t)},!0)&&!o.hasOwnProperty(n)};if(h())c[c.length-1](p,o);else{var m=function(){h()&&(l(m),c[c.length-1](p,o))};s(m)}})},r.waterfall=function(e,t){if(t=t||function(){},e.constructor!==Array){var n=new Error("First argument to waterfall must be an array of functions");return t(n)}if(!e.length)return t();var i=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),a=e.next();o.push(a?i(a):t),r.nextTick(function(){e.apply(null,o)})}}};i(r.iterator(e))()};var v=function(e,t,n){if(n=n||function(){},t.constructor===Array)e.map(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.each(u(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}};r.parallel=function(e,t){v({map:r.map,each:r.each},e,t)},r.parallelLimit=function(e,t,n){v({map:d(t),each:c(t)},e,n)},r.series=function(e,t){if(t=t||function(){},e.constructor===Array)r.mapSeries(e,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},t);else{var n={};r.eachSeries(u(e),function(t,r){e[t](function(e){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),n[t]=i,r(e)})},function(e){t(e,n)})}},r.iterator=function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)},r.apply=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var y=function(e,t,n,r){var i=[];e(t,function(e,t){n(e,function(e,n){i=i.concat(n||[]),t(e)})},function(e){r(e,i)})};r.concat=s(y),r.concatSeries=f(y),r.whilst=function(e,t,n){if(e()){var i=!0;t(function(o){return o?n(o):void(i?r.nextTick(function(){r.whilst(e,t,n)}):r.whilst(e,t,n))}),i=!1}else n()},r.doWhilst=function(e,t,n){var i=!0;e(function(o){return o?n(o):void(t()?i?r.nextTick(function(){r.doWhilst(e,t,n)}):r.doWhilst(e,t,n):n())}),i=!1},r.until=function(e,t,n){if(e())n();else{var i=!0;t(function(o){return o?n(o):void(i?r.nextTick(function(){r.until(e,t,n)}):r.until(e,t,n))}),i=!1}},r.doUntil=function(e,t,n){var i=!0;e(function(o){return o?n(o):void(t()?n():i?r.nextTick(function(){r.doUntil(e,t,n)}):r.doUntil(e,t,n))}),i=!1},r.queue=function(t,n){function o(e,t,o,a){t.constructor!==Array&&(t=[t]),i(t,function(t){var i={data:t,callback:"function"==typeof a?a:null};o?e.tasks.unshift(i):e.tasks.push(i),e.saturated&&e.tasks.length===n&&e.saturated(),r.nextTick(e.process)})}void 0===n&&(n=1);var a=0,u={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(e,t){o(u,e,!1,t)},unshift:function(e,t){o(u,e,!0,t)},process:function(){if(a<u.concurrency&&u.tasks.length){var n=u.tasks.shift();u.empty&&0===u.tasks.length&&u.empty(),a+=1;var i=!0,o=function(){a-=1,n.callback&&n.callback.apply(n,arguments),u.drain&&u.tasks.length+a===0&&u.drain(),u.process()},c=e(function(){var e=arguments;i?r.nextTick(function(){o.apply(null,e)}):o.apply(null,arguments)});t(n.data,c),i=!1}},length:function(){return u.tasks.length},running:function(){return a}};return u},r.cargo=function(e,t){var n=!1,a=[],u={tasks:a,payload:t,saturated:null,empty:null,drain:null,push:function(e,n){e.constructor!==Array&&(e=[e]),i(e,function(e){a.push({data:e,callback:"function"==typeof n?n:null}),u.saturated&&a.length===t&&u.saturated()}),r.nextTick(u.process)},process:function c(){if(!n){if(0===a.length)return void(u.drain&&u.drain());var r="number"==typeof t?a.splice(0,t):a.splice(0),s=o(r,function(e){return e.data});u.empty&&u.empty(),n=!0,e(s,function(){n=!1;var e=arguments;i(r,function(t){t.callback&&t.callback.apply(null,e)}),c()})}},length:function(){return a.length},running:function(){return n}};return u};var b=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[e]&&i(n,function(t){console[e](t)}))}]))}};r.log=b("log"),r.dir=b("dir"),r.memoize=function(e,t){var n={},r={};t=t||function(e){return e};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),a=t.apply(null,i);a in n?o.apply(null,n[a]):a in r?r[a].push(o):(r[a]=[o],e.apply(null,i.concat([function(){n[a]=arguments;var e=r[a];delete r[a];for(var t=0,i=e.length;i>t;t++)e[t].apply(null,arguments)}])))};return i.memo=n,i.unmemoized=e,i},r.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},r.times=function(e,t,n){for(var i=[],o=0;e>o;o++)i.push(o);return r.map(i,t,n)},r.timesSeries=function(e,t,n){for(var i=[],o=0;e>o;o++)i.push(o);return r.mapSeries(i,t,n)},r.compose=function(){var e=Array.prototype.reverse.call(arguments);return function(){var t=this,n=Array.prototype.slice.call(arguments),i=n.pop();r.reduce(e,n,function(e,n,r){n.apply(t,e.concat([function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);r(e,t)}]))},function(e,n){i.apply(t,[e].concat(n))})}},r.applyEach=function(e){var t=function(){var t=this,n=Array.prototype.slice.call(arguments),i=n.pop();return r.each(e,function(e,r){e.apply(t,n.concat([r]))},i)};if(arguments.length>1){var n=Array.prototype.slice.call(arguments,1);return t.apply(this,n)}return t},"undefined"!=typeof define&&define.amd?define("async",function(){return r}):"undefined"!=typeof module&&module.exports?module.exports=r:t.async=r}(),define("./blob",["require","exports"],function(e,t){var n=t.Blob=function o(e,t){function n(e,t){Object.keys(t).forEach(function(n){e[n]=t[n]})}e="undefined"==typeof e?[]:Array.prototype.concat(e),t=t||{};var r=e.length?e.shift():"",i={},a=this;r instanceof o&&(n(i,r),r=r.result),e.forEach(function(e){e instanceof o?(n(i,e),r+=e.result):r+=e}),n(i,t),Object.keys(i).forEach(function(e){"result"!==e&&Object.defineProperty(a,e,{enumerable:!0,value:i[e]})}),Object.defineProperty(this,"result",{value:r})};n.prototype.toString=function(){return this.result};var r={server:function(t,i,o,a){var u=e("fs");a?r.serverSync(t,i,o):u.readFile(t,"bin"===i?void 0:i,function(e,r){e?o(e):o(null,new n(r,{name:t}))})},serverSync:function(t,r,i){var o,a=e("fs");try{o=a.readFileSync(t,"bin"===r?void 0:r),i(null,new n(o,{name:t}))}catch(u){i(u)}},client:function(e,t,r){e in localStorage?r(null,new n(localStorage[e],{name:e})):r("localStorage has no item "+e)}};n.readFile=n.prototype.readFile="undefined"==typeof module?r.client:r.server;var i={server:function(t,r,i,o){function a(e,t){c.writeFile(e,t.result,"bin"===i?void 0:i,function(r){o(r,new n(t,{name:e}))})}var u,c=e("fs"),s=e("path"),l=c.exists||s.exists,f=e("mkdirp").mkdirp,p=e("crypto"),d=s.resolve(s.dirname(t));t.indexOf("{checksum}")>-1&&(u=p.createHash("md5"),u.update(r.result),t=t.replace("{checksum}",u.digest("hex"))),l(d,function(e){e?a(t,r):f(d,"0755",function(e){e?o(e):a(t,r)})})},client:function(e,t,n,r){localStorage[e]=t.result,r(null,new t.constructor(t,{name:e}))}};n.writeFile=n.prototype.writeFile="undefined"==typeof module?i.client:i.server}),define("./tasks/concat",["require","exports"],function(e,t){t.concat=function(e,t,n,r){e=e||{},r(null,new n.constructor([t,e.callback?e.callback(n):n]))}}),define("./tasks/core",["require","exports","../blob"],function(e,t){function n(){return function(e,t){t(null,new r(e))}}var r=e("../blob").Blob;t.append=t.load=n();var i=t.prepend=n();i.type="prepend";var o=t.test=function(e,t,n){e=e||{},n(e.callback?e.callback(t):null)};o.type="each";var a=t.get=function(e,t,n){n(null,t.slice(e,e+1))};a.type="collect";var u=t.log=function(e,t,n){this._log(e),n(null,t)};u.type="collect";var c=t.inspect=function(e,t,n){var r=this;t.forEach(function(e,t){var n={result:e.result};Object.keys(e).forEach(function(t){n[t]=e[t]}),r._log("blob "+(t+1)+": "+JSON.stringify(n,null," "))}),n(null,t)};c.type="collect",t.noop=function(e,t,n){n(null,t)}}),define("./tasks/replace",["require","exports"],function(e,t){t.replace=function(e,t,n){var r=t.result;Array.isArray(e)||(e=[e]),e.forEach(function(e){var t=e.replace||"",n=void 0!==e.flags?e.flags:"mg",i="string"==typeof e.regex?new RegExp(e.regex,n):e.regex;r=r.replace(i,t)}),n(null,new t.constructor(r,t))}}),define("./tasks/stamp",["require","exports"],function(e,t){t.stamp=function(e,t,n){e=e||{},e.prefix=e.prefix||"",e.postfix=e.postfix||"";var r=e.callback?e.callback(t):t.result,i=e.prefix+r+e.postfix;n(null,new t.constructor(i,t))}}),define("./tasks/read",["require","exports","../blob"],function(e,t){function n(){return function(e,t){e="string"==typeof e?{name:e}:e;var n=e.encoding||"utf8";r.readFile(e.name,n,t,e.sync)}}var r=e("../blob").Blob;t.read=n();var i=t.readBefore=n();i.type="prepend"}),define("./tasks/write",["require","exports"],function(e,t){var n=t.write=function(e,t,n){e="string"==typeof e?{name:e}:e;var r=e.encoding||"utf8";t.writeFile(e.name,t,r,n)};n.type="slice"}),define("./tasks/tasks",["require","exports","async"],function(e,t){var n=e("async"),r=t.tasks=function(e,t,r){function i(e,n,r){return function(i,o){var a=r.length?[]:t;o=o||[],r.forEach(function(e){a=a.concat(o[e])}),l._dispatch(e,n,a,i)}}var o,a,u,c,s={},l=this;for(o in e)a=e[o].task,void 0===a?a=["noop"]:Array.isArray(a)||(a=[a]),u=e[o].requires,void 0===u?u=[]:Array.isArray(u)||(u=[u]),c=i(a[0],a[1],u),s[o]=u?u.concat(c):c;n.auto(s,function(e,t){return e?void r(e):void r(e,t&&t.join?t.join:[])})};r.type="collect"}),define("./registry",["require","exports","./tasks/concat","./default_tasks"],function(e,t){if("undefined"!=typeof module)var n=e("fs"),r=e("path"),i=n.existsSync||r.existsSync;else var o=e("./default_tasks");var a=t.Registry=function(e){var t=this;this._tasks={},"undefined"!=typeof __dirname?this.load({dirname:__dirname+"/tasks"}):"undefined"!=typeof o&&this.load({tasks:o}),e&&this.load(e),Object.defineProperty(this,"tasks",{get:function(){return Object.keys(t._tasks)}})};a.prototype={load:function(e){e=e||{};var t=e.module,n=e.dirname,r=e.filename,i=e.tasks;if(t&&!this._loadModule(t))throw new Error("Module "+t+" doesn't exist");if(n&&!this._loadDir(n))throw new Error("Directory "+n+" doesn't exist");if(r&&!this._loadFile(r))throw new Error("File "+r+" doesn't exist");if(i&&!this._loadTasks(i))throw new Error("Failed to load tasks");return this},_loadModule:function(t){if(e)try{return this._loadTasks(e(t))}catch(n){}return this._loadDir(r.resolve("node_modules",t,"lib"))},_loadDir:function(t){if(!i(t))return!1;var n=e("fs"),o=n.readdirSync(t),a=this;return o.forEach(function(e){var n=r.join(t,e);".js"===r.extname(n)&&a._loadFile(n)}),!0},_loadFile:function(t){return i(t)?this._loadTasks(e(t)):!1},_loadTasks:function(e){var t;for(t in e)this._tasks[t]=e[t];return!0},task:function(e){if(!(e in this._tasks))throw new Error("Task "+e+" doesn't exist");return this._tasks[e]}}}),define("./queue",["require","exports","async","./registry","./blob"],function(e,t){function n(e,t){for(var n=[],r=0;r<Math.min(e.length,t.length);r++)n.push([e[r],t[r]]);return n}function r(e){return"undefined"==typeof e?[]:Array.prototype.concat(e)}var i=e("async"),o=e("./registry").Registry,a=e("./blob").Blob,u=t.Queue=function(e){var t=this;e=e||{},this._logger=e.logger||console,this._registry="string"==typeof e.registry?new o({module:e.registry}):e.registry||new o,this._clear(),this._registry.tasks.forEach(function(e){t[e]=t.task.bind(t,e)
})};u.prototype._clear=function(){this._queue=[function(e){e(null,[])}]},u.prototype._log=function(e){this._logger.log(e)},u.prototype._dispatch=function(e,t,o,u){function c(t,n){t&&(t={task:e,error:t}),u(t,n)}var s=this._registry.task(e),l={2:"append",3:"map",4:"reduce"},f=s.type?s.type:l[s.length];switch(f){case"append":i.map(r(t),s.bind(this),function(e,t){c(e,o.concat(t))});break;case"prepend":i.map(r(t),s.bind(this),function(e,t){c(e,t.concat(o))});break;case"collect":s.call(this,t,o,c);break;case"slice":i.map(n(r(t),o),function(e,t){s.call(this,e[0],e[1],t)}.bind(this),c);break;case"each":i.forEach(o,s.bind(this,t),function(e){c(e,o)});break;case"map":i.map(o,s.bind(this,t),c);break;case"syncmap":i.mapSeries(o,s.bind(this,t),c);break;case"reduce":i.reduce(o,new a,s.bind(this,t),function(e,t){c(e,[t])});break;default:throw new Error('Task "'+e+'" has unknown type. Add a type property to the task function.')}},u.prototype.task=function(e,t){return this._queue.push(this._dispatch.bind(this,e,t)),this},u.prototype.run=function(e){var t=this;i.waterfall(this._queue,e||function(e){e&&t._log(e)})}}),define("../blob",["require","exports","blob"],function(e,t,n){t.Blob=n.Blob}),define("./default_tasks",["require","exports","./tasks/concat","./tasks/core","./tasks/replace","./tasks/stamp","./tasks/read","./tasks/write","./tasks/tasks"],function(e,t){var n=[];n.push(e("./tasks/concat")),n.push(e("./tasks/core")),n.push(e("./tasks/replace")),n.push(e("./tasks/stamp")),n.push(e("./tasks/read")),n.push(e("./tasks/write")),n.push(e("./tasks/tasks")),n.forEach(function(e){for(var n in e)t[n]=e[n]})}),define("gear",["require","exports","blob","registry","queue"],function(e,t,n,r,i){t.Blob=n.Blob,t.Registry=r.Registry,t.Queue=i.Queue});
var z=t("base64-js"),J=t("ieee754");e.Buffer=r,e.SlowBuffer=r,e.INSPECT_MAX_BYTES=50,r.poolSize=8192,r._useTypedArrays=function(){try{var t=new ArrayBuffer(0),n=new Uint8Array(t);return n.foo=function(){return 42},42===n.foo()&&"function"==typeof n.subarray}catch(e){return!1}}(),r.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},r.byteLength=function(t,n){var e;switch(t=t.toString(),n||"utf8"){case"hex":e=t.length/2;break;case"utf8":case"utf-8":e=M(t).length;break;case"ascii":case"binary":case"raw":e=t.length;break;case"base64":e=D(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=2*t.length;break;default:throw new Error("Unknown encoding")}return e},r.concat=function(t,n){if(P(T(t),"Usage: Buffer.concat(list[, length])"),0===t.length)return new r(0);if(1===t.length)return t[0];var e;if(void 0===n)for(n=0,e=0;e<t.length;e++)n+=t[e].length;var i=new r(n),o=0;for(e=0;e<t.length;e++){var a=t[e];a.copy(i,o),o+=a.length}return i},r.compare=function(t,n){P(r.isBuffer(t)&&r.isBuffer(n),"Arguments must be Buffers");for(var e=t.length,i=n.length,o=0,a=Math.min(e,i);a>o&&t[o]===n[o];o++);return o!==a&&(e=t[o],i=n[o]),i>e?-1:e>i?1:0},r.prototype.write=function(t,n,e,r){if(isFinite(n))isFinite(e)||(r=e,e=void 0);else{var f=r;r=n,n=e,e=f}n=Number(n)||0;var l=this.length-n;e?(e=Number(e),e>l&&(e=l)):e=l,r=String(r||"utf8").toLowerCase();var h;switch(r){case"hex":h=i(this,t,n,e);break;case"utf8":case"utf-8":h=o(this,t,n,e);break;case"ascii":h=a(this,t,n,e);break;case"binary":h=u(this,t,n,e);break;case"base64":h=c(this,t,n,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=s(this,t,n,e);break;default:throw new Error("Unknown encoding")}return h},r.prototype.toString=function(t,n,e){var r=this;if(t=String(t||"utf8").toLowerCase(),n=Number(n)||0,e=void 0===e?r.length:Number(e),e===n)return"";var i;switch(t){case"hex":i=d(r,n,e);break;case"utf8":case"utf-8":i=l(r,n,e);break;case"ascii":i=h(r,n,e);break;case"binary":i=p(r,n,e);break;case"base64":i=f(r,n,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=g(r,n,e);break;default:throw new Error("Unknown encoding")}return i},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.equals=function(t){return P(r.isBuffer(t),"Argument must be a Buffer"),0===r.compare(this,t)},r.prototype.compare=function(t){return P(r.isBuffer(t),"Argument must be a Buffer"),r.compare(this,t)},r.prototype.copy=function(t,n,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),n||(n=0),i!==e&&0!==t.length&&0!==o.length){P(i>=e,"sourceEnd < sourceStart"),P(n>=0&&n<t.length,"targetStart out of bounds"),P(e>=0&&e<o.length,"sourceStart out of bounds"),P(i>=0&&i<=o.length,"sourceEnd out of bounds"),i>this.length&&(i=this.length),t.length-n<i-e&&(i=t.length-n+e);var a=i-e;if(100>a||!r._useTypedArrays)for(var u=0;a>u;u++)t[u+n]=this[u+e];else t._set(this.subarray(e,e+a),n)}},r.prototype.slice=function(t,n){var e=this.length;if(t=_(t,e,0),n=_(n,e,e),r._useTypedArrays)return r._augment(this.subarray(t,n));for(var i=n-t,o=new r(i,void 0,!0),a=0;i>a;a++)o[a]=this[a+t];return o},r.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},r.prototype.set=function(t,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,n)},r.prototype.readUInt8=function(t,n){return n||(P(void 0!==t&&null!==t,"missing offset"),P(t<this.length,"Trying to read beyond buffer length")),t>=this.length?void 0:this[t]},r.prototype.readUInt16LE=function(t,n){return y(this,t,!0,n)},r.prototype.readUInt16BE=function(t,n){return y(this,t,!1,n)},r.prototype.readUInt32LE=function(t,n){return v(this,t,!0,n)},r.prototype.readUInt32BE=function(t,n){return v(this,t,!1,n)},r.prototype.readInt8=function(t,n){if(n||(P(void 0!==t&&null!==t,"missing offset"),P(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length)){var e=128&this[t];return e?-1*(255-this[t]+1):this[t]}},r.prototype.readInt16LE=function(t,n){return m(this,t,!0,n)},r.prototype.readInt16BE=function(t,n){return m(this,t,!1,n)},r.prototype.readInt32LE=function(t,n){return b(this,t,!0,n)},r.prototype.readInt32BE=function(t,n){return b(this,t,!1,n)},r.prototype.readFloatLE=function(t,n){return w(this,t,!0,n)},r.prototype.readFloatBE=function(t,n){return w(this,t,!1,n)},r.prototype.readDoubleLE=function(t,n){return E(this,t,!0,n)},r.prototype.readDoubleBE=function(t,n){return E(this,t,!1,n)},r.prototype.writeUInt8=function(t,n,e){return e||(P(void 0!==t&&null!==t,"missing value"),P(void 0!==n&&null!==n,"missing offset"),P(n<this.length,"trying to write beyond buffer length"),H(t,255)),n>=this.length?void 0:(this[n]=t,n+1)},r.prototype.writeUInt16LE=function(t,n,e){return k(this,t,n,!0,e)},r.prototype.writeUInt16BE=function(t,n,e){return k(this,t,n,!1,e)},r.prototype.writeUInt32LE=function(t,n,e){return A(this,t,n,!0,e)},r.prototype.writeUInt32BE=function(t,n,e){return A(this,t,n,!1,e)},r.prototype.writeInt8=function(t,n,e){return e||(P(void 0!==t&&null!==t,"missing value"),P(void 0!==n&&null!==n,"missing offset"),P(n<this.length,"Trying to write beyond buffer length"),W(t,127,-128)),n>=this.length?void 0:(t>=0?this.writeUInt8(t,n,e):this.writeUInt8(255+t+1,n,e),n+1)},r.prototype.writeInt16LE=function(t,n,e){return I(this,t,n,!0,e)},r.prototype.writeInt16BE=function(t,n,e){return I(this,t,n,!1,e)},r.prototype.writeInt32LE=function(t,n,e){return B(this,t,n,!0,e)},r.prototype.writeInt32BE=function(t,n,e){return B(this,t,n,!1,e)},r.prototype.writeFloatLE=function(t,n,e){return S(this,t,n,!0,e)},r.prototype.writeFloatBE=function(t,n,e){return S(this,t,n,!1,e)},r.prototype.writeDoubleLE=function(t,n,e){return x(this,t,n,!0,e)},r.prototype.writeDoubleBE=function(t,n,e){return x(this,t,n,!1,e)},r.prototype.fill=function(t,n,e){if(t||(t=0),n||(n=0),e||(e=this.length),P(e>=n,"end < start"),e!==n&&0!==this.length){P(n>=0&&n<this.length,"start out of bounds"),P(e>=0&&e<=this.length,"end out of bounds");var r;if("number"==typeof t)for(r=n;e>r;r++)this[r]=t;else{var i=M(t.toString()),o=i.length;for(r=n;e>r;r++)this[r]=i[r%o]}return this}},r.prototype.inspect=function(){for(var t=[],n=this.length,r=0;n>r;r++)if(t[r]=j(this[r]),r===e.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r._useTypedArrays)return new r(this).buffer;for(var t=new Uint8Array(this.length),n=0,e=t.length;e>n;n+=1)t[n]=this[n];return t.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Q=r.prototype;r._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=Q.get,t.set=Q.set,t.write=Q.write,t.toString=Q.toString,t.toLocaleString=Q.toString,t.toJSON=Q.toJSON,t.equals=Q.equals,t.compare=Q.compare,t.copy=Q.copy,t.slice=Q.slice,t.readUInt8=Q.readUInt8,t.readUInt16LE=Q.readUInt16LE,t.readUInt16BE=Q.readUInt16BE,t.readUInt32LE=Q.readUInt32LE,t.readUInt32BE=Q.readUInt32BE,t.readInt8=Q.readInt8,t.readInt16LE=Q.readInt16LE,t.readInt16BE=Q.readInt16BE,t.readInt32LE=Q.readInt32LE,t.readInt32BE=Q.readInt32BE,t.readFloatLE=Q.readFloatLE,t.readFloatBE=Q.readFloatBE,t.readDoubleLE=Q.readDoubleLE,t.readDoubleBE=Q.readDoubleBE,t.writeUInt8=Q.writeUInt8,t.writeUInt16LE=Q.writeUInt16LE,t.writeUInt16BE=Q.writeUInt16BE,t.writeUInt32LE=Q.writeUInt32LE,t.writeUInt32BE=Q.writeUInt32BE,t.writeInt8=Q.writeInt8,t.writeInt16LE=Q.writeInt16LE,t.writeInt16BE=Q.writeInt16BE,t.writeInt32LE=Q.writeInt32LE,t.writeInt32BE=Q.writeInt32BE,t.writeFloatLE=Q.writeFloatLE,t.writeFloatBE=Q.writeFloatBE,t.writeDoubleLE=Q.writeDoubleLE,t.writeDoubleBE=Q.writeDoubleBE,t.fill=Q.fill,t.inspect=Q.inspect,t.toArrayBuffer=Q.toArrayBuffer,t}},{"base64-js":16,ieee754:17}],16:[function(t,n){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(){"use strict";function t(t){var n=t.charCodeAt(0);return n===a?62:n===u?63:c>n?-1:c+10>n?n-c+26+26:f+26>n?n-f:s+26>n?n-s+26:void 0}function r(n){function e(t){s[l++]=t}var r,i,a,u,c,s;if(n.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=n.length;c="="===n.charAt(f-2)?2:"="===n.charAt(f-1)?1:0,s=new o(3*n.length/4-c),a=c>0?n.length-4:n.length;var l=0;for(r=0,i=0;a>r;r+=4,i+=3)u=t(n.charAt(r))<<18|t(n.charAt(r+1))<<12|t(n.charAt(r+2))<<6|t(n.charAt(r+3)),e((16711680&u)>>16),e((65280&u)>>8),e(255&u);return 2===c?(u=t(n.charAt(r))<<2|t(n.charAt(r+1))>>4,e(255&u)):1===c&&(u=t(n.charAt(r))<<10|t(n.charAt(r+1))<<4|t(n.charAt(r+2))>>2,e(u>>8&255),e(255&u)),s}function i(t){function n(t){return e.charAt(t)}function r(t){return n(t>>18&63)+n(t>>12&63)+n(t>>6&63)+n(63&t)}var i,o,a,u=t.length%3,c="";for(i=0,a=t.length-u;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(u){case 1:o=t[t.length-1],c+=n(o>>2),c+=n(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=n(o>>10),c+=n(o>>4&63),c+=n(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a=("0".charCodeAt(0),"+".charCodeAt(0)),u="/".charCodeAt(0),c="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0);n.exports.toByteArray=r,n.exports.fromByteArray=i}()},{}],17:[function(t,n,e){e.read=function(t,n,e,r,i){var o,a,u=8*i-r-1,c=(1<<u)-1,s=c>>1,f=-7,l=e?i-1:0,h=e?-1:1,p=t[n+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[n+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[n+l],l+=h,f-=8);if(0===o)o=1-s;else{if(o===c)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,r),o-=s}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,n,e,r,i,o){var a,u,c,s=8*o-i-1,f=(1<<s)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=0>n||0===n&&0>1/n?1:0;for(n=Math.abs(n),isNaN(n)||1/0===n?(u=isNaN(n)?1:0,a=f):(a=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-a))<1&&(a--,c*=2),n+=a+l>=1?h/c:h*Math.pow(2,1-l),n*c>=2&&(a++,c/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(n*c-1)*Math.pow(2,i),a+=l):(u=n*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[e+p]=255&a,p+=d,a/=256,s-=8);t[e+p-d]|=128*g}},{}],18:[function(t,n){function e(t,n){if(t.length%a!==0){var e=t.length+(a-t.length%a);t=o.concat([t,u],e)}for(var r=[],i=n?t.readInt32BE:t.readInt32LE,c=0;c<t.length;c+=a)r.push(i.call(t,c));return r}function r(t,n,e){for(var r=new o(n),i=e?r.writeInt32BE:r.writeInt32LE,a=0;a<t.length;a++)i.call(r,t[a],4*a,!0);return r}function i(t,n,i,a){o.isBuffer(t)||(t=new o(t));var u=n(e(t,a),t.length*c);return r(u,i,a)}var o=t("buffer").Buffer,a=4,u=new o(a);u.fill(0);var c=8;n.exports={hash:i}},{buffer:15}],19:[function(t,n,e){function r(t,n,e){u.isBuffer(n)||(n=new u(n)),u.isBuffer(e)||(e=new u(e)),n.length>p?n=t(n):n.length<p&&(n=u.concat([n,d],p));for(var r=new u(p),i=new u(p),o=0;p>o;o++)r[o]=54^n[o],i[o]=92^n[o];var a=t(u.concat([r,e]));return t(u.concat([i,a]))}function i(t,n){t=t||"sha1";var e=h[t],i=[],a=0;return e||o("algorithm:",t,"is not yet supported"),{update:function(t){return u.isBuffer(t)||(t=new u(t)),i.push(t),a+=t.length,this},digest:function(t){var o=u.concat(i),a=n?r(e,n,o):e(o);return i=null,t?a.toString(t):a}}}function o(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function a(t,n){for(var e in t)n(t[e],e)}var u=t("buffer").Buffer,c=t("./sha"),s=t("./sha256"),f=t("./rng"),l=t("./md5"),h={sha1:c,sha256:s,md5:l},p=64,d=new u(p);d.fill(0),e.createHash=function(t){return i(t)},e.createHmac=function(t,n){return i(t,n)},e.randomBytes=function(t,n){if(!n||!n.call)return new u(f(t));try{n.call(this,void 0,new u(f(t)))}catch(e){n(e)}},a(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(t){e[t]=function(){o("sorry,",t,"is not implemented yet")}})},{"./md5":20,"./rng":21,"./sha":22,"./sha256":23,buffer:15}],20:[function(t,n){function e(t,n){t[n>>5]|=128<<n%32,t[(n+64>>>9<<4)+14]=n;for(var e=1732584193,r=-271733879,s=-1732584194,f=271733878,l=0;l<t.length;l+=16){var h=e,p=r,d=s,g=f;e=i(e,r,s,f,t[l+0],7,-680876936),f=i(f,e,r,s,t[l+1],12,-389564586),s=i(s,f,e,r,t[l+2],17,606105819),r=i(r,s,f,e,t[l+3],22,-1044525330),e=i(e,r,s,f,t[l+4],7,-176418897),f=i(f,e,r,s,t[l+5],12,1200080426),s=i(s,f,e,r,t[l+6],17,-1473231341),r=i(r,s,f,e,t[l+7],22,-45705983),e=i(e,r,s,f,t[l+8],7,1770035416),f=i(f,e,r,s,t[l+9],12,-1958414417),s=i(s,f,e,r,t[l+10],17,-42063),r=i(r,s,f,e,t[l+11],22,-1990404162),e=i(e,r,s,f,t[l+12],7,1804603682),f=i(f,e,r,s,t[l+13],12,-40341101),s=i(s,f,e,r,t[l+14],17,-1502002290),r=i(r,s,f,e,t[l+15],22,1236535329),e=o(e,r,s,f,t[l+1],5,-165796510),f=o(f,e,r,s,t[l+6],9,-1069501632),s=o(s,f,e,r,t[l+11],14,643717713),r=o(r,s,f,e,t[l+0],20,-373897302),e=o(e,r,s,f,t[l+5],5,-701558691),f=o(f,e,r,s,t[l+10],9,38016083),s=o(s,f,e,r,t[l+15],14,-660478335),r=o(r,s,f,e,t[l+4],20,-405537848),e=o(e,r,s,f,t[l+9],5,568446438),f=o(f,e,r,s,t[l+14],9,-1019803690),s=o(s,f,e,r,t[l+3],14,-187363961),r=o(r,s,f,e,t[l+8],20,1163531501),e=o(e,r,s,f,t[l+13],5,-1444681467),f=o(f,e,r,s,t[l+2],9,-51403784),s=o(s,f,e,r,t[l+7],14,1735328473),r=o(r,s,f,e,t[l+12],20,-1926607734),e=a(e,r,s,f,t[l+5],4,-378558),f=a(f,e,r,s,t[l+8],11,-2022574463),s=a(s,f,e,r,t[l+11],16,1839030562),r=a(r,s,f,e,t[l+14],23,-35309556),e=a(e,r,s,f,t[l+1],4,-1530992060),f=a(f,e,r,s,t[l+4],11,1272893353),s=a(s,f,e,r,t[l+7],16,-155497632),r=a(r,s,f,e,t[l+10],23,-1094730640),e=a(e,r,s,f,t[l+13],4,681279174),f=a(f,e,r,s,t[l+0],11,-358537222),s=a(s,f,e,r,t[l+3],16,-722521979),r=a(r,s,f,e,t[l+6],23,76029189),e=a(e,r,s,f,t[l+9],4,-640364487),f=a(f,e,r,s,t[l+12],11,-421815835),s=a(s,f,e,r,t[l+15],16,530742520),r=a(r,s,f,e,t[l+2],23,-995338651),e=u(e,r,s,f,t[l+0],6,-198630844),f=u(f,e,r,s,t[l+7],10,1126891415),s=u(s,f,e,r,t[l+14],15,-1416354905),r=u(r,s,f,e,t[l+5],21,-57434055),e=u(e,r,s,f,t[l+12],6,1700485571),f=u(f,e,r,s,t[l+3],10,-1894986606),s=u(s,f,e,r,t[l+10],15,-1051523),r=u(r,s,f,e,t[l+1],21,-2054922799),e=u(e,r,s,f,t[l+8],6,1873313359),f=u(f,e,r,s,t[l+15],10,-30611744),s=u(s,f,e,r,t[l+6],15,-1560198380),r=u(r,s,f,e,t[l+13],21,1309151649),e=u(e,r,s,f,t[l+4],6,-145523070),f=u(f,e,r,s,t[l+11],10,-1120210379),s=u(s,f,e,r,t[l+2],15,718787259),r=u(r,s,f,e,t[l+9],21,-343485551),e=c(e,h),r=c(r,p),s=c(s,d),f=c(f,g)}return Array(e,r,s,f)}function r(t,n,e,r,i,o){return c(s(c(c(n,t),c(r,o)),i),e)}function i(t,n,e,i,o,a,u){return r(n&e|~n&i,t,n,o,a,u)}function o(t,n,e,i,o,a,u){return r(n&i|e&~i,t,n,o,a,u)}function a(t,n,e,i,o,a,u){return r(n^e^i,t,n,o,a,u)}function u(t,n,e,i,o,a,u){return r(e^(n|~i),t,n,o,a,u)}function c(t,n){var e=(65535&t)+(65535&n),r=(t>>16)+(n>>16)+(e>>16);return r<<16|65535&e}function s(t,n){return t<<n|t>>>32-n}var f=t("./helpers");n.exports=function(t){return f.hash(t,e,16)}},{"./helpers":18}],21:[function(t,n){!function(){var t,e,r=this;t=function(t){for(var n,n,e=new Array(t),r=0;t>r;r++)0==(3&r)&&(n=4294967296*Math.random()),e[r]=n>>>((3&r)<<3)&255;return e},r.crypto&&crypto.getRandomValues&&(e=function(t){var n=new Uint8Array(t);return crypto.getRandomValues(n),n}),n.exports=e||t}()},{}],22:[function(t,n){function e(t,n){t[n>>5]|=128<<24-n%32,t[(n+64>>9<<4)+15]=n;for(var e=Array(80),u=1732584193,c=-271733879,s=-1732584194,f=271733878,l=-1009589776,h=0;h<t.length;h+=16){for(var p=u,d=c,g=s,y=f,v=l,m=0;80>m;m++){e[m]=16>m?t[h+m]:a(e[m-3]^e[m-8]^e[m-14]^e[m-16],1);var b=o(o(a(u,5),r(m,c,s,f)),o(o(l,e[m]),i(m)));l=f,f=s,s=a(c,30),c=u,u=b}u=o(u,p),c=o(c,d),s=o(s,g),f=o(f,y),l=o(l,v)}return Array(u,c,s,f,l)}function r(t,n,e,r){return 20>t?n&e|~n&r:40>t?n^e^r:60>t?n&e|n&r|e&r:n^e^r}function i(t){return 20>t?1518500249:40>t?1859775393:60>t?-1894007588:-899497514}function o(t,n){var e=(65535&t)+(65535&n),r=(t>>16)+(n>>16)+(e>>16);return r<<16|65535&e}function a(t,n){return t<<n|t>>>32-n}var u=t("./helpers");n.exports=function(t){return u.hash(t,e,20,!0)}},{"./helpers":18}],23:[function(t,n){var e=t("./helpers"),r=function(t,n){var e=(65535&t)+(65535&n),r=(t>>16)+(n>>16)+(e>>16);return r<<16|65535&e},i=function(t,n){return t>>>n|t<<32-n},o=function(t,n){return t>>>n},a=function(t,n,e){return t&n^~t&e},u=function(t,n,e){return t&n^t&e^n&e},c=function(t){return i(t,2)^i(t,13)^i(t,22)},s=function(t){return i(t,6)^i(t,11)^i(t,25)},f=function(t){return i(t,7)^i(t,18)^o(t,3)},l=function(t){return i(t,17)^i(t,19)^o(t,10)},h=function(t,n){var e,i,o,h,p,d,g,y,v,m,b,w,E=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),k=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),A=new Array(64);t[n>>5]|=128<<24-n%32,t[(n+64>>9<<4)+15]=n;for(var v=0;v<t.length;v+=16){e=k[0],i=k[1],o=k[2],h=k[3],p=k[4],d=k[5],g=k[6],y=k[7];for(var m=0;64>m;m++)A[m]=16>m?t[m+v]:r(r(r(l(A[m-2]),A[m-7]),f(A[m-15])),A[m-16]),b=r(r(r(r(y,s(p)),a(p,d,g)),E[m]),A[m]),w=r(c(e),u(e,i,o)),y=g,g=d,d=p,p=r(h,b),h=o,o=i,i=e,e=r(b,w);k[0]=r(e,k[0]),k[1]=r(i,k[1]),k[2]=r(o,k[2]),k[3]=r(h,k[3]),k[4]=r(p,k[4]),k[5]=r(d,k[5]),k[6]=r(g,k[6]),k[7]=r(y,k[7])}return k};n.exports=function(t){return e.hash(t,h,32,!0)}},{"./helpers":18}],24:[function(t,n,e){(function(t){function n(t,n){for(var e=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e--;e)t.unshift("..");return t}function r(t,n){if(t.filter)return t.filter(n);for(var e=[],r=0;r<t.length;r++)n(t[r],r,t)&&e.push(t[r]);return e}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return i.exec(t).slice(1)};e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return e=n(r(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),o="/"===a(t,-1);return t=n(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var n=0;n<t.length&&""===t[n];n++);for(var e=t.length-1;e>=0&&""===t[e];e--);return n>e?[]:t.slice(n,e-n+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),u=a,c=0;a>c;c++)if(i[c]!==o[c]){u=c;break}for(var s=[],c=u;c<i.length;c++)s.push("..");return s=s.concat(o.slice(u)),s.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var n=o(t),e=n[0],r=n[1];return e||r?(r&&(r=r.substr(0,r.length-1)),e+r):"."},e.basename=function(t,n){var e=o(t)[2];return n&&e.substr(-1*n.length)===n&&(e=e.substr(0,e.length-n.length)),e},e.extname=function(t){return o(t)[3]};var a="b"==="ab".substr(-1)?function(t,n,e){return t.substr(n,e)}:function(t,n,e){return 0>n&&(n=t.length+n),t.substr(n,e)}}).call(this,t("FWaASH"))},{FWaASH:25}],25:[function(t,n){function e(){}var r=n.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(n){var e=[];return window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),e.length>0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=e,r.addListener=e,r.once=e,r.off=e,r.removeListener=e,r.removeAllListeners=e,r.emit=e,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],26:[function(t,n){(function(e){function r(t,n,a,u){("function"==typeof n||void 0===n)&&(a=n,n=511&~e.umask()),u||(u=null);var c=a||function(){};"string"==typeof n&&(n=parseInt(n,8)),t=i.resolve(t),o.mkdir(t,n,function(e){if(!e)return u=u||t,c(null,u);switch(e.code){case"ENOENT":r(i.dirname(t),n,function(e,i){e?c(e,i):r(t,n,c,i)});break;default:o.stat(t,function(t,n){t||!n.isDirectory()?c(e,u):c(null,u)})}})}var i=t("path"),o=t("fs");n.exports=r.mkdirp=r.mkdirP=r,r.sync=function a(t,n,r){void 0===n&&(n=511&~e.umask()),r||(r=null),"string"==typeof n&&(n=parseInt(n,8)),t=i.resolve(t);try{o.mkdirSync(t,n),r=r||t}catch(u){switch(u.code){case"ENOENT":r=a(i.dirname(t),n,r),a(t,n,r);break;default:var c;try{c=o.statSync(t)}catch(s){throw u}if(!c.isDirectory())throw u}}return r}}).call(this,t("FWaASH"))},{FWaASH:25,fs:14,path:24}]},{},[2])(2)});

@@ -105,3 +105,3 @@ /*

Blob.readFile = Blob.prototype.readFile = (typeof module === 'undefined') ? readFile.client : readFile.server;
Blob.readFile = Blob.prototype.readFile = process.browser ? readFile.client : readFile.server;

@@ -115,3 +115,3 @@ var writeFile = {

Crypto = require('crypto');
function writeFile(filename, b) {

@@ -154,2 +154,2 @@ fs.writeFile(filename, b.result, encoding === 'bin' ? undefined : encoding, function(err) {

Blob.writeFile = Blob.prototype.writeFile = (typeof module === 'undefined') ? writeFile.client : writeFile.server;
Blob.writeFile = Blob.prototype.writeFile = process.browser ? writeFile.client : writeFile.server;

@@ -6,10 +6,4 @@ /*

*/
if (typeof module !== 'undefined') {
var fs = require('fs'),
path = require('path'),
existsSync = fs.existsSync || path.existsSync;
}
else { // Client side default tasks
var default_tasks = require('./default_tasks');
}
var fs = require('fs'),
path = require('path');

@@ -24,7 +18,3 @@ /*

// Load default tasks
if (typeof __dirname !== 'undefined') {
this.load({dirname: __dirname + '/tasks'});
} else if (typeof default_tasks !== 'undefined') {
this.load({tasks: default_tasks});
}
this.load(process.browser ? {tasks: require('./tasks')} : {dirname: __dirname + '/tasks'});

@@ -75,3 +65,3 @@ if (options) {

}
return this;

@@ -91,6 +81,5 @@ },

_loadDir: function(dirname) {
if (!existsSync(dirname)) {return false;}
var fs = require('fs'),
files = fs.readdirSync(dirname),
if (!fs.existsSync(dirname)) {return false;}
var files = fs.readdirSync(dirname),
self = this;

@@ -108,3 +97,3 @@

_loadFile: function(filename) {
if (!existsSync(filename)) {return false;}
if (!fs.existsSync(filename)) {return false;}

@@ -111,0 +100,0 @@ return this._loadTasks(require(filename));

{
"name": "gear",
"version": "0.9.0",
"version": "0.9.1",
"description": "Gear.js - Build System for Node.js and the Browser",

@@ -12,16 +12,19 @@ "author": "Stephen Murphy <stephen@hypernaut.com>",

"bin": "./bin/gear.js",
"engines": {"node": ">=0.10.0"},
"scripts": {
"test": "mocha --require should"
"test": "mocha --require should"
},
"dependencies": {
"async": "0.2.x",
"mkdirp": "0.3.x"
"async": "0.2.x",
"mkdirp": "0.3.x",
"liftoff": "0.10.x"
},
"devDependencies": {
"should": "*",
"mocha": "*",
"mocha-istanbul": "*",
"istanbul": "*",
"gear-lib": ">= 0.9.x"
"browserify": "*",
"should": "*",
"mocha": "*",
"mocha-istanbul": "*",
"istanbul": "*",
"gear-lib": ">= 0.9.x"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc