Socket
Socket
Sign inDemoInstall

@cucumber/cucumber-expressions

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/cucumber-expressions - npm Package Compare versions

Comparing version 10.2.0 to 10.2.1

.idea/inspectionProfiles/Project_Default.xml

4

dist/src/Group.d.ts
export default class Group {
readonly value: string | null;
readonly value: string | undefined;
readonly start: number;
readonly end: number;
readonly children: ReadonlyArray<Group>;
constructor(value: string | null, start: number, end: number, children: ReadonlyArray<Group>);
constructor(value: string | undefined, start: number, end: number, children: ReadonlyArray<Group>);
get values(): string[];
}

@@ -12,5 +12,3 @@ "use strict";

get: function () {
return (this.children.length === 0 ? [this] : this.children)
.filter(function (g) { return typeof g.start !== 'undefined'; })
.map(function (g) { return g.value; });
return (this.children.length === 0 ? [this] : this.children).map(function (g) { return g.value; });
},

@@ -17,0 +15,0 @@ enumerable: false,

@@ -20,3 +20,3 @@ "use strict";

});
return new Group_1.default(match[groupIndex] || null, match.index[groupIndex], match.index[groupIndex] + (match[groupIndex] || '').length, children);
return new Group_1.default(match[groupIndex] || undefined, match.index[groupIndex], match.index[groupIndex] + (match[groupIndex] || '').length, children);
};

@@ -23,0 +23,0 @@ GroupBuilder.prototype.setNonCapturing = function () {

@@ -27,3 +27,3 @@ "use strict";

this.defineParameterType(new ParameterType_1.default('word', ParameterTypeRegistry.WORD_REGEXP, String, function (s) { return s; }, false, false));
this.defineParameterType(new ParameterType_1.default('string', ParameterTypeRegistry.STRING_REGEXP, String, function (s) { return (s || '').replace(/\\"/g, '"').replace(/\\'/g, "'"); }, true, false));
this.defineParameterType(new ParameterType_1.default('string', ParameterTypeRegistry.STRING_REGEXP, String, function (s1, s2) { return (s1 || s2 || '').replace(/\\"/g, '"').replace(/\\'/g, "'"); }, true, false));
this.defineParameterType(new ParameterType_1.default('', ParameterTypeRegistry.ANONYMOUS_REGEXP, String, function (s) { return s; }, false, true));

@@ -30,0 +30,0 @@ }

@@ -8,3 +8,5 @@ import GroupBuilder from './GroupBuilder';

constructor(regexp: RegExp | string);
private static createGroupBuilder;
private static isNonCapturing;
match(s: string): Group | null;
}

@@ -11,12 +11,14 @@ "use strict";

function TreeRegexp(regexp) {
var _this = this;
this.regexp = 'string' === typeof regexp ? new RegExp(regexp) : regexp;
this.regex = new becke_ch__regex__s0_0_v1__base__pl__lib_1.default(this.regexp.source, this.regexp.flags);
this.groupBuilder = TreeRegexp.createGroupBuilder(this.regex);
}
TreeRegexp.createGroupBuilder = function (regexp) {
var source = regexp.source;
var stack = [new GroupBuilder_1.default()];
var groupStartStack = [];
var last = null;
var escaping = false;
var nonCapturingMaybe = false;
var charClass = false;
this.regexp.source.split('').forEach(function (c, n) {
for (var i = 0; i < source.length; i++) {
var c = source[i];
if (c === '[' && !escaping) {

@@ -29,5 +31,9 @@ charClass = true;

else if (c === '(' && !escaping && !charClass) {
stack.push(new GroupBuilder_1.default());
groupStartStack.push(n + 1);
nonCapturingMaybe = false;
groupStartStack.push(i);
var nonCapturing = TreeRegexp.isNonCapturing(source, i);
var groupBuilder = new GroupBuilder_1.default();
if (nonCapturing) {
groupBuilder.setNonCapturing();
}
stack.push(groupBuilder);
}

@@ -38,3 +44,3 @@ else if (c === ')' && !escaping && !charClass) {

if (gb.capturing) {
gb.source = _this.regexp.source.substring(groupStart, n);
gb.source = source.substring(groupStart + 1, i);
stack[stack.length - 1].add(gb);

@@ -45,18 +51,22 @@ }

}
nonCapturingMaybe = false;
}
else if (c === '?' && last === '(') {
nonCapturingMaybe = true;
}
else if ((c === ':' || c === '!' || c === '=' || c === '<') &&
last === '?' &&
nonCapturingMaybe) {
stack[stack.length - 1].setNonCapturing();
nonCapturingMaybe = false;
}
escaping = c === '\\' && !escaping;
last = c;
});
this.groupBuilder = stack.pop();
}
}
return stack.pop();
};
TreeRegexp.isNonCapturing = function (source, i) {
// Regex is valid. Bounds check not required.
if (source[i + 1] != '?') {
// (X)
return false;
}
if (source[i + 2] != '<') {
// (?:X)
// (?=X)
// (?!X)
return true;
}
// (?<=X) or (?<!X) else (?<name>X)
return source[i + 3] == '=' || source[i + 3] == '!';
};
TreeRegexp.prototype.match = function (s) {

@@ -63,0 +73,0 @@ var match = this.regex.exec(s);

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -200,2 +200,18 @@ "use strict";

});
it('unmatched optional groups have undefined values', function () {
var parameterTypeRegistry = new ParameterTypeRegistry_1.default();
parameterTypeRegistry.defineParameterType(new ParameterType_1.default('textAndOrNumber', /([A-Z]+)?(?: )?([0-9]+)?/, null, function (s1, s2) {
return [s1, s2];
}, false, true));
var expression = new CucumberExpression_1.default('{textAndOrNumber}', parameterTypeRegistry);
var world = {};
assert_1.default.deepStrictEqual(expression.match("TLA")[0].getValue(world), [
'TLA',
undefined,
]);
assert_1.default.deepStrictEqual(expression.match("123")[0].getValue(world), [
undefined,
'123',
]);
});
// JavaScript-specific

@@ -202,0 +218,0 @@ it('delegates transform to custom object', function () {

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -54,6 +54,13 @@ "use strict";

});
it('matches named capturing group', function () {
var tr = new TreeRegexp_1.default(/a(?<name>b)c/);
var group = tr.match('abc');
assert_1.default.strictEqual(group.value, 'abc');
assert_1.default.strictEqual(group.children.length, 1);
assert_1.default.strictEqual(group.children[0].value, 'b');
});
it('matches optional group', function () {
var tr = new TreeRegexp_1.default(/^Something( with an optional argument)?/);
var group = tr.match('Something');
assert_1.default.strictEqual(group.children[0].value, null);
assert_1.default.strictEqual(group.children[0].value, undefined);
});

