You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

569 lines
957 KiB
JavaScript

!function(l,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var u in e)("object"==typeof exports?exports:l)[u]=e[u]}}("undefined"!=typeof self?self:window,function(){return function(l){var n={};function e(u){if(n[u])return n[u].exports;var t=n[u]={i:u,l:!1,exports:{}};return l[u].call(t.exports,t,t.exports,e),t.l=!0,t.exports}return e.m=l,e.c=n,e.d=function(l,n,u){e.o(l,n)||Object.defineProperty(l,n,{enumerable:!0,get:u})},e.r=function(l){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},e.t=function(l,n){if(1&n&&(l=e(l)),8&n)return l;if(4&n&&"object"==typeof l&&l&&l.__esModule)return l;var u=Object.create(null);if(e.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:l}),2&n&&"string"!=typeof l)for(var t in l)e.d(u,t,function(n){return l[n]}.bind(null,t));return u},e.n=function(l){var n=l&&l.__esModule?function(){return l.default}:function(){return l};return e.d(n,"a",n),n},e.o=function(l,n){return Object.prototype.hasOwnProperty.call(l,n)},e.p="",e(e.s=51)}([function(l,n,e){"use strict";var u=e(9),t=e(5),r=e(23),o=e(14),a=e(1),i={VERSION:e(13).version,GrammarError:u,ast:t,parser:o,compiler:r,util:a,generate:function(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=new r.Session({passes:a.convertPasses(r.passes)});return Array.isArray(n.plugins)&&n.plugins.forEach(function(l){"function"==typeof l.use&&l.use(e,n)}),r.compile(e.parse(l,n.parser||{}),e,n)}};l.exports=i},function(l,n,e){"use strict";var u=e(19),t=e(20),r=e(21),o=e(11),a=function(){function l(l){return Array.isArray(l)?l:r.values(l)}return function(n){return r.map(n,l)}}();l.exports={find:u.find,findIndex:u.findIndex,stringEscape:t.stringEscape,regexpEscape:t.regexpEscape,reservedWords:t.reservedWords,clone:r.clone,each:r.each,extend:r.extend,map:r.map,values:r.values,enforceFastProperties:r.enforceFastProperties,evalModule:o.evalModule,convertPasses:a,processOptions:function(l,n){var e={};return r.extend(e,l),r.extend(e,n),e},noop:function(){}}},function(l,n,e){l.exports=e(6)},function(l,n){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n,e){var u=l.__flags||(l.__flags=Object.create(null));if(3!==arguments.length)return u[n];u[n]=e}},function(l,n,e){"use strict";var u=e(82),t=e(0).compiler.Session;l.exports=function(l,n){l.use(u);var e=l.Assertion;function r(l,n,e){var u=n.parse(l);return e.allowedStartRules||(e.allowedStartRules=u.rules.length>0?[u.rules[0].name]:[]),u}e.addMethod("changeAST",function(l,u,o,a){o=void 0!==o?o:{},a=void 0!==a?a:{reportFailures:!0};var i=new t({grammar:l}),s=r(l,i,o);s.rules=s.rules.map(function(l){return Object.assign(l,a)}),n.flag(this,"object")(s,i,o),new e(s).like(u)}),e.addMethod("reportError",function(l,u,o){o=void 0!==o?o:{};var a,i,s=new t({grammar:l}),c=r(l,s,o);try{n.flag(this,"object")(c,s,o),a=!0}catch(l){i=l,a=!1}this.assert(!a,"expected #{this} to report an error but it didn't","expected #{this} to not report an error but #{act} was reported",null,i),a||void 0===u||("string"==typeof u&&(u={message:u}),Object.keys(u).forEach(function(l){new e(i).to.have.property(l).that.is.deep.equal(u[l])}))}),e.addMethod("reportWarning",function(l,e,u){var o=this;e=Array.isArray(e)?e:null==e?[]:[e],u=void 0!==u?u:{};var a=[];var i=new t({grammar:l,warn:function(l){a.push(l)}}),s=r(l,i,u);n.flag(this,"object")(s,i,u);var c=a.length,p=e.length;e.length&&this.assert(c===p,"expected #{this} to report ".concat(p," warnings, but it reported ").concat(c," warnings"),"expected #{this} to not report ".concat(p," warnings"),e,a),e.forEach(function(l){o.assert(-1!==a.indexOf(l),"expected #{this} to report the warning #{exp}, but it didn't","expected #{this} to not report the warning #{exp}",l)})})}},function(l,n,e){"use strict";n.visitor=e(10),n.Node=e(12),n.Grammar=e(22)},function(l,n,e){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=[];
/*!
* Chai version
*/n.version="4.2.0",
/*!
* Assertion Error
*/
n.AssertionError=e(41);
/*!
* Utils for plugins (not exported)
*/
var t=e(53);n.use=function(l){return~u.indexOf(l)||(l(n,t),u.push(l)),n},
/*!
* Utility Functions
*/
n.util=t;
/*!
* Configuration
*/
var r=e(8);n.config=r;
/*!
* Primary `Assertion` prototype
*/
var o=e(70);n.use(o);
/*!
* Core Assertions
*/
var a=e(71);n.use(a);
/*!
* Expect interface
*/
var i=e(72);n.use(i);
/*!
* Should interface
*/
var s=e(73);n.use(s);
/*!
* Assert interface
*/
var c=e(74);n.use(c)},function(l,n){
/*!
* Chai - transferFlags utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n,e){var u=l.__flags||(l.__flags=Object.create(null));for(var t in n.__flags||(n.__flags=Object.create(null)),e=3!==arguments.length||e,u)(e||"object"!==t&&"ssfi"!==t&&"lockSsfi"!==t&&"message"!=t)&&(n.__flags[t]=u[t])}},function(l,n){l.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"]}},function(l,n,e){"use strict";l.exports=function l(n,e){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.name="GrammarError",this.message=n,this.location=e,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,l)}},function(l,n,e){"use strict";function u(l,n){for(var e=0;e<n.length;e++){var u=n[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}var t=e(1),r=function(){function l(){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l)}var n,e,t;return n=l,(e=[{key:"visit",value:function(l){if(!l)throw new Error("Visitor function called with no arguments or a `falsy` node");var n=this[l.type];if(!n)throw new Error('Visitor function for node type "'.concat(l.type,'" not defined'));return n.apply(this,arguments)}}])&&u(n.prototype,e),t&&u(n,t),l}();l.exports={ASTVisitor:r,build:function(l){var n=new r;return t.extend(n,l),(n=t.enforceFastProperties(n)).visit.bind(n)}};var o=r.on={property:function(l){return function(n){for(var e=n[l],u=arguments.length,t=new Array(u>1?u-1:0),r=1;r<u;r++)t[r-1]=arguments[r];t.length?this.visit.apply(this,[e].concat(t)):this.visit(e)}},children:function(l){return function(n){for(var e=arguments.length,u=new Array(e>1?e-1:0),t=1;t<e;t++)u[t-1]=arguments[t];var r=n[l],o=this,a=u.length<1?function(l){o.visit(l)}:function(l){o.visit.apply(o,[l].concat(u))};r.forEach(a)}}},a=t.noop,i=o.property("expression"),s={grammar:function(l){for(var n=this,e=arguments.length,u=new Array(e>1?e-1:0),t=1;t<e;t++)u[t-1]=arguments[t];l.initializer&&this.visit.apply(this,[l.initializer].concat(u)),l.rules.forEach(function(l){n.visit.apply(n,[l].concat(u))})},initializer:a,rule:i,named:i,choice:o.children("alternatives"),action:i,sequence:o.children("elements"),labeled:i,text:i,simple_and:i,simple_not:i,optional:i,zero_or_more:i,one_or_more:i,group:i,semantic_and:a,semantic_not:a,rule_ref:a,literal:a,class:a,any:a};t.each(s,function(l,n){r.prototype[n]=l})},function(l,n,e){"use strict";function u(l){return function(l){if(Array.isArray(l)){for(var n=0,e=new Array(l.length);n<l.length;n++)e[n]=l[n];return e}}(l)||function(l){if(Symbol.iterator in Object(l)||"[object Arguments]"===Object.prototype.toString.call(l))return Array.from(l)}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}l.exports={evalModule:function(l,n){var e=Object.keys(n),t=e.map(function(l){return n[l]}),r={exports:{}};return e.push("module","exports",l),t.push(r,r.exports),Function.apply(void 0,u(e)).apply(void 0,u(t)),r.exports}}},function(l,n,e){"use strict";l.exports=function l(n,e){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.type=n,this.location=e}},function(l){l.exports={name:"pegjs",version:"0.11.0-dev",description:"Parser generator for JavaScript",keywords:["PEG.js","pegjs","grammar","parser","generator","language","PEG"],homepage:"https://pegjs.org/",repository:"pegjs/pegjs",license:"MIT",contributors:["David Majda <david@majda.cz> (https://majda.cz/)","Futago-za Ryuu <futagoza.ryuu@gmail.com>"],types:"typings/pegjs.d.ts",main:"lib/peg.js",bin:"bin/peg.js",engines:{node:">= 6"}}},function(l,n,e){"use strict";var u=e(5),t=e(1);function r(l,n,e,u){this.message=l,this.expected=n,this.found=e,this.location=u,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}!function(l,n){function e(){this.constructor=l}e.prototype=n.prototype,l.prototype=new e}(r,Error),r.buildMessage=function(l,n){var e={literal:function(l){return'"'+t(l.text)+'"'},
/*!
* Chai - isProxyEnabled helper
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/l.exports=function(){return u.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}},function(l,n){var e=Object.getOwnPropertyDescriptor(function(){},"length");
/*!
* Chai - addLengthGuard utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/l.exports=function(l,n,u){return e.configurable?(Object.defineProperty(l,"length",{get:function(){if(u)throw Error("Invalid Chai property: "+n+'.length. Due to a compatibility issue, "length" cannot directly follow "'+n+'". Use "'+n+'.lengthOf" instead.');throw Error("Invalid Chai property: "+n+'.length. See docs for proper usage of "'+n+'".')}}),l):l}},function(l,n,e){var u=e(8),t=e(3),r=e(45),o=e(16),a=["__flags","__methods","_obj","assert"];l.exports=function(l,n){return o()?new Proxy(l,{get:function l(e,o){if("string"==typeof o&&-1===u.proxyExcludedKeys.indexOf(o)&&!Reflect.has(e,o)){if(n)throw Error("Invalid Chai property: "+n+"."+o+'. See docs for proper usage of "'+n+'".');var i=null,s=4;throw r(e).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&-1===a.indexOf(l)){var n=function(l,n,e){if(Math.abs(l.length-n.length)>=e)return e;for(var u=[],t=0;t<=l.length;t++)u[t]=Array(n.length+1).fill(0),u[t][0]=t;for(var r=0;r<n.length;r++)u[0][r]=r;for(var t=1;t<=l.length;t++)for(var o=l.charCodeAt(t-1),r=1;r<=n.length;r++)Math.abs(t-r)>=e?u[t][r]=e:u[t][r]=Math.min(u[t-1][r]+1,u[t][r-1]+1,u[t-1][r-1]+(o===n.charCodeAt(r-1)?0:1));return u[l.length][n.length]}(o,l,s);n<s&&(i=l,s=n)}}),null!==i?Error("Invalid Chai property: "+o+'. Did you mean "'+i+'"?'):Error("Invalid Chai property: "+o)}return-1!==a.indexOf(o)||t(e,"lockSsfi")||t(e,"ssfi",l),Reflect.get(e,o)}}):l}},function(l,n,e){"use strict";function u(l,n){for(var e=0;e<l.length;++e)if(n(l[e],e))return e;return-1}l.exports={findIndex:u,find:function(l,n){var e=u(l,n);return e<0?void 0:l[e]}}},function(l,n,e){"use strict";function u(l){return l.charCodeAt(0).toString(16).toUpperCase()}function t(l){return l.replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+u(l)}).replace(/[\x10-\x1F\x7F-\xFF]/g,function(l){return"\\x"+u(l)}).replace(/[\u0100-\u0FFF]/g,function(l){return"\\u0"+u(l)}).replace(/[\u1000-\uFFFF]/g,function(l){return"\\u"+u(l)})}var r={stringEscape:function(l){return t(l.replace(/\\/g,"\\\\").replace(/"/g,'\\"'))},regexpEscape:function(l){return t(l.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-"))},reservedWords:["break","case","catch","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","class","const","enum","export","extends","implements","import","interface","let","package","private","protected","public","static","super","yield","false","null","true"]};l.exports=r},function(l,n,e){"use strict";function u(l){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}var t=Object.prototype.hasOwnProperty,r={clone:function(l){var n={};for(var e in l)t.call(l,e)&&(n[e]=l[e]);return n},each:function(l,n){for(var e in l)t.call(l,e)&&n(l[e],e)},extend:function(l,n){for(var e in n)t.call(n,e)&&(t.call(l,e)||(l[e]=n[e]));return l},map:function(l,n){var e={};for(var u in l)t.call(l,u)&&(e[u]=n(l[u],u));return e},values:function(l,n){var e,u,r=[],o=-1;for(e in l)t.call(l,e)&&(u=l[e],r[++o]=n?n(u,e):u);return r},enforceFastProperties:function l(n){function e(){}e.prototype=n;var t=new e;function r(){return u(t.foo)}return r(),r(),n}};l.exports=r},function(l,n,e){"use strict";function u(l){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(l,n){for(var e=0;e<n.length;e++){var u=n[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function o(l,n,e){r
/*!
* assertion-error
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
* MIT Licensed
*/
/*!
* Return a function that will copy properties from
* one object to another excluding any originally
* listed. Returned function will create a new `{}`.
*
* @param {String} excluded properties ...
* @return {Function}
*/
function e(){var l=[].slice.call(arguments);function n(n,e){Object.keys(e).forEach(function(u){~l.indexOf(u)||(n[u]=e[u])})}return function(){for(var l=[].slice.call(arguments),e=0,u={};e<l.length;e++)n(u,l[e]);return u}}function u(l,n,t){var r=e("name","message","stack","constructor","toJSON")(n||{});for(var o in this.message=l||"Unspecified AssertionError",this.showDiff=!1,r)this[o]=r[o];if(t=t||u,Error.captureStackTrace)Error.captureStackTrace(this,t);else try{throw new Error}catch(l){this.stack=l.stack}}
/*!
* Inherit from Error.prototype
*/
/*!
* Primary Exports
*/
l.exports=u,u.prototype=Object.create(Error.prototype),
/*!
* Statically set name
*/
u.prototype.name="AssertionError",
/*!
* Ensure correct constructor
*/
u.prototype.constructor=u,u.prototype.toJSON=function(l){var n=e("constructor","toJSON","stack")({name:this.name},this);return!1!==l&&this.stack&&(n.stack=this.stack),n}},function(l,n){
/*!
* Chai - getActual utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){return n.length>4?n[4]:l._obj}},function(l,n,e){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(39),t=e(8);l.exports=function(l){var n=u(l),e=Object.prototype.toString.call(l);if(t.truncateThreshold&&n.length>=t.truncateThreshold){if("[object Function]"===e)return l.name&&""!==l.name?"[Function: "+l.name+"]":"[Function]";if("[object Array]"===e)return"[ Array("+l.length+") ]";if("[object Object]"===e){var r=Object.keys(l);return"{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}return n}return n}},function(l,n,e){"use strict";var u=Function.prototype.toString,t=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;l.exports=function(l){if("function"!=typeof l)return null;var n="";if(void 0===Function.prototype.name&&void 0===l.name){var e=u.call(l).match(t);e&&(n=e[1])}else n=l.name;return n}},function(l,n){
/*!
* Chai - getProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){var n=Object.getOwnPropertyNames(l);function e(l){-1===n.indexOf(l)&&n.push(l)}for(var u=Object.getPrototypeOf(l);null!==u;)Object.getOwnPropertyNames(u).forEach(e),u=Object.getPrototypeOf(u);return n}},function(l,n){
/*!
* Chai - getOwnEnumerablePropertySymbols utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(l).filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})}},function(l,n,e){(function(l){var u=void 0!==l&&l||"undefined"!=typeof self&&self||window,t=Function.prototype.apply;function r(l,n){this._id=l,this._clearFn=n}n.setTimeout=function(){return new r(t.call(setTimeout,u,arguments),clearTimeout)},n.setInterval=function(){return new r(t.call(setInterval,u,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(l){l&&l.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(u,this._id)},n.enroll=function(l,n){clearTimeout(l._idleTimeoutId),l._idleTimeout=n},n.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},n._unrefActive=n.active=function(l){clearTimeout(l._idleTimeoutId);var n=l._idleTimeout;n>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},n))},e(75),n.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==l&&l.setImmediate||this&&this.setImmediate,n.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==l&&l.clearImmediate||this&&this.clearImmediate}).call(this,e(15))},,,,function(l,n,e){e(52),e(77),e(78),e(79),e(80),e(81),e(84),e(85),e(86),e(87),e(88),e(89),e(90),e(91),e(92),l.exports=e(93)},function(l,n,e){"use strict";function u(l){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}var t=e(2),r=e(0),o=e(40),a=t.expect;describe("generated parser API",function(){describe("parse",function(){it("parses input",function(){var l=r.generate("start = 'a'");a(l.parse("a")).to.equal("a")}),it("throws an exception on syntax error",function(){var l=r.generate("start = 'a'");a(function(){l.parse("b")}).to.throw()}),describe("start rule",function(){var l=r.generate("\n\n a = 'x' { return 'a'; }\n b = 'x' { return 'b'; }\n c = 'x' { return 'c'; }\n\n ",{allowedStartRules:["b","c"]});describe("when |startRule| is not set",function(){it("starts parsing from the first allowed rule",function(){a(l.parse("x")).to.equal("b")})}),describe("when |startRule| is set to an allowed rule",function(){it("starts parsing from specified rule",function(){a(l.parse("x",{startRule:"b"})).to.equal("b"),a(l.parse("x",{startRule:"c"})).to.equal("c")})}),describe("when |startRule| is set to a disallowed start rule",function(){it("throws an exception",function(){a(function(){l.parse("x",{startRule:"a"})}).to.throw()})})}),describe("tracing",function(){var l=r.generate("\n\n start = a / b\n a = 'a'\n b = 'b'\n\n ",{trace:!0});describe("default tracer",function(){it("traces using console.log (if console is defined)",function(){var n=["1:1-1:1 rule.enter start","1:1-1:1 rule.enter a","1:1-1:1 rule.fail a","1:1-1:1 rule.enter b","1:1-1:2 rule.match b","1:1-1:2 rule.match start"];"object"===("undefined"==typeof console?"undefined":u(console))&&o.stub(console,"log");try{l.parse("b"),"object"===("undefined"==typeof console?"undefined":u(console))&&(a(console.log.callCount).to.equal(n.length),n.forEach(function(l,n){var e=console.log.getCall(n);a(e.calledWithExactly(l)).to.equal(!0)}))}finally{"object"===("undefined"==typeof console?"undefined":u(console))&&console.log.restore()}})}),describe("custom tracers",function(){describe("trace",function(){it("receives tracing events",function(){var n=[{type:"rule.enter",rule:"start",location:{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}}},{type:"rule.enter",rule:"a",location:{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}}},{type:"rule.fail",rule:"a",location:{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}}},{type:"rule.enter",rule:"b",location:{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}}},{type:"rule.matc
/*!
* chai
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Dependencies that are used for multiple exports are required here only once
*/
var u=e(54);
/*!
* test utility
*/n.test=e(55),
/*!
* type utility
*/
n.type=e(38),
/*!
* expectTypes utility
*/
n.expectTypes=e(56),
/*!
* message utility
*/
n.getMessage=e(57),
/*!
* actual utility
*/
n.getActual=e(42),
/*!
* Inspect util
*/
n.inspect=e(39),
/*!
* Object Display util
*/
n.objDisplay=e(43),
/*!
* Flag utility
*/
n.flag=e(3),
/*!
* Flag transferring utility
*/
n.transferFlags=e(7),
/*!
* Deep equal utility
*/
n.eql=e(59),
/*!
* Deep path info
*/
n.getPathInfo=u.getPathInfo,
/*!
* Check if a property exists
*/
n.hasProperty=u.hasProperty,
/*!
* Function name
*/
n.getName=e(44),
/*!
* add Property
*/
n.addProperty=e(60),
/*!
* add Method
*/
n.addMethod=e(61),
/*!
* overwrite Property
*/
n.overwriteProperty=e(62),
/*!
* overwrite Method
*/
n.overwriteMethod=e(63),
/*!
* Add a chainable method
*/
n.addChainableMethod=e(64),
/*!
* Overwrite chainable method
*/
n.overwriteChainableMethod=e(65),
/*!
* Compare by inspect method
*/
n.compareByInspect=e(66),
/*!
* Get own enumerable property symbols method
*/
n.getOwnEnumerablePropertySymbols=e(46),
/*!
* Get own enumerable properties method
*/
n.getOwnEnumerableProperties=e(67),
/*!
* Checks error against a given set of criteria
*/
n.checkError=e(68),
/*!
* Proxify util
*/
n.proxify=e(18),
/*!
* addLengthGuard util
*/
n.addLengthGuard=e(17),
/*!
* isProxyEnabled helper
*/
n.isProxyEnabled=e(16),
/*!
* isNaN method
*/
n.isNaN=e(69)},function(l,n,e){"use strict";function u(l,n){return null!=l&&n in Object(l)}function t(l){return l.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(l){var n=/^\[(\d+)\]$/.exec(l);return n?{i:parseFloat(n[1])}:{p:l.replace(/\\([.\[\]])/g,"$1")}})}function r(l,n,e){var u=l,t=null;e=void 0===e?n.length:e;for(var r=0;r<e;r++){var o=n[r];u&&(u=void 0===o.p?u[o.i]:u[o.p],r===e-1&&(t=u))}return t}function o(l,n){var e=t(n),o=e[e.length-1],a={parent:e.length>1?r(l,e,e.length-1):l,name:o.p||o.i,value:r(l,e)};return a.exists=u(a.parent,a.name),a}l.exports={hasProperty:u,getPathInfo:o,getPathValue:function(l,n){return o(l,n).value},setPathValue:function(l,n,e){return function(l,n,e){for(var u=l,t=e.length,r=null,o=0;o<t;o++){var a=null,i=null;if(r=e[o],o===t-1)u[a=void 0===r.p?r.i:r.p]=n;else if(void 0!==r.p&&u[r.p])u=u[r.p];else if(void 0!==r.i&&u[r.i])u=u[r.i];else{var s=e[o+1];a=void 0===r.p?r.i:r.p,i=void 0===s.p?[]:{},u[a]=i,u=u[a]}}}(l,e,t(n)),l}}},function(l,n,e){
/*!
* Chai - test utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(3);l.exports=function(l,n){var e=u(l,"negate"),t=n[0];return e?!t:t}},function(l,n,e){
/*!
* Chai - expectTypes utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(41),t=e(3),r=e(38);l.exports=function(l,n){var e=t(l,"message"),o=t(l,"ssfi");e=e?e+": ":"",l=t(l,"object"),(n=n.map(function(l){return l.toLowerCase()})).sort();var a=n.map(function(l,e){var u=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an":"a";return(n.length>1&&e===n.length-1?"or ":"")+u+" "+l}).join(", "),i=r(l).toLowerCase();if(!n.some(function(l){return i===l}))throw new u(e+"object tested must be "+a+", but "+i+" given",void 0,o)}},function(l,n,e){
/*!
* Chai - message composition utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(3),t=e(42),r=e(43);l.exports=function(l,n){var e=u(l,"negate"),o=u(l,"object"),a=n[3],i=t(l,n),s=e?n[2]:n[1],c=u(l,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,function(){return r(o)}).replace(/#\{act\}/g,function(){return r(i)}).replace(/#\{exp\}/g,function(){return r(a)}),c?c+": "+s:s}},function(l,n){
/*!
* Chai - getEnumerableProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){var n=[];for(var e in l)n.push(e);return n}},function(l,n,e){"use strict";
/*!
* deep-eql
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/var u=e(38);function t(){this._key="chai/deep-eql__"+Math.random()+Date.now()}t.prototype={get:function(l){return l[this._key]},set:function(l,n){Object.isExtensible(l)&&Object.defineProperty(l,this._key,{value:n,configurable:!0})}};var r="function"==typeof WeakMap?WeakMap:t;
/*!
* Check to see if the MemoizeMap has recorded a result of the two operands
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @returns {Boolean|null} result
*/function o(l,n,e){if(!e||g(l)||g(n))return null;var u=e.get(l);if(u){var t=u.get(n);if("boolean"==typeof t)return t}return null}
/*!
* Set the result of the equality into the MemoizeMap
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @param {Boolean} result
*/function a(l,n,e,u){if(e&&!g(l)&&!g(n)){var t=e.get(l);t?t.set(n,u):((t=new r).set(n,u),e.set(l,t))}}
/*!
* Primary Export
*/function i(l,n,e){if(e&&e.comparator)return c(l,n,e);var u=s(l,n);return null!==u?u:c(l,n,e)}function s(l,n){return l===n?0!==l||1/l==1/n:l!=l&&n!=n||!g(l)&&!g(n)&&null}
/*!
* The main logic of the `deepEqual` function.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (optional) Additional options
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
references to blow the stack.
* @return {Boolean} equal match
*/function c(l,n,e){(e=e||{}).memoize=!1!==e.memoize&&(e.memoize||new r);var t=e&&e.comparator,c=o(l,n,e.memoize);if(null!==c)return c;var g=o(n,l,e.memoize);if(null!==g)return g;if(t){var y=t(l,n);if(!1===y||!0===y)return a(l,n,e.memoize,y),y;var b=s(l,n);if(null!==b)return b}var v=u(l);if(v!==u(n))return a(l,n,e.memoize,!1),!1;a(l,n,e.memoize,!0);var A=function(l,n,e,u){switch(e){case"String":case"Number":case"Boolean":case"Date":return i(l.valueOf(),n.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":case"Error":return l===n;case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return f(l,n,u);case"RegExp":
/*!
* Compare two Regular Expressions for equality.
*
* @param {RegExp} leftHandOperand
* @param {RegExp} rightHandOperand
* @return {Boolean} result
*/
return function(l,n){return l.toString()===n.toString()}
/*!
* Compare two Sets/Maps for equality. Faster than other equality functions.
*
* @param {Set} leftHandOperand
* @param {Set} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/(l,n);case"Generator":
/*!
* Simple equality for generator objects such as those returned by generator functions.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
return function(l,n,e){return f(h(l),h(n),e)}
/*!
* Determine if the given object has an @@iterator function.
*
* @param {Object} target
* @return {Boolean} `true` if the object has an @@iterator function.
*/(l,n,u);case"DataView":return f(new Uint8Array(l.buffer),new Uint8Array(n.buffer),u);case"ArrayBuffer":return f(new Uint8Array(l),new Uint8Array(n),u);case"Set":case"Map":return p(l,n,u);default:
/*!
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
* for each enumerable key in the object.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
return function(l,n,e){var u=m(l),t=m(n);if(u.length&&u.length===t.length)return u.sort(),t.sort(),!1!==f(u,t)&&
/*!
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
* each key. If any value of the given key is not equal, the function will return false (early).
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
function(l,n,e,u){var t=e.length;if(0===t)return!0;for(var r=0;r<t;r+=1)if(!1===i(l[e[r]],n[e[r]],u))return!1;return!0}(l,n,u,e);var r=d(l),o=d(n);if(r.length&&r.length===o.length)return r.sort(),o.sort(),f(r,o,e);if(0===u.length&&0===r.length&&0===t.length&&0===o.length)return!0;return!1}
/*!
* Returns true if the argument is a primitive.
*
* This intentionally returns true for all objects that can be compared by reference,
* including functions and symbols.
*
* @param {Mixed} value
* @return {Boolean} result
*/(l,n,u)}}(l,n,v,e);return a(l,n,e.memoize,A),A}function p(l,n,e){if(l.size!==n.size)return!1;if(0===l.size)return!0;var u=[],t=[];return l.forEach(function(l,n){u.push([l,n])}),n.forEach(function(l,n){t.push([l,n])}),f(u.sort(),t.sort(),e)}
/*!
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/function f(l,n,e){var u=l.length;if(u!==n.length)return!1;if(0===u)return!0;for(var t=-1;++t<u;)if(!1===i(l[t],n[t],e))return!1;return!0}
/*!
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
*
* @param {Object} target
* @returns {Array} an array of entries from the @@iterator function
*/
function d(l){if(function(l){return"undefined"!=typeof Symbol&&"object"==typeof l&&void 0!==Symbol.iterator&&"function"==typeof l[Symbol.iterator]}(l))try{return h(l[Symbol.iterator]())}catch(l){return[]}return[]}
/*!
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
*
* @param {Generator} target
* @returns {Array} an array of entries from the Generator.
*/function h(l){for(var n=l.next(),e=[n.value];!1===n.done;)n=l.next(),e.push(n.value);return e}
/*!
* Gets all own and inherited enumerable keys from a target.
*
* @param {Object} target
* @returns {Array} an array of own and inherited enumerable keys from the target.
*/function m(l){var n=[];for(var e in l)n.push(e);return n}function g(l){return null===l||"object"!=typeof l}l.exports=i,l.exports.MemoizeMap=r},function(l,n,e){
/*!
* Chai - addProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(6),t=e(3),r=e(16),o=e(7);l.exports=function(l,n,e){e=void 0===e?function(){}:e,Object.defineProperty(l,n,{get:function l(){r()||t(this,"lockSsfi")||t(this,"ssfi",l);var n=e.call(this);if(void 0!==n)return n;var a=new u.Assertion;return o(this,a),a},configurable:!0})}},function(l,n,e){
/*!
* Chai - addMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(17),t=e(6),r=e(3),o=e(18),a=e(7);l.exports=function(l,n,e){var i=function(){r(this,"lockSsfi")||r(this,"ssfi",i);var l=e.apply(this,arguments);if(void 0!==l)return l;var n=new t.Assertion;return a(this,n),n};u(i,n,!1),l[n]=o(i,n)}},function(l,n,e){
/*!
* Chai - overwriteProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(6),t=e(3),r=e(16),o=e(7);l.exports=function(l,n,e){var a=Object.getOwnPropertyDescriptor(l,n),i=function(){};a&&"function"==typeof a.get&&(i=a.get),Object.defineProperty(l,n,{get:function l(){r()||t(this,"lockSsfi")||t(this,"ssfi",l);var n=t(this,"lockSsfi");t(this,"lockSsfi",!0);var a=e(i).call(this);if(t(this,"lockSsfi",n),void 0!==a)return a;var s=new u.Assertion;return o(this,s),s},configurable:!0})}},function(l,n,e){
/*!
* Chai - overwriteMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(17),t=e(6),r=e(3),o=e(18),a=e(7);l.exports=function(l,n,e){var i=l[n],s=function(){throw new Error(n+" is not a function")};i&&"function"==typeof i&&(s=i);var c=function(){r(this,"lockSsfi")||r(this,"ssfi",c);var l=r(this,"lockSsfi");r(this,"lockSsfi",!0);var n=e(s).apply(this,arguments);if(r(this,"lockSsfi",l),void 0!==n)return n;var u=new t.Assertion;return a(this,u),u};u(c,n,!1),l[n]=o(c,n)}},function(l,n,e){
/*!
* Chai - addChainingMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(17),t=e(6),r=e(3),o=e(18),a=e(7),i="function"==typeof Object.setPrototypeOf,s=function(){},c=Object.getOwnPropertyNames(s).filter(function(l){var n=Object.getOwnPropertyDescriptor(s,l);return"object"!=typeof n||!n.configurable}),p=Function.prototype.call,f=Function.prototype.apply;l.exports=function(l,n,e,s){"function"!=typeof s&&(s=function(){});var d={method:e,chainingBehavior:s};l.__methods||(l.__methods={}),l.__methods[n]=d,Object.defineProperty(l,n,{get:function(){d.chainingBehavior.call(this);var e=function(){r(this,"lockSsfi")||r(this,"ssfi",e);var l=d.method.apply(this,arguments);if(void 0!==l)return l;var n=new t.Assertion;return a(this,n),n};if(u(e,n,!0),i){var s=Object.create(this);s.call=p,s.apply=f,Object.setPrototypeOf(e,s)}else{Object.getOwnPropertyNames(l).forEach(function(n){if(-1===c.indexOf(n)){var u=Object.getOwnPropertyDescriptor(l,n);Object.defineProperty(e,n,u)}})}return a(this,e),o(e)},configurable:!0})}},function(l,n,e){
/*!
* Chai - overwriteChainableMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(6),t=e(7);l.exports=function(l,n,e,r){var o=l.__methods[n],a=o.chainingBehavior;o.chainingBehavior=function(){var l=r(a).call(this);if(void 0!==l)return l;var n=new u.Assertion;return t(this,n),n};var i=o.method;o.method=function(){var l=e(i).apply(this,arguments);if(void 0!==l)return l;var n=new u.Assertion;return t(this,n),n}}},function(l,n,e){
/*!
* Chai - compareByInspect utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(39);l.exports=function(l,n){return u(l)<u(n)?-1:1}},function(l,n,e){
/*!
* Chai - getOwnEnumerableProperties utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var u=e(46);l.exports=function(l){return Object.keys(l).concat(u(l))}},function(l,n,e){"use strict";var u=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/;function t(l){var n="";if(void 0===l.name){var e=String(l).match(u);e&&(n=e[1])}else n=l.name;return n}l.exports={compatibleInstance:function(l,n){return n instanceof Error&&l===n},compatibleConstructor:function(l,n){return n instanceof Error?l.constructor===n.constructor||l instanceof n.constructor:(n.prototype instanceof Error||n===Error)&&(l.constructor===n||l instanceof n)},compatibleMessage:function(l,n){var e="string"==typeof l?l:l.message;return n instanceof RegExp?n.test(e):"string"==typeof n&&-1!==e.indexOf(n)},getMessage:function(l){var n="";return l&&l.message?n=l.message:"string"==typeof l&&(n=l),n},getConstructorName:function(l){var n=l;return l instanceof Error?n=t(l.constructor):"function"==typeof l&&(n=t(l).trim()||t(new l)),n}}},function(l,n){l.exports=Number.isNaN||
/*!
* Chai - isNaN utility
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* MIT Licensed
*/
function(l){return l!=l}},function(l,n,e){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var u=e(8);l.exports=function(l,n){
/*!
* Module dependencies.
*/
var e=l.AssertionError,t=n.flag;
/*!
* Module export.
*/
/*!
* Assertion Constructor
*
* Creates object for chaining.
*
* `Assertion` objects contain metadata in the form of flags. Three flags can
* be assigned during instantiation by passing arguments to this constructor:
*
* - `object`: This flag contains the target of the assertion. For example, in
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
* contain `numKittens` so that the `equal` assertion can reference it when
* needed.
*
* - `message`: This flag contains an optional custom error message to be
* prepended to the error message that's generated by the assertion when it
* fails.
*
* - `ssfi`: This flag stands for "start stack function indicator". It
* contains a function reference that serves as the starting point for
* removing frames from the stack trace of the error that's created by the
* assertion when it fails. The goal is to provide a cleaner stack trace to
* end users by removing Chai's internal functions. Note that it only works
* in environments that support `Error.captureStackTrace`, and only when
* `Chai.config.includeStack` hasn't been set to `false`.
*
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
* should retain its current value, even as assertions are chained off of
* this object. This is usually set to `true` when creating a new assertion
* from within another assertion. It's also temporarily set to `true` before
* an overwritten assertion gets called by the overwriting assertion.
*
* @param {Mixed} obj target of the assertion
* @param {String} msg (optional) custom error message
* @param {Function} ssfi (optional) starting point for removing stack frames
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
* @api private
*/
function r(l,e,u,o){return t(this,"ssfi",u||r),t(this,"lockSsfi",o),t(this,"object",l),t(this,"message",e),n.proxify(this)}l.Assertion=r,Object.defineProperty(r,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),u.includeStack},set:function(l){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),u.includeStack=l}}),Object.defineProperty(r,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),u.showDiff},set:function(l){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),u.showDiff=l}}),r.addProperty=function(l,e){n.addProperty(this.prototype,l,e)},r.addMethod=function(l,e){n.addMethod(this.prototype,l,e)},r.addChainableMethod=function(l,e,u){n.addChainableMethod(this.prototype,l,e,u)},r.overwriteProperty=function(l,e){n.overwriteProperty(this.prototype,l,e)},r.overwriteMethod=function(l,e){n.overwriteMethod(this.prototype,l,e)},r.overwriteChainableMethod=function(l,e,u){n.overwriteChainableMethod(this.prototype,l,e,u)},r.prototype.assert=function(l,r,o,a,i,s){var c=n.test(this,arguments);if(!1!==s&&(s=!0),void 0===a&&void 0===i&&(s=!1),!0!==u.showDiff&&(s=!1),!c){r=n.getMessage(this,arguments);var p=n.getActual(this,arguments);throw new e(r,{actual:p,expected:a,showDiff:s},u.includeStack?this.assert:t(this,"ssfi"))}},
/*!
* ### ._obj
*
* Quick reference to stored `actual` value for plugin developers.
*
* @api private
*/
Object.defineProperty(r.prototype,"_obj",{get:function(){return t(this,"object")},set:function(l){t(this,"object",l)}})}},function(l,n){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){var e=l.Assertion,u=l.AssertionError,t=n.flag;function r(l,e){e&&t(this,"message",e),l=l.toLowerCase();var u=t(this,"object"),r=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an ":"a ";this.assert(l===n.type(u).toLowerCase(),"expected #{this} to be "+r+l,"expected #{this} not to be "+r+l)}function o(l,e){return n.isNaN(l)&&n.isNaN(e)||l===e}function a(){t(this,"contains",!0)}function i(l,r){r&&t(this,"message",r);var a=t(this,"object"),i=n.type(a).toLowerCase(),s=t(this,"message"),c=t(this,"negate"),p=t(this,"ssfi"),f=t(this,"deep"),d=f?"deep ":"";s=s?s+": ":"";var h=!1;switch(i){case"string":h=-1!==a.indexOf(l);break;case"weakset":if(f)throw new u(s+"unable to use .deep.include with WeakSet",void 0,p);h=a.has(l);break;case"map":var m=f?n.eql:o;a.forEach(function(n){h=h||m(n,l)});break;case"set":f?a.forEach(function(e){h=h||n.eql(e,l)}):h=a.has(l);break;case"array":h=f?a.some(function(e){return n.eql(e,l)}):-1!==a.indexOf(l);break;default:if(l!==Object(l))throw new u(s+"object tested must be an array, a map, an object, a set, a string, or a weakset, but "+i+" given",void 0,p);var g=Object.keys(l),y=null,b=0;if(g.forEach(function(r){var o=new e(a);if(n.transferFlags(this,o,!0),t(o,"lockSsfi",!0),c&&1!==g.length)try{o.property(r,l[r])}catch(l){if(!n.checkError.compatibleConstructor(l,u))throw l;null===y&&(y=l),b++}else o.property(r,l[r])},this),c&&g.length>1&&b===g.length)throw y;return}this.assert(h,"expected #{this} to "+d+"include "+n.inspect(l),"expected #{this} to not "+d+"include "+n.inspect(l))}function s(){var l=t(this,"object"),e=n.type(l);this.assert("Arguments"===e,"expected #{this} to be arguments but got "+e,"expected #{this} to not be arguments")}function c(l,n){n&&t(this,"message",n);var e=t(this,"object");if(t(this,"deep")){var u=t(this,"lockSsfi");t(this,"lockSsfi",!0),this.eql(l),t(this,"lockSsfi",u)}else this.assert(l===e,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",l,this._obj,!0)}function p(l,e){e&&t(this,"message",e),this.assert(n.eql(l,t(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",l,this._obj,!0)}function f(l,r){r&&t(this,"message",r);var o,a=t(this,"object"),i=t(this,"doLength"),s=t(this,"message"),c=s?s+": ":"",p=t(this,"ssfi"),f=n.type(a).toLowerCase(),d=n.type(l).toLowerCase(),h=!0;if(i&&"map"!==f&&"set"!==f&&new e(a,s,p,!0).to.have.property("length"),i||"date"!==f||"date"===d)if("number"===d||!i&&"number"!==f)if(i||"date"===f||"number"===f)h=!1;else{o=c+"expected "+("string"===f?"'"+a+"'":a)+" to be a number or a date"}else o=c+"the argument to above must be a number";else o=c+"the argument to above must be a date";if(h)throw new u(o,void 0,p);if(i){var m,g="length";"map"===f||"set"===f?(g="size",m=a.size):m=a.length,this.assert(m>l,"expected #{this} to have a "+g+" above #{exp} but got #{act}","expected #{this} to not have a "+g+" above #{exp}",l,m)}else this.assert(a>l,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",l)}function d(l,r){r&&t(this,"message",r);var o,a=t(this,"object"),i=t(this,"doLength"),s=t(this,"message"),c=s?s+": ":"",p=t(this,"ssfi"),f=n.type(a).toLowerCase(),d=n.type(l).toLowerCase(),h=!0;if(i&&"map"!==f&&"set"!==f&&new e(a,s,p,!0).to.have.property("length"),i||"date"!==f||"date"===d)if("number"===d||!i&&"number"!==f)if(i||"date"===f||"number"===f)h=!1;else{o=c+"expected "+("string"===f?"'"+a+"'":a)+" to be a number or a date"}else o=c+"the argument to least must be a number";else o=c+"the argument to least must be a date";if(h)throw new u(o,void 0,p);if(i){var m,g="length";"map"===f||"set"===f?(g="size",m=a.size):m=a.length,this.assert(m>=l,"expected #{this} to have a "+g+" at least #{exp} but got #{act}","expected #{this} to have a "+g+" below #{exp}",l,m)}else this.assert(a>=l,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",l)}function h(l,r){r&&t(this,"message",r);var o,a=t(this,"object"),i=t(this,"doLength"),s=t(this,"message"),c=s?s+": ":"",p=t(this,"ssfi"),f=n.type(a).toLowerCase(),d=n.type(l).toL
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){l.expect=function(n,e){return new l.Assertion(n,e)},l.expect.fail=function(n,e,u,t){throw arguments.length<2&&(u=n,n=void 0),u=u||"expect.fail()",new l.AssertionError(u,{actual:n,expected:e,operator:t},l.expect.fail)}}},function(l,n){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){var e=l.Assertion;function u(){Object.defineProperty(Object.prototype,"should",{set:function(l){Object.defineProperty(this,"should",{value:l,enumerable:!0,configurable:!0,writable:!0})},get:function l(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol?new e(this.valueOf(),null,l):new e(this,null,l)},configurable:!0});var n={fail:function(e,u,t,r){throw arguments.length<2&&(t=e,e=void 0),t=t||"should.fail()",new l.AssertionError(t,{actual:e,expected:u,operator:r},n.fail)},equal:function(l,n,u){new e(l,u).to.equal(n)},Throw:function(l,n,u,t){new e(l,t).to.Throw(n,u)},exist:function(l,n){new e(l,n).to.exist},not:{}};return n.not.equal=function(l,n,u){new e(l,u).to.not.equal(n)},n.not.Throw=function(l,n,u,t){new e(l,t).to.not.Throw(n,u)},n.not.exist=function(l,n){new e(l,n).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}l.should=u,l.Should=u}},function(l,n){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){
/*!
* Chai dependencies.
*/
var e=l.Assertion,u=n.flag,t=l.assert=function(n,u){new e(null,null,l.assert,!0).assert(n,u,"[ negation message unavailable ]")};
/*!
* Module export.
*/t.fail=function(n,e,u,r){throw arguments.length<2&&(u=n,n=void 0),u=u||"assert.fail()",new l.AssertionError(u,{actual:n,expected:e,operator:r},t.fail)},t.isOk=function(l,n){new e(l,n,t.isOk,!0).is.ok},t.isNotOk=function(l,n){new e(l,n,t.isNotOk,!0).is.not.ok},t.equal=function(l,n,r){var o=new e(l,r,t.equal,!0);o.assert(n==u(o,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",n,l,!0)},t.notEqual=function(l,n,r){var o=new e(l,r,t.notEqual,!0);o.assert(n!=u(o,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",n,l,!0)},t.strictEqual=function(l,n,u){new e(l,u,t.strictEqual,!0).to.equal(n)},t.notStrictEqual=function(l,n,u){new e(l,u,t.notStrictEqual,!0).to.not.equal(n)},t.deepEqual=t.deepStrictEqual=function(l,n,u){new e(l,u,t.deepEqual,!0).to.eql(n)},t.notDeepEqual=function(l,n,u){new e(l,u,t.notDeepEqual,!0).to.not.eql(n)},t.isAbove=function(l,n,u){new e(l,u,t.isAbove,!0).to.be.above(n)},t.isAtLeast=function(l,n,u){new e(l,u,t.isAtLeast,!0).to.be.least(n)},t.isBelow=function(l,n,u){new e(l,u,t.isBelow,!0).to.be.below(n)},t.isAtMost=function(l,n,u){new e(l,u,t.isAtMost,!0).to.be.most(n)},t.isTrue=function(l,n){new e(l,n,t.isTrue,!0).is.true},t.isNotTrue=function(l,n){new e(l,n,t.isNotTrue,!0).to.not.equal(!0)},t.isFalse=function(l,n){new e(l,n,t.isFalse,!0).is.false},t.isNotFalse=function(l,n){new e(l,n,t.isNotFalse,!0).to.not.equal(!1)},t.isNull=function(l,n){new e(l,n,t.isNull,!0).to.equal(null)},t.isNotNull=function(l,n){new e(l,n,t.isNotNull,!0).to.not.equal(null)},t.isNaN=function(l,n){new e(l,n,t.isNaN,!0).to.be.NaN},t.isNotNaN=function(l,n){new e(l,n,t.isNotNaN,!0).not.to.be.NaN},t.exists=function(l,n){new e(l,n,t.exists,!0).to.exist},t.notExists=function(l,n){new e(l,n,t.notExists,!0).to.not.exist},t.isUndefined=function(l,n){new e(l,n,t.isUndefined,!0).to.equal(void 0)},t.isDefined=function(l,n){new e(l,n,t.isDefined,!0).to.not.equal(void 0)},t.isFunction=function(l,n){new e(l,n,t.isFunction,!0).to.be.a("function")},t.isNotFunction=function(l,n){new e(l,n,t.isNotFunction,!0).to.not.be.a("function")},t.isObject=function(l,n){new e(l,n,t.isObject,!0).to.be.a("object")},t.isNotObject=function(l,n){new e(l,n,t.isNotObject,!0).to.not.be.a("object")},t.isArray=function(l,n){new e(l,n,t.isArray,!0).to.be.an("array")},t.isNotArray=function(l,n){new e(l,n,t.isNotArray,!0).to.not.be.an("array")},t.isString=function(l,n){new e(l,n,t.isString,!0).to.be.a("string")},t.isNotString=function(l,n){new e(l,n,t.isNotString,!0).to.not.be.a("string")},t.isNumber=function(l,n){new e(l,n,t.isNumber,!0).to.be.a("number")},t.isNotNumber=function(l,n){new e(l,n,t.isNotNumber,!0).to.not.be.a("number")},t.isFinite=function(l,n){new e(l,n,t.isFinite,!0).to.be.finite},t.isBoolean=function(l,n){new e(l,n,t.isBoolean,!0).to.be.a("boolean")},t.isNotBoolean=function(l,n){new e(l,n,t.isNotBoolean,!0).to.not.be.a("boolean")},t.typeOf=function(l,n,u){new e(l,u,t.typeOf,!0).to.be.a(n)},t.notTypeOf=function(l,n,u){new e(l,u,t.notTypeOf,!0).to.not.be.a(n)},t.instanceOf=function(l,n,u){new e(l,u,t.instanceOf,!0).to.be.instanceOf(n)},t.notInstanceOf=function(l,n,u){new e(l,u,t.notInstanceOf,!0).to.not.be.instanceOf(n)},t.include=function(l,n,u){new e(l,u,t.include,!0).include(n)},t.notInclude=function(l,n,u){new e(l,u,t.notInclude,!0).not.include(n)},t.deepInclude=function(l,n,u){new e(l,u,t.deepInclude,!0).deep.include(n)},t.notDeepInclude=function(l,n,u){new e(l,u,t.notDeepInclude,!0).not.deep.include(n)},t.nestedInclude=function(l,n,u){new e(l,u,t.nestedInclude,!0).nested.include(n)},t.notNestedInclude=function(l,n,u){new e(l,u,t.notNestedInclude,!0).not.nested.include(n)},t.deepNestedInclude=function(l,n,u){new e(l,u,t.deepNestedInclude,!0).deep.nested.include(n)},t.notDeepNestedInclude=function(l,n,u){new e(l,u,t.notDeepNestedInclude,!0).not.deep.nested.include(n)},t.ownInclude=function(l,n,u){new e(l,u,t.ownInclude,!0).own.include(n)},t.notOwnInclude=function(l,n,u){new e(l,u,t.notOwnInclude,!0).not.own.include(n)},t.deepOwnInclude=function(l,n,u){new e(l,u,t.deepOwnInclude,!0).de
/*!
* ### .ifError(object)
*
* Asserts if value is not a false value, and throws if it is a true value.
* This is added to allow for chai to be a drop-in replacement for Node's
* assert class.
*
* var err = new Error('I am a custom error');
* assert.ifError(err); // Rethrows err!
*
* @name ifError
* @param {Object} object
* @namespace Assert
* @api public
*/,t.ifError=function(l){if(l)throw l},t.isExtensible=function(l,n){new e(l,n,t.isExtensible,!0).to.be.extensible},t.isNotExtensible=function(l,n){new e(l,n,t.isNotExtensible,!0).to.not.be.extensible},t.isSealed=function(l,n){new e(l,n,t.isSealed,!0).to.be.sealed},t.isNotSealed=function(l,n){new e(l,n,t.isNotSealed,!0).to.not.be.sealed},t.isFrozen=function(l,n){new e(l,n,t.isFrozen,!0).to.be.frozen},t.isNotFrozen=function(l,n){new e(l,n,t.isNotFrozen,!0).to.not.be.frozen},t.isEmpty=function(l,n){new e(l,n,t.isEmpty,!0).to.be.empty},t.isNotEmpty=function(l,n){new e(l,n,t.isNotEmpty,!0).to.not.be.empty},
/*!
* Aliases.
*/
function l(n,e){return t[e]=t[n],l}("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")}},function(l,n,e){(function(l,n){!function(l,e){"use strict";if(!l.setImmediate){var u,t,r,o,a,i=1,s={},c=!1,p=l.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(l);f=f&&f.setTimeout?f:l,"[object process]"==={}.toString.call(l.process)?u=function(l){n.nextTick(function(){h(l)})}:!function(){if(l.postMessage&&!l.importScripts){var n=!0,e=l.onmessage;return l.onmessage=function(){n=!1},l.postMessage("","*"),l.onmessage=e,n}}()?l.MessageChannel?((r=new MessageChannel).port1.onmessage=function(l){h(l.data)},u=function(l){r.port2.postMessage(l)}):p&&"onreadystatechange"in p.createElement("script")?(t=p.documentElement,u=function(l){var n=p.createElement("script");n.onreadystatechange=function(){h(l),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}):u=function(l){setTimeout(h,0,l)}:(o="setImmediate$"+Math.random()+"$",a=function(n){n.source===l&&"string"==typeof n.data&&0===n.data.indexOf(o)&&h(+n.data.slice(o.length))},l.addEventListener?l.addEventListener("message",a,!1):l.attachEvent("onmessage",a),u=function(n){l.postMessage(o+n,"*")}),f.setImmediate=function(l){"function"!=typeof l&&(l=new Function(""+l));for(var n=new Array(arguments.length-1),e=0;e<n.length;e++)n[e]=arguments[e+1];var t={callback:l,args:n};return s[i]=t,u(i),i++},f.clearImmediate=d}function d(l){delete s[l]}function h(l){if(c)setTimeout(h,0,l);else{var n=s[l];if(n){c=!0;try{!function(l){var n=l.callback,u=l.args;switch(u.length){case 0:n();break;case 1:n(u[0]);break;case 2:n(u[0],u[1]);break;case 3:n(u[0],u[1],u[2]);break;default:n.apply(e,u)}}(n)}finally{d(l),c=!1}}}}}("undefined"==typeof self?void 0===l?this:l:self)}).call(this,e(15),e(76))},function(l,n){var e,u,t=l.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(l){if(e===setTimeout)return setTimeout(l,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(l,0);try{return e(l,0)}catch(n){try{return e.call(null,l,0)}catch(n){return e.call(this,l,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:r}catch(l){e=r}try{u="function"==typeof clearTimeout?clearTimeout:o}catch(l){u=o}}();var i,s=[],c=!1,p=-1;function f(){c&&i&&(c=!1,i.length?s=i.concat(s):p=-1,s.length&&d())}function d(){if(!c){var l=a(f);c=!0;for(var n=s.length;n;){for(i=s,s=[];++p<n;)i&&i[p].run();p=-1,n=s.length}i=null,c=!1,function(l){if(u===clearTimeout)return clearTimeout(l);if((u===o||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(l);try{u(l)}catch(n){try{return u.call(null,l)}catch(n){return u.call(this,l)}}}(l)}}function h(l,n){this.fun=l,this.array=n}function m(){}t.nextTick=function(l){var n=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)n[e-1]=arguments[e];s.push(new h(l,n)),1!==s.length||c||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(l){return[]},t.binding=function(l){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(l){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(module,exports,__webpack_require__){"use strict";var chai=__webpack_require__(2),peg=__webpack_require__(0),sinon=__webpack_require__(40),expect=chai.expect;describe("PEG.js API",function(){describe("generate",function(){it("generates a parser",function(){var l=peg.generate("start = 'a'");expect(l).to.be.an("object"),expect(l.parse("a")).to.equal("a")}),it("throws an exception on syntax error",function(){expect(function(){peg.generat