UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

141 lines 31.8 kB
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={},n={0:1};return t.e=function(r,o){if(1===n[r])o.call(null,t);else if(n[r])n[r].push(o);else{n[r]=[o];var i=__dirname+"/"+r+".bundle.js";require("fs").readFile(i,"utf-8",function(r,o){if(r){if(t.onError)return t.onError(r);throw r}var s={};require("vm").runInThisContext("(function(exports, require, __dirname, __filename) {"+o+"\n})",i)(s,require,require("path").dirname(i),i);var a=s.modules,u=s.ids;for(var c in a)e[c]=a[c];for(var l=[],f=0;f<u.length;f++)Array.isArray(n[u[f]])&&(l=l.concat(n[u[f]])),n[u[f]]=1;for(f=0;f<l.length;f++)l[f].call(null,t)})}},t.m=e,t.c=r,t.p="",t(0)}([/*!**************************************!*\ !*** ./parsing/extract-amd/index.js ***! \**************************************/ function(e,t,r){var n,o,i,i,o,i,o,i,o,i,n,o,i,n,o,i,i,n,i,n,i,n,i,n,i,n,o,i,o,i,i,o,i,i,o,i,o,i,o,i,o,i,o,i,i;(function(e){var s=r(/*! should */13);it("should parse fancy function calls",function(){o=[r(/*! ./constructor */1)],i=function(e){return new e(1324)}.apply(t,o),!(void 0!==i&&(e.exports=i)),e.exports.should.have.property("value").be.eql(1324),o=[r(/*! ./constructor */1)],i=function(e){return new e(4231)}.apply(t,o),!(void 0!==i&&(e.exports=i)),e.exports.should.have.property("value").be.eql(4231)}),it("should parse fancy AMD calls",function(){!function(){var n=[r,e,t,r(/*! ./constructor */1),r(/*! ./a */2)];(function(e,t,n,o,i){"function".should.be.eql("function"),(typeof t).should.be.eql("object"),(typeof n).should.be.eql("object"),(typeof r(/*! ./constructor */1)).should.be.eql("function"),(typeof o).should.be.eql("function"),i.should.be.eql("a")}).apply(null,n)}(),o=[r,e,t,r(/*! ./constructor */1),r(/*! ./a */2)],i=function(e,t,n,o,i){"function".should.be.eql("function"),(typeof t).should.be.eql("object"),(typeof n).should.be.eql("object"),(typeof r(/*! ./constructor */1)).should.be.eql("function"),(typeof o).should.be.eql("function"),i.should.be.eql("a")}.apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should be able to use AMD-style require",function(e){var t="b";r.e(1,function(r){var n=[r(/*! ./circular */3),r(/*! ./templates */5)("./"+t),r(/*! ./circular */3)];(function(t,r,n){t.should.be.eql(1),n.should.be.eql(1),r.should.be.eql("b"),e()}).apply(null,n)})}),it("should be able to use require.js-style define",function(n){o=[r(/*! ./circular */3)],i=function(e){e.should.be.eql(1),n()}.apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, optional dependancies, not exist",function(n){o=[r(/*! ./optional */4)],i=function(e){s(e.b).not.exist,n()}.apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, special string",function(n){o=[r],i=function(){r(/*! ./circular */3).should.be.eql(1),n()}.apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, without name",function(n){!(o=[r(/*! ./circular */3)],i=function(e){e.should.be.eql(1),n()}.apply(t,o),void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, with empty dependencies",function(r){o=[],i=function(){r()}.apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, with empty dependencies, with a expression",function(r){function s(){r()}o=[],n=s,i="function"==typeof n?n.apply(t,o):n,!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, with empty dependencies, with a expression and name",function(r){o=[],n=r,i="function"==typeof n?n.apply(t,o):n,!(void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, without dependencies",function(n){!(i=function(){n()}.call(t,r,t,e),void 0!==i&&(e.exports=i))}),it("should be able to use require.js-style define, without dependencies, with a expression",function(o){function s(){o()}n=s,i="function"==typeof n?n.call(t,r,t,e):n,!(void 0!==i&&(e.exports=i))});var a={};it("should be able to use require.js-style define, with an object",function(){e.exports=null,!(n=a,i="function"==typeof n?n.call(t,r,t,e):n,void 0!==i&&(e.exports=i)),e.exports.should.be.equal(a),e.exports=null,n=a,i="function"==typeof n?n.call(t,r,t,e):n,!(void 0!==i&&(e.exports=i)),e.exports.should.be.equal(a),e.exports=null}),it("should offer AMD-style define for CommonJs",function(n){var o=t,s=e;i=function(e,t,i){"function".should.be.eql("function"),t.should.be.equal(o),i.should.be.equal(s),r(/*! ./circular */3).should.be.eql(1),n()}.call(t,r,t,e),!(void 0!==i&&(e.exports=i))}),it("should not crash on require.js require only with array",function(){}),it("should be able to use AMD require without function expression (empty array)",function(e){function t(){e()}!function(){var e=[];t.apply(null,e)}()}),it("should be able to use AMD require without function expression",function(e){function t(t){t.should.be.eql(1),e()}!function(){var e=[r(/*! ./circular */3)];t.apply(null,e)}()}),it("should create a chunk for require.js require",function(e){var t=!0;r.e(2,function(r){var n=[r(/*! ./c */6)];(function(n){t.should.be.eql(!1),n.should.be.eql("c"),r(/*! ./d */7).should.be.eql("d"),e()}).apply(null,n)}),t=!1}),it("should not fail #138",function(r){!function(r){o=[],n=r,i="function"==typeof n?n.apply(t,o):n,!(void 0!==i&&(e.exports=i))}(function(){r()})}),it("should parse a bound function expression 1",function(n){i=function(e){e.should.be.eql(123),"function".should.be.eql("function"),r(/*! ./a */2).should.be.eql("a"),n()}.bind(null,123).call(t,r,t,e),!(void 0!==i&&(e.exports=i))}),it("should parse a bound function expression 2",function(n){i=function(e){e.should.be.eql(123),"function".should.be.eql("function"),r(/*! ./a */2).should.be.eql("a"),n()}.bind(null,123).call(t,r,t,e),!(void 0!==i&&(e.exports=i))}),it("should parse a bound function expression 3",function(n){o=[r(/*! ./a */2)],i=function(e,t){e.should.be.eql(123),t.should.be.eql("a"),n()}.bind(null,123).apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should parse a bound function expression 4",function(n){o=[r(/*! ./a */2)],i=function(e,t){e.should.be.eql(123),t.should.be.eql("a"),n()}.bind(null,123).apply(t,o),!(void 0!==i&&(e.exports=i))}),it("should not fail issue #138 second",function(){!function(){"use strict";i=function(){/*! ./a */ return"function".should.be.eql("function"),r(2).should.be.eql("a"),"#138 2."}.call(t,r,t,e),!(void 0!==i&&(e.exports=i))}(r(/*! !webpack amd define */8),this),e.exports.should.be.eql("#138 2.")}),it("should parse an define with empty array and object",function(){var r={ok:95476};o=[],n=r,i="function"==typeof n?n.apply(t,o):n,!(void 0!==i&&(e.exports=i)),e.exports.should.be.eql(r)}),it("should parse an define with object",function(){var o={ok:76243};n=o,i="function"==typeof n?n.call(t,r,t,e):n,!(void 0!==i&&(e.exports=i)),e.exports.should.be.eql(o)})}).call(t,r(/*! (webpack)/buildin/module.js */9)(e))},/*!********************************************!*\ !*** ./parsing/extract-amd/constructor.js ***! \********************************************/ function(e){e.exports=function(e){this.value=e}},/*!**********************************!*\ !*** ./parsing/extract-amd/a.js ***! \**********************************/ function(e){e.exports="a"},/*!*****************************************!*\ !*** ./parsing/extract-amd/circular.js ***! \*****************************************/ function(e,t,r){e.exports=1,e.exports=r(/*! ./circular */3)},/*!*****************************************!*\ !*** ./parsing/extract-amd/optional.js ***! \*****************************************/ function(e,t,r){e.exports=2;try{e.exports.a=r(/*! ./a */2)}catch(n){}try{e.exports.b=r(!function(){var e=new Error('Cannot find module "./b"');throw e.code="MODULE_NOT_FOUND",e}())}catch(n){}},,,,/*!***************************************!*\ !*** (webpack)/buildin/amd-define.js ***! \***************************************/ function(e){e.exports=function(){throw new Error("define cannot be used indirect")}},/*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},,,,/*!****************************************!*\ !*** (webpack)/~/should/lib/should.js ***! \****************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ./util */14),o=n.AssertionError,i=n.inspect,s=function(e){return new a(n.isWrapperType(e)?e.valueOf():e)},a=s.Assertion=function(e){this.obj=e};a.add=function(e,t,r){var n={enumerable:!0};n[r?"get":"value"]=function(){var e=new a(this.obj);e.copy=e.copyIfMissing,e.anyOne=this.anyOne;try{t.apply(e,arguments)}catch(r){if(this.copy(e),r instanceof s.AssertionError){if(this.negate)return this.obj=e.obj,this.negate=!1,this;this.assert(!1)}throw r}return this.copy(e),this.negate&&this.assert(!1),this.obj=e.obj,this.negate=!1,this},Object.defineProperty(a.prototype,e,n)},a.alias=function(e,t){var r=Object.getOwnPropertyDescriptor(a.prototype,e);if(!r)throw new Error("Alias "+e+" -> "+t+" could not be created as "+e+" not defined");Object.defineProperty(a.prototype,t,r)},s.AssertionError=o,s.format=function(e){return n.isDate(e)&&"function"!=typeof e.inspect?e.toISOString():i(e,{depth:null})},s.use=function(e){return e(this,a),this},t=e.exports=s,Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return s(this)},configurable:!0}),a.prototype={constructor:a,assert:function(e){if(e)return this;var t=this.params,r=t.message,n=!1;r||(r=this.getMessage(),n=!0);var i=new o({message:r,actual:this.obj,expected:t.expected,stackStartFunction:this.assert});throw i.showDiff=t.showDiff,i.operator=t.operator,i.generatedMessage=n,i},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:s.format(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+s.format(this.params.expected):"")},copy:function(e){this.params=e.params},copyIfMissing:function(e){this.params||(this.params=e.params)},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},s.use(r(/*! ./ext/assert */15)).use(r(/*! ./ext/chain */16)).use(r(/*! ./ext/bool */17)).use(r(/*! ./ext/number */18)).use(r(/*! ./ext/eql */19)).use(r(/*! ./ext/type */20)).use(r(/*! ./ext/string */21)).use(r(/*! ./ext/property */22)).use(r(/*! ./ext/error */23)).use(r(/*! ./ext/match */24)).use(r(/*! ./ext/contain */25))},/*!**************************************!*\ !*** (webpack)/~/should/lib/util.js ***! \**************************************/ function(e,t,r){function n(e){return l(e)&&(e.__ArrayLike||Array.isArray(e))}function o(e){return"number"==typeof e||e instanceof Number}function i(e){return"string"==typeof e||e instanceof String}function s(e){return"boolean"==typeof e||e instanceof Boolean}function a(e){return"undefined"!=typeof Buffer&&e instanceof Buffer}function u(e){return l(e)&&"[object Date]"===c(e)}function c(e){return Object.prototype.toString.call(e)}function l(e){return"object"==typeof e&&null!==e}function f(e){return l(e)&&"[object RegExp]"===c(e)}function p(e){return null==e}function h(e){return null===e}function d(e){return"[object Arguments]"===c(e)}function b(e){return l(e)&&"[object Error]"===c(e)||e instanceof Error}function m(e){return void 0===e}/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ t.isWrapperType=function(e){return o(e)||i(e)||s(e)},t.merge=function(e,t){if(e&&t)for(var r in t)e[r]=t[r];return e},t.isArray=n,t.isNumber=o,t.isBoolean=s,t.isString=i,t.isBuffer=a,t.isDate=u,t.isObject=l,t.isRegExp=f,t.isNullOrUndefined=p,t.isNull=h,t.isArguments=d,t.isFunction=function(e){return"function"==typeof e||e instanceof Function},t.isError=b,t.isUndefined=m,t.inspect=r(/*! ./inspect */27).inspect,t.AssertionError=r(/*! assert */26).AssertionError;var y=Object.prototype.hasOwnProperty;t.forOwn=function(e,t,r){for(var n in e)y.call(e,n)&&t.call(r,e[n],n)};var g=/^\s*function\s*(\S*)\s*\(/;t.functionName=function(e){if(e.name)return e.name;var t=e.toString().match(g)[1];return t},t.formatProp=function(e){return e=JSON.stringify(""+e),e=e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?e.substr(1,e.length-2):e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\")}},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/assert.js ***! \********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14),o=r(/*! assert */26),i=o.AssertionError;e.exports=function(e){var t=e.format;n.merge(e,o),e.exist=e.exists=function(r,n){if(null==r)throw new i({message:n||"expected "+t(r)+" to exist",stackStartFunction:e.exist})},e.not={},e.not.exist=e.not.exists=function(r,n){if(null!=r)throw new i({message:n||"expected "+t(r)+" to not exist",stackStartFunction:e.not.exist})}}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/chain.js ***! \*******************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){function r(e){Object.defineProperty(t.prototype,e,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},/*!******************************************!*\ !*** (webpack)/~/should/lib/ext/bool.js ***! \******************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("true",function(){this.is.exactly(!0)},!0),t.alias("true","True"),t.add("false",function(){this.is.exactly(!1)},!0),t.alias("false","False"),t.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)},!0)}},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/number.js ***! \********************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),t.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),t.add("within",function(e,t,r){this.params={operator:"to be within "+e+".."+t,message:r},this.assert(this.obj>=e&&this.obj<=t)}),t.add("approximately",function(e,t,r){this.params={operator:"to be approximately "+e+" ±"+t,message:r},this.assert(Math.abs(this.obj-e)<=t)}),t.add("above",function(e,t){this.params={operator:"to be above "+e,message:t},this.assert(this.obj>e)}),t.add("below",function(e,t){this.params={operator:"to be below "+e,message:t},this.assert(this.obj<e)}),t.alias("above","greaterThan"),t.alias("below","lessThan")}},/*!*****************************************!*\ !*** (webpack)/~/should/lib/ext/eql.js ***! \*****************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../eql */28);e.exports=function(e,t){t.add("eql",function(e,t){this.params={operator:"to equal",expected:e,showDiff:!0,message:t},this.assert(n(e,this.obj))}),t.add("equal",function(e,t){this.params={operator:"to be",expected:e,showDiff:!0,message:t},this.assert(e===this.obj)}),t.alias("equal","exactly")}},/*!******************************************!*\ !*** (webpack)/~/should/lib/ext/type.js ***! \******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14);e.exports=function(e,t){t.add("Number",function(){this.params={operator:"to be a number"},this.assert(n.isNumber(this.obj))},!0),t.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(n.isArguments(this.obj))},!0),t.add("type",function(e,t){this.params={operator:"to have type "+e,message:t},(typeof this.obj).should.be.exactly(e,t)}),t.add("instanceof",function(e,t){this.params={operator:"to be an instance of "+n.functionName(e),message:t},this.assert(Object(this.obj)instanceof e)}),t.add("Function",function(){this.params={operator:"to be a function"},this.assert(n.isFunction(this.obj))},!0),t.add("Object",function(){this.params={operator:"to be an object"},this.assert(n.isObject(this.obj))},!0),t.add("String",function(){this.params={operator:"to be a string"},this.assert(n.isString(this.obj))},!0),t.add("Array",function(){this.params={operator:"to be an array"},this.assert(n.isArray(this.obj))},!0),t.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(n.isBoolean(this.obj))},!0),t.add("Error",function(){this.params={operator:"to be an error"},this.assert(n.isError(this.obj))},!0),t.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),t.alias("null","Null"),t.alias("instanceof","instanceOf")}},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/string.js ***! \********************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("startWith",function(t,r){this.params={operator:"to start with "+e.format(t),message:r},this.assert(0===this.obj.indexOf(t))}),t.add("endWith",function(t,r){this.params={operator:"to end with "+e.format(t),message:r},this.assert(this.obj.indexOf(t,this.obj.length-t.length)>=0)})}},/*!**********************************************!*\ !*** (webpack)/~/should/lib/ext/property.js ***! \**********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14),o=r(/*! ../eql */28),i=Array.prototype.slice;e.exports=function(e,t){var r=e.format;t.add("enumerable",function(e,t){e=String(e),this.params={operator:"to have enumerable property "+n.formatProp(e)},this.assert(this.obj.propertyIsEnumerable(e)),arguments.length>1&&(this.params.operator+=" equal to "+r(t),this.assert(o(t,this.obj[e])))}),t.add("property",function(e,t){if(e=String(e),arguments.length>1){var r={};r[e]=t,this.have.properties(r)}else this.have.properties(e);this.obj=this.obj[e]}),t.add("properties",function(e){var t={};arguments.length>1?e=i.call(arguments):n.isArray(e)||(n.isString(e)?e=[e]:(t=e,e=Object.keys(e)));var s=Object(this.obj),a=[];e.forEach(function(e){e in s||a.push(n.formatProp(e))});var u=a;0===u.length?u=e.map(n.formatProp):this.anyOne&&(u=e.filter(function(e){return a.indexOf(n.formatProp(e))<0}).map(n.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={operator:c},this.assert(0===a.length||this.anyOne&&a.length!=e.length);var l=Object.keys(t);if(l.length){var f=[];u=[],l.forEach(function(e){var i=t[e];o(s[e],i)?u.push(n.formatProp(e)+" of "+r(i)):f.push(n.formatProp(e)+" of "+r(i)+" (got "+r(s[e])+")")}),(0!==f.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=f),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={operator:c},this.assert(0===f.length||this.anyOne&&f.length!=l.length)}}),t.add("length",function(e,t){this.have.property("length",e,t)}),t.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;t.add("ownProperty",function(e,t){e=String(e),this.params={operator:"to have own property "+n.formatProp(e),message:t},this.assert(s.call(this.obj,e)),this.obj=this.obj[e]}),t.alias("ownProperty","hasOwnProperty"),t.add("empty",function(){if(this.params={operator:"to be empty"},n.isString(this.obj)||n.isArray(this.obj)||n.isArguments(this.obj))this.have.property("length",0);else{var e=Object(this.obj);for(var t in e)this.have.not.ownProperty(t)}},!0),t.add("keys",function(e){arguments.length>1?e=i.call(arguments):1===arguments.length&&n.isString(e)?e=[e]:0===arguments.length&&(e=[]),e=e.map(String);var t=Object(this.obj),r=[];e.forEach(function(e){s.call(this.obj,e)||r.push(n.formatProp(e))},this);var o=[];Object.keys(t).forEach(function(t){e.indexOf(t)<0&&o.push(n.formatProp(t))});var a=0===e.length?"to be empty":"to have "+(1===e.length?"key ":"keys ");this.params={operator:a+e.map(n.formatProp).join(", ")},r.length>0&&(this.params.operator+="\n missing keys: "+r.join(", ")),o.length>0&&(this.params.operator+="\n extra keys: "+o.join(", ")),this.assert(0===r.length&&0===o.length)}),t.alias("keys","key"),t.add("propertyByPath",function(t){arguments.length>1?t=i.call(arguments):1===arguments.length&&n.isString(t)?t=[t]:0===arguments.length&&(t=[]);var r=t.map(n.formatProp);t=t.map(String);for(var o,s=e(Object(this.obj)),a=[];o=t.shift();)this.params={operator:"to have property by path "+r.join(", ")+" - failed on "+n.formatProp(o)},s=s.have.property(o),a.push(o);this.params={operator:"to have property by path "+r.join(", ")},this.obj=s.obj})}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/error.js ***! \*******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14);e.exports=function(e,t){var r=e.format;t.add("throw",function(t,o){var i=this.obj,s={},a="",u=!1,c=!0;try{i()}catch(l){u=!0,s=l}if(u)if(t){if("string"==typeof t)c=t==s.message;else if(t instanceof RegExp)c=t.test(s.message);else if("function"==typeof t)c=s instanceof t;else if(n.isObject(t))try{s.should.match(t)}catch(l){if(!(l instanceof e.AssertionError))throw l;a=": "+l.message,c=!1}if(c){if("function"==typeof t&&o)try{s.should.match(o)}catch(l){if(!(l instanceof e.AssertionError))throw l;a=": "+l.message,c=!1}}else"string"==typeof t||t instanceof RegExp?a=" with a message matching "+r(t)+", but got '"+s.message+"'":"function"==typeof t&&(a=" of type "+n.functionName(t)+", but got "+n.functionName(s.constructor))}else a=" (got "+r(s)+")";this.params={operator:"to throw exception"+a},this.assert(u),this.assert(c)}),t.alias("throw","throwError")}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/match.js ***! \*******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14),o=r(/*! ../eql */28);e.exports=function(e,t){var r=e.format;t.add("match",function(i,s){if(this.params={operator:"to match "+r(i),message:s},!o(this.obj,i))if(n.isRegExp(i)){if(n.isString(this.obj))this.assert(i.exec(this.obj));else if(n.isArray(this.obj))this.obj.forEach(function(e){this.assert(i.exec(e))},this);else if(n.isObject(this.obj)){var a=[],u=[];n.forOwn(this.obj,function(e,t){i.exec(e)?u.push(n.formatProp(t)):a.push(n.formatProp(t)+" ("+r(e)+")")},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)}}else if(n.isFunction(i)){var c;try{c=i(this.obj)}catch(l){throw l instanceof e.AssertionError&&(this.params.operator+="\n "+l.message),l}c instanceof t&&(this.params.operator+="\n "+c.getMessage()),n.isBoolean(c)&&this.assert(c)}else n.isObject(i)?(a=[],u=[],n.forOwn(i,function(t,o){try{e(this.obj[o]).match(t),u.push(n.formatProp(o))}catch(i){if(!(i instanceof e.AssertionError))throw i;a.push(n.formatProp(o)+" ("+r(this.obj[o])+")")}},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)):this.assert(!1)}),t.add("matchEach",function(e,t){this.params={operator:"to match each "+r(e),message:t};var i=e;n.isRegExp(e)?i=function(t){return!!e.exec(t)}:n.isFunction(e)||(i=function(t){return o(t,e)}),n.forOwn(this.obj,function(e,t){var r=i(e,t);n.isBoolean(r)&&this.assert(r)},this)})}},/*!*********************************************!*\ !*** (webpack)/~/should/lib/ext/contain.js ***! \*********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */14),o=r(/*! ../eql */28);e.exports=function(e,t){var r=e.format;t.add("containEql",function(e){this.params={operator:"to contain "+r(e)};var t=this.obj;n.isArray(t)?this.assert(t.some(function(t){return o(t,e)})):n.isString(t)?this.assert(t.indexOf(String(e))>=0):n.isObject(t)?n.forOwn(e,function(e,r){t.should.have.property(r,e)}):this.assert(!1)}),t.add("containDeepOrdered",function(t){this.params={operator:"to contain "+r(t)};var o=this.obj;if(n.isArray(o))if(n.isArray(t)){var i=0;o.forEach(function(r){try{e(r).not.be.Null.and.containDeep(t[i]),i++}catch(n){if(n instanceof e.AssertionError)return;throw n}},this),this.assert(i==t.length)}else this.assert(!1);else n.isString(o)?this.assert(o.indexOf(String(t))>=0):n.isObject(o)?n.isObject(t)?n.forOwn(t,function(t,r){e(o[r]).not.be.Null.and.containDeep(t)}):this.assert(!1):this.eql(t)}),t.add("containDeep",function(t){this.params={operator:"to contain "+r(t)};var o=this.obj;if(n.isArray(o))if(n.isArray(t)){var i={};t.forEach(function(t){this.assert(o.some(function(r,n){if(n in i)return!1;try{return e(r).not.be.Null.and.containDeep(t),i[n]=!0,!0}catch(o){if(o instanceof e.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else n.isString(o)?this.assert(o.indexOf(String(t))>=0):n.isObject(o)?n.isObject(t)?n.forOwn(t,function(t,r){e(o[r]).not.be.Null.and.containDeep(t)}):this.assert(!1):this.eql(t)})}},/*!*************************!*\ !*** external "assert" ***! \*************************/ function(e){e.exports=require("assert")},/*!*****************************************!*\ !*** (webpack)/~/should/lib/inspect.js ***! \*****************************************/ function(e,t,r){function n(e,r){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),a(n,e,n.depth)}function o(e,t){var r=n.styles[t];return r?"["+n.colors[r][0]+"m"+e+"["+n.colors[r][1]+"m":e}function i(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function a(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=a(e,o,n)),o}var i=u(e,r);if(i)return i;var d=Object.keys(r),b=s(d);e.showHidden&&(d=Object.getOwnPropertyNames(r));var y,g=r;try{O(r)||(g=r.valueOf())}catch(w){}if(v(g)&&(d=d.filter(function(e){return!(e>=0&&e<g.length)})),k(r))return l(r);if(0===d.length){if(x(r)){var A=r.name?": "+r.name:"";return e.stylize("[Function"+A+"]","special")}if(q(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(O(r))return e.stylize(Date.prototype.toString.call(r),"date");if(v(g))return y=c(e,g),e.stylize("[String: "+y+"]","string");if(j(g))return y=c(e,g),e.stylize("[Number: "+y+"]","number");if(m(g))return y=c(e,g),e.stylize("[Boolean: "+y+"]","boolean")}var S="",N=!1,P=["{","}"];if(E(r)&&(N=!0,P=["[","]"]),x(r)){var _=r.name?": "+r.name:"";S=" [Function"+_+"]"}if(q(r)&&(S=" "+RegExp.prototype.toString.call(r)),O(r)&&(S=" "+Date.prototype.toUTCString.call(r)),k(r)&&(S=" "+l(r)),v(g)&&(y=c(e,g),S=" [String: "+y+"]"),j(g)&&(y=c(e,g),S=" [Number: "+y+"]"),m(g)&&(y=c(e,g),S=" [Boolean: "+y+"]"),0===d.length&&(!N||0===r.length))return P[0]+S+P[1];if(0>n)return q(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var z;return z=N?f(e,r,n,b,d):d.map(function(t){return p(e,r,n,b,t,N)}),e.seen.pop(),h(z,S,P)}function u(e,t){if(g(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return j(t)?0===t&&0>1/t?e.stylize("-0","number"):e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):w(t)?e.stylize("null","null"):void 0}function c(e,t){var r=e.stylize;e.stylize=i;var n=u(e,t);return e.stylize=r,n}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o){for(var i=[],s=0,a=t.length;a>s;++s)i.push(d(t,String(s))?p(e,t,r,n,String(s),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))}),i}function p(e,t,r,n,o,i){var s,u,c;if(c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),d(n,o)||(s="["+o+"]"),u||(e.seen.indexOf(c.value)<0?(u=w(r)?a(e,c.value,null):a(e,c.value,r-1),u.indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),g(s)){if(i&&o.match(/^\d+$/))return u;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\"),s=e.stylize(s,"string"))}return s+": "+u}function h(e,t,r){var n=e.reduce(function(e,t){return e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var b=r(/*! ./util */14),m=b.isBoolean,y=b.isObject,g=b.isUndefined,x=b.isFunction,v=b.isString,j=b.isNumber,w=b.isNull,q=b.isRegExp,O=b.isDate,k=b.isError,E=b.isArray;t.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t._extend=function(e,t){if(!t||!y(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},/*!*************************************!*\ !*** (webpack)/~/should/lib/eql.js ***! \*************************************/ function(e,t,r){function n(e,t){if(e===t)return!0;if(i.isBuffer(e)&&i.isBuffer(t)){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return i.isDate(e)&&i.isDate(t)?e.getTime()===t.getTime():i.isRegExp(e)&&i.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:i.isObject(e)||i.isObject(t)?o(e,t):e==t}function o(e,t){if(i.isNullOrUndefined(e)||i.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(i.isArguments(e))return i.isArguments(t)?(e=s.call(e),t=s.call(t),n(e,t)):!1;try{var r,o,a=Object.keys(e),u=Object.keys(t)}catch(c){return!1}if(a.length!=u.length)return!1;for(a.sort(),u.sort(),o=a.length-1;o>=0;o--)if(a[o]!=u[o])return!1;for(o=a.length-1;o>=0;o--)if(r=a[o],!n(e[r],t[r]))return!1;return!0}/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var i=r(/*! ./util */14);e.exports=n;var s=Array.prototype.slice}]);