@@ -97,3 +104,3 @@ it('matches nested groups', function () {

assert_1.default.strictEqual(group.value, 'the stdout');
assert_1.default.strictEqual(group.children[0].value, null);
assert_1.default.strictEqual(group.children[0].value, undefined);
assert_1.default.strictEqual(group.children.length, 1);

@@ -106,2 +113,16 @@ });

});
it('empty capturing group', function () {
var tr = new TreeRegexp_1.default(/()/);
var group = tr.match('');
// TODO: Would expect the empty string here
assert_1.default.strictEqual(group.value, undefined);
assert_1.default.strictEqual(group.children.length, 1);
});
it('empty look ahead', function () {
var tr = new TreeRegexp_1.default(/(?<=)/);
var group = tr.match('');
// TODO: Would expect the empty string here
assert_1.default.strictEqual(group.value, undefined);
assert_1.default.strictEqual(group.children.length, 0);
});
it('does not consider parenthesis in character class as group', function () {

@@ -108,0 +129,0 @@ var tr = new TreeRegexp_1.default(/^drawings: ([A-Z, ()]+)$/);

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

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),o=/([[\]()$.|?*+])/,u=function(){function e(t,r,o,u,a,s){this.name=t,this.type=o,this.useForSnippets=a,this.preferForRegexpMatch=s,void 0===u&&(u=function(e){return e}),void 0===a&&(this.useForSnippets=!0),void 0===s&&(this.preferForRegexpMatch=!1),t&&e.checkParameterTypeName(t),this.regexpStrings=function(e){return(Array.isArray(e)?e:[e]).map((function(e){return e instanceof RegExp?function(e){var t,r,o=function(e){var t=e.flags;void 0===t&&(t="",e.ignoreCase&&(t+="i"),e.global&&(t+="g"),e.multiline&&(t+="m"));return t}(e);try{for(var u=n(["g","i","m","y"]),a=u.next();!a.done;a=u.next()){var s=a.value;if(-1!==o.indexOf(s))throw new i.CucumberExpressionError("ParameterType Regexps can't use flag '"+s+"'")}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return e.source}(e):e}))}(r),this.transformFn=u}return e.compare=function(e,t){return e.preferForRegexpMatch&&!t.preferForRegexpMatch?-1:t.preferForRegexpMatch&&!e.preferForRegexpMatch?1:e.name.localeCompare(t.name)},e.checkParameterTypeName=function(e){var t=e.replace(/(\\([[$.|?*+\]]))/g,"$2"),r=t.match(o);if(r)throw new i.CucumberExpressionError("Illegal character '"+r[1]+"' in parameter name {"+t+"}")},e.prototype.transform=function(e,t){return this.transformFn.apply(e,t)},e}();t.default=u},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CucumberExpressionError=t.UndefinedParameterTypeError=t.AmbiguousParameterTypeError=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Error);t.CucumberExpressionError=o;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.forConstructor=function(e,t,r,n){return new this("parameter type with "+e+"="+t+" is used by several parameter types: "+r+", "+n)},t.forRegExp=function(e,t,r,n){return new this("Your Regular Expression "+t+"\nmatches multiple parameter types with regexp "+e+":\n "+this._parameterTypeNames(r)+"\n\nI couldn't decide which one to use. You have two options:\n\n1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:\n "+this._expressions(n)+"\n\n2) Make one of the parameter types preferential and continue to use a Regular Expression.\n")},t._parameterTypeNames=function(e){return e.map((function(e){return"{"+e.name+"}"})).join("\n ")},t._expressions=function(e){return e.map((function(e){return e.source})).join("\n ")},t}(o);t.AmbiguousParameterTypeError=u;var a=function(e){function t(t){var r=e.call(this,"Undefined parameter type {"+t+"}")||this;return r.undefinedParameterTypeName=t,r}return i(t,e),t}(o);t.UndefinedParameterTypeError=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(){function e(e,t){this.group=e,this.parameterType=t,this.group=e,this.parameterType=t}return e.build=function(t,r,i){var o=t.match(r);if(!o)return null;var u=o.children;if(u.length!==i.length)throw new n.CucumberExpressionError("Expression "+t.regexp+" has "+u.length+" capture groups ("+u.map((function(e){return e.value}))+"), but there were "+i.length+" parameter types ("+i.map((function(e){return e.name}))+")");return i.map((function(t,r){return new e(u[r],t)}))},e.prototype.getValue=function(e){var t=this.group?this.group.values:null;return this.parameterType.transform(e,t)},e.prototype.getParameterType=function(){return this.parameterType},e}();t.default=i,e.exports=i},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(0)),u=i(r(4)),a=i(r(2)),s=r(1),c=function(){function e(e,t){this.expression=e,this.parameterTypeRegistry=t,this.parameterTypes=[];var r=this.processEscapes(e);r=this.processOptional(r),r=this.processAlternation(r),r="^"+(r=this.processParameters(r,t))+"$",this.treeRegexp=new u.default(r)}return e.prototype.processEscapes=function(e){return e.replace(/([\\^[$.|?*+])/g,"\\$1")},e.prototype.processOptional=function(e){var t=this;return e.replace(/(\\\\)?\(([^)]+)\)/g,(function(e,r,n){return"\\\\"===r?"\\("+n+"\\)":(t.checkNoParameterType(n,"Parameter types cannot be optional: "),"(?:"+n+")?")}))},e.prototype.processAlternation=function(e){var t=this;return e.replace(/([^\s^/]+)((\/[^\s^/]+)+)/g,(function(e){var r,i,o=e.replace(/\//g,"|").replace(/\\\|/g,"/");if(-1!==o.indexOf("|")){try{for(var u=n(o.split(/\|/)),a=u.next();!a.done;a=u.next()){var s=a.value;t.checkNoParameterType(s,"Parameter types cannot be alternative: ")}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return"(?:"+o+")"}return o}))},e.prototype.processParameters=function(e,t){var r=this;return e.replace(/(\\\\)?{([^}]*)}/g,(function(e,n,i){if("\\\\"===n)return"\\{"+i+"\\}";var u=i;o.default.checkParameterTypeName(u);var a=t.lookupByTypeName(u);if(!a)throw new s.UndefinedParameterTypeError(u);return r.parameterTypes.push(a),function(e){if(1===e.length)return"("+e[0]+")";return"("+e.map((function(e){return"(?:"+e+")"})).join("|")+")"}(a.regexpStrings)}))},e.prototype.match=function(e){return a.default.build(this.treeRegexp,e,this.parameterTypes)},Object.defineProperty(e.prototype,"regexp",{get:function(){return this.treeRegexp.regexp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.expression},enumerable:!1,configurable:!0}),e.prototype.checkNoParameterType=function(e,t){if(e.match(/(\\\\)?{([^}]*)}/g))throw new s.CucumberExpressionError(t+this.source)},e}();t.default=c},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(11)),o=n(r(12)),u=function(){function e(e){var t=this;this.regexp="string"==typeof e?new RegExp(e):e,this.regex=new o.default(this.regexp.source,this.regexp.flags);var r=[new i.default],n=[],u=null,a=!1,s=!1,c=!1;this.regexp.source.split("").forEach((function(e,o){if("["!==e||a)if("]"!==e||a)if("("!==e||a||c)if(")"!==e||a||c)"?"===e&&"("===u?s=!0:":"!==e&&"!"!==e&&"="!==e&&"<"!==e||"?"!==u||!s||(r[r.length-1].setNonCapturing(),s=!1);else{var l=r.pop(),p=n.pop();l.capturing?(l.source=t.regexp.source.substring(p,o),r[r.length-1].add(l)):l.moveChildrenTo(r[r.length-1]),s=!1}else r.push(new i.default),n.push(o+1),s=!1;else c=!1;else c=!0;a="\\"===e&&!a,u=e})),this.groupBuilder=r.pop()}return e.prototype.match=function(e){var t=this.regex.exec(e);if(!t)return null;var r=0;return this.groupBuilder.build(t,(function(){return r++}))},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,r,n){this.value=e,this.start=t,this.end=r,this.children=n}return Object.defineProperty(e.prototype,"values",{get:function(){return(0===this.children.length?[this]:this.children).filter((function(e){return void 0!==e.start})).map((function(e){return e.value}))},enumerable:!1,configurable:!0}),e}();t.default=n},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(2)),o=n(r(4)),u=n(r(0)),a=function(){function e(e,t){this.regexp=e,this.parameterTypeRegistry=t,this.treeRegexp=new o.default(e)}return e.prototype.match=function(e){var t=this,r=this.treeRegexp.groupBuilder.children.map((function(r){var n=r.source;return t.parameterTypeRegistry.lookupByRegexp(n,t.regexp,e)||new u.default(null,n,String,(function(e){return void 0===e?null:e}),!1,!1)}));return i.default.build(this.treeRegexp,e,r)},Object.defineProperty(e.prototype,"source",{get:function(){return this.regexp.source},enumerable:!1,configurable:!0}),e}();t.default=a},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(14)),u=i(r(0)),a=i(r(8)),s=i(r(18)),c=function(){function e(e){this.parameterTypeRegistry=e}return e.prototype.generateExpressions=function(e){for(var t=[],r=this.createParameterTypeMatchers(e),i="",a=0,c=function(){var s,c,p,f,h=[];try{for(var y=(s=void 0,n(r)),g=y.next();!g.done;g=y.next()){var d=(_=g.value).advanceTo(a);d.find&&h.push(d)}}catch(e){s={error:e}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}if(!(h.length>0))return"break";var m=(h=h.sort(o.default.compare))[0],v=h.filter((function(e){return 0===o.default.compare(e,m)})),b=[];try{for(var x=(p=void 0,n(v)),w=x.next();!w.done;w=x.next()){var _=w.value;-1===b.indexOf(_.parameterType)&&b.push(_.parameterType)}}catch(e){p={error:e}}finally{try{w&&!w.done&&(f=x.return)&&f.call(x)}finally{if(p)throw p.error}}return b=b.sort(u.default.compare),t.push(b),i+=l(e.slice(a,m.start)),i+="{%s}",(a=m.start+m.group.length)>=e.length?"break":void 0};;){if("break"===c())break}return i+=l(e.slice(a)),new s.default(i,t).generateExpressions()},e.prototype.generateExpression=function(e){var t=this;return a.default.deprecate((function(){return t.generateExpressions(e)[0]}),"CucumberExpressionGenerator.generateExpression: Use CucumberExpressionGenerator.generateExpressions instead")()},e.prototype.createParameterTypeMatchers=function(t){var r,i,o=[];try{for(var u=n(this.parameterTypeRegistry.parameterTypes),a=u.next();!a.done;a=u.next()){var s=a.value;s.useForSnippets&&(o=o.concat(e.createParameterTypeMatchers2(s,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return o},e.createParameterTypeMatchers2=function(e,t){var r,i,u=[];try{for(var a=n(e.regexpStrings),s=a.next();!s.done;s=a.next()){var c=s.value;u.push(new o.default(e,c,t))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return u},e}();function l(e){return e.replace(/%/g,"%%").replace(/\(/g,"\\(").replace(/{/g,"\\{").replace(/\//g,"\\/")}t.default=c,e.exports=c},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,u=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])g(s)||!x(s)?u+=" "+s:u+=" "+a(s);return u},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,u={};function a(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),l(n,e,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=l(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(d(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var u=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),_(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(r);if(0===u.length){if(T(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(_(r))return p(r)}var c,x="",E=!1,O=["{","}"];(h(r)&&(E=!0,O=["[","]"]),T(r))&&(x=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(x=" "+RegExp.prototype.toString.call(r)),w(r)&&(x=" "+Date.prototype.toUTCString.call(r)),_(r)&&(x=" "+p(r)),0!==u.length||E&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=E?function(e,t,r,n,i){for(var o=[],u=0,a=t.length;u<a;++u)S(t,String(u))?o.push(f(e,t,r,n,String(u),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,r,n,a,u):u.map((function(t){return f(e,r,n,a,t,E)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,x,O)):O[0]+x+O[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,o){var u,a,s;if((s=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(a=e.stylize("[Setter]","special")),S(n,i)||(u="["+i+"]"),a||(e.seen.indexOf(s.value)<0?(a=g(r)?l(e,s.value,null):l(e,s.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(u)){if(o&&i.match(/^\d+$/))return a;(u=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+a}function h(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function g(e){return null===e}function d(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return x(e)&&"[object RegExp]"===E(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===E(e)}function _(e){return x(e)&&("[object Error]"===E(e)||e instanceof Error)}function T(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(o)&&(o=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!u[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;u[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else u[r]=function(){};return u[r]},t.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=y,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=x,t.isDate=w,t.isError=_,t.isFunction=T,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(16);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=r(17),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var t;if("function"!=typeof(t=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),R&&Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=R,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,u=function(){return i.apply(o,arguments)};t.apply(this,r).then((function(t){e.nextTick(u,null,t)}),(function(t){e.nextTick(A,t,u)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(15))},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var u=o(r(10));window.CucumberExpressions=u},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterType=t.ParameterTypeRegistry=t.CucumberExpressionGenerator=t.ExpressionFactory=t.RegularExpression=t.CucumberExpression=t.Group=t.Argument=void 0;var i=n(r(2));t.Argument=i.default;var o=n(r(3));t.CucumberExpression=o.default;var u=n(r(6));t.RegularExpression=u.default;var a=n(r(5));t.Group=a.default;var s=n(r(13));t.ExpressionFactory=s.default;var c=n(r(7));t.CucumberExpressionGenerator=c.default;var l=n(r(20));t.ParameterTypeRegistry=l.default;var p=n(r(0));t.ParameterType=p.default},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(5)),o=function(){function e(){this.capturing=!0,this.groupBuilders=[]}return e.prototype.add=function(e){this.groupBuilders.push(e)},e.prototype.build=function(e,t){var r=t(),n=this.groupBuilders.map((function(r){return r.build(e,t)}));return new i.default(e[r]||null,e.index[r],e.index[r]+(e[r]||"").length,n)},e.prototype.setNonCapturing=function(){this.capturing=!1},Object.defineProperty(e.prototype,"children",{get:function(){return this.groupBuilders},enumerable:!1,configurable:!0}),e.prototype.moveChildrenTo=function(e){this.groupBuilders.forEach((function(t){return e.add(t)}))},e}();t.default=o},function(e,t,r){function n(e,t){var r=!1;if(e instanceof RegExp&&(e=e.source,r=!0),e){this.regexGroupStructure=function(e){if(!e)return console.error('The "regex" is empty! Returning empty array!'),[];var t=[],r=[""],n=[];n[0]=!1;var o=function e(t,r,n,o,u,a){var s;n?(s=[r[1],r[2],"",[]],o[r[2]]=r[1]):s=[void 0,void 0,"",[]];var c,l="";for(r[0];r[0]<t.length;r[0]++)if("\\"!==(c=t.charAt(r[0])))if("["!==c)if("|"!==c){if(")"===c)return s[2]+=l+")",u[0]+=")",s;if("("===c){var p;l&&(r[1]++,l="("+l+")",s[3].push([r[1],void 0,l,[]])),r[0]++;var f=r[1]+1;if(n=!0,"?"===t.charAt(r[0])&&r[0]+1<t.length&&("="===t.charAt(r[0]+1)||"!"===t.charAt(r[0]+1)||":"===t.charAt(r[0]+1))){r[0]++;var h=t.charAt(r[0]);r[0]++,":"===h&&(n=!1),u[0]+="(?"+h,(p=e(t,r,!1,o,u,a))[2]="(?"+h+p[2]}else r[1]++,r[2]++,u[0]+="(",(p=e(t,r,!0,o,u,a))[2]="("+p[2];var y=r[0],g="";if(r[0]+1<t.length){if("*"===(c=t.charAt(r[0]+1)))r[0]++,g="*";else if("+"===c)r[0]++,g="+";else if("?"===c)r[0]++,g="?";else if("{"===c){for(r[0]++,g="{",r[0]++,c=t.charAt(r[0]);c>="0"&&c<="9"&&r[0]<t.length;)g+=c,r[0]++,c=t.charAt(r[0]);if("}"===c)g+="}";else if(","===c){for(g+=",",r[0]++,c=t.charAt(r[0]);c>="0"&&c<="9"&&r[0]<t.length;)g+=c,r[0]++,c=t.charAt(r[0]);"}"===c?g+="}":g=""}else g=""}g.length>0?(p[2]+=g,u[0]+=g,"?"===t.charAt(r[0]+1)&&(r[0]++,p[2]+="?",u[0]+="?")):r[0]=y}(g.length>0||!n)&&(i(p,o),p=[f,void 0,"("+p[2]+")",[p]],r[1]++),s[2]+=l+p[2],s[3].push(p),l=""}else c=t.charAt(r[0]),l+=c,u[0]+="/"===c?"\\"+c:c}else s[2]+=l+"|",l="",u[0]+="|";else{if(l+="[",u[0]+="[",r[0]+1===t.length)continue;for(r[0]++,c=t.charAt(r[0]);("]"!==c||"\\"===t.charAt(r[0]-1)&&"\\"!==t.charAt(r[0]-2))&&r[0]<t.length;)l+=c,u[0]+=c,r[0]++,c=t.charAt(r[0]);l+=c,u[0]+=c}else{if(r[0]+1===t.length){l+="\\",u[0]+="\\";continue}r[0]++,c=t.charAt(r[0]);for(var d="";c>="0"&&c<="9";)d+=c,r[0]++,c=t.charAt(r[0]);d?(o[d]?(l+="\\"+d,a[0]=!0):d.indexOf("8")>=0||d.indexOf("9")>=0?l+=d:l+="\\x"+("0"+parseInt(d,8).toString(16)).slice(-2).toUpperCase(),u[0]+="\\"+d,r[0]--):(l+="\\"+c,u[0]+="\\"+c)}return s[2]+=l,s}(e,[0,0,0],!0,t,r,n);if(n[0]){var u=function(e){for(var r,n="",i=0;i<e[2].length;i++)if(n+=r=e[2].charAt(i),"\\"!==r)if("["!==r);else{if(i+1===e[2].length)continue;for(i++,r=e[2].charAt(i);("]"!==r||"\\"===e[2].charAt(i-1)&&"\\"!==e[2].charAt(i-2))&&i<e[2].length;)n+=r,i++,r=e[2].charAt(i);n+=r}else{if(i+1===e[2].length)continue;i++,r=e[2].charAt(i);for(var o="";r>="0"&&r<="9";)o+=r,i++,r=e[2].charAt(i);o?(n+=t[o],i--):n+=r}e[2]=n;for(var a=0;a<e[3].length;a++)u(e[3][a])};u(o)}return[o,t,r]}(e),this.source=r?e:this.regexGroupStructure[2][0];try{this.regex=new RegExp(this.regexGroupStructure[0][2],t)}catch(r){new RegExp(e,t)}}else this.regex=new RegExp(e,t),this.source=this.regex.source;this.flags=this.regex.flags,this.global=this.regex.global,this.ignoreCase=this.regex.ignoreCase,this.multiline=this.regex.multiline,this.sticky=this.regex.sticky,this.unicode=this.regex.unicode,this.lastIndex=this.regex.lastIndex}function i(e,t){e[0]&&(e[0]++,e[1]&&(t[e[1]]=e[0]));for(var r=0;r<e[3].length;r++)i(e[3][r],t)}Symbol="undefined"==typeof Symbol?[]:Symbol,n.prototype=Object.create(RegExp.prototype,{flags:{value:null,enumerable:!0,configurable:!0,writable:!0},global:{value:null,enumerable:!0,configurable:!0,writable:!0},ignoreCase:{value:null,enumerable:!0,configurable:!0,writable:!0},multiline:{value:null,enumerable:!0,configurable:!0,writable:!0},source:{value:null,enumerable:!0,configurable:!0,writable:!0},sticky:{value:null,enumerable:!0,configurable:!0,writable:!0},unicode:{value:null,enumerable:!0,configurable:!0,writable:!0}}),n.prototype.constructor=n,n.prototype.toString=function(){return"/"+this.source+"/"+this.flags},n.prototype.test=function(e){return this.regex.test(e)},n.prototype[Symbol.search]=function(e){return this.regex[Symbol.search](e)},n.prototype[Symbol.split]=function(e,t){return this.regex[Symbol.split](e)},n.prototype.exec=function(e){var t=[];t.index=[];var r=this.regex.exec(e);if(this.lastIndex=this.regex.lastIndex,!r)return r;t[0]=r[0],t.index[0]=r.index,t.input=e;var n=function(e,i){for(var o=e,u=0;u<i.length;u++){var a=i[u][0],s=i[u][1];s&&(t[s]=r[a],void 0===t[s]?t.index[s]=void 0:t.index[s]=o),i[u][3]&&n(o,i[u][3]),void 0!==r[a]&&(o+=r[a].length)}};return this.regexGroupStructure&&this.regexGroupStructure[0][3]&&n(r.index,this.regexGroupStructure[0][3]),t},n.prototype[Symbol.match]=function(e){this.lastIndex=0,this.regex.lastIndex=0;var t=this.exec(e);if(!t)return null;for(var r=[];t&&(r.push(t),0===t[0].length&&this.regex.lastIndex++,this.global);)t=this.exec(e);return this.lastIndex=0,this.regex.lastIndex=0,r},n.prototype[Symbol.replace]=function(e,t){if(this.lastIndex=0,this.regex.lastIndex=0,!e)return e;var r=this.exec(e);if(!r)return e;t instanceof Array||(t=[t]);for(var n="",i=0,o=function(n){var i="",o="",u=t[n];if("string"==typeof u)for(var a=0;a<u.length;a++)if("$"===(o=u.charAt(a)))if(a++,"$"===(o=u.charAt(a)))i+="$";else if("&"===o)i+=r[n];else if("`"===o)i+=e.substring(0,r.index[n]);else if("'"===o)i+=e.substring(r.index[n]+r[n].length);else if(o>="0"&&o<="9"){var s=o;for(a++,o=u.charAt(a);o>="0"&&o<="9";)s+=o,a++,o=u.charAt(a);a--,r[s]?i+=r[s]:i+="$"+s}else i+="$"+o;else i+=o;else if(u instanceof Function){for(var c=[r[n]],l=0;l<r.length;l++)c.push(r[l]);for(var p=0;l<r.index.length;p++)c.push(r.index[p]);c.push(e),i+=u.apply(this,c)}return i},u=function(a){for(var s=0;s<a.length;s++){var c=a[s][1];c?t[c]||""===t[c]?(r[c]||""===r[c])&&(n+=e.substring(i,r.index[c])+o(c),i=r.index[c]+r[c].length):a[s][3]&&u(a[s][3]):u(a[s][3])}};r&&(t[0]||""===t[0]?(n+=e.substring(i,r.index[0])+o(0),i=r.index[0]+r[0].length):this.regexGroupStructure&&this.regexGroupStructure[0][3]&&u(this.regexGroupStructure[0][3]),0===r[0].length&&this.regex.lastIndex++,this.global);)r=this.exec(e);return this.lastIndex=0,this.regex.lastIndex=0,n+e.substring(i,e.length)},e.exports=n},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(3)),o=n(r(6)),u=function(){function e(e){this.parameterTypeRegistry=e}return e.prototype.createExpression=function(e){return"string"==typeof e?new i.default(e,this.parameterTypeRegistry):new o.default(e,this.parameterTypeRegistry)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,r,n){void 0===n&&(n=0),this.parameterType=e,this.regexpString=t,this.text=r,this.matchPosition=n;var i=new RegExp("("+t+")");this.match=i.exec(r.slice(this.matchPosition))}return e.prototype.advanceTo=function(t){for(var r=t;r<this.text.length;r++){var n=new e(this.parameterType,this.regexpString,this.text,r);if(n.find)return n}return new e(this.parameterType,this.regexpString,this.text,this.text.length)},Object.defineProperty(e.prototype,"find",{get:function(){return this.match&&""!==this.group&&this.fullWord},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.matchPosition+this.match.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullWord",{get:function(){return this.matchStartWord&&this.matchEndWord},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matchStartWord",{get:function(){return 0===this.start||this.text[this.start-1].match(/\s|\p{P}/u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matchEndWord",{get:function(){var e=this.start+this.group.length;return e===this.text.length||this.text[e].match(/\s|\p{P}/u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.match[0]},enumerable:!1,configurable:!0}),e.compare=function(e,t){var r=e.start-t.start;if(0!==r)return r;var n=t.group.length-e.group.length;return 0!==n?n:0},e}();t.default=n,e.exports=n},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(e){n=u}}();var s,c=[],l=!1,p=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++p<t;)s&&s[p].run();p=-1,t=c.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||l||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(19)),o=function(){function e(e,t){this.expressionTemplate=e,this.parameterTypeCombinations=t,this.expressionTemplate=e}return e.prototype.generateExpressions=function(){var e=[];return this.generatePermutations(e,0,[]),e},e.prototype.generatePermutations=function(e,t,r){if(!(e.length>=256))if(t!==this.parameterTypeCombinations.length)for(var n=0;n<this.parameterTypeCombinations[t].length;++n){if(e.length>=256)return;var o=r.slice();o.push(this.parameterTypeCombinations[t][n]),this.generatePermutations(e,t+1,o)}else e.push(new i.default(this.expressionTemplate,r))},e}();t.default=o},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=o(r(8)),a=function(){function e(e,t){this.expressionTemplate=e,this.parameterTypes=t}return Object.defineProperty(e.prototype,"source",{get:function(){return u.default.format.apply(u.default,i([this.expressionTemplate],this.parameterTypes.map((function(e){return e.name}))))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterNames",{get:function(){var e={};return this.parameterTypes.map((function(t){return function(e,t){var r=t[e];return r=r?r+1:1,t[e]=r,1===r?e:""+e+r}(t.name,e)}))},enumerable:!1,configurable:!0}),e}();t.default=a},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(0)),u=i(r(7)),a=r(1),s=function(){function e(){this.parameterTypeByName=new Map,this.parameterTypesByRegexp=new Map,this.defineParameterType(new o.default("int",e.INTEGER_REGEXPS,Number,(function(e){return void 0===e?null:Number(e)}),!0,!0)),this.defineParameterType(new o.default("float",e.FLOAT_REGEXP,Number,(function(e){return void 0===e?null:parseFloat(e)}),!0,!1)),this.defineParameterType(new o.default("word",e.WORD_REGEXP,String,(function(e){return e}),!1,!1)),this.defineParameterType(new o.default("string",e.STRING_REGEXP,String,(function(e){return(e||"").replace(/\\"/g,'"').replace(/\\'/g,"'")}),!0,!1)),this.defineParameterType(new o.default("",e.ANONYMOUS_REGEXP,String,(function(e){return e}),!1,!0))}return Object.defineProperty(e.prototype,"parameterTypes",{get:function(){return this.parameterTypeByName.values()},enumerable:!1,configurable:!0}),e.prototype.lookupByTypeName=function(e){return this.parameterTypeByName.get(e)},e.prototype.lookupByRegexp=function(e,t,r){var n=this.parameterTypesByRegexp.get(e);if(!n)return null;if(n.length>1&&!n[0].preferForRegexpMatch){var i=new u.default(this).generateExpressions(r);throw a.AmbiguousParameterTypeError.forRegExp(e,t,n,i)}return n[0]},e.prototype.defineParameterType=function(e){var t,r;if(void 0!==e.name){if(this.parameterTypeByName.has(e.name))throw 0===e.name.length?new Error("The anonymous parameter type has already been defined"):new Error("There is already a parameter type with name "+e.name);this.parameterTypeByName.set(e.name,e)}try{for(var i=n(e.regexpStrings),u=i.next();!u.done;u=i.next()){var s=u.value;this.parameterTypesByRegexp.has(s)||this.parameterTypesByRegexp.set(s,[]);var c=this.parameterTypesByRegexp.get(s),l=c[0];if(c.length>0&&l.preferForRegexpMatch&&e.preferForRegexpMatch)throw new a.CucumberExpressionError("There can only be one preferential parameter type per regexp. The regexp /"+s+"/ is used for two preferential parameter types, {"+l.name+"} and {"+e.name+"}");-1===c.indexOf(e)&&(c.push(e),this.parameterTypesByRegexp.set(s,c.sort(o.default.compare)))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.INTEGER_REGEXPS=[/-?\d+/,/\d+/],e.FLOAT_REGEXP=/(?=.*\d.*)[-+]?\d*(?:\.(?=\d.*))?\d*(?:\d+[E][+-]?\d+)?/,e.WORD_REGEXP=/[^\s]+/,e.STRING_REGEXP=/"([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'/,e.ANONYMOUS_REGEXP=/.*/,e}();t.default=s,e.exports=s}]);
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),o=/([[\]()$.|?*+])/,u=function(){function e(t,r,o,u,a,s){this.name=t,this.type=o,this.useForSnippets=a,this.preferForRegexpMatch=s,void 0===u&&(u=function(e){return e}),void 0===a&&(this.useForSnippets=!0),void 0===s&&(this.preferForRegexpMatch=!1),t&&e.checkParameterTypeName(t),this.regexpStrings=function(e){return(Array.isArray(e)?e:[e]).map((function(e){return e instanceof RegExp?function(e){var t,r,o=function(e){var t=e.flags;void 0===t&&(t="",e.ignoreCase&&(t+="i"),e.global&&(t+="g"),e.multiline&&(t+="m"));return t}(e);try{for(var u=n(["g","i","m","y"]),a=u.next();!a.done;a=u.next()){var s=a.value;if(-1!==o.indexOf(s))throw new i.CucumberExpressionError("ParameterType Regexps can't use flag '"+s+"'")}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return e.source}(e):e}))}(r),this.transformFn=u}return e.compare=function(e,t){return e.preferForRegexpMatch&&!t.preferForRegexpMatch?-1:t.preferForRegexpMatch&&!e.preferForRegexpMatch?1:e.name.localeCompare(t.name)},e.checkParameterTypeName=function(e){var t=e.replace(/(\\([[$.|?*+\]]))/g,"$2"),r=t.match(o);if(r)throw new i.CucumberExpressionError("Illegal character '"+r[1]+"' in parameter name {"+t+"}")},e.prototype.transform=function(e,t){return this.transformFn.apply(e,t)},e}();t.default=u},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CucumberExpressionError=t.UndefinedParameterTypeError=t.AmbiguousParameterTypeError=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Error);t.CucumberExpressionError=o;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.forConstructor=function(e,t,r,n){return new this("parameter type with "+e+"="+t+" is used by several parameter types: "+r+", "+n)},t.forRegExp=function(e,t,r,n){return new this("Your Regular Expression "+t+"\nmatches multiple parameter types with regexp "+e+":\n "+this._parameterTypeNames(r)+"\n\nI couldn't decide which one to use. You have two options:\n\n1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:\n "+this._expressions(n)+"\n\n2) Make one of the parameter types preferential and continue to use a Regular Expression.\n")},t._parameterTypeNames=function(e){return e.map((function(e){return"{"+e.name+"}"})).join("\n ")},t._expressions=function(e){return e.map((function(e){return e.source})).join("\n ")},t}(o);t.AmbiguousParameterTypeError=u;var a=function(e){function t(t){var r=e.call(this,"Undefined parameter type {"+t+"}")||this;return r.undefinedParameterTypeName=t,r}return i(t,e),t}(o);t.UndefinedParameterTypeError=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(){function e(e,t){this.group=e,this.parameterType=t,this.group=e,this.parameterType=t}return e.build=function(t,r,i){var o=t.match(r);if(!o)return null;var u=o.children;if(u.length!==i.length)throw new n.CucumberExpressionError("Expression "+t.regexp+" has "+u.length+" capture groups ("+u.map((function(e){return e.value}))+"), but there were "+i.length+" parameter types ("+i.map((function(e){return e.name}))+")");return i.map((function(t,r){return new e(u[r],t)}))},e.prototype.getValue=function(e){var t=this.group?this.group.values:null;return this.parameterType.transform(e,t)},e.prototype.getParameterType=function(){return this.parameterType},e}();t.default=i,e.exports=i},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(0)),u=i(r(4)),a=i(r(2)),s=r(1),c=function(){function e(e,t){this.expression=e,this.parameterTypeRegistry=t,this.parameterTypes=[];var r=this.processEscapes(e);r=this.processOptional(r),r=this.processAlternation(r),r="^"+(r=this.processParameters(r,t))+"$",this.treeRegexp=new u.default(r)}return e.prototype.processEscapes=function(e){return e.replace(/([\\^[$.|?*+])/g,"\\$1")},e.prototype.processOptional=function(e){var t=this;return e.replace(/(\\\\)?\(([^)]+)\)/g,(function(e,r,n){return"\\\\"===r?"\\("+n+"\\)":(t.checkNoParameterType(n,"Parameter types cannot be optional: "),"(?:"+n+")?")}))},e.prototype.processAlternation=function(e){var t=this;return e.replace(/([^\s^/]+)((\/[^\s^/]+)+)/g,(function(e){var r,i,o=e.replace(/\//g,"|").replace(/\\\|/g,"/");if(-1!==o.indexOf("|")){try{for(var u=n(o.split(/\|/)),a=u.next();!a.done;a=u.next()){var s=a.value;t.checkNoParameterType(s,"Parameter types cannot be alternative: ")}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return"(?:"+o+")"}return o}))},e.prototype.processParameters=function(e,t){var r=this;return e.replace(/(\\\\)?{([^}]*)}/g,(function(e,n,i){if("\\\\"===n)return"\\{"+i+"\\}";var u=i;o.default.checkParameterTypeName(u);var a=t.lookupByTypeName(u);if(!a)throw new s.UndefinedParameterTypeError(u);return r.parameterTypes.push(a),function(e){if(1===e.length)return"("+e[0]+")";return"("+e.map((function(e){return"(?:"+e+")"})).join("|")+")"}(a.regexpStrings)}))},e.prototype.match=function(e){return a.default.build(this.treeRegexp,e,this.parameterTypes)},Object.defineProperty(e.prototype,"regexp",{get:function(){return this.treeRegexp.regexp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.expression},enumerable:!1,configurable:!0}),e.prototype.checkNoParameterType=function(e,t){if(e.match(/(\\\\)?{([^}]*)}/g))throw new s.CucumberExpressionError(t+this.source)},e}();t.default=c},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(11)),o=n(r(12)),u=function(){function e(t){this.regexp="string"==typeof t?new RegExp(t):t,this.regex=new o.default(this.regexp.source,this.regexp.flags),this.groupBuilder=e.createGroupBuilder(this.regex)}return e.createGroupBuilder=function(t){for(var r=t.source,n=[new i.default],o=[],u=!1,a=!1,s=0;s<r.length;s++){var c=r[s];if("["!==c||u)if("]"!==c||u)if("("!==c||u||a){if(")"===c&&!u&&!a){var l=n.pop(),p=o.pop();l.capturing?(l.source=r.substring(p+1,s),n[n.length-1].add(l)):l.moveChildrenTo(n[n.length-1])}}else{o.push(s);var f=e.isNonCapturing(r,s),h=new i.default;f&&h.setNonCapturing(),n.push(h)}else a=!1;else a=!0;u="\\"===c&&!u}return n.pop()},e.isNonCapturing=function(e,t){return"?"==e[t+1]&&("<"!=e[t+2]||("="==e[t+3]||"!"==e[t+3]))},e.prototype.match=function(e){var t=this.regex.exec(e);if(!t)return null;var r=0;return this.groupBuilder.build(t,(function(){return r++}))},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,r,n){this.value=e,this.start=t,this.end=r,this.children=n}return Object.defineProperty(e.prototype,"values",{get:function(){return(0===this.children.length?[this]:this.children).map((function(e){return e.value}))},enumerable:!1,configurable:!0}),e}();t.default=n},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(2)),o=n(r(4)),u=n(r(0)),a=function(){function e(e,t){this.regexp=e,this.parameterTypeRegistry=t,this.treeRegexp=new o.default(e)}return e.prototype.match=function(e){var t=this,r=this.treeRegexp.groupBuilder.children.map((function(r){var n=r.source;return t.parameterTypeRegistry.lookupByRegexp(n,t.regexp,e)||new u.default(null,n,String,(function(e){return void 0===e?null:e}),!1,!1)}));return i.default.build(this.treeRegexp,e,r)},Object.defineProperty(e.prototype,"source",{get:function(){return this.regexp.source},enumerable:!1,configurable:!0}),e}();t.default=a},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(14)),u=i(r(0)),a=i(r(8)),s=i(r(18)),c=function(){function e(e){this.parameterTypeRegistry=e}return e.prototype.generateExpressions=function(e){for(var t=[],r=this.createParameterTypeMatchers(e),i="",a=0,c=function(){var s,c,p,f,h=[];try{for(var y=(s=void 0,n(r)),g=y.next();!g.done;g=y.next()){var d=(_=g.value).advanceTo(a);d.find&&h.push(d)}}catch(e){s={error:e}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}if(!(h.length>0))return"break";var m=(h=h.sort(o.default.compare))[0],v=h.filter((function(e){return 0===o.default.compare(e,m)})),b=[];try{for(var x=(p=void 0,n(v)),w=x.next();!w.done;w=x.next()){var _=w.value;-1===b.indexOf(_.parameterType)&&b.push(_.parameterType)}}catch(e){p={error:e}}finally{try{w&&!w.done&&(f=x.return)&&f.call(x)}finally{if(p)throw p.error}}return b=b.sort(u.default.compare),t.push(b),i+=l(e.slice(a,m.start)),i+="{%s}",(a=m.start+m.group.length)>=e.length?"break":void 0};;){if("break"===c())break}return i+=l(e.slice(a)),new s.default(i,t).generateExpressions()},e.prototype.generateExpression=function(e){var t=this;return a.default.deprecate((function(){return t.generateExpressions(e)[0]}),"CucumberExpressionGenerator.generateExpression: Use CucumberExpressionGenerator.generateExpressions instead")()},e.prototype.createParameterTypeMatchers=function(t){var r,i,o=[];try{for(var u=n(this.parameterTypeRegistry.parameterTypes),a=u.next();!a.done;a=u.next()){var s=a.value;s.useForSnippets&&(o=o.concat(e.createParameterTypeMatchers2(s,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return o},e.createParameterTypeMatchers2=function(e,t){var r,i,u=[];try{for(var a=n(e.regexpStrings),s=a.next();!s.done;s=a.next()){var c=s.value;u.push(new o.default(e,c,t))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return u},e}();function l(e){return e.replace(/%/g,"%%").replace(/\(/g,"\\(").replace(/{/g,"\\{").replace(/\//g,"\\/")}t.default=c,e.exports=c},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,u=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])g(s)||!x(s)?u+=" "+s:u+=" "+a(s);return u},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,u={};function a(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),l(n,e,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=l(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(d(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var u=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),_(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(r);if(0===u.length){if(T(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(_(r))return p(r)}var c,x="",E=!1,O=["{","}"];(h(r)&&(E=!0,O=["[","]"]),T(r))&&(x=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(x=" "+RegExp.prototype.toString.call(r)),w(r)&&(x=" "+Date.prototype.toUTCString.call(r)),_(r)&&(x=" "+p(r)),0!==u.length||E&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=E?function(e,t,r,n,i){for(var o=[],u=0,a=t.length;u<a;++u)S(t,String(u))?o.push(f(e,t,r,n,String(u),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,r,n,a,u):u.map((function(t){return f(e,r,n,a,t,E)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,x,O)):O[0]+x+O[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,o){var u,a,s;if((s=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(a=e.stylize("[Setter]","special")),S(n,i)||(u="["+i+"]"),a||(e.seen.indexOf(s.value)<0?(a=g(r)?l(e,s.value,null):l(e,s.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(u)){if(o&&i.match(/^\d+$/))return a;(u=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+a}function h(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function g(e){return null===e}function d(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return x(e)&&"[object RegExp]"===E(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===E(e)}function _(e){return x(e)&&("[object Error]"===E(e)||e instanceof Error)}function T(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(o)&&(o=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!u[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;u[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else u[r]=function(){};return u[r]},t.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=y,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=x,t.isDate=w,t.isError=_,t.isFunction=T,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(16);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=r(17),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var t;if("function"!=typeof(t=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),R&&Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=R,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,u=function(){return i.apply(o,arguments)};t.apply(this,r).then((function(t){e.nextTick(u,null,t)}),(function(t){e.nextTick(A,t,u)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(15))},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var u=o(r(10));window.CucumberExpressions=u},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterType=t.ParameterTypeRegistry=t.CucumberExpressionGenerator=t.ExpressionFactory=t.RegularExpression=t.CucumberExpression=t.Group=t.Argument=void 0;var i=n(r(2));t.Argument=i.default;var o=n(r(3));t.CucumberExpression=o.default;var u=n(r(6));t.RegularExpression=u.default;var a=n(r(5));t.Group=a.default;var s=n(r(13));t.ExpressionFactory=s.default;var c=n(r(7));t.CucumberExpressionGenerator=c.default;var l=n(r(20));t.ParameterTypeRegistry=l.default;var p=n(r(0));t.ParameterType=p.default},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(5)),o=function(){function e(){this.capturing=!0,this.groupBuilders=[]}return e.prototype.add=function(e){this.groupBuilders.push(e)},e.prototype.build=function(e,t){var r=t(),n=this.groupBuilders.map((function(r){return r.build(e,t)}));return new i.default(e[r]||void 0,e.index[r],e.index[r]+(e[r]||"").length,n)},e.prototype.setNonCapturing=function(){this.capturing=!1},Object.defineProperty(e.prototype,"children",{get:function(){return this.groupBuilders},enumerable:!1,configurable:!0}),e.prototype.moveChildrenTo=function(e){this.groupBuilders.forEach((function(t){return e.add(t)}))},e}();t.default=o},function(e,t,r){function n(e,t){var r=!1;if(e instanceof RegExp&&(e=e.source,r=!0),e){this.regexGroupStructure=function(e){if(!e)return console.error('The "regex" is empty! Returning empty array!'),[];var t=[],r=[""],n=[];n[0]=!1;var o=function e(t,r,n,o,u,a){var s;n?(s=[r[1],r[2],"",[]],o[r[2]]=r[1]):s=[void 0,void 0,"",[]];var c,l="";for(r[0];r[0]<t.length;r[0]++)if("\\"!==(c=t.charAt(r[0])))if("["!==c)if("|"!==c){if(")"===c)return s[2]+=l+")",u[0]+=")",s;if("("===c){var p;l&&(r[1]++,l="("+l+")",s[3].push([r[1],void 0,l,[]])),r[0]++;var f=r[1]+1;if(n=!0,"?"===t.charAt(r[0])&&r[0]+1<t.length&&("="===t.charAt(r[0]+1)||"!"===t.charAt(r[0]+1)||":"===t.charAt(r[0]+1))){r[0]++;var h=t.charAt(r[0]);r[0]++,":"===h&&(n=!1),u[0]+="(?"+h,(p=e(t,r,!1,o,u,a))[2]="(?"+h+p[2]}else r[1]++,r[2]++,u[0]+="(",(p=e(t,r,!0,o,u,a))[2]="("+p[2];var y=r[0],g="";if(r[0]+1<t.length){if("*"===(c=t.charAt(r[0]+1)))r[0]++,g="*";else if("+"===c)r[0]++,g="+";else if("?"===c)r[0]++,g="?";else if("{"===c){for(r[0]++,g="{",r[0]++,c=t.charAt(r[0]);c>="0"&&c<="9"&&r[0]<t.length;)g+=c,r[0]++,c=t.charAt(r[0]);if("}"===c)g+="}";else if(","===c){for(g+=",",r[0]++,c=t.charAt(r[0]);c>="0"&&c<="9"&&r[0]<t.length;)g+=c,r[0]++,c=t.charAt(r[0]);"}"===c?g+="}":g=""}else g=""}g.length>0?(p[2]+=g,u[0]+=g,"?"===t.charAt(r[0]+1)&&(r[0]++,p[2]+="?",u[0]+="?")):r[0]=y}(g.length>0||!n)&&(i(p,o),p=[f,void 0,"("+p[2]+")",[p]],r[1]++),s[2]+=l+p[2],s[3].push(p),l=""}else c=t.charAt(r[0]),l+=c,u[0]+="/"===c?"\\"+c:c}else s[2]+=l+"|",l="",u[0]+="|";else{if(l+="[",u[0]+="[",r[0]+1===t.length)continue;for(r[0]++,c=t.charAt(r[0]);("]"!==c||"\\"===t.charAt(r[0]-1)&&"\\"!==t.charAt(r[0]-2))&&r[0]<t.length;)l+=c,u[0]+=c,r[0]++,c=t.charAt(r[0]);l+=c,u[0]+=c}else{if(r[0]+1===t.length){l+="\\",u[0]+="\\";continue}r[0]++,c=t.charAt(r[0]);for(var d="";c>="0"&&c<="9";)d+=c,r[0]++,c=t.charAt(r[0]);d?(o[d]?(l+="\\"+d,a[0]=!0):d.indexOf("8")>=0||d.indexOf("9")>=0?l+=d:l+="\\x"+("0"+parseInt(d,8).toString(16)).slice(-2).toUpperCase(),u[0]+="\\"+d,r[0]--):(l+="\\"+c,u[0]+="\\"+c)}return s[2]+=l,s}(e,[0,0,0],!0,t,r,n);if(n[0]){var u=function(e){for(var r,n="",i=0;i<e[2].length;i++)if(n+=r=e[2].charAt(i),"\\"!==r)if("["!==r);else{if(i+1===e[2].length)continue;for(i++,r=e[2].charAt(i);("]"!==r||"\\"===e[2].charAt(i-1)&&"\\"!==e[2].charAt(i-2))&&i<e[2].length;)n+=r,i++,r=e[2].charAt(i);n+=r}else{if(i+1===e[2].length)continue;i++,r=e[2].charAt(i);for(var o="";r>="0"&&r<="9";)o+=r,i++,r=e[2].charAt(i);o?(n+=t[o],i--):n+=r}e[2]=n;for(var a=0;a<e[3].length;a++)u(e[3][a])};u(o)}return[o,t,r]}(e),this.source=r?e:this.regexGroupStructure[2][0];try{this.regex=new RegExp(this.regexGroupStructure[0][2],t)}catch(r){new RegExp(e,t)}}else this.regex=new RegExp(e,t),this.source=this.regex.source;this.flags=this.regex.flags,this.global=this.regex.global,this.ignoreCase=this.regex.ignoreCase,this.multiline=this.regex.multiline,this.sticky=this.regex.sticky,this.unicode=this.regex.unicode,this.lastIndex=this.regex.lastIndex}function i(e,t){e[0]&&(e[0]++,e[1]&&(t[e[1]]=e[0]));for(var r=0;r<e[3].length;r++)i(e[3][r],t)}Symbol="undefined"==typeof Symbol?[]:Symbol,n.prototype=Object.create(RegExp.prototype,{flags:{value:null,enumerable:!0,configurable:!0,writable:!0},global:{value:null,enumerable:!0,configurable:!0,writable:!0},ignoreCase:{value:null,enumerable:!0,configurable:!0,writable:!0},multiline:{value:null,enumerable:!0,configurable:!0,writable:!0},source:{value:null,enumerable:!0,configurable:!0,writable:!0},sticky:{value:null,enumerable:!0,configurable:!0,writable:!0},unicode:{value:null,enumerable:!0,configurable:!0,writable:!0}}),n.prototype.constructor=n,n.prototype.toString=function(){return"/"+this.source+"/"+this.flags},n.prototype.test=function(e){return this.regex.test(e)},n.prototype[Symbol.search]=function(e){return this.regex[Symbol.search](e)},n.prototype[Symbol.split]=function(e,t){return this.regex[Symbol.split](e)},n.prototype.exec=function(e){var t=[];t.index=[];var r=this.regex.exec(e);if(this.lastIndex=this.regex.lastIndex,!r)return r;t[0]=r[0],t.index[0]=r.index,t.input=e;var n=function(e,i){for(var o=e,u=0;u<i.length;u++){var a=i[u][0],s=i[u][1];s&&(t[s]=r[a],void 0===t[s]?t.index[s]=void 0:t.index[s]=o),i[u][3]&&n(o,i[u][3]),void 0!==r[a]&&(o+=r[a].length)}};return this.regexGroupStructure&&this.regexGroupStructure[0][3]&&n(r.index,this.regexGroupStructure[0][3]),t},n.prototype[Symbol.match]=function(e){this.lastIndex=0,this.regex.lastIndex=0;var t=this.exec(e);if(!t)return null;for(var r=[];t&&(r.push(t),0===t[0].length&&this.regex.lastIndex++,this.global);)t=this.exec(e);return this.lastIndex=0,this.regex.lastIndex=0,r},n.prototype[Symbol.replace]=function(e,t){if(this.lastIndex=0,this.regex.lastIndex=0,!e)return e;var r=this.exec(e);if(!r)return e;t instanceof Array||(t=[t]);for(var n="",i=0,o=function(n){var i="",o="",u=t[n];if("string"==typeof u)for(var a=0;a<u.length;a++)if("$"===(o=u.charAt(a)))if(a++,"$"===(o=u.charAt(a)))i+="$";else if("&"===o)i+=r[n];else if("`"===o)i+=e.substring(0,r.index[n]);else if("'"===o)i+=e.substring(r.index[n]+r[n].length);else if(o>="0"&&o<="9"){var s=o;for(a++,o=u.charAt(a);o>="0"&&o<="9";)s+=o,a++,o=u.charAt(a);a--,r[s]?i+=r[s]:i+="$"+s}else i+="$"+o;else i+=o;else if(u instanceof Function){for(var c=[r[n]],l=0;l<r.length;l++)c.push(r[l]);for(var p=0;l<r.index.length;p++)c.push(r.index[p]);c.push(e),i+=u.apply(this,c)}return i},u=function(a){for(var s=0;s<a.length;s++){var c=a[s][1];c?t[c]||""===t[c]?(r[c]||""===r[c])&&(n+=e.substring(i,r.index[c])+o(c),i=r.index[c]+r[c].length):a[s][3]&&u(a[s][3]):u(a[s][3])}};r&&(t[0]||""===t[0]?(n+=e.substring(i,r.index[0])+o(0),i=r.index[0]+r[0].length):this.regexGroupStructure&&this.regexGroupStructure[0][3]&&u(this.regexGroupStructure[0][3]),0===r[0].length&&this.regex.lastIndex++,this.global);)r=this.exec(e);return this.lastIndex=0,this.regex.lastIndex=0,n+e.substring(i,e.length)},e.exports=n},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(3)),o=n(r(6)),u=function(){function e(e){this.parameterTypeRegistry=e}return e.prototype.createExpression=function(e){return"string"==typeof e?new i.default(e,this.parameterTypeRegistry):new o.default(e,this.parameterTypeRegistry)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,r,n){void 0===n&&(n=0),this.parameterType=e,this.regexpString=t,this.text=r,this.matchPosition=n;var i=new RegExp("("+t+")");this.match=i.exec(r.slice(this.matchPosition))}return e.prototype.advanceTo=function(t){for(var r=t;r<this.text.length;r++){var n=new e(this.parameterType,this.regexpString,this.text,r);if(n.find)return n}return new e(this.parameterType,this.regexpString,this.text,this.text.length)},Object.defineProperty(e.prototype,"find",{get:function(){return this.match&&""!==this.group&&this.fullWord},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.matchPosition+this.match.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullWord",{get:function(){return this.matchStartWord&&this.matchEndWord},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matchStartWord",{get:function(){return 0===this.start||this.text[this.start-1].match(/\s|\p{P}/u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matchEndWord",{get:function(){var e=this.start+this.group.length;return e===this.text.length||this.text[e].match(/\s|\p{P}/u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.match[0]},enumerable:!1,configurable:!0}),e.compare=function(e,t){var r=e.start-t.start;if(0!==r)return r;var n=t.group.length-e.group.length;return 0!==n?n:0},e}();t.default=n,e.exports=n},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(e){n=u}}();var s,c=[],l=!1,p=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++p<t;)s&&s[p].run();p=-1,t=c.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||l||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(19)),o=function(){function e(e,t){this.expressionTemplate=e,this.parameterTypeCombinations=t,this.expressionTemplate=e}return e.prototype.generateExpressions=function(){var e=[];return this.generatePermutations(e,0,[]),e},e.prototype.generatePermutations=function(e,t,r){if(!(e.length>=256))if(t!==this.parameterTypeCombinations.length)for(var n=0;n<this.parameterTypeCombinations[t].length;++n){if(e.length>=256)return;var o=r.slice();o.push(this.parameterTypeCombinations[t][n]),this.generatePermutations(e,t+1,o)}else e.push(new i.default(this.expressionTemplate,r))},e}();t.default=o},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=o(r(8)),a=function(){function e(e,t){this.expressionTemplate=e,this.parameterTypes=t}return Object.defineProperty(e.prototype,"source",{get:function(){return u.default.format.apply(u.default,i([this.expressionTemplate],this.parameterTypes.map((function(e){return e.name}))))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterNames",{get:function(){var e={};return this.parameterTypes.map((function(t){return function(e,t){var r=t[e];return r=r?r+1:1,t[e]=r,1===r?e:""+e+r}(t.name,e)}))},enumerable:!1,configurable:!0}),e}();t.default=a},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(0)),u=i(r(7)),a=r(1),s=function(){function e(){this.parameterTypeByName=new Map,this.parameterTypesByRegexp=new Map,this.defineParameterType(new o.default("int",e.INTEGER_REGEXPS,Number,(function(e){return void 0===e?null:Number(e)}),!0,!0)),this.defineParameterType(new o.default("float",e.FLOAT_REGEXP,Number,(function(e){return void 0===e?null:parseFloat(e)}),!0,!1)),this.defineParameterType(new o.default("word",e.WORD_REGEXP,String,(function(e){return e}),!1,!1)),this.defineParameterType(new o.default("string",e.STRING_REGEXP,String,(function(e,t){return(e||t||"").replace(/\\"/g,'"').replace(/\\'/g,"'")}),!0,!1)),this.defineParameterType(new o.default("",e.ANONYMOUS_REGEXP,String,(function(e){return e}),!1,!0))}return Object.defineProperty(e.prototype,"parameterTypes",{get:function(){return this.parameterTypeByName.values()},enumerable:!1,configurable:!0}),e.prototype.lookupByTypeName=function(e){return this.parameterTypeByName.get(e)},e.prototype.lookupByRegexp=function(e,t,r){var n=this.parameterTypesByRegexp.get(e);if(!n)return null;if(n.length>1&&!n[0].preferForRegexpMatch){var i=new u.default(this).generateExpressions(r);throw a.AmbiguousParameterTypeError.forRegExp(e,t,n,i)}return n[0]},e.prototype.defineParameterType=function(e){var t,r;if(void 0!==e.name){if(this.parameterTypeByName.has(e.name))throw 0===e.name.length?new Error("The anonymous parameter type has already been defined"):new Error("There is already a parameter type with name "+e.name);this.parameterTypeByName.set(e.name,e)}try{for(var i=n(e.regexpStrings),u=i.next();!u.done;u=i.next()){var s=u.value;this.parameterTypesByRegexp.has(s)||this.parameterTypesByRegexp.set(s,[]);var c=this.parameterTypesByRegexp.get(s),l=c[0];if(c.length>0&&l.preferForRegexpMatch&&e.preferForRegexpMatch)throw new a.CucumberExpressionError("There can only be one preferential parameter type per regexp. The regexp /"+s+"/ is used for two preferential parameter types, {"+l.name+"} and {"+e.name+"}");-1===c.indexOf(e)&&(c.push(e),this.parameterTypesByRegexp.set(s,c.sort(o.default.compare)))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.INTEGER_REGEXPS=[/-?\d+/,/\d+/],e.FLOAT_REGEXP=/(?=.*\d.*)[-+]?\d*(?:\.(?=\d.*))?\d*(?:\d+[E][+-]?\d+)?/,e.WORD_REGEXP=/[^\s]+/,e.STRING_REGEXP=/"([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'/,e.ANONYMOUS_REGEXP=/.*/,e}();t.default=s,e.exports=s}]);

@@ -32,1 +32,5 @@ I have {int} cuke(s)

["22","belly"]
---
/^a (pre-commercial transaction |pre buyer fee model )?purchase(?: for \$(\d+))?$/
a purchase for $33
[null,33]
{
"name": "@cucumber/cucumber-expressions",
"version": "10.2.0",
"version": "10.2.1",
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions",

@@ -33,19 +33,19 @@ "main": "dist/src/index.js",

"@types/mocha": "^7.0.2",
"@types/node": "^14.0.5",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"eslint": "^7.1.0",
"@types/node": "^14.0.13",
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/parser": "^3.4.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.0",
"json-schema": "^0.2.5",
"mocha": "^7.2.0",
"nyc": "^15.0.1",
"mocha": "^8.0.1",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"ts-loader": "^7.0.5",
"ts-node": "^8.10.1",
"typescript": "^3.9.3",
"ts-node": "^8.10.2",
"typescript": "^3.9.5",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
"webpack-cli": "^3.3.12"
},

@@ -52,0 +52,0 @@ "files": [

export default class Group {
constructor(
public readonly value: string | null,
public readonly value: string | undefined,
public readonly start: number,

@@ -10,6 +10,6 @@ public readonly end: number,

get values(): string[] {
return (this.children.length === 0 ? [this] : this.children)
.filter((g) => typeof g.start !== 'undefined')
.map((g) => g.value)
return (this.children.length === 0 ? [this] : this.children).map(
(g) => g.value
)
}
}

@@ -19,3 +19,3 @@ import Group from './Group'

return new Group(
match[groupIndex] || null,
match[groupIndex] || undefined,
match.index[groupIndex],

@@ -22,0 +22,0 @@ match.index[groupIndex] + (match[groupIndex] || '').length,

@@ -55,3 +55,3 @@ import ParameterType from './ParameterType'

String,
(s) => (s || '').replace(/\\"/g, '"').replace(/\\'/g, "'"),
(s1, s2) => (s1 || s2 || '').replace(/\\"/g, '"').replace(/\\'/g, "'"),
true,

@@ -58,0 +58,0 @@ false

@@ -11,13 +11,18 @@ import GroupBuilder from './GroupBuilder'

public groupBuilder: GroupBuilder
constructor(regexp: RegExp | string) {
this.regexp = 'string' === typeof regexp ? new RegExp(regexp) : regexp
this.regex = new Regex(this.regexp.source, this.regexp.flags)
this.groupBuilder = TreeRegexp.createGroupBuilder(this.regex)
}
private static createGroupBuilder(regexp: RegExp) {
const source = regexp.source
const stack: GroupBuilder[] = [new GroupBuilder()]
const groupStartStack: number[] = []
let last: string = null
let escaping = false
let nonCapturingMaybe = false
let charClass = false
this.regexp.source.split('').forEach((c, n) => {
for (let i = 0; i < source.length; i++) {
const c = source[i]
if (c === '[' && !escaping) {

@@ -28,5 +33,9 @@ charClass = true

} else if (c === '(' && !escaping && !charClass) {
stack.push(new GroupBuilder())
groupStartStack.push(n + 1)
nonCapturingMaybe = false
groupStartStack.push(i)
const nonCapturing = TreeRegexp.isNonCapturing(source, i)
const groupBuilder = new GroupBuilder()
if (nonCapturing) {
groupBuilder.setNonCapturing()
}
stack.push(groupBuilder)
} else if (c === ')' && !escaping && !charClass) {

@@ -36,3 +45,3 @@ const gb = stack.pop()

if (gb.capturing) {
gb.source = this.regexp.source.substring(groupStart, n)
gb.source = source.substring(groupStart + 1, i)
stack[stack.length - 1].add(gb)

@@ -42,19 +51,24 @@ } else {

}
nonCapturingMaybe = false
} else if (c === '?' && last === '(') {
nonCapturingMaybe = true
} else if (
(c === ':' || c === '!' || c === '=' || c === '<') &&
last === '?' &&
nonCapturingMaybe
) {
stack[stack.length - 1].setNonCapturing()
nonCapturingMaybe = false
}
escaping = c === '\\' && !escaping
last = c
})
this.groupBuilder = stack.pop()
}
return stack.pop()
}
private static isNonCapturing(source: string, i: number): boolean {
// Regex is valid. Bounds check not required.
if (source[i + 1] != '?') {
// (X)
return false
}
if (source[i + 2] != '<') {
// (?:X)
// (?=X)
// (?!X)
return true
}
// (?<=X) or (?<!X) else (?<name>X)
return source[i + 3] == '=' || source[i + 3] == '!'
}
public match(s: string): Group | null {

@@ -61,0 +75,0 @@ const match: RegexExecArray = this.regex.exec(s)

@@ -256,2 +256,33 @@ import assert from 'assert'

it('unmatched optional groups have undefined values', () => {
const parameterTypeRegistry = new ParameterTypeRegistry()
parameterTypeRegistry.defineParameterType(
new ParameterType(
'textAndOrNumber',
/([A-Z]+)?(?: )?([0-9]+)?/,
null,
function (s1, s2) {
return [s1, s2]
},
false,
true
)
)
const expression = new CucumberExpression(
'{textAndOrNumber}',
parameterTypeRegistry
)
const world = {}
assert.deepStrictEqual(expression.match(`TLA`)[0].getValue(world), [
'TLA',
undefined,
])
assert.deepStrictEqual(expression.match(`123`)[0].getValue(world), [
undefined,
'123',
])
})
// JavaScript-specific

@@ -258,0 +289,0 @@

@@ -60,6 +60,14 @@ import assert from 'assert'

it('matches named capturing group', () => {
const tr = new TreeRegexp(/a(?<name>b)c/)
const group = tr.match('abc')
assert.strictEqual(group.value, 'abc')
assert.strictEqual(group.children.length, 1)
assert.strictEqual(group.children[0].value, 'b')
})
it('matches optional group', () => {
const tr = new TreeRegexp(/^Something( with an optional argument)?/)
const group = tr.match('Something')
assert.strictEqual(group.children[0].value, null)
assert.strictEqual(group.children[0].value, undefined)
})

@@ -112,3 +120,3 @@

assert.strictEqual(group.value, 'the stdout')
assert.strictEqual(group.children[0].value, null)
assert.strictEqual(group.children[0].value, undefined)
assert.strictEqual(group.children.length, 1)

@@ -123,2 +131,18 @@ })

it('empty capturing group', () => {
const tr = new TreeRegexp(/()/)
const group = tr.match('')
// TODO: Would expect the empty string here
assert.strictEqual(group.value, undefined)
assert.strictEqual(group.children.length, 1)
})
it('empty look ahead', () => {
const tr = new TreeRegexp(/(?<=)/)
const group = tr.match('')
// TODO: Would expect the empty string here
assert.strictEqual(group.value, undefined)
assert.strictEqual(group.children.length, 0)
})
it('does not consider parenthesis in character class as group', () => {

@@ -125,0 +149,0 @@ const tr = new TreeRegexp(/^drawings: ([A-Z, ()]+)$/)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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