diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f30ba88a..b2d85ad0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) on how to contribute to Cucumber. -### [Unreleased](https://github.com/cucumber/cucumber-js/compare/v6.0.1...master) (In Git) +### [Unreleased](https://github.com/cucumber/cucumber-js/compare/v6.0.2...master) (In Git) + +### [6.0.2](https://github.com/cucumber/cucumber-js/compare/v6.0.1...v6.0.2) (2019-10-07) + +* Upgrade to cucumber-expressions 8.0.1 to fix failure on multiple installs ### [6.0.1](https://github.com/cucumber/cucumber-js/compare/v6.0.0...v6.0.1) (2019-10-06) diff --git a/dist/cucumber.js b/dist/cucumber.js index 5ba871c64..726bf504f 100644 --- a/dist/cucumber.js +++ b/dist/cucumber.js @@ -1,7 +1,888 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Cucumber = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +},{"./_to-absolute-index":58,"./_to-iobject":60,"./_to-length":61}],20:[function(require,module,exports){ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +},{"./_cof":21,"./_wks":65}],21:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +},{}],22:[function(require,module,exports){ +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + +},{}],23:[function(require,module,exports){ +// optional / simple context binding +var aFunction = require('./_a-function'); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + +},{"./_a-function":16}],24:[function(require,module,exports){ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + +},{}],25:[function(require,module,exports){ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + +},{"./_fails":29}],26:[function(require,module,exports){ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + +},{"./_global":30,"./_is-object":37}],27:[function(require,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +},{}],28:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +},{"./_core":22,"./_ctx":23,"./_global":30,"./_has":31,"./_hide":32}],29:[function(require,module,exports){ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +},{}],30:[function(require,module,exports){ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + +},{}],31:[function(require,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +},{}],32:[function(require,module,exports){ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + +},{"./_descriptors":25,"./_object-dp":44,"./_property-desc":50}],33:[function(require,module,exports){ +var document = require('./_global').document; +module.exports = document && document.documentElement; + +},{"./_global":30}],34:[function(require,module,exports){ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + +},{"./_descriptors":25,"./_dom-create":26,"./_fails":29}],35:[function(require,module,exports){ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +},{"./_cof":21}],36:[function(require,module,exports){ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + +},{"./_cof":21}],37:[function(require,module,exports){ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +},{}],38:[function(require,module,exports){ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +},{"./_hide":32,"./_object-create":43,"./_property-desc":50,"./_set-to-string-tag":52,"./_wks":65}],39:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +},{"./_export":28,"./_hide":32,"./_iter-create":38,"./_iterators":41,"./_library":42,"./_object-gpo":46,"./_redefine":51,"./_set-to-string-tag":52,"./_wks":65}],40:[function(require,module,exports){ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + +},{}],41:[function(require,module,exports){ +module.exports = {}; + +},{}],42:[function(require,module,exports){ +module.exports = true; + +},{}],43:[function(require,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + +},{"./_an-object":18,"./_dom-create":26,"./_enum-bug-keys":27,"./_html":33,"./_object-dps":45,"./_shared-key":53}],44:[function(require,module,exports){ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + +},{"./_an-object":18,"./_descriptors":25,"./_ie8-dom-define":34,"./_to-primitive":63}],45:[function(require,module,exports){ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +},{"./_an-object":18,"./_descriptors":25,"./_object-dp":44,"./_object-keys":48}],46:[function(require,module,exports){ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + +},{"./_has":31,"./_shared-key":53,"./_to-object":62}],47:[function(require,module,exports){ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +},{"./_array-includes":19,"./_has":31,"./_shared-key":53,"./_to-iobject":60}],48:[function(require,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + +},{"./_enum-bug-keys":27,"./_object-keys-internal":47}],49:[function(require,module,exports){ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + +},{"./_global":30,"./_string-trim":56,"./_string-ws":57}],50:[function(require,module,exports){ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +},{}],51:[function(require,module,exports){ +module.exports = require('./_hide'); + +},{"./_hide":32}],52:[function(require,module,exports){ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + +},{"./_has":31,"./_object-dp":44,"./_wks":65}],53:[function(require,module,exports){ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + +},{"./_shared":54,"./_uid":64}],54:[function(require,module,exports){ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + +},{"./_core":22,"./_global":30,"./_library":42}],55:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +},{"./_defined":24,"./_to-integer":59}],56:[function(require,module,exports){ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + +},{"./_defined":24,"./_export":28,"./_fails":29,"./_string-ws":57}],57:[function(require,module,exports){ +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +},{}],58:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +},{"./_to-integer":59}],59:[function(require,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +},{}],60:[function(require,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; + +},{"./_defined":24,"./_iobject":35}],61:[function(require,module,exports){ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +},{"./_to-integer":59}],62:[function(require,module,exports){ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; + +},{"./_defined":24}],63:[function(require,module,exports){ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + +},{"./_is-object":37}],64:[function(require,module,exports){ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +},{}],65:[function(require,module,exports){ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +},{"./_global":30,"./_shared":54,"./_uid":64}],66:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +},{"./_classof":20,"./_core":22,"./_iterators":41,"./_wks":65}],67:[function(require,module,exports){ +var anObject = require('./_an-object'); +var get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + +},{"./_an-object":18,"./_core":22,"./core.get-iterator-method":66}],68:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + +},{"./_classof":20,"./_core":22,"./_iterators":41,"./_wks":65}],69:[function(require,module,exports){ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); + +},{"./_export":28,"./_is-array":36}],70:[function(require,module,exports){ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +},{"./_add-to-unscopables":17,"./_iter-define":39,"./_iter-step":40,"./_iterators":41,"./_to-iobject":60}],71:[function(require,module,exports){ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); + +},{"./_export":28,"./_object-create":43}],72:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + +},{"./_export":28,"./_parse-int":49}],73:[function(require,module,exports){ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + +},{"./_iter-define":39,"./_string-at":55}],74:[function(require,module,exports){ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +},{"./_global":30,"./_hide":32,"./_iterators":41,"./_wks":65,"./es6.array.iterator":70}],75:[function(require,module,exports){ module.exports = require('./register')().Promise -},{"./register":3}],2:[function(require,module,exports){ +},{"./register":77}],76:[function(require,module,exports){ "use strict" // global key for user preferred registration var REGISTRATION_KEY = '@@any-promise/REGISTRATION', @@ -81,7 +962,7 @@ module.exports = function(root, loadImplementation){ } } -},{}],3:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ "use strict"; module.exports = require('./loader')(window, loadImplementation) @@ -101,7 +982,7 @@ function loadImplementation(){ } } -},{"./loader":2}],4:[function(require,module,exports){ +},{"./loader":76}],78:[function(require,module,exports){ (function (Buffer,process){ // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. @@ -317,7 +1198,7 @@ module.exports = _setExports(process.env.NODE_NDEBUG); }).call(this,{"isBuffer":require("../is-buffer/index.js")},require('_process')) -},{"../is-buffer/index.js":475,"_process":497,"assert":5,"stream":541,"util":560}],5:[function(require,module,exports){ +},{"../is-buffer/index.js":549,"_process":571,"assert":79,"stream":615,"util":634}],79:[function(require,module,exports){ (function (global){ 'use strict'; @@ -828,7 +1709,7 @@ var objectKeys = Object.keys || function (obj) { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"object-assign":489,"util/":8}],6:[function(require,module,exports){ +},{"object-assign":563,"util/":82}],80:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -853,14 +1734,14 @@ if (typeof Object.create === 'function') { } } -},{}],7:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],8:[function(require,module,exports){ +},{}],82:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -1451,7 +2332,7 @@ function hasOwnProperty(obj, prop) { }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":7,"_process":497,"inherits":6}],9:[function(require,module,exports){ +},{"./support/isBuffer":81,"_process":571,"inherits":80}],83:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = canonicalize;var _has_property = _interopRequireDefault(require("./has_property")); var _type = _interopRequireDefault(require("./type"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} @@ -1504,7 +2385,7 @@ function canonicalize(value, stack) { return value.toString();} } -},{"./has_property":10,"./type":14}],10:[function(require,module,exports){ +},{"./has_property":84,"./type":88}],84:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = hasProperty;function hasProperty(obj) { for (const prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { @@ -1513,7 +2394,7 @@ function canonicalize(value, stack) { } return false; } -},{}],11:[function(require,module,exports){ +},{}],85:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = inlineDiff;var _diff = require("diff"); var _padRight = _interopRequireDefault(require("pad-right"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} @@ -1557,7 +2438,7 @@ function errorDiff(actual, expected, colorFns) { }). join(''); } -},{"diff":17,"pad-right":492}],12:[function(require,module,exports){ +},{"diff":91,"pad-right":566}],86:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = jsonStringify;var _repeatString = _interopRequireDefault(require("repeat-string")); var _type = _interopRequireDefault(require("./type"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} @@ -1638,14 +2519,14 @@ function jsonStringifyProperties(object, depth) { return str + end; } -},{"./type":14,"repeat-string":516}],13:[function(require,module,exports){ +},{"./type":88,"repeat-string":590}],87:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = stringify;var _canonicalize = _interopRequireDefault(require("./canonicalize")); var _json_stringify = _interopRequireDefault(require("./json_stringify"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} function stringify(value) { return (0, _json_stringify.default)((0, _canonicalize.default)(value)).replace(/,(\n|$)/g, '$1'); } -},{"./canonicalize":9,"./json_stringify":12}],14:[function(require,module,exports){ +},{"./canonicalize":83,"./json_stringify":86}],88:[function(require,module,exports){ (function (Buffer){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = type;function type(value) { if (value === undefined) { @@ -1662,7 +2543,7 @@ function stringify(value) { } }).call(this,require("buffer").Buffer) -},{"buffer":25}],15:[function(require,module,exports){ +},{"buffer":99}],89:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = unifiedDiff;var _diff = require("diff"); function unifiedDiff(actual, expected, colorFns) { @@ -1703,7 +2584,7 @@ function unifiedDiff(actual, expected, colorFns) { join('\n')); } -},{"diff":17}],16:[function(require,module,exports){ +},{"diff":91}],90:[function(require,module,exports){ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.format = format;var _inline_diff = _interopRequireDefault(require("./helpers/inline_diff")); var _stringify = _interopRequireDefault(require("./helpers/stringify")); var _type = _interopRequireDefault(require("./helpers/type")); @@ -1784,7 +2665,7 @@ function format(err, options) { return message + stack; } -},{"./helpers/inline_diff":11,"./helpers/stringify":13,"./helpers/type":14,"./helpers/unified_diff":15}],17:[function(require,module,exports){ +},{"./helpers/inline_diff":85,"./helpers/stringify":87,"./helpers/type":88,"./helpers/unified_diff":89}],91:[function(require,module,exports){ /*! diff v4.0.1 @@ -3371,7 +4252,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. })); -},{}],18:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ 'use strict'; module.exports = balanced; function balanced(a, b, str) { @@ -3432,7 +4313,7 @@ function range(a, b, str) { return result; } -},{}],19:[function(require,module,exports){ +},{}],93:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -3586,7 +4467,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],20:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ /* * Copyright (c) 2017. becke.ch - All Rights Reserved. * Use is subject to (MIT-style) License terms. @@ -4360,7 +5241,7 @@ function initialize() { } } initialize(); -},{}],21:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ (function (process,global,setImmediate){ /* @preserve * The MIT License (MIT) @@ -10030,7 +10911,7 @@ module.exports = ret; }); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) -},{"_process":497,"timers":548}],22:[function(require,module,exports){ +},{"_process":571,"timers":622}],96:[function(require,module,exports){ var concatMap = require('concat-map'); var balanced = require('balanced-match'); @@ -10233,11 +11114,11 @@ function expand(str, isTop) { } -},{"balanced-match":18,"concat-map":43}],23:[function(require,module,exports){ +},{"balanced-match":92,"concat-map":117}],97:[function(require,module,exports){ -},{}],24:[function(require,module,exports){ -arguments[4][23][0].apply(exports,arguments) -},{"dup":23}],25:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ +arguments[4][97][0].apply(exports,arguments) +},{"dup":97}],99:[function(require,module,exports){ (function (Buffer){ /*! * The buffer module from node.js, for the browser. @@ -12032,9 +12913,9 @@ function numberIsNaN (obj) { }).call(this,require("buffer").Buffer) -},{"base64-js":19,"buffer":25,"ieee754":471}],26:[function(require,module,exports){ +},{"base64-js":93,"buffer":99,"ieee754":545}],100:[function(require,module,exports){ module.exports = require('./src/table'); -},{"./src/table":29}],27:[function(require,module,exports){ +},{"./src/table":103}],101:[function(require,module,exports){ const utils = require('./utils'); class Cell { @@ -12407,7 +13288,7 @@ module.exports = Cell; module.exports.ColSpanCell = ColSpanCell; module.exports.RowSpanCell = RowSpanCell; -},{"./utils":30,"colors/safe":41}],28:[function(require,module,exports){ +},{"./utils":104,"colors/safe":115}],102:[function(require,module,exports){ const objectAssign = require('object-assign'); const Cell = require('./cell'); const { ColSpanCell, RowSpanCell } = Cell; @@ -12641,7 +13522,7 @@ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) { }; } -},{"./cell":27,"object-assign":489}],29:[function(require,module,exports){ +},{"./cell":101,"object-assign":563}],103:[function(require,module,exports){ const utils = require('./utils'); const tableLayout = require('./layout-manager'); @@ -12720,7 +13601,7 @@ function doDraw(row, lineNum, result) { module.exports = Table; -},{"./layout-manager":28,"./utils":30}],30:[function(require,module,exports){ +},{"./layout-manager":102,"./utils":104}],104:[function(require,module,exports){ const objectAssign = require('object-assign'); const stringWidth = require('string-width'); @@ -13025,7 +13906,7 @@ module.exports = { colorizeLines: colorizeLines, }; -},{"object-assign":489,"string-width":543}],31:[function(require,module,exports){ +},{"object-assign":563,"string-width":617}],105:[function(require,module,exports){ /* The MIT License (MIT) @@ -13228,7 +14109,7 @@ for (var map in colors.maps) { defineProps(colors, init()); -},{"./custom/trap":32,"./custom/zalgo":33,"./maps/america":34,"./maps/rainbow":35,"./maps/random":36,"./maps/zebra":37,"./styles":38,"./system/supports-colors":40,"util":560}],32:[function(require,module,exports){ +},{"./custom/trap":106,"./custom/zalgo":107,"./maps/america":108,"./maps/rainbow":109,"./maps/random":110,"./maps/zebra":111,"./styles":112,"./system/supports-colors":114,"util":634}],106:[function(require,module,exports){ module['exports'] = function runTheTrap(text, options) { var result = ''; text = text || 'Run the trap, drop the bass'; @@ -13276,7 +14157,7 @@ module['exports'] = function runTheTrap(text, options) { return result; }; -},{}],33:[function(require,module,exports){ +},{}],107:[function(require,module,exports){ // please no module['exports'] = function zalgo(text, options) { text = text || ' he is here '; @@ -13388,7 +14269,7 @@ module['exports'] = function zalgo(text, options) { }; -},{}],34:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ module['exports'] = function(colors) { return function(letter, i, exploded) { if (letter === ' ') return letter; @@ -13400,7 +14281,7 @@ module['exports'] = function(colors) { }; }; -},{}],35:[function(require,module,exports){ +},{}],109:[function(require,module,exports){ module['exports'] = function(colors) { // RoY G BiV var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; @@ -13414,7 +14295,7 @@ module['exports'] = function(colors) { }; -},{}],36:[function(require,module,exports){ +},{}],110:[function(require,module,exports){ module['exports'] = function(colors) { var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; @@ -13426,14 +14307,14 @@ module['exports'] = function(colors) { }; }; -},{}],37:[function(require,module,exports){ +},{}],111:[function(require,module,exports){ module['exports'] = function(colors) { return function(letter, i, exploded) { return i % 2 === 0 ? letter : colors.inverse(letter); }; }; -},{}],38:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ /* The MIT License (MIT) @@ -13512,7 +14393,7 @@ Object.keys(codes).forEach(function(key) { style.close = '\u001b[' + val[1] + 'm'; }); -},{}],39:[function(require,module,exports){ +},{}],113:[function(require,module,exports){ (function (process){ /* MIT License @@ -13552,7 +14433,7 @@ module.exports = function(flag, argv) { }).call(this,require('_process')) -},{"_process":497}],40:[function(require,module,exports){ +},{"_process":571}],114:[function(require,module,exports){ (function (process){ /* The MIT License (MIT) @@ -13708,7 +14589,7 @@ module.exports = { }).call(this,require('_process')) -},{"./has-flag.js":39,"_process":497,"os":491}],41:[function(require,module,exports){ +},{"./has-flag.js":113,"_process":571,"os":565}],115:[function(require,module,exports){ // // Remark: Requiring this file will use the "safe" colors API, // which will not touch String.prototype. @@ -13720,7 +14601,7 @@ module.exports = { var colors = require('./lib/colors'); module['exports'] = colors; -},{"./lib/colors":31}],42:[function(require,module,exports){ +},{"./lib/colors":105}],116:[function(require,module,exports){ (function (Buffer,process){ /** * Module dependencies. @@ -15058,7 +15939,7 @@ function incrementNodeInspectorPort(args) { }).call(this,{"isBuffer":require("../is-buffer/index.js")},require('_process')) -},{"../is-buffer/index.js":475,"_process":497,"child_process":24,"events":444,"fs":24,"path":493,"util":560}],43:[function(require,module,exports){ +},{"../is-buffer/index.js":549,"_process":571,"child_process":98,"events":518,"fs":98,"path":567,"util":634}],117:[function(require,module,exports){ module.exports = function (xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { @@ -15073,7 +15954,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],44:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ module.exports={ "O_RDONLY": 0, "O_WRONLY": 1, @@ -15284,14 +16165,14 @@ module.exports={ "UV_UDP_REUSEADDR": 4 } -},{}],45:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ module.exports = function (it) { if (typeof it != 'function') { throw TypeError(String(it) + ' is not a function'); } return it; }; -},{}],46:[function(require,module,exports){ +},{}],120:[function(require,module,exports){ var isObject = require('../internals/is-object'); module.exports = function (it) { @@ -15300,7 +16181,7 @@ module.exports = function (it) { } return it; }; -},{"../internals/is-object":114}],47:[function(require,module,exports){ +},{"../internals/is-object":188}],121:[function(require,module,exports){ var wellKnownSymbol = require('../internals/well-known-symbol'); var create = require('../internals/object-create'); var hide = require('../internals/hide'); @@ -15319,7 +16200,7 @@ module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; -},{"../internals/hide":102,"../internals/object-create":133,"../internals/well-known-symbol":188}],48:[function(require,module,exports){ +},{"../internals/hide":176,"../internals/object-create":207,"../internals/well-known-symbol":262}],122:[function(require,module,exports){ 'use strict'; var charAt = require('../internals/string-multibyte').charAt; @@ -15329,14 +16210,14 @@ module.exports = function (S, index, unicode) { return index + (unicode ? charAt(S, index).length : 1); }; -},{"../internals/string-multibyte":168}],49:[function(require,module,exports){ +},{"../internals/string-multibyte":242}],123:[function(require,module,exports){ module.exports = function (it, Constructor, name) { if (!(it instanceof Constructor)) { throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); } return it; }; -},{}],50:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ var isObject = require('../internals/is-object'); module.exports = function (it) { @@ -15345,7 +16226,7 @@ module.exports = function (it) { } return it; }; -},{"../internals/is-object":114}],51:[function(require,module,exports){ +},{"../internals/is-object":188}],125:[function(require,module,exports){ 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); @@ -15511,7 +16392,7 @@ module.exports = { TypedArrayPrototype: TypedArrayPrototype }; -},{"../internals/classof":67,"../internals/descriptors":82,"../internals/global":99,"../internals/has":100,"../internals/hide":102,"../internals/is-object":114,"../internals/object-define-property":135,"../internals/object-get-prototype-of":140,"../internals/object-set-prototype-of":144,"../internals/redefine":155,"../internals/uid":185,"../internals/well-known-symbol":188}],52:[function(require,module,exports){ +},{"../internals/classof":141,"../internals/descriptors":156,"../internals/global":173,"../internals/has":174,"../internals/hide":176,"../internals/is-object":188,"../internals/object-define-property":209,"../internals/object-get-prototype-of":214,"../internals/object-set-prototype-of":218,"../internals/redefine":229,"../internals/uid":259,"../internals/well-known-symbol":262}],126:[function(require,module,exports){ 'use strict'; var global = require('../internals/global'); var DESCRIPTORS = require('../internals/descriptors'); @@ -15806,7 +16687,7 @@ setToStringTag($DataView, DATA_VIEW); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; -},{"../internals/an-instance":49,"../internals/array-buffer-view-core":51,"../internals/array-fill":54,"../internals/descriptors":82,"../internals/fails":87,"../internals/global":99,"../internals/hide":102,"../internals/internal-state":109,"../internals/object-define-property":135,"../internals/object-get-own-property-names":138,"../internals/redefine-all":154,"../internals/set-to-string-tag":163,"../internals/to-index":175,"../internals/to-integer":177,"../internals/to-length":178}],53:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/array-buffer-view-core":125,"../internals/array-fill":128,"../internals/descriptors":156,"../internals/fails":161,"../internals/global":173,"../internals/hide":176,"../internals/internal-state":183,"../internals/object-define-property":209,"../internals/object-get-own-property-names":212,"../internals/redefine-all":228,"../internals/set-to-string-tag":237,"../internals/to-index":249,"../internals/to-integer":251,"../internals/to-length":252}],127:[function(require,module,exports){ 'use strict'; var toObject = require('../internals/to-object'); var toAbsoluteIndex = require('../internals/to-absolute-index'); @@ -15837,7 +16718,7 @@ module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* } return O; }; -},{"../internals/to-absolute-index":174,"../internals/to-length":178,"../internals/to-object":179}],54:[function(require,module,exports){ +},{"../internals/to-absolute-index":248,"../internals/to-length":252,"../internals/to-object":253}],128:[function(require,module,exports){ 'use strict'; var toObject = require('../internals/to-object'); var toAbsoluteIndex = require('../internals/to-absolute-index'); @@ -15856,7 +16737,7 @@ module.exports = function fill(value /* , start = 0, end = @length */) { return O; }; -},{"../internals/to-absolute-index":174,"../internals/to-length":178,"../internals/to-object":179}],55:[function(require,module,exports){ +},{"../internals/to-absolute-index":248,"../internals/to-length":252,"../internals/to-object":253}],129:[function(require,module,exports){ 'use strict'; var $forEach = require('../internals/array-iteration').forEach; var sloppyArrayMethod = require('../internals/sloppy-array-method'); @@ -15867,7 +16748,7 @@ module.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } : [].forEach; -},{"../internals/array-iteration":58,"../internals/sloppy-array-method":166}],56:[function(require,module,exports){ +},{"../internals/array-iteration":132,"../internals/sloppy-array-method":240}],130:[function(require,module,exports){ 'use strict'; var bind = require('../internals/bind-context'); var toObject = require('../internals/to-object'); @@ -15910,7 +16791,7 @@ module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undef return result; }; -},{"../internals/bind-context":63,"../internals/call-with-safe-iteration-closing":64,"../internals/create-property":77,"../internals/get-iterator-method":97,"../internals/is-array-iterator-method":110,"../internals/to-length":178,"../internals/to-object":179}],57:[function(require,module,exports){ +},{"../internals/bind-context":137,"../internals/call-with-safe-iteration-closing":138,"../internals/create-property":151,"../internals/get-iterator-method":171,"../internals/is-array-iterator-method":184,"../internals/to-length":252,"../internals/to-object":253}],131:[function(require,module,exports){ var toIndexedObject = require('../internals/to-indexed-object'); var toLength = require('../internals/to-length'); var toAbsoluteIndex = require('../internals/to-absolute-index'); @@ -15944,7 +16825,7 @@ module.exports = { indexOf: createMethod(false) }; -},{"../internals/to-absolute-index":174,"../internals/to-indexed-object":176,"../internals/to-length":178}],58:[function(require,module,exports){ +},{"../internals/to-absolute-index":248,"../internals/to-indexed-object":250,"../internals/to-length":252}],132:[function(require,module,exports){ var bind = require('../internals/bind-context'); var IndexedObject = require('../internals/indexed-object'); var toObject = require('../internals/to-object'); @@ -16011,7 +16892,7 @@ module.exports = { findIndex: createMethod(6) }; -},{"../internals/array-species-create":62,"../internals/bind-context":63,"../internals/indexed-object":106,"../internals/to-length":178,"../internals/to-object":179}],59:[function(require,module,exports){ +},{"../internals/array-species-create":136,"../internals/bind-context":137,"../internals/indexed-object":180,"../internals/to-length":252,"../internals/to-object":253}],133:[function(require,module,exports){ 'use strict'; var toIndexedObject = require('../internals/to-indexed-object'); var toInteger = require('../internals/to-integer'); @@ -16037,7 +16918,7 @@ module.exports = (NEGATIVE_ZERO || SLOPPY_METHOD) ? function lastIndexOf(searchE return -1; } : nativeLastIndexOf; -},{"../internals/sloppy-array-method":166,"../internals/to-indexed-object":176,"../internals/to-integer":177,"../internals/to-length":178}],60:[function(require,module,exports){ +},{"../internals/sloppy-array-method":240,"../internals/to-indexed-object":250,"../internals/to-integer":251,"../internals/to-length":252}],134:[function(require,module,exports){ var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -16054,7 +16935,7 @@ module.exports = function (METHOD_NAME) { }); }; -},{"../internals/fails":87,"../internals/well-known-symbol":188}],61:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/well-known-symbol":262}],135:[function(require,module,exports){ var aFunction = require('../internals/a-function'); var toObject = require('../internals/to-object'); var IndexedObject = require('../internals/indexed-object'); @@ -16096,7 +16977,7 @@ module.exports = { right: createMethod(true) }; -},{"../internals/a-function":45,"../internals/indexed-object":106,"../internals/to-length":178,"../internals/to-object":179}],62:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/indexed-object":180,"../internals/to-length":252,"../internals/to-object":253}],136:[function(require,module,exports){ var isObject = require('../internals/is-object'); var isArray = require('../internals/is-array'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -16118,7 +16999,7 @@ module.exports = function (originalArray, length) { } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); }; -},{"../internals/is-array":111,"../internals/is-object":114,"../internals/well-known-symbol":188}],63:[function(require,module,exports){ +},{"../internals/is-array":185,"../internals/is-object":188,"../internals/well-known-symbol":262}],137:[function(require,module,exports){ var aFunction = require('../internals/a-function'); // optional / simple context binding @@ -16144,7 +17025,7 @@ module.exports = function (fn, that, length) { }; }; -},{"../internals/a-function":45}],64:[function(require,module,exports){ +},{"../internals/a-function":119}],138:[function(require,module,exports){ var anObject = require('../internals/an-object'); // call something on iterator step with safe closing on error @@ -16159,7 +17040,7 @@ module.exports = function (iterator, fn, value, ENTRIES) { } }; -},{"../internals/an-object":50}],65:[function(require,module,exports){ +},{"../internals/an-object":124}],139:[function(require,module,exports){ var wellKnownSymbol = require('../internals/well-known-symbol'); var ITERATOR = wellKnownSymbol('iterator'); @@ -16199,14 +17080,9 @@ module.exports = function (exec, SKIP_CLOSING) { return ITERATION_SUPPORT; }; -},{"../internals/well-known-symbol":188}],66:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - -},{}],67:[function(require,module,exports){ +},{"../internals/well-known-symbol":262}],140:[function(require,module,exports){ +arguments[4][21][0].apply(exports,arguments) +},{"dup":21}],141:[function(require,module,exports){ var classofRaw = require('../internals/classof-raw'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -16233,7 +17109,7 @@ module.exports = function (it) { : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; }; -},{"../internals/classof-raw":66,"../internals/well-known-symbol":188}],68:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/well-known-symbol":262}],142:[function(require,module,exports){ 'use strict'; var defineProperty = require('../internals/object-define-property').f; var create = require('../internals/object-create'); @@ -16421,7 +17297,7 @@ module.exports = { } }; -},{"../internals/an-instance":49,"../internals/bind-context":63,"../internals/define-iterator":80,"../internals/descriptors":82,"../internals/internal-metadata":108,"../internals/internal-state":109,"../internals/iterate":117,"../internals/object-create":133,"../internals/object-define-property":135,"../internals/redefine-all":154,"../internals/set-species":162}],69:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/bind-context":137,"../internals/define-iterator":154,"../internals/descriptors":156,"../internals/internal-metadata":182,"../internals/internal-state":183,"../internals/iterate":191,"../internals/object-create":207,"../internals/object-define-property":209,"../internals/redefine-all":228,"../internals/set-species":236}],143:[function(require,module,exports){ 'use strict'; var redefineAll = require('../internals/redefine-all'); var getWeakData = require('../internals/internal-metadata').getWeakData; @@ -16544,7 +17420,7 @@ module.exports = { } }; -},{"../internals/an-instance":49,"../internals/an-object":50,"../internals/array-iteration":58,"../internals/has":100,"../internals/internal-metadata":108,"../internals/internal-state":109,"../internals/is-object":114,"../internals/iterate":117,"../internals/redefine-all":154}],70:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/an-object":124,"../internals/array-iteration":132,"../internals/has":174,"../internals/internal-metadata":182,"../internals/internal-state":183,"../internals/is-object":188,"../internals/iterate":191,"../internals/redefine-all":228}],144:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); @@ -16643,7 +17519,7 @@ module.exports = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) { return Constructor; }; -},{"../internals/an-instance":49,"../internals/check-correctness-of-iteration":65,"../internals/export":86,"../internals/fails":87,"../internals/global":99,"../internals/inherit-if-required":107,"../internals/internal-metadata":108,"../internals/is-forced":112,"../internals/is-object":114,"../internals/iterate":117,"../internals/redefine":155,"../internals/set-to-string-tag":163}],71:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/check-correctness-of-iteration":139,"../internals/export":160,"../internals/fails":161,"../internals/global":173,"../internals/inherit-if-required":181,"../internals/internal-metadata":182,"../internals/is-forced":186,"../internals/is-object":188,"../internals/iterate":191,"../internals/redefine":229,"../internals/set-to-string-tag":237}],145:[function(require,module,exports){ var has = require('../internals/has'); var ownKeys = require('../internals/own-keys'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); @@ -16659,7 +17535,7 @@ module.exports = function (target, source) { } }; -},{"../internals/has":100,"../internals/object-define-property":135,"../internals/object-get-own-property-descriptor":136,"../internals/own-keys":147}],72:[function(require,module,exports){ +},{"../internals/has":174,"../internals/object-define-property":209,"../internals/object-get-own-property-descriptor":210,"../internals/own-keys":221}],146:[function(require,module,exports){ var wellKnownSymbol = require('../internals/well-known-symbol'); var MATCH = wellKnownSymbol('match'); @@ -16676,7 +17552,7 @@ module.exports = function (METHOD_NAME) { } return false; }; -},{"../internals/well-known-symbol":188}],73:[function(require,module,exports){ +},{"../internals/well-known-symbol":262}],147:[function(require,module,exports){ var fails = require('../internals/fails'); module.exports = !fails(function () { @@ -16685,7 +17561,7 @@ module.exports = !fails(function () { return Object.getPrototypeOf(new F()) !== F.prototype; }); -},{"../internals/fails":87}],74:[function(require,module,exports){ +},{"../internals/fails":161}],148:[function(require,module,exports){ var requireObjectCoercible = require('../internals/require-object-coercible'); var quot = /"/g; @@ -16699,7 +17575,7 @@ module.exports = function (string, tag, attribute, value) { return p1 + '>' + S + ''; }; -},{"../internals/require-object-coercible":159}],75:[function(require,module,exports){ +},{"../internals/require-object-coercible":233}],149:[function(require,module,exports){ 'use strict'; var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype; var create = require('../internals/object-create'); @@ -16717,17 +17593,9 @@ module.exports = function (IteratorConstructor, NAME, next) { return IteratorConstructor; }; -},{"../internals/create-property-descriptor":76,"../internals/iterators":119,"../internals/iterators-core":118,"../internals/object-create":133,"../internals/set-to-string-tag":163}],76:[function(require,module,exports){ -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - -},{}],77:[function(require,module,exports){ +},{"../internals/create-property-descriptor":150,"../internals/iterators":193,"../internals/iterators-core":192,"../internals/object-create":207,"../internals/set-to-string-tag":237}],150:[function(require,module,exports){ +arguments[4][50][0].apply(exports,arguments) +},{"dup":50}],151:[function(require,module,exports){ 'use strict'; var toPrimitive = require('../internals/to-primitive'); var definePropertyModule = require('../internals/object-define-property'); @@ -16739,7 +17607,7 @@ module.exports = function (object, key, value) { else object[propertyKey] = value; }; -},{"../internals/create-property-descriptor":76,"../internals/object-define-property":135,"../internals/to-primitive":181}],78:[function(require,module,exports){ +},{"../internals/create-property-descriptor":150,"../internals/object-define-property":209,"../internals/to-primitive":255}],152:[function(require,module,exports){ 'use strict'; var fails = require('../internals/fails'); var padStart = require('../internals/string-pad').start; @@ -16772,7 +17640,7 @@ module.exports = (fails(function () { 'Z'; } : nativeDateToISOString; -},{"../internals/fails":87,"../internals/string-pad":169}],79:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/string-pad":243}],153:[function(require,module,exports){ 'use strict'; var anObject = require('../internals/an-object'); var toPrimitive = require('../internals/to-primitive'); @@ -16783,7 +17651,7 @@ module.exports = function (hint) { } return toPrimitive(anObject(this), hint !== 'number'); }; -},{"../internals/an-object":50,"../internals/to-primitive":181}],80:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/to-primitive":255}],154:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); @@ -16875,7 +17743,7 @@ module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, I return methods; }; -},{"../internals/create-iterator-constructor":75,"../internals/export":86,"../internals/hide":102,"../internals/is-pure":115,"../internals/iterators":119,"../internals/iterators-core":118,"../internals/object-get-prototype-of":140,"../internals/object-set-prototype-of":144,"../internals/redefine":155,"../internals/set-to-string-tag":163,"../internals/well-known-symbol":188}],81:[function(require,module,exports){ +},{"../internals/create-iterator-constructor":149,"../internals/export":160,"../internals/hide":176,"../internals/is-pure":189,"../internals/iterators":193,"../internals/iterators-core":192,"../internals/object-get-prototype-of":214,"../internals/object-set-prototype-of":218,"../internals/redefine":229,"../internals/set-to-string-tag":237,"../internals/well-known-symbol":262}],155:[function(require,module,exports){ var path = require('../internals/path'); var has = require('../internals/has'); var wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol'); @@ -16888,7 +17756,7 @@ module.exports = function (NAME) { }); }; -},{"../internals/has":100,"../internals/object-define-property":135,"../internals/path":150,"../internals/wrapped-well-known-symbol":190}],82:[function(require,module,exports){ +},{"../internals/has":174,"../internals/object-define-property":209,"../internals/path":224,"../internals/wrapped-well-known-symbol":264}],156:[function(require,module,exports){ var fails = require('../internals/fails'); // Thank's IE8 for his funny defineProperty @@ -16896,7 +17764,7 @@ module.exports = !fails(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); -},{"../internals/fails":87}],83:[function(require,module,exports){ +},{"../internals/fails":161}],157:[function(require,module,exports){ var global = require('../internals/global'); var isObject = require('../internals/is-object'); @@ -16908,7 +17776,7 @@ module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; -},{"../internals/global":99,"../internals/is-object":114}],84:[function(require,module,exports){ +},{"../internals/global":173,"../internals/is-object":188}],158:[function(require,module,exports){ // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods module.exports = { @@ -16945,7 +17813,7 @@ module.exports = { TouchList: 0 }; -},{}],85:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ // IE8- don't enum bug keys module.exports = [ 'constructor', @@ -16957,7 +17825,7 @@ module.exports = [ 'valueOf' ]; -},{}],86:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ var global = require('../internals/global'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var hide = require('../internals/hide'); @@ -17013,7 +17881,7 @@ module.exports = function (options, source) { } }; -},{"../internals/copy-constructor-properties":71,"../internals/global":99,"../internals/hide":102,"../internals/is-forced":112,"../internals/object-get-own-property-descriptor":136,"../internals/redefine":155,"../internals/set-global":161}],87:[function(require,module,exports){ +},{"../internals/copy-constructor-properties":145,"../internals/global":173,"../internals/hide":176,"../internals/is-forced":186,"../internals/object-get-own-property-descriptor":210,"../internals/redefine":229,"../internals/set-global":235}],161:[function(require,module,exports){ module.exports = function (exec) { try { return !!exec(); @@ -17022,7 +17890,7 @@ module.exports = function (exec) { } }; -},{}],88:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ 'use strict'; var hide = require('../internals/hide'); var redefine = require('../internals/redefine'); @@ -17117,7 +17985,7 @@ module.exports = function (KEY, length, exec, sham) { } }; -},{"../internals/fails":87,"../internals/hide":102,"../internals/redefine":155,"../internals/regexp-exec":157,"../internals/well-known-symbol":188}],89:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/hide":176,"../internals/redefine":229,"../internals/regexp-exec":231,"../internals/well-known-symbol":262}],163:[function(require,module,exports){ 'use strict'; var isArray = require('../internals/is-array'); var toLength = require('../internals/to-length'); @@ -17151,7 +18019,7 @@ var flattenIntoArray = function (target, original, source, sourceLen, start, dep module.exports = flattenIntoArray; -},{"../internals/bind-context":63,"../internals/is-array":111,"../internals/to-length":178}],90:[function(require,module,exports){ +},{"../internals/bind-context":137,"../internals/is-array":185,"../internals/to-length":252}],164:[function(require,module,exports){ 'use strict'; var IS_PURE = require('../internals/is-pure'); var global = require('../internals/global'); @@ -17166,7 +18034,7 @@ module.exports = IS_PURE || !fails(function () { delete global[key]; }); -},{"../internals/fails":87,"../internals/global":99,"../internals/is-pure":115}],91:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/global":173,"../internals/is-pure":189}],165:[function(require,module,exports){ var fails = require('../internals/fails'); // check the existence of a method, lowercase @@ -17178,7 +18046,7 @@ module.exports = function (METHOD_NAME) { }); }; -},{"../internals/fails":87}],92:[function(require,module,exports){ +},{"../internals/fails":161}],166:[function(require,module,exports){ var fails = require('../internals/fails'); var whitespaces = require('../internals/whitespaces'); @@ -17192,14 +18060,14 @@ module.exports = function (METHOD_NAME) { }); }; -},{"../internals/fails":87,"../internals/whitespaces":189}],93:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/whitespaces":263}],167:[function(require,module,exports){ var fails = require('../internals/fails'); module.exports = !fails(function () { return Object.isExtensible(Object.preventExtensions({})); }); -},{"../internals/fails":87}],94:[function(require,module,exports){ +},{"../internals/fails":161}],168:[function(require,module,exports){ 'use strict'; var aFunction = require('../internals/a-function'); var isObject = require('../internals/is-object'); @@ -17228,12 +18096,12 @@ module.exports = Function.bind || function bind(that /* , ...args */) { return boundFunction; }; -},{"../internals/a-function":45,"../internals/is-object":114}],95:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/is-object":188}],169:[function(require,module,exports){ var shared = require('../internals/shared'); module.exports = shared('native-function-to-string', Function.toString); -},{"../internals/shared":165}],96:[function(require,module,exports){ +},{"../internals/shared":239}],170:[function(require,module,exports){ var path = require('../internals/path'); var global = require('../internals/global'); @@ -17246,7 +18114,7 @@ module.exports = function (namespace, method) { : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; }; -},{"../internals/global":99,"../internals/path":150}],97:[function(require,module,exports){ +},{"../internals/global":173,"../internals/path":224}],171:[function(require,module,exports){ var classof = require('../internals/classof'); var Iterators = require('../internals/iterators'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -17259,7 +18127,7 @@ module.exports = function (it) { || Iterators[classof(it)]; }; -},{"../internals/classof":67,"../internals/iterators":119,"../internals/well-known-symbol":188}],98:[function(require,module,exports){ +},{"../internals/classof":141,"../internals/iterators":193,"../internals/well-known-symbol":262}],172:[function(require,module,exports){ var anObject = require('../internals/an-object'); var getIteratorMethod = require('../internals/get-iterator-method'); @@ -17270,7 +18138,7 @@ module.exports = function (it) { } return anObject(iteratorMethod.call(it)); }; -},{"../internals/an-object":50,"../internals/get-iterator-method":97}],99:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/get-iterator-method":171}],173:[function(require,module,exports){ (function (global){ var O = 'object'; var check = function (it) { @@ -17289,17 +18157,16 @@ module.exports = }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],100:[function(require,module,exports){ +},{}],174:[function(require,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; -},{}],101:[function(require,module,exports){ -module.exports = {}; - -},{}],102:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ +arguments[4][41][0].apply(exports,arguments) +},{"dup":41}],176:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var definePropertyModule = require('../internals/object-define-property'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); @@ -17311,7 +18178,7 @@ module.exports = DESCRIPTORS ? function (object, key, value) { return object; }; -},{"../internals/create-property-descriptor":76,"../internals/descriptors":82,"../internals/object-define-property":135}],103:[function(require,module,exports){ +},{"../internals/create-property-descriptor":150,"../internals/descriptors":156,"../internals/object-define-property":209}],177:[function(require,module,exports){ var global = require('../internals/global'); module.exports = function (a, b) { @@ -17321,12 +18188,12 @@ module.exports = function (a, b) { } }; -},{"../internals/global":99}],104:[function(require,module,exports){ +},{"../internals/global":173}],178:[function(require,module,exports){ var getBuiltIn = require('../internals/get-built-in'); module.exports = getBuiltIn('document', 'documentElement'); -},{"../internals/get-built-in":96}],105:[function(require,module,exports){ +},{"../internals/get-built-in":170}],179:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var fails = require('../internals/fails'); var createElement = require('../internals/document-create-element'); @@ -17338,7 +18205,7 @@ module.exports = !DESCRIPTORS && !fails(function () { }).a != 7; }); -},{"../internals/descriptors":82,"../internals/document-create-element":83,"../internals/fails":87}],106:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/document-create-element":157,"../internals/fails":161}],180:[function(require,module,exports){ var fails = require('../internals/fails'); var classof = require('../internals/classof-raw'); @@ -17353,7 +18220,7 @@ module.exports = fails(function () { return classof(it) == 'String' ? split.call(it, '') : Object(it); } : Object; -},{"../internals/classof-raw":66,"../internals/fails":87}],107:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/fails":161}],181:[function(require,module,exports){ var isObject = require('../internals/is-object'); var setPrototypeOf = require('../internals/object-set-prototype-of'); @@ -17372,7 +18239,7 @@ module.exports = function ($this, dummy, Wrapper) { return $this; }; -},{"../internals/is-object":114,"../internals/object-set-prototype-of":144}],108:[function(require,module,exports){ +},{"../internals/is-object":188,"../internals/object-set-prototype-of":218}],182:[function(require,module,exports){ var hiddenKeys = require('../internals/hidden-keys'); var isObject = require('../internals/is-object'); var has = require('../internals/has'); @@ -17435,7 +18302,7 @@ var meta = module.exports = { hiddenKeys[METADATA] = true; -},{"../internals/freezing":93,"../internals/has":100,"../internals/hidden-keys":101,"../internals/is-object":114,"../internals/object-define-property":135,"../internals/uid":185}],109:[function(require,module,exports){ +},{"../internals/freezing":167,"../internals/has":174,"../internals/hidden-keys":175,"../internals/is-object":188,"../internals/object-define-property":209,"../internals/uid":259}],183:[function(require,module,exports){ var NATIVE_WEAK_MAP = require('../internals/native-weak-map'); var global = require('../internals/global'); var isObject = require('../internals/is-object'); @@ -17498,7 +18365,7 @@ module.exports = { getterFor: getterFor }; -},{"../internals/global":99,"../internals/has":100,"../internals/hidden-keys":101,"../internals/hide":102,"../internals/is-object":114,"../internals/native-weak-map":128,"../internals/shared-key":164}],110:[function(require,module,exports){ +},{"../internals/global":173,"../internals/has":174,"../internals/hidden-keys":175,"../internals/hide":176,"../internals/is-object":188,"../internals/native-weak-map":202,"../internals/shared-key":238}],184:[function(require,module,exports){ var wellKnownSymbol = require('../internals/well-known-symbol'); var Iterators = require('../internals/iterators'); @@ -17510,7 +18377,7 @@ module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); }; -},{"../internals/iterators":119,"../internals/well-known-symbol":188}],111:[function(require,module,exports){ +},{"../internals/iterators":193,"../internals/well-known-symbol":262}],185:[function(require,module,exports){ var classof = require('../internals/classof-raw'); // `IsArray` abstract operation @@ -17519,7 +18386,7 @@ module.exports = Array.isArray || function isArray(arg) { return classof(arg) == 'Array'; }; -},{"../internals/classof-raw":66}],112:[function(require,module,exports){ +},{"../internals/classof-raw":140}],186:[function(require,module,exports){ var fails = require('../internals/fails'); var replacement = /#|\.prototype\./; @@ -17542,7 +18409,7 @@ var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; -},{"../internals/fails":87}],113:[function(require,module,exports){ +},{"../internals/fails":161}],187:[function(require,module,exports){ var isObject = require('../internals/is-object'); var floor = Math.floor; @@ -17553,15 +18420,12 @@ module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; -},{"../internals/is-object":114}],114:[function(require,module,exports){ -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -},{}],115:[function(require,module,exports){ +},{"../internals/is-object":188}],188:[function(require,module,exports){ +arguments[4][37][0].apply(exports,arguments) +},{"dup":37}],189:[function(require,module,exports){ module.exports = false; -},{}],116:[function(require,module,exports){ +},{}],190:[function(require,module,exports){ var isObject = require('../internals/is-object'); var classof = require('../internals/classof-raw'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -17575,7 +18439,7 @@ module.exports = function (it) { return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); }; -},{"../internals/classof-raw":66,"../internals/is-object":114,"../internals/well-known-symbol":188}],117:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/is-object":188,"../internals/well-known-symbol":262}],191:[function(require,module,exports){ var anObject = require('../internals/an-object'); var isArrayIteratorMethod = require('../internals/is-array-iterator-method'); var toLength = require('../internals/to-length'); @@ -17619,7 +18483,7 @@ iterate.stop = function (result) { return new Result(true, result); }; -},{"../internals/an-object":50,"../internals/bind-context":63,"../internals/call-with-safe-iteration-closing":64,"../internals/get-iterator-method":97,"../internals/is-array-iterator-method":110,"../internals/to-length":178}],118:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/bind-context":137,"../internals/call-with-safe-iteration-closing":138,"../internals/get-iterator-method":171,"../internals/is-array-iterator-method":184,"../internals/to-length":252}],192:[function(require,module,exports){ 'use strict'; var getPrototypeOf = require('../internals/object-get-prototype-of'); var hide = require('../internals/hide'); @@ -17656,9 +18520,9 @@ module.exports = { BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; -},{"../internals/has":100,"../internals/hide":102,"../internals/is-pure":115,"../internals/object-get-prototype-of":140,"../internals/well-known-symbol":188}],119:[function(require,module,exports){ -arguments[4][101][0].apply(exports,arguments) -},{"dup":101}],120:[function(require,module,exports){ +},{"../internals/has":174,"../internals/hide":176,"../internals/is-pure":189,"../internals/object-get-prototype-of":214,"../internals/well-known-symbol":262}],193:[function(require,module,exports){ +arguments[4][41][0].apply(exports,arguments) +},{"dup":41}],194:[function(require,module,exports){ var nativeExpm1 = Math.expm1; var exp = Math.exp; @@ -17673,7 +18537,7 @@ module.exports = (!nativeExpm1 return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; } : nativeExpm1; -},{}],121:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ var sign = require('../internals/math-sign'); var abs = Math.abs; @@ -17701,7 +18565,7 @@ module.exports = Math.fround || function fround(x) { return $sign * result; }; -},{"../internals/math-sign":123}],122:[function(require,module,exports){ +},{"../internals/math-sign":197}],196:[function(require,module,exports){ var log = Math.log; // `Math.log1p` method implementation @@ -17710,7 +18574,7 @@ module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); }; -},{}],123:[function(require,module,exports){ +},{}],197:[function(require,module,exports){ // `Math.sign` method implementation // https://tc39.github.io/ecma262/#sec-math.sign module.exports = Math.sign || function sign(x) { @@ -17718,7 +18582,7 @@ module.exports = Math.sign || function sign(x) { return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; -},{}],124:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ var global = require('../internals/global'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var classof = require('../internals/classof-raw'); @@ -17798,12 +18662,12 @@ module.exports = queueMicrotask || function (fn) { } last = task; }; -},{"../internals/classof-raw":66,"../internals/global":99,"../internals/object-get-own-property-descriptor":136,"../internals/task":172,"../internals/user-agent":186}],125:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/global":173,"../internals/object-get-own-property-descriptor":210,"../internals/task":246,"../internals/user-agent":260}],199:[function(require,module,exports){ var global = require('../internals/global'); module.exports = global.Promise; -},{"../internals/global":99}],126:[function(require,module,exports){ +},{"../internals/global":173}],200:[function(require,module,exports){ var fails = require('../internals/fails'); module.exports = !!Object.getOwnPropertySymbols && !fails(function () { @@ -17812,7 +18676,7 @@ module.exports = !!Object.getOwnPropertySymbols && !fails(function () { return !String(Symbol()); }); -},{"../internals/fails":87}],127:[function(require,module,exports){ +},{"../internals/fails":161}],201:[function(require,module,exports){ var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); @@ -17838,7 +18702,7 @@ module.exports = !fails(function () { || new URL('http://a#б').hash !== '#%D0%B1'; }); -},{"../internals/fails":87,"../internals/is-pure":115,"../internals/well-known-symbol":188}],128:[function(require,module,exports){ +},{"../internals/fails":161,"../internals/is-pure":189,"../internals/well-known-symbol":262}],202:[function(require,module,exports){ var global = require('../internals/global'); var nativeFunctionToString = require('../internals/function-to-string'); @@ -17846,7 +18710,7 @@ var WeakMap = global.WeakMap; module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); -},{"../internals/function-to-string":95,"../internals/global":99}],129:[function(require,module,exports){ +},{"../internals/function-to-string":169,"../internals/global":173}],203:[function(require,module,exports){ 'use strict'; var aFunction = require('../internals/a-function'); @@ -17866,7 +18730,7 @@ module.exports.f = function (C) { return new PromiseCapability(C); }; -},{"../internals/a-function":45}],130:[function(require,module,exports){ +},{"../internals/a-function":119}],204:[function(require,module,exports){ var isRegExp = require('../internals/is-regexp'); module.exports = function (it) { @@ -17875,7 +18739,7 @@ module.exports = function (it) { } return it; }; -},{"../internals/is-regexp":116}],131:[function(require,module,exports){ +},{"../internals/is-regexp":190}],205:[function(require,module,exports){ var global = require('../internals/global'); var globalIsFinite = global.isFinite; @@ -17886,7 +18750,7 @@ module.exports = Number.isFinite || function isFinite(it) { return typeof it == 'number' && globalIsFinite(it); }; -},{"../internals/global":99}],132:[function(require,module,exports){ +},{"../internals/global":173}],206:[function(require,module,exports){ 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var fails = require('../internals/fails'); @@ -17929,7 +18793,7 @@ module.exports = !nativeAssign || fails(function () { } return T; } : nativeAssign; -},{"../internals/descriptors":82,"../internals/fails":87,"../internals/indexed-object":106,"../internals/object-get-own-property-symbols":139,"../internals/object-keys":142,"../internals/object-property-is-enumerable":143,"../internals/to-object":179}],133:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/fails":161,"../internals/indexed-object":180,"../internals/object-get-own-property-symbols":213,"../internals/object-keys":216,"../internals/object-property-is-enumerable":217,"../internals/to-object":253}],207:[function(require,module,exports){ var anObject = require('../internals/an-object'); var defineProperties = require('../internals/object-define-properties'); var enumBugKeys = require('../internals/enum-bug-keys'); @@ -17980,7 +18844,7 @@ module.exports = Object.create || function create(O, Properties) { hiddenKeys[IE_PROTO] = true; -},{"../internals/an-object":50,"../internals/document-create-element":83,"../internals/enum-bug-keys":85,"../internals/hidden-keys":101,"../internals/html":104,"../internals/object-define-properties":134,"../internals/shared-key":164}],134:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/document-create-element":157,"../internals/enum-bug-keys":159,"../internals/hidden-keys":175,"../internals/html":178,"../internals/object-define-properties":208,"../internals/shared-key":238}],208:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var definePropertyModule = require('../internals/object-define-property'); var anObject = require('../internals/an-object'); @@ -17998,7 +18862,7 @@ module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperti return O; }; -},{"../internals/an-object":50,"../internals/descriptors":82,"../internals/object-define-property":135,"../internals/object-keys":142}],135:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/descriptors":156,"../internals/object-define-property":209,"../internals/object-keys":216}],209:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); var anObject = require('../internals/an-object'); @@ -18020,7 +18884,7 @@ exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, A return O; }; -},{"../internals/an-object":50,"../internals/descriptors":82,"../internals/ie8-dom-define":105,"../internals/to-primitive":181}],136:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/descriptors":156,"../internals/ie8-dom-define":179,"../internals/to-primitive":255}],210:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); @@ -18042,7 +18906,7 @@ exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnProper if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); }; -},{"../internals/create-property-descriptor":76,"../internals/descriptors":82,"../internals/has":100,"../internals/ie8-dom-define":105,"../internals/object-property-is-enumerable":143,"../internals/to-indexed-object":176,"../internals/to-primitive":181}],137:[function(require,module,exports){ +},{"../internals/create-property-descriptor":150,"../internals/descriptors":156,"../internals/has":174,"../internals/ie8-dom-define":179,"../internals/object-property-is-enumerable":217,"../internals/to-indexed-object":250,"../internals/to-primitive":255}],211:[function(require,module,exports){ var toIndexedObject = require('../internals/to-indexed-object'); var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f; @@ -18066,7 +18930,7 @@ module.exports.f = function getOwnPropertyNames(it) { : nativeGetOwnPropertyNames(toIndexedObject(it)); }; -},{"../internals/object-get-own-property-names":138,"../internals/to-indexed-object":176}],138:[function(require,module,exports){ +},{"../internals/object-get-own-property-names":212,"../internals/to-indexed-object":250}],212:[function(require,module,exports){ var internalObjectKeys = require('../internals/object-keys-internal'); var enumBugKeys = require('../internals/enum-bug-keys'); @@ -18078,10 +18942,10 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; -},{"../internals/enum-bug-keys":85,"../internals/object-keys-internal":141}],139:[function(require,module,exports){ +},{"../internals/enum-bug-keys":159,"../internals/object-keys-internal":215}],213:[function(require,module,exports){ exports.f = Object.getOwnPropertySymbols; -},{}],140:[function(require,module,exports){ +},{}],214:[function(require,module,exports){ var has = require('../internals/has'); var toObject = require('../internals/to-object'); var sharedKey = require('../internals/shared-key'); @@ -18100,7 +18964,7 @@ module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) } return O instanceof Object ? ObjectPrototype : null; }; -},{"../internals/correct-prototype-getter":73,"../internals/has":100,"../internals/shared-key":164,"../internals/to-object":179}],141:[function(require,module,exports){ +},{"../internals/correct-prototype-getter":147,"../internals/has":174,"../internals/shared-key":238,"../internals/to-object":253}],215:[function(require,module,exports){ var has = require('../internals/has'); var toIndexedObject = require('../internals/to-indexed-object'); var indexOf = require('../internals/array-includes').indexOf; @@ -18119,7 +18983,7 @@ module.exports = function (object, names) { return result; }; -},{"../internals/array-includes":57,"../internals/has":100,"../internals/hidden-keys":101,"../internals/to-indexed-object":176}],142:[function(require,module,exports){ +},{"../internals/array-includes":131,"../internals/has":174,"../internals/hidden-keys":175,"../internals/to-indexed-object":250}],216:[function(require,module,exports){ var internalObjectKeys = require('../internals/object-keys-internal'); var enumBugKeys = require('../internals/enum-bug-keys'); @@ -18129,7 +18993,7 @@ module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; -},{"../internals/enum-bug-keys":85,"../internals/object-keys-internal":141}],143:[function(require,module,exports){ +},{"../internals/enum-bug-keys":159,"../internals/object-keys-internal":215}],217:[function(require,module,exports){ 'use strict'; var nativePropertyIsEnumerable = {}.propertyIsEnumerable; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; @@ -18144,7 +19008,7 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { return !!descriptor && descriptor.enumerable; } : nativePropertyIsEnumerable; -},{}],144:[function(require,module,exports){ +},{}],218:[function(require,module,exports){ var anObject = require('../internals/an-object'); var aPossiblePrototype = require('../internals/a-possible-prototype'); @@ -18170,7 +19034,7 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { }; }() : undefined); -},{"../internals/a-possible-prototype":46,"../internals/an-object":50}],145:[function(require,module,exports){ +},{"../internals/a-possible-prototype":120,"../internals/an-object":124}],219:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var objectKeys = require('../internals/object-keys'); var toIndexedObject = require('../internals/to-indexed-object'); @@ -18204,7 +19068,7 @@ module.exports = { values: createMethod(false) }; -},{"../internals/descriptors":82,"../internals/object-keys":142,"../internals/object-property-is-enumerable":143,"../internals/to-indexed-object":176}],146:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/object-keys":216,"../internals/object-property-is-enumerable":217,"../internals/to-indexed-object":250}],220:[function(require,module,exports){ 'use strict'; var classof = require('../internals/classof'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -18220,7 +19084,7 @@ module.exports = String(test) !== '[object z]' ? function toString() { return '[object ' + classof(this) + ']'; } : test.toString; -},{"../internals/classof":67,"../internals/well-known-symbol":188}],147:[function(require,module,exports){ +},{"../internals/classof":141,"../internals/well-known-symbol":262}],221:[function(require,module,exports){ var getBuiltIn = require('../internals/get-built-in'); var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names'); var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); @@ -18233,7 +19097,7 @@ module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; }; -},{"../internals/an-object":50,"../internals/get-built-in":96,"../internals/object-get-own-property-names":138,"../internals/object-get-own-property-symbols":139}],148:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/get-built-in":170,"../internals/object-get-own-property-names":212,"../internals/object-get-own-property-symbols":213}],222:[function(require,module,exports){ var global = require('../internals/global'); var trim = require('../internals/string-trim').trim; var whitespaces = require('../internals/whitespaces'); @@ -18249,7 +19113,7 @@ module.exports = FORCED ? function parseFloat(string) { return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result; } : nativeParseFloat; -},{"../internals/global":99,"../internals/string-trim":171,"../internals/whitespaces":189}],149:[function(require,module,exports){ +},{"../internals/global":173,"../internals/string-trim":245,"../internals/whitespaces":263}],223:[function(require,module,exports){ var global = require('../internals/global'); var trim = require('../internals/string-trim').trim; var whitespaces = require('../internals/whitespaces'); @@ -18265,10 +19129,10 @@ module.exports = FORCED ? function parseInt(string, radix) { return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10)); } : nativeParseInt; -},{"../internals/global":99,"../internals/string-trim":171,"../internals/whitespaces":189}],150:[function(require,module,exports){ +},{"../internals/global":173,"../internals/string-trim":245,"../internals/whitespaces":263}],224:[function(require,module,exports){ module.exports = require('../internals/global'); -},{"../internals/global":99}],151:[function(require,module,exports){ +},{"../internals/global":173}],225:[function(require,module,exports){ module.exports = function (exec) { try { return { error: false, value: exec() }; @@ -18277,7 +19141,7 @@ module.exports = function (exec) { } }; -},{}],152:[function(require,module,exports){ +},{}],226:[function(require,module,exports){ var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var newPromiseCapability = require('../internals/new-promise-capability'); @@ -18291,7 +19155,7 @@ module.exports = function (C, x) { return promiseCapability.promise; }; -},{"../internals/an-object":50,"../internals/is-object":114,"../internals/new-promise-capability":129}],153:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/is-object":188,"../internals/new-promise-capability":203}],227:[function(require,module,exports){ 'use strict'; // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 @@ -18461,7 +19325,7 @@ module.exports = function (input) { return encoded.join('.'); }; -},{}],154:[function(require,module,exports){ +},{}],228:[function(require,module,exports){ var redefine = require('../internals/redefine'); module.exports = function (target, src, options) { @@ -18469,7 +19333,7 @@ module.exports = function (target, src, options) { return target; }; -},{"../internals/redefine":155}],155:[function(require,module,exports){ +},{"../internals/redefine":229}],229:[function(require,module,exports){ var global = require('../internals/global'); var shared = require('../internals/shared'); var hide = require('../internals/hide'); @@ -18510,7 +19374,7 @@ shared('inspectSource', function (it) { return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this); }); -},{"../internals/function-to-string":95,"../internals/global":99,"../internals/has":100,"../internals/hide":102,"../internals/internal-state":109,"../internals/set-global":161,"../internals/shared":165}],156:[function(require,module,exports){ +},{"../internals/function-to-string":169,"../internals/global":173,"../internals/has":174,"../internals/hide":176,"../internals/internal-state":183,"../internals/set-global":235,"../internals/shared":239}],230:[function(require,module,exports){ var classof = require('./classof-raw'); var regexpExec = require('./regexp-exec'); @@ -18534,7 +19398,7 @@ module.exports = function (R, S) { }; -},{"./classof-raw":66,"./regexp-exec":157}],157:[function(require,module,exports){ +},{"./classof-raw":140,"./regexp-exec":231}],231:[function(require,module,exports){ 'use strict'; var regexpFlags = require('./regexp-flags'); @@ -18590,7 +19454,7 @@ if (PATCH) { module.exports = patchedExec; -},{"./regexp-flags":158}],158:[function(require,module,exports){ +},{"./regexp-flags":232}],232:[function(require,module,exports){ 'use strict'; var anObject = require('../internals/an-object'); @@ -18608,7 +19472,7 @@ module.exports = function () { return result; }; -},{"../internals/an-object":50}],159:[function(require,module,exports){ +},{"../internals/an-object":124}],233:[function(require,module,exports){ // `RequireObjectCoercible` abstract operation // https://tc39.github.io/ecma262/#sec-requireobjectcoercible module.exports = function (it) { @@ -18616,7 +19480,7 @@ module.exports = function (it) { return it; }; -},{}],160:[function(require,module,exports){ +},{}],234:[function(require,module,exports){ // `SameValue` abstract operation // https://tc39.github.io/ecma262/#sec-samevalue module.exports = Object.is || function is(x, y) { @@ -18624,7 +19488,7 @@ module.exports = Object.is || function is(x, y) { return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; -},{}],161:[function(require,module,exports){ +},{}],235:[function(require,module,exports){ var global = require('../internals/global'); var hide = require('../internals/hide'); @@ -18636,7 +19500,7 @@ module.exports = function (key, value) { } return value; }; -},{"../internals/global":99,"../internals/hide":102}],162:[function(require,module,exports){ +},{"../internals/global":173,"../internals/hide":176}],236:[function(require,module,exports){ 'use strict'; var getBuiltIn = require('../internals/get-built-in'); var definePropertyModule = require('../internals/object-define-property'); @@ -18657,7 +19521,7 @@ module.exports = function (CONSTRUCTOR_NAME) { } }; -},{"../internals/descriptors":82,"../internals/get-built-in":96,"../internals/object-define-property":135,"../internals/well-known-symbol":188}],163:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/get-built-in":170,"../internals/object-define-property":209,"../internals/well-known-symbol":262}],237:[function(require,module,exports){ var defineProperty = require('../internals/object-define-property').f; var has = require('../internals/has'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -18670,7 +19534,7 @@ module.exports = function (it, TAG, STATIC) { } }; -},{"../internals/has":100,"../internals/object-define-property":135,"../internals/well-known-symbol":188}],164:[function(require,module,exports){ +},{"../internals/has":174,"../internals/object-define-property":209,"../internals/well-known-symbol":262}],238:[function(require,module,exports){ var shared = require('../internals/shared'); var uid = require('../internals/uid'); @@ -18680,7 +19544,7 @@ module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; -},{"../internals/shared":165,"../internals/uid":185}],165:[function(require,module,exports){ +},{"../internals/shared":239,"../internals/uid":259}],239:[function(require,module,exports){ var global = require('../internals/global'); var setGlobal = require('../internals/set-global'); var IS_PURE = require('../internals/is-pure'); @@ -18696,7 +19560,7 @@ var store = global[SHARED] || setGlobal(SHARED, {}); copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); -},{"../internals/global":99,"../internals/is-pure":115,"../internals/set-global":161}],166:[function(require,module,exports){ +},{"../internals/global":173,"../internals/is-pure":189,"../internals/set-global":235}],240:[function(require,module,exports){ 'use strict'; var fails = require('../internals/fails'); @@ -18708,7 +19572,7 @@ module.exports = function (METHOD_NAME, argument) { }); }; -},{"../internals/fails":87}],167:[function(require,module,exports){ +},{"../internals/fails":161}],241:[function(require,module,exports){ var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -18723,7 +19587,7 @@ module.exports = function (O, defaultConstructor) { return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); }; -},{"../internals/a-function":45,"../internals/an-object":50,"../internals/well-known-symbol":188}],168:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/an-object":124,"../internals/well-known-symbol":262}],242:[function(require,module,exports){ var toInteger = require('../internals/to-integer'); var requireObjectCoercible = require('../internals/require-object-coercible'); @@ -18752,7 +19616,7 @@ module.exports = { charAt: createMethod(true) }; -},{"../internals/require-object-coercible":159,"../internals/to-integer":177}],169:[function(require,module,exports){ +},{"../internals/require-object-coercible":233,"../internals/to-integer":251}],243:[function(require,module,exports){ // https://github.com/tc39/proposal-string-pad-start-end var toLength = require('../internals/to-length'); var repeat = require('../internals/string-repeat'); @@ -18785,7 +19649,7 @@ module.exports = { end: createMethod(true) }; -},{"../internals/require-object-coercible":159,"../internals/string-repeat":170,"../internals/to-length":178}],170:[function(require,module,exports){ +},{"../internals/require-object-coercible":233,"../internals/string-repeat":244,"../internals/to-length":252}],244:[function(require,module,exports){ 'use strict'; var toInteger = require('../internals/to-integer'); var requireObjectCoercible = require('../internals/require-object-coercible'); @@ -18801,7 +19665,7 @@ module.exports = ''.repeat || function repeat(count) { return result; }; -},{"../internals/require-object-coercible":159,"../internals/to-integer":177}],171:[function(require,module,exports){ +},{"../internals/require-object-coercible":233,"../internals/to-integer":251}],245:[function(require,module,exports){ var requireObjectCoercible = require('../internals/require-object-coercible'); var whitespaces = require('../internals/whitespaces'); @@ -18831,7 +19695,7 @@ module.exports = { trim: createMethod(3) }; -},{"../internals/require-object-coercible":159,"../internals/whitespaces":189}],172:[function(require,module,exports){ +},{"../internals/require-object-coercible":233,"../internals/whitespaces":263}],246:[function(require,module,exports){ var global = require('../internals/global'); var fails = require('../internals/fails'); var classof = require('../internals/classof-raw'); @@ -18932,7 +19796,7 @@ module.exports = { clear: clear }; -},{"../internals/bind-context":63,"../internals/classof-raw":66,"../internals/document-create-element":83,"../internals/fails":87,"../internals/global":99,"../internals/html":104}],173:[function(require,module,exports){ +},{"../internals/bind-context":137,"../internals/classof-raw":140,"../internals/document-create-element":157,"../internals/fails":161,"../internals/global":173,"../internals/html":178}],247:[function(require,module,exports){ var classof = require('../internals/classof-raw'); // `thisNumberValue` abstract operation @@ -18944,7 +19808,7 @@ module.exports = function (value) { return +value; }; -},{"../internals/classof-raw":66}],174:[function(require,module,exports){ +},{"../internals/classof-raw":140}],248:[function(require,module,exports){ var toInteger = require('../internals/to-integer'); var max = Math.max; @@ -18958,7 +19822,7 @@ module.exports = function (index, length) { return integer < 0 ? max(integer + length, 0) : min(integer, length); }; -},{"../internals/to-integer":177}],175:[function(require,module,exports){ +},{"../internals/to-integer":251}],249:[function(require,module,exports){ var toInteger = require('../internals/to-integer'); var toLength = require('../internals/to-length'); @@ -18972,7 +19836,7 @@ module.exports = function (it) { return length; }; -},{"../internals/to-integer":177,"../internals/to-length":178}],176:[function(require,module,exports){ +},{"../internals/to-integer":251,"../internals/to-length":252}],250:[function(require,module,exports){ // toObject with fallback for non-array-like ES3 strings var IndexedObject = require('../internals/indexed-object'); var requireObjectCoercible = require('../internals/require-object-coercible'); @@ -18981,7 +19845,7 @@ module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; -},{"../internals/indexed-object":106,"../internals/require-object-coercible":159}],177:[function(require,module,exports){ +},{"../internals/indexed-object":180,"../internals/require-object-coercible":233}],251:[function(require,module,exports){ var ceil = Math.ceil; var floor = Math.floor; @@ -18991,7 +19855,7 @@ module.exports = function (argument) { return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); }; -},{}],178:[function(require,module,exports){ +},{}],252:[function(require,module,exports){ var toInteger = require('../internals/to-integer'); var min = Math.min; @@ -19002,7 +19866,7 @@ module.exports = function (argument) { return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; -},{"../internals/to-integer":177}],179:[function(require,module,exports){ +},{"../internals/to-integer":251}],253:[function(require,module,exports){ var requireObjectCoercible = require('../internals/require-object-coercible'); // `ToObject` abstract operation @@ -19011,7 +19875,7 @@ module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; -},{"../internals/require-object-coercible":159}],180:[function(require,module,exports){ +},{"../internals/require-object-coercible":233}],254:[function(require,module,exports){ var toInteger = require('../internals/to-integer'); module.exports = function (it, BYTES) { @@ -19020,7 +19884,7 @@ module.exports = function (it, BYTES) { return offset; }; -},{"../internals/to-integer":177}],181:[function(require,module,exports){ +},{"../internals/to-integer":251}],255:[function(require,module,exports){ var isObject = require('../internals/is-object'); // `ToPrimitive` abstract operation @@ -19036,7 +19900,7 @@ module.exports = function (input, PREFERRED_STRING) { throw TypeError("Can't convert object to primitive value"); }; -},{"../internals/is-object":114}],182:[function(require,module,exports){ +},{"../internals/is-object":188}],256:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); @@ -19261,7 +20125,7 @@ if (DESCRIPTORS) { }; } else module.exports = function () { /* empty */ }; -},{"../internals/an-instance":49,"../internals/array-buffer":52,"../internals/array-buffer-view-core":51,"../internals/array-iteration":58,"../internals/classof":67,"../internals/create-property-descriptor":76,"../internals/descriptors":82,"../internals/export":86,"../internals/global":99,"../internals/has":100,"../internals/hide":102,"../internals/internal-state":109,"../internals/is-object":114,"../internals/object-create":133,"../internals/object-define-property":135,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-own-property-names":138,"../internals/object-set-prototype-of":144,"../internals/set-species":162,"../internals/to-index":175,"../internals/to-length":178,"../internals/to-offset":180,"../internals/to-primitive":181,"../internals/typed-array-from":183,"../internals/typed-arrays-constructors-requires-wrappers":184}],183:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/array-buffer":126,"../internals/array-buffer-view-core":125,"../internals/array-iteration":132,"../internals/classof":141,"../internals/create-property-descriptor":150,"../internals/descriptors":156,"../internals/export":160,"../internals/global":173,"../internals/has":174,"../internals/hide":176,"../internals/internal-state":183,"../internals/is-object":188,"../internals/object-create":207,"../internals/object-define-property":209,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-own-property-names":212,"../internals/object-set-prototype-of":218,"../internals/set-species":236,"../internals/to-index":249,"../internals/to-length":252,"../internals/to-offset":254,"../internals/to-primitive":255,"../internals/typed-array-from":257,"../internals/typed-arrays-constructors-requires-wrappers":258}],257:[function(require,module,exports){ var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var getIteratorMethod = require('../internals/get-iterator-method'); @@ -19294,7 +20158,7 @@ module.exports = function from(source /* , mapfn, thisArg */) { return result; }; -},{"../internals/array-buffer-view-core":51,"../internals/bind-context":63,"../internals/get-iterator-method":97,"../internals/is-array-iterator-method":110,"../internals/to-length":178,"../internals/to-object":179}],184:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/bind-context":137,"../internals/get-iterator-method":171,"../internals/is-array-iterator-method":184,"../internals/to-length":252,"../internals/to-object":253}],258:[function(require,module,exports){ /* eslint-disable no-new */ var global = require('../internals/global'); var fails = require('../internals/fails'); @@ -19318,7 +20182,7 @@ module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; }); -},{"../internals/array-buffer-view-core":51,"../internals/check-correctness-of-iteration":65,"../internals/fails":87,"../internals/global":99}],185:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/check-correctness-of-iteration":139,"../internals/fails":161,"../internals/global":173}],259:[function(require,module,exports){ var id = 0; var postfix = Math.random(); @@ -19326,19 +20190,19 @@ module.exports = function (key) { return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); }; -},{}],186:[function(require,module,exports){ +},{}],260:[function(require,module,exports){ var getBuiltIn = require('../internals/get-built-in'); module.exports = getBuiltIn('navigator', 'userAgent') || ''; -},{"../internals/get-built-in":96}],187:[function(require,module,exports){ +},{"../internals/get-built-in":170}],261:[function(require,module,exports){ // https://github.com/zloirock/core-js/issues/280 var userAgent = require('../internals/user-agent'); // eslint-disable-next-line unicorn/no-unsafe-regex module.exports = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); -},{"../internals/user-agent":186}],188:[function(require,module,exports){ +},{"../internals/user-agent":260}],262:[function(require,module,exports){ var global = require('../internals/global'); var shared = require('../internals/shared'); var uid = require('../internals/uid'); @@ -19352,15 +20216,15 @@ module.exports = function (name) { || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; -},{"../internals/global":99,"../internals/native-symbol":126,"../internals/shared":165,"../internals/uid":185}],189:[function(require,module,exports){ +},{"../internals/global":173,"../internals/native-symbol":200,"../internals/shared":239,"../internals/uid":259}],263:[function(require,module,exports){ // a string of all valid unicode whitespaces // eslint-disable-next-line max-len module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; -},{}],190:[function(require,module,exports){ +},{}],264:[function(require,module,exports){ exports.f = require('../internals/well-known-symbol'); -},{"../internals/well-known-symbol":188}],191:[function(require,module,exports){ +},{"../internals/well-known-symbol":262}],265:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); @@ -19379,7 +20243,7 @@ $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, { setSpecies(ARRAY_BUFFER); -},{"../internals/array-buffer":52,"../internals/export":86,"../internals/global":99,"../internals/set-species":162}],192:[function(require,module,exports){ +},{"../internals/array-buffer":126,"../internals/export":160,"../internals/global":173,"../internals/set-species":236}],266:[function(require,module,exports){ var $ = require('../internals/export'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -19391,7 +20255,7 @@ $({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { isView: ArrayBufferViewCore.isView }); -},{"../internals/array-buffer-view-core":51,"../internals/export":86}],193:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/export":160}],267:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -19429,7 +20293,7 @@ $({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, } }); -},{"../internals/an-object":50,"../internals/array-buffer":52,"../internals/export":86,"../internals/fails":87,"../internals/species-constructor":167,"../internals/to-absolute-index":174,"../internals/to-length":178}],194:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/array-buffer":126,"../internals/export":160,"../internals/fails":161,"../internals/species-constructor":241,"../internals/to-absolute-index":248,"../internals/to-length":252}],268:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -19487,7 +20351,7 @@ $({ target: 'Array', proto: true, forced: FORCED }, { } }); -},{"../internals/array-method-has-species-support":60,"../internals/array-species-create":62,"../internals/create-property":77,"../internals/export":86,"../internals/fails":87,"../internals/is-array":111,"../internals/is-object":114,"../internals/to-length":178,"../internals/to-object":179,"../internals/well-known-symbol":188}],195:[function(require,module,exports){ +},{"../internals/array-method-has-species-support":134,"../internals/array-species-create":136,"../internals/create-property":151,"../internals/export":160,"../internals/fails":161,"../internals/is-array":185,"../internals/is-object":188,"../internals/to-length":252,"../internals/to-object":253,"../internals/well-known-symbol":262}],269:[function(require,module,exports){ var $ = require('../internals/export'); var copyWithin = require('../internals/array-copy-within'); var addToUnscopables = require('../internals/add-to-unscopables'); @@ -19501,7 +20365,7 @@ $({ target: 'Array', proto: true }, { // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('copyWithin'); -},{"../internals/add-to-unscopables":47,"../internals/array-copy-within":53,"../internals/export":86}],196:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/array-copy-within":127,"../internals/export":160}],270:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $every = require('../internals/array-iteration').every; @@ -19515,7 +20379,7 @@ $({ target: 'Array', proto: true, forced: sloppyArrayMethod('every') }, { } }); -},{"../internals/array-iteration":58,"../internals/export":86,"../internals/sloppy-array-method":166}],197:[function(require,module,exports){ +},{"../internals/array-iteration":132,"../internals/export":160,"../internals/sloppy-array-method":240}],271:[function(require,module,exports){ var $ = require('../internals/export'); var fill = require('../internals/array-fill'); var addToUnscopables = require('../internals/add-to-unscopables'); @@ -19529,7 +20393,7 @@ $({ target: 'Array', proto: true }, { // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('fill'); -},{"../internals/add-to-unscopables":47,"../internals/array-fill":54,"../internals/export":86}],198:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/array-fill":128,"../internals/export":160}],272:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $filter = require('../internals/array-iteration').filter; @@ -19544,7 +20408,7 @@ $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter' } }); -},{"../internals/array-iteration":58,"../internals/array-method-has-species-support":60,"../internals/export":86}],199:[function(require,module,exports){ +},{"../internals/array-iteration":132,"../internals/array-method-has-species-support":134,"../internals/export":160}],273:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $findIndex = require('../internals/array-iteration').findIndex; @@ -19567,7 +20431,7 @@ $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND_INDEX); -},{"../internals/add-to-unscopables":47,"../internals/array-iteration":58,"../internals/export":86}],200:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/array-iteration":132,"../internals/export":160}],274:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $find = require('../internals/array-iteration').find; @@ -19590,7 +20454,7 @@ $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND); -},{"../internals/add-to-unscopables":47,"../internals/array-iteration":58,"../internals/export":86}],201:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/array-iteration":132,"../internals/export":160}],275:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var flattenIntoArray = require('../internals/flatten-into-array'); @@ -19613,7 +20477,7 @@ $({ target: 'Array', proto: true }, { } }); -},{"../internals/a-function":45,"../internals/array-species-create":62,"../internals/export":86,"../internals/flatten-into-array":89,"../internals/to-length":178,"../internals/to-object":179}],202:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/array-species-create":136,"../internals/export":160,"../internals/flatten-into-array":163,"../internals/to-length":252,"../internals/to-object":253}],276:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var flattenIntoArray = require('../internals/flatten-into-array'); @@ -19635,7 +20499,7 @@ $({ target: 'Array', proto: true }, { } }); -},{"../internals/array-species-create":62,"../internals/export":86,"../internals/flatten-into-array":89,"../internals/to-integer":177,"../internals/to-length":178,"../internals/to-object":179}],203:[function(require,module,exports){ +},{"../internals/array-species-create":136,"../internals/export":160,"../internals/flatten-into-array":163,"../internals/to-integer":251,"../internals/to-length":252,"../internals/to-object":253}],277:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var forEach = require('../internals/array-for-each'); @@ -19646,7 +20510,7 @@ $({ target: 'Array', proto: true, forced: [].forEach != forEach }, { forEach: forEach }); -},{"../internals/array-for-each":55,"../internals/export":86}],204:[function(require,module,exports){ +},{"../internals/array-for-each":129,"../internals/export":160}],278:[function(require,module,exports){ var $ = require('../internals/export'); var from = require('../internals/array-from'); var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration'); @@ -19661,7 +20525,7 @@ $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { from: from }); -},{"../internals/array-from":56,"../internals/check-correctness-of-iteration":65,"../internals/export":86}],205:[function(require,module,exports){ +},{"../internals/array-from":130,"../internals/check-correctness-of-iteration":139,"../internals/export":160}],279:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $includes = require('../internals/array-includes').includes; @@ -19678,7 +20542,7 @@ $({ target: 'Array', proto: true }, { // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); -},{"../internals/add-to-unscopables":47,"../internals/array-includes":57,"../internals/export":86}],206:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/array-includes":131,"../internals/export":160}],280:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $indexOf = require('../internals/array-includes').indexOf; @@ -19700,7 +20564,7 @@ $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, { } }); -},{"../internals/array-includes":57,"../internals/export":86,"../internals/sloppy-array-method":166}],207:[function(require,module,exports){ +},{"../internals/array-includes":131,"../internals/export":160,"../internals/sloppy-array-method":240}],281:[function(require,module,exports){ 'use strict'; var toIndexedObject = require('../internals/to-indexed-object'); var addToUnscopables = require('../internals/add-to-unscopables'); @@ -19755,7 +20619,7 @@ addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); -},{"../internals/add-to-unscopables":47,"../internals/define-iterator":80,"../internals/internal-state":109,"../internals/iterators":119,"../internals/to-indexed-object":176}],208:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121,"../internals/define-iterator":154,"../internals/internal-state":183,"../internals/iterators":193,"../internals/to-indexed-object":250}],282:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var IndexedObject = require('../internals/indexed-object'); @@ -19775,7 +20639,7 @@ $({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, { } }); -},{"../internals/export":86,"../internals/indexed-object":106,"../internals/sloppy-array-method":166,"../internals/to-indexed-object":176}],209:[function(require,module,exports){ +},{"../internals/export":160,"../internals/indexed-object":180,"../internals/sloppy-array-method":240,"../internals/to-indexed-object":250}],283:[function(require,module,exports){ var $ = require('../internals/export'); var lastIndexOf = require('../internals/array-last-index-of'); @@ -19785,7 +20649,7 @@ $({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, { lastIndexOf: lastIndexOf }); -},{"../internals/array-last-index-of":59,"../internals/export":86}],210:[function(require,module,exports){ +},{"../internals/array-last-index-of":133,"../internals/export":160}],284:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $map = require('../internals/array-iteration').map; @@ -19800,7 +20664,7 @@ $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') } } }); -},{"../internals/array-iteration":58,"../internals/array-method-has-species-support":60,"../internals/export":86}],211:[function(require,module,exports){ +},{"../internals/array-iteration":132,"../internals/array-method-has-species-support":134,"../internals/export":160}],285:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -19825,7 +20689,7 @@ $({ target: 'Array', stat: true, forced: ISNT_GENERIC }, { } }); -},{"../internals/create-property":77,"../internals/export":86,"../internals/fails":87}],212:[function(require,module,exports){ +},{"../internals/create-property":151,"../internals/export":160,"../internals/fails":161}],286:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $reduceRight = require('../internals/array-reduce').right; @@ -19839,7 +20703,7 @@ $({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduceRight') }, { } }); -},{"../internals/array-reduce":61,"../internals/export":86,"../internals/sloppy-array-method":166}],213:[function(require,module,exports){ +},{"../internals/array-reduce":135,"../internals/export":160,"../internals/sloppy-array-method":240}],287:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $reduce = require('../internals/array-reduce').left; @@ -19853,7 +20717,7 @@ $({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, { } }); -},{"../internals/array-reduce":61,"../internals/export":86,"../internals/sloppy-array-method":166}],214:[function(require,module,exports){ +},{"../internals/array-reduce":135,"../internals/export":160,"../internals/sloppy-array-method":240}],288:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var isArray = require('../internals/is-array'); @@ -19872,7 +20736,7 @@ $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse() } }); -},{"../internals/export":86,"../internals/is-array":111}],215:[function(require,module,exports){ +},{"../internals/export":160,"../internals/is-array":185}],289:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var isObject = require('../internals/is-object'); @@ -19919,7 +20783,7 @@ $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') } }); -},{"../internals/array-method-has-species-support":60,"../internals/create-property":77,"../internals/export":86,"../internals/is-array":111,"../internals/is-object":114,"../internals/to-absolute-index":174,"../internals/to-indexed-object":176,"../internals/to-length":178,"../internals/well-known-symbol":188}],216:[function(require,module,exports){ +},{"../internals/array-method-has-species-support":134,"../internals/create-property":151,"../internals/export":160,"../internals/is-array":185,"../internals/is-object":188,"../internals/to-absolute-index":248,"../internals/to-indexed-object":250,"../internals/to-length":252,"../internals/well-known-symbol":262}],290:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $some = require('../internals/array-iteration').some; @@ -19933,7 +20797,7 @@ $({ target: 'Array', proto: true, forced: sloppyArrayMethod('some') }, { } }); -},{"../internals/array-iteration":58,"../internals/export":86,"../internals/sloppy-array-method":166}],217:[function(require,module,exports){ +},{"../internals/array-iteration":132,"../internals/export":160,"../internals/sloppy-array-method":240}],291:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); @@ -19967,14 +20831,14 @@ $({ target: 'Array', proto: true, forced: FORCED }, { } }); -},{"../internals/a-function":45,"../internals/export":86,"../internals/fails":87,"../internals/sloppy-array-method":166,"../internals/to-object":179}],218:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/export":160,"../internals/fails":161,"../internals/sloppy-array-method":240,"../internals/to-object":253}],292:[function(require,module,exports){ var setSpecies = require('../internals/set-species'); // `Array[@@species]` getter // https://tc39.github.io/ecma262/#sec-get-array-@@species setSpecies('Array'); -},{"../internals/set-species":162}],219:[function(require,module,exports){ +},{"../internals/set-species":236}],293:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var toAbsoluteIndex = require('../internals/to-absolute-index'); @@ -20042,21 +20906,21 @@ $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice' } }); -},{"../internals/array-method-has-species-support":60,"../internals/array-species-create":62,"../internals/create-property":77,"../internals/export":86,"../internals/to-absolute-index":174,"../internals/to-integer":177,"../internals/to-length":178,"../internals/to-object":179}],220:[function(require,module,exports){ +},{"../internals/array-method-has-species-support":134,"../internals/array-species-create":136,"../internals/create-property":151,"../internals/export":160,"../internals/to-absolute-index":248,"../internals/to-integer":251,"../internals/to-length":252,"../internals/to-object":253}],294:[function(require,module,exports){ // this method was added to unscopables after implementation // in popular engines, so it's moved to a separate module var addToUnscopables = require('../internals/add-to-unscopables'); addToUnscopables('flatMap'); -},{"../internals/add-to-unscopables":47}],221:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121}],295:[function(require,module,exports){ // this method was added to unscopables after implementation // in popular engines, so it's moved to a separate module var addToUnscopables = require('../internals/add-to-unscopables'); addToUnscopables('flat'); -},{"../internals/add-to-unscopables":47}],222:[function(require,module,exports){ +},{"../internals/add-to-unscopables":121}],296:[function(require,module,exports){ var $ = require('../internals/export'); var ArrayBufferModule = require('../internals/array-buffer'); var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER; @@ -20067,7 +20931,7 @@ $({ global: true, forced: !NATIVE_ARRAY_BUFFER }, { DataView: ArrayBufferModule.DataView }); -},{"../internals/array-buffer":52,"../internals/array-buffer-view-core":51,"../internals/export":86}],223:[function(require,module,exports){ +},{"../internals/array-buffer":126,"../internals/array-buffer-view-core":125,"../internals/export":160}],297:[function(require,module,exports){ var $ = require('../internals/export'); var toISOString = require('../internals/date-to-iso-string'); @@ -20078,7 +20942,7 @@ $({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOStr toISOString: toISOString }); -},{"../internals/date-to-iso-string":78,"../internals/export":86}],224:[function(require,module,exports){ +},{"../internals/date-to-iso-string":152,"../internals/export":160}],298:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -20101,7 +20965,7 @@ $({ target: 'Date', proto: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/to-object":179,"../internals/to-primitive":181}],225:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/to-object":253,"../internals/to-primitive":255}],299:[function(require,module,exports){ var hide = require('../internals/hide'); var dateToPrimitive = require('../internals/date-to-primitive'); var wellKnownSymbol = require('../internals/well-known-symbol'); @@ -20113,7 +20977,7 @@ var DatePrototype = Date.prototype; // https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive if (!(TO_PRIMITIVE in DatePrototype)) hide(DatePrototype, TO_PRIMITIVE, dateToPrimitive); -},{"../internals/date-to-primitive":79,"../internals/hide":102,"../internals/well-known-symbol":188}],226:[function(require,module,exports){ +},{"../internals/date-to-primitive":153,"../internals/hide":176,"../internals/well-known-symbol":262}],300:[function(require,module,exports){ var redefine = require('../internals/redefine'); var DatePrototype = Date.prototype; @@ -20132,7 +20996,7 @@ if (new Date(NaN) + '' != INVALID_DATE) { }); } -},{"../internals/redefine":155}],227:[function(require,module,exports){ +},{"../internals/redefine":229}],301:[function(require,module,exports){ 'use strict'; var isObject = require('../internals/is-object'); var definePropertyModule = require('../internals/object-define-property'); @@ -20154,7 +21018,7 @@ if (!(HAS_INSTANCE in FunctionPrototype)) { } }); } -},{"../internals/is-object":114,"../internals/object-define-property":135,"../internals/object-get-prototype-of":140,"../internals/well-known-symbol":188}],228:[function(require,module,exports){ +},{"../internals/is-object":188,"../internals/object-define-property":209,"../internals/object-get-prototype-of":214,"../internals/well-known-symbol":262}],302:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var defineProperty = require('../internals/object-define-property').f; @@ -20178,7 +21042,7 @@ if (DESCRIPTORS && !(NAME in FunctionPrototype)) { }); } -},{"../internals/descriptors":82,"../internals/object-define-property":135}],229:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/object-define-property":209}],303:[function(require,module,exports){ var global = require('../internals/global'); var setToStringTag = require('../internals/set-to-string-tag'); @@ -20186,7 +21050,7 @@ var setToStringTag = require('../internals/set-to-string-tag'); // https://tc39.github.io/ecma262/#sec-json-@@tostringtag setToStringTag(global.JSON, 'JSON', true); -},{"../internals/global":99,"../internals/set-to-string-tag":163}],230:[function(require,module,exports){ +},{"../internals/global":173,"../internals/set-to-string-tag":237}],304:[function(require,module,exports){ 'use strict'; var collection = require('../internals/collection'); var collectionStrong = require('../internals/collection-strong'); @@ -20197,7 +21061,7 @@ module.exports = collection('Map', function (get) { return function Map() { return get(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong, true); -},{"../internals/collection":70,"../internals/collection-strong":68}],231:[function(require,module,exports){ +},{"../internals/collection":144,"../internals/collection-strong":142}],305:[function(require,module,exports){ var $ = require('../internals/export'); var log1p = require('../internals/math-log1p'); @@ -20222,7 +21086,7 @@ $({ target: 'Math', stat: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/math-log1p":122}],232:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-log1p":196}],306:[function(require,module,exports){ var $ = require('../internals/export'); var nativeAsinh = Math.asinh; @@ -20240,7 +21104,7 @@ $({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) asinh: asinh }); -},{"../internals/export":86}],233:[function(require,module,exports){ +},{"../internals/export":160}],307:[function(require,module,exports){ var $ = require('../internals/export'); var nativeAtanh = Math.atanh; @@ -20255,7 +21119,7 @@ $({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0 } }); -},{"../internals/export":86}],234:[function(require,module,exports){ +},{"../internals/export":160}],308:[function(require,module,exports){ var $ = require('../internals/export'); var sign = require('../internals/math-sign'); @@ -20270,7 +21134,7 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86,"../internals/math-sign":123}],235:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-sign":197}],309:[function(require,module,exports){ var $ = require('../internals/export'); var floor = Math.floor; @@ -20285,7 +21149,7 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86}],236:[function(require,module,exports){ +},{"../internals/export":160}],310:[function(require,module,exports){ var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); @@ -20302,7 +21166,7 @@ $({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infin } }); -},{"../internals/export":86,"../internals/math-expm1":120}],237:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-expm1":194}],311:[function(require,module,exports){ var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); @@ -20310,7 +21174,7 @@ var expm1 = require('../internals/math-expm1'); // https://tc39.github.io/ecma262/#sec-math.expm1 $({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 }); -},{"../internals/export":86,"../internals/math-expm1":120}],238:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-expm1":194}],312:[function(require,module,exports){ var $ = require('../internals/export'); var fround = require('../internals/math-fround'); @@ -20318,7 +21182,7 @@ var fround = require('../internals/math-fround'); // https://tc39.github.io/ecma262/#sec-math.fround $({ target: 'Math', stat: true }, { fround: fround }); -},{"../internals/export":86,"../internals/math-fround":121}],239:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-fround":195}],313:[function(require,module,exports){ var $ = require('../internals/export'); var $hypot = Math.hypot; @@ -20353,7 +21217,7 @@ $({ target: 'Math', stat: true, forced: BUGGY }, { } }); -},{"../internals/export":86}],240:[function(require,module,exports){ +},{"../internals/export":160}],314:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -20377,7 +21241,7 @@ $({ target: 'Math', stat: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/fails":87}],241:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161}],315:[function(require,module,exports){ var $ = require('../internals/export'); var log = Math.log; @@ -20391,7 +21255,7 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86}],242:[function(require,module,exports){ +},{"../internals/export":160}],316:[function(require,module,exports){ var $ = require('../internals/export'); var log1p = require('../internals/math-log1p'); @@ -20399,7 +21263,7 @@ var log1p = require('../internals/math-log1p'); // https://tc39.github.io/ecma262/#sec-math.log1p $({ target: 'Math', stat: true }, { log1p: log1p }); -},{"../internals/export":86,"../internals/math-log1p":122}],243:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-log1p":196}],317:[function(require,module,exports){ var $ = require('../internals/export'); var log = Math.log; @@ -20413,7 +21277,7 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86}],244:[function(require,module,exports){ +},{"../internals/export":160}],318:[function(require,module,exports){ var $ = require('../internals/export'); var sign = require('../internals/math-sign'); @@ -20423,7 +21287,7 @@ $({ target: 'Math', stat: true }, { sign: sign }); -},{"../internals/export":86,"../internals/math-sign":123}],245:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-sign":197}],319:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var expm1 = require('../internals/math-expm1'); @@ -20445,7 +21309,7 @@ $({ target: 'Math', stat: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/math-expm1":120}],246:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/math-expm1":194}],320:[function(require,module,exports){ var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); @@ -20461,14 +21325,14 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86,"../internals/math-expm1":120}],247:[function(require,module,exports){ +},{"../internals/export":160,"../internals/math-expm1":194}],321:[function(require,module,exports){ var setToStringTag = require('../internals/set-to-string-tag'); // Math[@@toStringTag] property // https://tc39.github.io/ecma262/#sec-math-@@tostringtag setToStringTag(Math, 'Math', true); -},{"../internals/set-to-string-tag":163}],248:[function(require,module,exports){ +},{"../internals/set-to-string-tag":237}],322:[function(require,module,exports){ var $ = require('../internals/export'); var ceil = Math.ceil; @@ -20482,7 +21346,7 @@ $({ target: 'Math', stat: true }, { } }); -},{"../internals/export":86}],249:[function(require,module,exports){ +},{"../internals/export":160}],323:[function(require,module,exports){ 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); @@ -20562,7 +21426,7 @@ if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumb redefine(global, NUMBER, NumberWrapper); } -},{"../internals/classof-raw":66,"../internals/descriptors":82,"../internals/fails":87,"../internals/global":99,"../internals/has":100,"../internals/inherit-if-required":107,"../internals/is-forced":112,"../internals/object-create":133,"../internals/object-define-property":135,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-own-property-names":138,"../internals/redefine":155,"../internals/string-trim":171,"../internals/to-primitive":181}],250:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/descriptors":156,"../internals/fails":161,"../internals/global":173,"../internals/has":174,"../internals/inherit-if-required":181,"../internals/is-forced":186,"../internals/object-create":207,"../internals/object-define-property":209,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-own-property-names":212,"../internals/redefine":229,"../internals/string-trim":245,"../internals/to-primitive":255}],324:[function(require,module,exports){ var $ = require('../internals/export'); // `Number.EPSILON` constant @@ -20571,7 +21435,7 @@ $({ target: 'Number', stat: true }, { EPSILON: Math.pow(2, -52) }); -},{"../internals/export":86}],251:[function(require,module,exports){ +},{"../internals/export":160}],325:[function(require,module,exports){ var $ = require('../internals/export'); var numberIsFinite = require('../internals/number-is-finite'); @@ -20579,7 +21443,7 @@ var numberIsFinite = require('../internals/number-is-finite'); // https://tc39.github.io/ecma262/#sec-number.isfinite $({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); -},{"../internals/export":86,"../internals/number-is-finite":131}],252:[function(require,module,exports){ +},{"../internals/export":160,"../internals/number-is-finite":205}],326:[function(require,module,exports){ var $ = require('../internals/export'); var isInteger = require('../internals/is-integer'); @@ -20589,7 +21453,7 @@ $({ target: 'Number', stat: true }, { isInteger: isInteger }); -},{"../internals/export":86,"../internals/is-integer":113}],253:[function(require,module,exports){ +},{"../internals/export":160,"../internals/is-integer":187}],327:[function(require,module,exports){ var $ = require('../internals/export'); // `Number.isNaN` method @@ -20601,7 +21465,7 @@ $({ target: 'Number', stat: true }, { } }); -},{"../internals/export":86}],254:[function(require,module,exports){ +},{"../internals/export":160}],328:[function(require,module,exports){ var $ = require('../internals/export'); var isInteger = require('../internals/is-integer'); @@ -20615,7 +21479,7 @@ $({ target: 'Number', stat: true }, { } }); -},{"../internals/export":86,"../internals/is-integer":113}],255:[function(require,module,exports){ +},{"../internals/export":160,"../internals/is-integer":187}],329:[function(require,module,exports){ var $ = require('../internals/export'); // `Number.MAX_SAFE_INTEGER` constant @@ -20624,7 +21488,7 @@ $({ target: 'Number', stat: true }, { MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF }); -},{"../internals/export":86}],256:[function(require,module,exports){ +},{"../internals/export":160}],330:[function(require,module,exports){ var $ = require('../internals/export'); // `Number.MIN_SAFE_INTEGER` constant @@ -20633,7 +21497,7 @@ $({ target: 'Number', stat: true }, { MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF }); -},{"../internals/export":86}],257:[function(require,module,exports){ +},{"../internals/export":160}],331:[function(require,module,exports){ var $ = require('../internals/export'); var parseFloat = require('../internals/parse-float'); @@ -20643,7 +21507,7 @@ $({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, { parseFloat: parseFloat }); -},{"../internals/export":86,"../internals/parse-float":148}],258:[function(require,module,exports){ +},{"../internals/export":160,"../internals/parse-float":222}],332:[function(require,module,exports){ var $ = require('../internals/export'); var parseInt = require('../internals/parse-int'); @@ -20653,7 +21517,7 @@ $({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, { parseInt: parseInt }); -},{"../internals/export":86,"../internals/parse-int":149}],259:[function(require,module,exports){ +},{"../internals/export":160,"../internals/parse-int":223}],333:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var toInteger = require('../internals/to-integer'); @@ -20781,7 +21645,7 @@ $({ target: 'Number', proto: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/string-repeat":170,"../internals/this-number-value":173,"../internals/to-integer":177}],260:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/string-repeat":244,"../internals/this-number-value":247,"../internals/to-integer":251}],334:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); @@ -20807,7 +21671,7 @@ $({ target: 'Number', proto: true, forced: FORCED }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/this-number-value":173}],261:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/this-number-value":247}],335:[function(require,module,exports){ var $ = require('../internals/export'); var assign = require('../internals/object-assign'); @@ -20817,7 +21681,7 @@ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, { assign: assign }); -},{"../internals/export":86,"../internals/object-assign":132}],262:[function(require,module,exports){ +},{"../internals/export":160,"../internals/object-assign":206}],336:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); @@ -20836,7 +21700,7 @@ if (DESCRIPTORS) { }); } -},{"../internals/a-function":45,"../internals/descriptors":82,"../internals/export":86,"../internals/forced-object-prototype-accessors-methods":90,"../internals/object-define-property":135,"../internals/to-object":179}],263:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/descriptors":156,"../internals/export":160,"../internals/forced-object-prototype-accessors-methods":164,"../internals/object-define-property":209,"../internals/to-object":253}],337:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); @@ -20855,7 +21719,7 @@ if (DESCRIPTORS) { }); } -},{"../internals/a-function":45,"../internals/descriptors":82,"../internals/export":86,"../internals/forced-object-prototype-accessors-methods":90,"../internals/object-define-property":135,"../internals/to-object":179}],264:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/descriptors":156,"../internals/export":160,"../internals/forced-object-prototype-accessors-methods":164,"../internals/object-define-property":209,"../internals/to-object":253}],338:[function(require,module,exports){ var $ = require('../internals/export'); var $entries = require('../internals/object-to-array').entries; @@ -20867,7 +21731,7 @@ $({ target: 'Object', stat: true }, { } }); -},{"../internals/export":86,"../internals/object-to-array":145}],265:[function(require,module,exports){ +},{"../internals/export":160,"../internals/object-to-array":219}],339:[function(require,module,exports){ var $ = require('../internals/export'); var FREEZING = require('../internals/freezing'); var fails = require('../internals/fails'); @@ -20885,7 +21749,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING } } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/freezing":93,"../internals/internal-metadata":108,"../internals/is-object":114}],266:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/freezing":167,"../internals/internal-metadata":182,"../internals/is-object":188}],340:[function(require,module,exports){ var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var createProperty = require('../internals/create-property'); @@ -20902,7 +21766,7 @@ $({ target: 'Object', stat: true }, { } }); -},{"../internals/create-property":77,"../internals/export":86,"../internals/iterate":117}],267:[function(require,module,exports){ +},{"../internals/create-property":151,"../internals/export":160,"../internals/iterate":191}],341:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var toIndexedObject = require('../internals/to-indexed-object'); @@ -20920,7 +21784,7 @@ $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { } }); -},{"../internals/descriptors":82,"../internals/export":86,"../internals/fails":87,"../internals/object-get-own-property-descriptor":136,"../internals/to-indexed-object":176}],268:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/export":160,"../internals/fails":161,"../internals/object-get-own-property-descriptor":210,"../internals/to-indexed-object":250}],342:[function(require,module,exports){ var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var ownKeys = require('../internals/own-keys'); @@ -20946,7 +21810,7 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { } }); -},{"../internals/create-property":77,"../internals/descriptors":82,"../internals/export":86,"../internals/object-get-own-property-descriptor":136,"../internals/own-keys":147,"../internals/to-indexed-object":176}],269:[function(require,module,exports){ +},{"../internals/create-property":151,"../internals/descriptors":156,"../internals/export":160,"../internals/object-get-own-property-descriptor":210,"../internals/own-keys":221,"../internals/to-indexed-object":250}],343:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f; @@ -20959,7 +21823,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { getOwnPropertyNames: nativeGetOwnPropertyNames }); -},{"../internals/export":86,"../internals/fails":87,"../internals/object-get-own-property-names-external":137}],270:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/object-get-own-property-names-external":211}],344:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var toObject = require('../internals/to-object'); @@ -20977,7 +21841,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PR }); -},{"../internals/correct-prototype-getter":73,"../internals/export":86,"../internals/fails":87,"../internals/object-get-prototype-of":140,"../internals/to-object":179}],271:[function(require,module,exports){ +},{"../internals/correct-prototype-getter":147,"../internals/export":160,"../internals/fails":161,"../internals/object-get-prototype-of":214,"../internals/to-object":253}],345:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); @@ -20993,7 +21857,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/is-object":114}],272:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/is-object":188}],346:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); @@ -21009,7 +21873,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/is-object":114}],273:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/is-object":188}],347:[function(require,module,exports){ var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); @@ -21025,7 +21889,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/is-object":114}],274:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/is-object":188}],348:[function(require,module,exports){ var $ = require('../internals/export'); var is = require('../internals/same-value'); @@ -21035,7 +21899,7 @@ $({ target: 'Object', stat: true }, { is: is }); -},{"../internals/export":86,"../internals/same-value":160}],275:[function(require,module,exports){ +},{"../internals/export":160,"../internals/same-value":234}],349:[function(require,module,exports){ var $ = require('../internals/export'); var toObject = require('../internals/to-object'); var nativeKeys = require('../internals/object-keys'); @@ -21051,7 +21915,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/object-keys":142,"../internals/to-object":179}],276:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/object-keys":216,"../internals/to-object":253}],350:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); @@ -21076,7 +21940,7 @@ if (DESCRIPTORS) { }); } -},{"../internals/descriptors":82,"../internals/export":86,"../internals/forced-object-prototype-accessors-methods":90,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-prototype-of":140,"../internals/to-object":179,"../internals/to-primitive":181}],277:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/export":160,"../internals/forced-object-prototype-accessors-methods":164,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-prototype-of":214,"../internals/to-object":253,"../internals/to-primitive":255}],351:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); @@ -21101,7 +21965,7 @@ if (DESCRIPTORS) { }); } -},{"../internals/descriptors":82,"../internals/export":86,"../internals/forced-object-prototype-accessors-methods":90,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-prototype-of":140,"../internals/to-object":179,"../internals/to-primitive":181}],278:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/export":160,"../internals/forced-object-prototype-accessors-methods":164,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-prototype-of":214,"../internals/to-object":253,"../internals/to-primitive":255}],352:[function(require,module,exports){ var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var onFreeze = require('../internals/internal-metadata').onFreeze; @@ -21119,7 +21983,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING } } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/freezing":93,"../internals/internal-metadata":108,"../internals/is-object":114}],279:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/freezing":167,"../internals/internal-metadata":182,"../internals/is-object":188}],353:[function(require,module,exports){ var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var onFreeze = require('../internals/internal-metadata').onFreeze; @@ -21137,7 +22001,7 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING } } }); -},{"../internals/export":86,"../internals/fails":87,"../internals/freezing":93,"../internals/internal-metadata":108,"../internals/is-object":114}],280:[function(require,module,exports){ +},{"../internals/export":160,"../internals/fails":161,"../internals/freezing":167,"../internals/internal-metadata":182,"../internals/is-object":188}],354:[function(require,module,exports){ var $ = require('../internals/export'); var setPrototypeOf = require('../internals/object-set-prototype-of'); @@ -21147,7 +22011,7 @@ $({ target: 'Object', stat: true }, { setPrototypeOf: setPrototypeOf }); -},{"../internals/export":86,"../internals/object-set-prototype-of":144}],281:[function(require,module,exports){ +},{"../internals/export":160,"../internals/object-set-prototype-of":218}],355:[function(require,module,exports){ var redefine = require('../internals/redefine'); var toString = require('../internals/object-to-string'); @@ -21159,7 +22023,7 @@ if (toString !== ObjectPrototype.toString) { redefine(ObjectPrototype, 'toString', toString, { unsafe: true }); } -},{"../internals/object-to-string":146,"../internals/redefine":155}],282:[function(require,module,exports){ +},{"../internals/object-to-string":220,"../internals/redefine":229}],356:[function(require,module,exports){ var $ = require('../internals/export'); var $values = require('../internals/object-to-array').values; @@ -21171,7 +22035,7 @@ $({ target: 'Object', stat: true }, { } }); -},{"../internals/export":86,"../internals/object-to-array":145}],283:[function(require,module,exports){ +},{"../internals/export":160,"../internals/object-to-array":219}],357:[function(require,module,exports){ var $ = require('../internals/export'); var parseFloatImplementation = require('../internals/parse-float'); @@ -21181,7 +22045,7 @@ $({ global: true, forced: parseFloat != parseFloatImplementation }, { parseFloat: parseFloatImplementation }); -},{"../internals/export":86,"../internals/parse-float":148}],284:[function(require,module,exports){ +},{"../internals/export":160,"../internals/parse-float":222}],358:[function(require,module,exports){ var $ = require('../internals/export'); var parseIntImplementation = require('../internals/parse-int'); @@ -21191,7 +22055,7 @@ $({ global: true, forced: parseInt != parseIntImplementation }, { parseInt: parseIntImplementation }); -},{"../internals/export":86,"../internals/parse-int":149}],285:[function(require,module,exports){ +},{"../internals/export":160,"../internals/parse-int":223}],359:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); @@ -21223,7 +22087,7 @@ if (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype[' redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']); } -},{"../internals/export":86,"../internals/get-built-in":96,"../internals/is-pure":115,"../internals/native-promise-constructor":125,"../internals/promise-resolve":152,"../internals/redefine":155,"../internals/species-constructor":167}],286:[function(require,module,exports){ +},{"../internals/export":160,"../internals/get-built-in":170,"../internals/is-pure":189,"../internals/native-promise-constructor":199,"../internals/promise-resolve":226,"../internals/redefine":229,"../internals/species-constructor":241}],360:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); @@ -21596,7 +22460,7 @@ $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { } }); -},{"../internals/a-function":45,"../internals/an-instance":49,"../internals/check-correctness-of-iteration":65,"../internals/classof-raw":66,"../internals/export":86,"../internals/global":99,"../internals/host-report-errors":103,"../internals/internal-state":109,"../internals/is-forced":112,"../internals/is-object":114,"../internals/is-pure":115,"../internals/iterate":117,"../internals/microtask":124,"../internals/native-promise-constructor":125,"../internals/new-promise-capability":129,"../internals/path":150,"../internals/perform":151,"../internals/promise-resolve":152,"../internals/redefine":155,"../internals/redefine-all":154,"../internals/set-species":162,"../internals/set-to-string-tag":163,"../internals/species-constructor":167,"../internals/task":172,"../internals/user-agent":186,"../internals/well-known-symbol":188}],287:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/an-instance":123,"../internals/check-correctness-of-iteration":139,"../internals/classof-raw":140,"../internals/export":160,"../internals/global":173,"../internals/host-report-errors":177,"../internals/internal-state":183,"../internals/is-forced":186,"../internals/is-object":188,"../internals/is-pure":189,"../internals/iterate":191,"../internals/microtask":198,"../internals/native-promise-constructor":199,"../internals/new-promise-capability":203,"../internals/path":224,"../internals/perform":225,"../internals/promise-resolve":226,"../internals/redefine":229,"../internals/redefine-all":228,"../internals/set-species":236,"../internals/set-to-string-tag":237,"../internals/species-constructor":241,"../internals/task":246,"../internals/user-agent":260,"../internals/well-known-symbol":262}],361:[function(require,module,exports){ var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var aFunction = require('../internals/a-function'); @@ -21623,7 +22487,7 @@ $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, { } }); -},{"../internals/a-function":45,"../internals/an-object":50,"../internals/export":86,"../internals/fails":87,"../internals/get-built-in":96}],288:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/an-object":124,"../internals/export":160,"../internals/fails":161,"../internals/get-built-in":170}],362:[function(require,module,exports){ var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var aFunction = require('../internals/a-function'); @@ -21676,7 +22540,7 @@ $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, { } }); -},{"../internals/a-function":45,"../internals/an-object":50,"../internals/export":86,"../internals/fails":87,"../internals/function-bind":94,"../internals/get-built-in":96,"../internals/is-object":114,"../internals/object-create":133}],289:[function(require,module,exports){ +},{"../internals/a-function":119,"../internals/an-object":124,"../internals/export":160,"../internals/fails":161,"../internals/function-bind":168,"../internals/get-built-in":170,"../internals/is-object":188,"../internals/object-create":207}],363:[function(require,module,exports){ var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var anObject = require('../internals/an-object'); @@ -21706,7 +22570,7 @@ $({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRI } }); -},{"../internals/an-object":50,"../internals/descriptors":82,"../internals/export":86,"../internals/fails":87,"../internals/object-define-property":135,"../internals/to-primitive":181}],290:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/descriptors":156,"../internals/export":160,"../internals/fails":161,"../internals/object-define-property":209,"../internals/to-primitive":255}],364:[function(require,module,exports){ var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; @@ -21720,7 +22584,7 @@ $({ target: 'Reflect', stat: true }, { } }); -},{"../internals/an-object":50,"../internals/export":86,"../internals/object-get-own-property-descriptor":136}],291:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/export":160,"../internals/object-get-own-property-descriptor":210}],365:[function(require,module,exports){ var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var anObject = require('../internals/an-object'); @@ -21734,7 +22598,7 @@ $({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, { } }); -},{"../internals/an-object":50,"../internals/descriptors":82,"../internals/export":86,"../internals/object-get-own-property-descriptor":136}],292:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/descriptors":156,"../internals/export":160,"../internals/object-get-own-property-descriptor":210}],366:[function(require,module,exports){ var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var objectGetPrototypeOf = require('../internals/object-get-prototype-of'); @@ -21748,7 +22612,7 @@ $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, { } }); -},{"../internals/an-object":50,"../internals/correct-prototype-getter":73,"../internals/export":86,"../internals/object-get-prototype-of":140}],293:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/correct-prototype-getter":147,"../internals/export":160,"../internals/object-get-prototype-of":214}],367:[function(require,module,exports){ var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var anObject = require('../internals/an-object'); @@ -21774,7 +22638,7 @@ $({ target: 'Reflect', stat: true }, { get: get }); -},{"../internals/an-object":50,"../internals/export":86,"../internals/has":100,"../internals/is-object":114,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-prototype-of":140}],294:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/export":160,"../internals/has":174,"../internals/is-object":188,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-prototype-of":214}],368:[function(require,module,exports){ var $ = require('../internals/export'); // `Reflect.has` method @@ -21785,7 +22649,7 @@ $({ target: 'Reflect', stat: true }, { } }); -},{"../internals/export":86}],295:[function(require,module,exports){ +},{"../internals/export":160}],369:[function(require,module,exports){ var $ = require('../internals/export'); var anObject = require('../internals/an-object'); @@ -21800,7 +22664,7 @@ $({ target: 'Reflect', stat: true }, { } }); -},{"../internals/an-object":50,"../internals/export":86}],296:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/export":160}],370:[function(require,module,exports){ var $ = require('../internals/export'); var ownKeys = require('../internals/own-keys'); @@ -21810,7 +22674,7 @@ $({ target: 'Reflect', stat: true }, { ownKeys: ownKeys }); -},{"../internals/export":86,"../internals/own-keys":147}],297:[function(require,module,exports){ +},{"../internals/export":160,"../internals/own-keys":221}],371:[function(require,module,exports){ var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); @@ -21831,7 +22695,7 @@ $({ target: 'Reflect', stat: true, sham: !FREEZING }, { } }); -},{"../internals/an-object":50,"../internals/export":86,"../internals/freezing":93,"../internals/get-built-in":96}],298:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/export":160,"../internals/freezing":167,"../internals/get-built-in":170}],372:[function(require,module,exports){ var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var aPossiblePrototype = require('../internals/a-possible-prototype'); @@ -21852,7 +22716,7 @@ if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, { } }); -},{"../internals/a-possible-prototype":46,"../internals/an-object":50,"../internals/export":86,"../internals/object-set-prototype-of":144}],299:[function(require,module,exports){ +},{"../internals/a-possible-prototype":120,"../internals/an-object":124,"../internals/export":160,"../internals/object-set-prototype-of":218}],373:[function(require,module,exports){ var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); @@ -21890,7 +22754,7 @@ $({ target: 'Reflect', stat: true }, { set: set }); -},{"../internals/an-object":50,"../internals/create-property-descriptor":76,"../internals/export":86,"../internals/has":100,"../internals/is-object":114,"../internals/object-define-property":135,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-prototype-of":140}],300:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/create-property-descriptor":150,"../internals/export":160,"../internals/has":174,"../internals/is-object":188,"../internals/object-define-property":209,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-prototype-of":214}],374:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); var isForced = require('../internals/is-forced'); @@ -21952,7 +22816,7 @@ if (FORCED) { // https://tc39.github.io/ecma262/#sec-get-regexp-@@species setSpecies('RegExp'); -},{"../internals/descriptors":82,"../internals/fails":87,"../internals/global":99,"../internals/inherit-if-required":107,"../internals/is-forced":112,"../internals/is-regexp":116,"../internals/object-define-property":135,"../internals/object-get-own-property-names":138,"../internals/redefine":155,"../internals/regexp-flags":158,"../internals/set-species":162,"../internals/well-known-symbol":188}],301:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/fails":161,"../internals/global":173,"../internals/inherit-if-required":181,"../internals/is-forced":186,"../internals/is-regexp":190,"../internals/object-define-property":209,"../internals/object-get-own-property-names":212,"../internals/redefine":229,"../internals/regexp-flags":232,"../internals/set-species":236,"../internals/well-known-symbol":262}],375:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var exec = require('../internals/regexp-exec'); @@ -21961,7 +22825,7 @@ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { exec: exec }); -},{"../internals/export":86,"../internals/regexp-exec":157}],302:[function(require,module,exports){ +},{"../internals/export":160,"../internals/regexp-exec":231}],376:[function(require,module,exports){ var DESCRIPTORS = require('../internals/descriptors'); var objectDefinePropertyModule = require('../internals/object-define-property'); var regExpFlags = require('../internals/regexp-flags'); @@ -21975,7 +22839,7 @@ if (DESCRIPTORS && /./g.flags != 'g') { }); } -},{"../internals/descriptors":82,"../internals/object-define-property":135,"../internals/regexp-flags":158}],303:[function(require,module,exports){ +},{"../internals/descriptors":156,"../internals/object-define-property":209,"../internals/regexp-flags":232}],377:[function(require,module,exports){ 'use strict'; var redefine = require('../internals/redefine'); var anObject = require('../internals/an-object'); @@ -22002,7 +22866,7 @@ if (NOT_GENERIC || INCORRECT_NAME) { }, { unsafe: true }); } -},{"../internals/an-object":50,"../internals/fails":87,"../internals/redefine":155,"../internals/regexp-flags":158}],304:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/fails":161,"../internals/redefine":229,"../internals/regexp-flags":232}],378:[function(require,module,exports){ 'use strict'; var collection = require('../internals/collection'); var collectionStrong = require('../internals/collection-strong'); @@ -22013,7 +22877,7 @@ module.exports = collection('Set', function (get) { return function Set() { return get(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); -},{"../internals/collection":70,"../internals/collection-strong":68}],305:[function(require,module,exports){ +},{"../internals/collection":144,"../internals/collection-strong":142}],379:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22027,7 +22891,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],306:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],380:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22041,7 +22905,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],307:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],381:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22055,7 +22919,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],308:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],382:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22069,7 +22933,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],309:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],383:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var codeAt = require('../internals/string-multibyte').codeAt; @@ -22082,7 +22946,7 @@ $({ target: 'String', proto: true }, { } }); -},{"../internals/export":86,"../internals/string-multibyte":168}],310:[function(require,module,exports){ +},{"../internals/export":160,"../internals/string-multibyte":242}],384:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var toLength = require('../internals/to-length'); @@ -22109,7 +22973,7 @@ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('endsWith') }, } }); -},{"../internals/correct-is-regexp-logic":72,"../internals/export":86,"../internals/not-a-regexp":130,"../internals/require-object-coercible":159,"../internals/to-length":178}],311:[function(require,module,exports){ +},{"../internals/correct-is-regexp-logic":146,"../internals/export":160,"../internals/not-a-regexp":204,"../internals/require-object-coercible":233,"../internals/to-length":252}],385:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22123,7 +22987,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],312:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],386:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22137,7 +23001,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') } } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],313:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],387:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22151,7 +23015,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],314:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],388:[function(require,module,exports){ var $ = require('../internals/export'); var toAbsoluteIndex = require('../internals/to-absolute-index'); @@ -22180,7 +23044,7 @@ $({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, { } }); -},{"../internals/export":86,"../internals/to-absolute-index":174}],315:[function(require,module,exports){ +},{"../internals/export":160,"../internals/to-absolute-index":248}],389:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var notARegExp = require('../internals/not-a-regexp'); @@ -22196,7 +23060,7 @@ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, } }); -},{"../internals/correct-is-regexp-logic":72,"../internals/export":86,"../internals/not-a-regexp":130,"../internals/require-object-coercible":159}],316:[function(require,module,exports){ +},{"../internals/correct-is-regexp-logic":146,"../internals/export":160,"../internals/not-a-regexp":204,"../internals/require-object-coercible":233}],390:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22210,7 +23074,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],317:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],391:[function(require,module,exports){ 'use strict'; var charAt = require('../internals/string-multibyte').charAt; var InternalStateModule = require('../internals/internal-state'); @@ -22241,7 +23105,7 @@ defineIterator(String, 'String', function (iterated) { return { value: point, done: false }; }); -},{"../internals/define-iterator":80,"../internals/internal-state":109,"../internals/string-multibyte":168}],318:[function(require,module,exports){ +},{"../internals/define-iterator":154,"../internals/internal-state":183,"../internals/string-multibyte":242}],392:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22255,7 +23119,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],319:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],393:[function(require,module,exports){ 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var anObject = require('../internals/an-object'); @@ -22301,7 +23165,7 @@ fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCal ]; }); -},{"../internals/advance-string-index":48,"../internals/an-object":50,"../internals/fix-regexp-well-known-symbol-logic":88,"../internals/regexp-exec-abstract":156,"../internals/require-object-coercible":159,"../internals/to-length":178}],320:[function(require,module,exports){ +},{"../internals/advance-string-index":122,"../internals/an-object":124,"../internals/fix-regexp-well-known-symbol-logic":162,"../internals/regexp-exec-abstract":230,"../internals/require-object-coercible":233,"../internals/to-length":252}],394:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $padEnd = require('../internals/string-pad').end; @@ -22315,7 +23179,7 @@ $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { } }); -},{"../internals/export":86,"../internals/string-pad":169,"../internals/webkit-string-pad-bug":187}],321:[function(require,module,exports){ +},{"../internals/export":160,"../internals/string-pad":243,"../internals/webkit-string-pad-bug":261}],395:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $padStart = require('../internals/string-pad').start; @@ -22329,7 +23193,7 @@ $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { } }); -},{"../internals/export":86,"../internals/string-pad":169,"../internals/webkit-string-pad-bug":187}],322:[function(require,module,exports){ +},{"../internals/export":160,"../internals/string-pad":243,"../internals/webkit-string-pad-bug":261}],396:[function(require,module,exports){ var $ = require('../internals/export'); var toIndexedObject = require('../internals/to-indexed-object'); var toLength = require('../internals/to-length'); @@ -22350,7 +23214,7 @@ $({ target: 'String', stat: true }, { } }); -},{"../internals/export":86,"../internals/to-indexed-object":176,"../internals/to-length":178}],323:[function(require,module,exports){ +},{"../internals/export":160,"../internals/to-indexed-object":250,"../internals/to-length":252}],397:[function(require,module,exports){ var $ = require('../internals/export'); var repeat = require('../internals/string-repeat'); @@ -22360,7 +23224,7 @@ $({ target: 'String', proto: true }, { repeat: repeat }); -},{"../internals/export":86,"../internals/string-repeat":170}],324:[function(require,module,exports){ +},{"../internals/export":160,"../internals/string-repeat":244}],398:[function(require,module,exports){ 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var anObject = require('../internals/an-object'); @@ -22488,7 +23352,7 @@ fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma } }); -},{"../internals/advance-string-index":48,"../internals/an-object":50,"../internals/fix-regexp-well-known-symbol-logic":88,"../internals/regexp-exec-abstract":156,"../internals/require-object-coercible":159,"../internals/to-integer":177,"../internals/to-length":178,"../internals/to-object":179}],325:[function(require,module,exports){ +},{"../internals/advance-string-index":122,"../internals/an-object":124,"../internals/fix-regexp-well-known-symbol-logic":162,"../internals/regexp-exec-abstract":230,"../internals/require-object-coercible":233,"../internals/to-integer":251,"../internals/to-length":252,"../internals/to-object":253}],399:[function(require,module,exports){ 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var anObject = require('../internals/an-object'); @@ -22524,7 +23388,7 @@ fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybe ]; }); -},{"../internals/an-object":50,"../internals/fix-regexp-well-known-symbol-logic":88,"../internals/regexp-exec-abstract":156,"../internals/require-object-coercible":159,"../internals/same-value":160}],326:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/fix-regexp-well-known-symbol-logic":162,"../internals/regexp-exec-abstract":230,"../internals/require-object-coercible":233,"../internals/same-value":234}],400:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22538,7 +23402,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],327:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],401:[function(require,module,exports){ 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var isRegExp = require('../internals/is-regexp'); @@ -22674,7 +23538,7 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal ]; }, !SUPPORTS_Y); -},{"../internals/advance-string-index":48,"../internals/an-object":50,"../internals/fails":87,"../internals/fix-regexp-well-known-symbol-logic":88,"../internals/is-regexp":116,"../internals/regexp-exec":157,"../internals/regexp-exec-abstract":156,"../internals/require-object-coercible":159,"../internals/species-constructor":167,"../internals/to-length":178}],328:[function(require,module,exports){ +},{"../internals/advance-string-index":122,"../internals/an-object":124,"../internals/fails":161,"../internals/fix-regexp-well-known-symbol-logic":162,"../internals/is-regexp":190,"../internals/regexp-exec":231,"../internals/regexp-exec-abstract":230,"../internals/require-object-coercible":233,"../internals/species-constructor":241,"../internals/to-length":252}],402:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var toLength = require('../internals/to-length'); @@ -22699,7 +23563,7 @@ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('startsWith') } } }); -},{"../internals/correct-is-regexp-logic":72,"../internals/export":86,"../internals/not-a-regexp":130,"../internals/require-object-coercible":159,"../internals/to-length":178}],329:[function(require,module,exports){ +},{"../internals/correct-is-regexp-logic":146,"../internals/export":160,"../internals/not-a-regexp":204,"../internals/require-object-coercible":233,"../internals/to-length":252}],403:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22713,7 +23577,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],330:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],404:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22727,7 +23591,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],331:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],405:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); @@ -22741,7 +23605,7 @@ $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, { } }); -},{"../internals/create-html":74,"../internals/export":86,"../internals/forced-string-html-method":91}],332:[function(require,module,exports){ +},{"../internals/create-html":148,"../internals/export":160,"../internals/forced-string-html-method":165}],406:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $trimEnd = require('../internals/string-trim').end; @@ -22760,7 +23624,7 @@ $({ target: 'String', proto: true, forced: FORCED }, { trimRight: trimEnd }); -},{"../internals/export":86,"../internals/forced-string-trim-method":92,"../internals/string-trim":171}],333:[function(require,module,exports){ +},{"../internals/export":160,"../internals/forced-string-trim-method":166,"../internals/string-trim":245}],407:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $trimStart = require('../internals/string-trim').start; @@ -22779,7 +23643,7 @@ $({ target: 'String', proto: true, forced: FORCED }, { trimLeft: trimStart }); -},{"../internals/export":86,"../internals/forced-string-trim-method":92,"../internals/string-trim":171}],334:[function(require,module,exports){ +},{"../internals/export":160,"../internals/forced-string-trim-method":166,"../internals/string-trim":245}],408:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var $trim = require('../internals/string-trim').trim; @@ -22793,14 +23657,14 @@ $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { } }); -},{"../internals/export":86,"../internals/forced-string-trim-method":92,"../internals/string-trim":171}],335:[function(require,module,exports){ +},{"../internals/export":160,"../internals/forced-string-trim-method":166,"../internals/string-trim":245}],409:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.asyncIterator` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.asynciterator defineWellKnownSymbol('asyncIterator'); -},{"../internals/define-well-known-symbol":81}],336:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],410:[function(require,module,exports){ // `Symbol.prototype.description` getter // https://tc39.github.io/ecma262/#sec-symbol.prototype.description 'use strict'; @@ -22852,28 +23716,28 @@ if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in Nati }); } -},{"../internals/copy-constructor-properties":71,"../internals/descriptors":82,"../internals/export":86,"../internals/global":99,"../internals/has":100,"../internals/is-object":114,"../internals/object-define-property":135}],337:[function(require,module,exports){ +},{"../internals/copy-constructor-properties":145,"../internals/descriptors":156,"../internals/export":160,"../internals/global":173,"../internals/has":174,"../internals/is-object":188,"../internals/object-define-property":209}],411:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.hasInstance` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.hasinstance defineWellKnownSymbol('hasInstance'); -},{"../internals/define-well-known-symbol":81}],338:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],412:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.isConcatSpreadable` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable defineWellKnownSymbol('isConcatSpreadable'); -},{"../internals/define-well-known-symbol":81}],339:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],413:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.iterator` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.iterator defineWellKnownSymbol('iterator'); -},{"../internals/define-well-known-symbol":81}],340:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],414:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); @@ -23174,63 +24038,63 @@ setToStringTag($Symbol, SYMBOL); hiddenKeys[HIDDEN] = true; -},{"../internals/an-object":50,"../internals/array-iteration":58,"../internals/create-property-descriptor":76,"../internals/define-well-known-symbol":81,"../internals/descriptors":82,"../internals/export":86,"../internals/fails":87,"../internals/global":99,"../internals/has":100,"../internals/hidden-keys":101,"../internals/hide":102,"../internals/internal-state":109,"../internals/is-array":111,"../internals/is-object":114,"../internals/is-pure":115,"../internals/native-symbol":126,"../internals/object-create":133,"../internals/object-define-property":135,"../internals/object-get-own-property-descriptor":136,"../internals/object-get-own-property-names":138,"../internals/object-get-own-property-names-external":137,"../internals/object-get-own-property-symbols":139,"../internals/object-keys":142,"../internals/object-property-is-enumerable":143,"../internals/redefine":155,"../internals/set-to-string-tag":163,"../internals/shared":165,"../internals/shared-key":164,"../internals/to-indexed-object":176,"../internals/to-object":179,"../internals/to-primitive":181,"../internals/uid":185,"../internals/well-known-symbol":188,"../internals/wrapped-well-known-symbol":190}],341:[function(require,module,exports){ +},{"../internals/an-object":124,"../internals/array-iteration":132,"../internals/create-property-descriptor":150,"../internals/define-well-known-symbol":155,"../internals/descriptors":156,"../internals/export":160,"../internals/fails":161,"../internals/global":173,"../internals/has":174,"../internals/hidden-keys":175,"../internals/hide":176,"../internals/internal-state":183,"../internals/is-array":185,"../internals/is-object":188,"../internals/is-pure":189,"../internals/native-symbol":200,"../internals/object-create":207,"../internals/object-define-property":209,"../internals/object-get-own-property-descriptor":210,"../internals/object-get-own-property-names":212,"../internals/object-get-own-property-names-external":211,"../internals/object-get-own-property-symbols":213,"../internals/object-keys":216,"../internals/object-property-is-enumerable":217,"../internals/redefine":229,"../internals/set-to-string-tag":237,"../internals/shared":239,"../internals/shared-key":238,"../internals/to-indexed-object":250,"../internals/to-object":253,"../internals/to-primitive":255,"../internals/uid":259,"../internals/well-known-symbol":262,"../internals/wrapped-well-known-symbol":264}],415:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.match` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.match defineWellKnownSymbol('match'); -},{"../internals/define-well-known-symbol":81}],342:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],416:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.replace` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.replace defineWellKnownSymbol('replace'); -},{"../internals/define-well-known-symbol":81}],343:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],417:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.search` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.search defineWellKnownSymbol('search'); -},{"../internals/define-well-known-symbol":81}],344:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],418:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.species` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.species defineWellKnownSymbol('species'); -},{"../internals/define-well-known-symbol":81}],345:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],419:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.split` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.split defineWellKnownSymbol('split'); -},{"../internals/define-well-known-symbol":81}],346:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],420:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.toPrimitive` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.toprimitive defineWellKnownSymbol('toPrimitive'); -},{"../internals/define-well-known-symbol":81}],347:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],421:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.toStringTag` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.tostringtag defineWellKnownSymbol('toStringTag'); -},{"../internals/define-well-known-symbol":81}],348:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],422:[function(require,module,exports){ var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.unscopables` well-known symbol // https://tc39.github.io/ecma262/#sec-symbol.unscopables defineWellKnownSymbol('unscopables'); -},{"../internals/define-well-known-symbol":81}],349:[function(require,module,exports){ +},{"../internals/define-well-known-symbol":155}],423:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $copyWithin = require('../internals/array-copy-within'); @@ -23243,7 +24107,7 @@ ArrayBufferViewCore.exportProto('copyWithin', function copyWithin(target, start return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-copy-within":53}],350:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-copy-within":127}],424:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $every = require('../internals/array-iteration').every; @@ -23256,7 +24120,7 @@ ArrayBufferViewCore.exportProto('every', function every(callbackfn /* , thisArg return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58}],351:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132}],425:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $fill = require('../internals/array-fill'); @@ -23270,7 +24134,7 @@ ArrayBufferViewCore.exportProto('fill', function fill(value /* , start, end */) return $fill.apply(aTypedArray(this), arguments); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-fill":54}],352:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-fill":128}],426:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $filter = require('../internals/array-iteration').filter; @@ -23291,7 +24155,7 @@ ArrayBufferViewCore.exportProto('filter', function filter(callbackfn /* , thisAr return result; }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58,"../internals/species-constructor":167}],353:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132,"../internals/species-constructor":241}],427:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $findIndex = require('../internals/array-iteration').findIndex; @@ -23304,7 +24168,7 @@ ArrayBufferViewCore.exportProto('findIndex', function findIndex(predicate /* , t return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58}],354:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132}],428:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $find = require('../internals/array-iteration').find; @@ -23317,7 +24181,7 @@ ArrayBufferViewCore.exportProto('find', function find(predicate /* , thisArg */) return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58}],355:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132}],429:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Float32Array` constructor @@ -23328,7 +24192,7 @@ typedArrayConstructor('Float32', 4, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],356:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],430:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Float64Array` constructor @@ -23339,7 +24203,7 @@ typedArrayConstructor('Float64', 8, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],357:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],431:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $forEach = require('../internals/array-iteration').forEach; @@ -23352,7 +24216,7 @@ ArrayBufferViewCore.exportProto('forEach', function forEach(callbackfn /* , this $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58}],358:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132}],432:[function(require,module,exports){ 'use strict'; var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-arrays-constructors-requires-wrappers'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23362,7 +24226,7 @@ var typedArrayFrom = require('../internals/typed-array-from'); // https://tc39.github.io/ecma262/#sec-%typedarray%.from ArrayBufferViewCore.exportStatic('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); -},{"../internals/array-buffer-view-core":51,"../internals/typed-array-from":183,"../internals/typed-arrays-constructors-requires-wrappers":184}],359:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/typed-array-from":257,"../internals/typed-arrays-constructors-requires-wrappers":258}],433:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $includes = require('../internals/array-includes').includes; @@ -23375,7 +24239,7 @@ ArrayBufferViewCore.exportProto('includes', function includes(searchElement /* , return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-includes":57}],360:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-includes":131}],434:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $indexOf = require('../internals/array-includes').indexOf; @@ -23388,7 +24252,7 @@ ArrayBufferViewCore.exportProto('indexOf', function indexOf(searchElement /* , f return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-includes":57}],361:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-includes":131}],435:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Int16Array` constructor @@ -23399,7 +24263,7 @@ typedArrayConstructor('Int16', 2, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],362:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],436:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Int32Array` constructor @@ -23410,7 +24274,7 @@ typedArrayConstructor('Int32', 4, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],363:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],437:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Int8Array` constructor @@ -23421,7 +24285,7 @@ typedArrayConstructor('Int8', 1, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],364:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],438:[function(require,module,exports){ 'use strict'; var global = require('../internals/global'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23461,7 +24325,7 @@ exportProto('values', typedArrayValues, !CORRECT_ITER_NAME); // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator exportProto(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME); -},{"../internals/array-buffer-view-core":51,"../internals/global":99,"../internals/well-known-symbol":188,"../modules/es.array.iterator":207}],365:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/global":173,"../internals/well-known-symbol":262,"../modules/es.array.iterator":281}],439:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23475,7 +24339,7 @@ ArrayBufferViewCore.exportProto('join', function join(separator) { return $join.apply(aTypedArray(this), arguments); }); -},{"../internals/array-buffer-view-core":51}],366:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125}],440:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $lastIndexOf = require('../internals/array-last-index-of'); @@ -23489,7 +24353,7 @@ ArrayBufferViewCore.exportProto('lastIndexOf', function lastIndexOf(searchElemen return $lastIndexOf.apply(aTypedArray(this), arguments); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-last-index-of":59}],367:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-last-index-of":133}],441:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $map = require('../internals/array-iteration').map; @@ -23506,7 +24370,7 @@ ArrayBufferViewCore.exportProto('map', function map(mapfn /* , thisArg */) { }); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58,"../internals/species-constructor":167}],368:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132,"../internals/species-constructor":241}],442:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-arrays-constructors-requires-wrappers'); @@ -23523,7 +24387,7 @@ ArrayBufferViewCore.exportStatic('of', function of(/* ...items */) { return result; }, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); -},{"../internals/array-buffer-view-core":51,"../internals/typed-arrays-constructors-requires-wrappers":184}],369:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/typed-arrays-constructors-requires-wrappers":258}],443:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $reduceRight = require('../internals/array-reduce').right; @@ -23536,7 +24400,7 @@ ArrayBufferViewCore.exportProto('reduceRight', function reduceRight(callbackfn / return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-reduce":61}],370:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-reduce":135}],444:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $reduce = require('../internals/array-reduce').left; @@ -23549,7 +24413,7 @@ ArrayBufferViewCore.exportProto('reduce', function reduce(callbackfn /* , initia return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-reduce":61}],371:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-reduce":135}],445:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23571,7 +24435,7 @@ ArrayBufferViewCore.exportProto('reverse', function reverse() { } return that; }); -},{"../internals/array-buffer-view-core":51}],372:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125}],446:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var toLength = require('../internals/to-length'); @@ -23599,7 +24463,7 @@ ArrayBufferViewCore.exportProto('set', function set(arrayLike /* , offset */) { while (index < len) this[offset + index] = src[index++]; }, FORCED); -},{"../internals/array-buffer-view-core":51,"../internals/fails":87,"../internals/to-length":178,"../internals/to-object":179,"../internals/to-offset":180}],373:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/fails":161,"../internals/to-length":252,"../internals/to-object":253,"../internals/to-offset":254}],447:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var speciesConstructor = require('../internals/species-constructor'); @@ -23626,7 +24490,7 @@ ArrayBufferViewCore.exportProto('slice', function slice(start, end) { return result; }, FORCED); -},{"../internals/array-buffer-view-core":51,"../internals/fails":87,"../internals/species-constructor":167}],374:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/fails":161,"../internals/species-constructor":241}],448:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $some = require('../internals/array-iteration').some; @@ -23639,7 +24503,7 @@ ArrayBufferViewCore.exportProto('some', function some(callbackfn /* , thisArg */ return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); -},{"../internals/array-buffer-view-core":51,"../internals/array-iteration":58}],375:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/array-iteration":132}],449:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23652,7 +24516,7 @@ ArrayBufferViewCore.exportProto('sort', function sort(comparefn) { return $sort.call(aTypedArray(this), comparefn); }); -},{"../internals/array-buffer-view-core":51}],376:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125}],450:[function(require,module,exports){ 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var toLength = require('../internals/to-length'); @@ -23674,7 +24538,7 @@ ArrayBufferViewCore.exportProto('subarray', function subarray(begin, end) { ); }); -},{"../internals/array-buffer-view-core":51,"../internals/species-constructor":167,"../internals/to-absolute-index":174,"../internals/to-length":178}],377:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/species-constructor":241,"../internals/to-absolute-index":248,"../internals/to-length":252}],451:[function(require,module,exports){ 'use strict'; var global = require('../internals/global'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23702,7 +24566,7 @@ ArrayBufferViewCore.exportProto('toLocaleString', function toLocaleString() { return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments); }, FORCED); -},{"../internals/array-buffer-view-core":51,"../internals/fails":87,"../internals/global":99}],378:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/fails":161,"../internals/global":173}],452:[function(require,module,exports){ 'use strict'; var global = require('../internals/global'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); @@ -23723,7 +24587,7 @@ if (fails(function () { arrayToString.call({}); })) { // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring ArrayBufferViewCore.exportProto('toString', arrayToString, (Uint8ArrayPrototype || {}).toString != arrayToString); -},{"../internals/array-buffer-view-core":51,"../internals/fails":87,"../internals/global":99}],379:[function(require,module,exports){ +},{"../internals/array-buffer-view-core":125,"../internals/fails":161,"../internals/global":173}],453:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint16Array` constructor @@ -23734,7 +24598,7 @@ typedArrayConstructor('Uint16', 2, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],380:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],454:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint32Array` constructor @@ -23745,7 +24609,7 @@ typedArrayConstructor('Uint32', 4, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],381:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],455:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint8Array` constructor @@ -23756,7 +24620,7 @@ typedArrayConstructor('Uint8', 1, function (init) { }; }); -},{"../internals/typed-array-constructor":182}],382:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],456:[function(require,module,exports){ var typedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint8ClampedArray` constructor @@ -23767,7 +24631,7 @@ typedArrayConstructor('Uint8', 1, function (init) { }; }, true); -},{"../internals/typed-array-constructor":182}],383:[function(require,module,exports){ +},{"../internals/typed-array-constructor":256}],457:[function(require,module,exports){ 'use strict'; var global = require('../internals/global'); var redefineAll = require('../internals/redefine-all'); @@ -23836,7 +24700,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) { }); } -},{"../internals/collection":70,"../internals/collection-weak":69,"../internals/global":99,"../internals/internal-metadata":108,"../internals/internal-state":109,"../internals/is-object":114,"../internals/native-weak-map":128,"../internals/redefine-all":154}],384:[function(require,module,exports){ +},{"../internals/collection":144,"../internals/collection-weak":143,"../internals/global":173,"../internals/internal-metadata":182,"../internals/internal-state":183,"../internals/is-object":188,"../internals/native-weak-map":202,"../internals/redefine-all":228}],458:[function(require,module,exports){ 'use strict'; var collection = require('../internals/collection'); var collectionWeak = require('../internals/collection-weak'); @@ -23847,7 +24711,7 @@ collection('WeakSet', function (get) { return function WeakSet() { return get(this, arguments.length ? arguments[0] : undefined); }; }, collectionWeak, false, true); -},{"../internals/collection":70,"../internals/collection-weak":69}],385:[function(require,module,exports){ +},{"../internals/collection":144,"../internals/collection-weak":143}],459:[function(require,module,exports){ var global = require('../internals/global'); var DOMIterables = require('../internals/dom-iterables'); var forEach = require('../internals/array-for-each'); @@ -23864,7 +24728,7 @@ for (var COLLECTION_NAME in DOMIterables) { } } -},{"../internals/array-for-each":55,"../internals/dom-iterables":84,"../internals/global":99,"../internals/hide":102}],386:[function(require,module,exports){ +},{"../internals/array-for-each":129,"../internals/dom-iterables":158,"../internals/global":173,"../internals/hide":176}],460:[function(require,module,exports){ var global = require('../internals/global'); var DOMIterables = require('../internals/dom-iterables'); var ArrayIteratorMethods = require('../modules/es.array.iterator'); @@ -23897,7 +24761,7 @@ for (var COLLECTION_NAME in DOMIterables) { } } -},{"../internals/dom-iterables":84,"../internals/global":99,"../internals/hide":102,"../internals/well-known-symbol":188,"../modules/es.array.iterator":207}],387:[function(require,module,exports){ +},{"../internals/dom-iterables":158,"../internals/global":173,"../internals/hide":176,"../internals/well-known-symbol":262,"../modules/es.array.iterator":281}],461:[function(require,module,exports){ var global = require('../internals/global'); var task = require('../internals/task'); @@ -23913,7 +24777,7 @@ require('../internals/export')({ global: true, bind: true, enumerable: true, for clearImmediate: task.clear }); -},{"../internals/export":86,"../internals/global":99,"../internals/task":172}],388:[function(require,module,exports){ +},{"../internals/export":160,"../internals/global":173,"../internals/task":246}],462:[function(require,module,exports){ var $ = require('../internals/export'); var global = require('../internals/global'); var microtask = require('../internals/microtask'); @@ -23931,7 +24795,7 @@ $({ global: true, enumerable: true, noTargetGet: true }, { } }); -},{"../internals/classof-raw":66,"../internals/export":86,"../internals/global":99,"../internals/microtask":124}],389:[function(require,module,exports){ +},{"../internals/classof-raw":140,"../internals/export":160,"../internals/global":173,"../internals/microtask":198}],463:[function(require,module,exports){ 'use strict'; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` require('../modules/es.array.iterator'); @@ -24244,7 +25108,7 @@ module.exports = { getState: getInternalParamsState }; -},{"../internals/an-instance":49,"../internals/an-object":50,"../internals/bind-context":63,"../internals/create-iterator-constructor":75,"../internals/export":86,"../internals/get-iterator":98,"../internals/get-iterator-method":97,"../internals/has":100,"../internals/internal-state":109,"../internals/is-object":114,"../internals/native-url":127,"../internals/redefine":155,"../internals/redefine-all":154,"../internals/set-to-string-tag":163,"../internals/well-known-symbol":188,"../modules/es.array.iterator":207}],390:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/an-object":124,"../internals/bind-context":137,"../internals/create-iterator-constructor":149,"../internals/export":160,"../internals/get-iterator":172,"../internals/get-iterator-method":171,"../internals/has":174,"../internals/internal-state":183,"../internals/is-object":188,"../internals/native-url":201,"../internals/redefine":229,"../internals/redefine-all":228,"../internals/set-to-string-tag":237,"../internals/well-known-symbol":262,"../modules/es.array.iterator":281}],464:[function(require,module,exports){ 'use strict'; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` require('../modules/es.string.iterator'); @@ -25254,7 +26118,7 @@ $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { URL: URLConstructor }); -},{"../internals/an-instance":49,"../internals/array-from":56,"../internals/descriptors":82,"../internals/export":86,"../internals/global":99,"../internals/has":100,"../internals/internal-state":109,"../internals/native-url":127,"../internals/object-assign":132,"../internals/object-define-properties":134,"../internals/punycode-to-ascii":153,"../internals/redefine":155,"../internals/set-to-string-tag":163,"../internals/string-multibyte":168,"../modules/es.string.iterator":317,"../modules/web.url-search-params":389}],391:[function(require,module,exports){ +},{"../internals/an-instance":123,"../internals/array-from":130,"../internals/descriptors":156,"../internals/export":160,"../internals/global":173,"../internals/has":174,"../internals/internal-state":183,"../internals/native-url":201,"../internals/object-assign":206,"../internals/object-define-properties":208,"../internals/punycode-to-ascii":227,"../internals/redefine":229,"../internals/set-to-string-tag":237,"../internals/string-multibyte":242,"../modules/es.string.iterator":391,"../modules/web.url-search-params":463}],465:[function(require,module,exports){ 'use strict'; var $ = require('../internals/export'); @@ -25266,7 +26130,7 @@ $({ target: 'URL', proto: true, enumerable: true }, { } }); -},{"../internals/export":86}],392:[function(require,module,exports){ +},{"../internals/export":160}],466:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -25378,7 +26242,7 @@ function objectToString(o) { }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":475}],393:[function(require,module,exports){ +},{"../../is-buffer/index.js":549}],467:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Errors_1 = require("./Errors"); @@ -25414,7 +26278,7 @@ var Argument = /** @class */ (function () { exports.default = Argument; module.exports = Argument; -},{"./Errors":397}],394:[function(require,module,exports){ +},{"./Errors":471}],468:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -25431,10 +26295,10 @@ var CombinatorialGeneratedExpressionFactory = /** @class */ (function () { } CombinatorialGeneratedExpressionFactory.prototype.generateExpressions = function () { var generatedExpressions = []; - this._generatePermutations(generatedExpressions, 0, []); + this.generatePermutations(generatedExpressions, 0, []); return generatedExpressions; }; - CombinatorialGeneratedExpressionFactory.prototype._generatePermutations = function (generatedExpressions, depth, currentParameterTypes) { + CombinatorialGeneratedExpressionFactory.prototype.generatePermutations = function (generatedExpressions, depth, currentParameterTypes) { if (generatedExpressions.length >= MAX_EXPRESSIONS) { return; } @@ -25450,24 +26314,25 @@ var CombinatorialGeneratedExpressionFactory = /** @class */ (function () { } var newCurrentParameterTypes = currentParameterTypes.slice(); // clone newCurrentParameterTypes.push(this.parameterTypeCombinations[depth][i]); - this._generatePermutations(generatedExpressions, depth + 1, newCurrentParameterTypes); + this.generatePermutations(generatedExpressions, depth + 1, newCurrentParameterTypes); } }; return CombinatorialGeneratedExpressionFactory; }()); exports.default = CombinatorialGeneratedExpressionFactory; -},{"./GeneratedExpression":398}],395:[function(require,module,exports){ +},{"./GeneratedExpression":472}],469:[function(require,module,exports){ "use strict"; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -25515,7 +26380,7 @@ var CucumberExpression = /** @class */ (function () { if (p1 === DOUBLE_ESCAPE) { return "\\(" + p2 + "\\)"; } - _this._checkNoParameterType(p2, PARAMETER_TYPES_CANNOT_BE_OPTIONAL); + _this.checkNoParameterType(p2, PARAMETER_TYPES_CANNOT_BE_OPTIONAL); return "(?:" + p2 + ")?"; }); }; @@ -25530,7 +26395,7 @@ var CucumberExpression = /** @class */ (function () { try { for (var _b = __values(replacement.split(/\|/)), _c = _b.next(); !_c.done; _c = _b.next()) { var part = _c.value; - _this._checkNoParameterType(part, PARAMETER_TYPES_CANNOT_BE_ALTERNATIVE); + _this.checkNoParameterType(part, PARAMETER_TYPES_CANNOT_BE_ALTERNATIVE); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } @@ -25580,7 +26445,7 @@ var CucumberExpression = /** @class */ (function () { enumerable: true, configurable: true }); - CucumberExpression.prototype._checkNoParameterType = function (s, message) { + CucumberExpression.prototype.checkNoParameterType = function (s, message) { if (s.match(PARAMETER_REGEXP())) { throw new Errors_1.CucumberExpressionError(message + this.source); } @@ -25598,17 +26463,18 @@ function buildCaptureRegexp(regexps) { return "(" + captureGroups.join('|') + ")"; } -},{"./Argument":393,"./Errors":397,"./ParameterType":401,"./TreeRegexp":405}],396:[function(require,module,exports){ +},{"./Argument":467,"./Errors":471,"./ParameterType":475,"./TreeRegexp":479}],470:[function(require,module,exports){ "use strict"; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -25624,7 +26490,7 @@ var CucumberExpressionGenerator = /** @class */ (function () { } CucumberExpressionGenerator.prototype.generateExpressions = function (text) { var parameterTypeCombinations = []; - var parameterTypeMatchers = this._createParameterTypeMatchers(text); + var parameterTypeMatchers = this.createParameterTypeMatchers(text); var expressionTemplate = ''; var pos = 0; var _loop_1 = function () { @@ -25703,7 +26569,7 @@ var CucumberExpressionGenerator = /** @class */ (function () { var _this = this; return util_1.default.deprecate(function () { return _this.generateExpressions(text)[0]; }, 'CucumberExpressionGenerator.generateExpression: Use CucumberExpressionGenerator.generateExpressions instead')(); }; - CucumberExpressionGenerator.prototype._createParameterTypeMatchers = function (text) { + CucumberExpressionGenerator.prototype.createParameterTypeMatchers = function (text) { var e_3, _a; var parameterMatchers = []; try { @@ -25754,7 +26620,7 @@ function escape(s) { } module.exports = CucumberExpressionGenerator; -},{"./CombinatorialGeneratedExpressionFactory":394,"./ParameterType":401,"./ParameterTypeMatcher":402,"util":560}],397:[function(require,module,exports){ +},{"./CombinatorialGeneratedExpressionFactory":468,"./ParameterType":475,"./ParameterTypeMatcher":476,"util":634}],471:[function(require,module,exports){ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { @@ -25807,7 +26673,7 @@ var UndefinedParameterTypeError = /** @class */ (function (_super) { }(CucumberExpressionError)); exports.UndefinedParameterTypeError = UndefinedParameterTypeError; -},{}],398:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ "use strict"; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; @@ -25871,7 +26737,7 @@ function getParameterName(typeName, usageByTypeName) { return count === 1 ? typeName : "" + typeName + count; } -},{"util":560}],399:[function(require,module,exports){ +},{"util":634}],473:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Group = /** @class */ (function () { @@ -25894,7 +26760,7 @@ var Group = /** @class */ (function () { }()); exports.default = Group; -},{}],400:[function(require,module,exports){ +},{}],474:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -25933,17 +26799,18 @@ var GroupBuilder = /** @class */ (function () { }()); exports.default = GroupBuilder; -},{"./Group":399}],401:[function(require,module,exports){ +},{"./Group":473}],475:[function(require,module,exports){ "use strict"; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", { value: true }); var Errors_1 = require("./Errors"); @@ -25995,8 +26862,7 @@ var ParameterType = /** @class */ (function () { } }; ParameterType.prototype.transform = function (thisObj, groupValues) { - var result = this.transformFn.apply(thisObj, groupValues); - return result; + return this.transformFn.apply(thisObj, groupValues); }; return ParameterType; }()); @@ -26046,9 +26912,17 @@ function regexpFlags(regexp) { return flags; } -},{"./Errors":397}],402:[function(require,module,exports){ +},{"./Errors":471}],476:[function(require,module,exports){ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); +// @ts-ignore +var xregexp_1 = __importDefault(require("xregexp")); +// Needed for Node8 support, should be able to remove once Node 8 reaches end of life +// (eta 2019-12-31) https://nodejs.org/en/about/releases/ +var whitespacePunctuationPattern = xregexp_1.default('\\s|\\p{P}', 'u'); var ParameterTypeMatcher = /** @class */ (function () { function ParameterTypeMatcher(parameterType, regexpString, text, matchPosition) { if (matchPosition === void 0) { matchPosition = 0; } @@ -26070,7 +26944,7 @@ var ParameterTypeMatcher = /** @class */ (function () { }; Object.defineProperty(ParameterTypeMatcher.prototype, "find", { get: function () { - return this.match && this.group !== ''; + return this.match && this.group !== '' && this.full_word; }, enumerable: true, configurable: true @@ -26082,6 +26956,28 @@ var ParameterTypeMatcher = /** @class */ (function () { enumerable: true, configurable: true }); + Object.defineProperty(ParameterTypeMatcher.prototype, "full_word", { + get: function () { + return this.match_start_word && this.match_end_word; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParameterTypeMatcher.prototype, "match_start_word", { + get: function () { + return this.start == 0 || this.text[this.start - 1].match(whitespacePunctuationPattern); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParameterTypeMatcher.prototype, "match_end_word", { + get: function () { + var next_character_index = this.start + this.group.length; + return next_character_index === this.text.length || this.text[next_character_index].match(whitespacePunctuationPattern); + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ParameterTypeMatcher.prototype, "group", { get: function () { return this.match[0]; @@ -26105,17 +27001,18 @@ var ParameterTypeMatcher = /** @class */ (function () { exports.default = ParameterTypeMatcher; module.exports = ParameterTypeMatcher; -},{}],403:[function(require,module,exports){ +},{"xregexp":644}],477:[function(require,module,exports){ "use strict"; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -26124,20 +27021,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); var ParameterType_1 = __importDefault(require("./ParameterType")); var CucumberExpressionGenerator_1 = __importDefault(require("./CucumberExpressionGenerator")); var Errors_1 = require("./Errors"); -var INTEGER_REGEXPS = [/-?\d+/, /\d+/]; -var FLOAT_REGEXP = /-?\d*\.?\d+/; -var WORD_REGEXP = /[^\s]+/; -var STRING_REGEXP = /"([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'/; -var ANONYMOUS_REGEXP = /.*/; var ParameterTypeRegistry = /** @class */ (function () { function ParameterTypeRegistry() { this.parameterTypeByName = new Map(); this.parameterTypesByRegexp = new Map(); - this.defineParameterType(new ParameterType_1.default('int', INTEGER_REGEXPS, Number, function (s) { return (s === undefined ? null : Number(s)); }, true, true)); - this.defineParameterType(new ParameterType_1.default('float', FLOAT_REGEXP, Number, function (s) { return (s === undefined ? null : parseFloat(s)); }, true, false)); - this.defineParameterType(new ParameterType_1.default('word', WORD_REGEXP, String, function (s) { return s; }, false, false)); - this.defineParameterType(new ParameterType_1.default('string', STRING_REGEXP, String, function (s) { return s.replace(/\\"/g, '"').replace(/\\'/g, "'"); }, true, false)); - this.defineParameterType(new ParameterType_1.default('', ANONYMOUS_REGEXP, String, function (s) { return s; }, false, true)); + this.defineParameterType(new ParameterType_1.default('int', ParameterTypeRegistry.INTEGER_REGEXPS, Number, function (s) { return (s === undefined ? null : Number(s)); }, true, true)); + this.defineParameterType(new ParameterType_1.default('float', ParameterTypeRegistry.FLOAT_REGEXP, Number, function (s) { return (s === undefined ? null : parseFloat(s)); }, true, false)); + 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('', ParameterTypeRegistry.ANONYMOUS_REGEXP, String, function (s) { return s; }, false, true)); } Object.defineProperty(ParameterTypeRegistry.prototype, "parameterTypes", { get: function () { @@ -26204,12 +27096,17 @@ var ParameterTypeRegistry = /** @class */ (function () { finally { if (e_1) throw e_1.error; } } }; + ParameterTypeRegistry.INTEGER_REGEXPS = [/-?\d+/, /\d+/]; + ParameterTypeRegistry.FLOAT_REGEXP = /(?=.*\d.*)[-+]?\d*(?:\.(?=\d.*))?\d*(?:\d+[E][+\-]?\d+)?/; + ParameterTypeRegistry.WORD_REGEXP = /[^\s]+/; + ParameterTypeRegistry.STRING_REGEXP = /"([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'/; + ParameterTypeRegistry.ANONYMOUS_REGEXP = /.*/; return ParameterTypeRegistry; }()); exports.default = ParameterTypeRegistry; module.exports = ParameterTypeRegistry; -},{"./CucumberExpressionGenerator":396,"./Errors":397,"./ParameterType":401}],404:[function(require,module,exports){ +},{"./CucumberExpressionGenerator":470,"./Errors":471,"./ParameterType":475}],478:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -26244,7 +27141,7 @@ var RegularExpression = /** @class */ (function () { }()); exports.default = RegularExpression; -},{"./Argument":393,"./ParameterType":401,"./TreeRegexp":405}],405:[function(require,module,exports){ +},{"./Argument":467,"./ParameterType":475,"./TreeRegexp":479}],479:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -26291,7 +27188,9 @@ var TreeRegexp = /** @class */ (function () { else if (c === '?' && last === '(') { nonCapturingMaybe = true; } - else if (c === ':' && nonCapturingMaybe) { + else if ((c === ':' || c === '!' || c === '=' || c === '<') && + last === '?' && + nonCapturingMaybe) { stack[stack.length - 1].setNonCapturing(); nonCapturingMaybe = false; } @@ -26313,7 +27212,7 @@ var TreeRegexp = /** @class */ (function () { }()); exports.default = TreeRegexp; -},{"./GroupBuilder":400,"becke-ch--regex--s0-0-v1--base--pl--lib":20}],406:[function(require,module,exports){ +},{"./GroupBuilder":474,"becke-ch--regex--s0-0-v1--base--pl--lib":94}],480:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -26331,7 +27230,7 @@ module.exports = { ParameterType: ParameterType_1.default, }; -},{"./CucumberExpression":395,"./CucumberExpressionGenerator":396,"./ParameterType":401,"./ParameterTypeRegistry":403,"./RegularExpression":404}],407:[function(require,module,exports){ +},{"./CucumberExpression":469,"./CucumberExpressionGenerator":470,"./ParameterType":475,"./ParameterTypeRegistry":477,"./RegularExpression":478}],481:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var OPERAND = 'operand'; @@ -26560,7 +27459,7 @@ var True = /** @class */ (function () { return True; }()); -},{}],408:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ "use strict"; var isValue = require("type/value/is") @@ -26624,7 +27523,7 @@ d.gs = function (dscr, get, set/*, options*/) { return !options ? desc : assign(normalizeOpts(options), desc); }; -},{"es5-ext/object/assign":425,"es5-ext/object/normalize-options":433,"es5-ext/string/#/contains":435,"type/plain-function/is":552,"type/value/is":554}],409:[function(require,module,exports){ +},{"es5-ext/object/assign":499,"es5-ext/object/normalize-options":507,"es5-ext/string/#/contains":509,"type/plain-function/is":626,"type/value/is":628}],483:[function(require,module,exports){ "use strict"; var d = require("d") @@ -26801,7 +27700,7 @@ Duration.prototype = Object.create(Object.prototype, { }) }); -},{"d":408,"es5-ext/date/#/copy":411,"es5-ext/date/#/days-in-month":412,"es5-ext/date/#/floor-day":413,"es5-ext/date/#/floor-month":414,"es5-ext/date/#/floor-year":415,"es5-ext/date/valid-date":417,"es5-ext/number/#/pad":422,"es5-ext/number/to-integer":423,"es5-ext/number/to-pos-integer":424,"es5-ext/object/is-value":429,"es5-ext/string/format-method":442}],410:[function(require,module,exports){ +},{"d":482,"es5-ext/date/#/copy":485,"es5-ext/date/#/days-in-month":486,"es5-ext/date/#/floor-day":487,"es5-ext/date/#/floor-month":488,"es5-ext/date/#/floor-year":489,"es5-ext/date/valid-date":491,"es5-ext/number/#/pad":496,"es5-ext/number/to-integer":497,"es5-ext/number/to-pos-integer":498,"es5-ext/object/is-value":503,"es5-ext/string/format-method":516}],484:[function(require,module,exports){ (function(root, factory) { 'use strict'; // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers. @@ -27005,14 +27904,14 @@ Duration.prototype = Object.create(Object.prototype, { }; })); -},{"stackframe":531}],411:[function(require,module,exports){ +},{"stackframe":605}],485:[function(require,module,exports){ "use strict"; var getTime = Date.prototype.getTime; module.exports = function () { return new Date(getTime.call(this)); }; -},{}],412:[function(require,module,exports){ +},{}],486:[function(require,module,exports){ "use strict"; var getMonth = Date.prototype.getMonth; @@ -27031,7 +27930,7 @@ module.exports = function () { } }; -},{}],413:[function(require,module,exports){ +},{}],487:[function(require,module,exports){ "use strict"; var setHours = Date.prototype.setHours; @@ -27041,7 +27940,7 @@ module.exports = function () { return this; }; -},{}],414:[function(require,module,exports){ +},{}],488:[function(require,module,exports){ "use strict"; var floorDay = require("./floor-day"); @@ -27051,7 +27950,7 @@ module.exports = function () { return this; }; -},{"./floor-day":413}],415:[function(require,module,exports){ +},{"./floor-day":487}],489:[function(require,module,exports){ "use strict"; var floorMonth = require("./floor-month"); @@ -27061,7 +27960,7 @@ module.exports = function () { return this; }; -},{"./floor-month":414}],416:[function(require,module,exports){ +},{"./floor-month":488}],490:[function(require,module,exports){ "use strict"; var objToString = Object.prototype.toString, id = objToString.call(new Date()); @@ -27073,7 +27972,7 @@ module.exports = function (value) { ); }; -},{}],417:[function(require,module,exports){ +},{}],491:[function(require,module,exports){ "use strict"; var isDate = require("./is-date"); @@ -27083,18 +27982,18 @@ module.exports = function (value) { return value; }; -},{"./is-date":416}],418:[function(require,module,exports){ +},{"./is-date":490}],492:[function(require,module,exports){ "use strict"; // eslint-disable-next-line no-empty-function module.exports = function () {}; -},{}],419:[function(require,module,exports){ +},{}],493:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Math.sign : require("./shim"); -},{"./is-implemented":420,"./shim":421}],420:[function(require,module,exports){ +},{"./is-implemented":494,"./shim":495}],494:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -27103,7 +28002,7 @@ module.exports = function () { return sign(10) === 1 && sign(-20) === -1; }; -},{}],421:[function(require,module,exports){ +},{}],495:[function(require,module,exports){ "use strict"; module.exports = function (value) { @@ -27112,7 +28011,7 @@ module.exports = function (value) { return value > 0 ? 1 : -1; }; -},{}],422:[function(require,module,exports){ +},{}],496:[function(require,module,exports){ "use strict"; var pad = require("../../string/#/pad") @@ -27130,7 +28029,7 @@ module.exports = function (length/*, precision*/) { ); }; -},{"../../string/#/pad":438,"../to-pos-integer":424}],423:[function(require,module,exports){ +},{"../../string/#/pad":512,"../to-pos-integer":498}],497:[function(require,module,exports){ "use strict"; var sign = require("../math/sign") @@ -27144,7 +28043,7 @@ module.exports = function (value) { return sign(value) * floor(abs(value)); }; -},{"../math/sign":419}],424:[function(require,module,exports){ +},{"../math/sign":493}],498:[function(require,module,exports){ "use strict"; var toInteger = require("./to-integer") @@ -27152,12 +28051,12 @@ var toInteger = require("./to-integer") module.exports = function (value) { return max(0, toInteger(value)); }; -},{"./to-integer":423}],425:[function(require,module,exports){ +},{"./to-integer":497}],499:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Object.assign : require("./shim"); -},{"./is-implemented":426,"./shim":427}],426:[function(require,module,exports){ +},{"./is-implemented":500,"./shim":501}],500:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -27168,7 +28067,7 @@ module.exports = function () { return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; }; -},{}],427:[function(require,module,exports){ +},{}],501:[function(require,module,exports){ "use strict"; var keys = require("../keys") @@ -27193,26 +28092,26 @@ module.exports = function (dest, src/*, …srcn*/) { return dest; }; -},{"../keys":430,"../valid-value":434}],428:[function(require,module,exports){ +},{"../keys":504,"../valid-value":508}],502:[function(require,module,exports){ // Deprecated "use strict"; module.exports = function (obj) { return typeof obj === "function"; }; -},{}],429:[function(require,module,exports){ +},{}],503:[function(require,module,exports){ "use strict"; var _undefined = require("../function/noop")(); // Support ES3 engines module.exports = function (val) { return val !== _undefined && val !== null; }; -},{"../function/noop":418}],430:[function(require,module,exports){ +},{"../function/noop":492}],504:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); -},{"./is-implemented":431,"./shim":432}],431:[function(require,module,exports){ +},{"./is-implemented":505,"./shim":506}],505:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -27224,7 +28123,7 @@ module.exports = function () { } }; -},{}],432:[function(require,module,exports){ +},{}],506:[function(require,module,exports){ "use strict"; var isValue = require("../is-value"); @@ -27233,7 +28132,7 @@ var keys = Object.keys; module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; -},{"../is-value":429}],433:[function(require,module,exports){ +},{"../is-value":503}],507:[function(require,module,exports){ "use strict"; var isValue = require("./is-value"); @@ -27255,7 +28154,7 @@ module.exports = function (opts1/*, …options*/) { return result; }; -},{"./is-value":429}],434:[function(require,module,exports){ +},{"./is-value":503}],508:[function(require,module,exports){ "use strict"; var isValue = require("./is-value"); @@ -27265,12 +28164,12 @@ module.exports = function (value) { return value; }; -},{"./is-value":429}],435:[function(require,module,exports){ +},{"./is-value":503}],509:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? String.prototype.contains : require("./shim"); -},{"./is-implemented":436,"./shim":437}],436:[function(require,module,exports){ +},{"./is-implemented":510,"./shim":511}],510:[function(require,module,exports){ "use strict"; var str = "razdwatrzy"; @@ -27280,7 +28179,7 @@ module.exports = function () { return str.contains("dwa") === true && str.contains("foo") === false; }; -},{}],437:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ "use strict"; var indexOf = String.prototype.indexOf; @@ -27289,7 +28188,7 @@ module.exports = function (searchString/*, position*/) { return indexOf.call(this, searchString, arguments[1]) > -1; }; -},{}],438:[function(require,module,exports){ +},{}],512:[function(require,module,exports){ "use strict"; var toInteger = require("../../number/to-integer") @@ -27307,12 +28206,12 @@ module.exports = function (fill/*, length*/) { return self + (sLength + length >= 0 ? "" : fill.slice(length + sLength)); }; -},{"../../number/to-integer":423,"../../object/valid-value":434,"./repeat":439}],439:[function(require,module,exports){ +},{"../../number/to-integer":497,"../../object/valid-value":508,"./repeat":513}],513:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? String.prototype.repeat : require("./shim"); -},{"./is-implemented":440,"./shim":441}],440:[function(require,module,exports){ +},{"./is-implemented":514,"./shim":515}],514:[function(require,module,exports){ "use strict"; var str = "foo"; @@ -27322,7 +28221,7 @@ module.exports = function () { return str.repeat(2) === "foofoo"; }; -},{}],441:[function(require,module,exports){ +},{}],515:[function(require,module,exports){ // Thanks // @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html // @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js @@ -27348,7 +28247,7 @@ module.exports = function (count) { return result; }; -},{"../../../number/to-integer":423,"../../../object/valid-value":434}],442:[function(require,module,exports){ +},{"../../../number/to-integer":497,"../../../object/valid-value":508}],516:[function(require,module,exports){ "use strict"; var isCallable = require("../object/is-callable") @@ -27377,7 +28276,7 @@ module.exports = function (fmap) { }; }; -},{"../object/is-callable":428,"../object/valid-value":434}],443:[function(require,module,exports){ +},{"../object/is-callable":502,"../object/valid-value":508}],517:[function(require,module,exports){ 'use strict'; const matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g; @@ -27390,7 +28289,7 @@ module.exports = string => { return string.replace(matchOperatorsRegex, '\\$&'); }; -},{}],444:[function(require,module,exports){ +},{}],518:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -27915,7 +28814,7 @@ function functionBindPolyfill(context) { }; } -},{}],445:[function(require,module,exports){ +},{}],519:[function(require,module,exports){ (function (process){ /* * extsprintf.js: extended POSIX-style sprintf @@ -28145,7 +29044,7 @@ function dumpException(ex) }).call(this,require('_process')) -},{"_process":497,"assert":5,"util":560}],446:[function(require,module,exports){ +},{"_process":571,"assert":79,"util":634}],520:[function(require,module,exports){ (function (process){ 'use strict'; const escapeStringRegexp = require('escape-string-regexp'); @@ -28297,7 +29196,7 @@ module.exports = Object.assign(fn, figures); }).call(this,require('_process')) -},{"_process":497,"escape-string-regexp":447}],447:[function(require,module,exports){ +},{"_process":571,"escape-string-regexp":521}],521:[function(require,module,exports){ 'use strict'; var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; @@ -28310,7 +29209,7 @@ module.exports = function (str) { return str.replace(matchOperatorsRe, '\\$&'); }; -},{}],448:[function(require,module,exports){ +},{}],522:[function(require,module,exports){ (function (process){ module.exports = realpath realpath.realpath = realpath @@ -28381,7 +29280,7 @@ function unmonkeypatch () { }).call(this,require('_process')) -},{"./old.js":449,"_process":497,"fs":24}],449:[function(require,module,exports){ +},{"./old.js":523,"_process":571,"fs":98}],523:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -28689,7 +29588,7 @@ exports.realpath = function realpath(p, cache, cb) { }).call(this,require('_process')) -},{"_process":497,"fs":24,"path":493}],450:[function(require,module,exports){ +},{"_process":571,"fs":98,"path":567}],524:[function(require,module,exports){ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module @@ -28715,7 +29614,7 @@ exports.realpath = function realpath(p, cache, cb) { }; })); -},{"./lib/gherkin/ast_builder":451,"./lib/gherkin/dialects":454,"./lib/gherkin/generate_events":456,"./lib/gherkin/parser":459,"./lib/gherkin/pickles/compiler":460,"./lib/gherkin/token_matcher":462,"./lib/gherkin/token_scanner":463}],451:[function(require,module,exports){ +},{"./lib/gherkin/ast_builder":525,"./lib/gherkin/dialects":528,"./lib/gherkin/generate_events":530,"./lib/gherkin/parser":533,"./lib/gherkin/pickles/compiler":534,"./lib/gherkin/token_matcher":536,"./lib/gherkin/token_scanner":537}],525:[function(require,module,exports){ var AstNode = require('./ast_node'); var Errors = require('./errors'); @@ -28981,7 +29880,7 @@ module.exports = function AstBuilder () { }; -},{"./ast_node":452,"./errors":455}],452:[function(require,module,exports){ +},{"./ast_node":526,"./errors":529}],526:[function(require,module,exports){ function AstNode (ruleType) { this.ruleType = ruleType; this._subItems = {}; @@ -29011,7 +29910,7 @@ AstNode.prototype.getTokens = function (tokenType) { module.exports = AstNode; -},{}],453:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ // https://mathiasbynens.be/notes/javascript-unicode var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; @@ -29019,10 +29918,10 @@ module.exports = function countSymbols(string) { return string.replace(regexAstralSymbols, '_').length; } -},{}],454:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ module.exports = require('./gherkin-languages.json'); -},{"./gherkin-languages.json":457}],455:[function(require,module,exports){ +},{"./gherkin-languages.json":531}],529:[function(require,module,exports){ var Errors = {}; [ @@ -29085,7 +29984,7 @@ function createError(Ctor, message, location) { module.exports = Errors; -},{}],456:[function(require,module,exports){ +},{}],530:[function(require,module,exports){ var Parser = require('./parser') var Compiler = require('./pickles/compiler') @@ -29163,7 +30062,7 @@ function generateEvents(data, uri, types, language) { module.exports = generateEvents -},{"./parser":459,"./pickles/compiler":460}],457:[function(require,module,exports){ +},{"./parser":533,"./pickles/compiler":534}],531:[function(require,module,exports){ module.exports={ "af": { "and": [ @@ -32358,7 +33257,7 @@ module.exports={ } } -},{}],458:[function(require,module,exports){ +},{}],532:[function(require,module,exports){ var countSymbols = require('./count_symbols') function GherkinLine(lineText, lineNumber) { @@ -32443,7 +33342,7 @@ GherkinLine.prototype.getTags = function getTags() { module.exports = GherkinLine; -},{"./count_symbols":453}],459:[function(require,module,exports){ +},{"./count_symbols":527}],533:[function(require,module,exports){ // This file is generated. Do not edit! Edit gherkin-javascript.razor instead. var Errors = require('./errors'); var AstBuilder = require('./ast_builder'); @@ -34868,7 +35767,7 @@ module.exports = function Parser(builder) { } -},{"./ast_builder":451,"./errors":455,"./token_matcher":462,"./token_scanner":463}],460:[function(require,module,exports){ +},{"./ast_builder":525,"./errors":529,"./token_matcher":536,"./token_scanner":537}],534:[function(require,module,exports){ var countSymbols = require('../count_symbols'); function Compiler() { @@ -35033,7 +35932,7 @@ function Compiler() { module.exports = Compiler; -},{"../count_symbols":453}],461:[function(require,module,exports){ +},{"../count_symbols":527}],535:[function(require,module,exports){ function Token(line, location) { this.line = line; this.location = location; @@ -35050,7 +35949,7 @@ Token.prototype.detach = function () { module.exports = Token; -},{}],462:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ var DIALECTS = require('./dialects'); var Errors = require('./errors'); var LANGUAGE_PATTERN = /^\s*#\s*language\s*:\s*([a-zA-Z\-_]+)\s*$/; @@ -35241,7 +36140,7 @@ module.exports = function TokenMatcher(defaultDialectName) { } }; -},{"./dialects":454,"./errors":455}],463:[function(require,module,exports){ +},{"./dialects":528,"./errors":529}],537:[function(require,module,exports){ var Token = require('./token'); var GherkinLine = require('./gherkin_line'); @@ -35266,7 +36165,7 @@ module.exports = function TokenScanner(source) { } }; -},{"./gherkin_line":458,"./token":461}],464:[function(require,module,exports){ +},{"./gherkin_line":532,"./token":535}],538:[function(require,module,exports){ (function (process){ exports.alphasort = alphasort exports.alphasorti = alphasorti @@ -35511,7 +36410,7 @@ function childrenIgnored (self, path) { }).call(this,require('_process')) -},{"_process":497,"minimatch":483,"path":493,"path-is-absolute":494}],465:[function(require,module,exports){ +},{"_process":571,"minimatch":557,"path":567,"path-is-absolute":568}],539:[function(require,module,exports){ (function (process){ // Approach: // @@ -36306,7 +37205,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { }).call(this,require('_process')) -},{"./common.js":464,"./sync.js":466,"_process":497,"assert":5,"events":444,"fs":24,"fs.realpath":448,"inflight":473,"inherits":474,"minimatch":483,"once":490,"path":493,"path-is-absolute":494,"util":560}],466:[function(require,module,exports){ +},{"./common.js":538,"./sync.js":540,"_process":571,"assert":79,"events":518,"fs":98,"fs.realpath":522,"inflight":547,"inherits":548,"minimatch":557,"once":564,"path":567,"path-is-absolute":568,"util":634}],540:[function(require,module,exports){ (function (process){ module.exports = globSync globSync.GlobSync = GlobSync @@ -36797,7 +37696,7 @@ GlobSync.prototype._makeAbs = function (f) { }).call(this,require('_process')) -},{"./common.js":464,"./glob.js":465,"_process":497,"assert":5,"fs":24,"fs.realpath":448,"minimatch":483,"path":493,"path-is-absolute":494,"util":560}],467:[function(require,module,exports){ +},{"./common.js":538,"./glob.js":539,"_process":571,"assert":79,"fs":98,"fs.realpath":522,"minimatch":557,"path":567,"path-is-absolute":568,"util":634}],541:[function(require,module,exports){ 'use strict' module.exports = clone @@ -36818,7 +37717,7 @@ function clone (obj) { return copy } -},{}],468:[function(require,module,exports){ +},{}],542:[function(require,module,exports){ (function (process,global){ var fs = require('fs') var polyfills = require('./polyfills.js') @@ -37167,7 +38066,7 @@ function retry () { }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./clone.js":467,"./legacy-streams.js":469,"./polyfills.js":470,"_process":497,"assert":5,"fs":24,"util":560}],469:[function(require,module,exports){ +},{"./clone.js":541,"./legacy-streams.js":543,"./polyfills.js":544,"_process":571,"assert":79,"fs":98,"util":634}],543:[function(require,module,exports){ (function (process){ var Stream = require('stream').Stream @@ -37290,7 +38189,7 @@ function legacy (fs) { }).call(this,require('_process')) -},{"_process":497,"stream":541}],470:[function(require,module,exports){ +},{"_process":571,"stream":615}],544:[function(require,module,exports){ (function (process){ var constants = require('constants') @@ -37637,7 +38536,7 @@ function patch (fs) { }).call(this,require('_process')) -},{"_process":497,"constants":44}],471:[function(require,module,exports){ +},{"_process":571,"constants":118}],545:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 @@ -37723,7 +38622,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],472:[function(require,module,exports){ +},{}],546:[function(require,module,exports){ 'use strict'; module.exports = (string, count = 1, options) => { @@ -37760,7 +38659,7 @@ module.exports = (string, count = 1, options) => { return string.replace(regex, options.indent.repeat(count)); }; -},{}],473:[function(require,module,exports){ +},{}],547:[function(require,module,exports){ (function (process){ var wrappy = require('wrappy') var reqs = Object.create(null) @@ -37819,7 +38718,7 @@ function slice (args) { }).call(this,require('_process')) -},{"_process":497,"once":490,"wrappy":562}],474:[function(require,module,exports){ +},{"_process":571,"once":564,"wrappy":636}],548:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -37848,7 +38747,7 @@ if (typeof Object.create === 'function') { } } -},{}],475:[function(require,module,exports){ +},{}],549:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -37871,7 +38770,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],476:[function(require,module,exports){ +},{}],550:[function(require,module,exports){ 'use strict'; /* eslint-disable yoda */ module.exports = x => { @@ -37919,7 +38818,7 @@ module.exports = x => { return false; }; -},{}],477:[function(require,module,exports){ +},{}],551:[function(require,module,exports){ /** * Export generator function checks. */ @@ -37950,7 +38849,7 @@ function isGeneratorFunction (fn) { fn.constructor.name === 'GeneratorFunction' } -},{}],478:[function(require,module,exports){ +},{}],552:[function(require,module,exports){ 'use strict'; const isStream = stream => @@ -37981,14 +38880,14 @@ isStream.transform = stream => module.exports = isStream; -},{}],479:[function(require,module,exports){ +},{}],553:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],480:[function(require,module,exports){ +},{}],554:[function(require,module,exports){ /* * Copyright 2013 AJ O'Neal * Copyright 2015 Tiancheng "Timothy" Gu @@ -38059,7 +38958,7 @@ module.exports = function shuffle(array, seed) { return array } -},{"seed-random":525}],481:[function(require,module,exports){ +},{"seed-random":599}],555:[function(require,module,exports){ (function (global){ /** * @license @@ -55176,7 +56075,7 @@ module.exports = function shuffle(array, seed) { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],482:[function(require,module,exports){ +},{}],556:[function(require,module,exports){ /** * Special language-specific overrides. * @@ -55232,7 +56131,7 @@ module.exports = function (str, locale) { return str.toLowerCase() } -},{}],483:[function(require,module,exports){ +},{}],557:[function(require,module,exports){ module.exports = minimatch minimatch.Minimatch = Minimatch @@ -56157,7 +57056,7 @@ function regExpEscape (s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } -},{"brace-expansion":22,"path":493}],484:[function(require,module,exports){ +},{"brace-expansion":96,"path":567}],558:[function(require,module,exports){ var Promise = require('any-promise') var fs @@ -56221,7 +57120,7 @@ exports.exists = function (filename, callback) { }) } -},{"any-promise":1,"fs":24,"graceful-fs":468,"thenify-all":546}],485:[function(require,module,exports){ +},{"any-promise":75,"fs":98,"graceful-fs":542,"thenify-all":620}],559:[function(require,module,exports){ var lowerCase = require('lower-case') var NON_WORD_REGEXP = require('./vendor/non-word-regexp') @@ -56263,16 +57162,16 @@ module.exports = function (str, locale, replacement) { return lowerCase(str, locale) } -},{"./vendor/camel-case-regexp":486,"./vendor/camel-case-upper-regexp":487,"./vendor/non-word-regexp":488,"lower-case":482}],486:[function(require,module,exports){ +},{"./vendor/camel-case-regexp":560,"./vendor/camel-case-upper-regexp":561,"./vendor/non-word-regexp":562,"lower-case":556}],560:[function(require,module,exports){ module.exports = /([a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])/g -},{}],487:[function(require,module,exports){ +},{}],561:[function(require,module,exports){ module.exports = /([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A][a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])/g -},{}],488:[function(require,module,exports){ +},{}],562:[function(require,module,exports){ module.exports = /[^A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g -},{}],489:[function(require,module,exports){ +},{}],563:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -56364,7 +57263,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],490:[function(require,module,exports){ +},{}],564:[function(require,module,exports){ var wrappy = require('wrappy') module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) @@ -56408,7 +57307,7 @@ function onceStrict (fn) { return f } -},{"wrappy":562}],491:[function(require,module,exports){ +},{"wrappy":636}],565:[function(require,module,exports){ exports.endianness = function () { return 'LE' }; exports.hostname = function () { @@ -56459,7 +57358,7 @@ exports.homedir = function () { return '/' }; -},{}],492:[function(require,module,exports){ +},{}],566:[function(require,module,exports){ 'use strict'; var repeat = require('repeat-string'); @@ -56481,7 +57380,7 @@ module.exports = function padLeft(val, num, str) { return val + padding.slice(0, diff); }; -},{"repeat-string":516}],493:[function(require,module,exports){ +},{"repeat-string":590}],567:[function(require,module,exports){ (function (process){ // .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, // backported and transplited with Babel, with backwards-compat fixes @@ -56788,7 +57687,7 @@ var substr = 'ab'.substr(-1) === 'b' }).call(this,require('_process')) -},{"_process":497}],494:[function(require,module,exports){ +},{"_process":571}],568:[function(require,module,exports){ (function (process){ 'use strict'; @@ -56813,7 +57712,7 @@ module.exports.win32 = win32; }).call(this,require('_process')) -},{"_process":497}],495:[function(require,module,exports){ +},{"_process":571}],569:[function(require,module,exports){ (function (process){ 'use strict'; @@ -56911,7 +57810,7 @@ module.exports.win32 = win32.parse; }).call(this,require('_process')) -},{"_process":497}],496:[function(require,module,exports){ +},{"_process":571}],570:[function(require,module,exports){ (function (process){ 'use strict'; @@ -56961,7 +57860,7 @@ function nextTick(fn, arg1, arg2, arg3) { }).call(this,require('_process')) -},{"_process":497}],497:[function(require,module,exports){ +},{"_process":571}],571:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -57147,10 +58046,10 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],498:[function(require,module,exports){ +},{}],572:[function(require,module,exports){ module.exports = require('./lib/node-progress'); -},{"./lib/node-progress":499}],499:[function(require,module,exports){ +},{"./lib/node-progress":573}],573:[function(require,module,exports){ (function (process){ /*! * node-progress @@ -57391,10 +58290,10 @@ ProgressBar.prototype.terminate = function () { }).call(this,require('_process')) -},{"_process":497}],500:[function(require,module,exports){ +},{"_process":571}],574:[function(require,module,exports){ module.exports = require('./lib/_stream_duplex.js'); -},{"./lib/_stream_duplex.js":501}],501:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":575}],575:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -57526,7 +58425,7 @@ Duplex.prototype._destroy = function (err, cb) { pna.nextTick(cb, err); }; -},{"./_stream_readable":503,"./_stream_writable":505,"core-util-is":392,"inherits":474,"process-nextick-args":496}],502:[function(require,module,exports){ +},{"./_stream_readable":577,"./_stream_writable":579,"core-util-is":466,"inherits":548,"process-nextick-args":570}],576:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -57574,7 +58473,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":504,"core-util-is":392,"inherits":474}],503:[function(require,module,exports){ +},{"./_stream_transform":578,"core-util-is":466,"inherits":548}],577:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -58597,7 +59496,7 @@ function indexOf(xs, x) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":501,"./internal/streams/BufferList":506,"./internal/streams/destroy":507,"./internal/streams/stream":508,"_process":497,"core-util-is":392,"events":444,"inherits":474,"isarray":479,"process-nextick-args":496,"safe-buffer":509,"string_decoder/":510,"util":23}],504:[function(require,module,exports){ +},{"./_stream_duplex":575,"./internal/streams/BufferList":580,"./internal/streams/destroy":581,"./internal/streams/stream":582,"_process":571,"core-util-is":466,"events":518,"inherits":548,"isarray":553,"process-nextick-args":570,"safe-buffer":583,"string_decoder/":584,"util":97}],578:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -58812,7 +59711,7 @@ function done(stream, er, data) { return stream.push(null); } -},{"./_stream_duplex":501,"core-util-is":392,"inherits":474}],505:[function(require,module,exports){ +},{"./_stream_duplex":575,"core-util-is":466,"inherits":548}],579:[function(require,module,exports){ (function (process,global,setImmediate){ // Copyright Joyent, Inc. and other Node contributors. // @@ -59503,7 +60402,7 @@ Writable.prototype._destroy = function (err, cb) { }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) -},{"./_stream_duplex":501,"./internal/streams/destroy":507,"./internal/streams/stream":508,"_process":497,"core-util-is":392,"inherits":474,"process-nextick-args":496,"safe-buffer":509,"timers":548,"util-deprecate":557}],506:[function(require,module,exports){ +},{"./_stream_duplex":575,"./internal/streams/destroy":581,"./internal/streams/stream":582,"_process":571,"core-util-is":466,"inherits":548,"process-nextick-args":570,"safe-buffer":583,"timers":622,"util-deprecate":631}],580:[function(require,module,exports){ 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -59583,7 +60482,7 @@ if (util && util.inspect && util.inspect.custom) { return this.constructor.name + ' ' + obj; }; } -},{"safe-buffer":509,"util":23}],507:[function(require,module,exports){ +},{"safe-buffer":583,"util":97}],581:[function(require,module,exports){ 'use strict'; /**/ @@ -59658,10 +60557,10 @@ module.exports = { destroy: destroy, undestroy: undestroy }; -},{"process-nextick-args":496}],508:[function(require,module,exports){ +},{"process-nextick-args":570}],582:[function(require,module,exports){ module.exports = require('events').EventEmitter; -},{"events":444}],509:[function(require,module,exports){ +},{"events":518}],583:[function(require,module,exports){ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer @@ -59725,7 +60624,7 @@ SafeBuffer.allocUnsafeSlow = function (size) { return buffer.SlowBuffer(size) } -},{"buffer":25}],510:[function(require,module,exports){ +},{"buffer":99}],584:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -60022,10 +60921,10 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":509}],511:[function(require,module,exports){ +},{"safe-buffer":583}],585:[function(require,module,exports){ module.exports = require('./readable').PassThrough -},{"./readable":512}],512:[function(require,module,exports){ +},{"./readable":586}],586:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = exports; exports.Readable = exports; @@ -60034,13 +60933,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":501,"./lib/_stream_passthrough.js":502,"./lib/_stream_readable.js":503,"./lib/_stream_transform.js":504,"./lib/_stream_writable.js":505}],513:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":575,"./lib/_stream_passthrough.js":576,"./lib/_stream_readable.js":577,"./lib/_stream_transform.js":578,"./lib/_stream_writable.js":579}],587:[function(require,module,exports){ module.exports = require('./readable').Transform -},{"./readable":512}],514:[function(require,module,exports){ +},{"./readable":586}],588:[function(require,module,exports){ module.exports = require('./lib/_stream_writable.js'); -},{"./lib/_stream_writable.js":505}],515:[function(require,module,exports){ +},{"./lib/_stream_writable.js":579}],589:[function(require,module,exports){ /** * Copyright (c) 2014-present, Facebook, Inc. * @@ -60768,7 +61667,7 @@ try { Function("r", "regeneratorRuntime = r")(runtime); } -},{}],516:[function(require,module,exports){ +},{}],590:[function(require,module,exports){ /*! * repeat-string * @@ -60840,7 +61739,7 @@ function repeat(str, num) { return res; } -},{}],517:[function(require,module,exports){ +},{}],591:[function(require,module,exports){ var core = require('./lib/core'); var async = require('./lib/async'); async.core = core; @@ -60850,7 +61749,7 @@ async.sync = require('./lib/sync'); exports = async; module.exports = async; -},{"./lib/async":518,"./lib/core":521,"./lib/sync":524}],518:[function(require,module,exports){ +},{"./lib/async":592,"./lib/core":595,"./lib/sync":598}],592:[function(require,module,exports){ (function (process){ var core = require('./core'); var fs = require('fs'); @@ -61126,7 +62025,7 @@ module.exports = function resolve(x, options, callback) { }).call(this,require('_process')) -},{"./caller.js":519,"./core":521,"./node-modules-paths.js":522,"./normalize-options.js":523,"_process":497,"fs":24,"path":493}],519:[function(require,module,exports){ +},{"./caller.js":593,"./core":595,"./node-modules-paths.js":596,"./normalize-options.js":597,"_process":571,"fs":98,"path":567}],593:[function(require,module,exports){ module.exports = function () { // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi var origPrepareStackTrace = Error.prepareStackTrace; @@ -61136,7 +62035,7 @@ module.exports = function () { return stack[2].getFileName(); }; -},{}],520:[function(require,module,exports){ +},{}],594:[function(require,module,exports){ module.exports={ "assert": true, "async_hooks": ">= 8", @@ -61212,7 +62111,7 @@ module.exports={ "zlib": true } -},{}],521:[function(require,module,exports){ +},{}],595:[function(require,module,exports){ (function (process){ var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -61270,7 +62169,7 @@ module.exports = core; }).call(this,require('_process')) -},{"./core.json":520,"_process":497}],522:[function(require,module,exports){ +},{"./core.json":594,"_process":571}],596:[function(require,module,exports){ var path = require('path'); var parse = path.parse || require('path-parse'); @@ -61314,7 +62213,7 @@ module.exports = function nodeModulesPaths(start, opts, request) { return opts && opts.paths ? dirs.concat(opts.paths) : dirs; }; -},{"path":493,"path-parse":495}],523:[function(require,module,exports){ +},{"path":567,"path-parse":569}],597:[function(require,module,exports){ module.exports = function (x, opts) { /** * This file is purposefully a passthrough. It's expected that third-party @@ -61326,7 +62225,7 @@ module.exports = function (x, opts) { return opts || {}; }; -},{}],524:[function(require,module,exports){ +},{}],598:[function(require,module,exports){ (function (process){ var core = require('./core'); var fs = require('fs'); @@ -61503,7 +62402,7 @@ module.exports = function (x, options) { }).call(this,require('_process')) -},{"./caller.js":519,"./core":521,"./node-modules-paths.js":522,"./normalize-options.js":523,"_process":497,"fs":24,"path":493}],525:[function(require,module,exports){ +},{"./caller.js":593,"./core":595,"./node-modules-paths.js":596,"./normalize-options.js":597,"_process":571,"fs":98,"path":567}],599:[function(require,module,exports){ (function (global){ 'use strict'; @@ -61681,7 +62580,7 @@ mixkey(Math.random(), pool); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],526:[function(require,module,exports){ +},{}],600:[function(require,module,exports){ // Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -61742,7 +62641,7 @@ module.exports = function FormatStackTrace(error, frames) { return lines.join("\n"); }; -},{}],527:[function(require,module,exports){ +},{}],601:[function(require,module,exports){ (function (global){ // If a another copy (same version or not) of stack-chain exists it will result // in wrong stack traces (most likely dublicate callSites). @@ -61763,7 +62662,7 @@ else { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./package.json":528,"./stack-chain":529}],528:[function(require,module,exports){ +},{"./package.json":602,"./stack-chain":603}],602:[function(require,module,exports){ module.exports={ "name": "stack-chain", "description": "API for combining call site modifiers", @@ -61791,7 +62690,7 @@ module.exports={ "license": "MIT" } -},{}],529:[function(require,module,exports){ +},{}],603:[function(require,module,exports){ // use a already existing formater or fallback to the default v8 formater var defaultFormater = require('./format.js'); @@ -61973,7 +62872,7 @@ Object.defineProperty(Error, 'prepareStackTrace', { module.exports = chain; -},{"./format.js":526,"./package.json":528}],530:[function(require,module,exports){ +},{"./format.js":600,"./package.json":602}],604:[function(require,module,exports){ (function(root, factory) { 'use strict'; // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers. @@ -62020,7 +62919,7 @@ module.exports = chain; }; })); -},{"stackframe":531}],531:[function(require,module,exports){ +},{"stackframe":605}],605:[function(require,module,exports){ (function(root, factory) { 'use strict'; // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers. @@ -62133,7 +63032,7 @@ module.exports = chain; return StackFrame; })); -},{}],532:[function(require,module,exports){ +},{}],606:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62239,7 +63138,7 @@ ArraySet.prototype.toArray = function ArraySet_toArray() { exports.ArraySet = ArraySet; -},{"./util":538}],533:[function(require,module,exports){ +},{"./util":612}],607:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62381,7 +63280,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { aOutParam.rest = aIndex; }; -},{"./base64":534}],534:[function(require,module,exports){ +},{"./base64":608}],608:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62450,7 +63349,7 @@ exports.decode = function (charCode) { return -1; }; -},{}],535:[function(require,module,exports){ +},{}],609:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62563,7 +63462,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { return index; }; -},{}],536:[function(require,module,exports){ +},{}],610:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62679,7 +63578,7 @@ exports.quickSort = function (ary, comparator) { doQuickSort(ary, comparator, 0, ary.length - 1); }; -},{}],537:[function(require,module,exports){ +},{}],611:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -63763,7 +64662,7 @@ IndexedSourceMapConsumer.prototype._parseMappings = exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; -},{"./array-set":532,"./base64-vlq":533,"./binary-search":535,"./quick-sort":536,"./util":538}],538:[function(require,module,exports){ +},{"./array-set":606,"./base64-vlq":607,"./binary-search":609,"./quick-sort":610,"./util":612}],612:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -64182,7 +65081,7 @@ function compareByGeneratedPositionsInflated(mappingA, mappingB) { } exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; -},{}],539:[function(require,module,exports){ +},{}],613:[function(require,module,exports){ (function(root, factory) { 'use strict'; // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers. @@ -64524,7 +65423,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate }; })); -},{"source-map/lib/source-map-consumer":537,"stackframe":531}],540:[function(require,module,exports){ +},{"source-map/lib/source-map-consumer":611,"stackframe":605}],614:[function(require,module,exports){ (function(root, factory) { 'use strict'; // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers. @@ -64753,7 +65652,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate }; })); -},{"error-stack-parser":410,"stack-generator":530,"stacktrace-gps":539}],541:[function(require,module,exports){ +},{"error-stack-parser":484,"stack-generator":604,"stacktrace-gps":613}],615:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -64882,7 +65781,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":444,"inherits":474,"readable-stream/duplex.js":500,"readable-stream/passthrough.js":511,"readable-stream/readable.js":512,"readable-stream/transform.js":513,"readable-stream/writable.js":514}],542:[function(require,module,exports){ +},{"events":518,"inherits":548,"readable-stream/duplex.js":574,"readable-stream/passthrough.js":585,"readable-stream/readable.js":586,"readable-stream/transform.js":587,"readable-stream/writable.js":588}],616:[function(require,module,exports){ "use strict"; exports.__esModule = true; function parseArgsStringToArgv(value, env, file) { @@ -64928,7 +65827,7 @@ function firstString() { } } -},{}],543:[function(require,module,exports){ +},{}],617:[function(require,module,exports){ 'use strict'; const stripAnsi = require('strip-ansi'); const isFullwidthCodePoint = require('is-fullwidth-code-point'); @@ -64966,7 +65865,7 @@ module.exports = str => { return width; }; -},{"is-fullwidth-code-point":476,"strip-ansi":545}],544:[function(require,module,exports){ +},{"is-fullwidth-code-point":550,"strip-ansi":619}],618:[function(require,module,exports){ 'use strict'; module.exports = () => { @@ -64978,13 +65877,13 @@ module.exports = () => { return new RegExp(pattern, 'g'); }; -},{}],545:[function(require,module,exports){ +},{}],619:[function(require,module,exports){ 'use strict'; const ansiRegex = require('ansi-regex'); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; -},{"ansi-regex":544}],546:[function(require,module,exports){ +},{"ansi-regex":618}],620:[function(require,module,exports){ var thenify = require('thenify') @@ -65059,7 +65958,7 @@ function deprecated(source, name) { return false } -},{"thenify":547}],547:[function(require,module,exports){ +},{"thenify":621}],621:[function(require,module,exports){ var Promise = require('any-promise') var assert = require('assert') @@ -65141,7 +66040,7 @@ function createWrapper(name, options) { + '})' } -},{"any-promise":1,"assert":5}],548:[function(require,module,exports){ +},{"any-promise":75,"assert":79}],622:[function(require,module,exports){ (function (setImmediate,clearImmediate){ var nextTick = require('process/browser.js').nextTick; var apply = Function.prototype.apply; @@ -65221,7 +66120,7 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : }; }).call(this,require("timers").setImmediate,require("timers").clearImmediate) -},{"process/browser.js":497,"timers":548}],549:[function(require,module,exports){ +},{"process/browser.js":571,"timers":622}],623:[function(require,module,exports){ var noCase = require('no-case') var upperCase = require('upper-case') @@ -65238,7 +66137,7 @@ module.exports = function (value, locale) { }) } -},{"no-case":485,"upper-case":555}],550:[function(require,module,exports){ +},{"no-case":559,"upper-case":629}],624:[function(require,module,exports){ "use strict"; var isPrototype = require("../prototype/is"); @@ -65259,7 +66158,7 @@ module.exports = function (value) { return !isPrototype(value); }; -},{"../prototype/is":553}],551:[function(require,module,exports){ +},{"../prototype/is":627}],625:[function(require,module,exports){ "use strict"; var isValue = require("../value/is"); @@ -65272,7 +66171,7 @@ module.exports = function (value) { return hasOwnProperty.call(possibleTypes, typeof value); }; -},{"../value/is":554}],552:[function(require,module,exports){ +},{"../value/is":628}],626:[function(require,module,exports){ "use strict"; var isFunction = require("../function/is"); @@ -65285,7 +66184,7 @@ module.exports = function (value) { return true; }; -},{"../function/is":550}],553:[function(require,module,exports){ +},{"../function/is":624}],627:[function(require,module,exports){ "use strict"; var isObject = require("../object/is"); @@ -65300,7 +66199,7 @@ module.exports = function (value) { } }; -},{"../object/is":551}],554:[function(require,module,exports){ +},{"../object/is":625}],628:[function(require,module,exports){ "use strict"; // ES3 safe @@ -65308,7 +66207,7 @@ var _undefined = void 0; module.exports = function (value) { return value !== _undefined && value !== null; }; -},{}],555:[function(require,module,exports){ +},{}],629:[function(require,module,exports){ /** * Special language-specific overrides. * @@ -65360,7 +66259,7 @@ module.exports = function (str, locale) { return str.toUpperCase() } -},{}],556:[function(require,module,exports){ +},{}],630:[function(require,module,exports){ var FUNCTIONS = {}; /** @@ -65391,7 +66290,7 @@ module.exports = function (arity, fn) { return FUNCTIONS[arity](fn); }; -},{}],557:[function(require,module,exports){ +},{}],631:[function(require,module,exports){ (function (global){ /** @@ -65463,11 +66362,11 @@ function config (name) { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],558:[function(require,module,exports){ -arguments[4][6][0].apply(exports,arguments) -},{"dup":6}],559:[function(require,module,exports){ -arguments[4][7][0].apply(exports,arguments) -},{"dup":7}],560:[function(require,module,exports){ +},{}],632:[function(require,module,exports){ +arguments[4][80][0].apply(exports,arguments) +},{"dup":80}],633:[function(require,module,exports){ +arguments[4][81][0].apply(exports,arguments) +},{"dup":81}],634:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -66058,7 +66957,7 @@ function hasOwnProperty(obj, prop) { }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":559,"_process":497,"inherits":558}],561:[function(require,module,exports){ +},{"./support/isBuffer":633,"_process":571,"inherits":632}],635:[function(require,module,exports){ /* * verror.js: richer JavaScript errors */ @@ -66511,7 +67410,7 @@ WError.prototype.cause = function we_cause(c) return (this.jse_cause); }; -},{"assert-plus":4,"core-util-is":392,"extsprintf":445,"util":560}],562:[function(require,module,exports){ +},{"assert-plus":78,"core-util-is":466,"extsprintf":519,"util":634}],636:[function(require,module,exports){ // Returns a wrapper function that returns a wrapped callback // The wrapper function should do some stuff, and return a // presumably different callback function. @@ -66546,405 +67445,5417 @@ function wrappy (fn, cb) { } } -},{}],563:[function(require,module,exports){ -module.exports={ - "name": "cucumber", - "description": "The official JavaScript implementation of Cucumber.", - "keywords": [ - "testing", - "bdd", - "cucumber", - "gherkin", - "tests" - ], - "version": "6.0.0", - "homepage": "http://github.com/cucumber/cucumber-js", - "author": "Julien Biezemans (http://jbpros.net)", - "contributors": [ - "Julien Biezemans (http://jbpros.net)", - "Fernando Acorreia ", - "Paul Jensen ", - "Kushal Pisavadia", - "Olivier Melcher ", - "Tristan Dunn ", - "Ted de Koning", - "Renier Morales ", - "Aslak Hellesøy ", - "Aaron Garvey", - "Omar Gonzalez ", - "Chris Young ", - "Israel Halle ", - "Matteo Collina ", - "Niklas Närhinen ", - "Kim, Jang-hwan ", - "Michael Zedeler ", - "Tom V ", - "David Godfrey ", - "Paul Shannon (http://devpaul.com)", - "Simon Dean (http://www.simondean.org)", - "John Wright ", - "Johny Jose ", - "Marat Dyatko ", - "Tim Perry ", - "Fedotov Daniil ", - "unknown ", - "Ben Van Treese ", - "Gabe Hayes ", - "Brian Clozel ", - "Lukas Degener ", - "Simon Lampen ", - "Eddie Loeffen ", - "Stanley Shyiko ", - "Artur Kania ", - "Sam Saccone ", - "Craig Morris ", - "Gary Taylor ", - "Krispin Schulz ", - "Elwyn ", - "Jan-Eric Duden ", - "kostya.misura ", - "Julian ", - "nebehr ", - "Jesse Harlin ", - "Sonny Piers ", - "Will Farrell ", - "Kevin Kirsche ", - "chrismilleruk ", - "Mateusz Derks ", - "Mark Amery ", - "Artem Repko ", - "zs-zs ", - "Dale Gardner ", - "Charles Rudolph ", - "Karthik Viswanath ", - "Marcel Hoyer ", - "Artem Bronitsky ", - "Karine Pires ", - "Rick Lee-Morlang ", - "Noah Davis ", - "Miika Hänninen ", - "Kevin Goslar ", - "John Krull ", - "Maxim Koretskiy ", - "seantdg ", - "Marc Burton ", - "Jonathan Kim ", - "Ádám Gólya ", - "Scott Deakin ", - "efokschaner ", - "John McLaughlin ", - "Josh Goldberg ", - "Artur Pomadowski ", - "Benjamín Eidelman ", - "Jan Molak ", - "dbillingham ", - "Jonathan Gomez ", - "Oliver Rogers ", - "Hugues Malphettes ", - "gforceg ", - "Zearin ", - "Cody Ray Hoeft ", - "Florian Ribon ", - "temyers ", - "Martin Delille ", - "yaronassa ", - "Nico Jansen ", - "Łukasz Gandecki ", - "Warren ", - "Vasily Shelkov ", - "Steve Tooke ", - "João Guilherme Farias Duda ", - "szymonprz ", - "Olle Jonsson ", - "Darrin Holst ", - "Dmitry Shirokov ", - "Jayson Smith ", - "jshifflet ", - "Máté Karácsony ", - "Ilya Kozhevnikov ", - "Giuseppe DiBella ", - "Marco Muller ", - "Valerio Innocenti Sedili ", - "Alon Diamant ", - "RolandArgos ", - "Julian ", - "Bruce Lindsay ", - "Josua Schmid ", - "DevSide ", - "ahulab ", - "Kyle Moore ", - "basemmerink ", - "David H. Gutteridge ", - "lopesc ", - "Honza Javorek ", - "Josh Chisholm ", - "Izhaki ", - "Niyaz Akhmetov ", - "Sérgio Junior ", - "mgonnet ", - "Joey Jan ", - "David Goss ", - "Artur Neumann " - ], - "repository": { - "type": "git", - "url": "git://github.com/cucumber/cucumber-js.git" - }, - "bugs": { - "email": "cukes@googlegroups.com", - "url": "http://github.com/cucumber/cucumber-js/issues" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "engines": { - "node": ">=8" - }, - "dependencies": { - "assertion-error-formatter": "^3.0.0", - "bluebird": "^3.4.1", - "cli-table3": "^0.5.1", - "colors": "^1.1.2", - "commander": "^3.0.1", - "cucumber-expressions": "^7.0.0", - "cucumber-tag-expressions": "^2.0.2", - "duration": "^0.2.1", - "escape-string-regexp": "^2.0.0", - "figures": "^3.0.0", - "gherkin": "5.0.0", - "glob": "^7.1.3", - "indent-string": "^4.0.0", - "is-generator": "^1.0.2", - "is-stream": "^2.0.0", - "knuth-shuffle-seeded": "^1.0.6", - "lodash": "^4.17.14", - "mz": "^2.4.0", - "progress": "^2.0.0", - "resolve": "^1.3.3", - "serialize-error": "^4.1.0", - "stack-chain": "^2.0.0", - "stacktrace-js": "^2.0.0", - "string-argv": "^0.3.0", - "title-case": "^2.1.1", - "util-arity": "^1.0.2", - "verror": "^1.9.0" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", - "@babel/plugin-proposal-function-bind": "^7.2.0", - "@babel/preset-env": "^7.2.3", - "@babel/register": "^7.0.0", - "ansi-html": "^0.0.7", - "babel-eslint": "^10.0.1", - "babel-plugin-istanbul": "^5.1.0", - "babelify": "^10.0.0", - "browserify": "^16.2.2", - "chai": "^4.0.1", - "coffeescript": "^2.4.1", - "connect": "^3.4.0", - "core-js": "^3.2.1", - "coveralls": "^3.0.0", - "dependency-lint": "^6.0.0", - "eslint": "^6.3.0", - "eslint-config-prettier": "^6.1.0", - "eslint-config-standard": "^14.1.0", - "eslint-plugin-babel": "^5.3.0", - "eslint-plugin-import": "^2.17.1", - "eslint-plugin-node": "^9.0.0", - "eslint-plugin-prettier": "^3.0.0", - "eslint-plugin-promise": "^4.1.1", - "eslint-plugin-standard": "^4.0.0", - "fs-extra": "^8.0.0", - "mocha": "^6.1.3", - "mustache": "^3.0.1", - "nyc": "^14.0.0", - "prettier": "^1.5.2", - "regenerator-runtime": "^0.13.3", - "serve-static": "^1.10.0", - "sinon": "^7.3.1", - "sinon-chai": "^3.3.0", - "stream-to-string": "^1.1.0", - "tmp": "^0.1.0" - }, - "scripts": { - "build-browser-example": "BABEL_ENV=browser browserify example/index.js -o dist/browser-example.js -t babelify", - "build-local-continuous": "babel src --watch -d lib --ignore '**/*_spec.js'", - "build-local": "babel src -d lib --ignore '**/*_spec.js'", - "build-release": "BABEL_ENV=browser browserify scripts/cucumber.js -o dist/cucumber.js -t babelify --standalone Cucumber --debug", - "feature-test": "node ./bin/cucumber-js", - "lint-autofix": "eslint --fix \"{example,features,scripts,src,test}/**/*.js\"", - "lint-code": "eslint \"{example,features,scripts,src,test}/**/*.js\"", - "lint-dependencies": "dependency-lint", - "lint": "yarn run lint-code && yarn run lint-dependencies", - "prefeature-test": "yarn run build-local", - "prepublish": "yarn run build-local", - "test-coverage": "yarn run lint && ./scripts/test-coverage.sh", - "test": "yarn run lint && yarn run unit-test && yarn run feature-test", - "unit-test": "mocha src" - }, - "bin": { - "cucumber-js": "./bin/cucumber-js" - }, - "license": "MIT", - "files": [ - "bin/", - "dist/", - "lib/" - ] -} - -},{}],564:[function(require,module,exports){ +},{}],637:[function(require,module,exports){ "use strict"; -require("core-js/modules/es.symbol"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; -require("core-js/modules/es.symbol.description"); +/*! + * XRegExp.build 4.2.4 + * + * Steven Levithan (c) 2012-present MIT License + */ +var _default = function _default(XRegExp) { + var REGEX_DATA = 'xregexp'; + var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g; + var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g', { + conjunction: 'or' + }); + /** + * Strips a leading `^` and trailing unescaped `$`, if both are present. + * + * @private + * @param {String} pattern Pattern to process. + * @returns {String} Pattern with edge anchors removed. + */ -require("core-js/modules/es.symbol.async-iterator"); + function deanchor(pattern) { + // Allow any number of empty noncapturing groups before/after anchors, because regexes + // built/generated by XRegExp sometimes include them + var leadingAnchor = /^(?:\(\?:\))*\^/; + var trailingAnchor = /\$(?:\(\?:\))*$/; -require("core-js/modules/es.symbol.has-instance"); + if (leadingAnchor.test(pattern) && trailingAnchor.test(pattern) && // Ensure that the trailing `$` isn't escaped + trailingAnchor.test(pattern.replace(/\\[\s\S]/g, ''))) { + return pattern.replace(leadingAnchor, '').replace(trailingAnchor, ''); + } -require("core-js/modules/es.symbol.is-concat-spreadable"); + return pattern; + } + /** + * Converts the provided value to an XRegExp. Native RegExp flags are not preserved. + * + * @private + * @param {String|RegExp} value Value to convert. + * @param {Boolean} [addFlagX] Whether to apply the `x` flag in cases when `value` is not + * already a regex generated by XRegExp + * @returns {RegExp} XRegExp object with XRegExp syntax applied. + */ -require("core-js/modules/es.symbol.iterator"); -require("core-js/modules/es.symbol.match"); + function asXRegExp(value, addFlagX) { + var flags = addFlagX ? 'x' : ''; + return XRegExp.isRegExp(value) ? value[REGEX_DATA] && value[REGEX_DATA].captureNames ? // Don't recompile, to preserve capture names + value : // Recompile as XRegExp + XRegExp(value.source, flags) : // Compile string as XRegExp + XRegExp(value, flags); + } -require("core-js/modules/es.symbol.replace"); + function interpolate(substitution) { + return substitution instanceof RegExp ? substitution : XRegExp.escape(substitution); + } -require("core-js/modules/es.symbol.search"); + function reduceToSubpatternsObject(subpatterns, interpolated, subpatternIndex) { + subpatterns["subpattern".concat(subpatternIndex)] = interpolated; + return subpatterns; + } -require("core-js/modules/es.symbol.species"); + function embedSubpatternAfter(raw, subpatternIndex, rawLiterals) { + var hasSubpattern = subpatternIndex < rawLiterals.length - 1; + return raw + (hasSubpattern ? "{{subpattern".concat(subpatternIndex, "}}") : ''); + } + /** + * Provides tagged template literals that create regexes with XRegExp syntax and flags. The + * provided pattern is handled as a raw string, so backslashes don't need to be escaped. + * + * Interpolation of strings and regexes shares the features of `XRegExp.build`. Interpolated + * patterns are treated as atomic units when quantified, interpolated strings have their special + * characters escaped, a leading `^` and trailing unescaped `$` are stripped from interpolated + * regexes if both are present, and any backreferences within an interpolated regex are + * rewritten to work within the overall pattern. + * + * @memberOf XRegExp + * @param {String} [flags] Any combination of XRegExp flags. + * @returns {Function} Handler for template literals that construct regexes with XRegExp syntax. + * @example + * + * const h12 = /1[0-2]|0?[1-9]/; + * const h24 = /2[0-3]|[01][0-9]/; + * const hours = XRegExp.tag('x')`${h12} : | ${h24}`; + * const minutes = /^[0-5][0-9]$/; + * // Note that explicitly naming the 'minutes' group is required for named backreferences + * const time = XRegExp.tag('x')`^ ${hours} (?${minutes}) $`; + * time.test('10:59'); // -> true + * XRegExp.exec('10:59', time).minutes; // -> '59' + */ -require("core-js/modules/es.symbol.split"); -require("core-js/modules/es.symbol.to-primitive"); + XRegExp.tag = function (flags) { + return function (literals) { + for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + substitutions[_key - 1] = arguments[_key]; + } -require("core-js/modules/es.symbol.to-string-tag"); + var subpatterns = substitutions.map(interpolate).reduce(reduceToSubpatternsObject, {}); + var pattern = literals.raw.map(embedSubpatternAfter).join(''); + return XRegExp.build(pattern, subpatterns, flags); + }; + }; + /** + * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in + * the outer pattern and provided subpatterns are automatically renumbered to work correctly. + * Native flags used by provided subpatterns are ignored in favor of the `flags` argument. + * + * @memberOf XRegExp + * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows + * `({{name}})` as shorthand for `(?{{name}})`. Patterns cannot be embedded within + * character classes. + * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A + * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present. + * @param {String} [flags] Any combination of XRegExp flags. + * @returns {RegExp} Regex with interpolated subpatterns. + * @example + * + * const time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { + * hours: XRegExp.build('{{h12}} : | {{h24}}', { + * h12: /1[0-2]|0?[1-9]/, + * h24: /2[0-3]|[01][0-9]/ + * }, 'x'), + * minutes: /^[0-5][0-9]$/ + * }); + * time.test('10:59'); // -> true + * XRegExp.exec('10:59', time).minutes; // -> '59' + */ -require("core-js/modules/es.symbol.unscopables"); -require("core-js/modules/es.array.concat"); + XRegExp.build = function (pattern, subs, flags) { + flags = flags || ''; // Used with `asXRegExp` calls for `pattern` and subpatterns in `subs`, to work around how + // some browsers convert `RegExp('\n')` to a regex that contains the literal characters `\` + // and `n`. See more details at . -require("core-js/modules/es.array.copy-within"); + var addFlagX = flags.indexOf('x') !== -1; + var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern); // Add flags within a leading mode modifier to the overall pattern's flags -require("core-js/modules/es.array.every"); + if (inlineFlags) { + flags = XRegExp._clipDuplicates(flags + inlineFlags[1]); + } -require("core-js/modules/es.array.fill"); + var data = {}; -require("core-js/modules/es.array.filter"); + for (var p in subs) { + if (subs.hasOwnProperty(p)) { + // Passing to XRegExp enables extended syntax and ensures independent validity, + // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For + // subpatterns provided as native regexes, it dies on octals and adds the property + // used to hold extended regex instance data, for simplicity. + var sub = asXRegExp(subs[p], addFlagX); + data[p] = { + // Deanchoring allows embedding independently useful anchored regexes. If you + // really need to keep your anchors, double them (i.e., `^^...$$`). + pattern: deanchor(sub.source), + names: sub[REGEX_DATA].captureNames || [] + }; + } + } // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid; + // helps keep this simple. Named captures will be put back. -require("core-js/modules/es.array.find"); -require("core-js/modules/es.array.find-index"); + var patternAsRegex = asXRegExp(pattern, addFlagX); // 'Caps' is short for 'captures' -require("core-js/modules/es.array.flat"); + var numCaps = 0; + var numPriorCaps; + var numOuterCaps = 0; + var outerCapsMap = [0]; + var outerCapNames = patternAsRegex[REGEX_DATA].captureNames || []; + var output = patternAsRegex.source.replace(parts, function ($0, $1, $2, $3, $4) { + var subName = $1 || $2; + var capName; + var intro; + var localCapIndex; // Named subpattern -require("core-js/modules/es.array.flat-map"); + if (subName) { + if (!data.hasOwnProperty(subName)) { + throw new ReferenceError("Undefined property ".concat($0)); + } // Named subpattern was wrapped in a capturing group -require("core-js/modules/es.array.for-each"); -require("core-js/modules/es.array.from"); + if ($1) { + capName = outerCapNames[numOuterCaps]; + outerCapsMap[++numOuterCaps] = ++numCaps; // If it's a named group, preserve the name. Otherwise, use the subpattern name + // as the capture name -require("core-js/modules/es.array.includes"); + intro = "(?<".concat(capName || subName, ">"); + } else { + intro = '(?:'; + } -require("core-js/modules/es.array.index-of"); + numPriorCaps = numCaps; + var rewrittenSubpattern = data[subName].pattern.replace(subParts, function (match, paren, backref) { + // Capturing group + if (paren) { + capName = data[subName].names[numCaps - numPriorCaps]; + ++numCaps; // If the current capture has a name, preserve the name -require("core-js/modules/es.array.iterator"); + if (capName) { + return "(?<".concat(capName, ">"); + } // Backreference -require("core-js/modules/es.array.join"); + } else if (backref) { + localCapIndex = +backref - 1; // Rewrite the backreference -require("core-js/modules/es.array.last-index-of"); + return data[subName].names[localCapIndex] ? // Need to preserve the backreference name in case using flag `n` + "\\k<".concat(data[subName].names[localCapIndex], ">") : "\\".concat(+backref + numPriorCaps); + } -require("core-js/modules/es.array.map"); + return match; + }); + return "".concat(intro).concat(rewrittenSubpattern, ")"); + } // Capturing group -require("core-js/modules/es.array.of"); -require("core-js/modules/es.array.reduce"); + if ($3) { + capName = outerCapNames[numOuterCaps]; + outerCapsMap[++numOuterCaps] = ++numCaps; // If the current capture has a name, preserve the name -require("core-js/modules/es.array.reduce-right"); + if (capName) { + return "(?<".concat(capName, ">"); + } // Backreference -require("core-js/modules/es.array.reverse"); + } else if ($4) { + localCapIndex = +$4 - 1; // Rewrite the backreference -require("core-js/modules/es.array.slice"); + return outerCapNames[localCapIndex] ? // Need to preserve the backreference name in case using flag `n` + "\\k<".concat(outerCapNames[localCapIndex], ">") : "\\".concat(outerCapsMap[+$4]); + } -require("core-js/modules/es.array.some"); + return $0; + }); + return XRegExp(output, flags); + }; +}; -require("core-js/modules/es.array.sort"); +exports.default = _default; +module.exports = exports["default"]; +},{}],638:[function(require,module,exports){ +"use strict"; -require("core-js/modules/es.array.species"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; -require("core-js/modules/es.array.splice"); +/*! + * XRegExp.matchRecursive 4.2.4 + * + * Steven Levithan (c) 2009-present MIT License + */ +var _default = function _default(XRegExp) { + /** + * Returns a match detail object composed of the provided values. + * + * @private + */ + function row(name, value, start, end) { + return { + name: name, + value: value, + start: start, + end: end + }; + } + /** + * Returns an array of match strings between outermost left and right delimiters, or an array of + * objects with detailed match parts and position data. An error is thrown if delimiters are + * unbalanced within the data. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {String} left Left delimiter as an XRegExp pattern. + * @param {String} right Right delimiter as an XRegExp pattern. + * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters. + * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options. + * @returns {Array} Array of matches, or an empty array. + * @example + * + * // Basic usage + * let str = '(t((e))s)t()(ing)'; + * XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); + * // -> ['t((e))s', '', 'ing'] + * + * // Extended information mode with valueNames + * str = 'Here is
an
example'; + * XRegExp.matchRecursive(str, '', '', 'gi', { + * valueNames: ['between', 'left', 'match', 'right'] + * }); + * // -> [ + * // {name: 'between', value: 'Here is ', start: 0, end: 8}, + * // {name: 'left', value: '
', start: 8, end: 13}, + * // {name: 'match', value: '
an
', start: 13, end: 27}, + * // {name: 'right', value: '
', start: 27, end: 33}, + * // {name: 'between', value: ' example', start: 33, end: 41} + * // ] + * + * // Omitting unneeded parts with null valueNames, and using escapeChar + * str = '...{1}.\\{{function(x,y){return {y:x}}}'; + * XRegExp.matchRecursive(str, '{', '}', 'g', { + * valueNames: ['literal', null, 'value', null], + * escapeChar: '\\' + * }); + * // -> [ + * // {name: 'literal', value: '...', start: 0, end: 3}, + * // {name: 'value', value: '1', start: 4, end: 5}, + * // {name: 'literal', value: '.\\{', start: 6, end: 9}, + * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37} + * // ] + * + * // Sticky mode via flag y + * str = '<1><<<2>>><3>4<5>'; + * XRegExp.matchRecursive(str, '<', '>', 'gy'); + * // -> ['1', '<<2>>', '3'] + */ -require("core-js/modules/es.array.unscopables.flat"); -require("core-js/modules/es.array.unscopables.flat-map"); + XRegExp.matchRecursive = function (str, left, right, flags, options) { + flags = flags || ''; + options = options || {}; + var global = flags.indexOf('g') !== -1; + var sticky = flags.indexOf('y') !== -1; // Flag `y` is controlled internally + + var basicFlags = flags.replace(/y/g, ''); + var _options = options, + escapeChar = _options.escapeChar; + var vN = options.valueNames; + var output = []; + var openTokens = 0; + var delimStart = 0; + var delimEnd = 0; + var lastOuterEnd = 0; + var outerStart; + var innerStart; + var leftMatch; + var rightMatch; + var esc; + left = XRegExp(left, basicFlags); + right = XRegExp(right, basicFlags); + + if (escapeChar) { + if (escapeChar.length > 1) { + throw new Error('Cannot use more than one escape character'); + } + + escapeChar = XRegExp.escape(escapeChar); // Example of concatenated `esc` regex: + // `escapeChar`: '%' + // `left`: '<' + // `right`: '>' + // Regex is: /(?:%[\S\s]|(?:(?!<|>)[^%])+)+/ + + esc = new RegExp("(?:".concat(escapeChar, "[\\S\\s]|(?:(?!").concat( // Using `XRegExp.union` safely rewrites backreferences in `left` and `right`. + // Intentionally not passing `basicFlags` to `XRegExp.union` since any syntax + // transformation resulting from those flags was already applied to `left` and + // `right` when they were passed through the XRegExp constructor above. + XRegExp.union([left, right], '', { + conjunction: 'or' + }).source, ")[^").concat(escapeChar, "])+)+"), // Flags `gy` not needed here + flags.replace(/[^imu]+/g, '')); + } -require("core-js/modules/es.array-buffer.constructor"); + while (true) { + // If using an escape character, advance to the delimiter's next starting position, + // skipping any escaped characters in between + if (escapeChar) { + delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length; + } -require("core-js/modules/es.array-buffer.is-view"); + leftMatch = XRegExp.exec(str, left, delimEnd); + rightMatch = XRegExp.exec(str, right, delimEnd); // Keep the leftmost match only -require("core-js/modules/es.array-buffer.slice"); + if (leftMatch && rightMatch) { + if (leftMatch.index <= rightMatch.index) { + rightMatch = null; + } else { + leftMatch = null; + } + } // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens): + // LM | RM | OT | Result + // 1 | 0 | 1 | loop + // 1 | 0 | 0 | loop + // 0 | 1 | 1 | loop + // 0 | 1 | 0 | throw + // 0 | 0 | 1 | throw + // 0 | 0 | 0 | break + // The paths above don't include the sticky mode special case. The loop ends after the + // first completed match if not `global`. + + + if (leftMatch || rightMatch) { + delimStart = (leftMatch || rightMatch).index; + delimEnd = delimStart + (leftMatch || rightMatch)[0].length; + } else if (!openTokens) { + break; + } -require("core-js/modules/es.data-view"); + if (sticky && !openTokens && delimStart > lastOuterEnd) { + break; + } -require("core-js/modules/es.date.to-iso-string"); + if (leftMatch) { + if (!openTokens) { + outerStart = delimStart; + innerStart = delimEnd; + } -require("core-js/modules/es.date.to-json"); + ++openTokens; + } else if (rightMatch && openTokens) { + if (! --openTokens) { + if (vN) { + if (vN[0] && outerStart > lastOuterEnd) { + output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart)); + } -require("core-js/modules/es.date.to-primitive"); + if (vN[1]) { + output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart)); + } -require("core-js/modules/es.date.to-string"); + if (vN[2]) { + output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart)); + } -require("core-js/modules/es.function.has-instance"); + if (vN[3]) { + output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd)); + } + } else { + output.push(str.slice(innerStart, delimStart)); + } -require("core-js/modules/es.function.name"); + lastOuterEnd = delimEnd; -require("core-js/modules/es.json.to-string-tag"); + if (!global) { + break; + } + } + } else { + throw new Error('Unbalanced delimiter found in string'); + } // If the delimiter matched an empty string, avoid an infinite loop -require("core-js/modules/es.map"); -require("core-js/modules/es.math.acosh"); + if (delimStart === delimEnd) { + ++delimEnd; + } + } -require("core-js/modules/es.math.asinh"); + if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) { + output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length)); + } -require("core-js/modules/es.math.atanh"); + return output; + }; +}; -require("core-js/modules/es.math.cbrt"); +exports.default = _default; +module.exports = exports["default"]; +},{}],639:[function(require,module,exports){ +"use strict"; -require("core-js/modules/es.math.clz32"); +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); -require("core-js/modules/es.math.cosh"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; -require("core-js/modules/es.math.expm1"); +var _getIterator2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/get-iterator")); -require("core-js/modules/es.math.fround"); +/*! + * XRegExp Unicode Base 4.2.4 + * + * Steven Levithan (c) 2008-present MIT License + */ +var _default = function _default(XRegExp) { + /** + * Adds base support for Unicode matching: + * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or + * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the + * braces for token names that are a single letter (e.g. `\pL` or `PL`). + * - Adds flag A (astral), which enables 21-bit Unicode support. + * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data. + * + * Unicode Base relies on externally provided Unicode character data. Official addons are + * available to provide data for Unicode categories, scripts, blocks, and properties. + * + * @requires XRegExp + */ + // ==--------------------------== + // Private stuff + // ==--------------------------== + // Storage for Unicode data + var unicode = {}; // Reuse utils -require("core-js/modules/es.math.hypot"); + var dec = XRegExp._dec; + var hex = XRegExp._hex; + var pad4 = XRegExp._pad4; // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed -require("core-js/modules/es.math.imul"); + function normalize(name) { + return name.replace(/[- _]+/g, '').toLowerCase(); + } // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal -require("core-js/modules/es.math.log10"); -require("core-js/modules/es.math.log1p"); + function charCode(chr) { + var esc = /^\\[xu](.+)/.exec(chr); + return esc ? dec(esc[1]) : chr.charCodeAt(chr[0] === '\\' ? 1 : 0); + } // Inverts a list of ordered BMP characters and ranges -require("core-js/modules/es.math.log2"); -require("core-js/modules/es.math.sign"); + function invertBmp(range) { + var output = ''; + var lastEnd = -1; + XRegExp.forEach(range, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function (m) { + var start = charCode(m[1]); -require("core-js/modules/es.math.sinh"); + if (start > lastEnd + 1) { + output += "\\u".concat(pad4(hex(lastEnd + 1))); -require("core-js/modules/es.math.tanh"); + if (start > lastEnd + 2) { + output += "-\\u".concat(pad4(hex(start - 1))); + } + } -require("core-js/modules/es.math.to-string-tag"); + lastEnd = charCode(m[2] || m[1]); + }); -require("core-js/modules/es.math.trunc"); + if (lastEnd < 0xFFFF) { + output += "\\u".concat(pad4(hex(lastEnd + 1))); -require("core-js/modules/es.number.constructor"); + if (lastEnd < 0xFFFE) { + output += '-\\uFFFF'; + } + } -require("core-js/modules/es.number.epsilon"); + return output; + } // Generates an inverted BMP range on first use + + + function cacheInvertedBmp(slug) { + var prop = 'b!'; + return unicode[slug][prop] || (unicode[slug][prop] = invertBmp(unicode[slug].bmp)); + } // Combines and optionally negates BMP and astral data + + + function buildAstral(slug, isNegated) { + var item = unicode[slug]; + var combined = ''; + + if (item.bmp && !item.isBmpLast) { + combined = "[".concat(item.bmp, "]").concat(item.astral ? '|' : ''); + } + + if (item.astral) { + combined += item.astral; + } + + if (item.isBmpLast && item.bmp) { + combined += "".concat(item.astral ? '|' : '', "[").concat(item.bmp, "]"); + } // Astral Unicode tokens always match a code point, never a code unit + + + return isNegated ? "(?:(?!".concat(combined, ")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))") : "(?:".concat(combined, ")"); + } // Builds a complete astral pattern on first use + + + function cacheAstral(slug, isNegated) { + var prop = isNegated ? 'a!' : 'a='; + return unicode[slug][prop] || (unicode[slug][prop] = buildAstral(slug, isNegated)); + } // ==--------------------------== + // Core functionality + // ==--------------------------== + + /* + * Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`. + */ + + + XRegExp.addToken( // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}` + /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, function (match, scope, flags) { + var ERR_DOUBLE_NEG = 'Invalid double negation '; + var ERR_UNKNOWN_NAME = 'Unknown Unicode token '; + var ERR_UNKNOWN_REF = 'Unicode token missing data '; + var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token '; + var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes'; // Negated via \P{..} or \p{^..} + + var isNegated = match[1] === 'P' || !!match[2]; // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A + + var isAstralMode = flags.indexOf('A') !== -1; // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}` + + var slug = normalize(match[4] || match[3]); // Token data object + + var item = unicode[slug]; + + if (match[1] === 'P' && match[2]) { + throw new SyntaxError(ERR_DOUBLE_NEG + match[0]); + } + + if (!unicode.hasOwnProperty(slug)) { + throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]); + } // Switch to the negated form of the referenced Unicode token + + + if (item.inverseOf) { + slug = normalize(item.inverseOf); + + if (!unicode.hasOwnProperty(slug)) { + throw new ReferenceError("".concat(ERR_UNKNOWN_REF + match[0], " -> ").concat(item.inverseOf)); + } + + item = unicode[slug]; + isNegated = !isNegated; + } + + if (!(item.bmp || isAstralMode)) { + throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]); + } + + if (isAstralMode) { + if (scope === 'class') { + throw new SyntaxError(ERR_ASTRAL_IN_CLASS); + } + + return cacheAstral(slug, isNegated); + } + + return scope === 'class' ? isNegated ? cacheInvertedBmp(slug) : item.bmp : "".concat((isNegated ? '[^' : '[') + item.bmp, "]"); + }, { + scope: 'all', + optionalFlags: 'A', + leadChar: '\\' + }); + /** + * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`. + * + * @memberOf XRegExp + * @param {Array} data Objects with named character ranges. Each object may have properties + * `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are + * optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If + * `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent, + * the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are + * provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and + * `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan + * high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and + * `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape + * sequences, with hyphens to create ranges. Any regex metacharacters in the data should be + * escaped, apart from range-creating hyphens. The `astral` data can additionally use + * character classes and alternation, and should use surrogate pairs to represent astral code + * points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is + * defined as the exact inverse of another token. + * @example + * + * // Basic use + * XRegExp.addUnicodeData([{ + * name: 'XDigit', + * alias: 'Hexadecimal', + * bmp: '0-9A-Fa-f' + * }]); + * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true + */ + + XRegExp.addUnicodeData = function (data) { + var ERR_NO_NAME = 'Unicode token requires name'; + var ERR_NO_DATA = 'Unicode token has no character data '; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator2.default)(data), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var item = _step.value; + + if (!item.name) { + throw new Error(ERR_NO_NAME); + } + + if (!(item.inverseOf || item.bmp || item.astral)) { + throw new Error(ERR_NO_DATA + item.name); + } + + unicode[normalize(item.name)] = item; + + if (item.alias) { + unicode[normalize(item.alias)] = item; + } + } // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and + // flags might now produce different results + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + XRegExp.cache.flush('patterns'); + }; + /** + * @ignore + * + * Return a reference to the internal Unicode definition structure for the given Unicode + * Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex + * constructs. + * + * @memberOf XRegExp + * @param {String} name Name by which the Unicode Property may be recognized (case-insensitive), + * e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode + * Properties and Property Aliases. + * @returns {Object} Reference to definition structure when the name matches a Unicode Property. + * + * @note + * For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories. + * + * @note + * This method is *not* part of the officially documented API and may change or be removed in + * the future. It is meant for userland code that wishes to reuse the (large) internal Unicode + * structures set up by XRegExp. + */ + + + XRegExp._getUnicodeProperty = function (name) { + var slug = normalize(name); + return unicode[slug]; + }; +}; + +exports.default = _default; +module.exports = exports["default"]; +},{"@babel/runtime-corejs2/core-js/get-iterator":2,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],640:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _blocks = _interopRequireDefault(require("../../tools/output/blocks")); + +/*! + * XRegExp Unicode Blocks 4.2.4 + * + * Steven Levithan (c) 2010-present MIT License + * Unicode data by Mathias Bynens + */ +var _default = function _default(XRegExp) { + /** + * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g., + * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and + * underscores are ignored. + * + * Uses Unicode 11.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { + throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks'); + } + + XRegExp.addUnicodeData(_blocks.default); +}; + +exports.default = _default; +module.exports = exports["default"]; +},{"../../tools/output/blocks":646,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],641:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _categories = _interopRequireDefault(require("../../tools/output/categories")); + +/*! + * XRegExp Unicode Categories 4.2.4 + * + * Steven Levithan (c) 2010-present MIT License + * Unicode data by Mathias Bynens + */ +var _default = function _default(XRegExp) { + /** + * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See + * category descriptions in UAX #44 . Token + * names are case insensitive, and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 11.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { + throw new ReferenceError('Unicode Base must be loaded before Unicode Categories'); + } + + XRegExp.addUnicodeData(_categories.default); +}; + +exports.default = _default; +module.exports = exports["default"]; +},{"../../tools/output/categories":647,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],642:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _properties = _interopRequireDefault(require("../../tools/output/properties")); + +/*! + * XRegExp Unicode Properties 4.2.4 + * + * Steven Levithan (c) 2012-present MIT License + * Unicode data by Mathias Bynens + */ +var _default = function _default(XRegExp) { + /** + * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See + * . Following are definitions of these properties from + * UAX #44 : + * + * - Alphabetic + * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm + + * Lo + Nl + Other_Alphabetic. + * + * - Default_Ignorable_Code_Point + * For programmatic determination of default ignorable code points. New characters that should + * be ignored in rendering (unless explicitly supported) will be assigned in these ranges, + * permitting programs to correctly handle the default rendering of such characters when not + * otherwise supported. + * + * - Lowercase + * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase. + * + * - Noncharacter_Code_Point + * Code points permanently reserved for internal use. + * + * - Uppercase + * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase. + * + * - White_Space + * Spaces, separator characters and other control characters which should be treated by + * programming languages as "white space" for the purpose of parsing elements. + * + * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS + * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are + * included in XRegExp's Unicode Categories and Unicode Scripts addons. + * + * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 11.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { + throw new ReferenceError('Unicode Base must be loaded before Unicode Properties'); + } + + var unicodeData = _properties.default; // Add non-generated data + + unicodeData.push({ + name: 'Assigned', + // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode + // Categories addon is required to use this property + inverseOf: 'Cn' + }); + XRegExp.addUnicodeData(unicodeData); +}; + +exports.default = _default; +module.exports = exports["default"]; +},{"../../tools/output/properties":648,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],643:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _scripts = _interopRequireDefault(require("../../tools/output/scripts")); + +/*! + * XRegExp Unicode Scripts 4.2.4 + * + * Steven Levithan (c) 2010-present MIT License + * Unicode data by Mathias Bynens + */ +var _default = function _default(XRegExp) { + /** + * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive, + * and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 11.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { + throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts'); + } + + XRegExp.addUnicodeData(_scripts.default); +}; + +exports.default = _default; +module.exports = exports["default"]; +},{"../../tools/output/scripts":649,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],644:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _xregexp = _interopRequireDefault(require("./xregexp")); + +var _build = _interopRequireDefault(require("./addons/build")); + +var _matchrecursive = _interopRequireDefault(require("./addons/matchrecursive")); + +var _unicodeBase = _interopRequireDefault(require("./addons/unicode-base")); + +var _unicodeBlocks = _interopRequireDefault(require("./addons/unicode-blocks")); + +var _unicodeCategories = _interopRequireDefault(require("./addons/unicode-categories")); + +var _unicodeProperties = _interopRequireDefault(require("./addons/unicode-properties")); + +var _unicodeScripts = _interopRequireDefault(require("./addons/unicode-scripts")); + +(0, _build.default)(_xregexp.default); +(0, _matchrecursive.default)(_xregexp.default); +(0, _unicodeBase.default)(_xregexp.default); +(0, _unicodeBlocks.default)(_xregexp.default); +(0, _unicodeCategories.default)(_xregexp.default); +(0, _unicodeProperties.default)(_xregexp.default); +(0, _unicodeScripts.default)(_xregexp.default); +var _default = _xregexp.default; +exports.default = _default; +module.exports = exports["default"]; +},{"./addons/build":637,"./addons/matchrecursive":638,"./addons/unicode-base":639,"./addons/unicode-blocks":640,"./addons/unicode-categories":641,"./addons/unicode-properties":642,"./addons/unicode-scripts":643,"./xregexp":645,"@babel/runtime-corejs2/helpers/interopRequireDefault":7}],645:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _create = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/create")); + +var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray")); + +var _getIterator2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/get-iterator")); + +var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/parse-int")); + +/*! + * XRegExp 4.2.4 + * + * Steven Levithan (c) 2007-present MIT License + */ + +/** + * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and + * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to + * make your client-side grepping simpler and more powerful, while freeing you from related + * cross-browser inconsistencies. + */ +// ==--------------------------== +// Private stuff +// ==--------------------------== +// Property name used for extended regex instance data +var REGEX_DATA = 'xregexp'; // Optional features that can be installed and uninstalled + +var features = { + astral: false, + namespacing: false +}; // Native methods to use and restore ('native' is an ES3 reserved keyword) + +var nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split +}; // Storage for fixed/extended native methods + +var fixed = {}; // Storage for regexes cached by `XRegExp.cache` + +var regexCache = {}; // Storage for pattern details cached by the `XRegExp` constructor + +var patternCache = {}; // Storage for regex syntax tokens added internally or by `XRegExp.addToken` + +var tokens = []; // Token scopes + +var defaultScope = 'default'; +var classScope = 'class'; // Regexes that match native regex syntax, including octals + +var nativeTokens = { + // Any native multicharacter token in default scope, or any single character + 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, + // Any native multicharacter token in character class scope, or any single character + 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/ +}; // Any backreference or dollar-prefixed character in replacement strings + +var replacementToken = /\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g; // Check for correct `exec` handling of nonparticipating capturing groups + +var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; // Check for ES6 `flags` prop support + +var hasFlagsProp = /x/.flags !== undefined; // Shortcut to `Object.prototype.toString` + +var _ref = {}, + toString = _ref.toString; + +function hasNativeFlag(flag) { + // Can't check based on the presence of properties/getters since browsers might support such + // properties even when they don't support the corresponding flag in regex construction (tested + // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u` + // throws an error) + var isSupported = true; + + try { + // Can't use regex literals for testing even in a `try` because regex literals with + // unsupported flags cause a compilation error in IE + new RegExp('', flag); + } catch (exception) { + isSupported = false; + } + + return isSupported; +} // Check for ES6 `u` flag support + + +var hasNativeU = hasNativeFlag('u'); // Check for ES6 `y` flag support + +var hasNativeY = hasNativeFlag('y'); // Tracker for known flags, including addon flags + +var registeredFlags = { + g: true, + i: true, + m: true, + u: hasNativeU, + y: hasNativeY +}; +/** + * Attaches extended data and `XRegExp.prototype` properties to a regex object. + * + * @private + * @param {RegExp} regex Regex to augment. + * @param {Array} captureNames Array with capture names, or `null`. + * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A. + * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A. + * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal + * operations, and never exposed to users. For internal-only regexes, we can improve perf by + * skipping some operations like attaching `XRegExp.prototype` properties. + * @returns {RegExp} Augmented regex. + */ + +function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { + regex[REGEX_DATA] = { + captureNames: captureNames + }; + + if (isInternalOnly) { + return regex; + } // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value + + + if (regex.__proto__) { + regex.__proto__ = XRegExp.prototype; + } else { + for (var p in XRegExp.prototype) { + // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this + // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype` + // extensions exist on `regex.prototype` anyway + regex[p] = XRegExp.prototype[p]; + } + } + + regex[REGEX_DATA].source = xSource; // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order + + regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags; + return regex; +} +/** + * Removes any duplicate characters from the provided string. + * + * @private + * @param {String} str String to remove duplicate characters from. + * @returns {String} String with any duplicate characters removed. + */ + + +function clipDuplicates(str) { + return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); +} +/** + * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype` + * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing + * flags g and y while copying the regex. + * + * @private + * @param {RegExp} regex Regex to copy. + * @param {Object} [options] Options object with optional properties: + * - `addG` {Boolean} Add flag g while copying the regex. + * - `addY` {Boolean} Add flag y while copying the regex. + * - `removeG` {Boolean} Remove flag g while copying the regex. + * - `removeY` {Boolean} Remove flag y while copying the regex. + * - `isInternalOnly` {Boolean} Whether the copied regex will be used only for internal + * operations, and never exposed to users. For internal-only regexes, we can improve perf by + * skipping some operations like attaching `XRegExp.prototype` properties. + * - `source` {String} Overrides `.source`, for special cases. + * @returns {RegExp} Copy of the provided regex, possibly with modified flags. + */ + + +function copyRegex(regex, options) { + if (!XRegExp.isRegExp(regex)) { + throw new TypeError('Type RegExp expected'); + } + + var xData = regex[REGEX_DATA] || {}; + var flags = getNativeFlags(regex); + var flagsToAdd = ''; + var flagsToRemove = ''; + var xregexpSource = null; + var xregexpFlags = null; + options = options || {}; + + if (options.removeG) { + flagsToRemove += 'g'; + } + + if (options.removeY) { + flagsToRemove += 'y'; + } + + if (flagsToRemove) { + flags = nativ.replace.call(flags, new RegExp("[".concat(flagsToRemove, "]+"), 'g'), ''); + } + + if (options.addG) { + flagsToAdd += 'g'; + } + + if (options.addY) { + flagsToAdd += 'y'; + } + + if (flagsToAdd) { + flags = clipDuplicates(flags + flagsToAdd); + } + + if (!options.isInternalOnly) { + if (xData.source !== undefined) { + xregexpSource = xData.source; + } // null or undefined; don't want to add to `flags` if the previous value was null, since + // that indicates we're not tracking original precompilation flags + + + if (xData.flags != null) { + // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never + // removed for non-internal regexes, so don't need to handle it + xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags; + } + } // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid + // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and + // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the + // translation to native regex syntax + + + regex = augment(new RegExp(options.source || regex.source, flags), hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, xregexpSource, xregexpFlags, options.isInternalOnly); + return regex; +} +/** + * Converts hexadecimal to decimal. + * + * @private + * @param {String} hex + * @returns {Number} + */ + + +function dec(hex) { + return (0, _parseInt2.default)(hex, 16); +} +/** + * Returns a pattern that can be used in a native RegExp in place of an ignorable token such as an + * inline comment or whitespace with flag x. This is used directly as a token handler function + * passed to `XRegExp.addToken`. + * + * @private + * @param {String} match Match arg of `XRegExp.addToken` handler + * @param {String} scope Scope arg of `XRegExp.addToken` handler + * @param {String} flags Flags arg of `XRegExp.addToken` handler + * @returns {String} Either '' or '(?:)', depending on which is needed in the context of the match. + */ + + +function getContextualTokenSeparator(match, scope, flags) { + if ( // No need to separate tokens if at the beginning or end of a group + match.input[match.index - 1] === '(' || match.input[match.index + match[0].length] === ')' || // No need to separate tokens if before or after a `|` + match.input[match.index - 1] === '|' || match.input[match.index + match[0].length] === '|' || // No need to separate tokens if at the beginning or end of the pattern + match.index < 1 || match.index + match[0].length >= match.input.length || // No need to separate tokens if at the beginning of a noncapturing group or lookahead. + // The way this is written relies on: + // - The search regex matching only 3-char strings. + // - Although `substr` gives chars from the end of the string if given a negative index, + // the resulting substring will be too short to match. Ex: `'abcd'.substr(-1, 3) === 'd'` + nativ.test.call(/^\(\?[:=!]/, match.input.substr(match.index - 3, 3)) || // Avoid separating tokens when the following token is a quantifier + isQuantifierNext(match.input, match.index + match[0].length, flags)) { + return ''; + } // Keep tokens separated. This avoids e.g. inadvertedly changing `\1 1` or `\1(?#)1` to `\11`. + // This also ensures all tokens remain as discrete atoms, e.g. it avoids converting the syntax + // error `(? :` into `(?:`. + + + return '(?:)'; +} +/** + * Returns native `RegExp` flags used by a regex object. + * + * @private + * @param {RegExp} regex Regex to check. + * @returns {String} Native flags in use. + */ + + +function getNativeFlags(regex) { + return hasFlagsProp ? regex.flags : // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation + // with an empty string) allows this to continue working predictably when + // `XRegExp.proptotype.toString` is overridden + nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1]; +} +/** + * Determines whether a regex has extended instance data used to track capture names. + * + * @private + * @param {RegExp} regex Regex to check. + * @returns {Boolean} Whether the regex uses named capture. + */ + + +function hasNamedCapture(regex) { + return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); +} +/** + * Converts decimal to hexadecimal. + * + * @private + * @param {Number|String} dec + * @returns {String} + */ + + +function hex(dec) { + return (0, _parseInt2.default)(dec, 10).toString(16); +} +/** + * Checks whether the next nonignorable token after the specified position is a quantifier. + * + * @private + * @param {String} pattern Pattern to search within. + * @param {Number} pos Index in `pattern` to search at. + * @param {String} flags Flags used by the pattern. + * @returns {Boolean} Whether the next nonignorable token is a quantifier. + */ + + +function isQuantifierNext(pattern, pos, flags) { + var inlineCommentPattern = '\\(\\?#[^)]*\\)'; + var lineCommentPattern = '#[^#\\n]*'; + var quantifierPattern = '[?*+]|{\\d+(?:,\\d*)?}'; + return nativ.test.call(flags.indexOf('x') !== -1 ? // Ignore any leading whitespace, line comments, and inline comments + /^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : // Ignore any leading inline comments + /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, pattern.slice(pos)); +} +/** + * Determines whether a value is of the specified type, by resolving its internal [[Class]]. + * + * @private + * @param {*} value Object to check. + * @param {String} type Type to check for, in TitleCase. + * @returns {Boolean} Whether the object matches the type. + */ + + +function isType(value, type) { + return toString.call(value) === "[object ".concat(type, "]"); +} +/** + * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values. + * + * @private + * @param {String} str + * @returns {String} + */ + + +function pad4(str) { + while (str.length < 4) { + str = "0".concat(str); + } + + return str; +} +/** + * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads + * the flag preparation logic from the `XRegExp` constructor. + * + * @private + * @param {String} pattern Regex pattern, possibly with a leading mode modifier. + * @param {String} flags Any combination of flags. + * @returns {Object} Object with properties `pattern` and `flags`. + */ + + +function prepareFlags(pattern, flags) { + // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags + if (clipDuplicates(flags) !== flags) { + throw new SyntaxError("Invalid duplicate regex flag ".concat(flags)); + } // Strip and apply a leading mode modifier with any combination of flags except g or y + + + pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function ($0, $1) { + if (nativ.test.call(/[gy]/, $1)) { + throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat($0)); + } // Allow duplicate flags within the mode modifier + + + flags = clipDuplicates(flags + $1); + return ''; + }); // Throw on unknown native or nonnative flags + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator2.default)(flags), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var flag = _step.value; + + if (!registeredFlags[flag]) { + throw new SyntaxError("Unknown regex flag ".concat(flag)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return { + pattern: pattern, + flags: flags + }; +} +/** + * Prepares an options object from the given value. + * + * @private + * @param {String|Object} value Value to convert to an options object. + * @returns {Object} Options object. + */ + + +function prepareOptions(value) { + var options = {}; + + if (isType(value, 'String')) { + XRegExp.forEach(value, /[^\s,]+/, function (match) { + options[match] = true; + }); + return options; + } + + return value; +} +/** + * Registers a flag so it doesn't throw an 'unknown flag' error. + * + * @private + * @param {String} flag Single-character flag to register. + */ + + +function registerFlag(flag) { + if (!/^[\w$]$/.test(flag)) { + throw new Error('Flag must be a single character A-Za-z0-9_$'); + } + + registeredFlags[flag] = true; +} +/** + * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified + * position, until a match is found. + * + * @private + * @param {String} pattern Original pattern from which an XRegExp object is being built. + * @param {String} flags Flags being used to construct the regex. + * @param {Number} pos Position to search for tokens within `pattern`. + * @param {Number} scope Regex scope to apply: 'default' or 'class'. + * @param {Object} context Context object to use for token handler functions. + * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`. + */ + + +function runTokens(pattern, flags, pos, scope, context) { + var i = tokens.length; + var leadChar = pattern[pos]; + var result = null; + var match; + var t; // Run in reverse insertion order + + while (i--) { + t = tokens[i]; + + if (t.leadChar && t.leadChar !== leadChar || t.scope !== scope && t.scope !== 'all' || t.flag && !(flags.indexOf(t.flag) !== -1)) { + continue; + } + + match = XRegExp.exec(pattern, t.regex, pos, 'sticky'); + + if (match) { + result = { + matchLength: match[0].length, + output: t.handler.call(context, match, scope, flags), + reparse: t.reparse + }; // Finished with token tests + + break; + } + } + + return result; +} +/** + * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to + * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if + * the Unicode Base addon is not available, since flag A is registered by that addon. + * + * @private + * @param {Boolean} on `true` to enable; `false` to disable. + */ + + +function setAstral(on) { + features.astral = on; +} +/** + * Adds named capture groups to the `groups` property of match arrays. See here for details: + * https://github.com/tc39/proposal-regexp-named-groups + * + * @private + * @param {Boolean} on `true` to enable; `false` to disable. + */ + + +function setNamespacing(on) { + features.namespacing = on; +} +/** + * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow + * the ES5 abstract operation `ToObject`. + * + * @private + * @param {*} value Object to check and return. + * @returns {*} The provided object. + */ + + +function toObject(value) { + // null or undefined + if (value == null) { + throw new TypeError('Cannot convert null or undefined to object'); + } + + return value; +} // ==--------------------------== +// Constructor +// ==--------------------------== + +/** + * Creates an extended regular expression object for matching text with a pattern. Differs from a + * native regular expression in that additional syntax and flags are supported. The returned object + * is in fact a native `RegExp` and works with all native methods. + * + * @class XRegExp + * @constructor + * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy. + * @param {String} [flags] Any combination of flags. + * Native flags: + * - `g` - global + * - `i` - ignore case + * - `m` - multiline anchors + * - `u` - unicode (ES6) + * - `y` - sticky (Firefox 3+, ES6) + * Additional XRegExp flags: + * - `n` - explicit capture + * - `s` - dot matches all (aka singleline) + * - `x` - free-spacing and line comments (aka extended) + * - `A` - astral (requires the Unicode Base addon) + * Flags cannot be provided when constructing one `RegExp` from another. + * @returns {RegExp} Extended regular expression object. + * @example + * + * // With named capture and flag x + * XRegExp(`(? [0-9]{4} ) -? # year + * (? [0-9]{2} ) -? # month + * (? [0-9]{2} ) # day`, 'x'); + * + * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp) + * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and + * // have fresh `lastIndex` properties (set to zero). + * XRegExp(/regex/); + */ + + +function XRegExp(pattern, flags) { + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) { + throw new TypeError('Cannot supply flags when copying a RegExp'); + } + + return copyRegex(pattern); + } // Copy the argument behavior of `RegExp` + + + pattern = pattern === undefined ? '' : String(pattern); + flags = flags === undefined ? '' : String(flags); + + if (XRegExp.isInstalled('astral') && !(flags.indexOf('A') !== -1)) { + // This causes an error to be thrown if the Unicode Base addon is not available + flags += 'A'; + } + + if (!patternCache[pattern]) { + patternCache[pattern] = {}; + } + + if (!patternCache[pattern][flags]) { + var context = { + hasNamedCapture: false, + captureNames: [] + }; + var scope = defaultScope; + var output = ''; + var pos = 0; + var result; // Check for flag-related errors, and strip/apply flags in a leading mode modifier + + var applied = prepareFlags(pattern, flags); + var appliedPattern = applied.pattern; + var appliedFlags = applied.flags; // Use XRegExp's tokens to translate the pattern to a native regex pattern. + // `appliedPattern.length` may change on each iteration if tokens use `reparse` + + while (pos < appliedPattern.length) { + do { + // Check for custom tokens at the current position + result = runTokens(appliedPattern, appliedFlags, pos, scope, context); // If the matched token used the `reparse` option, splice its output into the + // pattern before running tokens again at the same position + + if (result && result.reparse) { + appliedPattern = appliedPattern.slice(0, pos) + result.output + appliedPattern.slice(pos + result.matchLength); + } + } while (result && result.reparse); + + if (result) { + output += result.output; + pos += result.matchLength || 1; + } else { + // Get the native token at the current position + var _XRegExp$exec = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky'), + _XRegExp$exec2 = (0, _slicedToArray2.default)(_XRegExp$exec, 1), + token = _XRegExp$exec2[0]; + + output += token; + pos += token.length; + + if (token === '[' && scope === defaultScope) { + scope = classScope; + } else if (token === ']' && scope === classScope) { + scope = defaultScope; + } + } + } + + patternCache[pattern][flags] = { + // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty + // groups are sometimes inserted during regex transpilation in order to keep tokens + // separated. However, more than one empty group in a row is never needed. + pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'), + // Strip all but native flags + flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''), + // `context.captureNames` has an item for each capturing group, even if unnamed + captures: context.hasNamedCapture ? context.captureNames : null + }; + } + + var generated = patternCache[pattern][flags]; + return augment(new RegExp(generated.pattern, generated.flags), generated.captures, pattern, flags); +} // Add `RegExp.prototype` to the prototype chain + + +XRegExp.prototype = /(?:)/; // ==--------------------------== +// Public properties +// ==--------------------------== + +/** + * The XRegExp version number as a string containing three dot-separated parts. For example, + * '2.0.0-beta-3'. + * + * @static + * @memberOf XRegExp + * @type String + */ + +XRegExp.version = '4.2.4'; // ==--------------------------== +// Public methods +// ==--------------------------== +// Intentionally undocumented; used in tests and addons + +XRegExp._clipDuplicates = clipDuplicates; +XRegExp._hasNativeFlag = hasNativeFlag; +XRegExp._dec = dec; +XRegExp._hex = hex; +XRegExp._pad4 = pad4; +/** + * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to + * create XRegExp addons. If more than one token can match the same string, the last added wins. + * + * @memberOf XRegExp + * @param {RegExp} regex Regex object that matches the new token. + * @param {Function} handler Function that returns a new pattern string (using native regex syntax) + * to replace the matched token within all future XRegExp regexes. Has access to persistent + * properties of the regex being built, through `this`. Invoked with three arguments: + * - The match array, with named backreference properties. + * - The regex scope where the match was found: 'default' or 'class'. + * - The flags used by the regex, including any flags in a leading mode modifier. + * The handler function becomes part of the XRegExp construction process, so be careful not to + * construct XRegExps within the function or you will trigger infinite recursion. + * @param {Object} [options] Options object with optional properties: + * - `scope` {String} Scope where the token applies: 'default', 'class', or 'all'. + * - `flag` {String} Single-character flag that triggers the token. This also registers the + * flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used. + * - `optionalFlags` {String} Any custom flags checked for within the token `handler` that are + * not required to trigger the token. This registers the flags, to prevent XRegExp from + * throwing an 'unknown flag' error when any of the flags are used. + * - `reparse` {Boolean} Whether the `handler` function's output should not be treated as + * final, and instead be reparseable by other tokens (including the current token). Allows + * token chaining or deferring. + * - `leadChar` {String} Single character that occurs at the beginning of any successful match + * of the token (not always applicable). This doesn't change the behavior of the token unless + * you provide an erroneous value. However, providing it can increase the token's performance + * since the token can be skipped at any positions where this character doesn't appear. + * @example + * + * // Basic usage: Add \a for the ALERT control code + * XRegExp.addToken( + * /\\a/, + * () => '\\x07', + * {scope: 'all'} + * ); + * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true + * + * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers. + * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of + * // character classes only) + * XRegExp.addToken( + * /([?*+]|{\d+(?:,\d*)?})(\??)/, + * (match) => `${match[1]}${match[2] ? '' : '?'}`, + * {flag: 'U'} + * ); + * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a' + * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa' + */ + +XRegExp.addToken = function (regex, handler, options) { + options = options || {}; + var _options = options, + optionalFlags = _options.optionalFlags; + + if (options.flag) { + registerFlag(options.flag); + } + + if (optionalFlags) { + optionalFlags = nativ.split.call(optionalFlags, ''); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = (0, _getIterator2.default)(optionalFlags), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var flag = _step2.value; + registerFlag(flag); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } // Add to the private list of syntax tokens + + + tokens.push({ + regex: copyRegex(regex, { + addG: true, + addY: hasNativeY, + isInternalOnly: true + }), + handler: handler, + scope: options.scope || defaultScope, + flag: options.flag, + reparse: options.reparse, + leadChar: options.leadChar + }); // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags + // might now produce different results + + XRegExp.cache.flush('patterns'); +}; +/** + * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with + * the same pattern and flag combination, the cached copy of the regex is returned. + * + * @memberOf XRegExp + * @param {String} pattern Regex pattern string. + * @param {String} [flags] Any combination of XRegExp flags. + * @returns {RegExp} Cached XRegExp object. + * @example + * + * while (match = XRegExp.cache('.', 'gs').exec(str)) { + * // The regex is compiled once only + * } + */ + + +XRegExp.cache = function (pattern, flags) { + if (!regexCache[pattern]) { + regexCache[pattern] = {}; + } + + return regexCache[pattern][flags] || (regexCache[pattern][flags] = XRegExp(pattern, flags)); +}; // Intentionally undocumented; used in tests + + +XRegExp.cache.flush = function (cacheName) { + if (cacheName === 'patterns') { + // Flush the pattern cache used by the `XRegExp` constructor + patternCache = {}; + } else { + // Flush the regex cache populated by `XRegExp.cache` + regexCache = {}; + } +}; +/** + * Escapes any regular expression metacharacters, for use when matching literal strings. The result + * can safely be used at any point within a regex that uses any flags. + * + * @memberOf XRegExp + * @param {String} str String to escape. + * @returns {String} String with regex metacharacters escaped. + * @example + * + * XRegExp.escape('Escaped? <.>'); + * // -> 'Escaped\?\ <\.>' + */ + + +XRegExp.escape = function (str) { + return nativ.replace.call(toObject(str), /[-\[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +}; +/** + * Executes a regex search in a specified string. Returns a match array or `null`. If the provided + * regex uses named capture, named backreference properties are included on the match array. + * Optional `pos` and `sticky` arguments specify the search start position, and whether the match + * must start at the specified position only. The `lastIndex` property of the provided regex is not + * used, but is updated for compatibility. Also fixes browser bugs compared to the native + * `RegExp.prototype.exec` and can be used reliably cross-browser. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {RegExp} regex Regex to search with. + * @param {Number} [pos=0] Zero-based index at which to start the search. + * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position + * only. The string `'sticky'` is accepted as an alternative to `true`. + * @returns {Array} Match array with named backreference properties, or `null`. + * @example + * + * // Basic use, with named backreference + * let match = XRegExp.exec('U+2620', XRegExp('U\\+(?[0-9A-F]{4})')); + * match.hex; // -> '2620' + * + * // With pos and sticky, in a loop + * let pos = 2, result = [], match; + * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) { + * result.push(match[1]); + * pos = match.index + match[0].length; + * } + * // result -> ['2', '3', '4'] + */ + + +XRegExp.exec = function (str, regex, pos, sticky) { + var cacheKey = 'g'; + var addY = false; + var fakeY = false; + var match; + addY = hasNativeY && !!(sticky || regex.sticky && sticky !== false); + + if (addY) { + cacheKey += 'y'; + } else if (sticky) { + // Simulate sticky matching by appending an empty capture to the original regex. The + // resulting regex will succeed no matter what at the current index (set with `lastIndex`), + // and will not search the rest of the subject string. We'll know that the original regex + // has failed if that last capture is `''` rather than `undefined` (i.e., if that last + // capture participated in the match). + fakeY = true; + cacheKey += 'FakeY'; + } + + regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.match`/`replace` + + var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, { + addG: true, + addY: addY, + source: fakeY ? "".concat(regex.source, "|()") : undefined, + removeY: sticky === false, + isInternalOnly: true + })); + pos = pos || 0; + r2.lastIndex = pos; // Fixed `exec` required for `lastIndex` fix, named backreferences, etc. + + match = fixed.exec.call(r2, str); // Get rid of the capture added by the pseudo-sticky matcher if needed. An empty string means + // the original regexp failed (see above). + + if (fakeY && match && match.pop() === '') { + match = null; + } + + if (regex.global) { + regex.lastIndex = match ? r2.lastIndex : 0; + } + + return match; +}; +/** + * Executes a provided function once per regex match. Searches always start at the beginning of the + * string and continue until the end, regardless of the state of the regex's `global` property and + * initial `lastIndex`. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {RegExp} regex Regex to search with. + * @param {Function} callback Function to execute for each match. Invoked with four arguments: + * - The match array, with named backreference properties. + * - The zero-based match index. + * - The string being traversed. + * - The regex object being used to traverse the string. + * @example + * + * // Extracts every other digit from a string + * const evens = []; + * XRegExp.forEach('1a2345', /\d/, (match, i) => { + * if (i % 2) evens.push(+match[0]); + * }); + * // evens -> [2, 4] + */ + + +XRegExp.forEach = function (str, regex, callback) { + var pos = 0; + var i = -1; + var match; + + while (match = XRegExp.exec(str, regex, pos)) { + // Because `regex` is provided to `callback`, the function could use the deprecated/ + // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec` + // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop, + // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of + // regexes, mutating the regex will not have any effect on the iteration or matched strings, + // which is a nice side effect that brings extra safety. + callback(match, ++i, str, regex); + pos = match.index + (match[0].length || 1); + } +}; +/** + * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with + * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native + * regexes are not recompiled using XRegExp syntax. + * + * @memberOf XRegExp + * @param {RegExp} regex Regex to globalize. + * @returns {RegExp} Copy of the provided regex with flag `g` added. + * @example + * + * const globalCopy = XRegExp.globalize(/regex/); + * globalCopy.global; // -> true + */ + + +XRegExp.globalize = function (regex) { + return copyRegex(regex, { + addG: true + }); +}; +/** + * Installs optional features according to the specified options. Can be undone using + * `XRegExp.uninstall`. + * + * @memberOf XRegExp + * @param {Object|String} options Options object or string. + * @example + * + * // With an options object + * XRegExp.install({ + * // Enables support for astral code points in Unicode addons (implicitly sets flag A) + * astral: true, + * + * // Adds named capture groups to the `groups` property of matches + * namespacing: true + * }); + * + * // With an options string + * XRegExp.install('astral namespacing'); + */ + + +XRegExp.install = function (options) { + options = prepareOptions(options); + + if (!features.astral && options.astral) { + setAstral(true); + } + + if (!features.namespacing && options.namespacing) { + setNamespacing(true); + } +}; +/** + * Checks whether an individual optional feature is installed. + * + * @memberOf XRegExp + * @param {String} feature Name of the feature to check. One of: + * - `astral` + * - `namespacing` + * @returns {Boolean} Whether the feature is installed. + * @example + * + * XRegExp.isInstalled('astral'); + */ + + +XRegExp.isInstalled = function (feature) { + return !!features[feature]; +}; +/** + * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes + * created in another frame, when `instanceof` and `constructor` checks would fail. + * + * @memberOf XRegExp + * @param {*} value Object to check. + * @returns {Boolean} Whether the object is a `RegExp` object. + * @example + * + * XRegExp.isRegExp('string'); // -> false + * XRegExp.isRegExp(/regex/i); // -> true + * XRegExp.isRegExp(RegExp('^', 'm')); // -> true + * XRegExp.isRegExp(XRegExp('(?s).')); // -> true + */ + + +XRegExp.isRegExp = function (value) { + return toString.call(value) === '[object RegExp]'; +}; // isType(value, 'RegExp'); + +/** + * Returns the first matched string, or in global mode, an array containing all matched strings. + * This is essentially a more convenient re-implementation of `String.prototype.match` that gives + * the result types you actually want (string instead of `exec`-style array in match-first mode, + * and an empty array instead of `null` when no matches are found in match-all mode). It also lets + * you override flag g and ignore `lastIndex`, and fixes browser bugs. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {RegExp} regex Regex to search with. + * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to + * return an array of all matched strings. If not explicitly specified and `regex` uses flag g, + * `scope` is 'all'. + * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all + * mode: Array of all matched strings, or an empty array. + * @example + * + * // Match first + * XRegExp.match('abc', /\w/); // -> 'a' + * XRegExp.match('abc', /\w/g, 'one'); // -> 'a' + * XRegExp.match('abc', /x/g, 'one'); // -> null + * + * // Match all + * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c'] + * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c'] + * XRegExp.match('abc', /x/, 'all'); // -> [] + */ + + +XRegExp.match = function (str, regex, scope) { + var global = regex.global && scope !== 'one' || scope === 'all'; + var cacheKey = (global ? 'g' : '') + (regex.sticky ? 'y' : '') || 'noGY'; + regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`replace` + + var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, { + addG: !!global, + removeG: scope === 'one', + isInternalOnly: true + })); + var result = nativ.match.call(toObject(str), r2); + + if (regex.global) { + regex.lastIndex = scope === 'one' && result ? // Can't use `r2.lastIndex` since `r2` is nonglobal in this case + result.index + result[0].length : 0; + } + + return global ? result || [] : result && result[0]; +}; +/** + * Retrieves the matches from searching a string using a chain of regexes that successively search + * within previous matches. The provided `chain` array can contain regexes and or objects with + * `regex` and `backref` properties. When a backreference is specified, the named or numbered + * backreference is passed forward to the next regex or returned. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {Array} chain Regexes that each search for matches within preceding results. + * @returns {Array} Matches by the last regex in the chain, or an empty array. + * @example + * + * // Basic usage; matches numbers within tags + * XRegExp.matchChain('1 2 3 4 a 56', [ + * XRegExp('(?is).*?'), + * /\d+/ + * ]); + * // -> ['2', '4', '56'] + * + * // Passing forward and returning specific backreferences + * html = 'XRegExp\ + * Google'; + * XRegExp.matchChain(html, [ + * {regex: //i, backref: 1}, + * {regex: XRegExp('(?i)^https?://(?[^/?#]+)'), backref: 'domain'} + * ]); + * // -> ['xregexp.com', 'www.google.com'] + */ + + +XRegExp.matchChain = function (str, chain) { + return function recurseChain(values, level) { + var item = chain[level].regex ? chain[level] : { + regex: chain[level] + }; + var matches = []; + + function addMatch(match) { + if (item.backref) { + var ERR_UNDEFINED_GROUP = "Backreference to undefined group: ".concat(item.backref); + var isNamedBackref = isNaN(item.backref); + + if (isNamedBackref && XRegExp.isInstalled('namespacing')) { + // `groups` has `null` as prototype, so using `in` instead of `hasOwnProperty` + if (!(item.backref in match.groups)) { + throw new ReferenceError(ERR_UNDEFINED_GROUP); + } + } else if (!match.hasOwnProperty(item.backref)) { + throw new ReferenceError(ERR_UNDEFINED_GROUP); + } + + var backrefValue = isNamedBackref && XRegExp.isInstalled('namespacing') ? match.groups[item.backref] : match[item.backref]; + matches.push(backrefValue || ''); + } else { + matches.push(match[0]); + } + } + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = (0, _getIterator2.default)(values), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var value = _step3.value; + XRegExp.forEach(value, item.regex, addMatch); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return level === chain.length - 1 || !matches.length ? matches : recurseChain(matches, level + 1); + }([str], 0); +}; +/** + * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string + * or regex, and the replacement can be a string or a function to be called for each match. To + * perform a global search and replace, use the optional `scope` argument or include flag g if using + * a regex. Replacement strings can use `${n}` or `$` for named and numbered backreferences. + * Replacement functions can use named backreferences via `arguments[0].name`. Also fixes browser + * bugs compared to the native `String.prototype.replace` and can be used reliably cross-browser. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {RegExp|String} search Search pattern to be replaced. + * @param {String|Function} replacement Replacement string or a function invoked to create it. + * Replacement strings can include special replacement syntax: + * - $$ - Inserts a literal $ character. + * - $&, $0 - Inserts the matched substring. + * - $` - Inserts the string that precedes the matched substring (left context). + * - $' - Inserts the string that follows the matched substring (right context). + * - $n, $nn - Where n/nn are digits referencing an existent capturing group, inserts + * backreference n/nn. + * - ${n}, $ - Where n is a name or any number of digits that reference an existent capturing + * group, inserts backreference n. + * Replacement functions are invoked with three or more arguments: + * - The matched substring (corresponds to $& above). Named backreferences are accessible as + * properties of this first argument. + * - 0..n arguments, one for each backreference (corresponding to $1, $2, etc. above). + * - The zero-based index of the match within the total search string. + * - The total string being searched. + * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not + * explicitly specified and using a regex with flag g, `scope` is 'all'. + * @returns {String} New string with one or all matches replaced. + * @example + * + * // Regex search, using named backreferences in replacement string + * const name = XRegExp('(?\\w+) (?\\w+)'); + * XRegExp.replace('John Smith', name, '$, $'); + * // -> 'Smith, John' + * + * // Regex search, using named backreferences in replacement function + * XRegExp.replace('John Smith', name, (match) => `${match.last}, ${match.first}`); + * // -> 'Smith, John' + * + * // String search, with replace-all + * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all'); + * // -> 'XRegExp builds XRegExps' + */ + + +XRegExp.replace = function (str, search, replacement, scope) { + var isRegex = XRegExp.isRegExp(search); + var global = search.global && scope !== 'one' || scope === 'all'; + var cacheKey = (global ? 'g' : '') + (search.sticky ? 'y' : '') || 'noGY'; + var s2 = search; + + if (isRegex) { + search[REGEX_DATA] = search[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s + // `lastIndex` isn't updated *during* replacement iterations + + s2 = search[REGEX_DATA][cacheKey] || (search[REGEX_DATA][cacheKey] = copyRegex(search, { + addG: !!global, + removeG: scope === 'one', + isInternalOnly: true + })); + } else if (global) { + s2 = new RegExp(XRegExp.escape(String(search)), 'g'); + } // Fixed `replace` required for named backreferences, etc. + + + var result = fixed.replace.call(toObject(str), s2, replacement); + + if (isRegex && search.global) { + // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) + search.lastIndex = 0; + } + + return result; +}; +/** + * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an + * array of replacement details. Later replacements operate on the output of earlier replacements. + * Replacement details are accepted as an array with a regex or string to search for, the + * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp + * replacement text syntax, which supports named backreference properties via `${name}` or + * `$`. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {Array} replacements Array of replacement detail arrays. + * @returns {String} New string with all replacements. + * @example + * + * str = XRegExp.replaceEach(str, [ + * [XRegExp('(?a)'), 'z${name}'], + * [/b/gi, 'y'], + * [/c/g, 'x', 'one'], // scope 'one' overrides /g + * [/d/, 'w', 'all'], // scope 'all' overrides lack of /g + * ['e', 'v', 'all'], // scope 'all' allows replace-all for strings + * [/f/g, ($0) => $0.toUpperCase()] + * ]); + */ + + +XRegExp.replaceEach = function (str, replacements) { + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = (0, _getIterator2.default)(replacements), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var r = _step4.value; + str = XRegExp.replace(str, r[0], r[1], r[2]); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + + return str; +}; +/** + * Splits a string into an array of strings using a regex or string separator. Matches of the + * separator are not included in the result array. However, if `separator` is a regex that contains + * capturing groups, backreferences are spliced into the result each time `separator` is matched. + * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably + * cross-browser. + * + * @memberOf XRegExp + * @param {String} str String to split. + * @param {RegExp|String} separator Regex or string to use for separating the string. + * @param {Number} [limit] Maximum number of items to include in the result array. + * @returns {Array} Array of substrings. + * @example + * + * // Basic use + * XRegExp.split('a b c', ' '); + * // -> ['a', 'b', 'c'] + * + * // With limit + * XRegExp.split('a b c', ' ', 2); + * // -> ['a', 'b'] + * + * // Backreferences in result array + * XRegExp.split('..word1..', /([a-z]+)(\d+)/i); + * // -> ['..', 'word', '1', '..'] + */ + + +XRegExp.split = function (str, separator, limit) { + return fixed.split.call(toObject(str), separator, limit); +}; +/** + * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and + * `sticky` arguments specify the search start position, and whether the match must start at the + * specified position only. The `lastIndex` property of the provided regex is not used, but is + * updated for compatibility. Also fixes browser bugs compared to the native + * `RegExp.prototype.test` and can be used reliably cross-browser. + * + * @memberOf XRegExp + * @param {String} str String to search. + * @param {RegExp} regex Regex to search with. + * @param {Number} [pos=0] Zero-based index at which to start the search. + * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position + * only. The string `'sticky'` is accepted as an alternative to `true`. + * @returns {Boolean} Whether the regex matched the provided value. + * @example + * + * // Basic use + * XRegExp.test('abc', /c/); // -> true + * + * // With pos and sticky + * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false + * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true + */ +// Do this the easy way :-) + + +XRegExp.test = function (str, regex, pos, sticky) { + return !!XRegExp.exec(str, regex, pos, sticky); +}; +/** + * Uninstalls optional features according to the specified options. All optional features start out + * uninstalled, so this is used to undo the actions of `XRegExp.install`. + * + * @memberOf XRegExp + * @param {Object|String} options Options object or string. + * @example + * + * // With an options object + * XRegExp.uninstall({ + * // Disables support for astral code points in Unicode addons + * astral: true, + * + * // Don't add named capture groups to the `groups` property of matches + * namespacing: true + * }); + * + * // With an options string + * XRegExp.uninstall('astral namespacing'); + */ + + +XRegExp.uninstall = function (options) { + options = prepareOptions(options); + + if (features.astral && options.astral) { + setAstral(false); + } + + if (features.namespacing && options.namespacing) { + setNamespacing(false); + } +}; +/** + * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as + * regex objects or strings. Metacharacters are escaped in patterns provided as strings. + * Backreferences in provided regex objects are automatically renumbered to work correctly within + * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the + * `flags` argument. + * + * @memberOf XRegExp + * @param {Array} patterns Regexes and strings to combine. + * @param {String} [flags] Any combination of XRegExp flags. + * @param {Object} [options] Options object with optional properties: + * - `conjunction` {String} Type of conjunction to use: 'or' (default) or 'none'. + * @returns {RegExp} Union of the provided regexes and strings. + * @example + * + * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i'); + * // -> /a\+b\*c|(dogs)\1|(cats)\2/i + * + * XRegExp.union([/man/, /bear/, /pig/], 'i', {conjunction: 'none'}); + * // -> /manbearpig/i + */ + + +XRegExp.union = function (patterns, flags, options) { + options = options || {}; + var conjunction = options.conjunction || 'or'; + var numCaptures = 0; + var numPriorCaptures; + var captureNames; + + function rewrite(match, paren, backref) { + var name = captureNames[numCaptures - numPriorCaptures]; // Capturing group + + if (paren) { + ++numCaptures; // If the current capture has a name, preserve the name + + if (name) { + return "(?<".concat(name, ">"); + } // Backreference + + } else if (backref) { + // Rewrite the backreference + return "\\".concat(+backref + numPriorCaptures); + } + + return match; + } + + if (!(isType(patterns, 'Array') && patterns.length)) { + throw new TypeError('Must provide a nonempty array of patterns to merge'); + } + + var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g; + var output = []; + var _iteratorNormalCompletion5 = true; + var _didIteratorError5 = false; + var _iteratorError5 = undefined; + + try { + for (var _iterator5 = (0, _getIterator2.default)(patterns), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var pattern = _step5.value; + + if (XRegExp.isRegExp(pattern)) { + numPriorCaptures = numCaptures; + captureNames = pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames || []; // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are + // independently valid; helps keep this simple. Named captures are put back + + output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite)); + } else { + output.push(XRegExp.escape(pattern)); + } + } + } catch (err) { + _didIteratorError5 = true; + _iteratorError5 = err; + } finally { + try { + if (!_iteratorNormalCompletion5 && _iterator5.return != null) { + _iterator5.return(); + } + } finally { + if (_didIteratorError5) { + throw _iteratorError5; + } + } + } + + var separator = conjunction === 'none' ? '' : '|'; + return XRegExp(output.join(separator), flags); +}; // ==--------------------------== +// Fixed/extended native methods +// ==--------------------------== + +/** + * Adds named capture support (with backreferences returned as `result.name`), and fixes browser + * bugs in the native `RegExp.prototype.exec`. Use via `XRegExp.exec`. + * + * @memberOf RegExp + * @param {String} str String to search. + * @returns {Array} Match array with named backreference properties, or `null`. + */ + + +fixed.exec = function (str) { + var origLastIndex = this.lastIndex; + var match = nativ.exec.apply(this, arguments); + + if (match) { + // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing + // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9 + // in standards mode follows the spec. + if (!correctExecNpcg && match.length > 1 && match.indexOf('') !== -1) { + var r2 = copyRegex(this, { + removeG: true, + isInternalOnly: true + }); // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + + nativ.replace.call(String(str).slice(match.index), r2, function () { + var len = arguments.length; // Skip index 0 and the last 2 + + for (var i = 1; i < len - 2; ++i) { + if ((i < 0 || arguments.length <= i ? undefined : arguments[i]) === undefined) { + match[i] = undefined; + } + } + }); + } // Attach named capture properties + + + var groupsObject = match; + + if (XRegExp.isInstalled('namespacing')) { + // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec + match.groups = (0, _create.default)(null); + groupsObject = match.groups; + } + + if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) { + // Skip index 0 + for (var i = 1; i < match.length; ++i) { + var name = this[REGEX_DATA].captureNames[i - 1]; + + if (name) { + groupsObject[name] = match[i]; + } + } + } // Fix browsers that increment `lastIndex` after zero-length matches + + + if (this.global && !match[0].length && this.lastIndex > match.index) { + this.lastIndex = match.index; + } + } + + if (!this.global) { + // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) + this.lastIndex = origLastIndex; + } + + return match; +}; +/** + * Fixes browser bugs in the native `RegExp.prototype.test`. + * + * @memberOf RegExp + * @param {String} str String to search. + * @returns {Boolean} Whether the regex matched the provided value. + */ + + +fixed.test = function (str) { + // Do this the easy way :-) + return !!fixed.exec.call(this, str); +}; +/** + * Adds named capture support (with backreferences returned as `result.name`), and fixes browser + * bugs in the native `String.prototype.match`. + * + * @memberOf String + * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`. + * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g, + * the result of calling `regex.exec(this)`. + */ + + +fixed.match = function (regex) { + if (!XRegExp.isRegExp(regex)) { + // Use the native `RegExp` rather than `XRegExp` + regex = new RegExp(regex); + } else if (regex.global) { + var result = nativ.match.apply(this, arguments); // Fixes IE bug + + regex.lastIndex = 0; + return result; + } + + return fixed.exec.call(regex, toObject(this)); +}; +/** + * Adds support for `${n}` (or `$`) tokens for named and numbered backreferences in replacement + * text, and provides named backreferences to replacement functions as `arguments[0].name`. Also + * fixes browser bugs in replacement text syntax when performing a replacement using a nonregex + * search value, and the value of a replacement regex's `lastIndex` property during replacement + * iterations and upon completion. Note that this doesn't support SpiderMonkey's proprietary third + * (`flags`) argument. Use via `XRegExp.replace`. + * + * @memberOf String + * @param {RegExp|String} search Search pattern to be replaced. + * @param {String|Function} replacement Replacement string or a function invoked to create it. + * @returns {String} New string with one or all matches replaced. + */ + + +fixed.replace = function (search, replacement) { + var isRegex = XRegExp.isRegExp(search); + var origLastIndex; + var captureNames; + var result; + + if (isRegex) { + if (search[REGEX_DATA]) { + captureNames = search[REGEX_DATA].captureNames; + } // Only needed if `search` is nonglobal + + + origLastIndex = search.lastIndex; + } else { + search += ''; // Type-convert + } // Don't use `typeof`; some older browsers return 'function' for regex objects + + + if (isType(replacement, 'Function')) { + // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement + // functions isn't type-converted to a string + result = nativ.replace.call(String(this), search, function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (captureNames) { + var groupsObject; + + if (XRegExp.isInstalled('namespacing')) { + // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec + groupsObject = (0, _create.default)(null); + args.push(groupsObject); + } else { + // Change the `args[0]` string primitive to a `String` object that can store + // properties. This really does need to use `String` as a constructor + args[0] = new String(args[0]); + groupsObject = args[0]; + } // Store named backreferences + + + for (var i = 0; i < captureNames.length; ++i) { + if (captureNames[i]) { + groupsObject[captureNames[i]] = args[i + 1]; + } + } + } // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari + // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1) + + + if (isRegex && search.global) { + search.lastIndex = args[args.length - 2] + args[0].length; + } // ES6 specs the context for replacement functions as `undefined` + + + return replacement.apply(void 0, args); + }); + } else { + // Ensure that the last value of `args` will be a string when given nonstring `this`, + // while still throwing on null or undefined context + result = nativ.replace.call(this == null ? this : String(this), search, function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return nativ.replace.call(String(replacement), replacementToken, replacer); + + function replacer($0, bracketed, angled, dollarToken) { + bracketed = bracketed || angled; // Named or numbered backreference with curly or angled braces + + if (bracketed) { + // XRegExp behavior for `${n}` or `$`: + // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the + // entire match. Any number of leading zeros may be used. + // 2. Backreference to named capture `n`, if it exists and is not an integer + // overridden by numbered capture. In practice, this does not overlap with + // numbered capture since XRegExp does not allow named capture to use a bare + // integer as the name. + // 3. If the name or number does not refer to an existing capturing group, it's + // an error. + var n = +bracketed; // Type-convert; drop leading zeros + + if (n <= args.length - 3) { + return args[n] || ''; + } // Groups with the same name is an error, else would need `lastIndexOf` + + + n = captureNames ? captureNames.indexOf(bracketed) : -1; + + if (n < 0) { + throw new SyntaxError("Backreference to undefined group ".concat($0)); + } + + return args[n + 1] || ''; + } // Else, special variable or numbered backreference without curly braces + + + if (dollarToken === '$') { + // $$ + return '$'; + } + + if (dollarToken === '&' || +dollarToken === 0) { + // $&, $0 (not followed by 1-9), $00 + return args[0]; + } + + if (dollarToken === '`') { + // $` (left context) + return args[args.length - 1].slice(0, args[args.length - 2]); + } + + if (dollarToken === "'") { + // $' (right context) + return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + } // Else, numbered backreference without braces + + + dollarToken = +dollarToken; // Type-convert; drop leading zero + // XRegExp behavior for `$n` and `$nn`: + // - Backrefs end after 1 or 2 digits. Use `${..}` or `$<..>` for more digits. + // - `$1` is an error if no capturing groups. + // - `$10` is an error if less than 10 capturing groups. Use `${1}0` or `$<1>0` + // instead. + // - `$01` is `$1` if at least one capturing group, else it's an error. + // - `$0` (not followed by 1-9) and `$00` are the entire match. + // Native behavior, for comparison: + // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+. + // - `$1` is a literal `$1` if no capturing groups. + // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups. + // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`. + // - `$0` is a literal `$0`. + + if (!isNaN(dollarToken)) { + if (dollarToken > args.length - 3) { + throw new SyntaxError("Backreference to undefined group ".concat($0)); + } + + return args[dollarToken] || ''; + } // `$` followed by an unsupported char is an error, unlike native JS + + + throw new SyntaxError("Invalid token ".concat($0)); + } + }); + } + + if (isRegex) { + if (search.global) { + // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) + search.lastIndex = 0; + } else { + // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) + search.lastIndex = origLastIndex; + } + } + + return result; +}; +/** + * Fixes browser bugs in the native `String.prototype.split`. Use via `XRegExp.split`. + * + * @memberOf String + * @param {RegExp|String} separator Regex or string to use for separating the string. + * @param {Number} [limit] Maximum number of items to include in the result array. + * @returns {Array} Array of substrings. + */ + + +fixed.split = function (separator, limit) { + if (!XRegExp.isRegExp(separator)) { + // Browsers handle nonregex split correctly, so use the faster native method + return nativ.split.apply(this, arguments); + } + + var str = String(this); + var output = []; + var origLastIndex = separator.lastIndex; + var lastLastIndex = 0; + var lastLength; // Values for `limit`, per the spec: + // If undefined: pow(2,32) - 1 + // If 0, Infinity, or NaN: 0 + // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32); + // If negative number: pow(2,32) - floor(abs(limit)) + // If other: Type-convert, then use the above rules + // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless + // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+ + + limit = (limit === undefined ? -1 : limit) >>> 0; + XRegExp.forEach(str, separator, function (match) { + // This condition is not the same as `if (match[0].length)` + if (match.index + match[0].length > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + + if (match.length > 1 && match.index < str.length) { + Array.prototype.push.apply(output, match.slice(1)); + } + + lastLength = match[0].length; + lastLastIndex = match.index + lastLength; + } + }); + + if (lastLastIndex === str.length) { + if (!nativ.test.call(separator, '') || lastLength) { + output.push(''); + } + } else { + output.push(str.slice(lastLastIndex)); + } + + separator.lastIndex = origLastIndex; + return output.length > limit ? output.slice(0, limit) : output; +}; // ==--------------------------== +// Built-in syntax/flag tokens +// ==--------------------------== + +/* + * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be + * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser + * consistency and to reserve their syntax, but lets them be superseded by addons. + */ + + +XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function (match, scope) { + // \B is allowed in default scope only + if (match[1] === 'B' && scope === defaultScope) { + return match[0]; + } + + throw new SyntaxError("Invalid escape ".concat(match[0])); +}, { + scope: 'all', + leadChar: '\\' +}); +/* + * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit + * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag + * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to + * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior + * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or + * if you use the same in a character class. + */ + +XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/, function (match, scope, flags) { + var code = dec(match[1]); + + if (code > 0x10FFFF) { + throw new SyntaxError("Invalid Unicode code point ".concat(match[0])); + } + + if (code <= 0xFFFF) { + // Converting to \uNNNN avoids needing to escape the literal character and keep it + // separate from preceding tokens + return "\\u".concat(pad4(hex(code))); + } // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling + + + if (hasNativeU && flags.indexOf('u') !== -1) { + return match[0]; + } + + throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u'); +}, { + scope: 'all', + leadChar: '\\' +}); +/* + * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency. + * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because + * character class endings can't be determined. + */ + +XRegExp.addToken(/\[(\^?)\]/, // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. +// (?!) should work like \b\B, but is unreliable in some versions of Firefox + +/* eslint-disable no-confusing-arrow */ +function (match) { + return match[1] ? '[\\s\\S]' : '\\b\\B'; +}, +/* eslint-enable no-confusing-arrow */ +{ + leadChar: '[' +}); +/* + * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in + * free-spacing mode (flag x). + */ + +XRegExp.addToken(/\(\?#[^)]*\)/, getContextualTokenSeparator, { + leadChar: '(' +}); +/* + * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only. + */ + +XRegExp.addToken(/\s+|#[^\n]*\n?/, getContextualTokenSeparator, { + flag: 'x' +}); +/* + * Dot, in dotall mode (aka singleline mode, flag s) only. + */ + +XRegExp.addToken(/\./, function () { + return '[\\s\\S]'; +}, { + flag: 's', + leadChar: '.' +}); +/* + * Named backreference: `\k`. Backreference names can use the characters A-Z, a-z, 0-9, _, + * and $ only. Also allows numbered backreferences as `\k`. + */ + +XRegExp.addToken(/\\k<([\w$]+)>/, function (match) { + // Groups with the same name is an error, else would need `lastIndexOf` + var index = isNaN(match[1]) ? this.captureNames.indexOf(match[1]) + 1 : +match[1]; + var endIndex = match.index + match[0].length; + + if (!index || index > this.captureNames.length) { + throw new SyntaxError("Backreference to undefined group ".concat(match[0])); + } // Keep backreferences separate from subsequent literal numbers. This avoids e.g. + // inadvertedly changing `(?)\k1` to `()\11`. + + + return "\\".concat(index).concat(endIndex === match.input.length || isNaN(match.input[endIndex]) ? '' : '(?:)'); +}, { + leadChar: '\\' +}); +/* + * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0` + * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches + * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax. + */ + +XRegExp.addToken(/\\(\d+)/, function (match, scope) { + if (!(scope === defaultScope && /^[1-9]/.test(match[1]) && +match[1] <= this.captureNames.length) && match[1] !== '0') { + throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(match[0])); + } + + return match[0]; +}, { + scope: 'all', + leadChar: '\\' +}); +/* + * Named capturing group; match the opening delimiter only: `(?`. Capture names can use the + * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style + * `(?P` as an alternate syntax to avoid issues in some older versions of Opera which natively + * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to + * Python-style named capture as octals. + */ + +XRegExp.addToken(/\(\?P?<([\w$]+)>/, function (match) { + // Disallow bare integers as names because named backreferences are added to match arrays + // and therefore numeric properties may lead to incorrect lookups + if (!isNaN(match[1])) { + throw new SyntaxError("Cannot use integer as capture name ".concat(match[0])); + } + + if (!XRegExp.isInstalled('namespacing') && (match[1] === 'length' || match[1] === '__proto__')) { + throw new SyntaxError("Cannot use reserved word as capture name ".concat(match[0])); + } + + if (this.captureNames.indexOf(match[1]) !== -1) { + throw new SyntaxError("Cannot use same name for multiple groups ".concat(match[0])); + } + + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return '('; +}, { + leadChar: '(' +}); +/* + * Capturing group; match the opening parenthesis only. Required for support of named capturing + * groups. Also adds explicit capture mode (flag n). + */ + +XRegExp.addToken(/\((?!\?)/, function (match, scope, flags) { + if (flags.indexOf('n') !== -1) { + return '(?:'; + } + + this.captureNames.push(null); + return '('; +}, { + optionalFlags: 'n', + leadChar: '(' +}); +var _default = XRegExp; +exports.default = _default; +module.exports = exports["default"]; +},{"@babel/runtime-corejs2/core-js/get-iterator":2,"@babel/runtime-corejs2/core-js/object/create":4,"@babel/runtime-corejs2/core-js/parse-int":5,"@babel/runtime-corejs2/helpers/interopRequireDefault":7,"@babel/runtime-corejs2/helpers/slicedToArray":10}],646:[function(require,module,exports){ +module.exports = [ + { + 'name': 'InAdlam', + 'astral': '\uD83A[\uDD00-\uDD5F]' + }, + { + 'name': 'InAegean_Numbers', + 'astral': '\uD800[\uDD00-\uDD3F]' + }, + { + 'name': 'InAhom', + 'astral': '\uD805[\uDF00-\uDF3F]' + }, + { + 'name': 'InAlchemical_Symbols', + 'astral': '\uD83D[\uDF00-\uDF7F]' + }, + { + 'name': 'InAlphabetic_Presentation_Forms', + 'bmp': '\uFB00-\uFB4F' + }, + { + 'name': 'InAnatolian_Hieroglyphs', + 'astral': '\uD811[\uDC00-\uDE7F]' + }, + { + 'name': 'InAncient_Greek_Musical_Notation', + 'astral': '\uD834[\uDE00-\uDE4F]' + }, + { + 'name': 'InAncient_Greek_Numbers', + 'astral': '\uD800[\uDD40-\uDD8F]' + }, + { + 'name': 'InAncient_Symbols', + 'astral': '\uD800[\uDD90-\uDDCF]' + }, + { + 'name': 'InArabic', + 'bmp': '\u0600-\u06FF' + }, + { + 'name': 'InArabic_Extended_A', + 'bmp': '\u08A0-\u08FF' + }, + { + 'name': 'InArabic_Mathematical_Alphabetic_Symbols', + 'astral': '\uD83B[\uDE00-\uDEFF]' + }, + { + 'name': 'InArabic_Presentation_Forms_A', + 'bmp': '\uFB50-\uFDFF' + }, + { + 'name': 'InArabic_Presentation_Forms_B', + 'bmp': '\uFE70-\uFEFF' + }, + { + 'name': 'InArabic_Supplement', + 'bmp': '\u0750-\u077F' + }, + { + 'name': 'InArmenian', + 'bmp': '\u0530-\u058F' + }, + { + 'name': 'InArrows', + 'bmp': '\u2190-\u21FF' + }, + { + 'name': 'InAvestan', + 'astral': '\uD802[\uDF00-\uDF3F]' + }, + { + 'name': 'InBalinese', + 'bmp': '\u1B00-\u1B7F' + }, + { + 'name': 'InBamum', + 'bmp': '\uA6A0-\uA6FF' + }, + { + 'name': 'InBamum_Supplement', + 'astral': '\uD81A[\uDC00-\uDE3F]' + }, + { + 'name': 'InBasic_Latin', + 'bmp': '\0-\x7F' + }, + { + 'name': 'InBassa_Vah', + 'astral': '\uD81A[\uDED0-\uDEFF]' + }, + { + 'name': 'InBatak', + 'bmp': '\u1BC0-\u1BFF' + }, + { + 'name': 'InBengali', + 'bmp': '\u0980-\u09FF' + }, + { + 'name': 'InBhaiksuki', + 'astral': '\uD807[\uDC00-\uDC6F]' + }, + { + 'name': 'InBlock_Elements', + 'bmp': '\u2580-\u259F' + }, + { + 'name': 'InBopomofo', + 'bmp': '\u3100-\u312F' + }, + { + 'name': 'InBopomofo_Extended', + 'bmp': '\u31A0-\u31BF' + }, + { + 'name': 'InBox_Drawing', + 'bmp': '\u2500-\u257F' + }, + { + 'name': 'InBrahmi', + 'astral': '\uD804[\uDC00-\uDC7F]' + }, + { + 'name': 'InBraille_Patterns', + 'bmp': '\u2800-\u28FF' + }, + { + 'name': 'InBuginese', + 'bmp': '\u1A00-\u1A1F' + }, + { + 'name': 'InBuhid', + 'bmp': '\u1740-\u175F' + }, + { + 'name': 'InByzantine_Musical_Symbols', + 'astral': '\uD834[\uDC00-\uDCFF]' + }, + { + 'name': 'InCJK_Compatibility', + 'bmp': '\u3300-\u33FF' + }, + { + 'name': 'InCJK_Compatibility_Forms', + 'bmp': '\uFE30-\uFE4F' + }, + { + 'name': 'InCJK_Compatibility_Ideographs', + 'bmp': '\uF900-\uFAFF' + }, + { + 'name': 'InCJK_Compatibility_Ideographs_Supplement', + 'astral': '\uD87E[\uDC00-\uDE1F]' + }, + { + 'name': 'InCJK_Radicals_Supplement', + 'bmp': '\u2E80-\u2EFF' + }, + { + 'name': 'InCJK_Strokes', + 'bmp': '\u31C0-\u31EF' + }, + { + 'name': 'InCJK_Symbols_And_Punctuation', + 'bmp': '\u3000-\u303F' + }, + { + 'name': 'InCJK_Unified_Ideographs', + 'bmp': '\u4E00-\u9FFF' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_A', + 'bmp': '\u3400-\u4DBF' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_B', + 'astral': '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_C', + 'astral': '\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_D', + 'astral': '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_E', + 'astral': '\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]' + }, + { + 'name': 'InCJK_Unified_Ideographs_Extension_F', + 'astral': '\uD873[\uDEB0-\uDFFF]|[\uD874-\uD879][\uDC00-\uDFFF]|\uD87A[\uDC00-\uDFEF]' + }, + { + 'name': 'InCarian', + 'astral': '\uD800[\uDEA0-\uDEDF]' + }, + { + 'name': 'InCaucasian_Albanian', + 'astral': '\uD801[\uDD30-\uDD6F]' + }, + { + 'name': 'InChakma', + 'astral': '\uD804[\uDD00-\uDD4F]' + }, + { + 'name': 'InCham', + 'bmp': '\uAA00-\uAA5F' + }, + { + 'name': 'InCherokee', + 'bmp': '\u13A0-\u13FF' + }, + { + 'name': 'InCherokee_Supplement', + 'bmp': '\uAB70-\uABBF' + }, + { + 'name': 'InChess_Symbols', + 'astral': '\uD83E[\uDE00-\uDE6F]' + }, + { + 'name': 'InCombining_Diacritical_Marks', + 'bmp': '\u0300-\u036F' + }, + { + 'name': 'InCombining_Diacritical_Marks_Extended', + 'bmp': '\u1AB0-\u1AFF' + }, + { + 'name': 'InCombining_Diacritical_Marks_For_Symbols', + 'bmp': '\u20D0-\u20FF' + }, + { + 'name': 'InCombining_Diacritical_Marks_Supplement', + 'bmp': '\u1DC0-\u1DFF' + }, + { + 'name': 'InCombining_Half_Marks', + 'bmp': '\uFE20-\uFE2F' + }, + { + 'name': 'InCommon_Indic_Number_Forms', + 'bmp': '\uA830-\uA83F' + }, + { + 'name': 'InControl_Pictures', + 'bmp': '\u2400-\u243F' + }, + { + 'name': 'InCoptic', + 'bmp': '\u2C80-\u2CFF' + }, + { + 'name': 'InCoptic_Epact_Numbers', + 'astral': '\uD800[\uDEE0-\uDEFF]' + }, + { + 'name': 'InCounting_Rod_Numerals', + 'astral': '\uD834[\uDF60-\uDF7F]' + }, + { + 'name': 'InCuneiform', + 'astral': '\uD808[\uDC00-\uDFFF]' + }, + { + 'name': 'InCuneiform_Numbers_And_Punctuation', + 'astral': '\uD809[\uDC00-\uDC7F]' + }, + { + 'name': 'InCurrency_Symbols', + 'bmp': '\u20A0-\u20CF' + }, + { + 'name': 'InCypriot_Syllabary', + 'astral': '\uD802[\uDC00-\uDC3F]' + }, + { + 'name': 'InCyrillic', + 'bmp': '\u0400-\u04FF' + }, + { + 'name': 'InCyrillic_Extended_A', + 'bmp': '\u2DE0-\u2DFF' + }, + { + 'name': 'InCyrillic_Extended_B', + 'bmp': '\uA640-\uA69F' + }, + { + 'name': 'InCyrillic_Extended_C', + 'bmp': '\u1C80-\u1C8F' + }, + { + 'name': 'InCyrillic_Supplement', + 'bmp': '\u0500-\u052F' + }, + { + 'name': 'InDeseret', + 'astral': '\uD801[\uDC00-\uDC4F]' + }, + { + 'name': 'InDevanagari', + 'bmp': '\u0900-\u097F' + }, + { + 'name': 'InDevanagari_Extended', + 'bmp': '\uA8E0-\uA8FF' + }, + { + 'name': 'InDingbats', + 'bmp': '\u2700-\u27BF' + }, + { + 'name': 'InDogra', + 'astral': '\uD806[\uDC00-\uDC4F]' + }, + { + 'name': 'InDomino_Tiles', + 'astral': '\uD83C[\uDC30-\uDC9F]' + }, + { + 'name': 'InDuployan', + 'astral': '\uD82F[\uDC00-\uDC9F]' + }, + { + 'name': 'InEarly_Dynastic_Cuneiform', + 'astral': '\uD809[\uDC80-\uDD4F]' + }, + { + 'name': 'InEgyptian_Hieroglyphs', + 'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]' + }, + { + 'name': 'InElbasan', + 'astral': '\uD801[\uDD00-\uDD2F]' + }, + { + 'name': 'InEmoticons', + 'astral': '\uD83D[\uDE00-\uDE4F]' + }, + { + 'name': 'InEnclosed_Alphanumeric_Supplement', + 'astral': '\uD83C[\uDD00-\uDDFF]' + }, + { + 'name': 'InEnclosed_Alphanumerics', + 'bmp': '\u2460-\u24FF' + }, + { + 'name': 'InEnclosed_CJK_Letters_And_Months', + 'bmp': '\u3200-\u32FF' + }, + { + 'name': 'InEnclosed_Ideographic_Supplement', + 'astral': '\uD83C[\uDE00-\uDEFF]' + }, + { + 'name': 'InEthiopic', + 'bmp': '\u1200-\u137F' + }, + { + 'name': 'InEthiopic_Extended', + 'bmp': '\u2D80-\u2DDF' + }, + { + 'name': 'InEthiopic_Extended_A', + 'bmp': '\uAB00-\uAB2F' + }, + { + 'name': 'InEthiopic_Supplement', + 'bmp': '\u1380-\u139F' + }, + { + 'name': 'InGeneral_Punctuation', + 'bmp': '\u2000-\u206F' + }, + { + 'name': 'InGeometric_Shapes', + 'bmp': '\u25A0-\u25FF' + }, + { + 'name': 'InGeometric_Shapes_Extended', + 'astral': '\uD83D[\uDF80-\uDFFF]' + }, + { + 'name': 'InGeorgian', + 'bmp': '\u10A0-\u10FF' + }, + { + 'name': 'InGeorgian_Extended', + 'bmp': '\u1C90-\u1CBF' + }, + { + 'name': 'InGeorgian_Supplement', + 'bmp': '\u2D00-\u2D2F' + }, + { + 'name': 'InGlagolitic', + 'bmp': '\u2C00-\u2C5F' + }, + { + 'name': 'InGlagolitic_Supplement', + 'astral': '\uD838[\uDC00-\uDC2F]' + }, + { + 'name': 'InGothic', + 'astral': '\uD800[\uDF30-\uDF4F]' + }, + { + 'name': 'InGrantha', + 'astral': '\uD804[\uDF00-\uDF7F]' + }, + { + 'name': 'InGreek_And_Coptic', + 'bmp': '\u0370-\u03FF' + }, + { + 'name': 'InGreek_Extended', + 'bmp': '\u1F00-\u1FFF' + }, + { + 'name': 'InGujarati', + 'bmp': '\u0A80-\u0AFF' + }, + { + 'name': 'InGunjala_Gondi', + 'astral': '\uD807[\uDD60-\uDDAF]' + }, + { + 'name': 'InGurmukhi', + 'bmp': '\u0A00-\u0A7F' + }, + { + 'name': 'InHalfwidth_And_Fullwidth_Forms', + 'bmp': '\uFF00-\uFFEF' + }, + { + 'name': 'InHangul_Compatibility_Jamo', + 'bmp': '\u3130-\u318F' + }, + { + 'name': 'InHangul_Jamo', + 'bmp': '\u1100-\u11FF' + }, + { + 'name': 'InHangul_Jamo_Extended_A', + 'bmp': '\uA960-\uA97F' + }, + { + 'name': 'InHangul_Jamo_Extended_B', + 'bmp': '\uD7B0-\uD7FF' + }, + { + 'name': 'InHangul_Syllables', + 'bmp': '\uAC00-\uD7AF' + }, + { + 'name': 'InHanifi_Rohingya', + 'astral': '\uD803[\uDD00-\uDD3F]' + }, + { + 'name': 'InHanunoo', + 'bmp': '\u1720-\u173F' + }, + { + 'name': 'InHatran', + 'astral': '\uD802[\uDCE0-\uDCFF]' + }, + { + 'name': 'InHebrew', + 'bmp': '\u0590-\u05FF' + }, + { + 'name': 'InHigh_Private_Use_Surrogates', + 'bmp': '\uDB80-\uDBFF' + }, + { + 'name': 'InHigh_Surrogates', + 'bmp': '\uD800-\uDB7F' + }, + { + 'name': 'InHiragana', + 'bmp': '\u3040-\u309F' + }, + { + 'name': 'InIPA_Extensions', + 'bmp': '\u0250-\u02AF' + }, + { + 'name': 'InIdeographic_Description_Characters', + 'bmp': '\u2FF0-\u2FFF' + }, + { + 'name': 'InIdeographic_Symbols_And_Punctuation', + 'astral': '\uD81B[\uDFE0-\uDFFF]' + }, + { + 'name': 'InImperial_Aramaic', + 'astral': '\uD802[\uDC40-\uDC5F]' + }, + { + 'name': 'InIndic_Siyaq_Numbers', + 'astral': '\uD83B[\uDC70-\uDCBF]' + }, + { + 'name': 'InInscriptional_Pahlavi', + 'astral': '\uD802[\uDF60-\uDF7F]' + }, + { + 'name': 'InInscriptional_Parthian', + 'astral': '\uD802[\uDF40-\uDF5F]' + }, + { + 'name': 'InJavanese', + 'bmp': '\uA980-\uA9DF' + }, + { + 'name': 'InKaithi', + 'astral': '\uD804[\uDC80-\uDCCF]' + }, + { + 'name': 'InKana_Extended_A', + 'astral': '\uD82C[\uDD00-\uDD2F]' + }, + { + 'name': 'InKana_Supplement', + 'astral': '\uD82C[\uDC00-\uDCFF]' + }, + { + 'name': 'InKanbun', + 'bmp': '\u3190-\u319F' + }, + { + 'name': 'InKangxi_Radicals', + 'bmp': '\u2F00-\u2FDF' + }, + { + 'name': 'InKannada', + 'bmp': '\u0C80-\u0CFF' + }, + { + 'name': 'InKatakana', + 'bmp': '\u30A0-\u30FF' + }, + { + 'name': 'InKatakana_Phonetic_Extensions', + 'bmp': '\u31F0-\u31FF' + }, + { + 'name': 'InKayah_Li', + 'bmp': '\uA900-\uA92F' + }, + { + 'name': 'InKharoshthi', + 'astral': '\uD802[\uDE00-\uDE5F]' + }, + { + 'name': 'InKhmer', + 'bmp': '\u1780-\u17FF' + }, + { + 'name': 'InKhmer_Symbols', + 'bmp': '\u19E0-\u19FF' + }, + { + 'name': 'InKhojki', + 'astral': '\uD804[\uDE00-\uDE4F]' + }, + { + 'name': 'InKhudawadi', + 'astral': '\uD804[\uDEB0-\uDEFF]' + }, + { + 'name': 'InLao', + 'bmp': '\u0E80-\u0EFF' + }, + { + 'name': 'InLatin_1_Supplement', + 'bmp': '\x80-\xFF' + }, + { + 'name': 'InLatin_Extended_A', + 'bmp': '\u0100-\u017F' + }, + { + 'name': 'InLatin_Extended_Additional', + 'bmp': '\u1E00-\u1EFF' + }, + { + 'name': 'InLatin_Extended_B', + 'bmp': '\u0180-\u024F' + }, + { + 'name': 'InLatin_Extended_C', + 'bmp': '\u2C60-\u2C7F' + }, + { + 'name': 'InLatin_Extended_D', + 'bmp': '\uA720-\uA7FF' + }, + { + 'name': 'InLatin_Extended_E', + 'bmp': '\uAB30-\uAB6F' + }, + { + 'name': 'InLepcha', + 'bmp': '\u1C00-\u1C4F' + }, + { + 'name': 'InLetterlike_Symbols', + 'bmp': '\u2100-\u214F' + }, + { + 'name': 'InLimbu', + 'bmp': '\u1900-\u194F' + }, + { + 'name': 'InLinear_A', + 'astral': '\uD801[\uDE00-\uDF7F]' + }, + { + 'name': 'InLinear_B_Ideograms', + 'astral': '\uD800[\uDC80-\uDCFF]' + }, + { + 'name': 'InLinear_B_Syllabary', + 'astral': '\uD800[\uDC00-\uDC7F]' + }, + { + 'name': 'InLisu', + 'bmp': '\uA4D0-\uA4FF' + }, + { + 'name': 'InLow_Surrogates', + 'bmp': '\uDC00-\uDFFF' + }, + { + 'name': 'InLycian', + 'astral': '\uD800[\uDE80-\uDE9F]' + }, + { + 'name': 'InLydian', + 'astral': '\uD802[\uDD20-\uDD3F]' + }, + { + 'name': 'InMahajani', + 'astral': '\uD804[\uDD50-\uDD7F]' + }, + { + 'name': 'InMahjong_Tiles', + 'astral': '\uD83C[\uDC00-\uDC2F]' + }, + { + 'name': 'InMakasar', + 'astral': '\uD807[\uDEE0-\uDEFF]' + }, + { + 'name': 'InMalayalam', + 'bmp': '\u0D00-\u0D7F' + }, + { + 'name': 'InMandaic', + 'bmp': '\u0840-\u085F' + }, + { + 'name': 'InManichaean', + 'astral': '\uD802[\uDEC0-\uDEFF]' + }, + { + 'name': 'InMarchen', + 'astral': '\uD807[\uDC70-\uDCBF]' + }, + { + 'name': 'InMasaram_Gondi', + 'astral': '\uD807[\uDD00-\uDD5F]' + }, + { + 'name': 'InMathematical_Alphanumeric_Symbols', + 'astral': '\uD835[\uDC00-\uDFFF]' + }, + { + 'name': 'InMathematical_Operators', + 'bmp': '\u2200-\u22FF' + }, + { + 'name': 'InMayan_Numerals', + 'astral': '\uD834[\uDEE0-\uDEFF]' + }, + { + 'name': 'InMedefaidrin', + 'astral': '\uD81B[\uDE40-\uDE9F]' + }, + { + 'name': 'InMeetei_Mayek', + 'bmp': '\uABC0-\uABFF' + }, + { + 'name': 'InMeetei_Mayek_Extensions', + 'bmp': '\uAAE0-\uAAFF' + }, + { + 'name': 'InMende_Kikakui', + 'astral': '\uD83A[\uDC00-\uDCDF]' + }, + { + 'name': 'InMeroitic_Cursive', + 'astral': '\uD802[\uDDA0-\uDDFF]' + }, + { + 'name': 'InMeroitic_Hieroglyphs', + 'astral': '\uD802[\uDD80-\uDD9F]' + }, + { + 'name': 'InMiao', + 'astral': '\uD81B[\uDF00-\uDF9F]' + }, + { + 'name': 'InMiscellaneous_Mathematical_Symbols_A', + 'bmp': '\u27C0-\u27EF' + }, + { + 'name': 'InMiscellaneous_Mathematical_Symbols_B', + 'bmp': '\u2980-\u29FF' + }, + { + 'name': 'InMiscellaneous_Symbols', + 'bmp': '\u2600-\u26FF' + }, + { + 'name': 'InMiscellaneous_Symbols_And_Arrows', + 'bmp': '\u2B00-\u2BFF' + }, + { + 'name': 'InMiscellaneous_Symbols_And_Pictographs', + 'astral': '\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]' + }, + { + 'name': 'InMiscellaneous_Technical', + 'bmp': '\u2300-\u23FF' + }, + { + 'name': 'InModi', + 'astral': '\uD805[\uDE00-\uDE5F]' + }, + { + 'name': 'InModifier_Tone_Letters', + 'bmp': '\uA700-\uA71F' + }, + { + 'name': 'InMongolian', + 'bmp': '\u1800-\u18AF' + }, + { + 'name': 'InMongolian_Supplement', + 'astral': '\uD805[\uDE60-\uDE7F]' + }, + { + 'name': 'InMro', + 'astral': '\uD81A[\uDE40-\uDE6F]' + }, + { + 'name': 'InMultani', + 'astral': '\uD804[\uDE80-\uDEAF]' + }, + { + 'name': 'InMusical_Symbols', + 'astral': '\uD834[\uDD00-\uDDFF]' + }, + { + 'name': 'InMyanmar', + 'bmp': '\u1000-\u109F' + }, + { + 'name': 'InMyanmar_Extended_A', + 'bmp': '\uAA60-\uAA7F' + }, + { + 'name': 'InMyanmar_Extended_B', + 'bmp': '\uA9E0-\uA9FF' + }, + { + 'name': 'InNKo', + 'bmp': '\u07C0-\u07FF' + }, + { + 'name': 'InNabataean', + 'astral': '\uD802[\uDC80-\uDCAF]' + }, + { + 'name': 'InNew_Tai_Lue', + 'bmp': '\u1980-\u19DF' + }, + { + 'name': 'InNewa', + 'astral': '\uD805[\uDC00-\uDC7F]' + }, + { + 'name': 'InNumber_Forms', + 'bmp': '\u2150-\u218F' + }, + { + 'name': 'InNushu', + 'astral': '\uD82C[\uDD70-\uDEFF]' + }, + { + 'name': 'InOgham', + 'bmp': '\u1680-\u169F' + }, + { + 'name': 'InOl_Chiki', + 'bmp': '\u1C50-\u1C7F' + }, + { + 'name': 'InOld_Hungarian', + 'astral': '\uD803[\uDC80-\uDCFF]' + }, + { + 'name': 'InOld_Italic', + 'astral': '\uD800[\uDF00-\uDF2F]' + }, + { + 'name': 'InOld_North_Arabian', + 'astral': '\uD802[\uDE80-\uDE9F]' + }, + { + 'name': 'InOld_Permic', + 'astral': '\uD800[\uDF50-\uDF7F]' + }, + { + 'name': 'InOld_Persian', + 'astral': '\uD800[\uDFA0-\uDFDF]' + }, + { + 'name': 'InOld_Sogdian', + 'astral': '\uD803[\uDF00-\uDF2F]' + }, + { + 'name': 'InOld_South_Arabian', + 'astral': '\uD802[\uDE60-\uDE7F]' + }, + { + 'name': 'InOld_Turkic', + 'astral': '\uD803[\uDC00-\uDC4F]' + }, + { + 'name': 'InOptical_Character_Recognition', + 'bmp': '\u2440-\u245F' + }, + { + 'name': 'InOriya', + 'bmp': '\u0B00-\u0B7F' + }, + { + 'name': 'InOrnamental_Dingbats', + 'astral': '\uD83D[\uDE50-\uDE7F]' + }, + { + 'name': 'InOsage', + 'astral': '\uD801[\uDCB0-\uDCFF]' + }, + { + 'name': 'InOsmanya', + 'astral': '\uD801[\uDC80-\uDCAF]' + }, + { + 'name': 'InPahawh_Hmong', + 'astral': '\uD81A[\uDF00-\uDF8F]' + }, + { + 'name': 'InPalmyrene', + 'astral': '\uD802[\uDC60-\uDC7F]' + }, + { + 'name': 'InPau_Cin_Hau', + 'astral': '\uD806[\uDEC0-\uDEFF]' + }, + { + 'name': 'InPhags_Pa', + 'bmp': '\uA840-\uA87F' + }, + { + 'name': 'InPhaistos_Disc', + 'astral': '\uD800[\uDDD0-\uDDFF]' + }, + { + 'name': 'InPhoenician', + 'astral': '\uD802[\uDD00-\uDD1F]' + }, + { + 'name': 'InPhonetic_Extensions', + 'bmp': '\u1D00-\u1D7F' + }, + { + 'name': 'InPhonetic_Extensions_Supplement', + 'bmp': '\u1D80-\u1DBF' + }, + { + 'name': 'InPlaying_Cards', + 'astral': '\uD83C[\uDCA0-\uDCFF]' + }, + { + 'name': 'InPrivate_Use_Area', + 'bmp': '\uE000-\uF8FF' + }, + { + 'name': 'InPsalter_Pahlavi', + 'astral': '\uD802[\uDF80-\uDFAF]' + }, + { + 'name': 'InRejang', + 'bmp': '\uA930-\uA95F' + }, + { + 'name': 'InRumi_Numeral_Symbols', + 'astral': '\uD803[\uDE60-\uDE7F]' + }, + { + 'name': 'InRunic', + 'bmp': '\u16A0-\u16FF' + }, + { + 'name': 'InSamaritan', + 'bmp': '\u0800-\u083F' + }, + { + 'name': 'InSaurashtra', + 'bmp': '\uA880-\uA8DF' + }, + { + 'name': 'InSharada', + 'astral': '\uD804[\uDD80-\uDDDF]' + }, + { + 'name': 'InShavian', + 'astral': '\uD801[\uDC50-\uDC7F]' + }, + { + 'name': 'InShorthand_Format_Controls', + 'astral': '\uD82F[\uDCA0-\uDCAF]' + }, + { + 'name': 'InSiddham', + 'astral': '\uD805[\uDD80-\uDDFF]' + }, + { + 'name': 'InSinhala', + 'bmp': '\u0D80-\u0DFF' + }, + { + 'name': 'InSinhala_Archaic_Numbers', + 'astral': '\uD804[\uDDE0-\uDDFF]' + }, + { + 'name': 'InSmall_Form_Variants', + 'bmp': '\uFE50-\uFE6F' + }, + { + 'name': 'InSogdian', + 'astral': '\uD803[\uDF30-\uDF6F]' + }, + { + 'name': 'InSora_Sompeng', + 'astral': '\uD804[\uDCD0-\uDCFF]' + }, + { + 'name': 'InSoyombo', + 'astral': '\uD806[\uDE50-\uDEAF]' + }, + { + 'name': 'InSpacing_Modifier_Letters', + 'bmp': '\u02B0-\u02FF' + }, + { + 'name': 'InSpecials', + 'bmp': '\uFFF0-\uFFFF' + }, + { + 'name': 'InSundanese', + 'bmp': '\u1B80-\u1BBF' + }, + { + 'name': 'InSundanese_Supplement', + 'bmp': '\u1CC0-\u1CCF' + }, + { + 'name': 'InSuperscripts_And_Subscripts', + 'bmp': '\u2070-\u209F' + }, + { + 'name': 'InSupplemental_Arrows_A', + 'bmp': '\u27F0-\u27FF' + }, + { + 'name': 'InSupplemental_Arrows_B', + 'bmp': '\u2900-\u297F' + }, + { + 'name': 'InSupplemental_Arrows_C', + 'astral': '\uD83E[\uDC00-\uDCFF]' + }, + { + 'name': 'InSupplemental_Mathematical_Operators', + 'bmp': '\u2A00-\u2AFF' + }, + { + 'name': 'InSupplemental_Punctuation', + 'bmp': '\u2E00-\u2E7F' + }, + { + 'name': 'InSupplemental_Symbols_And_Pictographs', + 'astral': '\uD83E[\uDD00-\uDDFF]' + }, + { + 'name': 'InSupplementary_Private_Use_Area_A', + 'astral': '[\uDB80-\uDBBF][\uDC00-\uDFFF]' + }, + { + 'name': 'InSupplementary_Private_Use_Area_B', + 'astral': '[\uDBC0-\uDBFF][\uDC00-\uDFFF]' + }, + { + 'name': 'InSutton_SignWriting', + 'astral': '\uD836[\uDC00-\uDEAF]' + }, + { + 'name': 'InSyloti_Nagri', + 'bmp': '\uA800-\uA82F' + }, + { + 'name': 'InSyriac', + 'bmp': '\u0700-\u074F' + }, + { + 'name': 'InSyriac_Supplement', + 'bmp': '\u0860-\u086F' + }, + { + 'name': 'InTagalog', + 'bmp': '\u1700-\u171F' + }, + { + 'name': 'InTagbanwa', + 'bmp': '\u1760-\u177F' + }, + { + 'name': 'InTags', + 'astral': '\uDB40[\uDC00-\uDC7F]' + }, + { + 'name': 'InTai_Le', + 'bmp': '\u1950-\u197F' + }, + { + 'name': 'InTai_Tham', + 'bmp': '\u1A20-\u1AAF' + }, + { + 'name': 'InTai_Viet', + 'bmp': '\uAA80-\uAADF' + }, + { + 'name': 'InTai_Xuan_Jing_Symbols', + 'astral': '\uD834[\uDF00-\uDF5F]' + }, + { + 'name': 'InTakri', + 'astral': '\uD805[\uDE80-\uDECF]' + }, + { + 'name': 'InTamil', + 'bmp': '\u0B80-\u0BFF' + }, + { + 'name': 'InTangut', + 'astral': '[\uD81C-\uD821][\uDC00-\uDFFF]' + }, + { + 'name': 'InTangut_Components', + 'astral': '\uD822[\uDC00-\uDEFF]' + }, + { + 'name': 'InTelugu', + 'bmp': '\u0C00-\u0C7F' + }, + { + 'name': 'InThaana', + 'bmp': '\u0780-\u07BF' + }, + { + 'name': 'InThai', + 'bmp': '\u0E00-\u0E7F' + }, + { + 'name': 'InTibetan', + 'bmp': '\u0F00-\u0FFF' + }, + { + 'name': 'InTifinagh', + 'bmp': '\u2D30-\u2D7F' + }, + { + 'name': 'InTirhuta', + 'astral': '\uD805[\uDC80-\uDCDF]' + }, + { + 'name': 'InTransport_And_Map_Symbols', + 'astral': '\uD83D[\uDE80-\uDEFF]' + }, + { + 'name': 'InUgaritic', + 'astral': '\uD800[\uDF80-\uDF9F]' + }, + { + 'name': 'InUnified_Canadian_Aboriginal_Syllabics', + 'bmp': '\u1400-\u167F' + }, + { + 'name': 'InUnified_Canadian_Aboriginal_Syllabics_Extended', + 'bmp': '\u18B0-\u18FF' + }, + { + 'name': 'InVai', + 'bmp': '\uA500-\uA63F' + }, + { + 'name': 'InVariation_Selectors', + 'bmp': '\uFE00-\uFE0F' + }, + { + 'name': 'InVariation_Selectors_Supplement', + 'astral': '\uDB40[\uDD00-\uDDEF]' + }, + { + 'name': 'InVedic_Extensions', + 'bmp': '\u1CD0-\u1CFF' + }, + { + 'name': 'InVertical_Forms', + 'bmp': '\uFE10-\uFE1F' + }, + { + 'name': 'InWarang_Citi', + 'astral': '\uD806[\uDCA0-\uDCFF]' + }, + { + 'name': 'InYi_Radicals', + 'bmp': '\uA490-\uA4CF' + }, + { + 'name': 'InYi_Syllables', + 'bmp': '\uA000-\uA48F' + }, + { + 'name': 'InYijing_Hexagram_Symbols', + 'bmp': '\u4DC0-\u4DFF' + }, + { + 'name': 'InZanabazar_Square', + 'astral': '\uD806[\uDE00-\uDE4F]' + } +]; + +},{}],647:[function(require,module,exports){ +module.exports = [ + { + 'name': 'C', + 'alias': 'Other', + 'isBmpLast': true, + 'bmp': '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0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F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u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\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]' + }, + { + 'name': 'Cc', + 'alias': 'Control', + 'bmp': '\0-\x1F\x7F-\x9F' + }, + { + 'name': 'Cf', + 'alias': 'Format', + 'bmp': '\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB', + 'astral': '\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]' + }, + { + 'name': 'Cn', + 'alias': 'Unassigned', + 'bmp': '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D04\u0D0D\u0D11\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FF0-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7BA-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9D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BBF\uDBFF][\uDC00-\uDFFD]' + }, + { + 'name': 'Cs', + 'alias': 'Surrogate', + 'bmp': '\uD800-\uDFFF' + }, + { + 'name': 'L', + 'alias': 'Letter', + 'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', + 'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]' + }, + { + 'name': 'LC', + 'alias': 'Cased_Letter', + 'bmp': 'A-Za-z\xB5\xC0-\xD6\xD8-\xF6\xF8-\u01BA\u01BC-\u01BF\u01C4-\u0293\u0295-\u02AF\u0370-\u0373\u0376\u0377\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0560-\u0588\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FD-\u10FF\u13A0-\u13F5\u13F8-\u13FD\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2134\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C7B\u2C7E-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA640-\uA66D\uA680-\uA69B\uA722-\uA76F\uA771-\uA787\uA78B-\uA78E\uA790-\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A', + 'astral': '\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDD00-\uDD43]' + }, + { + 'name': 'Ll', + 'alias': 'Lowercase_Letter', + 'bmp': 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u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\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A', + 'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]' + }, + { + 'name': 'Lm', + 'alias': 'Modifier_Letter', + 'bmp': '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F', + 'astral': '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1]' + }, + { + 'name': 'Lo', + 'alias': 'Other_Letter', + 'bmp': '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05EF-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', + 'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]' + }, + { + 'name': 'Lt', + 'alias': 'Titlecase_Letter', + 'bmp': '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC' + }, + { + 'name': 'Lu', + 'alias': 'Uppercase_Letter', + 'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A', + 'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]' + }, + { + 'name': 'M', + 'alias': 'Mark', + 'bmp': '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F', + 'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]' + }, + { + 'name': 'Mc', + 'alias': 'Spacing_Mark', + 'bmp': '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u1CF7\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC', + 'astral': '\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF7E]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]' + }, + { + 'name': 'Me', + 'alias': 'Enclosing_Mark', + 'bmp': '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672' + }, + { + 'name': 'Mn', + 'alias': 'Nonspacing_Mark', + 'bmp': '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F', + 'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9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': 'N', + 'alias': 'Number', + 'bmp': '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19', + 'astral': '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]' + }, + { + 'name': 'Nd', + 'alias': 'Decimal_Number', + 'bmp': '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19', + 'astral': '\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDD50-\uDD59]' + }, + { + 'name': 'Nl', + 'alias': 'Letter_Number', + 'bmp': '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF', + 'astral': '\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]' + }, + { + 'name': 'No', + 'alias': 'Other_Number', + 'bmp': '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D58-\u0D5E\u0D70-\u0D78\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835', + 'astral': '\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]' + }, + { + 'name': 'P', + 'alias': 'Punctuation', + 'bmp': '!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65', + 'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]' + }, + { + 'name': 'Pc', + 'alias': 'Connector_Punctuation', + 'bmp': '_\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F' + }, + { + 'name': 'Pd', + 'alias': 'Dash_Punctuation', + 'bmp': '\\-\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D' + }, + { + 'name': 'Pe', + 'alias': 'Close_Punctuation', + 'bmp': '\\)\\]\\}\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63' + }, + { + 'name': 'Pf', + 'alias': 'Final_Punctuation', + 'bmp': '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21' + }, + { + 'name': 'Pi', + 'alias': 'Initial_Punctuation', + 'bmp': '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20' + }, + { + 'name': 'Po', + 'alias': 'Other_Punctuation', + 'bmp': '!-#%-\'\\*,\\.\\/:;\\?@\\\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u2E43-\u2E4E\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65', + 'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]' + }, + { + 'name': 'Ps', + 'alias': 'Open_Punctuation', + 'bmp': '\\(\\[\\{\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62' + }, + { + 'name': 'S', + 'alias': 'Symbol', + 'bmp': '\\$\\+<->\\^`\\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD', + 'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B[\uDCAC\uDCB0\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]' + }, + { + 'name': 'Sc', + 'alias': 'Currency_Symbol', + 'bmp': '\\$\xA2-\xA5\u058F\u060B\u07FE\u07FF\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BF\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6', + 'astral': '\uD83B\uDCB0' + }, + { + 'name': 'Sk', + 'alias': 'Modifier_Symbol', + 'bmp': '\\^`\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3', + 'astral': '\uD83C[\uDFFB-\uDFFF]' + }, + { + 'name': 'Sm', + 'alias': 'Math_Symbol', + 'bmp': '\\+<->\\|~\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC', + 'astral': '\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]' + }, + { + 'name': 'So', + 'alias': 'Other_Symbol', + 'bmp': '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D4F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD', + 'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B\uDCAC|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]' + }, + { + 'name': 'Z', + 'alias': 'Separator', + 'bmp': ' \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000' + }, + { + 'name': 'Zl', + 'alias': 'Line_Separator', + 'bmp': '\u2028' + }, + { + 'name': 'Zp', + 'alias': 'Paragraph_Separator', + 'bmp': '\u2029' + }, + { + 'name': 'Zs', + 'alias': 'Space_Separator', + 'bmp': ' \xA0\u1680\u2000-\u200A\u202F\u205F\u3000' + } +]; + +},{}],648:[function(require,module,exports){ +module.exports = [ + { + 'name': 'ASCII', + 'bmp': '\0-\x7F' + }, + { + 'name': 'Alphabetic', + 'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9-\u0AFC\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', + 'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD46\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF1A\uDF1D-\uDF2A]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE83\uDE86-\uDE97\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]' + }, + { + 'name': 'Any', + 'isBmpLast': true, + 'bmp': '\0-\uFFFF', + 'astral': '[\uD800-\uDBFF][\uDC00-\uDFFF]' + }, + { + 'name': 'Default_Ignorable_Code_Point', + 'bmp': '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8', + 'astral': '\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]' + }, + { + 'name': 'Lowercase', + 'bmp': 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A', + 'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]' + }, + { + 'name': 'Noncharacter_Code_Point', + 'bmp': '\uFDD0-\uFDEF\uFFFE\uFFFF', + 'astral': '[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]' + }, + { + 'name': 'Uppercase', + 'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A', + 'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]' + }, + { + 'name': 'White_Space', + 'bmp': '\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000' + } +]; + +},{}],649:[function(require,module,exports){ +module.exports = [ + { + 'name': 'Adlam', + 'astral': '\uD83A[\uDD00-\uDD4A\uDD50-\uDD59\uDD5E\uDD5F]' + }, + { + 'name': 'Ahom', + 'astral': '\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3F]' + }, + { + 'name': 'Anatolian_Hieroglyphs', + 'astral': '\uD811[\uDC00-\uDE46]' + }, + { + 'name': 'Arabic', + 'bmp': '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC', + 'astral': '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]' + }, + { + 'name': 'Armenian', + 'bmp': '\u0531-\u0556\u0559-\u0588\u058A\u058D-\u058F\uFB13-\uFB17' + }, + { + 'name': 'Avestan', + 'astral': '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]' + }, + { + 'name': 'Balinese', + 'bmp': '\u1B00-\u1B4B\u1B50-\u1B7C' + }, + { + 'name': 'Bamum', + 'bmp': '\uA6A0-\uA6F7', + 'astral': '\uD81A[\uDC00-\uDE38]' + }, + { + 'name': 'Bassa_Vah', + 'astral': '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]' + }, + { + 'name': 'Batak', + 'bmp': '\u1BC0-\u1BF3\u1BFC-\u1BFF' + }, + { + 'name': 'Bengali', + 'bmp': '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE' + }, + { + 'name': 'Bhaiksuki', + 'astral': '\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]' + }, + { + 'name': 'Bopomofo', + 'bmp': '\u02EA\u02EB\u3105-\u312F\u31A0-\u31BA' + }, + { + 'name': 'Brahmi', + 'astral': '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]' + }, + { + 'name': 'Braille', + 'bmp': '\u2800-\u28FF' + }, + { + 'name': 'Buginese', + 'bmp': '\u1A00-\u1A1B\u1A1E\u1A1F' + }, + { + 'name': 'Buhid', + 'bmp': '\u1740-\u1753' + }, + { + 'name': 'Canadian_Aboriginal', + 'bmp': '\u1400-\u167F\u18B0-\u18F5' + }, + { + 'name': 'Carian', + 'astral': '\uD800[\uDEA0-\uDED0]' + }, + { + 'name': 'Caucasian_Albanian', + 'astral': '\uD801[\uDD30-\uDD63\uDD6F]' + }, + { + 'name': 'Chakma', + 'astral': '\uD804[\uDD00-\uDD34\uDD36-\uDD46]' + }, + { + 'name': 'Cham', + 'bmp': '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F' + }, + { + 'name': 'Cherokee', + 'bmp': '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF' + }, + { + 'name': 'Common', + 'bmp': '\0-@\\[-`\\{-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061F\u0640\u06DD\u08E2\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BF\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2E00-\u2E4E\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD', + 'astral': '\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]|\uDB40[\uDC01\uDC20-\uDC7F]' + }, + { + 'name': 'Coptic', + 'bmp': '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF' + }, + { + 'name': 'Cuneiform', + 'astral': '\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]' + }, + { + 'name': 'Cypriot', + 'astral': '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]' + }, + { + 'name': 'Cyrillic', + 'bmp': '\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F' + }, + { + 'name': 'Deseret', + 'astral': '\uD801[\uDC00-\uDC4F]' + }, + { + 'name': 'Devanagari', + 'bmp': '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FF' + }, + { + 'name': 'Dogra', + 'astral': '\uD806[\uDC00-\uDC3B]' + }, + { + 'name': 'Duployan', + 'astral': '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]' + }, + { + 'name': 'Egyptian_Hieroglyphs', + 'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]' + }, + { + 'name': 'Elbasan', + 'astral': '\uD801[\uDD00-\uDD27]' + }, + { + 'name': 'Ethiopic', + 'bmp': '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E' + }, + { + 'name': 'Georgian', + 'bmp': '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D' + }, + { + 'name': 'Glagolitic', + 'bmp': '\u2C00-\u2C2E\u2C30-\u2C5E', + 'astral': '\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]' + }, + { + 'name': 'Gothic', + 'astral': '\uD800[\uDF30-\uDF4A]' + }, + { + 'name': 'Grantha', + 'astral': '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]' + }, + { + 'name': 'Greek', + 'bmp': '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65', + 'astral': '\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]' + }, + { + 'name': 'Gujarati', + 'bmp': '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF' + }, + { + 'name': 'Gunjala_Gondi', + 'astral': '\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]' + }, + { + 'name': 'Gurmukhi', + 'bmp': '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76' + }, + { + 'name': 'Han', + 'bmp': '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FEF\uF900-\uFA6D\uFA70-\uFAD9', + 'astral': '[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]' + }, + { + 'name': 'Hangul', + 'bmp': '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC' + }, + { + 'name': 'Hanifi_Rohingya', + 'astral': '\uD803[\uDD00-\uDD27\uDD30-\uDD39]' + }, + { + 'name': 'Hanunoo', + 'bmp': '\u1720-\u1734' + }, + { + 'name': 'Hatran', + 'astral': '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]' + }, + { + 'name': 'Hebrew', + 'bmp': '\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F' + }, + { + 'name': 'Hiragana', + 'bmp': '\u3041-\u3096\u309D-\u309F', + 'astral': '\uD82C[\uDC01-\uDD1E]|\uD83C\uDE00' + }, + { + 'name': 'Imperial_Aramaic', + 'astral': '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]' + }, + { + 'name': 'Inherited', + 'bmp': '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D', + 'astral': '\uD800[\uDDFD\uDEE0]|\uD804\uDF3B|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]' + }, + { + 'name': 'Inscriptional_Pahlavi', + 'astral': '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]' + }, + { + 'name': 'Inscriptional_Parthian', + 'astral': '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]' + }, + { + 'name': 'Javanese', + 'bmp': '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF' + }, + { + 'name': 'Kaithi', + 'astral': '\uD804[\uDC80-\uDCC1\uDCCD]' + }, + { + 'name': 'Kannada', + 'bmp': '\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2' + }, + { + 'name': 'Katakana', + 'bmp': '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D', + 'astral': '\uD82C\uDC00' + }, + { + 'name': 'Kayah_Li', + 'bmp': '\uA900-\uA92D\uA92F' + }, + { + 'name': 'Kharoshthi', + 'astral': '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]' + }, + { + 'name': 'Khmer', + 'bmp': '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF' + }, + { + 'name': 'Khojki', + 'astral': '\uD804[\uDE00-\uDE11\uDE13-\uDE3E]' + }, + { + 'name': 'Khudawadi', + 'astral': '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]' + }, + { + 'name': 'Lao', + 'bmp': '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF' + }, + { + 'name': 'Latin', + 'bmp': 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7B9\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A' + }, + { + 'name': 'Lepcha', + 'bmp': '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F' + }, + { + 'name': 'Limbu', + 'bmp': '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F' + }, + { + 'name': 'Linear_A', + 'astral': '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]' + }, + { + 'name': 'Linear_B', + 'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]' + }, + { + 'name': 'Lisu', + 'bmp': '\uA4D0-\uA4FF' + }, + { + 'name': 'Lycian', + 'astral': '\uD800[\uDE80-\uDE9C]' + }, + { + 'name': 'Lydian', + 'astral': '\uD802[\uDD20-\uDD39\uDD3F]' + }, + { + 'name': 'Mahajani', + 'astral': '\uD804[\uDD50-\uDD76]' + }, + { + 'name': 'Makasar', + 'astral': '\uD807[\uDEE0-\uDEF8]' + }, + { + 'name': 'Malayalam', + 'bmp': '\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F' + }, + { + 'name': 'Mandaic', + 'bmp': '\u0840-\u085B\u085E' + }, + { + 'name': 'Manichaean', + 'astral': '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]' + }, + { + 'name': 'Marchen', + 'astral': '\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]' + }, + { + 'name': 'Masaram_Gondi', + 'astral': '\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]' + }, + { + 'name': 'Medefaidrin', + 'astral': '\uD81B[\uDE40-\uDE9A]' + }, + { + 'name': 'Meetei_Mayek', + 'bmp': '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9' + }, + { + 'name': 'Mende_Kikakui', + 'astral': '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]' + }, + { + 'name': 'Meroitic_Cursive', + 'astral': '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]' + }, + { + 'name': 'Meroitic_Hieroglyphs', + 'astral': '\uD802[\uDD80-\uDD9F]' + }, + { + 'name': 'Miao', + 'astral': '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]' + }, + { + 'name': 'Modi', + 'astral': '\uD805[\uDE00-\uDE44\uDE50-\uDE59]' + }, + { + 'name': 'Mongolian', + 'bmp': '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1878\u1880-\u18AA', + 'astral': '\uD805[\uDE60-\uDE6C]' + }, + { + 'name': 'Mro', + 'astral': '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]' + }, + { + 'name': 'Multani', + 'astral': '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]' + }, + { + 'name': 'Myanmar', + 'bmp': '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F' + }, + { + 'name': 'Nabataean', + 'astral': '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]' + }, + { + 'name': 'New_Tai_Lue', + 'bmp': '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF' + }, + { + 'name': 'Newa', + 'astral': '\uD805[\uDC00-\uDC59\uDC5B\uDC5D\uDC5E]' + }, + { + 'name': 'Nko', + 'bmp': '\u07C0-\u07FA\u07FD-\u07FF' + }, + { + 'name': 'Nushu', + 'astral': '\uD81B\uDFE1|\uD82C[\uDD70-\uDEFB]' + }, + { + 'name': 'Ogham', + 'bmp': '\u1680-\u169C' + }, + { + 'name': 'Ol_Chiki', + 'bmp': '\u1C50-\u1C7F' + }, + { + 'name': 'Old_Hungarian', + 'astral': '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]' + }, + { + 'name': 'Old_Italic', + 'astral': '\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]' + }, + { + 'name': 'Old_North_Arabian', + 'astral': '\uD802[\uDE80-\uDE9F]' + }, + { + 'name': 'Old_Permic', + 'astral': '\uD800[\uDF50-\uDF7A]' + }, + { + 'name': 'Old_Persian', + 'astral': '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]' + }, + { + 'name': 'Old_Sogdian', + 'astral': '\uD803[\uDF00-\uDF27]' + }, + { + 'name': 'Old_South_Arabian', + 'astral': '\uD802[\uDE60-\uDE7F]' + }, + { + 'name': 'Old_Turkic', + 'astral': '\uD803[\uDC00-\uDC48]' + }, + { + 'name': 'Oriya', + 'bmp': '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77' + }, + { + 'name': 'Osage', + 'astral': '\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]' + }, + { + 'name': 'Osmanya', + 'astral': '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]' + }, + { + 'name': 'Pahawh_Hmong', + 'astral': '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]' + }, + { + 'name': 'Palmyrene', + 'astral': '\uD802[\uDC60-\uDC7F]' + }, + { + 'name': 'Pau_Cin_Hau', + 'astral': '\uD806[\uDEC0-\uDEF8]' + }, + { + 'name': 'Phags_Pa', + 'bmp': '\uA840-\uA877' + }, + { + 'name': 'Phoenician', + 'astral': '\uD802[\uDD00-\uDD1B\uDD1F]' + }, + { + 'name': 'Psalter_Pahlavi', + 'astral': '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]' + }, + { + 'name': 'Rejang', + 'bmp': '\uA930-\uA953\uA95F' + }, + { + 'name': 'Runic', + 'bmp': '\u16A0-\u16EA\u16EE-\u16F8' + }, + { + 'name': 'Samaritan', + 'bmp': '\u0800-\u082D\u0830-\u083E' + }, + { + 'name': 'Saurashtra', + 'bmp': '\uA880-\uA8C5\uA8CE-\uA8D9' + }, + { + 'name': 'Sharada', + 'astral': '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]' + }, + { + 'name': 'Shavian', + 'astral': '\uD801[\uDC50-\uDC7F]' + }, + { + 'name': 'Siddham', + 'astral': '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]' + }, + { + 'name': 'SignWriting', + 'astral': '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]' + }, + { + 'name': 'Sinhala', + 'bmp': '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4', + 'astral': '\uD804[\uDDE1-\uDDF4]' + }, + { + 'name': 'Sogdian', + 'astral': '\uD803[\uDF30-\uDF59]' + }, + { + 'name': 'Sora_Sompeng', + 'astral': '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]' + }, + { + 'name': 'Soyombo', + 'astral': '\uD806[\uDE50-\uDE83\uDE86-\uDEA2]' + }, + { + 'name': 'Sundanese', + 'bmp': '\u1B80-\u1BBF\u1CC0-\u1CC7' + }, + { + 'name': 'Syloti_Nagri', + 'bmp': '\uA800-\uA82B' + }, + { + 'name': 'Syriac', + 'bmp': '\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A' + }, + { + 'name': 'Tagalog', + 'bmp': '\u1700-\u170C\u170E-\u1714' + }, + { + 'name': 'Tagbanwa', + 'bmp': '\u1760-\u176C\u176E-\u1770\u1772\u1773' + }, + { + 'name': 'Tai_Le', + 'bmp': '\u1950-\u196D\u1970-\u1974' + }, + { + 'name': 'Tai_Tham', + 'bmp': '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD' + }, + { + 'name': 'Tai_Viet', + 'bmp': '\uAA80-\uAAC2\uAADB-\uAADF' + }, + { + 'name': 'Takri', + 'astral': '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]' + }, + { + 'name': 'Tamil', + 'bmp': '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA' + }, + { + 'name': 'Tangut', + 'astral': '\uD81B\uDFE0|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]' + }, + { + 'name': 'Telugu', + 'bmp': '\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F' + }, + { + 'name': 'Thaana', + 'bmp': '\u0780-\u07B1' + }, + { + 'name': 'Thai', + 'bmp': '\u0E01-\u0E3A\u0E40-\u0E5B' + }, + { + 'name': 'Tibetan', + 'bmp': '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA' + }, + { + 'name': 'Tifinagh', + 'bmp': '\u2D30-\u2D67\u2D6F\u2D70\u2D7F' + }, + { + 'name': 'Tirhuta', + 'astral': '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]' + }, + { + 'name': 'Ugaritic', + 'astral': '\uD800[\uDF80-\uDF9D\uDF9F]' + }, + { + 'name': 'Vai', + 'bmp': '\uA500-\uA62B' + }, + { + 'name': 'Warang_Citi', + 'astral': '\uD806[\uDCA0-\uDCF2\uDCFF]' + }, + { + 'name': 'Yi', + 'bmp': '\uA000-\uA48C\uA490-\uA4C6' + }, + { + 'name': 'Zanabazar_Square', + 'astral': '\uD806[\uDE00-\uDE47]' + } +]; + +},{}],650:[function(require,module,exports){ +module.exports={ + "name": "cucumber", + "description": "The official JavaScript implementation of Cucumber.", + "keywords": [ + "testing", + "bdd", + "cucumber", + "gherkin", + "tests" + ], + "version": "6.0.2", + "homepage": "http://github.com/cucumber/cucumber-js", + "author": "Julien Biezemans (http://jbpros.net)", + "contributors": [ + "Julien Biezemans (http://jbpros.net)", + "Fernando Acorreia ", + "Paul Jensen ", + "Kushal Pisavadia", + "Olivier Melcher ", + "Tristan Dunn ", + "Ted de Koning", + "Renier Morales ", + "Aslak Hellesøy ", + "Aaron Garvey", + "Omar Gonzalez ", + "Chris Young ", + "Israel Halle ", + "Matteo Collina ", + "Niklas Närhinen ", + "Kim, Jang-hwan ", + "Michael Zedeler ", + "Tom V ", + "David Godfrey ", + "Paul Shannon (http://devpaul.com)", + "Simon Dean (http://www.simondean.org)", + "John Wright ", + "Johny Jose ", + "Marat Dyatko ", + "Tim Perry ", + "Fedotov Daniil ", + "unknown ", + "Ben Van Treese ", + "Gabe Hayes ", + "Brian Clozel ", + "Lukas Degener ", + "Simon Lampen ", + "Eddie Loeffen ", + "Stanley Shyiko ", + "Artur Kania ", + "Sam Saccone ", + "Craig Morris ", + "Gary Taylor ", + "Krispin Schulz ", + "Elwyn ", + "Jan-Eric Duden ", + "kostya.misura ", + "Julian ", + "nebehr ", + "Jesse Harlin ", + "Sonny Piers ", + "Will Farrell ", + "Kevin Kirsche ", + "chrismilleruk ", + "Mateusz Derks ", + "Mark Amery ", + "Artem Repko ", + "zs-zs ", + "Dale Gardner ", + "Charles Rudolph ", + "Karthik Viswanath ", + "Marcel Hoyer ", + "Artem Bronitsky ", + "Karine Pires ", + "Rick Lee-Morlang ", + "Noah Davis ", + "Miika Hänninen ", + "Kevin Goslar ", + "John Krull ", + "Maxim Koretskiy ", + "seantdg ", + "Marc Burton ", + "Jonathan Kim ", + "Ádám Gólya ", + "Scott Deakin ", + "efokschaner ", + "John McLaughlin ", + "Josh Goldberg ", + "Artur Pomadowski ", + "Benjamín Eidelman ", + "Jan Molak ", + "dbillingham ", + "Jonathan Gomez ", + "Oliver Rogers ", + "Hugues Malphettes ", + "gforceg ", + "Zearin ", + "Cody Ray Hoeft ", + "Florian Ribon ", + "temyers ", + "Martin Delille ", + "yaronassa ", + "Nico Jansen ", + "Łukasz Gandecki ", + "Warren ", + "Vasily Shelkov ", + "Steve Tooke ", + "João Guilherme Farias Duda ", + "szymonprz ", + "Olle Jonsson ", + "Darrin Holst ", + "Dmitry Shirokov ", + "Jayson Smith ", + "jshifflet ", + "Máté Karácsony ", + "Ilya Kozhevnikov ", + "Giuseppe DiBella ", + "Marco Muller ", + "Valerio Innocenti Sedili ", + "Alon Diamant ", + "RolandArgos ", + "Julian ", + "Bruce Lindsay ", + "Josua Schmid ", + "DevSide ", + "ahulab ", + "Kyle Moore ", + "basemmerink ", + "David H. Gutteridge ", + "lopesc ", + "Honza Javorek ", + "Josh Chisholm ", + "Izhaki ", + "Niyaz Akhmetov ", + "Sérgio Junior ", + "mgonnet ", + "Joey Jan ", + "David Goss ", + "Artur Neumann " + ], + "repository": { + "type": "git", + "url": "git://github.com/cucumber/cucumber-js.git" + }, + "bugs": { + "email": "cukes@googlegroups.com", + "url": "http://github.com/cucumber/cucumber-js/issues" + }, + "directories": { + "lib": "./lib" + }, + "main": "./lib/index", + "engines": { + "node": ">=8" + }, + "dependencies": { + "assertion-error-formatter": "^3.0.0", + "bluebird": "^3.4.1", + "cli-table3": "^0.5.1", + "colors": "^1.1.2", + "commander": "^3.0.1", + "cucumber-expressions": "^8.0.1", + "cucumber-tag-expressions": "^2.0.2", + "duration": "^0.2.1", + "escape-string-regexp": "^2.0.0", + "figures": "^3.0.0", + "gherkin": "5.0.0", + "glob": "^7.1.3", + "indent-string": "^4.0.0", + "is-generator": "^1.0.2", + "is-stream": "^2.0.0", + "knuth-shuffle-seeded": "^1.0.6", + "lodash": "^4.17.14", + "mz": "^2.4.0", + "progress": "^2.0.0", + "resolve": "^1.3.3", + "serialize-error": "^4.1.0", + "stack-chain": "^2.0.0", + "stacktrace-js": "^2.0.0", + "string-argv": "^0.3.0", + "title-case": "^2.1.1", + "util-arity": "^1.0.2", + "verror": "^1.9.0" + }, + "devDependencies": { + "@babel/cli": "^7.2.3", + "@babel/core": "^7.2.2", + "@babel/plugin-proposal-function-bind": "^7.2.0", + "@babel/preset-env": "^7.2.3", + "@babel/register": "^7.0.0", + "ansi-html": "^0.0.7", + "babel-eslint": "^10.0.1", + "babel-plugin-istanbul": "^5.1.0", + "babelify": "^10.0.0", + "browserify": "^16.2.2", + "chai": "^4.0.1", + "coffeescript": "^2.4.1", + "connect": "^3.4.0", + "core-js": "^3.2.1", + "coveralls": "^3.0.0", + "dependency-lint": "^6.0.0", + "eslint": "^6.3.0", + "eslint-config-prettier": "^6.1.0", + "eslint-config-standard": "^14.1.0", + "eslint-plugin-babel": "^5.3.0", + "eslint-plugin-import": "^2.17.1", + "eslint-plugin-node": "^9.0.0", + "eslint-plugin-prettier": "^3.0.0", + "eslint-plugin-promise": "^4.1.1", + "eslint-plugin-standard": "^4.0.0", + "fs-extra": "^8.0.0", + "mocha": "^6.1.3", + "mustache": "^3.0.1", + "nyc": "^14.0.0", + "prettier": "^1.5.2", + "regenerator-runtime": "^0.13.3", + "serve-static": "^1.10.0", + "sinon": "^7.3.1", + "sinon-chai": "^3.3.0", + "stream-to-string": "^1.1.0", + "tmp": "^0.1.0" + }, + "scripts": { + "build-browser-example": "BABEL_ENV=browser browserify example/index.js -o dist/browser-example.js -t babelify", + "build-local-continuous": "babel src --watch -d lib --ignore '**/*_spec.js'", + "build-local": "babel src -d lib --ignore '**/*_spec.js'", + "build-release": "BABEL_ENV=browser browserify scripts/cucumber.js -o dist/cucumber.js -t babelify --standalone Cucumber --debug", + "feature-test": "node ./bin/cucumber-js", + "lint-autofix": "eslint --fix \"{example,features,scripts,src,test}/**/*.js\"", + "lint-code": "eslint \"{example,features,scripts,src,test}/**/*.js\"", + "lint-dependencies": "dependency-lint", + "lint": "yarn run lint-code && yarn run lint-dependencies", + "prefeature-test": "yarn run build-local", + "prepublishOnly": "rm -r lib && yarn run build-local", + "test-coverage": "yarn run lint && ./scripts/test-coverage.sh", + "test": "yarn run lint && yarn run unit-test && yarn run feature-test", + "unit-test": "mocha src" + }, + "bin": { + "cucumber-js": "./bin/cucumber-js" + }, + "license": "MIT", + "files": [ + "bin/", + "dist/", + "lib/" + ] +} + +},{}],651:[function(require,module,exports){ +"use strict"; + +require("core-js/modules/es.symbol"); + +require("core-js/modules/es.symbol.description"); + +require("core-js/modules/es.symbol.async-iterator"); + +require("core-js/modules/es.symbol.has-instance"); + +require("core-js/modules/es.symbol.is-concat-spreadable"); + +require("core-js/modules/es.symbol.iterator"); + +require("core-js/modules/es.symbol.match"); + +require("core-js/modules/es.symbol.replace"); + +require("core-js/modules/es.symbol.search"); + +require("core-js/modules/es.symbol.species"); + +require("core-js/modules/es.symbol.split"); + +require("core-js/modules/es.symbol.to-primitive"); + +require("core-js/modules/es.symbol.to-string-tag"); + +require("core-js/modules/es.symbol.unscopables"); + +require("core-js/modules/es.array.concat"); + +require("core-js/modules/es.array.copy-within"); + +require("core-js/modules/es.array.every"); + +require("core-js/modules/es.array.fill"); + +require("core-js/modules/es.array.filter"); + +require("core-js/modules/es.array.find"); + +require("core-js/modules/es.array.find-index"); + +require("core-js/modules/es.array.flat"); + +require("core-js/modules/es.array.flat-map"); + +require("core-js/modules/es.array.for-each"); + +require("core-js/modules/es.array.from"); + +require("core-js/modules/es.array.includes"); + +require("core-js/modules/es.array.index-of"); + +require("core-js/modules/es.array.iterator"); + +require("core-js/modules/es.array.join"); + +require("core-js/modules/es.array.last-index-of"); + +require("core-js/modules/es.array.map"); + +require("core-js/modules/es.array.of"); + +require("core-js/modules/es.array.reduce"); + +require("core-js/modules/es.array.reduce-right"); + +require("core-js/modules/es.array.reverse"); + +require("core-js/modules/es.array.slice"); + +require("core-js/modules/es.array.some"); + +require("core-js/modules/es.array.sort"); + +require("core-js/modules/es.array.species"); + +require("core-js/modules/es.array.splice"); + +require("core-js/modules/es.array.unscopables.flat"); + +require("core-js/modules/es.array.unscopables.flat-map"); + +require("core-js/modules/es.array-buffer.constructor"); + +require("core-js/modules/es.array-buffer.is-view"); + +require("core-js/modules/es.array-buffer.slice"); + +require("core-js/modules/es.data-view"); + +require("core-js/modules/es.date.to-iso-string"); + +require("core-js/modules/es.date.to-json"); + +require("core-js/modules/es.date.to-primitive"); + +require("core-js/modules/es.date.to-string"); + +require("core-js/modules/es.function.has-instance"); + +require("core-js/modules/es.function.name"); + +require("core-js/modules/es.json.to-string-tag"); + +require("core-js/modules/es.map"); + +require("core-js/modules/es.math.acosh"); + +require("core-js/modules/es.math.asinh"); + +require("core-js/modules/es.math.atanh"); + +require("core-js/modules/es.math.cbrt"); + +require("core-js/modules/es.math.clz32"); + +require("core-js/modules/es.math.cosh"); + +require("core-js/modules/es.math.expm1"); + +require("core-js/modules/es.math.fround"); + +require("core-js/modules/es.math.hypot"); + +require("core-js/modules/es.math.imul"); + +require("core-js/modules/es.math.log10"); + +require("core-js/modules/es.math.log1p"); + +require("core-js/modules/es.math.log2"); + +require("core-js/modules/es.math.sign"); + +require("core-js/modules/es.math.sinh"); + +require("core-js/modules/es.math.tanh"); + +require("core-js/modules/es.math.to-string-tag"); + +require("core-js/modules/es.math.trunc"); + +require("core-js/modules/es.number.constructor"); + +require("core-js/modules/es.number.epsilon"); require("core-js/modules/es.number.is-finite"); @@ -67218,7 +73129,7 @@ Object.keys(_index).forEach(function (key) { }); }); -},{"../src/index":600,"core-js/modules/es.array-buffer.constructor":191,"core-js/modules/es.array-buffer.is-view":192,"core-js/modules/es.array-buffer.slice":193,"core-js/modules/es.array.concat":194,"core-js/modules/es.array.copy-within":195,"core-js/modules/es.array.every":196,"core-js/modules/es.array.fill":197,"core-js/modules/es.array.filter":198,"core-js/modules/es.array.find":200,"core-js/modules/es.array.find-index":199,"core-js/modules/es.array.flat":202,"core-js/modules/es.array.flat-map":201,"core-js/modules/es.array.for-each":203,"core-js/modules/es.array.from":204,"core-js/modules/es.array.includes":205,"core-js/modules/es.array.index-of":206,"core-js/modules/es.array.iterator":207,"core-js/modules/es.array.join":208,"core-js/modules/es.array.last-index-of":209,"core-js/modules/es.array.map":210,"core-js/modules/es.array.of":211,"core-js/modules/es.array.reduce":213,"core-js/modules/es.array.reduce-right":212,"core-js/modules/es.array.reverse":214,"core-js/modules/es.array.slice":215,"core-js/modules/es.array.some":216,"core-js/modules/es.array.sort":217,"core-js/modules/es.array.species":218,"core-js/modules/es.array.splice":219,"core-js/modules/es.array.unscopables.flat":221,"core-js/modules/es.array.unscopables.flat-map":220,"core-js/modules/es.data-view":222,"core-js/modules/es.date.to-iso-string":223,"core-js/modules/es.date.to-json":224,"core-js/modules/es.date.to-primitive":225,"core-js/modules/es.date.to-string":226,"core-js/modules/es.function.has-instance":227,"core-js/modules/es.function.name":228,"core-js/modules/es.json.to-string-tag":229,"core-js/modules/es.map":230,"core-js/modules/es.math.acosh":231,"core-js/modules/es.math.asinh":232,"core-js/modules/es.math.atanh":233,"core-js/modules/es.math.cbrt":234,"core-js/modules/es.math.clz32":235,"core-js/modules/es.math.cosh":236,"core-js/modules/es.math.expm1":237,"core-js/modules/es.math.fround":238,"core-js/modules/es.math.hypot":239,"core-js/modules/es.math.imul":240,"core-js/modules/es.math.log10":241,"core-js/modules/es.math.log1p":242,"core-js/modules/es.math.log2":243,"core-js/modules/es.math.sign":244,"core-js/modules/es.math.sinh":245,"core-js/modules/es.math.tanh":246,"core-js/modules/es.math.to-string-tag":247,"core-js/modules/es.math.trunc":248,"core-js/modules/es.number.constructor":249,"core-js/modules/es.number.epsilon":250,"core-js/modules/es.number.is-finite":251,"core-js/modules/es.number.is-integer":252,"core-js/modules/es.number.is-nan":253,"core-js/modules/es.number.is-safe-integer":254,"core-js/modules/es.number.max-safe-integer":255,"core-js/modules/es.number.min-safe-integer":256,"core-js/modules/es.number.parse-float":257,"core-js/modules/es.number.parse-int":258,"core-js/modules/es.number.to-fixed":259,"core-js/modules/es.number.to-precision":260,"core-js/modules/es.object.assign":261,"core-js/modules/es.object.define-getter":262,"core-js/modules/es.object.define-setter":263,"core-js/modules/es.object.entries":264,"core-js/modules/es.object.freeze":265,"core-js/modules/es.object.from-entries":266,"core-js/modules/es.object.get-own-property-descriptor":267,"core-js/modules/es.object.get-own-property-descriptors":268,"core-js/modules/es.object.get-own-property-names":269,"core-js/modules/es.object.get-prototype-of":270,"core-js/modules/es.object.is":274,"core-js/modules/es.object.is-extensible":271,"core-js/modules/es.object.is-frozen":272,"core-js/modules/es.object.is-sealed":273,"core-js/modules/es.object.keys":275,"core-js/modules/es.object.lookup-getter":276,"core-js/modules/es.object.lookup-setter":277,"core-js/modules/es.object.prevent-extensions":278,"core-js/modules/es.object.seal":279,"core-js/modules/es.object.set-prototype-of":280,"core-js/modules/es.object.to-string":281,"core-js/modules/es.object.values":282,"core-js/modules/es.parse-float":283,"core-js/modules/es.parse-int":284,"core-js/modules/es.promise":286,"core-js/modules/es.promise.finally":285,"core-js/modules/es.reflect.apply":287,"core-js/modules/es.reflect.construct":288,"core-js/modules/es.reflect.define-property":289,"core-js/modules/es.reflect.delete-property":290,"core-js/modules/es.reflect.get":293,"core-js/modules/es.reflect.get-own-property-descriptor":291,"core-js/modules/es.reflect.get-prototype-of":292,"core-js/modules/es.reflect.has":294,"core-js/modules/es.reflect.is-extensible":295,"core-js/modules/es.reflect.own-keys":296,"core-js/modules/es.reflect.prevent-extensions":297,"core-js/modules/es.reflect.set":299,"core-js/modules/es.reflect.set-prototype-of":298,"core-js/modules/es.regexp.constructor":300,"core-js/modules/es.regexp.exec":301,"core-js/modules/es.regexp.flags":302,"core-js/modules/es.regexp.to-string":303,"core-js/modules/es.set":304,"core-js/modules/es.string.anchor":305,"core-js/modules/es.string.big":306,"core-js/modules/es.string.blink":307,"core-js/modules/es.string.bold":308,"core-js/modules/es.string.code-point-at":309,"core-js/modules/es.string.ends-with":310,"core-js/modules/es.string.fixed":311,"core-js/modules/es.string.fontcolor":312,"core-js/modules/es.string.fontsize":313,"core-js/modules/es.string.from-code-point":314,"core-js/modules/es.string.includes":315,"core-js/modules/es.string.italics":316,"core-js/modules/es.string.iterator":317,"core-js/modules/es.string.link":318,"core-js/modules/es.string.match":319,"core-js/modules/es.string.pad-end":320,"core-js/modules/es.string.pad-start":321,"core-js/modules/es.string.raw":322,"core-js/modules/es.string.repeat":323,"core-js/modules/es.string.replace":324,"core-js/modules/es.string.search":325,"core-js/modules/es.string.small":326,"core-js/modules/es.string.split":327,"core-js/modules/es.string.starts-with":328,"core-js/modules/es.string.strike":329,"core-js/modules/es.string.sub":330,"core-js/modules/es.string.sup":331,"core-js/modules/es.string.trim":334,"core-js/modules/es.string.trim-end":332,"core-js/modules/es.string.trim-start":333,"core-js/modules/es.symbol":340,"core-js/modules/es.symbol.async-iterator":335,"core-js/modules/es.symbol.description":336,"core-js/modules/es.symbol.has-instance":337,"core-js/modules/es.symbol.is-concat-spreadable":338,"core-js/modules/es.symbol.iterator":339,"core-js/modules/es.symbol.match":341,"core-js/modules/es.symbol.replace":342,"core-js/modules/es.symbol.search":343,"core-js/modules/es.symbol.species":344,"core-js/modules/es.symbol.split":345,"core-js/modules/es.symbol.to-primitive":346,"core-js/modules/es.symbol.to-string-tag":347,"core-js/modules/es.symbol.unscopables":348,"core-js/modules/es.typed-array.copy-within":349,"core-js/modules/es.typed-array.every":350,"core-js/modules/es.typed-array.fill":351,"core-js/modules/es.typed-array.filter":352,"core-js/modules/es.typed-array.find":354,"core-js/modules/es.typed-array.find-index":353,"core-js/modules/es.typed-array.float32-array":355,"core-js/modules/es.typed-array.float64-array":356,"core-js/modules/es.typed-array.for-each":357,"core-js/modules/es.typed-array.from":358,"core-js/modules/es.typed-array.includes":359,"core-js/modules/es.typed-array.index-of":360,"core-js/modules/es.typed-array.int16-array":361,"core-js/modules/es.typed-array.int32-array":362,"core-js/modules/es.typed-array.int8-array":363,"core-js/modules/es.typed-array.iterator":364,"core-js/modules/es.typed-array.join":365,"core-js/modules/es.typed-array.last-index-of":366,"core-js/modules/es.typed-array.map":367,"core-js/modules/es.typed-array.of":368,"core-js/modules/es.typed-array.reduce":370,"core-js/modules/es.typed-array.reduce-right":369,"core-js/modules/es.typed-array.reverse":371,"core-js/modules/es.typed-array.set":372,"core-js/modules/es.typed-array.slice":373,"core-js/modules/es.typed-array.some":374,"core-js/modules/es.typed-array.sort":375,"core-js/modules/es.typed-array.subarray":376,"core-js/modules/es.typed-array.to-locale-string":377,"core-js/modules/es.typed-array.to-string":378,"core-js/modules/es.typed-array.uint16-array":379,"core-js/modules/es.typed-array.uint32-array":380,"core-js/modules/es.typed-array.uint8-array":381,"core-js/modules/es.typed-array.uint8-clamped-array":382,"core-js/modules/es.weak-map":383,"core-js/modules/es.weak-set":384,"core-js/modules/web.dom-collections.for-each":385,"core-js/modules/web.dom-collections.iterator":386,"core-js/modules/web.immediate":387,"core-js/modules/web.queue-microtask":388,"core-js/modules/web.url":390,"core-js/modules/web.url-search-params":389,"core-js/modules/web.url.to-json":391,"regenerator-runtime/runtime":515}],565:[function(require,module,exports){ +},{"../src/index":687,"core-js/modules/es.array-buffer.constructor":265,"core-js/modules/es.array-buffer.is-view":266,"core-js/modules/es.array-buffer.slice":267,"core-js/modules/es.array.concat":268,"core-js/modules/es.array.copy-within":269,"core-js/modules/es.array.every":270,"core-js/modules/es.array.fill":271,"core-js/modules/es.array.filter":272,"core-js/modules/es.array.find":274,"core-js/modules/es.array.find-index":273,"core-js/modules/es.array.flat":276,"core-js/modules/es.array.flat-map":275,"core-js/modules/es.array.for-each":277,"core-js/modules/es.array.from":278,"core-js/modules/es.array.includes":279,"core-js/modules/es.array.index-of":280,"core-js/modules/es.array.iterator":281,"core-js/modules/es.array.join":282,"core-js/modules/es.array.last-index-of":283,"core-js/modules/es.array.map":284,"core-js/modules/es.array.of":285,"core-js/modules/es.array.reduce":287,"core-js/modules/es.array.reduce-right":286,"core-js/modules/es.array.reverse":288,"core-js/modules/es.array.slice":289,"core-js/modules/es.array.some":290,"core-js/modules/es.array.sort":291,"core-js/modules/es.array.species":292,"core-js/modules/es.array.splice":293,"core-js/modules/es.array.unscopables.flat":295,"core-js/modules/es.array.unscopables.flat-map":294,"core-js/modules/es.data-view":296,"core-js/modules/es.date.to-iso-string":297,"core-js/modules/es.date.to-json":298,"core-js/modules/es.date.to-primitive":299,"core-js/modules/es.date.to-string":300,"core-js/modules/es.function.has-instance":301,"core-js/modules/es.function.name":302,"core-js/modules/es.json.to-string-tag":303,"core-js/modules/es.map":304,"core-js/modules/es.math.acosh":305,"core-js/modules/es.math.asinh":306,"core-js/modules/es.math.atanh":307,"core-js/modules/es.math.cbrt":308,"core-js/modules/es.math.clz32":309,"core-js/modules/es.math.cosh":310,"core-js/modules/es.math.expm1":311,"core-js/modules/es.math.fround":312,"core-js/modules/es.math.hypot":313,"core-js/modules/es.math.imul":314,"core-js/modules/es.math.log10":315,"core-js/modules/es.math.log1p":316,"core-js/modules/es.math.log2":317,"core-js/modules/es.math.sign":318,"core-js/modules/es.math.sinh":319,"core-js/modules/es.math.tanh":320,"core-js/modules/es.math.to-string-tag":321,"core-js/modules/es.math.trunc":322,"core-js/modules/es.number.constructor":323,"core-js/modules/es.number.epsilon":324,"core-js/modules/es.number.is-finite":325,"core-js/modules/es.number.is-integer":326,"core-js/modules/es.number.is-nan":327,"core-js/modules/es.number.is-safe-integer":328,"core-js/modules/es.number.max-safe-integer":329,"core-js/modules/es.number.min-safe-integer":330,"core-js/modules/es.number.parse-float":331,"core-js/modules/es.number.parse-int":332,"core-js/modules/es.number.to-fixed":333,"core-js/modules/es.number.to-precision":334,"core-js/modules/es.object.assign":335,"core-js/modules/es.object.define-getter":336,"core-js/modules/es.object.define-setter":337,"core-js/modules/es.object.entries":338,"core-js/modules/es.object.freeze":339,"core-js/modules/es.object.from-entries":340,"core-js/modules/es.object.get-own-property-descriptor":341,"core-js/modules/es.object.get-own-property-descriptors":342,"core-js/modules/es.object.get-own-property-names":343,"core-js/modules/es.object.get-prototype-of":344,"core-js/modules/es.object.is":348,"core-js/modules/es.object.is-extensible":345,"core-js/modules/es.object.is-frozen":346,"core-js/modules/es.object.is-sealed":347,"core-js/modules/es.object.keys":349,"core-js/modules/es.object.lookup-getter":350,"core-js/modules/es.object.lookup-setter":351,"core-js/modules/es.object.prevent-extensions":352,"core-js/modules/es.object.seal":353,"core-js/modules/es.object.set-prototype-of":354,"core-js/modules/es.object.to-string":355,"core-js/modules/es.object.values":356,"core-js/modules/es.parse-float":357,"core-js/modules/es.parse-int":358,"core-js/modules/es.promise":360,"core-js/modules/es.promise.finally":359,"core-js/modules/es.reflect.apply":361,"core-js/modules/es.reflect.construct":362,"core-js/modules/es.reflect.define-property":363,"core-js/modules/es.reflect.delete-property":364,"core-js/modules/es.reflect.get":367,"core-js/modules/es.reflect.get-own-property-descriptor":365,"core-js/modules/es.reflect.get-prototype-of":366,"core-js/modules/es.reflect.has":368,"core-js/modules/es.reflect.is-extensible":369,"core-js/modules/es.reflect.own-keys":370,"core-js/modules/es.reflect.prevent-extensions":371,"core-js/modules/es.reflect.set":373,"core-js/modules/es.reflect.set-prototype-of":372,"core-js/modules/es.regexp.constructor":374,"core-js/modules/es.regexp.exec":375,"core-js/modules/es.regexp.flags":376,"core-js/modules/es.regexp.to-string":377,"core-js/modules/es.set":378,"core-js/modules/es.string.anchor":379,"core-js/modules/es.string.big":380,"core-js/modules/es.string.blink":381,"core-js/modules/es.string.bold":382,"core-js/modules/es.string.code-point-at":383,"core-js/modules/es.string.ends-with":384,"core-js/modules/es.string.fixed":385,"core-js/modules/es.string.fontcolor":386,"core-js/modules/es.string.fontsize":387,"core-js/modules/es.string.from-code-point":388,"core-js/modules/es.string.includes":389,"core-js/modules/es.string.italics":390,"core-js/modules/es.string.iterator":391,"core-js/modules/es.string.link":392,"core-js/modules/es.string.match":393,"core-js/modules/es.string.pad-end":394,"core-js/modules/es.string.pad-start":395,"core-js/modules/es.string.raw":396,"core-js/modules/es.string.repeat":397,"core-js/modules/es.string.replace":398,"core-js/modules/es.string.search":399,"core-js/modules/es.string.small":400,"core-js/modules/es.string.split":401,"core-js/modules/es.string.starts-with":402,"core-js/modules/es.string.strike":403,"core-js/modules/es.string.sub":404,"core-js/modules/es.string.sup":405,"core-js/modules/es.string.trim":408,"core-js/modules/es.string.trim-end":406,"core-js/modules/es.string.trim-start":407,"core-js/modules/es.symbol":414,"core-js/modules/es.symbol.async-iterator":409,"core-js/modules/es.symbol.description":410,"core-js/modules/es.symbol.has-instance":411,"core-js/modules/es.symbol.is-concat-spreadable":412,"core-js/modules/es.symbol.iterator":413,"core-js/modules/es.symbol.match":415,"core-js/modules/es.symbol.replace":416,"core-js/modules/es.symbol.search":417,"core-js/modules/es.symbol.species":418,"core-js/modules/es.symbol.split":419,"core-js/modules/es.symbol.to-primitive":420,"core-js/modules/es.symbol.to-string-tag":421,"core-js/modules/es.symbol.unscopables":422,"core-js/modules/es.typed-array.copy-within":423,"core-js/modules/es.typed-array.every":424,"core-js/modules/es.typed-array.fill":425,"core-js/modules/es.typed-array.filter":426,"core-js/modules/es.typed-array.find":428,"core-js/modules/es.typed-array.find-index":427,"core-js/modules/es.typed-array.float32-array":429,"core-js/modules/es.typed-array.float64-array":430,"core-js/modules/es.typed-array.for-each":431,"core-js/modules/es.typed-array.from":432,"core-js/modules/es.typed-array.includes":433,"core-js/modules/es.typed-array.index-of":434,"core-js/modules/es.typed-array.int16-array":435,"core-js/modules/es.typed-array.int32-array":436,"core-js/modules/es.typed-array.int8-array":437,"core-js/modules/es.typed-array.iterator":438,"core-js/modules/es.typed-array.join":439,"core-js/modules/es.typed-array.last-index-of":440,"core-js/modules/es.typed-array.map":441,"core-js/modules/es.typed-array.of":442,"core-js/modules/es.typed-array.reduce":444,"core-js/modules/es.typed-array.reduce-right":443,"core-js/modules/es.typed-array.reverse":445,"core-js/modules/es.typed-array.set":446,"core-js/modules/es.typed-array.slice":447,"core-js/modules/es.typed-array.some":448,"core-js/modules/es.typed-array.sort":449,"core-js/modules/es.typed-array.subarray":450,"core-js/modules/es.typed-array.to-locale-string":451,"core-js/modules/es.typed-array.to-string":452,"core-js/modules/es.typed-array.uint16-array":453,"core-js/modules/es.typed-array.uint32-array":454,"core-js/modules/es.typed-array.uint8-array":455,"core-js/modules/es.typed-array.uint8-clamped-array":456,"core-js/modules/es.weak-map":457,"core-js/modules/es.weak-set":458,"core-js/modules/web.dom-collections.for-each":459,"core-js/modules/web.dom-collections.iterator":460,"core-js/modules/web.immediate":461,"core-js/modules/web.queue-microtask":462,"core-js/modules/web.url":464,"core-js/modules/web.url-search-params":463,"core-js/modules/web.url.to-json":465,"regenerator-runtime/runtime":589}],652:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -67337,7 +73248,7 @@ function () { exports.default = ArgvParser; -},{"../../package.json":563,"commander":42,"gherkin":450,"lodash":481,"path":493}],566:[function(require,module,exports){ +},{"../../package.json":650,"commander":116,"gherkin":524,"lodash":555,"path":567}],653:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -67795,7 +73706,7 @@ function () { exports.default = ConfigurationBuilder; -},{"./argv_parser":565,"./option_splitter":571,"bluebird":21,"glob":465,"lodash":481,"mz/fs":484,"path":493}],567:[function(require,module,exports){ +},{"./argv_parser":652,"./option_splitter":658,"bluebird":95,"glob":539,"lodash":555,"mz/fs":558,"path":567}],654:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68031,7 +73942,7 @@ function orderTestCases(testCases, order) { } } -},{"./argv_parser":565,"./profile_loader":572,"bluebird":21,"gherkin":450,"knuth-shuffle-seeded":480,"lodash":481,"mz/fs":484,"path":493}],568:[function(require,module,exports){ +},{"./argv_parser":652,"./profile_loader":659,"bluebird":95,"gherkin":524,"knuth-shuffle-seeded":554,"lodash":555,"mz/fs":558,"path":567}],655:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68112,7 +74023,7 @@ function getKeywords(isoCode) { return getAsTable(['ENGLISH KEYWORD', 'NATIVE KEYWORDS'], rows); } -},{"cli-table3":26,"gherkin":450,"lodash":481,"title-case":549}],569:[function(require,module,exports){ +},{"cli-table3":100,"gherkin":524,"lodash":555,"title-case":623}],656:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68476,7 +74387,7 @@ function () { exports.default = Cli; -},{"../formatter/builder":573,"../formatter/helpers":579,"../pickle_filter":606,"../runtime":609,"../runtime/parallel/master":611,"../support_code_library_builder":619,"./configuration_builder":566,"./helpers":567,"./i18n":568,"./install_validator":570,"bluebird":21,"events":444,"mz/fs":484,"path":493}],570:[function(require,module,exports){ +},{"../formatter/builder":660,"../formatter/helpers":666,"../pickle_filter":693,"../runtime":696,"../runtime/parallel/master":698,"../support_code_library_builder":706,"./configuration_builder":653,"./helpers":654,"./i18n":655,"./install_validator":657,"bluebird":95,"events":518,"mz/fs":558,"path":567}],657:[function(require,module,exports){ (function (__dirname){ "use strict"; @@ -68555,7 +74466,7 @@ function _validateInstall() { }).call(this,"/src/cli") -},{"bluebird":21,"mz/fs":484,"path":493,"resolve":517}],571:[function(require,module,exports){ +},{"bluebird":95,"mz/fs":558,"path":567,"resolve":591}],658:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68599,7 +74510,7 @@ function partNeedsRecombined(i) { return i % 2 === 0; } -},{}],572:[function(require,module,exports){ +},{}],659:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68741,7 +74652,7 @@ function () { exports.default = ProfileLoader; -},{"lodash":481,"mz/fs":484,"path":493,"string-argv":542}],573:[function(require,module,exports){ +},{"lodash":555,"mz/fs":558,"path":567,"string-argv":616}],660:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68892,7 +74803,7 @@ function () { exports.default = FormatterBuilder; -},{"./event_protocol_formatter":574,"./get_color_fns":575,"./json_formatter":590,"./progress_bar_formatter":591,"./progress_formatter":592,"./rerun_formatter":593,"./snippets_formatter":594,"./step_definition_snippet_builder":595,"./step_definition_snippet_builder/javascript_snippet_syntax":596,"./summary_formatter":597,"./usage_formatter":598,"./usage_json_formatter":599,"path":493}],574:[function(require,module,exports){ +},{"./event_protocol_formatter":661,"./get_color_fns":662,"./json_formatter":677,"./progress_bar_formatter":678,"./progress_formatter":679,"./rerun_formatter":680,"./snippets_formatter":681,"./step_definition_snippet_builder":682,"./step_definition_snippet_builder/javascript_snippet_syntax":683,"./summary_formatter":684,"./usage_formatter":685,"./usage_json_formatter":686,"path":567}],661:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -68982,7 +74893,7 @@ function (_Formatter) { exports.default = EventProtocolFormatter; -},{"./":589,"escape-string-regexp":443,"path":493}],575:[function(require,module,exports){ +},{"./":676,"escape-string-regexp":517,"path":567}],662:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69014,7 +74925,7 @@ function getColorFns(enabled) { } } -},{"../status":615,"colors/safe":41,"lodash":481}],576:[function(require,module,exports){ +},{"../status":702,"colors/safe":115,"lodash":555}],663:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69030,7 +74941,7 @@ function formatError(error, colorFns) { }); } -},{"assertion-error-formatter":16}],577:[function(require,module,exports){ +},{"assertion-error-formatter":90}],664:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69226,7 +75137,7 @@ function () { exports.default = EventDataCollector; -},{"lodash":481}],578:[function(require,module,exports){ +},{"lodash":555}],665:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69251,7 +75162,7 @@ function getScenarioLineToDescriptionMap(gherkinDocument) { }).fromPairs().value(); } -},{"lodash":481}],579:[function(require,module,exports){ +},{"lodash":555}],666:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69359,7 +75270,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -},{"./error_helpers":576,"./event_data_collector":577,"./gherkin_document_parser":578,"./issue_helpers":580,"./keyword_type":581,"./location_helpers":582,"./pickle_parser":583,"./summary_helpers":585,"./test_case_attempt_parser":587,"./usage_helpers":588}],580:[function(require,module,exports){ +},{"./error_helpers":663,"./event_data_collector":664,"./gherkin_document_parser":665,"./issue_helpers":667,"./keyword_type":668,"./location_helpers":669,"./pickle_parser":670,"./summary_helpers":672,"./test_case_attempt_parser":674,"./usage_helpers":675}],667:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69414,7 +75325,7 @@ function formatIssue(_ref) { return updatedLines.join('\n'); } -},{"../../status":615,"./test_case_attempt_formatter":586,"indent-string":472,"lodash":481}],581:[function(require,module,exports){ +},{"../../status":702,"./test_case_attempt_formatter":673,"indent-string":546,"lodash":555}],668:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69467,7 +75378,7 @@ function getStepKeywordType(_ref) { } } -},{"gherkin":450,"lodash":481}],582:[function(require,module,exports){ +},{"gherkin":524,"lodash":555}],669:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69479,7 +75390,7 @@ function formatLocation(obj) { return "".concat(obj.uri, ":").concat(obj.line); } -},{}],583:[function(require,module,exports){ +},{}],670:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69522,7 +75433,7 @@ function getPickleStepLine(pickleStep) { return _lodash.default.last(pickleStep.locations).line; } -},{"lodash":481}],584:[function(require,module,exports){ +},{"lodash":555}],671:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69589,7 +75500,7 @@ function formatStepArguments(args) { return args.map(iterator).join('\n'); } -},{"../../step_arguments":616,"cli-table3":26}],585:[function(require,module,exports){ +},{"../../step_arguments":703,"cli-table3":100}],672:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69676,7 +75587,7 @@ function getDuration(nanoseconds) { return "".concat(duration.minutes, "m").concat(duration.toString('%S'), ".").concat(duration.toString('%L'), "s") + "\n"; } -},{"../../status":615,"../../time":622,"duration":409,"lodash":481}],586:[function(require,module,exports){ +},{"../../status":702,"../../time":709,"duration":483,"lodash":555}],673:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69804,7 +75715,7 @@ function getAttemptText(attemptNumber, retried) { return ''; } -},{"../../status":615,"./error_helpers":576,"./location_helpers":582,"./step_argument_formatter":584,"./test_case_attempt_parser":587,"figures":446,"indent-string":472}],587:[function(require,module,exports){ +},{"../../status":702,"./error_helpers":663,"./location_helpers":669,"./step_argument_formatter":671,"./test_case_attempt_parser":674,"figures":520,"indent-string":546}],674:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -69959,7 +75870,7 @@ function parseTestCaseAttempt(_ref2) { return out; } -},{"../../status":615,"../../step_arguments":616,"./gherkin_document_parser":578,"./keyword_type":581,"./pickle_parser":583,"lodash":481}],588:[function(require,module,exports){ +},{"../../status":702,"../../step_arguments":703,"./gherkin_document_parser":665,"./keyword_type":668,"./pickle_parser":670,"lodash":555}],675:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70087,7 +75998,7 @@ function getUsage(_ref3) { return buildResult(mapping); } -},{"../location_helpers":582,"../pickle_parser":583,"lodash":481}],589:[function(require,module,exports){ +},{"../location_helpers":669,"../pickle_parser":670,"lodash":555}],676:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70109,7 +76020,7 @@ var Formatter = function Formatter(options) { exports.default = Formatter; -},{"lodash":481}],590:[function(require,module,exports){ +},{"lodash":555}],677:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70200,7 +76111,7 @@ function (_Formatter) { exports.default = JsonFormatter; -},{"./":589,"./helpers":579,"lodash":481}],591:[function(require,module,exports){ +},{"./":676,"./helpers":666,"lodash":555}],678:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70319,7 +76230,7 @@ function (_Formatter) { exports.default = ProgressBarFormatter; -},{"./":589,"./helpers":579,"progress":498}],592:[function(require,module,exports){ +},{"./":676,"./helpers":666,"progress":572}],679:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70392,7 +76303,7 @@ function (_SummaryFormatter) { exports.default = ProgressFormatter; -},{"../status":615,"./summary_formatter":597}],593:[function(require,module,exports){ +},{"../status":702,"./summary_formatter":684}],680:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70479,7 +76390,7 @@ function (_Formatter) { exports.default = RerunFormatter; -},{"../status":615,"./":589,"lodash":481}],594:[function(require,module,exports){ +},{"../status":702,"./":676,"lodash":555}],681:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70556,7 +76467,7 @@ function (_Formatter) { exports.default = SnippetsFormatter; -},{"../status":615,"./":589,"./helpers":579}],595:[function(require,module,exports){ +},{"../status":702,"./":676,"./helpers":666}],682:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70639,7 +76550,7 @@ function () { exports.default = StepDefinitionSnippetBuilder; -},{"../../step_arguments":616,"../helpers":579,"cucumber-expressions":406}],596:[function(require,module,exports){ +},{"../../step_arguments":703,"../helpers":666,"cucumber-expressions":480}],683:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70708,7 +76619,7 @@ function () { exports.default = JavaScriptSnippetSyntax; -},{}],597:[function(require,module,exports){ +},{}],684:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70818,7 +76729,7 @@ function (_Formatter) { exports.default = SummaryFormatter; -},{"./":589,"./helpers":579,"lodash":481}],598:[function(require,module,exports){ +},{"./":676,"./helpers":666,"lodash":555}],685:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -70951,7 +76862,7 @@ function (_Formatter) { exports.default = UsageFormatter; -},{"../time":622,"./":589,"./helpers":579,"cli-table3":26,"lodash":481}],599:[function(require,module,exports){ +},{"../time":709,"./":676,"./helpers":666,"cli-table3":100,"lodash":555}],686:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71016,7 +76927,7 @@ function (_Formatter) { exports.default = UsageJsonFormatter; -},{"./":589,"./helpers":579}],600:[function(require,module,exports){ +},{"./":676,"./helpers":666}],687:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71195,7 +77106,7 @@ exports.Then = Then; var When = methods.When; exports.When = When; -},{"./cli":569,"./cli/helpers":567,"./formatter":589,"./formatter/builder":573,"./formatter/helpers":579,"./formatter/json_formatter":590,"./formatter/progress_formatter":592,"./formatter/rerun_formatter":593,"./formatter/snippets_formatter":594,"./formatter/summary_formatter":597,"./formatter/usage_formatter":598,"./formatter/usage_json_formatter":599,"./pickle_filter":606,"./runtime":609,"./status":615,"./support_code_library_builder":619}],601:[function(require,module,exports){ +},{"./cli":656,"./cli/helpers":654,"./formatter":676,"./formatter/builder":660,"./formatter/helpers":666,"./formatter/json_formatter":677,"./formatter/progress_formatter":679,"./formatter/rerun_formatter":680,"./formatter/snippets_formatter":681,"./formatter/summary_formatter":684,"./formatter/usage_formatter":685,"./formatter/usage_json_formatter":686,"./pickle_filter":693,"./runtime":696,"./status":702,"./support_code_library_builder":706}],688:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71270,7 +77181,7 @@ function () { exports.default = DataTable; -},{"lodash":481}],602:[function(require,module,exports){ +},{"lodash":555}],689:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71318,7 +77229,7 @@ function () { exports.default = Definition; -},{}],603:[function(require,module,exports){ +},{}],690:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71416,7 +77327,7 @@ function (_Definition) { exports.default = StepDefinition; -},{"../step_arguments":616,"./data_table":601,"./definition":602}],604:[function(require,module,exports){ +},{"../step_arguments":703,"./data_table":688,"./definition":689}],691:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71504,7 +77415,7 @@ function (_Definition) { exports.default = TestCaseHookDefinition; -},{"../pickle_filter":606,"./definition":602}],605:[function(require,module,exports){ +},{"../pickle_filter":693,"./definition":689}],692:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71567,7 +77478,7 @@ function (_Definition) { exports.default = TestRunHookDefinition; -},{"./definition":602}],606:[function(require,module,exports){ +},{"./definition":689}],693:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71685,7 +77596,7 @@ function () { exports.default = PickleFilter; -},{"cucumber-tag-expressions":407,"lodash":481,"path":493}],607:[function(require,module,exports){ +},{"cucumber-tag-expressions":481,"lodash":555,"path":567}],694:[function(require,module,exports){ (function (Buffer){ "use strict"; @@ -71791,7 +77702,7 @@ exports.default = AttachmentManager; }).call(this,require("buffer").Buffer) -},{"bluebird":21,"buffer":25,"is-stream":478}],608:[function(require,module,exports){ +},{"bluebird":95,"buffer":99,"is-stream":552}],695:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -71874,7 +77785,7 @@ function retriesForTestCase(testCase, options) { return 0; } -},{"../formatter/helpers/location_helpers":582,"../pickle_filter":606,"cli-table3":26,"indent-string":472}],609:[function(require,module,exports){ +},{"../formatter/helpers/location_helpers":669,"../pickle_filter":693,"cli-table3":100,"indent-string":546}],696:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -72119,7 +78030,7 @@ function () { exports.default = Runtime; -},{"../formatter/helpers":579,"../stack_trace_filter":614,"../status":615,"../user_code_runner":624,"./helpers":608,"./test_case_runner":613,"bluebird":21,"lodash":481,"verror":561}],610:[function(require,module,exports){ +},{"../formatter/helpers":666,"../stack_trace_filter":701,"../status":702,"../user_code_runner":711,"./helpers":695,"./test_case_runner":700,"bluebird":95,"lodash":555,"verror":635}],697:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -72136,7 +78047,7 @@ var commandTypes = { var _default = commandTypes; exports.default = _default; -},{}],611:[function(require,module,exports){ +},{}],698:[function(require,module,exports){ (function (process,__dirname){ "use strict"; @@ -72323,7 +78234,7 @@ exports.default = Master; }).call(this,require('_process'),"/src/runtime/parallel") -},{"../../status":615,"../helpers":608,"./command_types":610,"_process":497,"child_process":24,"lodash":481,"path":493}],612:[function(require,module,exports){ +},{"../../status":702,"../helpers":695,"./command_types":697,"_process":571,"child_process":98,"lodash":555,"path":567}],699:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -72450,7 +78361,7 @@ var _default = { }; exports.default = _default; -},{"../status":615,"../time":622,"../user_code_runner":624,"bluebird":21,"lodash":481}],613:[function(require,module,exports){ +},{"../status":702,"../time":709,"../user_code_runner":711,"bluebird":95,"lodash":555}],700:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73023,7 +78934,7 @@ function () { exports.default = TestCaseRunner; -},{"../status":615,"./attachment_manager":607,"./helpers":608,"./step_runner":612,"bluebird":21,"lodash":481}],614:[function(require,module,exports){ +},{"../status":702,"./attachment_manager":694,"./helpers":695,"./step_runner":699,"bluebird":95,"lodash":555}],701:[function(require,module,exports){ (function (__dirname){ "use strict"; @@ -73116,7 +79027,7 @@ exports.default = StackTraceFilter; }).call(this,"/src") -},{"lodash":481,"path":493,"stack-chain":527}],615:[function(require,module,exports){ +},{"lodash":555,"path":567,"stack-chain":601}],702:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73146,7 +79057,7 @@ function getStatusMapping(initialValue) { }).fromPairs().value(); } -},{"lodash":481}],616:[function(require,module,exports){ +},{"lodash":555}],703:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73170,7 +79081,7 @@ function buildStepArgumentIterator(mapping) { }; } -},{"util":560}],617:[function(require,module,exports){ +},{"util":634}],704:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73379,7 +79290,7 @@ function buildParameterType(_ref5) { return new _cucumberExpressions.ParameterType(_name, regexp, null, transformer, useForSnippets, preferForRegexpMatch); } -},{"../formatter/helpers":579,"../models/step_definition":603,"../models/test_case_hook_definition":604,"../models/test_run_hook_definition":605,"../stack_trace_filter":614,"./validate_arguments":621,"cucumber-expressions":406,"lodash":481,"path":493,"stacktrace-js":540,"util":560}],618:[function(require,module,exports){ +},{"../formatter/helpers":666,"../models/step_definition":690,"../models/test_case_hook_definition":691,"../models/test_run_hook_definition":692,"../stack_trace_filter":701,"./validate_arguments":708,"cucumber-expressions":480,"lodash":555,"path":567,"stacktrace-js":614,"util":634}],705:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73427,7 +79338,7 @@ function wrapDefinitions(_ref) { } } -},{"is-generator":477,"lodash":481,"path":493,"util-arity":556}],619:[function(require,module,exports){ +},{"is-generator":551,"lodash":555,"path":567,"util-arity":630}],706:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73586,7 +79497,7 @@ var _default = new SupportCodeLibraryBuilder(); exports.default = _default; -},{"./build_helpers":617,"./finalize_helpers":618,"./parameter_type_registry_builder":620,"lodash":481,"util":560}],620:[function(require,module,exports){ +},{"./build_helpers":704,"./finalize_helpers":705,"./parameter_type_registry_builder":707,"lodash":555,"util":634}],707:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73605,7 +79516,7 @@ var _default = { }; exports.default = _default; -},{"cucumber-expressions":406}],621:[function(require,module,exports){ +},{"cucumber-expressions":480}],708:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73692,7 +79603,7 @@ function validateArguments(_ref6) { }); } -},{"lodash":481}],622:[function(require,module,exports){ +},{"lodash":555}],709:[function(require,module,exports){ (function (global,setImmediate,clearImmediate){ "use strict"; @@ -73731,7 +79642,7 @@ exports.default = _default; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate,require("timers").clearImmediate) -},{"timers":548}],623:[function(require,module,exports){ +},{"timers":622}],710:[function(require,module,exports){ (function (process){ "use strict"; @@ -73780,7 +79691,7 @@ exports.default = UncaughtExceptionManager; }).call(this,require('_process')) -},{"_process":497}],624:[function(require,module,exports){ +},{"_process":571}],711:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -73959,7 +79870,7 @@ function () { exports.default = UserCodeRunner; -},{"./time":622,"./uncaught_exception_manager":623,"bluebird":21,"util":560}]},{},[564])(564) +},{"./time":709,"./uncaught_exception_manager":710,"bluebird":95,"util":634}]},{},[651])(651) }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYW55LXByb21pc2UvaW5kZXguanMiLCJub2RlX21vZHVsZXMvYW55LXByb21pc2UvbG9hZGVyLmpzIiwibm9kZV9tb2R1bGVzL2FueS1wcm9taXNlL3JlZ2lzdGVyLXNoaW0uanMiLCJub2RlX21vZHVsZXMvYXNzZXJ0LXBsdXMvYXNzZXJ0LmpzIiwibm9kZV9tb2R1bGVzL2Fzc2VydC9hc3NlcnQuanMiLCJub2RlX21vZHVsZXMvYXNzZXJ0L25vZGVfbW9kdWxlcy9pbmhlcml0cy9pbmhlcml0c19icm93c2VyLmpzIiwibm9kZV9tb2R1bGVzL2Fzc2VydC9ub2RlX21vZHVsZXMvdXRpbC9zdXBwb3J0L2lzQnVmZmVyQnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9hc3NlcnQvbm9kZV9tb2R1bGVzL3V0aWwvdXRpbC5qcyIsIm5vZGVfbW9kdWxlcy9hc3NlcnRpb24tZXJyb3ItZm9ybWF0dGVyL2xpYi9oZWxwZXJzL2Nhbm9uaWNhbGl6ZS5qcyIsIm5vZGVfbW9kdWxlcy9hc3NlcnRpb24tZXJyb3ItZm9ybWF0dGVyL2xpYi9oZWxwZXJzL2hhc19wcm9wZXJ0eS5qcyIsIm5vZGVfbW9kdWxlcy9hc3NlcnRpb24tZXJyb3ItZm9ybWF0dGVyL2xpYi9oZWxwZXJzL2l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Doge1xuICAgICAgICBjaGVjazogZnVuY3Rpb24gKGFyZykge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiAoYXJnKSA9PT0gJ3N0cmluZycgJiYgVVVJRF9SRUdFWFAudGVzdChhcmcpO1xuICAgICAgICB9LFxuICAgICAgICBvcGVyYXRvcjogJ2lzVVVJRCdcbiAgICB9XG59O1xuXG5mdW5jdGlvbiBfc2V0RXhwb3J0cyhuZGVidWcpIHtcbiAgICB2YXIga2V5cyA9IE9iamVjdC5rZXlzKHR5cGVzKTtcbiAgICB2YXIgb3V0O1xuXG4gICAgLyogcmUtZXhwb3J0IHN0YW5kYXJkIGFzc2VydCAqL1xuICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX05ERUJVRykge1xuICAgICAgICBvdXQgPSBub29wO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG91dCA9IGZ1bmN0aW9uIChhcmcsIG1zZykge1xuICAgICAgICAgICAgaWYgKCFhcmcpIHtcbiAgICAgICAgICAgICAgICBfdG9zcyhtc2csICd0cnVlJywgYXJnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICAvKiBzdGFuZGFyZCBjaGVja3MgKi9cbiAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgaWYgKG5kZWJ1Zykge1xuICAgICAgICAgICAgb3V0W2tdID0gbm9vcDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdHlwZSA9IHR5cGVzW2tdO1xuICAgICAgICBvdXRba10gPSBmdW5jdGlvbiAoYXJnLCBtc2cpIHtcbiAgICAgICAgICAgIGlmICghdHlwZS5jaGVjayhhcmcpKSB7XG4gICAgICAgICAgICAgICAgX3Rvc3MobXNnLCBrLCB0eXBlLm9wZXJhdG9yLCBhcmcsIHR5cGUuYWN0dWFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9KTtcblxuICAgIC8qIG9wdGlvbmFsIGNoZWNrcyAqL1xuICAgIGtleXMuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICB2YXIgbmFtZSA9ICdvcHRpb25hbCcgKyBfY2FwaXRhbGl6ZShrKTtcbiAgICAgICAgaWYgKG5kZWJ1Zykge1xuICAgICAgICAgICAgb3V0W25hbWVdID0gbm9vcDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdHlwZSA9IHR5cGVzW2tdO1xuICAgICAgICBvdXRbbmFtZV0gPSBmdW5jdGlvbiAoYXJnLCBtc2cpIHtcbiAgICAgICAgICAgIGlmIChhcmcgPT09IHVuZGVmaW5lZCB8fCBhcmcgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXR5cGUuY2hlY2soYXJnKSkge1xuICAgICAgICAgICAgICAgIF90b3NzKG1zZywgaywgdHlwZS5vcGVyYXRvciwgYXJnLCB0eXBlLmFjdHVhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSk7XG5cbiAgICAvKiBhcnJheU9mIGNoZWNrcyAqL1xuICAgIGtleXMuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICB2YXIgbmFtZSA9ICdhcnJheU9mJyArIF9jYXBpdGFsaXplKGspO1xuICAgICAgICBpZiAobmRlYnVnKSB7XG4gICAgICAgICAgICBvdXRbbmFtZV0gPSBub29wO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHZhciB0eXBlID0gdHlwZXNba107XG4gICAgICAgIHZhciBleHBlY3RlZCA9ICdbJyArIGsgKyAnXSc7XG4gICAgICAgIG91dFtuYW1lXSA9IGZ1bmN0aW9uIChhcmcsIG1zZykge1xuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KGFyZykpIHtcbiAgICAgICAgICAgICAgICBfdG9zcyhtc2csIGV4cGVjdGVkLCB0eXBlLm9wZXJhdG9yLCBhcmcsIHR5cGUuYWN0dWFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBpO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGFyZy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmICghdHlwZS5jaGVjayhhcmdbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIF90b3NzKG1zZywgZXhwZWN0ZWQsIHR5cGUub3BlcmF0b3IsIGFyZywgdHlwZS5hY3R1YWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9KTtcblxuICAgIC8qIG9wdGlvbmFsQXJyYXlPZiBjaGVja3MgKi9cbiAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgdmFyIG5hbWUgPSAnb3B0aW9uYWxBcnJheU9mJyArIF9jYXBpdGFsaXplKGspO1xuICAgICAgICBpZiAobmRlYnVnKSB7XG4gICAgICAgICAgICBvdXRbbmFtZV0gPSBub29wO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHZhciB0eXBlID0gdHlwZXNba107XG4gICAgICAgIHZhciBleHBlY3RlZCA9ICdbJyArIGsgKyAnXSc7XG4gICAgICAgIG91dFtuYW1lXSA9IGZ1bmN0aW9uIChhcmcsIG1zZykge1xuICAgICAgICAgICAgaWYgKGFyZyA9PT0gdW5kZWZpbmVkIHx8IGFyZyA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShhcmcpKSB7XG4gICAgICAgICAgICAgICAgX3Rvc3MobXNnLCBleHBlY3RlZCwgdHlwZS5vcGVyYXRvciwgYXJnLCB0eXBlLmFjdHVhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2Y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iYWNrKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghZXhlY0VkaXRMZW5ndGgoKSkge1xuICAgICAgICAgICAgICBleGVjKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSwgMCk7XG4gICAgICAgIH0pKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB3aGlsZSAoZWRpdExlbmd0aCA8PSBtYXhFZGl0TGVuZ3RoKSB7XG4gICAgICAgICAgdmFyIHJldCA9IGV4ZWNFZGl0TGVuZ3RoKCk7XG5cbiAgICAgICAgICBpZiAocmV0KSB7XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgcHVzaENvbXBvbmVudDogZnVuY3Rpb24gcHVzaENvbXBvbmVudChjb21wb25lbnRzLCBhZGRlZCwgcmVtb3ZlZCkge1xuICAgICAgdmFyIGxhc3QgPSBjb21wb25lbnRzW2NvbXBvbmVudHMubGVuZ3RoIC0gMV07XG5cbiAgICAgIGlmIChsYXN0ICYmIGxhc3QuYWRkZWQgPT09IGFkZGVkICYmIGxhc3QucmVtb3ZlZCA9PT0gcmVtb3ZlZCkge1xuICAgICAgICAvLyBXZSBuZWVkIHRvIGNsb25lIGhlcmUgYXMgdGhlIGNvbXBvbmVudCBjbG9uZSBvcGVyYXRpb24gaXMganVzdFxuICAgICAgICAvLyBhcyBzaGFsbG93IGFycmF5IGNsb25lXG4gICAgICAgIGNvbXBvbmVudHNbY29tcG9uZW50cy5sZW5ndGggLSAxXSA9IHtcbiAgICAgICAgICBjb3VudDogbGFzdC5jb3VudCArIDEsXG4gICAgICAgICAgYWRkZWQ6IGFkZGVkLFxuICAgICAgICAgIHJlbW92ZWQ6IHJlbW92ZWRcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbXBvbmVudHMucHVzaCh7XG4gICAgICAgICAgY291bnQ6IDEsXG4gICAgICA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29tcG9uZW50UG9zIDwgY29tcG9uZW50TGVuOyBjb21wb25lbnRQb3MrKykge1xuICAgICAgdmFyIGNvbXBvbmVudCA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcblxuICAgICAgaWYgKCFjb21wb25lbnQucmVtb3ZlZCkge1xuICAgICAgICBpZiAoIWNvbXBvbmVudC5hZGRlZCAmJiB1c2VMb25nZXN0VG9rZW4pIHtcbiAgICAgICAgICB2YXIgdmFsdWUgPSBuZXdTdHJpbmcuc2xpY2UobmV3UG9zLCBuZXdQb3MgKyBjb21wb25lbnQuY291bnQpO1xuICAgICAgICAgIHZhbHVlID0gdmFsdWUubWFwKGZ1bmN0aW9uICh2YWx1ZSwgaSkge1xuICAgICAgICAgICAgdmFyIG9sZFZhbHVlID0gb2xkU3RyaW5nW29sZFBvcyArIGldO1xuICAgICAgICAgICAgcmV0dXJuIG9sZFZhbHVlLmxlbmd0aCA+IHZhbHVlLmxlbmd0aCA/IG9sZFZhbHVlIDogdmFsdWU7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgY29tcG9uZW50LnZhbHVlID0gZGlmZi5qb2luKHZhbHVlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb21wb25lbnQudmFsdWUgPSBkaWZmLmpvaW4obmV3U3RyaW5nLnNsaWNlKG5ld1BvcywgbmV3UG9zICsgY29tcG9uZW50LmNvdW50KSk7XG4gICAgICAgIH1cblxuICAgICAgICBuZXdQb3MgKz0gY29tcG9uZW50LmNvdW50OyAvLyBDb21tb24gY2FzZVxuXG4gICAgICAgIGlmICghY29tcG9uZW50LmFkZGVkKSB7XG4gICAgICAgICAgb2xkUG9zICs9IGNvbXBvbmVudC5jb3VudDtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29tcG9uZW50LnZhbHVlID0gZGlmZi5qb2luKG9sZFN0cmluZy5zbGljZShvbGRQb3MsIG9sZFBvcyArIGNvbXBvbmVudC5jb3VudCkpO1x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amVjdCBBcnJheV0nID09PSBvYmplY3RQcm90b3R5cGVUb1N0cmluZy5jYWxsKG9iaikpIHtcbiAgICAgIHN0YWNrLnB1c2gob2JqKTtcbiAgICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBuZXcgQXJyYXkob2JqLmxlbmd0aCk7XG4gICAgICByZXBsYWNlbWVudFN0YWNrLnB1c2goY2Fub25pY2FsaXplZE9iaik7XG5cbiAgICAgIGZvciAoaSA9IDA7IGkgPCBvYmoubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgY2Fub25pY2FsaXplZE9ialtpXSA9IGNhbm9uaWNhbGl6ZShvYmpbaV0sIHN0YWNrLCByZXBsYWNlbWVudFN0YWNrLCByZXBsYWNlciwga2V5KTtcbiAgICAgIH1cblxuICAgICAgc3RhY2sucG9wKCk7XG4gICAgICByZXBsYWNlbWVudFN0YWNrLnBvcCgpO1xuICAgICAgcmV0dXJuIGNhbm9uaWNhbGl6ZWRPYmo7XG4gICAgfVxuXG4gICAgaWYgKG9iaiAmJiBvYmoudG9KU09OKSB7XG4gICAgICBvYmogPSBvYmoudG9KU09OKCk7XG4gICAgfVxuXG4gICAgaWYgKF90eXBlb2Yob2JqKSA9PT0gJ29iamVjdCcgJiYgb2JqICE9PSBudWxsKSB7XG4gICAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgICBjYW5vbmljYWxpemVkT2JqID0ge307XG4gICAgICByZXBsYWNlbWVudFN0YWNrLnB1c2goY2Fub25pY2FsaXplZE9iaik7XG5cbiAgICAgIHZhciBzb3J0ZWRLZXlzID0gW10sXG4gICAgICAgICAgX2tleTtcblxuICAgICAgZm9yIChfa2V5IGluIG9iaikge1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KF9rZXkpKSB7XG4gICAgICAgICAgc29ydGVkS2V5cy5wdXNoKF9rZXkpO1xuICAgICAgICB9XG4gICAgICB9XG5cbi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aV0gfHwgJ1xcbicpO1xuXG4gICAgICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgICAgICBhZGRDb3VudCsrO1xuICAgICAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnLScpIHtcbiAgICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICcgJykge1xuICAgICAgICAgICAgYWRkQ291bnQrKztcbiAgICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9IC8vIEhhbmRsZSB0aGUgZW1wdHkgYmxvY2sgY291bnQgY2FzZVxuXG5cbiAgICAgIGlmICghYWRkQ291bnQgJiYgaHVuay5uZXdMaW5lcyA9PT0gMSkge1xuICAgICAgICBodW5rLm5ld0xpbmVzID0gMDtcbiAgICAgIH1cblxuICAgICAgaWYgKCFyZW1vdmVDb3VudCAmJiBodW5rLm9sZExpbmVzID09PSAxKSB7XG4gICAgICAgIGh1bmsub2xkTGluZXMgPSAwO1xuICAgICAgfSAvLyBQZXJmb3JtIG9wdGlvbmFsIHNhbml0eSBjaGVja2luZ1xuXG5cbiAgICAgIGlmIChvcHRpb25zLnN0cmljdCkge1xuICAgICAgICBpZiAoYWRkQ291bnQgIT09IGh1bmsubmV3TGluZXMpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0FkZGVkIGxpbmUgY291bnQgZGlkIG5vdCBtYXRjaCBmb3IgaHVuayBhdCBsaW5lICcgKyAoY2h1bmtIZWFkZXJJbmRleCArIDEpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyZW1vdmVDb3VudCAhPT0gaHVuay5vbGRMaW5lcykge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignUmVtb3ZlZCBsaW5lIGNvdW50IGRpZCBub3Q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CA9IDAsXG4gICAgICAgIHJlbW92ZUVPRk5MLFxuICAgICAgICBhZGRFT0ZOTDtcbiAgICAvKipcbiAgICAgKiBDaGVja3MgaWYgdGhlIGh1bmsgZXhhY3RseSBmaXRzIG9uIHRoZSBwcm92aWRlZCBsb2NhdGlvblxuICAgICAqL1xuXG5cbiAgICBmdW5jdGlvbiBodW5rRml0cyhodW5rLCB0b1Bvcykge1xuICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBodW5rLmxpbmVzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBsaW5lID0gaHVuay5saW5lc1tqXSxcbiAgICAgICAgICAgIG9wZXJhdGlvbiA9IGxpbmUubGVuZ3RoID4gMCA/IGxpbmVbMF0gOiAnICcsXG4gICAgICAgICAgICBjb250ZW50ID0gbGluZS5sZW5ndGggPiAwID8gbGluZS5zdWJzdHIoMSkgOiBsaW5lO1xuXG4gICAgICAgIGlmIChvcGVyYXRpb24gPT09ICcgJyB8fCBvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIC8vIENvbnRleHQgc2FuaXR5IGNoZWNrXG4gICAgICAgICAgaWYgKCFjb21wYXJlTGluZSh0b1BvcyArIDEsIGxpbmVzW3RvUG9zXSwgb3BlcmF0aW9uLCBjb250ZW50KSkge1xuICAgICAgICAgICAgZXJyb3JDb3VudCsrO1xuXG4gICAgICAgICAgICBpZiAoZXJyb3JDb3VudCA+IGZ1enpGYWN0b3IpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHRvUG9zKys7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfSAvLyBTZWFyY2ggYmVzdCBmaXQgb2Zmc2V0cyBmb3IgZWFjaCBodW5rIGJhc2VkIG9uIHRoZSBwcmV2aW91cyBvbmVzXG5cblxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwga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ldmlvdXMgY29udGV4dCwgc3RhcnQgd2l0aCB0aGF0XG4gICAgICAgIGlmICghb2xkUmFuZ2VTdGFydCkge1xuICAgICAgICAgIHZhciBwcmV2ID0gZGlmZltpIC0gMV07XG4gICAgICAgICAgb2xkUmFuZ2VTdGFydCA9IG9sZExpbmU7XG4gICAgICAgICAgbmV3UmFuZ2VTdGFydCA9IG5ld0xpbmU7XG5cbiAgICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgY3VyUmFuZ2UgPSBvcHRpb25zLmNvbnRleHQgPiAwID8gY29udGV4dExpbmVzKHByZXYubGluZXMuc2xpY2UoLW9wdGlvbnMuY29udGV4dCkpIDogW107XG4gICAgICAgICAgICBvbGRSYW5nZVN0YXJ0IC09IGN1clJhbmdlLmxlbmd0aDtcbiAgICAgICAgICAgIG5ld1JhbmdlU3RhcnQgLT0gY3VyUmFuZ2UubGVuZ3RoO1xuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBPdXRwdXQgb3VyIGNoYW5nZXNcblxuXG4gICAgICAgIChfY3VyUmFuZ2UgPSBjdXJSYW5nZSkucHVzaC5hcHBseShfY3VyUmFuZ2UsIF90b0NvbnN1bWFibGVBcnJheShsaW5lcy5tYXAoZnVuY3Rpb24gKGVudHJ5KSB7XG4gICAgICAgICAgcmV0dXJuIChjdXJyZW50LmFkZGVkID8gJysnIDogJy0nKSArIGVudHJ5O1xuICAgICAgICB9KSkpOyAvLyBUcmFjayB0aGUgdXBkYXRlZCBmaWxlIHBvc2l0aW9uXG5cblxuICAgICAgICBpZiAoY3VycmVudC5hZGRlZCkge1xuICAgICAgICAgIG5ld0xpbmUgKz0gbGluZXMubGVuZ3RoO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG9sZExpbmUgKz0gbGluZXMubGVuZ3RoO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBJZGVudGljYWwgY29udGV4dCBsaW5lcy4gVHJhY2sgbGluZSBjaGFuZ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zOiBuZXdMaW5lIC0gbmV3UmFuZ2VTdGFydCArIGNvbnRleHRTaXplLFxuICAgICAgICAgICAgICBsaW5lczogY3VyUmFuZ2VcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGlmIChpID49IGRpZmYubGVuZ3RoIC0gMiAmJiBsaW5lcy5sZW5ndGggPD0gb3B0aW9ucy5jb250ZXh0KSB7XG4gICAgICAgICAgICAgIC8vIEVPRiBpcyBpbnNpZGUgdGhpcyBodW5rXG4gICAgICAgICAgICAgIHZhciBvbGRFT0ZOZXdsaW5lID0gL1xcbiQvLnRlc3Qob2xkU3RyKTtcbiAgICAgICAgICAgICAgdmFyIG5ld0VPRk5ld2xpbmUgPSAvXFxuJC8udGVzdChuZXdTdHIpO1xuICAgICAgICAgICAgICB2YXIgbm9ObEJlZm9yZUFkZHMgPSBsaW5lcy5sZW5ndGggPT0gMCAmJiBjdXJSYW5nZS5sZW5ndGggPiBodW5rLm9sZExpbmVzO1xuXG4gICAgICAgICAgICAgIGlmICghb2xkRU9GTmV3bGluZSAmJiBub05sQmVmb3JlQWRkcykge1xuICAgICAgICAgICAgICAgIC8vIHNwZWNpYWwgY2FzZTogb2xkIGhhcyBubyBlb2wgYW5kIG5vIHRyYWlsaW5nIGNvbnRleHQ7IG5vLW5sIGNhbiBlbmQgdXAgYmVmb3JlIGFkZHNcbiAgICAgICAgICAgICAgICBjdXJSYW5nZS5zcGxpY2UoaHVuay5vbGRMaW5lcywgMCwgJ1xcXFwgTm8gbmV3bGluZSBhdCBlbmQgb2YgZmlsZScpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKCFvbGRFT0ZOZXdsaW5lICYmICFub05sQmVmb3JlQWRkcyB8fCAhbmV3RU9GTmV3bGluZSkge1xuICAgICAgICAgICAgICAgIGN1clJhbmdlLnB1c2goJ1xcXFwgTm8gbmV3bGluZSBhdCBlbmQgb2YgZmlsZScpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgIC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uICAgICAgdmFyIGNoYW5nZUNvbnRlbnQgPSByZW1vdmVDaGFuZ2VzW3JlbW92ZUNoYW5nZXMubGVuZ3RoIC0gZGVsdGEgKyBpXS5zdWJzdHIoMSk7XG5cbiAgICAgIGlmIChzdGF0ZS5saW5lc1tzdGF0ZS5pbmRleCArIGldICE9PSAnICcgKyBjaGFuZ2VDb250ZW50KSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBzdGF0ZS5pbmRleCArPSBkZWx0YTtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfVxuXG4gIGZ1bmN0aW9uIGNhbGNPbGROZXdMaW5lQ291bnQobGluZXMpIHtcbiAgICB2YXIgb2xkTGluZXMgPSAwO1xuICAgIHZhciBuZXdMaW5lcyA9IDA7XG4gICAgbGluZXMuZm9yRWFjaChmdW5jdGlvbiAobGluZSkge1xuICAgICAgaWYgKHR5cGVvZiBsaW5lICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgbXlDb3VudCA9IGNhbGNPbGROZXdMaW5lQ291bnQobGluZS5taW5lKTtcbiAgICAgICAgdmFyIHRoZWlyQ291bnQgPSBjYWxjT2xkTmV3TGluZUNvdW50KGxpbmUudGhlaXJzKTtcblxuICAgICAgICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmIChteUNvdW50Lm9sZExpbmVzID09PSB0aGVpckNvdW50Lm9sZExpbmVzKSB7XG4gICAgICAgICAgICBvbGRMaW5lcyArPSBteUNvdW50Lm9sZExpbmVzO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvbGRMaW5lcyA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobmV3TGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmIChteUNvdW50Lm5ld0xpbmVzID09PSB0aGVpckNvdW50Lm5ld0xpbmVzKS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ICAgICAgICAgaWYgKGNoYXJBdCA9PT0gJyQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZFN0cmluZyArPSAnJCc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhckF0ID09PSAnJicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9IHJlc3VsdEV4ZWNbbmV3U3Vic3RyaW5nRnVuY3Rpb25JbmRleF07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhckF0ID09PSAnYCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9IHN0ci5zdWJzdHJpbmcoMCwgcmVzdWx0RXhlYy5pbmRleFtuZXdTdWJzdHJpbmdGdW5jdGlvbkluZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhckF0ID09PSBcIidcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gc3RyLnN1YnN0cmluZyhyZXN1bHRFeGVjLmluZGV4W25ld1N1YnN0cmluZ0Z1bmN0aW9uSW5kZXhdICsgcmVzdWx0RXhlY1tuZXdTdWJzdHJpbmdGdW5jdGlvbkluZGV4XS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA+PSAnMCcgJiYgY2hhckF0IDw9ICc5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGludCA9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IG5ld1N1YnN0cmluZ0Z1bmN0aW9uLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChjaGFyQXQgPj0gJzAnICYmIGNoYXJBdCA8PSAnOScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBuZXdTdWJzdHJpbmdGdW5jdGlvbi5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0RXhlY1tpbnRdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gcmVzdWx0RXhlY1tpbnRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZFN0cmluZyArPSAnJCcgKyBpbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL3N0cmFuZ2Ugbm90IHN1cmUgd2hldGhlciB0aGlzIGlzIGNvcnJlY3QgLSBpbml0aWFsbHkgaXQgd2FzOiBjb21wdXRlZFN0cmluZyArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL2J1dCB1bml0IHRlc3RzIGluIE5QTSB0b2xkIGRpZmZlcmVudGx5IS4uLlxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gJyQnICsgY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChuZXdTdWJzdHJpbmdGdW5jdGlvbiBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4g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aSsrO1xuICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0uY2hhckF0KGkpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW50ID0gJyc7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChjaGFyQXQgPj0gJzAnICYmIGNoYXJBdCA8PSAnOScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGludCArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0uY2hhckF0KGkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2V4Rm9yVGhpc0dyb3VwICs9IGluZGV4TWFwW2ludF07XG4gICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWdleEZvclRoaXNHcm91cCArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICdbJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaSArIDEgPT09IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzJdLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChjaGFyQXQgIT09ICddJyB8fCAoZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzJdLmNoYXJBdChpIC0gMSkgPT09ICdcXFxcJyAmJiBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0uY2hhckF0KGkgLSAyKSAhPT0gJ1xcXFwnKSkgJiYgaSA8IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2V4Rm9yVGhpc0dyb3VwICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVnZXhGb3JUaGlzR3JvdXAgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0gPSByZWdleEZvclRoaXNHcm91cDtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzNdLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgZml4SW5kZXhPbkdyb3VwaW5nU3RydWN0dXJlKGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFszXVtqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZml4SW5kZXhPbkdyb3VwaW5nU3RydWN0dXJlKGdldFJlZ2V4Q29tcGxldGVHcm91cGluZ1N0cnVjdHVyZUludGVybmFsUmVzdWx0KTtcbiAgICB9XG4gICAgcmV0dXJuIFtnZXRSZWdleENvbXBsZXRlR3Jvd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ICAgICAgICB3aGlsZSAoY2hhckF0ID49ICcwJyAmJiBjaGFyQXQgPD0gJzknKSB7XG4gICAgICAgICAgICAgICAgaW50ICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKGluZGV4TWFwW2ludF0pIHtcbiAgICAgICAgICAgICAgICAgICAgLy9pZiBhIGdyb3VwIGV4aXN0cyB0aGVuIGJhY2stcmVmZXJlbmNlIHRvIHRoZSBncm91cFxuICAgICAgICAgICAgICAgICAgICAvLzIwMTcwNDE2IC0gYnVnIHRoZSBpbmRleCBtYXAgY2FuIGNoYW5nZSBsYXRlciBpZiBhZGRpdGlvbmFsIHN1cnJvdW5kaW5nIHBhcmFudGhlc2lzIGFyZSBhZGRlZFxuICAgICAgICAgICAgICAgICAgICAvL1RoZXJlZm9yZSB0aGlzIGNhbGN1bGF0aW9uIG5lZWRzIHRvIGJlIGRvbmUgaW4gdGhlIGVuZCFcbiAgICAgICAgICAgICAgICAgICAgLy90bXBTdHIgKz0gJ1xcXFwnICsgaW5kZXhNYXBbaW50XTtcbiAgICAgICAgICAgICAgICAgICAgdG1wU3RyICs9ICdcXFxcJyArIGludDtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbnNCYWNrUmVmZXJlbmNlWzBdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW50LmluZGV4T2YoJzgnKSA+PSAwIHx8IGludC5pbmRleE9mKCc5JykgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9pZiBpdCBpcyBhIG5vbiBvY3RhbCBkaWdpdCB0aGVuIHRyZWF0IGl0IGFzIHNpbXBsZSBudW1iZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRtcFN0ciArPSBpbnQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL290aGVyd2lzZSBpdCBpcyBhIGNoYXJhY3RlciBlc2NhcGVcbiAgICAgICAgICAgICAgICAgICAgICAgIHRtcFN0ciArPSAnXFxcXCcgKyAneCcgKyAoXCIwXCIgKyAocGFyc2VJbnQoaW50LCA4KS50b1N0cmluZygxNikpKS5zbGljZSgtMikudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzb3VyY2VbMF0gKz0gJ1xcXFwnICsgaW50O1xuICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdLS07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRtcFN0ciArPSAnXFxcXCcgKyBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgc291cmNlWzBdICs9ICdcXFxcJyArIGNoYXJBdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjaGFyQXQgPT09ICdbJykge1xuICAgICAgICAgICAgLy9wYXJzZSBjaGFyYWN0ZXIgc2V0XG4gICAgICAgICAgICB0bXBTdHIgKz0gJ1snO1xuICAgICAgICAgICAgc291cmNlWzBdICs9ICdbJztcbiAgICAgICAgICAgIGlmIChwb3NJbmRleE9yaWdJbmRleFswXSArIDEgPT09IHJlZ2V4Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICB3aGlsZSAoKGNoYXJBdCAhPT0gJ10nIHx8IChyZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0gLSAxKSA9PT0gJ1xcXFwnICYmIHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSAtIDIpICE9PSAnXFxcXCcpKSAmJiBwb3NJbmRleE9yaWdJbmRleFswXSA8IHJlZ2V4Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHRtcFN0ciArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgc291cmNlWzBdICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0bXBTdHIgKz0gY2hhckF0O1xuICAgICAgICAgICAgc291cmNlWzBdICs9IGNoYXJBdDtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjaGFyQXQgPT09ICd8Jykge1xuICAgICAgICAgICAgLy9maW5hbGl6ZSBwZW5kaW5nIHRtcCBncm91cCBzdHJpbmcgaWYgYW55XG4gICAgICAgICAgICAvLzIwMTcwMzI3IC0gdGhpcyBpcyBub3QgbmVjZXNzYXJ5XG4gICAgICAgICAgICAvLyBpZiAodG1wU3RyICYmIGdyb3VwU3RydWN0dXJlWzNdLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIC8vICAgICAvL2NvbXBsZXRlIGdyb3VwaW5nOiBwdXQgdHJhaWxpbmcgYW5kIHBlbmRpbmcgY2hhcmFjdGVycyBzZXF1ZW5jZXMgaW50byBncm91cHNcbiAgICAgICAgICAgIC8vICAgICBwb3NJbmRleE9yaWdJbmRleFsxXSsrO1xuICAgICAgICAgICAgLy8gICAgIHRtcFN0ciA9ICcoJyArIHRtcFN0ciArICcpJztcbiAgICAgICAgICAgIC8vICAgICBncm91cFN0cnVjdHVyZVszXS5wdXNoKFtwb3NJbmRleE9yaWdJbmRleFsxXSwgLCB0bXBTdHIsIFtdXSk7XG4gICAgICAgICAgICAvLyB9XG4gICAgICAgICAgICBncm91cFN0cnVjdHVyZVsyXSArPSB0bXBTdHIgKyAnfCc7XG4gICAgICAgICAgICB0bXBTdHIgPSAnJztcbiAgICAgICAgICAgIHNvdXJjZVswXSArPSAnfCc7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY2hhckF0ID09PSAnKScpIHtcbiAgICAgICAgICAgIC8vaGFuZGxlIGdyb3VwIGVuZGluZ1xuICAgICAgICAgICAgLy8yMDE3MDMyNyAtIG5vdCByZXF1aXJlZCB0byBncm91cCBoZXJlIGJlY2F1c2UgaXQgaXMgYWxyZWFkeSBjb250YWluZWQgaW4gYSBwYXJlbnQgZ3JvdXBcbiAgICAgICAgICAgIC8vIGlmICh0bXBTdHIgJiYgZ3JvdXBTdHJ1Y3R1cmVbM10ubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgLy8gICAgIC8vY29tcGxldGUgZ3JvdXBpbmc6IHB1dCB0cmFpbGluZyBhbmQgcGVuZGluZyBjaGFyYWN0ZXJzIHNlcXVlbmNlcyBpbnRvIGdyb3Vwc1xuICAgICAgICAgICAgLy8gICAgIHBvc0luZGV4T3JpZ0luZGV4WzFdKys7XG4gICAgICAgICAgICAvLyAgICAgdG1wU3RyID0gJygnICsgdG1wU3RyICsgJyknO1xuICAgICAgICAgICAgLy8gICAgIGdyb3VwU3RydWN0dXJlWzNdLnB1c2goW3Bvc0luZGV4T3JpZ0luZGV4WzFdLCAsIHRtcFN0ciwgW11dKTtcbiAgICAgICAgICAgIC8vIH1cbiAgICAgICAgICAgIGdyb3VwU3RydWN0dXJlWzJdICs9IHRtcFN0ciArICcpJztcbiAgICAgICAgICAgIHNvdXJjZVswXSArPSA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cmVJbnRlcm5hbFsyXSA9ICcoJyArIHJlZ2V4R3JvdXBTdHJ1Y3R1cmVJbnRlcm5hbFsyXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8yMDE3MDMyNyAtIHNwZWNpYWwgaGFuZGxpbmcgaWYgd2UgaGF2ZSBhIGNhcHR1cmluZyBncm91cCB3aXRoIGEgcXVhbnRpZmllciB0aGVuIHdlIG5lZWQgdG9cbiAgICAgICAgICAgIC8vcHV0IHRoZSBxdWFudGlmaWVkIGdyb3VwIGludG8gYWRkaXRpb25hbCBwYXJhbnRoZXNpcyBvdGhlcndpc2Ugb25seSB0aGUgZmlyc3QgZ3JvdXAgbWF0Y2hlcyFcbiAgICAgICAgICAgIHZhciBxdWFudGlmaWVyU3RhcnQgPSBwb3NJbmRleE9yaWdJbmRleFswXTtcbiAgICAgICAgICAgIHZhciBxdWFudGlmaWVyU3RyaW5nID0gJyc7XG4gICAgICAgICAgICBpZiAocG9zSW5kZXhPcmlnSW5kZXhbMF0gKyAxIDwgcmVnZXgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgLy9wYXJzZSBxdWFudGlmaWVyXG4gICAgICAgICAgICAgICAgY2hhckF0ID0gcmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdICsgMSk7XG4gICAgICAgICAgICAgICAgaWYgKGNoYXJBdCA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgPSAnKic7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaGFyQXQgPT09ICcrJykge1xuICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nID0gJysnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhckF0ID09PSAnPycpIHtcbiAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyA9ICc/JztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgPSAneyc7XG4gICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChjaGFyQXQgPj0gJzAnICYmIGNoYXJBdCA8PSAnOScgJiYgcG9zSW5kZXhPcmlnSW5kZXhbMF0gPCByZWdleC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoYXJBdCA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nICs9ICd9JztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICcsJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgKz0gJywnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gcmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hhckF0ID49ICcwJyAmJiBjaGFyQXQgPD0gJzknICYmIHBvc0luZGV4T3JpZ0luZGV4WzBdIDwgcmVnZXgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hhckF0ID09PSAnfScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyArPSAnfSc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChxdWFudGlmaWVyU3RyaW5nLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVnZXhHcm91cFN0cnVjdHVyZUludGVybmFsWzJdICs9IHF1YW50aWZpZXJTdHJpbmc7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZVswXSArPSBxdWFudGlmaWVyU3RyaW5nO1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdICsgMSkgPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2V4R3JvdXBTdHJ1Y3R1cmVJbnRlcm5hbFsyXSArPSAnPyc7XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VbMF0gKz0gJz8nO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0gPSBxdWFudGlmaWVyU3RhcnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8yMDE3MDMyNyAtIHNwZWNpYWwgaGFuZGxpbmcgaWYgd2UgaGF2ZSBhIG5vbiBjYXB0dXJpbmcgZ3JvdXAgdGhlbiB3ZSBuZWVkIHRvIHB1dCB0aGlzIGdyb3VwIGludG9cbiAgICAgICAgICAgIC8vIGFkZGl0aW9uYWwgcGFyYW50aGVzaXMgb3RoZXJ3aXNlIHdlIGRvbid0IGtub3cgdGhlIHNpemUgb2YgdGhlIGdyb3VwICFcbiAgICAgICAgICAgIGlmIChxdWFudGlmaWVyU3RyaW5nLmxlbmd0aCA+IDAgfHwgIWlzQ2FwdHVyaW5nR3JvdXApIHtcbiAgICAgICAgICAgICAgICBpbmNyZW1lbnRSZWdleEdyb3VwU3RydWN0dXJlSW5kZXgocmVnZXhHcm91cFN0cnVjdHVyZUludGVybmFsLCBpbmRleE1hcCk7XG4gICAgICAgICAgICAgICAgcmVn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mNTZXR0bGVQcm9taXNlcztcbn0gZWxzZSB7XG4gICAgQXN5bmMucHJvdG90eXBlLmludm9rZUxhdGVyID0gZnVuY3Rpb24gKGZuLCByZWNlaXZlciwgYXJnKSB7XG4gICAgICAgIGlmICh0aGlzLl90cmFtcG9saW5lRW5hYmxlZCkge1xuICAgICAgICAgICAgQXN5bmNJbnZva2VMYXRlci5jYWxsKHRoaXMsIGZuLCByZWNlaXZlciwgYXJnKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuX3NjaGVkdWxlKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGZuLmNhbGwocmVjZWl2ZXIsIGFyZyk7XG4gICAgICAgICAgICAgICAgfSwgMTAwKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIEFzeW5jLnByb3RvdHlwZS5pbnZva2UgPSBmdW5jdGlvbiAoZm4sIHJlY2VpdmVyLCBhcmcpIHtcbiAgICAgICAgaWYgKHRoaXMuX3RyYW1wb2xpbmVFbmFibGVkKSB7XG4gICAgICAgICAgICBBc3luY0ludm9rZS5jYWxsKHRoaXMsIGZuLCByZWNlaXZlciwgYXJnKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuX3NjaGVkdWxlKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGZuLmNhbGwocmVjZWl2ZXIsIGFyZyk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBBc3luYy5wcm90b3R5cGUuc2V0dGxlUHJvbWlzZXMgPSBmdW5jdGlvbihwcm9taXNlKSB7XG4gICAgICAgIGlmICh0aGlzLl90cmFtcG9saW5lRW5hYmxlZCkge1xuICAgICAgICAgICAgQXN5bmNTZXR0bGVQcm9taXNlcy5jYWxsKHRoaXMsIHByb21pc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iAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG9iaikgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICd1c2Ugc3RyaWN0JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHZhciBsZW4gPSB0aGlzLmxlbmd0aDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGVuc3VyZU1ldGhvZChvYmosICdtZXRob2ROYW1lJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHN3aXRjaChsZW4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBvYmoubWV0aG9kTmFtZSh0aGlzWzBdKTsgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBvYmoubWV0aG9kTmFtZSh0aGlzWzBdLCB0aGlzWzFdKTsgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiBvYmoubWV0aG9kTmFtZSh0aGlzWzBdLCB0aGlzWzFdLCB0aGlzWzJdKTsgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBjYXNlIDA6IHJldHVybiBvYmoubWV0aG9kTmFtZSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iai5tZXRob2ROYW1lLmFwcGx5KG9iaiwgdGhpcyk7ICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgfTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgXCIucmVwbGFjZSgvbWV0aG9kTmFtZS9nLCBtZXRob2ROYW1lKSkoZW5zdXJlTWV0aG9kKTtcbn07XG5cbnZhciBtYWtlR2V0dGVyID0gZnVuY3Rpb24gKHByb3BlcnR5TmFtZSkge1xuICAgIHJldHVybiBuZXcgRnVuY3Rpb24oXCJvYmpcIiwgXCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAndXNlIHN0cmljdCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICByZXR1cm4gb2JqLnByb3BlcnR5TmFtZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICBcIi5yZXBsYWNlKFwicHJvcGVydHlOYW1lXCIsIHByb3BlcnR5TmFtZSkpO1xufTtcblxudmFyIGdldENvbXBpbGVkID0gZnVuY3Rpb24obmFtZSwgY29tcGlsZXIsIGNhY2hlKSB7XG4gICAgdmFyIHJldCA9IGNhY2hlW25hbWVdO1xuICAgIGlmICh0eXBlb2YgcmV0ICE9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgaWYgKCFpc0lkZW50aWZpZXIobmFtZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHJldCA9IGNvbXBpbGVyKG5hbWUpO1xuICAgICAgICBjYWNoZVtuYW1lXSA9IHJldDtcbiAgICAgICAgY2FjaGVbXCIgc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nLmNhbmNlbGxhdGlvbigpKSByZXR1cm4gdGhpcy5fd2FybihcImNhbmNlbGxhdGlvbiBpcyBkaXNhYmxlZFwiKTtcblxuICAgIHZhciBwcm9taXNlID0gdGhpcztcbiAgICB2YXIgY2hpbGQgPSBwcm9taXNlO1xuICAgIHdoaWxlIChwcm9taXNlLl9pc0NhbmNlbGxhYmxlKCkpIHtcbiAgICAgICAgaWYgKCFwcm9taXNlLl9jYW5jZWxCeShjaGlsZCkpIHtcbiAgICAgICAgICAgIGlmIChjaGlsZC5faXNGb2xsb3dpbmcoKSkge1xuICAgICAgICAgICAgICAgIGNoaWxkLl9mb2xsb3dlZSgpLmNhbmNlbCgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjaGlsZC5fY2FuY2VsQnJhbmNoZWQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBhcmVudCA9IHByb21pc2UuX2NhbmNlbGxhdGlvblBhcmVudDtcbiAgICAgICAgaWYgKHBhcmVudCA9PSBudWxsIHx8ICFwYXJlbnQuX2lzQ2FuY2VsbGFibGUoKSkge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2lzRm9sbG93aW5nKCkpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLl9mb2xsb3dlZSgpLmNhbmNlbCgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLl9jYW5jZWxCcmFuY2hlZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAocHJvbWlzZS5faXNGb2xsb3dpbmcoKSkgcHJvbWlzZS5fZm9sbG93ZWUoKS5jYW5jZWwoKTtcbiAgICAgICAgICAgIHByb21pc2UuX3NldFdpbGxCZUNhbmNlbGxlZCgpO1xuICAgICAgICAgICAgY2hpb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ICAgICAgICAgICAgICAgaWYgKGUgaW5zdGFuY2VvZiBpdGVtKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnlDYXRjaChjYikuY2FsbChib3VuZFRvLCBlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2hlc1ByZWRpY2F0ZSA9IHRyeUNhdGNoKGl0ZW0pLmNhbGwoYm91bmRUbywgZSk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoZXNQcmVkaWNhdGUgPT09IGVycm9yT2JqKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaGVzUHJlZGljYXRlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hlc1ByZWRpY2F0ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ5Q2F0Y2goY2IpLmNhbGwoYm91bmRUbywgZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh1dGlsLmlzT2JqZWN0KGUpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSBnZXRLZXlzKGl0ZW0pO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwga2V5cy5sZW5ndGg7ICsraikge1xuICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0ga2V5c1tqXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW1ba2V5XSAhPSBlW2tleV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIHByZWRpY2F0ZUxvb3A7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyeUNhdGNoKGNiKS5jYWxsKGJvdW5kVG8sIGUpO1xuICAgICAgICAgICAgf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nREYXRhLCBcInJlYXNvblwiLCB7dmFsdWU6IGV2ZW50LnJlYXNvbn0pO1xuICAgICAgICAgICAgICAgIHZhciBkb21FdmVudCA9IG5ldyBDdXN0b21FdmVudChuYW1lLnRvTG93ZXJDYXNlKCksIGV2ZW50RGF0YSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICF1dGlsLmdsb2JhbC5kaXNwYXRjaEV2ZW50KGRvbUV2ZW50KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIEV2ZW50ID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgIHZhciBldmVudCA9IG5ldyBFdmVudChcIkN1c3RvbUV2ZW50XCIpO1xuICAgICAgICAgICAgdXRpbC5nbG9iYWwuZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24obmFtZSwgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgZG9tRXZlbnQgPSBuZXcgRXZlbnQobmFtZS50b0xvd2VyQ2FzZSgpLCB7XG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbGFibGU6IHRydWVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBkb21FdmVudC5kZXRhaWwgPSBldmVudDtcbiAgICAgICAgICAgICAgICBlczUuZGVmaW5lUHJvcGVydHkoZG9tRXZlbnQsIFwicHJvbWlzZVwiLCB7dmFsdWU6IGV2ZW50LnByb21pc2V9KTtcbiAgICAgICAgICAgICAgICBlczUuZGVmaW5lUHJvcGVydHkoZG9tRXZlbnQsIFwicmVhc29uXCIsIHt2YWx1ZTogZXZlbnQucmVhc29ufSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICF1dGlsLmdsb2JhbC5kaXNwYXRjaEV2ZW50KGRvbUV2ZW50KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZXZlbnQgPSBkb2N1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dW5jdGlvbiBjaGVja0ZvcmdvdHRlblJldHVybnMocmV0dXJuVmFsdWUsIHByb21pc2VDcmVhdGVkLCBuYW1lLCBwcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudCkge1xuICAgIGlmIChyZXR1cm5WYWx1ZSA9PT0gdW5kZWZpbmVkICYmIHByb21pc2VDcmVhdGVkICE9PSBudWxsICYmXG4gICAgICAgIHdGb3Jnb3R0ZW5SZXR1cm4pIHtcbiAgICAgICAgaWYgKHBhcmVudCAhPT0gdW5kZWZpbmVkICYmIHBhcmVudC5fcmV0dXJuZWROb25VbmRlZmluZWQoKSkgcmV0dXJuO1xuICAgICAgICBpZiAoKHByb21pc2UuX2JpdEZpZWxkICYgNjU1MzUpID09PSAwKSByZXR1cm47XG5cbiAgICAgICAgaWYgKG5hbWUpIG5hbWUgPSBuYW1lICsgXCIgXCI7XG4gICAgICAgIHZhciBoYW5kbGVyTGluZSA9IFwiXCI7XG4gICAgICAgIHZhciBjcmVhdG9yTGluZSA9IFwiXCI7XG4gICAgICAgIGlmIChwcm9taXNlQ3JlYXRlZC5fdHJhY2UpIHtcbiAgICAgICAgICAgIHZhciB0cmFjZUxpbmVzID0gcHJvbWlzZUNyZWF0ZWQuX3RyYWNlLnN0YWNrLnNwbGl0KFwiXFxuXCIpO1xuICAgICAgICAgICAgdmFyIHN0YWNrID0gY2xlYW5TdGFjayh0cmFjZUxpbmVzKTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBzdGFjay5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc3RhY2tbaV07XG4gICAgICAgICAgICAgICAgaWYgKCFub2RlRnJhbWVQYXR0ZXJuLnRlc3QobGluZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpbmVNYXRjaGVzID0gbGluZS5tYXRjaChwYXJzZUxpbmVQYXR0ZXJuKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVNYXRjaGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVyTGluZSAgPSBcImF0IFwiICsgbGluZU1hdGNoZXNbMV0gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiOlwiICsgbGluZU1hdGNoZXNbMl0gKyBcIjpcIiArIGxpbmVNYXRjaGVzWzNdICsgXCIgXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc3RhY2subGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHZhciBmaXJzdFVzZXJMaW5lID0gc3RhY2tbMF07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0cmFjZUxpbmVzLmxlbmd0aDsgKytpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRyYWNlTGluZXNbaV0gPT09IGZpcnN0VXNlckxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0b3JMaW5lID0gXCJcXG5cIiArIHRyYWNlTGluZXNbaSAtIDFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbXNnID0gXCJhIHByb21pc2Ugd2FzIGNyZWF0ZWQgaW4gYSBcIiArIG5hbWUgK1xuICAgICAgICAgICAgXCJoYW5kbGVyIFwiICsgaGFuZGxlckxpbmUgKyBcImJ1dCB3YXMgbm90IHJldHVybmVkIGZyb20gaXQsIFwiICtcbiAgICAgICAgICAgIFwic2VlIGh0dHA6Ly9nb28uZ2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Bmb3IgKHZhciBpID0gMTsgaSA8IHN0YWNrcy5sZW5ndGg7ICsraSkge1xuICAgICAgICB2YXIgcHJldiA9IHN0YWNrc1tpXTtcbiAgICAgICAgdmFyIGN1cnJlbnRMYXN0SW5kZXggPSBjdXJyZW50Lmxlbmd0aCAtIDE7XG4gICAgICAgIHZhciBjdXJyZW50TGFzdExpbmUgPSBjdXJyZW50W2N1cnJlbnRMYXN0SW5kZXhdO1xuICAgICAgICB2YXIgY29tbW9uUm9vdE1lZXRQb2ludCA9IC0xO1xuXG4gICAgICAgIGZvciAodmFyIGogPSBwcmV2Lmxlbmd0aCAtIDE7IGogPj0gMDsgLS1qKSB7XG4gICAgICAgICAgICBpZiAocHJldltqXSA9PT0gY3VycmVudExhc3RMaW5lKSB7XG4gICAgICAgICAgICAgICAgY29tbW9uUm9vdE1lZXRQb2ludCA9IGo7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBqID0gY29tbW9uUm9vdE1lZXRQb2ludDsgaiA+PSAwOyAtLWopIHtcbiAgICAgICAgICAgIHZhciBsaW5lID0gcHJldltqXTtcbiAgICAgICAgICAgIGlmIChjdXJyZW50W2N1cnJlbnRMYXN0SW5kZXhdID09PSBsaW5lKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudC5wb3AoKTtcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFzdEluZGV4LS07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGN1cnJlbnQgPSBwcmV2O1xuICAgIH1cbn1cblxuZnVuY3Rpb24gY2xlYW5TdGFjayhzdGFjaykge1xuICAgIHZhciByZXQgPSBbXTtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0YWNrLmxlbmd0aDsgKytpKSB7XG4gICAgICAgIHZhciBsaW5lID0gc3RhY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3Rpb25cIiB8fFxuICAgICAgICAgICAgdHlwZW9mIGNvbnNvbGUubG9nID09PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhtZXNzYWdlKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZnVuY3Rpb24gZmlyZVJlamVjdGlvbkV2ZW50KG5hbWUsIGxvY2FsSGFuZGxlciwgcmVhc29uLCBwcm9taXNlKSB7XG4gICAgdmFyIGxvY2FsRXZlbnRGaXJlZCA9IGZhbHNlO1xuICAgIHRyeSB7XG4gICAgICAgIGlmICh0eXBlb2YgbG9jYWxIYW5kbGVyID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgIGxvY2FsRXZlbnRGaXJlZCA9IHRydWU7XG4gICAgICAgICAgICBpZiAobmFtZSA9PT0gXCJyZWplY3Rpb25IYW5kbGVkXCIpIHtcbiAgICAgICAgICAgICAgICBsb2NhbEhhbmRsZXIocHJvbWlzZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvY2FsSGFuZGxlcihyZWFzb24sIHByb21pc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBhc3luYy50aHJvd0xhdGVyKGUpO1xuICAgIH1cblxuICAgIGlmIChuYW1lID09PSBcInVuaGFuZGxlZFJlamVjdGlvblwiKSB7XG4gICAgICAgIGlmICghYWN0aXZlRmlyZUV2ZW50KG5hbWUsIHJlYXNvbiwgcHJvbWlzZSkgJiYgIWxvY2FsRXZlbnRGaXJlZCkge1xuICAgICAgICAgICAgZm9ybWF0QW5kTG9nRXJyb3IocmVhc29uLCBcIlVuaGFuZGxlZCByZWplY3Rpb24gXCIpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgYWN0aXZlRmlyZUV2ZW50KG5hbWUsIHByb21pc2UpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZm9ybWF0Tm9uRXJyb3Iob2JqKSB7XG4gICAgdmFyIHN0cjtcbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgIHN0ciA9IFwiW2Z1bmN0aW9uIFwiICtcbiAgICAgICAgICAgIChvYmoubmFtZSB8fCBcImFub255bW91c1wiKSArXG4gICAgICAgICAgICBcIl1cIjtcbiAgICB9IGVsc2Uge1xuICAgICAgICBzdHIgPSBvYmogJiYgdHlwZW9mIG9iai50b1N0cmluZyA9PT0gXCJmdW5jdGlvblwiXG4gICAgICAgICAgICA/IG9iai50b1N0cmluZygpIDogdXRpbC50b1N0cmluZyhvYmopO1xuICAgICAgICB2YXIgcnVzZWxlc3NUb1N0cmluZyA9IC9cXFtvYmplY3QgW2EtekEtWjAtOSRfXStcXF0vO1xuICAgICAgICBpZiAocnVzZWxlc3NUb1N0cmluZy50ZXN0KHN0cikpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgdmFyIG5ld1N0ciA9IEpTT04uc3RyaW5naWZ5KG9iaik7XG4gICAgICAgICAgICAgICAgc3RyID0gbmV3U3RyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2goZSkge1xuXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHN0ci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHN0ciA9IFwiKGVtcHR5IGFycmF5KVwiO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiAoXCIoPFwiICsgc25pcChzdHIpICsgXCI+LCBubyBzdGFjayB0cmFjZSlcIik7XG59XG5cbmZ1bmN0aW9uIHNuaXAoc3RyKSB7XG4gICAgdmFyIG1heENoYXJzID0gNDE7XG4gICAgaWYgKHN0ci5sZW5ndGggPCBtYXhDaGFycykge1xuICAgICAgICByZXR1cm4gc3RyO1xuICAgIH1cbiAgICByZXR1cm4gc3RyLnN1YnN0cigwLCBtYXhDaGFycyAtID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mb3IgKHZhciBrZXkgaW4gbykge1xuICAgICAgICAgICAgaWYgKGhhcy5jYWxsKG8sIGtleSkpIHtcbiAgICAgICAgICAgICAgICByZXQucHVzaChrZXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgfTtcblxuICAgIHZhciBPYmplY3RHZXREZXNjcmlwdG9yID0gZnVuY3Rpb24obywga2V5KSB7XG4gICAgICAgIHJldHVybiB7dmFsdWU6IG9ba2V5XX07XG4gICAgfTtcblxuICAgIHZhciBPYmplY3REZWZpbmVQcm9wZXJ0eSA9IGZ1bmN0aW9uIChvLCBrZXksIGRlc2MpIHtcbiAgICAgICAgb1trZXldID0gZGVzYy52YWx1ZTtcbiAgICAgICAgcmV0dXJuIG87XG4gICAgfTtcblxuICAgIHZhciBPYmplY3RGcmVlemUgPSBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfTtcblxuICAgIHZhciBPYmplY3RHZXRQcm90b3R5cGVPZiA9IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJldHVybiBPYmplY3Qob2JqKS5jb25zdHJ1Y3Rvci5wcm90b3R5cGU7XG4gICAgICAgIH1cbiAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHJldHVybiBwcm90bztcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgQXJyYXlJc0FycmF5ID0gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIHN0ci5jYWxsKG9iaikgPT09IFwiW29iamVjdCBBcnJheV1cIjtcbiAgICAgICAgfVxuICAgICAgICBjYXRjaChlKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgbW9kdWxlLmV4cG9ydHMgPSB7XG4gICAgICAgIGlzQXJyYXk6IEFyc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PT09IE5FWFRfRklMVEVSKSB7XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9IGVsc2UgaWYgKHJldCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBwcm9taXNlLl9zZXRSZXR1cm5lZE5vblVuZGVmaW5lZCgpO1xuICAgICAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UocmV0LCBwcm9taXNlKTtcbiAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY2FuY2VsUHJvbWlzZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UuX2lzQ2FuY2VsbGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWFzb24gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBDYW5jZWxsYXRpb25FcnJvcihcImxhdGUgY2FuY2VsbGF0aW9uIG9ic2VydmVyXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS5fYXR0YWNoRXh0cmFUcmFjZShyZWFzb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JPYmouZSA9IHJlYXNvbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvck9iajtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXliZVByb21pc2UuaXNQZW5kaW5nKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5fYXR0YWNoQ2FuY2VsbGF0aW9uQ2FsbGJhY2soXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IEZpbmFsbHlIYW5kbGVyQ2FuY2VsUmVhY3Rpb24odGhpcykpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgIC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AgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxseUhhbmRsZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsbHlIYW5kbGVyKTtcbn07XG5cblxuUHJvbWlzZS5wcm90b3R5cGUudGFwID0gZnVuY3Rpb24gKGhhbmRsZXIpIHtcbiAgICByZXR1cm4gdGhpcy5fcGFzc1Rocm91Z2goaGFuZGxlciwgMSwgZmluYWxseUhhbmRsZXIpO1xufTtcblxuUHJvbWlzZS5wcm90b3R5cGUudGFwQ2F0Y2ggPSBmdW5jdGlvbiAoaGFuZGxlck9yUHJlZGljYXRlKSB7XG4gICAgdmFyIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgaWYobGVuID09PSAxKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9wYXNzVGhyb3VnaChoYW5kbGVyT3JQcmVkaWNhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxseUhhbmRsZXIpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgICB2YXIgY2F0Y2hJbnN0YW5jZXMgPSBuZXcgQXJyYXkobGVuIC0gMSksXG4gICAgICAgICAgICBqID0gMCwgaTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbiAtIDE7ICsraSkge1xuICAgICAgICAgICAgdmFyIGl0ZW0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICBpZiAodXRpbC5pc09iamVjdChpdGVtKSkge1xuICAgICAgICAgICAgICAgIGNhdGNoSW5zdGFuY2VzW2orK10gPSBpdGVtO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QobmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgXCJ0YXBDYXRjaCBzdGF0ZW1lbnQgcHJlZGljYXRlOiBcIlxuICAgICAgICAgICAgICAgICAgICArIFwiZXhwZWN0aW5nIGFuIG9iamVjdCBidXQgZ290IFwiICsgdXRpbC5jbGFzc1N0cmluZyhpdGVtKVxuICAgICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhdGNoSW5zdGFuY2VzLmxlbmd0aCA9IGo7XG4gICAgICAgIHZhciBoYW5kbGVyID0gYXJndW1lbnRzW2ldO1xuICAgICAgICByZXR1cm4gdGhpcy5fcGFzc1Rocm91Z2goY2F0Y2hGaWx0ZXIoY2F0Y2hJbnN0YW5jZXMsIGhhbmRsZXIsIHRoaXMpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsbHlIYW5kbGVyKTtcbiAgICB9XG5cbn07XG5cbnJldHVybiBQYXNzVGhyb3VnaEhhbmRsZXJDb250ZXh0O1xufTtcblxufSx7XCIuL2NhdGNoX2ZpbHRlclwiOjcsXCIuL3V0aWxcIjozNn1dLDE2OltmdW5jdGlvbihfZGVyZXFfLG1vZHVsZSxleHBvcnRzKXtcblwidXNlIHN0cmljdFwiO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbihQcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBhcGlSZWplY3Rpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIElOVEVSTkFMLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0cnlDb252ZXJ0VG9Qcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBQcm94eWFibGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlYnVnKSB7XG52YXIgZXJyb3JzID0gX2RlcmVxXyhcIi4vZXJyb3J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24pO1xuICAgICAgICB0aGlzLl9wcm9taXNlLl9wdXNoQ29udGV4dCgpO1xuICAgICAgICByZXN1bHQgPSB0cnlDYXRjaCh0aGlzLl9nZW5lcmF0b3JbXCJ0aHJvd1wiXSkuY2FsbCh0aGlzLl9nZW5lcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFzb24pO1xuICAgICAgICB0aGlzLl9wcm9taXNlLl9wb3BDb250ZXh0KCk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5fcHJvbWlzZS5fcHVzaENvbnRleHQoKTtcbiAgICAgICAgcmVzdWx0ID0gdHJ5Q2F0Y2godGhpcy5fZ2VuZXJhdG9yW1wicmV0dXJuXCJdKS5jYWxsKHRoaXMuX2dlbmVyYXRvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICB0aGlzLl9wcm9taXNlLl9wb3BDb250ZXh0KCk7XG4gICAgfVxuICAgIHRoaXMuX2NhbmNlbGxhdGlvblBoYXNlID0gdHJ1ZTtcbiAgICB0aGlzLl95aWVsZGVkUHJvbWlzZSA9IG51bGw7XG4gICAgdGhpcy5fY29udGludWUocmVzdWx0KTtcbn07XG5cblByb21pc2VTcGF3bi5wcm90b3R5cGUuX3Byb21pc2VGdWxmaWxsZWQgPSBmdW5jdGlvbih2YWx1ZSkge1xuICAgIHRoaXMuX3lpZWxkZWRQcm9taXNlID0gbnVsbDtcbiAgICB0aGlzLl9wcm9taXNlLl9wdXNoQ29udGV4dCgpO1xuICAgIHZhciByZXN1bHQgPSB0cnlDYXRjaCh0aGlzLl9nZW5lcmF0b3IubmV4dCkuY2FsbCh0aGlzLl9nZW5lcmF0b3IsIHZhbHVlKTtcbiAgICB0aGlzLl9wcm9taXNlLl9wb3BDb250ZXh0KCk7XG4gICAgdGhpcy5fY29udGludWUocmVzd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1bmN0aW9uID0gdW5kZWZpbmVkO1xuICAgIHRoaXMuX3Byb21pc2VGdWxmaWxsZWQodW5kZWZpbmVkKTtcbn07XG5cblByb21pc2VTcGF3bi5wcm90b3R5cGUuX2NvbnRpbnVlID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgIHZhciBwcm9taXNlID0gdGhpcy5fcHJvbWlzZTtcbiAgICBpZiAocmVzdWx0ID09PSBlcnJvck9iaikge1xuICAgICAgICB0aGlzLl9jbGVhbnVwKCk7XG4gICAgICAgIGlmICh0aGlzLl9jYW5jZWxsYXRpb25QaGFzZSkge1xuICAgICAgICAgICAgcmV0dXJuIHByb21pc2UuY2FuY2VsKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gcHJvbWlzZS5fcmVqZWN0Q2FsbGJhY2socmVzdWx0LmUsIGZhbHNlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHZhciB2YWx1ZSA9IHJlc3VsdC52YWx1ZTtcbiAgICBpZiAocmVzdWx0LmRvbmUgPT09IHRydWUpIHtcbiAgICAgICAgdGhpcy5fY2xlYW51cCgpO1xuICAgICAgICBpZiAodGhpcy5fY2FuY2VsbGF0aW9uUGhhc2UpIHtcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlLmNhbmNlbCgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHByb21pc2UuX3Jlc29sdmVDYWxsYmFjayh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgbWF5YmVQcm9taXNlID0gdHJ5Q29udmVydFRvUHJvbWlzZSh2YWx1ZSwgdGhpcy5fcHJvbWlzZSk7XG4gICAgICAgIGlmICghKG1heWJlUHJvbWlzZSBpbnN0YW5jZW9mIFByb21pc2UpKSB7XG4gICAgICAgICAgICBtYXliZVByb21pc2UgPVxuICAgICAgICAgICAgICAgIHByb21pc2VGcm9tWWllbGRIYW5kbGVyKG1heWJlUHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl95aWVsZEhhbmRsZXJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb21pc2UpO1xuICAgICAgICAgICAgaWYgKG1heWJlUHJvbWlzZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3Byb21pc2VSZWplY3RlZChcbiAgICAgICAgICAgICAgICAgICAgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiQSB2YWx1ZSAlcyB3YXMgeWllbGRlZCB0aGF0IGNvdWxkIG5vdCBiZSB0cmVhdGVkIGFzIGEgcHJvbWlzZVxcdTAwMGFcXHUwMDBhICAgIFNlZSBodHRwOi8vZ29vLmdsL01xckZtWFxcdTAwMGFcXHUwMDBhXCIucmVwbGFjZShcIiVzXCIsIFN0cmluZyh2YWx1ZSkpICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRnJvbSBjb3JvdXRpbmU6XFx1MDAwYVwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3N0YWNrLnNwbGl0KFwiXFxuXCIpLnNsaWNlKDEsIC03KS5qb2luKFwiXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBtYXliZVByb21pc2UgPSBtYXliZVByb21pc2UuX3RhcmdldCgpO1xuICAgICAgICB2YXIgYml0RmllbGQgPSBtYXliZVByb21pc2UuX2JpdEZpZWxkO1xuICAgICAgICA7XG4gICAgICAgIGlmICgoKGJpdEZpZWxkICYgNTAzOTcxODQpID09PSAwKSkge1xuICAgICAgICAgICAgdGhpcy5feWllbGRlZFByb21pc2UgPSBtYXliZVByb21pc2U7XG4gICAgICAgICAgICBtYXliZVByb21pc2UuX3Byb3h5KHRoaXMsIG51bGwpO1xuICAgICAgICB9IGVsc2UgaWYgKCgoYml0RmllbGQgJiAzMzU1NDQzMikgIT09IDApKSB7XG4gICAgICAgICAgICBQcm9taXNlLl9hc3luYy5pbnZva2UoXG4gICAgICAgICAgICAgICAgdGhpcy5fcHJvbWlzZUZ1bGZpbGxlZCwgdGhpcywgbWF5YmVQcm9taXNlLl92YWx1ZSgpXG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKCgoYml0RmllbGQgJiAxNjc3NzIxNikgIT09IDApKSB7XG4gICAgICAgICAgICBQcm9taXNlLl9hc3luYy5pbnZva2UoXG4gICAgICAgICAgICAgICAgdGhpcy5fcHJvbWlzZVJlamVjdGVkLCB0aGlzLCBtYXliZVByb21pc2UuX3JlYXNvbigpXG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fcHJvbWlzZUNhbmNlbGxlZCgpO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuUHJvbWlzZS5jb3JvdXRpbmUgPSBmdW5jdGlvbiAoZ2VuZXJhdG9yRnVuY3Rpb24sIG9wdGlvbnMpIHtcbiAgICBpZiAodHlwZW9mIGdlbmVyYXRvckZ1bmN0aW9uICE9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcImdlbmVyYXRvckZ1bmN0aW9uIG11c3QgYmUgYSBmdW5jdGlvblxcdTAwMGFcXHUwMDBhICAgIFNlZSBodHRwOi8vZ29vLmdsL01xckZtWFxcdTAwMGFcIik7XG4gICAgfVxuICAgIHZhciB5aWVsZEhhbmRsZXIgPSBPYmplY3Qob3B0aW9ucykueWllbGRIYW5kbGVyO1xuICAgIHZhciBQcm9taXNlU3Bhd24kID0gUHJvbWlzZVNwYXduO1xuICAgIHZhciBzdGFjayA9IG5ldyBFcnJvcigpLnN0YWNrO1xuICAgIHJldHVybiBmdW5jd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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGhvbGRlci5jaGVja0Z1bGZpbGxtZW50KHRoaXMpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFwiLnJlcGxhY2UoL0luZGV4L2csIGkpKTtcbiAgICB9O1xuXG4gICAgdmFyIHByb21pc2VTZXR0ZXIgPSBmdW5jdGlvbihpKSB7XG4gICAgICAgIHJldHVybiBuZXcgRnVuY3Rpb24oXCJwcm9taXNlXCIsIFwiaG9sZGVyXCIsIFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICd1c2Ugc3RyaWN0JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGhvbGRlci5wSW5kZXggPSBwcm9taXNlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFwiLnJlcGxhY2UoL0luZGV4L2csIGkpKTtcbiAgICB9O1xuXG4gICAgdmFyIGdlbmVyYXRlSG9sZGVyQ2xhc3MgPSBmdW5jdGlvbih0b3RhbCkge1xuICAgICAgICB2YXIgcHJvcHMgPSBuZXcgQXJyYXkodG90YWwpO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBwcm9wc1tpXSA9IFwidGhpcy5wXCIgKyAoaSsxKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgYXNzaWdubWVudCA9IHByb3BzLmpvaW4oXCIgPSBcIikgKyBcIiA9IG51bGw7XCI7XG4gICAgICAgIHZhciBjYW5jZWxsYXRpb25Db2RlPSBcInZhciBwcm9taXNlO1xcblwiICsgcHJvcHMubWFwKGZ1bmN0aW9uKHByb3ApIHtcbiAgICAgICAgICAgIHJldHVybiBcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgcHJvbWlzZSA9IFwiICsgcHJvcCArIFwiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBpZiAocHJvbWlzZSBpbnN0YW5jZW9mIFByb21pc2UpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS5jYW5jZWwoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFwiO1xuICAgICAgICB9KS5qb2luKFwiXFxuXCIpO1xuICAgICAgICB2YXIgcGFzc2VkQXJndW1lbnRzID0gcHJvcHMuam9pbihcIiwgXCIpO1xuICAgICAgICB2YXIgbmFtZSA9IFwiSG9sZGVyJFwiICsgdG90YWw7XG5cblxuICAgICAgICB2YXIgY29kZSA9IFwicmV0dXJuIGZ1bmN0aW9uKHRyeUNhdGNoLCBlcnJvck9iaiwgUHJvbWlzZSwgYXN5bmMpIHsgICAgXFxuXFxcbiAgICAgICAgICAgICd1c2Ugc3RyaWN0JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGZ1bmN0aW9uIFtUaGVOYW1lXShmbikgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBbVGhlUHJvcGVydGllc10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB0aGlzLmZuID0gZm47ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jTmVlZGVkID0gdHJ1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB0aGlzLm5vdyA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFtUaGVOYW1lXS5wcm90b3R5cGUuX2NhbGxGdW5jdGlvbiA9IGZ1bmN0aW9uKHByb21pc2UpIHsgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBwcm9taXNlLl9wdXNoQ29udGV4dCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB2YXIgcmV0ID0gdHJ5Q2F0Y2godGhpcy5mbikoW1RoZVBhc3NlZEFyZ3VtZW50c10pOyAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBwcm9taXNlLl9wb3BDb250ZXh0KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBpZiAocmV0ID09PSBlcnJvck9iaikgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS5fcmVqZWN0Q2FsbGJhY2socmV0LmUsIGZhbHNlKTsgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS5fcmVzb2x2ZUNhbGxiYWNrKHJldCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFtUaGVOYW1lXS5wcm90b3R5cGUuY2hlY2tGdWxmaWxsbWVudCA9IGZ1bmN0aW9uKHByb21pc2UpIHsgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB2YXIgbm93ID0gKyt0aGlzLm5vdzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBpZiAobm93ID09PSBbVGhlVG90YWxdKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuYXN5bmNOZWVkZWQpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzeW5jLmludm9rZSh0aGlzLl9jYWxsRnVuY3Rpb24sIHRoaXMsIHByb21pc2UpOyAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhbGxGdW5jdGlvbihwcm9taXNlKTsgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFtUaGVOYW1lXS5wcm90b3R5cGUuX3Jlc3VsdENhbmNlbGxlZCA9IGZ1bmN0aW9uKCkgeyAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBbQ2FuY2VsbGF0aW9uQ29kZV0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHJldHVybiBbVGhlTmFtZV07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgfSh0cnlDYXRjaCwgZXJyb3JPYmosIFByb21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BmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgIHRoaXMuX3JlamVjdChyZWFzb24pO1xuICAgIH07XG59fVxuXG5Qcm9taXNlLmpvaW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGxhc3QgPSBhcmd1bWVudHMubGVuZ3RoIC0gMTtcbiAgICB2YXIgZm47XG4gICAgaWYgKGxhc3QgPiAwICYmIHR5cGVvZiBhcmd1bWVudHNbbGFzdF0gPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICBmbiA9IGFyZ3VtZW50c1tsYXN0XTtcbiAgICAgICAgaWYgKCF0cnVlKSB7XG4gICAgICAgICAgICBpZiAobGFzdCA8PSA4ICYmIGNhbkV2YWx1YXRlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJldCA9IG5ldyBQcm9taXNlKElOVEVSTkFMKTtcbiAgICAgICAgICAgICAgICByZXQuX2NhcHR1cmVTdGFja1RyYWNlKCk7XG4gICAgICAgICAgICAgICAgdmFyIEhvbGRlckNsYXNzID0gaG9sZGVyQ2xhc3Nlc1tsYXN0IC0gMV07XG4gICAgICAgICAgICAgICAgdmFyIGhvbGRlciA9IG5ldyBIb2xkZXJDbGFzcyhmbik7XG4gICAgICAgICAgICAgICAgdmFyIGNhbGxiYWNrcyA9IHRoZW5DYWxsYmFja3M7XG5cbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxhc3Q7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWF5YmVQcm9taXNlID0gdHJ5Q29udmVydFRvUHJvbWlzZShhcmd1bWVudHNbaV0sIHJldCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UgPSBtYXliZVByb21pc2UuX3RhcmdldCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGJpdEZpZWxkID0gbWF5YmVQcm9taXNlLl9iaXRGaWVsZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGJpdEZpZWxkICYgNTAzOTcxODQpID09PSAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5fdGhlbihjYWxsYmFja3NbaV0sIHJlamVjdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5kZWZpbmVkLCByZXQsIGhvbGRlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZVNldHRlcnNbaV0obWF5YmVQcm9taXNlLCBob2xkZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvbGRlci5hc3luY05lZWRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMzM1NTQ0MzIpICE9PSAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrc1tpXS5jYWxsKHJldCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UuX3ZhbHVlKCksIGhvbGRlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCgoYml0RmllbGQgJiAxNjc3NzIxNikgIT09IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0Ll9yZWplY3QobWF5YmVQcm9taXNlLl9yZWFzb24oKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldC5fY2FuY2VsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja3NbaV0uY2FsbChyZXQsIG1heWJlUHJvbWlzZSwgaG9sZGVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghcmV0Ll9pc0ZhdGVTZWFsZWQoKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaG9sZGVyLmFzeW5jTmVlZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZG9tYWluID0gZ2V0RG9tYWluKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9tYWluICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaG9sZGVyLmZuID0gdXRpbC5kb21haW5CaW5kKGRvbWFpbiwgaG9sZGVyLmZuKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXQuX3NldEFzeW5jR3VhcmFudGVlZCgpO1xuICAgICAgICAgICAgICAgICAgICByZXQuX3NldE9uQ2FuY2VsKGhvbGRlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgdmFyIGFyZ3MgPSBbXS5zbGljZS5jYWxsKGFyZ3VtZW50cyk7O1xuICAgIGlmIChmbikgYXJncy5wb3AoKTtcbiAgICB2YXIgcmV0ID0gbmV3IFByb21pc2VBcnJheShhcmdzKS5wcm9taXNlKCk7XG4gICAgcmV0dXJuIGZuICE9PSB1bmRlZmluZWQgPyByZXQuc3ByZWFkKGZuKSA6IHJldDtcbn07XG5cbn07XG5cbn0se1wiLi91dGlsXCI6MzZ9XSwxODpbZnVuY3Rpb24oX2RlcmVxXyxtb2R1bGUsZXhwb3J0cyl7XG5cInVzZSBzdHJpY3RcIjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24oUHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIC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ZCA9IG1heWJlUHJvbWlzZS5fYml0RmllbGQ7XG4gICAgICAgICAgICA7XG4gICAgICAgICAgICBpZiAoKChiaXRGaWVsZCAmIDUwMzk3MTg0KSA9PT0gMCkpIHtcbiAgICAgICAgICAgICAgICBpZiAobGltaXQgPj0gMSkgdGhpcy5faW5GbGlnaHQrKztcbiAgICAgICAgICAgICAgICB2YWx1ZXNbaW5kZXhdID0gbWF5YmVQcm9taXNlO1xuICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5fcHJveHkodGhpcywgKGluZGV4ICsgMSkgKiAtMSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMzM1NTQ0MzIpICE9PSAwKSkge1xuICAgICAgICAgICAgICAgIHJldCA9IG1heWJlUHJvbWlzZS5fdmFsdWUoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKChiaXRGaWVsZCAmIDE2Nzc3MjE2KSAhPT0gMCkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9yZWplY3QobWF5YmVQcm9taXNlLl9yZWFzb24oKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX2NhbmNlbCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhbHVlc1tpbmRleF0gPSByZXQ7XG4gICAgfVxuICAgIHZhciB0b3RhbFJlc29sdmVkID0gKyt0aGlzLl90b3RhbFJlc29sdmVkO1xuICAgIGlmICh0b3RhbFJlc29sdmVkID49IGxlbmd0aCkge1xuICAgICAgICBpZiAocHJlc2VydmVkVmFsdWVzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aGlzLl9maWx0ZXIodmFsdWVzLCBwcmVzZXJ2ZWRWYWx1ZXMpO1xuICAgICA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iAgICByZXR1cm4gdGhpcy5fcHJlc2VydmVkVmFsdWVzO1xufTtcblxuZnVuY3Rpb24gbWFwKHByb21pc2VzLCBmbiwgb3B0aW9ucywgX2ZpbHRlcikge1xuICAgIGlmICh0eXBlb2YgZm4gIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gYXBpUmVqZWN0aW9uKFwiZXhwZWN0aW5nIGEgZnVuY3Rpb24gYnV0IGdvdCBcIiArIHV0aWwuY2xhc3NTdHJpbmcoZm4pKTtcbiAgICB9XG5cbiAgICB2YXIgbGltaXQgPSAwO1xuICAgIGlmIChvcHRpb25zICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zID09PSBcIm9iamVjdFwiICYmIG9wdGlvbnMgIT09IG51bGwpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5jb25jdXJyZW5jeSAhPT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChcbiAgICAgICAgICAgICAgICAgICAgbmV3IFR5cGVFcnJvcihcIidjb25jdXJyZW5jeScgbXVzdCBiZSBhIG51bWJlciBidXQgaXQgaXMgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jbGFzc1N0cmluZyhvcHRpb25zLmNvbmN1cnJlbmN5KSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGltaXQgPSBvcHRpb25zLmNvbmN1cnJlbmN5O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcHRpb25zIGFyZ3VtZW50IG11c3QgYmUgYW4gb2JqZWN0IGJ1dCBpdCBpcyBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHV0aWwuY2xhc3NTdHJpb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KTtcbiAgICAgICAgbmV3UmVhc29uLmNhdXNlID0gcmVhc29uO1xuICAgICAgICByZWFzb24gPSBuZXdSZWFzb247XG4gICAgfVxuICAgIHZhciByZXQgPSB0cnlDYXRjaChub2RlYmFjaykuY2FsbChwcm9taXNlLl9ib3VuZFZhbHVlKCksIHJlYXNvbik7XG4gICAgaWYgKHJldCA9PT0gZXJyb3JPYmopIHtcbiAgICAgICAgYXN5bmMudGhyb3dMYXRlcihyZXQuZSk7XG4gICAgfVxufVxuXG5Qcm9taXNlLnByb3RvdHlwZS5hc0NhbGxiYWNrID0gUHJvbWlzZS5wcm90b3R5cGUubm9kZWlmeSA9IGZ1bmN0aW9uIChub2RlYmFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMpIHtcbiAgICBpZiAodHlwZW9mIG5vZGViYWNrID09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICB2YXIgYWRhcHRlciA9IHN1Y2Nlc3NBZGFwdGVyO1xuICAgICAgICBpZiAob3B0aW9ucyAhPT0gdW5kZWZpbmVkICYmIE9iamVjdChvcHRpb25zKS5zcHJlYWQpIHtcbiAgICAgICAgICAgIGFkYXB0ZXIgPSBzcHJlYWRBZGFwdGVyO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuX3RoZW4oXG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgZXJyb3JBZGFwdGVyLFxuICAgICAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgIG5vZGViYWNrXG4gICAgICAgICk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcbn07XG5cbn0se1wiLi91dGlsXCI6MzZ9XSwyMjpbZnVuY3Rpb24oX2RlcmVxXyxtb2R1bGUsZXhwb3J0cyl7XG5cInVzZSBzdHJpY3RcIjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICB2YXIgcCA9IG5ldyBQcm9taXNlKElOVEVSTkFMKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgcC5fZnVsZmlsbG1lbnRIYW5kbGVyMCA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgIHAuX3JlamVjdGlvbkhhbmRsZXIwID0gdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICBwLl9wcm9taXNlMCA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgcC5fcmVjZWl2ZXIwID0gdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIC8vIENvbXBsZXRlIHNsYWNrIHRyYWNraW5nLCBvcHQgb3V0IG9mIGZpZWxkLXR5cGUgdHJhY2tpbmcgYW5kICAgICAgICAgICBcbiAgICAvLyBzdGFiaWxpemUgbWFwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZmlsbFR5cGVzKHthOiAxfSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcyh7YjogMn0pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBmaWxsVHlwZXMoe2M6IDN9KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZmlsbFR5cGVzKDEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcyhmdW5jdGlvbigpe30pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBmaWxsVHlwZXModW5kZWZpbmVkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZmlsbFR5cGVzKGZhbHNlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcyhuZXcgUHJvbWlzZShJTlRFUk5BTCkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBkZWJ1Zy5zZXRCb3VuZHMoQXN5bmMuZmlyc3RMaW5lRXJyb3IsIHV0aWwubGFzdExpbmVFcnJvcik7ICAgICAgICAgICAgICAgXG4gICAgcmV0dXJuIFByb21pc2U7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXG59O1xuXG59LHtcIi4vYW55LmpzXCI6MSxcIi4vYXN5bmNcIjoyLFwiLi9iaW5kXCI6MyxcIi4vY2FsbF9nZXQuanNcIjo1LFwiLi9jYW5jZWxcIjo2LFwiLi9jYXRjaF9maWx0ZXJcIjo3LFwiLi9jb250ZXh0XCI6OCxcIi4vZGVidWdnYWJpbGl0eVwiOjksXCIuL2RpcmVjdF9yZXNvbHZlXCI6MTAsXCIuL2VhY2guanNcIjoxMSxcIi4vZXJyb3JzXCI6MTIsXCIuL2VzNVwiOjEzLFwiLi9maWx0ZXIuanNcIjoxNCxcIi4vZmluYWxseVwiOjE1LFwiLi9nZW5lcmF0b3JzLmpzXCI6MTYsXCIuL2pvaW5cIjoxNyxcIi4vbWFwLmpzXCI6MTgsXCIuL21ldGhvZFwiOjE5LFwiLi9ub2R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7YXJnc319LCBub2RlYmFjayk7IGJyZWFrO1xcblwiXG4gICAgICAgICAgICAgICAgOiBcInJldCA9IGNhbGxiYWNrLmNhbGwocmVjZWl2ZXIsIHt7YXJnc319LCBub2RlYmFjayk7IGJyZWFrO1xcblwiO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXQucmVwbGFjZShcInt7YXJnc319XCIsIGFyZ3MpLnJlcGxhY2UoXCIsIFwiLCBjb21tYSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVBcmd1bWVudFN3aXRjaENhc2UoKSB7XG4gICAgICAgIHZhciByZXQgPSBcIlwiO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFyZ3VtZW50T3JkZXIubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIHJldCArPSBcImNhc2UgXCIgKyBhcmd1bWVudE9yZGVyW2ldICtcIjpcIiArXG4gICAgICAgICAgICAgICAgZ2VuZXJhdGVDYWxsRm9yQXJndW1lbnRDb3VudChhcmd1bWVudE9yZGVyW2ldKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldCArPSBcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkobGVuICsgMSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgdmFyIGkgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47ICsraSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgICAgYXJnc1tpXSA9IGFyZ3VtZW50c1tpXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgYXJnc1tpXSA9IG5vZGViYWNrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgW0NvZGVGb3JDYWxsXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICBcIi5yZXBsYWNlKFwiW0NvZGVGb3JDYWxsXVwiLCAoc2hvdWxkUHJveHlUaGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gXCJyZXQgPSBjYWxsYmFjay5hcHBseSh0aGlzLCBhcmdzKTtcXG5cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFwicmV0ID0gY2FsbGJhY2suYXBwbHkocmVjZWl2ZXIsIGFyZ3MpO1xcblwiKSk7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgfVxuXG4gICAgdmFyIGdldEZ1bmN0aW9uQ29kZSA9IHR5cGVvZiBjYWxsYmFjayA9PT0gXCJzdHJpbmdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChcInRoaXMgIT0gbnVsbCA/IHRoaXNbJ1wiK2NhbGxiYWNrK1wiJ10gOiBmblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFwiZm5cIjtcbiAgICB2YXIgYm9keSA9IFwiJ3VzZSBzdHJpY3QnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIHZhciByZXQgPSBmdW5jdGlvbiAoUGFyYW1ldGVycykgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAndXNlIHN0cmljdCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB2YXIgbGVuID0gYXJndW1lbnRzLmxlbmd0aDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB2YXIgcHJvbWlzZSA9IG5ldyBQcm9taXNlKElOVEVSTkFMKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBwcm9taXNlLl9jYXB0dXJlU3RhY2tUcmFjZSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB2YXIgbm9kZWJhY2sgPSBub2RlYmFja0ZvclByb21pc2UocHJvbWlzZSwgXCIgKyBtdWx0aUFyZ3MgKyBcIik7ICAgXFxuXFxcbiAgICAgICAgICAgIHZhciByZXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHZhciBjYWxsYmFjayA9IHRyeUNhdGNoKFtHZXRGdW5jdGlvbkNvZGVdKTsgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHN3aXRjaChsZW4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBbQ29kZUZvclN3aXRjaENhc2VdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGlmIChyZXQgPT09IGVycm9yT2JqKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgICBwcm9taXNlLl9yZWplY3RDYWxsYmFjayhtYXliZVdyYXBBc0Vycm9yKHJldC5lKSwgdHJ1ZSwgdHJ1ZSk7XFxuXFxcbiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGlmICghcHJvbWlzZS5faXNGYXRlU2VhbGVkKCkpIHByb21pc2UuX3NldEFzeW5jR3VhcmFudGVlZCgpOyAgICAgXFxuXFxcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgfTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgbm90RW51bWVyYWJsZVByb3AocmV0LCAnX19pc1Byb21pc2lmaWVkX18nLCB0cnVlKTsgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgcmV0dXJuIHJldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICBcIi5yZXBsYWNlKFwiW0NvZGVGb3JTd2l0Y2hDYXNlXVwiLCBnZW5lcmF0ZUFyZ3VtZW50U3dpdGNoQ2FzZSgpKVxuICAgICAgICAucmVwbGFjZShcIltHZXRGdW5jdGlvbkNvZGVdXCIsIGdldEZ1bmN0aW9uQ29kZSk7XG4gICAgYm9keSA9IGJvZHkucmVwbGFjZShcIlBhcmFtZXRlcnNcIiwgcGFyYW1ldGVyRGVjbGFyYXRpb24obmV3UGFyYW1ldGVyQ291bnQpKTtcbiAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKFwiUHJvbWlzZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJmblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJyZWNlaXZlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ3aXRoQXBwZW5kZWRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwibWF5YmVXcmFwQXNFcnJvclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJub2RlYmFja0ZvclByb21pc2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidHJ5Q2F0Y2hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZXJyb3JPYmpcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwibm90RW51bWVyYWJsZVByb3BcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiSU5URVJOQUxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHkpKFxuICAgICAgICAgICAgICAgICAgICBQcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICBmbixcbiAgICAgICAgICAgICAgICAgICAgcmVjZWl2ZXIsXG4gICAgICAgICAgICAgICAgICAgIHdpdGhBcHBlbmRlZCxcbiAgICAgICAgICAgICAgICAgICAgbWF5YmVXcmFwQXNFcnJvcixcbiAgICAgICAgICAgICAgICAgICAgbm9kZWJhY2tGb3JQcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICB1dGlsLnRyeUNhdGNoLFxuICAgICAgICAgICAgICAgICAgICB1dGlsLmVycm9yT2JqLFxuICAgICAgICAgICAgICAgICAgICB1dGlsLm5vdEVudW1lcmFibGVQcm9wLFxuICAgICAgICAgICAgICAgICAgICBJTlRFUk5BTCk7XG59O1xufVxuXG5mdW5jdGlvbiBtYWtlTm9kZVByb21pc2lmaWVkQ2xvc3VyZShjYWxsYmFjaywgcmVjZ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aWVyKGZuLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWFrZU5vZGVQcm9taXNpZmllZChrZXksIFRISVMsIGtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbiwgc3VmZml4LCBtdWx0aUFyZ3MpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB1dGlsLm5vdEVudW1lcmFibGVQcm9wKHByb21pc2lmaWVkLCBcIl9faXNQcm9taXNpZmllZF9fXCIsIHRydWUpO1xuICAgICAgICAgICAgb2JqW3Byb21pc2lmaWVkS2V5XSA9IHByb21pc2lmaWVkO1xuICAgICAgICB9XG4gICAgfVxuICAgIHV0aWwudG9GYXN0UHJvcGVydGllcyhvYmopO1xuICAgIHJldHVybiBvYmo7XG59XG5cbmZ1bmN0aW9uIHByb21pc2lmeShjYWxsYmFjaywgcmVjZWl2ZXIsIG11bHRpQXJncykge1xuICAgIHJldHVybiBtYWtlTm9kZVByb21pc2lmaWVkKGNhbGxiYWNrLCByZWNlaXZlciwgdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaywgbnVsbCwgbXVsdGlBcmdzKTtcbn1cblxuUHJvbWlzZS5wcm9taXNpZnkgPSBmdW5jdGlvbiAoZm4sIG9wdGlvbnMpIHtcbiAgICBpZiAodHlwZW9mIGZuICE9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcImV4cGVjdGluZyBhIGZ1bmN0aW9uIGJ1dCBnb3QgXCIgKyB1dGlsLmNsYXNzU3RyaW5nKGZuKSk7XG4gICAgfVxuICAgIGlmIChpc1Byb21pc2lmaWVkKGZuKSkge1xuICAgICAgICByZXR1cm4gZm47XG4gICAgfVxuICAgIG9wdGlvbnMgPSBPYmplY3Qob3B0aW9ucyk7XG4gICAgdmFyIHJlY2VpdmVyID0gb3B0aW9ucy5jb250ZXh0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yIGtleSA9IGVudHJpZXNbbGVuZ3RoICsgaV07XG4gICAgICAgIHZhciB2YWx1ZSA9IGVudHJpZXNbaV07XG4gICAgICAgIHJldC5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgfVxuICAgIHJldHVybiByZXQ7XG59O1xuXG5mdW5jdGlvbiBQcm9wZXJ0aWVzUHJvbWlzZUFycmF5KG9iaikge1xuICAgIHZhciBpc01hcCA9IGZhbHNlO1xuICAgIHZhciBlbnRyaWVzO1xuICAgIGlmIChFczZNYXAgIT09IHVuZGVmaW5lZCAmJiBvYmogaW5zdGFuY2VvZiBFczZNYXApIHtcbiAgICAgICAgZW50cmllcyA9IG1hcFRvRW50cmllcyhvYmopO1xuICAgICAgICBpc01hcCA9IHRydWU7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGtleXMgPSBlczUua2V5cyhvYmopO1xuICAgICAgICB2YXIgbGVuID0ga2V5cy5sZW5ndGg7XG4gICAgICAgIGVudHJpZXMgPSBuZXcgQXJyYXkobGVuICogMik7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyArK2kpIHtcbiAgICAgICAgICAgIHZhciBrZXkgPSBrZXlzW2ldO1xuICAgICAgICAgICAgZW50cmllc1tpXSA9IG9ialtrZXldO1xuICAgICAgICAgICAgZW50cmllc1tpICsgbGVuXSA9IGtleTtcbiAgICAgICAgfVxuICAgIH1cbiAgICB0aGlzLmNvbnN0cnVjdG9yJChlbnRyaWVzKTtcbiAgICB0aGlzLl9pc01hcCA9IGlzTWFwO1xuICAgIHRoaXMuX2luaXQkKHVuZGVmaW5lZCwgaXNNYXAgPyAtNiA6IC0zKTtcbn1cbnV0aWwuaW5oZXJpdHMoUHJvcGVydGllc1Byb21pc2VBcnJheSwgUHJvbWlzZUFycmF5KTtcblxuUHJvcGVydGllc1Byb21pc2VBcnJheS5wcm90b3R5cGUuX2luaXQgPSBmdW5jdGlvbiAoKSB7fTtcblxuUHJvcGVydGllc1Byb21pc2V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lcnRUb1Byb21pc2Uob2JqLCBjb250ZXh0KSB7XG4gICAgaWYgKGlzT2JqZWN0KG9iaikpIHtcbiAgICAgICAgaWYgKG9iaiBpbnN0YW5jZW9mIFByb21pc2UpIHJldHVybiBvYmo7XG4gICAgICAgIHZhciB0aGVuID0gZ2V0VGhlbihvYmopO1xuICAgICAgICBpZiAodGhlbiA9PT0gZXJyb3JPYmopIHtcbiAgICAgICAgICAgIGlmIChjb250ZXh0KSBjb250ZXh0Ll9wdXNoQ29udGV4dCgpO1xuICAgICAgICAgICAgdmFyIHJldCA9IFByb21pc2UucmVqZWN0KHRoZW4uZSk7XG4gICAgICAgICAgICBpZiAoY29udGV4dCkgY29udGV4dC5fcG9wQ29udGV4dCgpO1xuICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgdGhlbiA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICBpZiAoaXNBbnlCbHVlYmlyZFByb21pc2Uob2JqKSkge1xuICAgICAgICAgICAgICAgIHZhciByZXQgPSBuZXcgUHJvbWlzZShJTlRFUk5BTCk7XG4gICAgICAgICAgICAgICAgb2JqLl90aGVuKFxuICAgICAgICAgICAgICAgICAgICByZXQuX2Z1bGZpbGwsXG4gICAgICAgICAgICAgICAgICAgIHJldC5fcmVqZWN0LFxuICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIHJldCxcbiAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkb1RoZW5hYmxlKG9iaiwgdGhlbiwgY29udGV4dCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG9iajtcbn1cblxuZnVuY3Rpb24gZG9HZXRUaGVuKG9iaikge1xuICAgIHJldHVybiBvYmoudGhlb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cbiAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlICYmXG4gICAgICAgICAgICAgICAgbWF5YmVQcm9taXNlLl9pc0Rpc3Bvc2FibGUoKSkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UoXG4gICAgICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UuX2dldERpc3Bvc2VyKCkudHJ5RGlzcG9zZShpbnNwZWN0aW9uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlcy5wcm9taXNlKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aHJvd2VyKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWF5YmVQcm9taXNlIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF5YmVQcm9taXNlLl90aGVuKGl0ZXJhdG9yLCB0aHJvd2VyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsIG51bGwsIG51bGwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGl0ZXJhdG9yKCk7XG4gICAgICAgIH1cbiAgICAgICAgaXRlcmF0b3IoKTtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBEaXNwb3NlcihkYXRhLCBwcm9taXNlLCBjb250ZXh0KSB7XG4gICAgICAgIHRoaXMuX2RhdGEgPSBkYXRhO1xuICAgICAgICB0aGlzLl9wcm9taXNlID0gcHJvbWlzZTtcbiAgICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7XG4gICAgfVxuXG4gICAgRGlzcG9zZXIucHJvd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bmd0aC0xXSA9IG51bGw7XG4gICAgfVxuXG4gICAgUmVzb3VyY2VMaXN0LnByb3RvdHlwZS5fcmVzdWx0Q2FuY2VsbGVkID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBsZW4gPSB0aGlzLmxlbmd0aDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47ICsraSkge1xuICAgICAgICAgICAgdmFyIGl0ZW0gPSB0aGlzW2ldO1xuICAgICAgICAgICAgaWYgKGl0ZW0gaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgaXRlbS5jYW5jZWwoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBQcm9taXNlLnVzaW5nID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbGVuID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA8IDIpIHJldHVybiBhcGlSZWplY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBcInlvdSBtdXN0IHBhc3MgYXQgbGVhc3QgMiBhcmd1bWVudHMgdG8gUHJvbWlzZS51c2luZ1wiKTtcbiAgICAgICAgdmFyIGZuID0gYXJndW1lbnRzW2xlbiAtIDFdO1xuICAgICAgICBpZiAodHlwZW9mIGZuICE9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgIHJldHVybiBhcGlSZWplY3Rpb24oXCJleHBlY3RpbmcgYSBmdW5jdGlvbiBidXQgZ290IFwiICsgdXRpbC5jbGFzc1N0cmluZyhmbikpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBpbnB1dDtcbiAgICAgICAgdmFyIHNwcmVhZEFyZ3MgPSB0cnVlO1xuICAgICAgICBpZiAobGVuID09PSAyICYmIEFycmF5LmlzQXJyYXkoYXJndW1lbnRzWzBdKSkge1xuICAgICAgICAgICAgaW5wdXQgPSBhcmd1bWVudHNbMF07XG4gICAgICAgICAgICBsZW4gPSBpbnB1dC5sZW5ndGg7XG4gICAgICAgICAgICBzcHJlYWRBcmdzID0gZmFsc2U7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpbnB1dCA9IGFyZ3VtZW50cztcbiAgICAgICAgICAgIGxlbi0tO1xuICAgICAgICB9XG4gICAgICAgIHZhciByZXNvdXJjZXMgPSBuZXcgUmVzb3VyY2VMaXN0KGxlbik7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyArK2kpIHtcbiAgICAgICAgICAgIHZhciByZXNvdXJjZSA9IGlucHV0W2ldO1xuICAgICAgICAgICAgaWYgKERpc3Bvc2VyLmlzRGlzcG9zZXIocmVzb3VyY2UpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRpc3Bvc2VyID0gcmVzb3VyY2U7XG4gICAgICAgICAgICAgICAgcmVzb3VyY2UgPSByZXNvdXJjZS5wcm9taXNlKCk7XG4gICAgICAgICAgICAgICAgcmVzb3VyY2UuX3NldERpc3Bvc2FibGUoZGlzcG9zZXIpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF5YmVQcm9taXNlID0gdHJ5Q29udmVydFRvUHJvbWlzZShyZXNvdXJjZSk7XG4gICAgICAgICAgICAgICAgaWYgKG1heWJlUHJvbWlzZSBpbnN0YW5jZW9mIFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2UgPVxuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVQcm9taXNlLl90aGVuKG1heWJlVW53cmFwRGlzcG9zZXIsIG51bGwsIG51bGwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXM6IHJlc291cmNlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaVxuICAgICAgICAgICAgICAgICAgICB9LCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlc291cmNlc1tpXSA9IHJlc291cmNlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlZmxlY3RlZFJlc291cmNlcyA9IG5ldyBBcnJheShyZXNvdXJjZXMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCByZWZsZWN0ZWRSZXNvdXJjZXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIHJlZmxlY3RlZFJlc291cmNlc1tpXSA9IFByb21pc2UucmVzb2x2ZShyZXNvdXJjZXNbaV0pLnJlZmxlY3QoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByZXN1bHRQcm9taXNlID0gUHJvbWlzZS5hbGwocmVmbGVjdGVkUmVzb3VyY2VzKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oaW5zcGVjdGlvbnMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGluc3BlY3Rpb25zLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnNwZWN0aW9uID0gaW5zcGVjdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnNwZWN0aW9uLmlzUmVqZWN0ZWQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JPYmouZSA9IGluc3BlY3Rpb24uZXJyb3IoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvck9iajtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghaW5zcGVjdGlvbi5pc0Z1bGZpbGxlZCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRQcm9taXNlLmNhbmNlbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGluc3BlY3Rpb25zW2ldID0gaW5zcGVjdGlvbi52YWx1ZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwcm9taXNlLl9wdXNoQ29udGV4dCgpO1xuXG4gICAgICAgICAgICAgICAgZm4gPSB0cnlDYXRjaChmbik7XG4gICAgICAgICAgICAgICAgdmFyIHJldCA9IHNwcmVhZEFyZ3NcbiAgICAgICAgICAgICAgICAgICAgPyBmbi5hcHBseSh1bmRlZmluZWQsIGluc3BlY3Rpb25zKSA6IGZuKGluc3BlY3Rpb25zKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJvbWlzZUNyZWF0ZWQgPSBwcm9taXNlLl9wb3BDb250ZXh0KCk7XG4gICAgICAgICAgICAgICAgZGVidWcuY2hlY2tGb3Jnb3R0ZW5SZXR1cm5zKFxuICAgICAgICAgICAgICAgICAgICByZXQsIHByb21pc2VDcmVhdGVkLCBcIlByb21pc2UudXNpbmdcIiwgcHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBwcm9taXNlID0gcmVzdWx0UHJvbWlzZS5sYXN0bHkoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICB2YXIgaW5zcGVjdGlvbiA9IG5ldyBQcm9taXNlLlByb21pc2VJbnNwZWN0aW9uKHJlc3VsdFByb21pc2UpO1xuICAgICAgICAgICAgcmV0dXJuIGRpc3Bvc2UocmVzb3VyY2VzLCBpbnNwZWN0aW9uKTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJlc291cmNlcy5wcm9taXNlID0gcHJvbWlzZTtcbiAgICAgICAgcHJvbWlzZS5fc2V0T25DYW5jZWwocmVzb3VyY2VzKTtcbiAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgfTtcblxuICAgIFByb21pc2UucHJvdG90eXBlLl9zZXREaXNwb3NhYmxlID0gZnVuY3Rpb24gKGRpc3Bvc2VyKSB7XG4gICAgICAgIHRoaXMuX2JpdEZpZWxkID0gdGhpcy5fYml0RmllbGQgfCAxMzE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VzY3JpcHRvcik7XG4gICAgcmV0dXJuIG9iajtcbn1cblxuZnVuY3Rpb24gdGhyb3dlcihyKSB7XG4gICAgdGhyb3cgcjtcbn1cblxudmFyIGluaGVyaXRlZERhdGFLZXlzID0gKGZ1bmN0aW9uKCkge1xuICAgIHZhciBleGNsdWRlZFByb3RvdHlwZXMgPSBbXG4gICAgICAgIEFycmF5LnByb3RvdHlwZSxcbiAgICAgICAgT2JqZWN0LnByb3RvdHlwZSxcbiAgICAgICAgRnVuY3Rpb24ucHJvdG90eXBlXG4gICAgXTtcblxuICAgIHZhciBpc0V4Y2x1ZGVkUHJvdG8gPSBmdW5jdGlvbih2YWwpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBleGNsdWRlZFByb3RvdHlwZXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmIChleGNsdWRlZFByb3RvdHlwZXNbaV0gPT09IHZhbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuXG4gICAgaWYgKGVzNS5pc0VTNSkge1xuICAgICAgICB2YXIgZ2V0S2V5cyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzO1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24ob2JqKSB7XG4gICAgICAgICAgICB2YXIgcmV0ID0gW107XG4gICAgICAgICAgICB2YXIgdmlzaXRlZEtleXMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgICAgICAgd2hpbGUgKG9iaiAhPSBudWxsICYmICFpc0V4Y2x1ZGVkUHJvdG8ob2JqKSkge1xuICAgICAgICAgICAgICAgIHZhciBrZXlzO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGtleXMgPSBnZXRLZXlzKG9iaik7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IGtleXNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh2aXNpdGVkS2V5c1trZXldKSBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgdmlzaXRlZEtleXNba2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIGtleSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkZXNjICE9IG51bGwgJiYgZGVzYy5nZXQgPT0gbnVsbCAmJiBkZXNjLnNldCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXQucHVzaChrZXkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG9iaiA9IGVzNS5nZXRQcm90b3R5cGVPZihvYmopO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgaGFzUHJvcCA9IHt9Lmhhc093blByb3BlcnR5O1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24ob2JqKSB7XG4gICAgICAgICAgICBpZiAoaXNFeGNsdWRlZFByb3RvKG9iaikpIHJldHVybiBbXTtcbiAgICAgICAgICAgIHZhciByZXQgPSBbXTtcblxuICAgICAgICAgICAgLypqc2hpbnQgZm9yaW46ZmFsc2UgKi9cbiAgICAgICAgICAgIGVudW1lcmF0aW9uOiBmb3IgKHZhciBrZXkgaW4gb2JqKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhhc1Byb3AuY2FsbChvYmosIGtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4Y2x1ZGVkUHJvdG90eXBlcy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc1Byb3AuY2FsbChleGNsdWRlZFByb3RvdHlwZXNbaV0sIGtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBlbnVtZXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXQucHVzaChrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH07XG4gICAgfVxuXG59KSgpO1xuXG52YXIgdGhpc0Fzc2lnbm1lbnRQYXR0ZXJuID0gL3RoaXNcXHMqXFwuXFxzKlxcUytcXHMqPS87XG5mdW5jdGlvbiBpc0NsYXNzKGZuKSB7XG4gICAgdHJ5IHtcbiAgICAgICAgaWYgKHR5cGVvZiBmbiA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICB2YXIga2V5cyA9IGVzNS5uYW1lcyhmbi5wcm90b3R5cGUpO1xuXG4gICAgICAgICAgICB2YXIgaGFzTWV0aG9kcyA9IGVzNS5pc0VTNSAmJiBrZXlzLmxlbmd0aCA+IDE7XG4gICAgICAgICAgICB2YXIgaGFzTWV0aG9kc090aGVyVGhhbkNvbnN0cnVjdG9yID0ga2V5cy5sZW5ndGggPiAwICYmXG4gICAgICAgICAgICAgICAgIShrZXlzLmxlbmd0aCA9PT0gMSAmJiBrZXlzWzBdID09PSBcImNvbnN0cnVjdG9yXCIpO1xuICAgICAgICAgICAgdmFyIGhhc1RoaXNBc3NpZ25tZW50QW5kU3RhdGljTWV0aG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b2Ygb3B0aW9uc1sndXAnXSAhPT0gJ3VuZGVmaW5lZCcgPyBvcHRpb25zWyd1cCddIDogdHJ1ZTtcbiAgICBvcHRpb25zWydtaWQnXSA9XG4gICAgICB0eXBlb2Ygb3B0aW9uc1snbWlkJ10gIT09ICd1bmRlZmluZWQnID8gb3B0aW9uc1snbWlkJ10gOiB0cnVlO1xuICAgIG9wdGlvbnNbJ2Rvd24nXSA9XG4gICAgICB0eXBlb2Ygb3B0aW9uc1snZG93biddICE9PSAndW5kZWZpbmVkJyA/IG9wdGlvbnNbJ2Rvd24nXSA6IHRydWU7XG4gICAgb3B0aW9uc1snc2l6ZSddID1cbiAgICAgIHR5cGVvZiBvcHRpb25zWydzaXplJ10gIT09ICd1bmRlZmluZWQnID8gb3B0aW9uc1snc2l6ZSddIDogJ21heGknO1xuICAgIHRleHQgPSB0ZXh0LnNwbGl0KCcnKTtcbiAgICBmb3IgKGwgaW4gdGV4dCkge1xuICAgICAgaWYgKGlzQ2hhcihsKSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHJlc3VsdCA9IHJlc3VsdCArIHRleHRbbF07XG4gICAgICBjb3VudHMgPSB7J3VwJzogMCwgJ2Rvd24nOiAwLCAnbWlkJzogMH07XG4gICAgICBzd2l0Y2ggKG9wdGlvbnMuc2l6ZSkge1xuICAgICAgICBjYXNlICdtaW5pJzpcbiAgICAgICAgICBjb3VudHMudXAgPSByYW5kb21OdW1iZXIoOCk7XG4gICAgICAgICAgY291bnRzLm1pZCA9IHJhbmRvbU51bWJlcigyKTtcbiAgICAgICAgICBjb3VudHMuZG93biA9IHJhbmRvbU51bWJlcig4KTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnbWF4aSc6XG4gICAgICAgICAgY291bnRzLnVwID0gcmFuZG9tTnVtYmVyKDE2KSArIDM7XG4gICAgICAgICAgY291bnRzLm1pZCA9IHJhbmRvbU51bWJlcig0KSArIDE7XG4gICAgICAgICAgY291bnRzLmRvd24gPSByYW5kb21OdW1iZXIoNjQpICsgMztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICBjb3VudHMudXAgPSByYW5kb21OdW1iZXIoOCkgKyAxO1xuICAgICAgICAgIGNvdW50cy5taWQgPSByYW5kb21OdW1iZXIoNikgLyAyO1xuICAgICAgICAgIGNvdW50cy5kb3duID0gcmFuZG9tTnVtYmVyKDgpICsgMTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgdmFyIGFyciA9IFsndXAnLCAnbWlkJywgJ2Rvd24nXTtcbiAgICAgIGZvciAodmFyIGQgaW4gYXJyKSB7XG4gICAgICAgIHZhciBpbmRleCA9IGFycltkXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPD0gY291bnRzW2luZGV4XTsgaSsrKSB7XG4gICAgICAgICAgaWYgKG9wdGlvbnNbaW5kZXhdKSB7XG4gICAgICAgICAgICByZXN1bHQgPSByZXN1bHQgKyBzb3VsW2luZGV4XVtyYW5kb21OdW1iZXIoc291bFtpbmRleF0ubGVuZ3RoKV07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbiAgLy8gZG9uJ3Qgc3VtbW9uIGhpbVxuICByZXR1cm4gaGVDb21lcyh0ZXh0LCBvcHRpb25zKTtcbn07XG5cbiIsIm1vZHVsZVsnZXhwb3J0cyddID0gZnVuY3Rpb24oY29sb3JzKSB7XG4gIHJldHVybiBmdW5jdGlvbihsZXR0ZXIsIGksIGV4cGxvZGVkKSB7XG4gICAgaWYgKGxldHRlciA9PT0gJyAnKSByZXR1cm4gbGV0dGVyO1xuICAgIHN3aXRjaCAoaSUzKSB7XG4gICAgICBjYXNlIDA6IHJldHVybiBjb2xvcnMucmVkKGxldHRlcik7XG4gICAgICBjYXNlIDE6IHJldHVybiBjb2xvcnMud2hpdGUobGV0dGVyKTtcb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b3B0aW9uc1xuICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgKytpKSB7XG4gICAgYXJnID0gYXJndltpXTtcblxuICAgIC8vIGxpdGVyYWwgYXJncyBhZnRlciAtLVxuICAgIGlmIChsaXRlcmFsKSB7XG4gICAgICBhcmdzLnB1c2goYXJnKTtcbiAgICAgIGNvbnRpbnVlO1xuICAgIH1cblxuICAgIGlmIChhcmcgPT09ICctLScpIHtcbiAgICAgIGxpdGVyYWwgPSB0cnVlO1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgLy8gZmluZCBtYXRjaGluZyBPcHRpb25cbiAgICBvcHRpb24gPSB0aGlzLm9wdGlvbkZvcihhcmcpO1xuXG4gICAgLy8gb3B0aW9uIGlzIGRlZmluZWRcbiAgICBpZiAob3B0aW9uKSB7XG4gICAgICAvLyByZXF1aXJlcyBhcmdcbiAgICAgIGlmIChvcHRpb24ucmVxdWlyZWQpIHtcbiAgICAgICAgYXJnID0gYXJndlsrK2ldO1xuICAgICAgICBpZiAoYXJnID09IG51bGwpIHJldHVybiB0aGlzLm9wdGlvbk1pc3NpbmdBcmd1bWVudChvcHRpb24pO1xuICAgICAgICB0aGlzLmVtaXQoJ29wdGlvbjonICsgb3B0aW9uLm5hbWUoKSwgYXJnKTtcbiAgICAgIC8vIG9wdGlvbmFsIGFyZ1xuICAgICAgfSBlbHNlIGlmIChvcHRpb24ub3B0aW9uYWwpIHtcbiAgICAgICAgYXJnID0gYXJndltpICsgMV07XG4gICAgICAgIGlmIChhcmcgPT0gbnVsbCB8fCAoYXJnWzBdID09PSAnLScgJiYgYXJnICE9PSAnLScpKSB7XG4gICAgICAgICAgYXJnID0gbnVsbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICArK2k7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5lbWl0KCdvcHRpb246JyArIG9wdGlvbi5uYW1lKCksIGFyZyk7XG4gICAgICAvLyBmbGFnXG4gICAgICB9IGVsc2Uge1x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ludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgaWYgKG51bWJlciAhPSBudW1iZXIgfHwgbnVtYmVyID09PSBJbmZpbml0eSkge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICBtYW50aXNzYSA9IG51bWJlciAhPSBudW1iZXIgPyAxIDogMDtcbiAgICBleHBvbmVudCA9IGVNYXg7XG4gIH0gZWxzZSB7XG4gICAgZXhwb25lbnQgPSBmbG9vcihsb2cobnVtYmVyKSAvIExOMik7XG4gICAgaWYgKG51bWJlciAqIChjID0gcG93KDIsIC1leHBvbmVudCkpIDwgMSkge1xuICAgICAgZXhwb25lbnQtLTtcbiAgICAgIGMgKj0gMjtcbiAgICB9XG4gICAgaWYgKGV4cG9uZW50ICsgZUJpYXMgPj0gMSkge1xuICAgICAgbnVtYmVyICs9IHJ0IC8gYztcbiAgICB9IGVsc2Uge1xuICAgICAgbnVtYmVyICs9IHJ0ICogcG93KDIsIDEgLSBlQmlhcyk7XG4gICAgfVxuICAgIGlmIChudW1iZXIgKiBjID49IDIpIHtcbiAgICAgIGV4cG9uZW50Kys7XG4gICAgICBjIC89IDI7XG4gICAgfVxuICAgIGlmIChleHBvbmVudCArIGVCaWFzID49IGVNYXgpIHtcbiAgICAgIG1hbnRpc3NhID0gMDtcbiAgICAgIGV4cG9uZW50ID0gZU1heDtcbiAgICB9IGVsc2UgaWYgKGV4cG9uZW50ICsgZUJpYXMgPj0gMSkge1xuICAgICAgbWFudGlzc2EgPSAobnVtYmVyICogYyAtIDEpICogcG93KDIsIG1hbnRpc3NhTGVuZ3RoKTtcbiAgICAgIGV4cG9uZW50ID0gZXhwb25lbnQgKyBlQmlhcztcbiAgICB9IGVsc2Uge1xuICAgICAgbWFudGlzc2EgPSBudW1iZXIgKiBwb3coMiwgZUJpYXMgLSAxKSAqIHBvdygyLCBtYW50aXNzYUxlbmd0aCk7XG4gICAgICBleH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GUgKGogPj0gNykge1xuICAgICAgICAgIG11bHRpcGx5KDFlNywgMCk7XG4gICAgICAgICAgaiAtPSA3O1xuICAgICAgICB9XG4gICAgICAgIG11bHRpcGx5KHBvdygxMCwgaiwgMSksIDApO1xuICAgICAgICBqID0gZSAtIDE7XG4gICAgICAgIHdoaWxlIChqID49IDIzKSB7XG4gICAgICAgICAgZGl2aWRlKDEgPDwgMjMpO1xuICAgICAgICAgIGogLT0gMjM7XG4gICAgICAgIH1cbiAgICAgICAgZGl2aWRlKDEgPDwgaik7XG4gICAgICAgIG11bHRpcGx5KDEsIDEpO1xuICAgICAgICBkaXZpZGUoMik7XG4gICAgICAgIHJlc3VsdCA9IGRhdGFUb1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbXVsdGlwbHkoMCwgeik7XG4gICAgICAgIG11bHRpcGx5KDEgPDwgLWUsIDApO1xuICAgICAgICByZXN1bHQgPSBkYXRhVG9TdHJpbmcoKSArIHJlcGVhdC5jYWxsKCcwJywgZnJhY3REaWdpdHMpO1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAoZnJhY3REaWdpdHMgPiAwKSB7XG4gICAgICBrID0gcmVzdWx0Lmxlbmd0aDtcbiAgICAgIHJlc3VsdCA9IHNpZ24gKyAoayA8PSBmcmFjdERpZ2l0c1xuICAgICAgICA/ICcwLicgKyByZXBlYXQuY2FsbCgnMCcsIGZyYWN0RGlnaXRzIC0gaykgKyByZXN1bHRcbiAgICAgICAgOiByZXN1bHQuc2xpY2UoMCwgayAtIGZyYWN0RGlnaXRzKSArICcuJyArIHJlc3VsdC5zbGljZShrIC0gZnJhY3REaWdpdHMpKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmVzdWx0ID0gc2lnbiArIHJlc3VsdDtcbiAgICB9IHJldHVybiByZXN1bHQ7XG4gIH1cbn0pO1xuIiwiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0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BzdGF0ZS5zdGF0ZSA9PSBGVUxGSUxMRUQ7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICAvLyB2YXJpYWJsZSBsZW5ndGggLSBjYW4ndCB1c2UgZm9yRWFjaFxuICAgIHdoaWxlIChjaGFpbi5sZW5ndGggPiBpbmRleCkge1xuICAgICAgdmFyIHJlYWN0aW9uID0gY2hhaW5baW5kZXgrK107XG4gICAgICB2YXIgaGFuZGxlciA9IG9rID8gcmVhY3Rpb24ub2sgOiByZWFjdGlvbi5mYWlsO1xuICAgICAgdmFyIHJlc29sdmUgPSByZWFjdGlvbi5yZXNvbHZlO1xuICAgICAgdmFyIHJlamVjdCA9IHJlYWN0aW9uLnJlamVjdDtcbiAgICAgIHZhciBkb21haW4gPSByZWFjdGlvbi5kb21haW47XG4gICAgICB2YXIgcmVzdWx0LCB0aGVuLCBleGl0ZWQ7XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZS5yZWplY3Rpb24gPT09IFVOSEFORExFRCkgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSwgc3RhdGUpO1xuICAgICAgICAgICAgc3RhdGUucmVqZWN0aW9uID0gSEFORExFRDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTsgLy8gY2FuIHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bH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SAocnguaWdub3JlQ2FzZSA/ICdpJyA6ICcnKSArXG4gICAgICAgICAgICAgICAgICAocngubXVsdGlsaW5lID8gJ20nIDogJycpICtcbiAgICAgICAgICAgICAgICAgIChyeC51bmljb2RlID8gJ3UnIDogJycpICtcbiAgICAgICAgICAgICAgICAgIChTVVBQT1JUU19ZID8gJ3knIDogJ2cnKTtcblxuICAgICAgLy8gXig/ICsgcnggKyApIGlzIG5lZWRlZCwgaW4gY29tYmluYXRpb24gd2l0aCBzb21lIFMgc2xpY2luZywgdG9cbiAgICAgIC8vIHNpbXVsYXRlIHRoZSAneScgZmxhZy5cbiAgICAgIHZhciBzcGxpdHRlciA9IG5ldyBDKFNVUFBPUlRTX1kgPyByeCA6ICdeKD86JyArIHJ4LnNvdXJjZSArICcpJywgZmxhZ3MpO1xuICAgICAgdmFyIGxpbSA9IGxpbWl0ID09PSB1bmRlZmluZWQgPyBNQVhfVUlOVDMyIDogbGltaXQgPj4+IDA7XG4gICAgICBpZiAobGltID09PSAwKSByZXR1cm4gW107XG4gICAgICBpZiAoUy5sZW5ndGggPT09IDApIHJldHVybiBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgUykgPT09IG51bGwgPyBbU10gOiBbXTtcbiAgICAgIHZhciBwID0gMDtcbiAgICAgIHZhciBxID0gMDtcbiAgICAgIHZhciBBID0gW107XG4gICAgICB3aGlsZSAocSA8IFMubGVuZ3RoKSB7XG4gICAgICAgIHNwbGl0dGVyLmxhc3RJbmRleCA9IFNVUFBPUlRTX1kgPyBxIDogMDtcbiAgICAgICAgdmFyIHogPSBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgU1VQUE9SVFNfWSA/IFMgOiBTLnNsaWNlKHEpKTtcbiAgICAgICAgdmFyIGU7XG4gICAgICAgIGlmIChcbiAgICAgICAgICB6ID09PSBudWxsIHx8XG4gICAgICAgICAgKGUgPSBtaW4odG9MZW5ndGgoc3BsaXR0ZXIubGFzdEluZGV4ICsgKFNVUFBPUlRTX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llY2UgPSBudWxsO1xuICAgICAgICBpZiAobnVtYmVyc1NlZW4gPiAwKSB7XG4gICAgICAgICAgaWYgKGNoYXIoKSA9PSAnLicgJiYgbnVtYmVyc1NlZW4gPCA0KSBwb2ludGVyKys7XG4gICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFESUdJVC50ZXN0KGNoYXIoKSkpIHJldHVybjtcbiAgICAgICAgd2hpbGUgKERJR0lULnRlc3QoY2hhcigpKSkge1xuICAgICAgICAgIG51bWJlciA9IHBhcnNlSW50KGNoYXIoKSwgMTApO1xuICAgICAgICAgIGlmIChpcHY0UGllY2UgPT09IG51bGwpIGlwdjRQaWVjZSA9IG51bWJlcjtcbiAgICAgICAgICBlbHNlIGlmIChpcHY0UGllY2UgPT0gMCkgcmV0dXJuO1xuICAgICAgICAgIGVsc2UgaXB2NFBpZWNlID0gaXB2NFBpZWNlICogMTAgKyBudW1iZXI7XG4gICAgICAgICAgaWYgKGlwdjRQaWVjZSA+IDI1NSkgcmV0dXJuO1xuICAgICAgICAgIHBvaW50ZXIrKztcbiAgICAgICAgfVxuICAgICAgICBhZGRyZXNzW3BpZWNlSW5kZXhdID0gYWRkcmVzc1twaWVjZUluZGV4XSAqIDI1NiArIGlwdjRQaWVjZTtcbiAgICAgICAgbnVtYmVyc1NlZW4rKztcbiAgICAgICAgaWYgKG51bWJlcnNTZWVuID09IDIgfHwgbnVtYmVyc1NlZW4gPT0gNCkgcGllY2VJbmRleCsrO1xuICAgICAgfVxuICAgICAgaWYgKG51bWJlcnNTZWVuICE9IDQpIHJldHVybjtcbiAgICAgIGJyZWFrO1xuICAgIH0gZWxzZSBpZiAoY2hhcigpID09ICc6Jykge1xuICAgICAgcG9pbnRlcisrO1xuICAgICAgaWYgKCFjaGFyKCkpIHJldHVybjtcbiAgICB9IGVsc2UgaWYgKGNoYXIoKSkgcmV0dXJuO1xuICAgIGFkZHJlc3NbcGllY2VJbmRleCsrXSA9IHZhbH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8nKSB7XG4gICAgICAgICAgc3RhdGUgPSBTUEVDSUFMX0FVVEhPUklUWV9JR05PUkVfU0xBU0hFUztcbiAgICAgICAgICBwb2ludGVyKys7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc3RhdGUgPSBSRUxBVElWRTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSBicmVhaztcblxuICAgICAgY2FzZSBQQVRIX09SX0FVVEhPUklUWTpcbiAgICAgICAgaWYgKGNoYXIgPT0gJy8nKSB7XG4gICAgICAgICAgc3RhdGUgPSBBVVRIT1JJVFk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc3RhdGUgPSBQQVRIO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUkVMQVRJVkU6XG4gICAgICAgIHVybC5zY2hlbWUgPSBiYXNlLnNjaGVtZTtcbiAgICAgICAgaWYgKGNoYXIgPT0gRU9GKSB7XG4gICAgICAgICAgdXJsLnVzZXJuYW1lID0gYmFzZS51c2VybmFtZTtcbiAgICAgICAgICB1cmwucGFzc3dvcmQgPSBiYXNlLnBhc3N3b3JkO1xuICAgICAgICAgIHVybC5ob3N0ID0gYmFzZS5ob3N0O1xuICAgICAgICAgIHVybC5wb3J0ID0gYmFzZS5wb3J0O1xuICAgICAgICAgIHVybC5wYXRoID0gYmFzZS5wYXRoLnNsaWNlKCk7XG4gICAgICAgICAgdXJsLnF1ZXJ5ID0gYmFzZS5xdWVyeTtcbiAgICAgICAgfSBlbHNlIGlmIChjaGFyID09ICcvJyB8fCAoY2hhciA9PSAnXFxcXCcgJiYgaXNTcGVjaWFsKHVybCkpKSB7XG4gICAgICAgICAgc3RhdGUgPSBSRUxBVElWRV9TTEFTSDtcbiAgICAgICAgfSBlbHNlIGlmIChjaGFyID09ICc/Jykge1xuICAgICAgICAgIHVybC51c2VybmFtZSA9IGJhc2UudXNlcm5hbWU7XG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ge1xuICAgICAgICAgIGlmIChzZWVuQXQpIGJ1ZmZlciA9ICclNDAnICsgYnVmZmVyO1xuICAgICAgICAgIHNlZW5BdCA9IHRydWU7XG4gICAgICAgICAgYnVmZmVyQ29kZVBvaW50cyA9IGFycmF5RnJvbShidWZmZXIpO1xuICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYnVmZmVyQ29kZVBvaW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGNvZGVQb2ludCA9IGJ1ZmZlckNvZGVQb2ludHNbaV07XG4gICAgICAgICAgICBpZiAoY29kZVBvaW50ID09ICc6JyAmJiAhc2VlblBhc3N3b3JkVG9rZW4pIHtcbiAgICAgICAgICAgICAgc2VlblBhc3N3b3JkVG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBlbmNvZGVkQ29kZVBvaW50cyA9IHBlcmNlbnRFbmNvZGUoY29kZVBvaW50LCB1c2VyaW5mb1BlcmNlbnRFbmNvZGVTZXQpO1xuICAgICAgICAgICAgaWYgKHNlZW5QYXNzd29yZFRva2VuKSB1cmwucGFzc3dvcmQgKz0gZW5jb2RlZENvZGVQb2ludHM7XG4gICAgICAgICAgICBlbHNlIHVybC51c2VybmFtZSArPSBlbmNvZGVkQ29kZVBvaW50cztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnVmZmVyID0gJyc7XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgY2hhciA9PSBFT0YgfHwgY2hhciA9PSAnLycgfHwgY2hhciA9PSAnPycgfHwgY2hhciA9PSAnIycgfHxcbiAgICAgICAgICAoY2hhciA9PSAnXFxcXCcgJiYgaXNTcGVjaWFsKHVybCkpXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChzZWVuQXQgJiYgYnVmZmVyID09ICcnKSByZXR1cm4gSU5WQUxJRF9BVVRIT1JJVFk7XG4gICAgICAgICAgc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1ZGVzQ3JlZGVudGlhbHModXJsKSB8fCB1cmwucG9ydCAhPT0gbnVsbCkpIHJldHVybjtcbiAgICAgICAgICBmYWlsdXJlID0gcGFyc2VIb3N0KHVybCwgYnVmZmVyKTtcbiAgICAgICAgICBpZiAoZmFpbHVyZSkgcmV0dXJuIGZhaWx1cmU7XG4gICAgICAgICAgYnVmZmVyID0gJyc7XG4gICAgICAgICAgc3RhdGUgPSBQQVRIX1NUQVJUO1xuICAgICAgICAgIGlmIChzdGF0ZU92ZXJyaWRlKSByZXR1cm47XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoYXIgPT0gJ1snKSBzZWVuQnJhY2tldCA9IHRydWU7XG4gICAgICAgICAgZWxzZSBpZiAoY2hhciA9PSAnXScpIHNlZW5CcmFja2V0ID0gZmFsc2U7XG4gICAgICAgICAgYnVmZmVyICs9IGNoYXI7XG4gICAgICAgIH0gYnJlYWs7XG5cbiAgICAgIGNhc2UgUE9SVDpcbiAgICAgICAgaWYgKERJR0lULnRlc3QoY2hhcikpIHtcbiAgICAgICAgICBidWZmZXIgKz0gY2hhcjtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICBjaGFyID09IEVPRiB8fCBjaGFyID09ICcvJyB8fCBjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJyB8fFxuICAgICAgICAgIChjaGFyID09ICdcXFxcJyAmJiBpc1NwZWNpYWwodXJsKSkgfHxcbiAgICAgICAgICBzdGF0ZU92ZXJyaWRlXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChidWZmZXIgIT0gJycpIHtcbiAgICAgICAgICAgIHZhciBwb3J0ID0gcGFyc2VJbnQoYnVmZmVyLCAxMCk7XG4gICAgICAgICAgICBpZiAocG9ydCA+IDB4RkZGRikgcmV0dXJuIElOVkFMSURfUE9SVDtcbiAgICAgICAgICAgIHVybC5wb3J0ID0gKGlzU3BlY2lhbCh1cmwpICYmIHBvc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Lmhvc3Q7XG4gICAgICAgIH1cbiAgICAgICAgc3RhdGUgPSBQQVRIO1xuICAgICAgICBjb250aW51ZTtcblxuICAgICAgY2FzZSBGSUxFX0hPU1Q6XG4gICAgICAgIGlmIChjaGFyID09IEVPRiB8fCBjaGFyID09ICcvJyB8fCBjaGFyID09ICdcXFxcJyB8fCBjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJykge1xuICAgICAgICAgIGlmICghc3RhdGVPdmVycmlkZSAmJiBpc1dpbmRvd3NEcml2ZUxldHRlcihidWZmZXIpKSB7XG4gICAgICAgICAgICBzdGF0ZSA9IFBBVEg7XG4gICAgICAgICAgfSBlbHNlIGlmIChidWZmZXIgPT0gJycpIHtcbiAgICAgICAgICAgIHVybC5ob3N0ID0gJyc7XG4gICAgICAgICAgICBpZiAoc3RhdGVPdmVycmlkZSkgcmV0dXJuO1xuICAgICAgICAgICAgc3RhdGUgPSBQQVRIX1NUQVJUO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmYWlsdXJlID0gcGFyc2VIb3N0KHVybCwgYnVmZmVyKTtcbiAgICAgICAgICAgIGlmIChmYWlsdXJlKSByZXR1cm4gZmFpbHVyZTtcbiAgICAgICAgICAgIGlmICh1cmwuaG9zdCA9PSAnbG9jYWxob3N0JykgdXJsLmhvc3QgPSAnJztcbiAgICAgICAgICAgIGlmIChzdGF0ZU92ZXJyaWRlKSByZXR1cm47XG4gICAgICAgICAgICBidWZmZXIgPSAnJztcbiAgICAgICAgICAgIHN0YXRlID0gUEFUSF9TVEFSVDtcbiAgICAgICAgICB9IGNvbnRpbnVlO1xuICAgICAgICB9IGVsc2UgYnVmZmVyICs9IGNoYXI7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIFBBVEhfU1RBUlQ6XG4gICAgICAgIGlmIChpc1NwZWNpYWwodXJsKSkge1xuICAgICAgICAgIHN0YXRlID0gUEFUSDtcbiAgICAgICAgICBpZiAoY2hhciAhPSAnLycgJiYgY2hhciAhPSAnXFxcXCcpIGNvbnRpbnVlO1xuICAgICAgICB9IGVsc2UgaWYgKCFzdGF0ZU92ZXJyaWRlICYmIGNoYXIgPT0gJz8nKSB7XG4gICAgICAgICAgdXJsLnF1ZXJ5ID0gJyc7XG4gICAgICAgICAgc3RhdGUgPSBRVUVSWTtcbiAgICAgICAgfSBlbHNlIGlmICghc3RhdGVPdmVycmlkZSAmJiBjaGFyID09ICcjJykge1xuICAgICAgICAgIHVybC5mcmFnbWVudCA9ICcnO1xuICAgICAgICAgIHN0YXRlID0gRlJBR01FTlQ7XG4gICAgICAgIH0gZWxzZSBpZiAoY2hhciAhPSBFT0YpIHtcbiAgICAgICAgICBzdGF0ZSA9IFBBVEg7XG4gICAgICAgICAgaWYgKGNoYXIgIT0gJy8nKSBjb250aW51ZTtcbiAgICAgICAgfSBicmVhaztcblxuICAgICAgY2FzZSBQQVRIOlxuICAgICAgICBpZiAoXG4gICAgICAgICAgY2hhciA9PSBFT0YgfHwgY2hhciA9PSAnLycgfHxcbiAgICAgICAgICAoY2hhciA9PSAnXFxcXCcgJiYgaXNTcGVjaWFsKHVybCkpIHx8XG4gICAgICAgICAgKCFzdGF0ZU92ZXJyaWRlICYmIChjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJykpXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChpc0RvdWJsZURvdChidWZmZXIpKSB7XG4gICAgICAgICAgICBzaG9ydGVuVVJMc1BhdGgodXJsKTtcbiAgICAgICAgICAgIGlmIChjaGFyICE9ICcvJyAmJiAhKGNoYXIgPT0gJ1xcXFwnICYmIGlzU3BlY2lhbCh1cmwpKSkge1xuICAgICAgICAgICAgICB1cmwucGF0aC5wdXNoKCcnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGlzU2luZ2xlRG90KGJ1ZmZlcikpIHtcbiAgICAgICAgICAgIGlmIChjaGFyICE9ICcvJyAmJiAhKGNoYXIgPT0gJ1xcXFwnICYmIGlzU3BlY2lhbCh1cmwpKSkge1xuICAgICAgICAgICAgICB1cmwucGF0aC5wdXNoKCcnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHVybC5zY2hlbWUgPT0gJ2ZpbGUnICYmICF1cmwucGF0aC5sZW5ndGggJiYgaXNXaW5kb3dzRHJpdmVMZXR0ZXIoYnVmZmVyKSkge1xuICAgICAgICAgICAgICBpZiAodXJsLmhvc3QpIHVybC5ob3N0ID0gJyc7XG4gICAgICAgICAgICAgIGJ1ZmZlciA9IGJ1ZmZlci5jaGFyQXQoMCkgKyAnOic7IC8vIG5vcm1hbGl6ZSB3aW5kb3dzIGRyaXZlIGxldHRlclxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdXJsLnBhdGgucHVzaChidWZmZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBidWZmZXIgPSAnJztcbiAgICAgICAgICBpZiAodXJsLnNjaGVtZSA9PSAnZmlsZScgJiYgKGNoYXIgPT0gRU9GIHx8IGNoYXIgPT0gJz8nIHx8IGNoYXIgPT0gJyMnKSkge1xuICAgICAgICAgICAgd2hpbGUgKHVybC5wYXRoLmxlbmd0aCA+IDEgJiYgdXJsLnBhdGhbMF0gPT09ICcnKSB7XG4gICAgICAgICAgICAgIHVybC5wYXRoLnNoaWZ0KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChjaGFyID09ICc/Jykge1xuICAgICAgICAgICAgdXJsLnF1ZXJ5ID0gJyc7XG4gICAgICAgICAgICBzdGF0ZSA9IFFVRVJZO1xuICAgICAgICAgIH0gZWxzZSBpZiAoY2hhciA9PSAnIycpIHtcbiAgICAgICAgICAgIHVybC5mcmFnbWVudCA9ICcnO1xuICAgICAgICAgICAgc3RhdGUgPSBGUkFHTUVOVDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgYnVmZmVyICs9IHBlc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biAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgcmV0dXJuIGV4cHJlc3Npb24ucmVwbGFjZShBTFRFUk5BVElWRV9OT05fV0hJVEVTUEFDRV9URVhUX1JFR0VYUCgpLCBmdW5jdGlvbiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBlXzEsIF9hO1xuICAgICAgICAgICAgLy8gcmVwbGFjZSBcXC8gd2l0aCAvXG4gICAgICAgICAgICAvLyByZXBsYWNlIC8gd2l0aCB8XG4gICAgICAgICAgICB2YXIgcmVwbGFjZW1lbnQgPSBtYXRjaC5yZXBsYWNlKC9cXC8vZywgJ3wnKS5yZXBsYWNlKC9cXFxcXFx8L2csICcvJyk7XG4gICAgICAgICAgICBpZiAocmVwbGFjZW1lbnQuaW5kZXhPZignfCcpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIF9iID0gX192YWx1ZXMocmVwbGFjZW1lbnQuc3BsaXQoL1xcfC8pKSwgX2MgPSBfYi5uZXh0KCk7ICFfYy5kb25lOyBfYyA9IF9iLm5leHQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnQgPSBfYy52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLl9jaGVja05vUGFyYW1ldGVyVHlwZShwYXJ0LCBQQVJBTUVURVJfVFlQRVNfQ0FOTk9UX0JFX0FMVEVSTkFUSVZFKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaCAoZV8xXzEpIHsgZV8xID0geyBlcnJvcjogZV8xXzEgfTsgfVxuICAgICAgICAgICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF9jICYmICFfYy5kb25lICYmIChfYSA9IF9iLnJldHVybikpIF9hLmNhbG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kge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMV8xICYmICFiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJzXzFfMS5kb25lICYmIChfYiA9IGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMS5yZXR1cm4pKSBfYi5jYWxsKGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmluYWxseSB7IGlmIChlXzIpIHRocm93IGVfMi5lcnJvcjsgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwYXJhbWV0ZXJUeXBlcyA9IHBhcmFtZXRlclR5cGVzLnNvcnQoUGFyYW1ldGVyVHlwZV8xLmRlZmF1bHQuY29tcGFyZSk7XG4gICAgICAgICAgICAgICAgcGFyYW1ldGVyVHlwZUNvbWJpbmF0aW9ucy5wdXNoKHBhcmFtZXRlclR5cGVzKTtcbiAgICAgICAgICAgICAgICBleHByZXNzaW9uVGVtcGxhdGUgKz0gZXNjYXBlKHRleHQuc2xpY2UocG9zLCBiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJfMS5zdGFydCkpO1xuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25UZW1wbGF0ZSArPSAneyVzfSc7XG4gICAgICAgICAgICAgICAgcG9zID1cbiAgICAgICAgICAgICAgICAgICAgYmVzdFBhcmFtZXRlclR5cGVNYXRjaGVyXzEuc3RhcnQgKyBiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJfMS5ncm91cC5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJicmVha1wiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHBvcyA+PSB0ZXh0L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1bHQoKV07XG4gICAgICAgIHZhciBncm91cFN0YXJ0U3RhY2sgPSBbXTtcbiAgICAgICAgdmFyIGxhc3QgPSBudWxsO1xuICAgICAgICB2YXIgZXNjYXBpbmcgPSBmYWxzZTtcbiAgICAgICAgdmFyIG5vbkNhcHR1cmluZ01heWJlID0gZmFsc2U7XG4gICAgICAgIHZhciBjaGFyQ2xhc3MgPSBmYWxzZTtcbiAgICAgICAgdGhpcy5yZWdleHAuc291cmNlLnNwbGl0KCcnKS5mb3JFYWNoKGZ1bmN0aW9uIChjLCBuKSB7XG4gICAgICAgICAgICBpZiAoYyA9PT0gJ1snICYmICFlc2NhcGluZykge1xuICAgICAgICAgICAgICAgIGNoYXJDbGFzcyA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID09PSAnXScgJiYgIWVzY2FwaW5nKSB7XG4gICAgICAgICAgICAgICAgY2hhckNsYXNzID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID09PSAnKCcgJiYgIWVzY2FwaW5nICYmICFjaGFyQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKG5ldyBHcm91cEJ1aWxkZXJfMS5kZWZhdWx0KCkpO1xuICAgICAgICAgICAgICAgIGdyb3VwU3RhcnRTdGFjay5wdXNoKG4gKyAxKTtcbiAgICAgICAgICAgICAgICBub25DYXB0dXJpbmdNYXliZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoYyA9PT0gJyknICYmICFlc2NhcGluZyAmJiAhY2hhckNsYXNzKSB7XG4gICAgICAgICAgICAgICAgdmFyIGdiID0gc3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgdmFyIGdyb3VwU3RhcnQgPSBncm91cFN0YXJ0U3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgaWYgKGdiLmNhcHR1cmluZykge1xuICAgICAgICAgICAgICAgICAgICBnYi5zb3VyY2UgPSBfdGhpcy5yZWdleHAuc291cmNlLnN1YnN0cmluZyhncm91cFN0YXJ0LCBuKTtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbc3RhY2subGVuZ3RoIC0gMV0uYWRkKGdiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGdiLm1vdmVDaGlsZHJlblRvKHN0YWNrW3N0YWNrLmxlbmd0aCAtIDFdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbm9uQ2FwdHVyaW5nTWF5YmUgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPT09ICc/JyAmJiBsYXN0ID09PSAnKCcpIHtcbiAgICAgICAgICAgICAgICBub25DYXB0dXJpbmdNYXliZSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID09PSAnOicgJiYgbm9uQ2FwdHVyaW5nTWF5YmUpIHtcbiAgICAgICAgICAgICAgICBzdGFja1tzdGFjay5sZW5ndGggLSAxXS5zZXROb25DYXB0dXJpbmcoKTtcbiAgICAgICAgICAgICAgICBub25DYXB0dXJpbmdNYXliZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXNjYXBpbmcgPSBjID09PSAnXFxcXCcgJiYgIWVzY2FwaW5nO1xuICAgICAgICAgICAgbGFzdCA9IGM7XG4gICAgICAgIH0pO1xuICAgICAgICB0aGlzLmdyb3VwQnVpbGRlciA9IHN0YWNrLnBvcCgpO1xuICAgIH1cbiAgICBUcmVlUmVnZXhwLnByb3RvdHlwZS5tYXRjaCA9IGZ1bmN0aW9uIChzKSB7XG4gICAgICAgIHZhciBtYXRjaCA9IHRoaXMucmVnZXguZXhlYyhzKTtcbiAgICAgICAgaWYgKCFtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bG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KSB8fFxuICAgICAgICAgICAgICAgICAgICAoQVNTT0NbdG9rZW5dID09PSAncmlnaHQnICYmIFBSRUNbdG9rZW5dIDwgUFJFQ1twZWVrKG9wZXJhdG9ycyldKSkpIHtcbiAgICAgICAgICAgICAgICBwdXNoRXhwcihwb3Aob3BlcmF0b3JzKSwgZXhwcmVzc2lvbnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb3BlcmF0b3JzLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgZXhwZWN0ZWRUb2tlblR5cGUgPSBPUEVSQU5EO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKCcoJyA9PT0gdG9rZW4pIHtcbiAgICAgICAgICAgIGNoZWNrKGV4cGVjdGVkVG9rZW5UeXBlLCBPUEVSQU5EKTtcbiAgICAgICAgICAgIG9wZXJhdG9ycy5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgIGV4cGVjdGVkVG9rZW5UeXBlID0gT1BFUkFORDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICgnKScgPT09IHRva2VuKSB7XG4gICAgICAgICAgICBjaGVjayhleHBlY3RlZFRva2VuVHlwZSwgT1BFUkFUT1IpO1xuICAgICAgICAgICAgd2hpbGUgKG9wZXJhdG9ycy5sZW5ndGggPiAwICYmIHBlZWsob3BlcmF0b3JzKSAhPT0gJygnKSB7XG4gICAgICAgICAgICAgICAgcHVzaEV4cHIocG9wKG9wZXJhdG9ycyksIGV4cHJlc3Npb25zKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChvcGVyYXRvcnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ1N5bnRheCBlcnJvci4gVW5tYXRjaGVkICknKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwZWVrKG9wZXJhdG9ycykgPT09ICcoJykge1xuICAgICAgICAgICAgICAgIHBvcChvcGVyYXRvcnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwZWN0ZWRUb2tlblR5cGUgPSBPUEVSQVRPUjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNoZWNrKGV4cGVjdGVkVG9rZW5UeXBlLCBPUEVSQU5EKTtcbiAgICAgICAgICAgIHB1c2hFeHByKHRva2VuLCBleHByZXNzaW9ucyk7XG4gICAgICAgICAgICBleHBlY3RlZFRva2VuVHlwZSA9IE9QRVJBVE9SO1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgd2hpbGUgKG9wZXJhdG9ycy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGlmIChwZWVrKG9wZXJhdG9ycykgPT09ICcoJykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ1N5bnRheCBlcnJvci4gVW5tYXRjaGVkICgnKTtcbiAgICAgICAgfVxuICAgICAgICBwdXNoRXhwcihwb3Aob3BlcmF0b3JzKSwgZXhwcmVzc2lvbnMpO1xuICAgIH1cbiAgICByZXR1cm4gcG9wKGV4cHJlc3Npb25zKTtcbn1cbmV4cG9ydHMuZGVmYXVsdCA9IHBhcnNlO1xuZnVuY3Rpb24gdG9rZW5pemUoZXhwcikge1xuICAgIHZhciB0b2tlbnMgPSBbXTtcbiAgICB2YXIgaXNFc2NhcGVkID0gZmFsc2U7XG4gICAgdmFyIHRva2VuO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZXhwci5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgYyA9IGV4cHIuY2hhckF0KGkpO1xuICAgICAgICBpZiAoJ1xcXFwnID09PSBjKSB7XG4gICAgICAgICAgICBpc0VzY2FwZWQgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKC9cXHMvLnRlc3QoYykpIHtcbiAgICAgICAgICAgICAgICAvLyBza2lwXG4gICAgICAgICAgICAgICAgaWYgKHRva2VuKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGVuZCBvZiB0b2tlblxuICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbi5qb2luKCcnKSk7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICgoYyA9PT0gJygnIHx8IGMgPT09ICcpJykgJiYgIWlzRXNjYXBlZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVuZCBvZiB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4uam9pbignJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2goYyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0b2tlbiA9IHRva2VuID8gdG9rZW4gOiBbXTsgLy8gc3RhcnQgb2YgdG9rZW5cbiAgICAgICAgICAgICAgICB0b2tlbi5wdXNoKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaXNFc2NhcGVkID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHRva2VuKSB7XG4gICAgICAgIHRva2Vucy5wdXNoKHRva2VuLmpvaW4oJycpKTtcbiAgICB9XG4gICAgcmV0dXJuIHRva2Vucztcbn1cbmZ1bmN0aW9uIGlzVW5hcnkodG9rZW4pIHtcbiAgICByZXR1cm4gJ25vdCcgPT09IHRva2VuO1xufVxuZnVuY3Rpb24gaXNCaW5hcnkodG9rZW4pIHtcbiAgICByZXR1cm4gJ29yJyA9PT0gdG9rZW4gfHwgJ2F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XR1cm4gKCcoICcgK1xuICAgICAgICAgICAgdGhpcy5sZWZ0RXhwci50b1N0cmluZygpICtcbiAgICAgICAgICAgICcgb3IgJyArXG4gICAgICAgICAgICB0aGlzLnJpZ2h0RXhwci50b1N0cmluZygpICtcbiAgICAgICAgICAgICcgKScpO1xuICAgIH07XG4gICAgcmV0dXJuIE9yO1xufSgpKTtcbnZhciBBbmQgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgZnVuY3Rpb24gQW5kKGxlZnRFeHByLCByaWdodEV4cHIpIHtcbiAgICAgICAgdGhpcy5sZWZ0RXhwciA9IGxlZnRFeHByO1xuICAgICAgICB0aGlzLnJpZ2h0RXhwciA9IHJpZ2h0RXhwcjtcbiAgICB9XG4gICAgQW5kLnByb3RvdHlwZS5ldmFsdWF0ZSA9IGZ1bmN0aW9uICh2YXJpYWJsZXMpIHtcbiAgICAgICAgcmV0dXJuICh0aGlzLmxlZnRFeHByLmV2YWx1YXRlKHZhcmlhYmxlcykgJiYgdGhpcy5yaWdodEV4cHIuZXZhbHVhdGUodmFyaWFibGVzKSk7XG4gICAgfTtcbiAgICBBbmQucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gKCcoICcgK1xuICAgICAgICAgICAgdGhpcy5sZWZ0RXhwci50b1N0cmluZygpICtcbiAgICAgICAgICAgICcgYW5kICcgK1xuICAgICAgICAgICAgdGhpcy5yaWdodEV4cHIudG9TdHJpbmcoKSArXG4gICAgICAgICAgICAnICknKTtcbiAgICB9O1xuICAgIHJldHVybiBBbmQ7XG59KCkpO1xudmFyIE5vdCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICBmdW5jdGlvbiBOb3QoZXhwcikge1xuICAgICAgICB0aGlzLmV4cHIgPSBleHByO1xuICAgIH1cbiAgICBOb3QucHJvdG90eXBlLmV2YWx1YXRlID0gZnVuY3Rpb24gKHZhcmlhYmx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BTQUZBUklfTkFUSVZFX0NPREVfUkVHRVhQID0gL14oZXZhbEApPyhcXFtuYXRpdmUgY29kZVxcXSk/JC87XG5cbiAgICByZXR1cm4ge1xuICAgICAgICAvKipcbiAgICAgICAgICogR2l2ZW4gYW4gRXJyb3Igb2JqZWN0LCBleHRyYWN0IHRoZSBtb3N0IGluZm9ybWF0aW9uIGZyb20gaXQuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSB7RXJyb3J9IGVycm9yIG9iamVjdFxuICAgICAgICAgKiBAcmV0dXJuIHtBcnJheX0gb2YgU3RhY2tGcmFtZXNcbiAgICAgICAgICovXG4gICAgICAgIHBhcnNlOiBmdW5jdGlvbiBFcnJvclN0YWNrUGFyc2VyJCRwYXJzZShlcnJvcikge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBlcnJvci5zdGFja3RyYWNlICE9PSAndW5kZWZpbmVkJyB8fCB0eXBlb2YgZXJyb3JbJ29wZXJhI3NvdXJjZWxvYyddICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcnNlT3BlcmEoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChlcnJvci5zdGFjayAmJiBlcnJvci5zdGFjay5tYXRjaChDSFJPTUVfSUVfU1RBQ0tfUkVHRVhQKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcnNlVjhPcklFKGVycm9yKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZXJyb3Iuc3RhY2spIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJzZUZGT3JTYWZhcmkoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBwYXJzZSBnaXZlbiBFcnJvciBvYmplY3QnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICAvLyBTZ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ICAgICAgICAgICAgdmFyIHRva2VucyA9IHNhbml0aXplZExpbmUuc3BsaXQoL1xccysvKS5zbGljZSgxKTtcbiAgICAgICAgICAgICAgICAvLyBpZiBhIGxvY2F0aW9uIHdhcyBtYXRjaGVkLCBwYXNzIGl0IHRvIGV4dHJhY3RMb2NhdGlvbigpIG90aGVyd2lzZSBwb3AgdGhlIGxhc3QgdG9rZW5cbiAgICAgICAgICAgICAgICB2YXIgbG9jYXRpb25QYXJ0cyA9IHRoaXMuZXh0cmFjdExvY2F0aW9uKGxvY2F0aW9uID8gbG9jYXRpb25bMV0gOiB0b2tlbnMucG9wKCkpO1xuICAgICAgICAgICAgICAgIHZhciBmdW5jdGlvbk5hbWUgPSB0b2tlbnMuam9pbignICcpIHx8IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB2YXIgZmlsZU5hbWUgPSBbJ2V2YWwnLCAnPGFub255bW91cz4nXS5pbmRleE9mKGxvY2F0aW9uUGFydHNbMF0pID4gLTEgPyB1bmRlZmluZWQgOiBsb2NhdGlvblBhcnRzWzBdO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBTdGFja0ZyYW1lKHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25OYW1lOiBmdW5jdGlvbk5hbWUsXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lOiBmaWxlTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbG9jYXRpb25QYXJ0c1sxXSxcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uTnVtYmVyOiBsb2NhdGlvblBhcnRzWzJdLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2U6IGxpbmVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sIHRoaXMpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHBhcnNlRkZPclNhZmFyaTogZnVuY3Rpb24gRXJyb3JTdGFja1BhcnNlciQkcGFyc2VGRk9yU2FmYXJpKGVycm9yKSB7XG4gICAgICAgICAgICB2YXIgZmlsdGVyZWQgPSBlcnJvci5zdGFjay5zcGxpdCgnXFxuJykuZmlsdGVyKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gIWxpbmUubWF0Y2goU0FGQVJJX05BVElWRV9DT0RFX1JFR0VYUCk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkLm1hcChmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICAgICAgLy8gVGhyb3cgYXdheSBldmFsIGluZm9ybWF0aW9uIHVudGlsIHdlIGltcGxlbWVudCBzdGFja3RyYWNlLmpzL3N0YWNrZnJhbWUjOFxuICAgICAgICAgICAgICAgIGlmIChsaW5lLmluZGV4T2YoJyA+IGV2YWwnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSBsaW5lLnJlcGxhY2UoLyBsaW5lIChcXGQrKSg/OiA+IGV2YWwgbGluZSBcXGQrKSogPiBldmFsXFw6XFxkK1xcOlxcZCsvZywgJzokMScpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChsaW5lLmluZGV4T2YoJ0AnKSA9PT0gLTEgJiYgbGluZS5pbmRleE9mKCc6JykgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNhZmFyaSBldmFsIGZyYW1lcyBvbmx5IGhhdmUgZnVuY3Rpb24gbmFtZXMgYW5kIG5vdGhpbmcgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFN0YWNrRnJhbWUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25OYW1lOiBsaW5lXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmdW5jdGlvbk5hbWVSZWdleCA9IC8oKC4qXCIuK1wiW15AXSopP1teQF0qKSg/OkApLztcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBsaW5lLm1hdGNoKGZ1bmN0aW9uTmFtZVJlZ2V4KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZ1bmN0aW9uTmFtZSA9IG1hdGNoZXMgJiYgbWF0Y2hlc1sxXSA/IG1hdGNoZXNbMV0gOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvblBhcnRzID0gdGhpcy5leHRyYWN0TG9jYXRpb24obGluZS5yZXBsYWNlKGZ1bmN0aW9uTmFtZVJlZ2V4LCAnJykpO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbk5hbWU6IGZ1bmN0aW9uTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lOiBsb2NhdGlvblBhcnRzWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbG9jYXRpb25QYXJ0c1sxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbk51bWJlcjogbG9jYXRpb25QYXJ0c1syXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogbGluZVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgfSxcblxuICAgICAgICBwYXJzZU9wZXJhOiBmdW5jdGlvbiBFcnJvclN0YWNrUGFyc2VyJCRwYXJzZU9wZXJhKGUpIHtcbiAgICAgICAgICAgIGlmICghZS5zdGFja3RyYWNlIHx8IChlLm1lc3NhZ2UuaW5kZXhPZignXFxuJykgPiAtMSAmJlxuICAgICAgICAgICAgICAgIGUubWVzc2FnZS5zcGxpdCgnXFxuJykubGVuZ3RoID4gZS5zdGFja3RyYWNlLnNwbGl0KCdcXG4nKS5sZW5ndGgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VPcGVyYTkoZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCFlLnN0YWNrKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VPcGVyYTEwKGUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJzZU9wZXJhMTEoZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgcGFyc2VPcGVyYTk6IGZ1bmN0aW9uIEVycm9yU3RhY2tQYXJzZXIkJHBhcnNlT3BlcmE5KGUpIHtcbiAgICAgICAgICAgIHZhciBsaW5lUkUgPSAvTGluZSAoXFxkKykuKnNjcmlwdCAoPzppbiApPyhcXFMrKS9pO1xuICAgICAgICAgICAgdmFyIGxpbmVzID0gZS5tZXNzYWdlLnNwbGl0KCdcXG4nKTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBbXTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDIsIGxlbiA9IGxpbmVzLmxlbmd0aDsgaSA8IGxlbjsgaSArPSAyKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoID0gbGluZVJFLmV4ZWMobGluZXNbaV0pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogbWF0Y2hbMl0sXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBtYXRjaFsxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogbGluZXNbaV1cbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfSxcblxuICAgICAgICBwYXJzZU9wZXJhMTA6IGZ1bmN0aW9uIEVycm9yU3RhY2tQYXJzZXIkJHBhcnNlT3BlcmExMChlKSB7XG4gICAgICAgICAgICB2YXIgbGluZVJFID0gL0xpbmUgKFxcZCspLipzY3JpcHQgKD86aW4gKT8oXFxTKykoPzo6IEluIGZ1bmN0aW9uIChcXFMrKSk/JC9pO1xuICAgICAgICAgICAgdmFyIGxpbmVzID0gZS5zdGFja3RyYWNlLnNwbGl0KCdcXG4nKTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBbXTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IGxpbmVzLmxlbmd0aDsgaSA8IGxlbjsgaSArPSAyKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoID0gbGluZVJFLmV4ZWMobGluZXNbaV0pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBTdGFja0ZyYW1lKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbk5hbWU6IG1hdGNoWzNdIHx8IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogbWF0Y2hbMl0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbWF0Y2hbMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlOiBsaW5lc1tpXVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLy8gT3BlcmEgMTAuNjUrIEVycm9yLnN0YWNrIHZlcnkgc2ltaWxhciB0byBGRi9TYWZhcmlcbiAgICAgICAgcGFyc2VPcGVyYTExOiBmdW5jdGlvbiBFcnJvclN0YWNrUGFyc2VyJCRwYXJzZU9wZXJhMTEoZXJyb3IpIHtcbiAgICAgICAgICAgIHZhciBmaWx0ZXJlZCA9IGVycm9yLnN0YWNrLnNwbGl0KCdcXG4nKS5maWx0ZXIoZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAhIWxpbmUubWF0Y2goRklSRUZPWF9TQUZBUklfU1RBQ0tfUkVHRVhQKSAmJiAhbGluZS5tYXRjaCgvXkVycm9yIGNyZWF0ZWQgYXQvKTtcbiAgICAgICAgICAgIH0sIHRoaXMpO1xuXG4gICAgICAgICAgICByZXR1cm4gZmlsdGVyZWQubWFwKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICAgICAgICAgICAgICB2YXIgdG9rZW5zID0gbGluZS5zcGxpdCgnQCcpO1xuICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvblBhcnRzID0gdGhpcy5leHRyYWN0TG9jYXRpb24odG9rZW5zLnBvcCgpKTtcbiAgICAgICAgICAgICAgICB2YXIgZnVuY3Rpb25DYWxsID0gKHRva2Vucy5zaGlmdCgpIHx8ICcnKTtcbiAgICAgICAgICAgICAgICB2YXIgZnVuY3Rpb25OYW1lID0gZnVuY3Rpb25DYWxsXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvPGFub255bW91cyBmdW5jdGlvbig6IChcXHcrKSk/Pi8sICckMicpXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFwoW15cXCldKlxcKS9nLCAnJykgfHwgdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIHZhciBhcmdzUmF3O1xuICAgICAgICAgICAgICAgIGlmIChmdW5jdGlvbkNhbGwubWF0Y2goL1xcKChbXlxcKV0qKVxcKS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyZ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cXG5cIik7XG5cbiAgICAgICAgdmFyIHJlc3VsdCA9IHtcbiAgICAgICAgICB0eXBlOiBub2RlLnJ1bGVUeXBlLFxuICAgICAgICAgIGxvY2F0aW9uOiBnZXRMb2NhdGlvbihzZXBhcmF0b3JUb2tlbiksXG4gICAgICAgICAgY29udGVudDogY29udGVudFxuICAgICAgICB9O1xuICAgICAgICAvLyBjb25kaXRpb25hbGx5IGFkZCB0aGlzIGxpa2UgdGhpcyAobmVlZGVkIHRvIG1ha2UgdGVzdHMgcGFzcyBvbiBub2RlIDAuMTAgYXMgd2VsbCBhcyA0LjApXG4gICAgICAgIGlmKGNvbnRlbnRUeXBlKSB7XG4gICAgICAgICAgcmVzdWx0LmNvbnRlbnRUeXBlID0gY29udGVudFR5cGU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIGNhc2UgJ0RhdGFUYWJsZSc6XG4gICAgICAgIHZhciByb3dzID0gZ2V0VGFibGVSb3dzKG5vZGUpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IG5vZGUucnVsZVR5cGUsXG4gICAgICAgICAgbG9jYXRpb246IHJvd3NbMF0ubG9jYXRpb24sXG4gICAgICAgICAgcm93czogcm93cyxcbiAgICAgICAgfVxuICAgICAgY2FzZSAnQmFja2dyb3VuZCc6XG4gICAgICAgIHZhciBiYWNrZ3JvdW5kTGluZSA9IG5vZGUuZ2V0VG9rZW4oJ0JhY2tncm91bmRMaW5lJyk7XG4gICAgICAgIHZhciBkZXNjcmlwdGlvbiA9IGdldERlc2NyaXB0aW9uKG5vZGUpO1xuICAgICAgICB2YXIgc3RlcHMgPSBnZXRTdGVwcyhub2RlKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IG5vZGUucnVsZVR5cGUsXG4gICAgICAgICAgbG9jYXRpb246IGdldExvY2F0aW9uKGJhY2tncm91bmRMaW5lKSxcbiAgICAgICAgICBrZXl3b3JkOiBi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LnB1c2goe1xuICAgICAgICB0eXBlOiAnZ2hlcmtpbi1kb2N1bWVudCcsXG4gICAgICAgIHVyaTogdXJpLFxuICAgICAgICBkb2N1bWVudDogZ2hlcmtpbkRvY3VtZW50XG4gICAgICB9KVxuICAgIH1cblxuICAgIGlmICh0eXBlc1sncGlja2xlJ10pIHtcbiAgICAgIHZhciBwaWNrbGVzID0gY29tcGlsZXIuY29tcGlsZShnaGVya2luRG9jdW1lbnQpXG4gICAgICBmb3IgKHZhciBwIGluIHBpY2tsZXMpIHtcbiAgICAgICAgcmVzdWx0LnB1c2goe1xuICAgICAgICAgIHR5cGU6ICdwaWNrbGUnLFxuICAgICAgICAgIHVyaTogdXJpLFxuICAgICAgICAgIHBpY2tsZTogcGlja2xlc1twXVxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH1cbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgdmFyIGVycm9ycyA9IGVyci5lcnJvcnMgfHwgW2Vycl1cbiAgICBmb3IgKHZhciBlIGluIGVycm9ycykge1xuICAgICAgcmVzdWx0LnB1c2goe1xuICAgICAgICB0eXBlOiBcImF0dGFjaG1lbnRcIixcbiAgICAgICAgc291cmNlOiB7XG4gICAgICAgICAgdXJpOiB1cmksXG4gICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgIGxpbmU6IGVycm9yc1tlXS5sb2NhdGlvbi5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBlcnJvcnNbZV0ubG9jYXRpb24uY29sdW1uXG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkYXRhOiBlcnJvcnNbZV0ubWVzc2FnZSxcbiAgICAgICAgbWVkaWE6IHtcbiAgICAgICAgICBlbmNvZGluZzogXCJ1dGYtOFwiLFxuICAgICAgICAgIHR5cGU6IFwidGV4dC94LmN1Y3VtYmVyLnN0YWNrdHJhY2UrcGxhaW5cIlxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgfVxuICByZXR1cm4gcmVz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cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJCbGltZXkhIFwiXG4gICAgXVxuICB9LFxuICBcImVvXCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIkthaiBcIlxuICAgIF0sXG4gICAgXCJiYWNrZ3JvdW5kXCI6IFtcbiAgICAgIFwiRm9ub1wiXG4gICAgXSxcbiAgICBcImJ1dFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIlNlZCBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIkVremVtcGxvalwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCJUcmFqdG9cIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIkRvbml0YcS1byBcIixcbiAgICAgIFwiS29tZW5jZSBcIlxuICAgIF0sXG4gICAgXCJuYW1lXCI6IFwiRXNwZXJhbnRvXCIsXG4gICAgXCJuYXRpdmVcIjogXCJFc3BlcmFudG9cIixcbiAgICBcInNjZW5hcmlvXCI6IFtcbiAgICAgIFwiU2NlbmFyb1wiLFxuICAgICAgXCJLYXpvXCJcbiAgICBdLFxuICAgIFwic2NlbmFyaW9PdXRsaW5lXCI6IFtcbiAgICAgIFwiS29udHVybyBkZSBsYSBzY2VuYXJvXCIsXG4gICAgICBcIlNraXpvXCIsXG4gICAgICBcIkthem8tc2tpem9cIlxuICAgIF0sXG4gICAgXCJ0aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwiRG8gXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIlNlIFwiXG4gICAgXVxuICB9LFxuICBcImVzXCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIlkgXCIsXG4gICAgICBcIkUgXCJcbiAgICBdLFxuICAgIFwiYmFja2dy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pb1wiOiBbXG4gICAgICBcItiz2YbYp9ix24zZiFwiXG4gICAgXSxcbiAgICBcInNjZW5hcmlvT3V0bGluZVwiOiBbXG4gICAgICBcItin2YTar9mI24wg2LPZhtin2LHbjNmIXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItii2Ybar9in2YcgXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItmH2Ybar9in2YXbjCBcIlxuICAgIF1cbiAgfSxcbiAgXCJmaVwiOiB7XG4gICAgXCJhbmRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJKYSBcIlxuICAgIF0sXG4gICAgXCJiYWNrZ3JvdW5kXCI6IFtcbiAgICAgIFwiVGF1c3RhXCJcbiAgICBdLFxuICAgIFwiYnV0XCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwiTXV0dGEgXCJcbiAgICBdLFxuICAgIFwiZXhhbXBsZXNcIjogW1xuICAgICAgXCJUYXBhdWtzZXRcIlxuICAgIF0sXG4gICAgXCJmZWF0dXJlXCI6IFtcbiAgICAgIFwiT21pbmFpc3V1c1wiXG4gICAgXSxcbiAgICBcImdpdmVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwiT2xldGV0YWFuIFwiXG4gICAgXSxcbiAgICBcIm5hbWVcIjogXCJGaW5uaXNoXCIsXG4gICAgXCJuYXRpdmVcIjogXCJzdW9taVwiLFxuICAgIFwic2NlbmFyaW9cIjogW1xuICAgICAgXCJUYXBhdXNcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCJUYXBhdXNhaWhpb1wiXG4gICAgXSxcbiAgICBcInRoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJOaWluIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJLdW4gXC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pb1wiXG4gICAgXSxcbiAgICBcInNjZW5hcmlvT3V0bGluZVwiOiBbXG4gICAgICBcIkVzYm96byBkbyBlc2NlbmFyaW9cIlxuICAgIF0sXG4gICAgXCJ0aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwiRW50w7NuIFwiLFxuICAgICAgXCJMb2dvIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJDYW5kbyBcIlxuICAgIF1cbiAgfSxcbiAgXCJoZVwiOiB7XG4gICAgXCJhbmRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLXldeS150gXCJcbiAgICBdLFxuICAgIFwiYmFja2dyb3VuZFwiOiBbXG4gICAgICBcIteo16fXolwiXG4gICAgXSxcbiAgICBcImJ1dFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIteQ15HXnCBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIteT15XXktee15DXldeqXCJcbiAgICBdLFxuICAgIFwiZmVhdHVyZVwiOiBbXG4gICAgICBcIteq15vXldeg15RcIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIteR15TXmdeg16rXnyBcIlxuICAgIF0sXG4gICAgXCJuYW1lXCI6IFwiSGVicmV3XCIsXG4gICAgXCJuYXRpdmVcIjogXCLXoteR16jXmdeqXCIsXG4gICAgXCJzY2VuYXJpb1wiOiBbXG4gICAgICBcIteq16jXl9eZ16lcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCLXqteR16DXmdeqINeq16jXl9eZ16lcIlxuICAgIF0sXG4gICAgXCJ0aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi15DXliBcIixcbiAgICAgIFwi15DXlteZIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiL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FtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi4LKo4LKC4LKk4LKwIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLgsrjgs43gsqXgsr/gsqTgsr/gsq/gsqjgs43gsqjgs4EgXCJcbiAgICBdXG4gIH0sXG4gIFwia29cIjoge1xuICAgIFwiYW5kXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi6re466as6rOgXCJcbiAgICBdLFxuICAgIFwiYmFja2dyb3VuZFwiOiBbXG4gICAgICBcIuuwsOqyvVwiXG4gICAgXSxcbiAgICBcImJ1dFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIu2VmOyngOunjFwiLFxuICAgICAgXCLri6hcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIuyYiFwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCLquLDriqVcIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuyhsOqxtFwiLFxuICAgICAgXCLrqLzsoIBcIlxuICAgIF0sXG4gICAgXCJuYW1lXCI6IFwiS29yZWFuXCIsXG4gICAgXCJuYXRpdmVcIjogXCLtlZzqta3slrRcIixcbiAgICBcInNjZW5hcmlvXCI6IFtcbiAgICAgIFwi7Iuc64KY66as7JikXCJcbiAgICBdLFxuICAgIFwic2NlbmFyaW9PdXRsaW5lXCI6IFtcbiAgICAgIFwi7Iuc64KY66as7JikIOqwnOyalFwiXG4gICAgXSxcbiAgICBcInRoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLqt7jrn6zrqbRcIlxuICAgIF0sXG4gICAgXCJ3aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi66eM7J28XCIsXG4gICAgICBcIuunjOyVvVwiXG4gICAgXVxuICB9LFxuICBcImx0XCI6IHtcbiAgICBcImF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RcIixcbiAgICAgIFwiRGF0aSBmaWluZCBcIixcbiAgICAgIFwiRGHIm2kgZmlpbmQgXCIsXG4gICAgICBcIkRhxaNpIGZpaW5kIFwiXG4gICAgXSxcbiAgICBcIm5hbWVcIjogXCJSb21hbmlhblwiLFxuICAgIFwibmF0aXZlXCI6IFwicm9tw6JuxINcIixcbiAgICBcInNjZW5hcmlvXCI6IFtcbiAgICAgIFwiU2NlbmFyaXVcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCJTdHJ1Y3R1cmEgc2NlbmFyaXVcIixcbiAgICAgIFwiU3RydWN0dXLEgyBzY2VuYXJpdVwiXG4gICAgXSxcbiAgICBcInRoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCJBdHVuY2kgXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIkNhbmQgXCIsXG4gICAgICBcIkPDom5kIFwiXG4gICAgXVxuICB9LFxuICBcInJ1XCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCYIFwiLFxuICAgICAgXCLQmiDRgtC+0LzRgyDQttC1IFwiLFxuICAgICAgXCLQotCw0LrQttC1IFwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLQn9GA0LXQtNGL0YHRgtC+0YDQuNGPXCIsXG4gICAgICBcItCa0L7QvdGC0LXQutGB0YJcIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLQndC+IFwiLFxuICAgICAgXCLQkCBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcItCf0YDQuNC80LXRgNGLXCJcbiAgICBdLFxuICAgIFwiZmVhdHVyZVwiOiBbXG4gICAgICBcItCk0YPQvdC60YbQuNGPXCIsXG4gICAgICBcItCk0YPQvdC60YbQuNC+0L3Q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wiXG4gICAgXVxuICB9LFxuICBcInRhXCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuCuruCvh+CusuCvgeCuruCvjSAgXCIsXG4gICAgICBcIuCuruCuseCvjeCuseCvgeCuruCvjSBcIlxuICAgIF0sXG4gICAgXCJiYWNrZ3JvdW5kXCI6IFtcbiAgICAgIFwi4K6q4K6/4K6p4K+N4K6p4K6j4K6/XCJcbiAgICBdLFxuICAgIFwiYnV0XCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi4K6G4K6p4K6+4K6y4K+NICBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIuCujuCun+CvgeCupOCvjeCupOCvgeCuleCvjeCuleCuvuCun+CvjeCun+CvgeCuleCus+CvjVwiLFxuICAgICAgXCLgrpXgrr7grp/gr43grprgrr/grpXgrrPgr41cIixcbiAgICAgIFwiIOCuqOCuv+CusuCviOCuruCviOCuleCus+Cuv+CusuCvjVwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCLgroXgrq7gr43grprgrq7gr41cIixcbiAgICAgIFwi4K614K6j4K6/4K6VIOCupOCvh+CuteCviFwiLFxuICAgICAgXCLgrqTgrr/grrHgrqngr41cIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuCuleCvhuCuvuCun+CvgeCuleCvjeCuleCuquCvjeCuquCun+CvjeCunyBcIlxuICAgIF0sXG4gICAgXCJuYW1lXCI6IFwiVGFtaWxcIixcbiAgICBcIm5hdGl2ZVwiOiBcIuCupOCuruCuv+CutOCvjVwiLFxuICAgIFwic2NlbmFyaW9cIjogW1xuICAgICAgXCLgrpXgrr7grp/gr43grprgrr9cIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCLgrpXgrr7grp/gr43grprgrr8g4K6a4K+B4K6w4K+B4K6V4K+N4K6V4K6u4K+NXCIsXG4gICAgICBcIuCuleCuvuCun+CvjeCumuCuvyDgrrXgrr7grrDgr43grqrgr43grqrgr4HgrrDgr4FcIlxuICAgIF0sXG4gICAgXCJ0aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi4K6F4K6q4K+N4K6q4K+G4K6+4K604K+B4K6k4K+BIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLgro7grqrgr43grqrgr4fgrr7grqTgr4EgXCJcbiAgICBdXG4gIH0sXG4gIFwidGhcIjoge1xuICAgIFwiYW5kXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi4LmB4Lil4LiwIFwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLguYHguJnguKfguITguLTguJRcIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLguYHguJXguYggXCJcbiAgICBdLFxuICAgIFwiZXhhbXBsZXNcIjogW1xuICAgICAgXCLguIrguLjguJTguILguK3guIfguJXguLHguKfguK3guKLguYjguLLguIdcIixcbiAgICAgIFwi4LiK4Li44LiU4LiC4Lit4LiH4LmA4Lir4LiV4Li44LiB4Liy4Lij4LiT4LmMXCJcbiAgICBdLFxuICAgIFwiZmVhdHVyZVwiOiBbXG4gICAgICBcIuC5guC4hOC4o+C4h+C4q+C4peC4seC4gVwiLFxuICAgICAgXCLguITguKfguLLguKHguJXguYnguK3guIfguIHguLLguKPguJfguLLguIfguJjguLjguKPguIHguLTguIhcIixcbiAgICAgIFwi4LiE4Lin4Liy4Lih4Liq4Liy4Lih4Liy4Lij4LiWXCJcbiAgICBdLFxuICAgIFwiZ2l2ZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLguIHguLPguKvguJnguJTguYPguKvguYkgXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIlRoYWlcI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biAgICAgIFwiKiBcIixcbiAgICAgIFwi0KLQviBcIixcbiAgICAgIFwi0KLQvtC00ZYgXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCv0LrRidC+IFwiLFxuICAgICAgXCLQmtC+0LvQuCBcIlxuICAgIF1cbiAgfSxcbiAgXCJ1clwiOiB7XG4gICAgXCJhbmRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLYp9mI2LEgXCJcbiAgICBdLFxuICAgIFwiYmFja2dyb3VuZFwiOiBbXG4gICAgICBcItm+2LMg2YXZhti42LFcIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLZhNuM2qnZhiBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcItmF2KvYp9mE24zaulwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCLYtdmE2KfYrduM2KpcIixcbiAgICAgIFwi2qnYp9ix2YjYqNin2LEg2qnbjCDYttix2YjYsdiqXCIsXG4gICAgICBcItiu2LXZiNi124zYqlwiXG4gICAgXSxcbiAgICBcImdpdmVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi2Kfar9ixIFwiLFxuICAgICAgXCLYqNin2YTZgdix2LYgXCIsXG4gICAgICBcItmB2LHYtiDaqduM2KcgXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIlVyZHVcIixcbiAgICBcIm5hdGl2ZVwiOiBcItin2LHYr9mIXCIsXG4gICAgXCJzY2VuYXJpb1wiOiBbXG4gICAgICBcItmF2YbYuNix2YbYp9mF24FcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCLZhdmG2LjYsSDZhtin2YXbkiDaqdinINiu2KfaqduBXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAg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gXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLog4zmma9cIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLkvYbmmK9cIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIuS+i+WtkFwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCLlip/og71cIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuWBh+WmglwiLFxuICAgICAgXCLlgYforr5cIixcbiAgICAgIFwi5YGH5a6aXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIkNoaW5lc2Ugc2ltcGxpZmllZFwiLFxuICAgIFwibmF0aXZlXCI6IFwi566A5L2T5Lit5paHXCIsXG4gICAgXCJzY2VuYXJpb1wiOiBbXG4gICAgICBcIuWcuuaZr1wiLFxuICAgICAgXCLliafmnKxcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCLlnLrmma/lpKfnurJcIixcbiAgICAgIFwi5Ymn5pys5aSn57qyXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIumCo+S5iFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLlvZNcIlxuICAgIF1cbiAgfSxcbiAgXCJ6aC1UV1wiOiB7XG4gICAgXCJhbmRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLogIzkuJRcIixcbiAgICAgIFwi5Lim5LiUXCIsXG4gICAgICBcIuWQjOaZglwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLog4zmma9cIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLkvYbmmK9cIlxuICAgIF0sX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1xuICAgICAgICAgIHN0ZXBzLnB1c2gocGlja2xlU3RlcCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBwaWNrbGUgPSB7XG4gICAgICAgICAgbmFtZTogaW50ZXJwb2xhdGUoc2NlbmFyaW9PdXRsaW5lLm5hbWUsIHZhcmlhYmxlQ2VsbHMsIHZhbHVlQ2VsbHMpLFxuICAgICAgICAgIGxhbmd1YWdlOiBsYW5ndWFnZSxcbiAgICAgICAgICBzdGVwczogc3RlcHMsXG4gICAgICAgICAgdGFnczogcGlja2xlVGFncyh0YWdzKSxcbiAgICAgICAgICBsb2NhdGlvbnM6IFtcbiAgICAgICAgICAgIHBpY2tsZUxvY2F0aW9uKHZhbHVlcy5sb2NhdGlvbiksXG4gICAgICAgICAgICBwaWNrbGVMb2NhdGlvbihzY2VuYXJpb091dGxpbmUubG9jYXRpb24pXG4gICAgICAgICAgXVxuICAgICAgICB9O1xuICAgICAgICBwaWNrbGVzLnB1c2gocGlja2xlKTtcblxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICBmdW5jdGlvbiBjcmVhdGVQaWNrbGVBcmd1bWVudHMoYXJndW1lbnQsIHZhcmlhYmxlQ2VsbHMsIHZhbHVlQ2VsbHMpIHtcbiAgICB2YXIgcmVzdWx0ID0gW107XG4gICAgaWYgKCFhcmd1bWVudCkgcmV0dXJuIHJlc3VsdDtcbiAgICBpZiAoYXJndW1lbnQudHlwZSA9PT0gJ0RhdGFUYWJsZScpIHtcbiAgICAgIHZhciB0YWJsZSA9IHtcbiAgICAgICAgcm93czogYXJndW1lbnQucm93cy5tYXAoZnVuY3Rpb24gKHJvdykge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjZWxsczogcm93LmNlbGxzLm1hcChmdW5jdGlvbiAoY2VsbCkge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGxvY2F0aW9uOiBwaWNrbGVMb2NhdGlvbihjZWxsLmxvY2F0aW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AgICAgaWYgKHRocmV3KSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGZzLmNsb3NlU3luYyhmZClcbiAgICAgICAgICB9IGNhdGNoIChlcikge31cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBmcy5jbG9zZVN5bmMoZmQpXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiByZXRcbiAgICB9XG4gIH1cblxuICBmdW5jdGlvbiBwYXRjaEx1dGltZXMgKGZzKSB7XG4gICAgaWYgKGNvbnN0YW50cy5oYXNPd25Qcm9wZXJ0eShcIk9fU1lNTElOS1wiKSkge1xuICAgICAgZnMubHV0aW1lcyA9IGZ1bmN0aW9uIChwYXRoLCBhdCwgbXQsIGNiKSB7XG4gICAgICAgIGZzLm9wZW4ocGF0aCwgY29uc3RhbnRzLk9fU1lNTElOSywgZnVuY3Rpb24gKGVyLCBmZCkge1xuICAgICAgICAgIGlmIChlcikge1xuICAgICAgICAgICAgaWYgKGNiKSBjYihlcilcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cbiAgICAgICAgICBmcy5mdXRpbWVzKGZkLCBhdCwgbXQsIGZ1bmN0aW9uIChlcikge1xuICAgICAgICAgICAgZnMuY2xvc2UoZmQsIGZ1bmN0aW9uIChlcjIpIHtcbiAgICAgICAgICAgICAgaWYgKGNiKSBjYihlciB8fCBlcjIpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIGZzLmx1dGltZXNTeW5jID0gZnVuY3Rpb24gKHBhdGgsIGF0LCBtdCkge1xuICAgICAgICB2YXIgZmQgPSBmcy5vcGVuU3luYyhwYXRoLCBjb25zdGFudHMuT19TWU1MSU5LKVxuICAgICAgICB2YXIgcmV0XG4gICAgICAgIHZhciB0aHJldyA9IHRydWVcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXQgPSBmcy5mdXRpbWVzU3luYyhmZCwgYX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gICAgICAgICByZXN1bHQgPSBBcnJheShsZW5ndGgpLFxuICAgICAgICAgIHNraXAgPSBvYmplY3QgPT0gbnVsbDtcblxuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgcmVzdWx0W2luZGV4XSA9IHNraXAgPyB1bmRlZmluZWQgOiBnZXQob2JqZWN0LCBwYXRoc1tpbmRleF0pO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jbGFtcGAgd2hpY2ggZG9lc24ndCBjb2VyY2UgYXJndW1lbnRzLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtsb3dlcl0gVGhlIGxvd2VyIGJvdW5kLlxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSB1cHBlciBUaGUgdXBwZXIgYm91bmQuXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuXG4gICAgICovXG4gICAgZnVuY3Rpb24gYmFzZUNsYW1wKG51bWJlciwgbG93ZXIsIHVwcGVyKSB7XG4gICAgICBpZiAobnVtYmVyID09PSBudW1iZXIpIHtcbiAgICAgICAgaWYgKHVwcGVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBudW1iZXIgPSBudW1iZXIgPD0gdXBwZXIgPyBudW1iZXIgOiB1cHBlcjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobG93ZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIG51bWJlciA9IG51bWJlciA+PSBsb3dlciA/IG51bWJlciA6IGxvd2VyO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gbnVtYmVyO1x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gICAgID8gZGF0YVsxXSAhPT0gb2JqZWN0W2RhdGFbMF1dXG4gICAgICAgICAgICAgIDogIShkYXRhWzBdIGluIG9iamVjdClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgZGF0YSA9IG1hdGNoRGF0YVtpbmRleF07XG4gICAgICAgIHZhciBrZXkgPSBkYXRhWzBdLFxuICAgICAgICAgICAgb2JqVmFsdWUgPSBvYmplY3Rba2V5XSxcbiAgICAgICAgICAgIHNyY1ZhbHVlID0gZGF0YVsxXTtcblxuICAgICAgICBpZiAobm9DdXN0b21pemVyICYmIGRhdGFbMl0pIHtcbiAgICAgICAgICBpZiAob2JqVmFsdWUgPT09IHVuZGVmaW5lZCAmJiAhKGtleSBpbiBvYmplY3QpKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdGFjayA9IG5ldyBTdGFjaztcbiAgICAgICAgICBpZiAoY3VzdG9taXplcikge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGN1c3RvbWl6ZXIob2JqVmFsdWUsIHNyY1ZhbHVlLCBrZXksIG9iamVjdCwgc291cmNlLCBzdGFjayk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghKHJlc3VsdCA9PT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgPyBiYXNlSXNFcXVhbChzcmNWYWx1ZSwgb2JqVmFsdWUsIENPTVBBUkVfUEFSVElBTF9GTEFHIHwgQ09NUEFSRV9VTk9SREVSRURfRkxBRywgY3VzdG9taXplciwgc3RhY2spXG4gICAgICAgICAgICAgICAgOiByZXN1bHRcbiAgICAgICAgICAgICAgKSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbi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W5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlO1xuXG4gICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwO1xuICAgICAgICBpZiAoaXNDb21tb24gJiYgY29tcHV0ZWQgPT09IGNvbXB1dGVkKSB7XG4gICAgICAgICAgdmFyIHNlZW5JbmRleCA9IHNlZW4ubGVuZ3RoO1xuICAgICAgICAgIHdoaWxlIChzZWVuSW5kZXgtLSkge1xuICAgICAgICAgICAgaWYgKHNlZW5bc2VlbkluZGV4XSA9PT0gY29tcHV0ZWQpIHtcbiAgICAgICAgICAgICAgY29udGludWUgb3V0ZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChpdGVyYXRlZSkge1xuICAgICAgICAgICAgc2Vlbi5wdXNoKGNvbXB1dGVkKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKCFpbmNsdWRlcyhzZWVuLCBjb21wdXRlZCwgY29tcGFyYXRvcikpIHtcbiAgICAgICAgICBpZiAoc2VlbiAhPT0gcmVzdWx0KSB7XG4gICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8udW5zZXRgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZ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ZWF0ZVJvdW5kKG1ldGhvZE5hbWUpIHtcbiAgICAgIHZhciBmdW5jID0gTWF0aFttZXRob2ROYW1lXTtcbiAgICAgIHJldHVybiBmdW5jdGlvbihudW1iZXIsIHByZWNpc2lvbikge1xuICAgICAgICBudW1iZXIgPSB0b051bWJlcihudW1iZXIpO1xuICAgICAgICBwcmVjaXNpb24gPSBwcmVjaXNpb24gPT0gbnVsbCA/IDAgOiBuYXRpdmVNaW4odG9JbnRlZ2VyKHByZWNpc2lvbiksIDI5Mik7XG4gICAgICAgIGlmIChwcmVjaXNpb24gJiYgbmF0aXZlSXNGaW5pdGUobnVtYmVyKSkge1xuICAgICAgICAgIC8vIFNoaWZ0IHdpdGggZXhwb25lbnRpYWwgbm90YXRpb24gdG8gYXZvaWQgZmxvYXRpbmctcG9pbnQgaXNzdWVzLlxuICAgICAgICAgIC8vIFNlZSBbTUROXShodHRwczovL21kbi5pby9yb3VuZCNFeGFtcGxlcykgZm9yIG1vcmUgZGV0YWlscy5cbiAgICAgICAgICB2YXIgcGFpciA9ICh0b1N0cmluZyhudW1iZXIpICsgJ2UnKS5zcGxpdCgnZScpLFxuICAgICAgICAgICAgICB2YWx1ZSA9IGZ1bmMocGFpclswXSArICdlJyArICgrcGFpclsxXSArIHByZWNpc2lvbikpO1xuXG4gICAgICAgICAgcGFpciA9ICh0b1N0cmluZyh2YWx1ZSkgKyAnZScpLnNwbGl0KCdlJyk7XG4gICAgICAgICAgcmV0dXJuICsocGFpclswXSArICdlJyArICgrcGFpclsxXSAtIHByZWNpc2lvbikpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jKG51bWJlcik7XG4gICAgICB9O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBzZXQgb2JqZWN0IG9mIGB2YWx1ZXNgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge0FycmF5fSB2YWx1ZXMgVGhlIHZhbHVlcyB0byBhZGQ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2tlZCAmJiBzdGFjay5nZXQob3RoZXIpKSB7XG4gICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyO1xuICAgICAgfVxuICAgICAgdmFyIGluZGV4ID0gLTEsXG4gICAgICAgICAgcmVzdWx0ID0gdHJ1ZSxcbiAgICAgICAgICBzZWVuID0gKGJpdG1hc2sgJiBDT01QQVJFX1VOT1JERVJFRF9GTEFHKSA/IG5ldyBTZXRDYWNoZSA6IHVuZGVmaW5lZDtcblxuICAgICAgc3RhY2suc2V0KGFycmF5LCBvdGhlcik7XG4gICAgICBzdGFjay5zZXQob3RoZXIsIGFycmF5KTtcblxuICAgICAgLy8gSWdub3JlIG5vbi1pbmRleCBwcm9wZXJ0aWVzLlxuICAgICAgd2hpbGUgKCsraW5kZXggPCBhcnJMZW5ndGgpIHtcbiAgICAgICAgdmFyIGFyclZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltpbmRleF07XG5cbiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWxcbiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgYXJyVmFsdWUsIGluZGV4LCBvdGhlciwgYXJyYXksIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKGFyclZhbHVlLCBvdGhWYWx1ZSwgaW5kZXgsIGFycmF5LCBvdGhlciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb21wYXJlZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaWYgKGNvbXBhcmVkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICBpZiAoIWFycmF5U29tZShvdGhlciwgZnVuY3Rpb24ob3RoVmFsdWUsIG90aEluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiZcbiAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gc2Vlbi5wdXNoKG90aEluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKSB7XG4gICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICghKFxuICAgICAgICAgICAgICBhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHxcbiAgICAgICAgICAgICAgICBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaylcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgc3RhY2tbJ2RlbGV0ZSddKGFycmF5KTtcbiAgICAgIHN0YWNrWydkZWxldGUnXShvdGhlcik7XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEEgc3BlY2lhbGl6ZWQgdmVyc2lvbiBvZiBgYmFzZUlzRXF1YWxEZWVwYCBmb3IgY29tcGFyaW5nIG9iamVjdHMgb2ZcbiAgICAgKiB0aGUgc2FtZSBgdG9TdHJpb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mRleF07XG4gICAgICAgIGlmICghKGlzUGFydGlhbCA/IGtleSBpbiBvdGhlciA6IGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsIGtleSkpKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAvLyBBc3N1bWUgY3ljbGljIHZhbHVlcyBhcmUgZXF1YWwuXG4gICAgICB2YXIgc3RhY2tlZCA9IHN0YWNrLmdldChvYmplY3QpO1xuICAgICAgaWYgKHN0YWNrZWQgJiYgc3RhY2suZ2V0KG90aGVyKSkge1xuICAgICAgICByZXR1cm4gc3RhY2tlZCA9PSBvdGhlcjtcbiAgICAgIH1cbiAgICAgIHZhciByZXN1bHQgPSB0cnVlO1xuICAgICAgc3RhY2suc2V0KG9iamVjdCwgb3RoZXIpO1xuICAgICAgc3RhY2suc2V0KG90aGVyLCBvYmplY3QpO1xuXG4gICAgICB2YXIgc2tpcEN0b3IgPSBpc1BhcnRpYWw7XG4gICAgICB3aGlsZSAoKytpbmRleCA8IG9iakxlbmd0aCkge1xuICAgICAgICBrZXkgPSBvYmpQcm9wc1tpbmRleF07XG4gICAgICAgIHZhciBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltrZXldO1xuXG4gICAgICAgIGlmIChjdXN0b21pemVyKSB7XG4gICAgICAgICAgdmFyIGNvbXBhcmVkID0gaXNQYXJ0aWFsXG4gICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIG9ialZhbHVlLCBrZXksIG90aGVyLCBvYmplY3QsIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKG9ialZhbHVlLCBvdGhWYWx1ZSwga2V5LCBvYmplY3QsIG90aGVyLCBzdGFjayk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIH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5jYWxsKGZ1bmMpO1xuICAgICAgICB9IGNhdGNoIChlKSB7fVxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiAoZnVuYyArICcnKTtcbiAgICAgICAgfSBjYXRjaCAoZSkge31cbiAgICAgIH1cbiAgICAgIHJldHVybiAnJztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBVcGRhdGVzIHdyYXBwZXIgYGRldGFpbHNgIGJhc2VkIG9uIGBiaXRtYXNrYCBmbGFncy5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHJldHVybnMge0FycmF5fSBkZXRhaWxzIFRoZSBkZXRhaWxzIHRvIG1vZGlmeS5cbiAgICAgKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBmbGFncy4gU2VlIGBjcmVhdGVXcmFwYCBmb3IgbW9yZSBkZXRhaWxzLlxuICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgZGV0YWlsc2AuXG4gICAgICovXG4gICAgZnVuY3Rpb24gdXBkYXRlV3JhcERldGFpbHMoZGV0YWlscywgYml0bWFzaykge1xuICAgICAgYXJyYXlFYWNoKHdyYXBGbGFncywgZnVuY3Rpb24ocGFpcikge1xuICAgICAgICB2YXIgdmFsdWUgPSAnXy4nICsgcGFpclswXTtcbiAgICAgICAgaWYgKChiaXRtYXNrICYgcGFpclsxXSkgJiYgIWFycmF5SW5jbHVkZXMoZGV0YWlscywgdmFsdWUpKSB7XG4gICAgICAgICAgZGV0YWlscy5wdXNoKHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gZGV0YWlscy5zb3J0KCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhIGNsb25lIG9mIGB3cmFwcGVyYC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHtPYmplY3R9IHdyYXBwZXIgVGhlIHdyYXBwZXIgdG8gY2x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AoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07XG4gICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgIHJlc3VsdFtyZXNJbmRleCsrXSA9IHZhbHVlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBuZXcgYXJyYXkgY29uY2F0ZW5hdGluZyBgYXJyYXlgIHdpdGggYW55IGFkZGl0aW9uYWwgYXJyYXlzXG4gICAgICogYW5kL29yIHZhbHVlcy5cbiAgICAgKlxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAbWVtYmVyT2YgX1xuICAgICAqIEBzaW5jZSA0LjAuMFxuICAgICAqIEBjYXRlZ29yeSBBcnJheVxuICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBjb25jYXRlbmF0ZS5cbiAgICAgKiBAcGFyYW0gey4uLip9IFt2YWx1ZXNdIFRoZSB2YWx1ZXMgdG8gY29uY2F0ZW5hdGUuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgY29uY2F0ZW5hdGVkIGFycmF5LlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMV07XG4gICAgICogdmFyIG90aGVyID0gXy5jb25jYXQoYXJyYXksIDIsIFszXSwgW1s0XV0pO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2cob3RoZXIpO1xuICAgICAqIC8vID0+IFsxLCAyLCAzLCBbNF1dXG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7XG4gICAgICogLy8gPT4gWzFdXG4gICAgICovXG4gICAgZnVuY3Rpb24gY29uY2F0KCkge1xuICAgICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgICBpZiAoI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aW52b2tlZCBwZXIgaXRlcmF0aW9uLlxuICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIHJlbW92ZWQgZWxlbWVudHMuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIHZhciBhcnJheSA9IFsxLCAyLCAzLCA0XTtcbiAgICAgKiB2YXIgZXZlbnMgPSBfLnJlbW92ZShhcnJheSwgZnVuY3Rpb24obikge1xuICAgICAqICAgcmV0dXJuIG4gJSAyID09IDA7XG4gICAgICogfSk7XG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7XG4gICAgICogLy8gPT4gWzEsIDNdXG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhldmVucyk7XG4gICAgICogLy8gPT4gWzIsIDRdXG4gICAgICovXG4gICAgZnVuY3Rpb24gcmVtb3ZlKGFycmF5LCBwcmVkaWNhdGUpIHtcbiAgICAgIHZhciByZXN1bHQgPSBbXTtcbiAgICAgIGlmICghKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cbiAgICAgIHZhciBpbmRleCA9IC0xLFxuICAgICAgICAgIGluZGV4ZXMgPSBbXSxcbiAgICAgICAgICBsZW5ndGggPSBhcnJheS5sZW5ndGg7XG5cbiAgICAgIHByZWRpY2F0ZSA9IGdldEl0ZXJhdGVlKHByZWRpY2F0ZSwgMyk7XG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07XG4gICAgICAgIGlmIChwcmVkaWNhdGUodmFsdWUsIGluZGV4LCBhcnJheSkpIHtcbiAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgaW5kZXhlcy5wdXNoKGluZGV4KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgYmFzZVB1bGxB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X3ZhbHVlc19fID0gdW5kZWZpbmVkO1xuICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgcHJldmlvdXMuX193cmFwcGVkX18gPSBjbG9uZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXN1bHQgPSBjbG9uZTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgcHJldmlvdXMgPSBjbG9uZTtcbiAgICAgICAgcGFyZW50ID0gcGFyZW50Ll9fd3JhcHBlZF9fO1xuICAgICAgfVxuICAgICAgcHJldmlvdXMuX193cmFwcGVkX18gPSB2YWx1ZTtcbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgdGhlIHdyYXBwZXIgdmVyc2lvbiBvZiBgXy5yZXZlcnNlYC5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIHRoZSB3cmFwcGVkIGFycmF5LlxuICAgICAqXG4gICAgICogQG5hbWUgcmV2ZXJzZVxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDAuMS4wXG4gICAgICogQGNhdGVnb3J5IFNlcVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107XG4gICAgICpcbiAgICAgKiBfKGFycmF5KS5yZXZlcnNlKCkudmFsdWUoKVxuICAgICAqIC8vID0+IFszLCAyLCAxXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFszLCAyLCAxXVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHdyYXBwZXJSZXZlcnNlKCkge1xuICAgICAgdmFyIHZhbHVlID0gdGhpcy5fX3dyYXBwZWRfXztc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AgIH1cbiAgICAgICAgbGFzdEludm9rZVRpbWUgPSAwO1xuICAgICAgICBsYXN0QXJncyA9IGxhc3RDYWxsVGltZSA9IGxhc3RUaGlzID0gdGltZXJJZCA9IHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gZmx1c2goKSB7XG4gICAgICAgIHJldHVybiB0aW1lcklkID09PSB1bmRlZmluZWQgPyByZXN1bHQgOiB0cmFpbGluZ0VkZ2Uobm93KCkpO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBkZWJvdW5jZWQoKSB7XG4gICAgICAgIHZhciB0aW1lID0gbm93KCksXG4gICAgICAgICAgICBpc0ludm9raW5nID0gc2hvdWxkSW52b2tlKHRpbWUpO1xuXG4gICAgICAgIGxhc3RBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICBsYXN0VGhpcyA9IHRoaXM7XG4gICAgICAgIGxhc3RDYWxsVGltZSA9IHRpbWU7XG5cbiAgICAgICAgaWYgKGlzSW52b2tpbmcpIHtcbiAgICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG1heGluZykge1xuICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC5cbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTtcbiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk7XG4gICAgICAgICAgICByZXR1cm4gaW52b2tlRnVuYyhsYXN0Q2FsbFRpbWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdGltZXJJZCA9IHNldFRpbWVvdXQodGltZXJFeHB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ZhciBzb3VyY2UgPSBzb3VyY2VzW2luZGV4XTtcbiAgICAgICAgdmFyIHByb3BzID0ga2V5c0luKHNvdXJjZSk7XG4gICAgICAgIHZhciBwcm9wc0luZGV4ID0gLTE7XG4gICAgICAgIHZhciBwcm9wc0xlbmd0aCA9IHByb3BzLmxlbmd0aDtcblxuICAgICAgICB3aGlsZSAoKytwcm9wc0luZGV4IDwgcHJvcHNMZW5ndGgpIHtcbiAgICAgICAgICB2YXIga2V5ID0gcHJvcHNbcHJvcHNJbmRleF07XG4gICAgICAgICAgdmFyIHZhbHVlID0gb2JqZWN0W2tleV07XG5cbiAgICAgICAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCB8fFxuICAgICAgICAgICAgICAoZXEodmFsdWUsIG9iamVjdFByb3RvW2tleV0pICYmICFoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwga2V5KSkpIHtcbiAgICAgICAgICAgIG9iamVjdFtrZXldID0gc291cmNlW2tleV07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfSk7XG5cbiAgICAvKipcbiAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLmRlZmF1bHRzYCBleGNlcHQgdGhhdCBpdCByZWN1cnNpdmVseSBhc3NpZ25zXG4gICAgICogZGVmYXVsdCBwcm9wZXJ0aWVzLlxuICAgICAqXG4gICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgYG9iamVjdGAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMy4xMC4wXG4gICAgICogQGNhdGVnb3J5IE9iamVjdFxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIGRlc3RpbmF0aW9uIG9iamVjdC5cbiAgICAgKiBAcGFyYW0gey4uLk9iamVjdH0gW3NvdXJjZXNdIFRoZSB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9lY21hLTI2Mi83LjAvI3NlYy1vYmplY3Qua2V5cylcbiAgICAgKiBmb3IgbW9yZSBkZXRhaWxzLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBzaW5jZSAwLjEuMFxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQGNhdGVnb3J5IE9iamVjdFxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBGb28oKSB7XG4gICAgICogICB0aGlzLmEgPSAxO1xuICAgICAqICAgdGhpcy5iID0gMjtcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBGb28ucHJvdG90eXBlLmMgPSAzO1xuICAgICAqXG4gICAgICogXy5rZXlzKG5ldyBGb28pO1xuICAgICAqIC8vID0+IFsnYScsICdiJ10gKGl0ZXJhdGlvbiBvcmRlciBpcyBub3QgZ3VhcmFudGVlZClcbiAgICAgKlxuICAgICAqIF8ua2V5cygnaGknKTtcbiAgICAgKiAvLyA9PiBbJzAnLCAnMSddXG4gICAgICovXG4gICAgZnVuY3Rpb24ga2V5cyhvYmplY3QpIHtcbiAgICAgIHJldHVybiBpc0FycmF5TGlrZShvYmplY3QpID8gYXJyYXlMaWtlS2V5cyhvYmplY3QpIDogYmFzZUtleXMob2JqZWN0KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIGFuIGFycmF5IG9mIHRoZSBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHByb3BlcnR5IG5hbWVzIG9mIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogKipOb3RlOioqIE5vbi1vYmplY3QgdmFsdWVzIGFyZSBjb2VyY2VkIHRvIG9iamVjdHMuXG4gIC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0eS5cbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgb2JqZWN0LlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IDEsICdiJzogJzInLCAnYyc6IDMgfTtcbiAgICAgKlxuICAgICAqIF8ub21pdEJ5KG9iamVjdCwgXy5pc051bWJlcik7XG4gICAgICogLy8gPT4geyAnYic6ICcyJyB9XG4gICAgICovXG4gICAgZnVuY3Rpb24gb21pdEJ5KG9iamVjdCwgcHJlZGljYXRlKSB7XG4gICAgICByZXR1cm4gcGlja0J5KG9iamVjdCwgbmVnYXRlKGdldEl0ZXJhdGVlKHByZWRpY2F0ZSkpKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIGFuIG9iamVjdCBjb21wb3NlZCBvZiB0aGUgcGlja2VkIGBvYmplY3RgIHByb3BlcnRpZXMuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHNpbmNlIDAuMS4wXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0XG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgc291cmNlIG9iamVjdC5cbiAgICAgKiBAcGFyYW0gey4uLihzdHJpbmd8c3RyaW5nW10pfSBbcGF0aHNdIFRoZSBwcm9wZXJ0eSBwYXRocyB0byBwaWNrLlxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAnMicsICdjJzogMyB9O1xuICAgICAqXG4gICAgICogXy5waWNrKG9iamVjdCwgWydhJywgJ2MnXSk7XG4gICAgICogLy8gPT4geyAnYSc6IDEsICdjJzogMyB9XG4gICAgICovXG4gICAgdmFyIHBpY2sgPSB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gICAgIGlmICghdmFyaWFibGUpIHtcbiAgICAgICAgc291cmNlID0gJ3dpdGggKG9iaikge1xcbicgKyBzb3VyY2UgKyAnXFxufVxcbic7XG4gICAgICB9XG4gICAgICAvLyBDbGVhbnVwIGNvZGUgYnkgc3RyaXBwaW5nIGVtcHR5IHN0cmluZ3MuXG4gICAgICBzb3VyY2UgPSAoaXNFdmFsdWF0aW5nID8gc291cmNlLnJlcGxhY2UocmVFbXB0eVN0cmluZ0xlYWRpbmcsICcnKSA6IHNvdXJjZSlcbiAgICAgICAgLnJlcGxhY2UocmVFbXB0eVN0cmluZ01pZGRsZSwgJyQxJylcbiAgICAgICAgLnJlcGxhY2UocmVFbXB0eVN0cmluZ1RyYWlsaW5nLCAnJDE7Jyk7XG5cbiAgICAgIC8vIEZyYW1lIGNvZGUgYXMgdGhlIGZ1bmN0aW9uIGJvZHkuXG4gICAgICBzb3VyY2UgPSAnZnVuY3Rpb24oJyArICh2YXJpYWJsZSB8fCAnb2JqJykgKyAnKSB7XFxuJyArXG4gICAgICAgICh2YXJpYWJsZVxuICAgICAgICAgID8gJydcbiAgICAgICAgICA6ICdvYmogfHwgKG9iaiA9IHt9KTtcXG4nXG4gICAgICAgICkgK1xuICAgICAgICBcInZhciBfX3QsIF9fcCA9ICcnXCIgK1xuICAgICAgICAoaXNFc2NhcGluZ1xuICAgICAgICAgICA/ICcsIF9fZSA9IF8uZXNjYXBlJ1xuICAgICAgICAgICA6ICcnXG4gICAgICAgICkgK1xuICAgICAgICAoaXNFdmFsdWF0aW5nXG4gICAgICAgICAgPyAnLCBfX2ogPSBBcnJheS5wcm90b3R5cGUuam9pbjtcXG4nICtcbiAgICAgICAgICAgIFwiZnVuY3Rpb24gcHJpbnQoKSB7IF9fcCArPSBfX2ouY2FsbChhcmd1bWVudHMsICcnKSB9XFxuXCJcbiAgICAgICAgICA6ICc7XFxuJ1xuICAgICAgICApICtcbiAgICAgICAgc291cmNlICtcbiAgICAgICAgJ3JldHVybiBfX3BcXG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ob2QuXG4gICAgICpcbiAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgZG9lc24ndCBzZXQgdGhlIFwibGVuZ3RoXCIgcHJvcGVydHkgb2YgYm91bmQgZnVuY3Rpb25zLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBzaW5jZSAwLjEuMFxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQGNhdGVnb3J5IFV0aWxcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gYmluZCBhbmQgYXNzaWduIHRoZSBib3VuZCBtZXRob2RzIHRvLlxuICAgICAqIEBwYXJhbSB7Li4uKHN0cmluZ3xzdHJpbmdbXSl9IG1ldGhvZE5hbWVzIFRoZSBvYmplY3QgbWV0aG9kIG5hbWVzIHRvIGJpbmQuXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIHZpZXcgPSB7XG4gICAgICogICAnbGFiZWwnOiAnZG9jcycsXG4gICAgICogICAnY2xpY2snOiBmdW5jdGlvbigpIHtcbiAgICAgKiAgICAgY29uc29sZS5sb2coJ2NsaWNrZWQgJyArIHRoaXMubGFiZWwpO1xuICAgICAqICAgfVxuICAgICAqIH07XG4gICAgICpcbiAgICAgKiBfLmJpbmRBbGwodmlldywgWydjbGljayddKTtcbiAgICAgKiBqUXVlcnkoZWxlbWVudCkub24oJ2NsaWNrJywgdmlldy5jbGljayk7XG4gICAgICogLy8gPT4gTG9ncyAnY2xpY2tlZCBkb2NzJyB3aGVuIGNsaWNrZWQuXG4gICAgICovXG4gICAgdmFyIGJpbmRBbGwgPSBmbGF0UmVzdChmdW5jdGlvbihvYmplY3QsIG1ldGhvZE5hbWVzKSB7XG4gICAgICBhcnJheUVhY2gobWV0aG9kTmFtZXMsIGZ1bmN0aW9uKGtleSkge1xuICAgICAgICBrZXkgPSB0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SwgW11dXG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhhcnJheXNbMF0gPT09IGFycmF5c1sxXSk7XG4gICAgICogLy8gPT4gZmFsc2VcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzdHViQXJyYXkoKSB7XG4gICAgICByZXR1cm4gW107XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgcmV0dXJucyBgZmFsc2VgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMTMuMFxuICAgICAqIEBjYXRlZ29yeSBVdGlsXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYGZhbHNlYC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy50aW1lcygyLCBfLnN0dWJGYWxzZSk7XG4gICAgICogLy8gPT4gW2ZhbHNlLCBmYWxzZV1cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzdHViRmFsc2UoKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgcmV0dXJucyBhIG5ldyBlbXB0eSBvYmplY3QuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgNC4xMy4wXG4gICAgICogQGNhdGVnb3J5IFV0aWxcbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgZW1wdHkgb2JqZWN0LlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgb2JqZWN0cyA9IF8udGltZXMoMiwgXy5zdHViT2JqZWN0KTtcbiAgICAgKlxuICAgICAqIGNvbnNvbGUubG9nKG9iamVjdHMpO1xuICAgICAqIC8vID0+IFt7fSwge31dXG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzWz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4gNFxuICAgICAqXG4gICAgICogXy5mbG9vcigwLjA0NiwgMik7XG4gICAgICogLy8gPT4gMC4wNFxuICAgICAqXG4gICAgICogXy5mbG9vcig0MDYwLCAtMik7XG4gICAgICogLy8gPT4gNDAwMFxuICAgICAqL1xuICAgIHZhciBmbG9vciA9IGNyZWF0ZVJvdW5kKCdmbG9vcicpO1xuXG4gICAgLyoqXG4gICAgICogQ29tcHV0ZXMgdGhlIG1heGltdW0gdmFsdWUgb2YgYGFycmF5YC4gSWYgYGFycmF5YCBpcyBlbXB0eSBvciBmYWxzZXksXG4gICAgICogYHVuZGVmaW5lZGAgaXMgcmV0dXJuZWQuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHNpbmNlIDAuMS4wXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAY2F0ZWdvcnkgTWF0aFxuICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuXG4gICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIG1heGltdW0gdmFsdWUuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIF8ubWF4KFs0LCAyLCA4LCA2XSk7XG4gICAgICogLy8gPT4gOFxuICAgICAqXG4gICAgICogXy5tYXgoW10pO1xuICAgICAqIC8vID0+IHVuZGVmaW5lZFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIG1heChhcnJheSkge1xuICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGgpXG4gICAgICAgID8gYmFzZUV4dHJlbXVtKGFycmF5LCBpZGVudGl0eSwgYmFzZUd0KVxuICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLm1heGAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgaXRlcmF0ZWVgIHdoaWNoIGlzXG4gICAgICogaW52b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iAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG5cbiAgICAgICAgcGF0dGVybkxpc3RTdGFjay5wdXNoKHtcbiAgICAgICAgICB0eXBlOiBzdGF0ZUNoYXIsXG4gICAgICAgICAgc3RhcnQ6IGkgLSAxLFxuICAgICAgICAgIHJlU3RhcnQ6IHJlLmxlbmd0aCxcbiAgICAgICAgICBvcGVuOiBwbFR5cGVzW3N0YXRlQ2hhcl0ub3BlbixcbiAgICAgICAgICBjbG9zZTogcGxUeXBlc1tzdGF0ZUNoYXJdLmNsb3NlXG4gICAgICAgIH0pXG4gICAgICAgIC8vIG5lZ2F0aW9uIGlzICg/Oig/IWpzKVteL10qKVxuICAgICAgICByZSArPSBzdGF0ZUNoYXIgPT09ICchJyA/ICcoPzooPyEoPzonIDogJyg/OidcbiAgICAgICAgdGhpcy5kZWJ1ZygncGxUeXBlICVqICVqJywgc3RhdGVDaGFyLCByZSlcbiAgICAgICAgc3RhdGVDaGFyID0gZmFsc2VcbiAgICAgIGNvbnRpbnVlXG5cbiAgICAgIGNhc2UgJyknOlxuICAgICAgICBpZiAoaW5DbGFzcyB8fCAhcGF0dGVybkxpc3RTdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICByZSArPSAnXFxcXCknXG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuXG4gICAgICAgIGNsZWFyU3RhdGVDaGFyKClcbiAgICAgICAgaGFzTWFnaWMgPSB0cnVlXG4gICAgICAgIHZhciBwbCA9IHBhdHRlcm5MaXN0U3RhY2sucG9wKClcbiAgICAgICAgLy8gbmVnYXRpb24gaXMgKD86KD8hanMpW14vXSopXG4gICAgICAgIC8vIFRoZSBvdGhlcnMgYXJlICg/OjxwYXR0ZXJuPik8dHlwZT5cbiAgICAgICAgcmUgKz0gcGwuY2xvc2VcbiAgICAgICAgaWYgKHBsLnR5cGUgPT09ICchJykge1xuICAgICAgICAgIG5lZ2F0aXZlTGlzdHMucHVzaChwbClcbiAgICAgICAgfVxuICAgIC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dGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0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yBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9XG5cbiAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2gobWV0aG9kLCBkZWxlZ2F0ZS5pdGVyYXRvciwgY29udGV4dC5hcmcpO1xuXG4gICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgY29udGV4dC5kZWxlZ2F0ZSA9IG51bGw7XG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbi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24uXG4gICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2KSB7XG4gICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4g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AgICAgIGZ1bmN0aW9uIChlcnIsIHJlYWxTdGFydCkge1xuICAgICAgICAgICAgaWYgKGVycikgY2IoZXJyKTtcbiAgICAgICAgICAgIGVsc2UgaW5pdChyZWFsU3RhcnQpO1xuICAgICAgICB9XG4gICAgKTtcblxuICAgIHZhciByZXM7XG4gICAgZnVuY3Rpb24gaW5pdChiYXNlZGlyKSB7XG4gICAgICAgIGlmICgoL14oPzpcXC5cXC4/KD86XFwvfCQpfFxcL3woW0EtWmEtel06KT9bL1xcXFxdKS8pLnRlc3QoeCkpIHtcbiAgICAgICAgICAgIHJlcyA9IHBhdGgucmVzb2x2ZShiYXNlZGlyLCB4KTtcbiAgICAgICAgICAgIGlmICh4ID09PSAnLi4nIHx8IHguc2xpY2UoLTEpID09PSAnLycpIHJlcyArPSAnLyc7XG4gICAgICAgICAgICBpZiAoKC9cXC8kLykudGVzdCh4KSAmJiByZXMgPT09IGJhc2VkaXIpIHtcbiAgICAgICAgICAgICAgICBsb2FkQXNEaXJlY3RvcnkocmVzLCBvcHRzLnBhY2thZ2UsIG9uZmlsZSk7XG4gICAgICAgICAgICB9IGVsc2UgbG9hZEFzRmlsZShyZXMsIG9wdHMucGFja2FnZSwgb25maWxlKTtcbiAgICAgICAgfSBlbHNlIGxvYWROb2RlTW9kdWxlcyh4LCBiYXNlZGlyLCBmdW5jdGlvbiAoZXJyLCBuLCBwa2cpIHtcbiAgICAgICAgICAgIGlmIChlcnIpIGNiKGVycik7XG4gICAgICAgICAgICBlbHNlIGlmIChjb3JlW3hdKSByZXR1cm4gY2IobnVsbCwgeCk7XG4gICAgICAgICAgICBlbHNlIGlmIChuKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1heWJlVW53cmFwU3ltbGluayhuLCBvcHRzLCBmdW5jdGlvbiAoZXJyLCByZWFsTikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYihlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IobnVsbCwgcmVhbE4sIHBrZyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG1vZHVsZUVycm9yID0gbmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIiArIHggKyBcIicgZnJvbSAnXCIgKyBwYXJlbnQgKyBcIidcIik7XG4gICAgICAgICAgICAgICAgbW9kdWxlRXJyb3IuY29kZSA9ICdNT0RVTEVfTk9UX0ZPVU5EJztcbiAgICAgICAgICAgICAgICBjYihtb2R1bGVFcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIG9uZmlsZShlcnIsIG0sIHBrZykge1xuICAgICAgICBpZiAoZXJyKSBjYihlcnIpO1xuICAgICAgICBlbHNlIGlmIChtKSBjYihudWxsLCBtLCBwa2cpO1xuICAgICAgICBlbHNlIGxvYWRBc0RpcmVjdG9yeShyZXMsIGZ1bmN0aW9uIChlcnIsIGQsIHBrZykge1xuICAgICAgICAgICAgaWYgKGVycikgY2IoZXJyKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKGQpIHtcbiAgICAgICAgICAgICAgICBtYXliZVVud3JhcFN5bWxpbmsoZCwgb3B0cywgZnVuY3Rpb24gKGVyciwgcmVhbEQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IoZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNiKG51bGwsIHJlYWxELCBwa2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciB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Rwa2cocGF0aC5kaXJuYW1lKGZpbGUpLCBvbnBrZyk7XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIG9ucGtnKGVyciwgcGtnXywgZGlyKSB7XG4gICAgICAgICAgICAgICAgcGtnID0gcGtnXztcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgICAgICBpZiAoZGlyICYmIHBrZyAmJiBvcHRzLnBhdGhGaWx0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJmaWxlID0gcGF0aC5yZWxhdGl2ZShkaXIsIGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmVsID0gcmZpbGUuc2xpY2UoMCwgcmZpbGUubGVuZ3RoIC0gZXh0c1swXS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgciA9IG9wdHMucGF0aEZpbHRlcihwa2csIHgsIHJlbCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyKSByZXR1cm4gbG9hZChcbiAgICAgICAgICAgICAgICAgICAgICAgIFsnJ10uY29uY2F0KGV4dGVuc2lvbnMuc2xpY2UoKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoLnJlc29sdmUoZGlyLCByKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBrZ1xuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpc0ZpbGUoZmlsZSwgb25leCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBvbmV4KGVyciwgZXgpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgICAgICBpZiAoZXgpIHJldHVybiBjYihudWxsLCBmaWxlLCBwa2cpO1xuICAgICAgICAgICAgICAgIGxvYWQoZXh0cy5zbGljZSgxKSwgeCwgcGtnKTtcbiAgICAgICAgICAgIH1cbiAgICA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O1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsb2FkQXNEaXJlY3RvcnkoeCwgbG9hZEFzRGlyZWN0b3J5UGFja2FnZSwgY2FsbGJhY2spIHtcbiAgICAgICAgdmFyIGNiID0gY2FsbGJhY2s7XG4gICAgICAgIHZhciBmcGtnID0gbG9hZEFzRGlyZWN0b3J5UGFja2FnZTtcbiAgICAgICAgaWYgKHR5cGVvZiBmcGtnID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBjYiA9IGZwa2c7XG4gICAgICAgICAgICBmcGtnID0gb3B0cy5wYWNrYWdlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBrZ2ZpbGUgPSBwYXRoLmpvaW4oeCwgJ3BhY2thZ2UuanNvbicpO1xuICAgICAgICBpc0ZpbGUocGtnZmlsZSwgZnVuY3Rpb24gKGVyciwgZXgpIHtcbiAgICAgICAgICAgIGlmIChlcnIpIHJldHVybiBjYihlcnIpO1xuICAgICAgICAgICAgaWYgKCFleCkgcmV0dXJuIGxvYWRBc0ZpbGUocGF0aC5qb2luKHgsICdpbmRleCcpLCBmcGtnLCBjYik7XG5cbiAgICAgICAgICAgIHJlYWRGaWxlKHBrZ2ZpbGUsIGZ1bmN0aW9uIChlcnIsIGJvZHkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcGtnID0gSlNPTi5wYXJzZShib2R5KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChqc29uRXJyKSB7fVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wdHMucGFja2FnZUZpbHRlcikge1xuICAgICAgICAgICAgICAgICAgICBwa2cgPSBvcHRzLnBhY2thZ2VGaWx0ZXIocGtnLCBwa2dmaWxlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocGtnLm1haW4pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwa2cubWFpbiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYWluRXJyb3IgPSBuZXcgVHlwZUVycm9yKCdwYWNrYWdlIOKAnCcgKyBwa2cubmFtZSArICfigJ0gYG1haW5gIG11c3QgYmUgYSBzdHJpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1haW5FcnJvci5jb2RlID0gJ0lOVkFMSURfUEFDS0FHRV9NQUlOJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYihtYWluRXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChwa2cubWFpbiA9PT0gJy4nIHx8IHBrZy5tYWluID09PSAnLi8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwa2cubWFpbiA9ICdpbmRleCc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbG9hZEFzRmlsZShwYXRoLnJlc29sdmUoeCwgcGtnLm1haW4pLCBwa2csIGZ1bmN0aW9uIChlcnIsIG0sIHBrZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycikgcmV0dXJuIGNiKGVycik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobSkgcmV0dXJuIGNiKG51bGwsIG0sIHBrZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXBrZykgcmV0dXJuIGxvYWRBc0ZpbGUocGF0aC5qb2luKHgsICdpbmRleCcpLCBwa2csIGNiKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRpciA9IHBhdGgucmVzb2x2ZSh4LCBwa2cubWFpbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2FkQXNEaXJlY3RvcnkoZGlyLCBwa2csIGZ1bmN0aW9uIChlcnIsIG4sIHBrZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHJldHVybiBjYihlcnIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuKSByZXR1cm4gY2IobnVsbCwgbiwgcGtnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkQXNGaWxlKHBhdGguam9pbih4LCAnaW5kZXgnKSwgcGtnLCBjYik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBsb2FkQXNGaWxlKHBhdGguam9pbih4LCAnL2luZGV4JyksIHBrZywgY2IpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHByb2Nlc3NEaXJzKGNiLCBkaXJzKSB7XG4gICAgICAgIGlmIChkaXJzLmxlbmd0aCA9PT0gMCkgcmV0dXJuIGNiKG51bGwsIHVuZGVmaW5lZCk7XG4gICAgICAgIHZhciBkaXIgPSBkaXJzWzBdO1xuXG4gICAgICAgIGlzRGlyZWN0b3J5KGRpciwgaXNkaXIpO1xuXG4gICAgICAgIGZ1bmN0aW9uIGlzZGlyKGVyciwgaXNkaXIpIHtcbiAgICAgICAgICAgIGlmIChlcnIpIHJldHVybiBjYihlcnIpO1xuICAgICAgICAgICAgaWYgKCFpc2RpcikgcmV0dXJuIHByb2Nlc3NEaXJzKGNiLCBkaXJzLnNsaWNlKDEpKTtcbiAgICAgICAgICAgIHZhciBmaWxlID0gcGF0aC5qb2luKGRpciwgeCk7XG4gICAgICAgICAgICBsb2FkQXNGaWxlKGZpbGUsIG9wdHMucGFja2FnZSwgb25maWxlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG9uZmlsZShlcnIsIG0sIHBrZykge1xuICAgICAgICAgICAgaWYgKGVycikgcmV0dXJuIGNiKG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iAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGxvYWRwa2coZGlyKSB7XG4gICAgICAgIGlmIChkaXIgPT09ICcnIHx8IGRpciA9PT0gJy8nKSByZXR1cm47XG4gICAgICAgIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSAnd2luMzInICYmICgvXlxcdzpbL1xcXFxdKiQvKS50ZXN0KGRpcikpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoKC9bL1xcXFxdbm9kZV9tb2R1bGVzWy9cXFxcXSokLykudGVzdChkaXIpKSByZXR1cm47XG5cbiAgICAgICAgdmFyIHBrZ2ZpbGUgPSBwYXRoLmpvaW4oZGlyLCAncGFja2FnZS5qc29uJyk7XG5cbiAgICAgICAgaWYgKCFpc0ZpbGUocGtnZmlsZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBsb2FkcGtnKHBhdGguZGlybmFtZShkaXIpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBib2R5ID0gcmVhZEZpbGVTeW5jKHBrZ2ZpbGUpO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB2YXIgcGtnID0gSlNPTi5wYXJzZShib2R5KTtcbiAgICAgICAgfSBjYXRjaCAoanNvbkVycikge31cblxuICAgICAgICBpZiAocGtnICYmIG9wdHMucGFja2FnZUZpbHRlcikge1xuICAgICAgICAgICAgcGtnID0gb3B0cy5wYWNrYWdlRmlsdGVyKHBrZywgZGlyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7IHBrZzogcGtnLCBkaXI6IGRpciB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGxvYWRBc0RpcmVjdG9yeVN5bmMoeCkge1xuICAgICAgICB2YXIgcGtnZmlsZSA9IHBhdGguam9pbih4LCAnL3BhY2thZ2UuanNvbicpO1xuICAgICAgICBpZiAoaXNGaWxlKHBrZ2ZpbGUpKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciBib2R5ID0gcmVhZEZpbGVTeW5jKHBrZ2ZpbGUsICdVVEY4Jyk7XG4gICAgICAgICAgICAgICAgdmFyIHBrZyA9IEpTT04ucGFyc2UoYm9keSk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxuXG4gICAgICAgICAgICBpZiAob3B0cy5wYWNrYWdlRmlsdGVyKSB7XG4gICAgICAgICAgICAgICAgcGtnID0gb3B0cy5wYWNrYWdlRmlsdGVyKHBrZywgeCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwa2cubWFpbikge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGtnLm1haW4gIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYWluRXJyb3IgPSBuZXcgVHlwZUVycm9yKCdwYWNrYWdlIOKAnCcgKyBwa2cubmFtZSArICfigJ0gYG1haW5gIG11c3QgYmUgYSBzdHJpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgbWFpbkVycm9yLmNvZGUgPSAnSU5WQUxJRF9QQUNLQUdFX01BSU4nO1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBtYWluRXJyb3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChwa2cubWFpbiA9PT0gJy4nIHx8IHBrZy5tYWluID09PSAnLi8nKSB7XG4gICAgICAgICAgICAgICAgICAgIHBrZy5tYWluID0gJ2luZGV4JztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG0gPSBsb2FkQXNGaWxlU3luYyhwYXRoLnJlc29sdmUoeCwgcGtnLm1haW4pKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG0pIHJldHVybiBtO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbiA9IGxvYWRBc0RpcmVjdG9yeVN5bmMocGF0aC5yZXNvbHZlK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AgICAgICAgICAgICAgICAgICAvLyAgIGFuZCBubyAnZXh0cmEgbGFzdCBieXRlJy5cclxuICAgIHdoaWxlIChuIDwgc2lnbmlmaWNhbmNlKSB7ICAgICAgICAgIC8vIEZpbGwgdXAgYWxsIHNpZ25pZmljYW50IGRpZ2l0cyBieVxyXG4gICAgICBuID0gKG4gKyB4KSAqIHdpZHRoOyAgICAgICAgICAgICAgLy8gICBzaGlmdGluZyBudW1lcmF0b3IgYW5kXHJcbiAgICAgIGQgKj0gd2lkdGg7ICAgICAgICAgICAgICAgICAgICAgICAvLyAgIGRlbm9taW5hdG9yIGFuZCBnZW5lcmF0aW5nIGFcclxuICAgICAgeCA9IGFyYzQuZygxKTsgICAgICAgICAgICAgICAgICAgIC8vICAgbmV3IGxlYXN0LXNpZ25pZmljYW50LWJ5dGUuXHJcbiAgICB9XHJcbiAgICB3aGlsZSAobiA+PSBvdmVyZmxvdykgeyAgICAgICAgICAgICAvLyBUbyBhdm9pZCByb3VuZGluZyB1cCwgYmVmb3JlIGFkZGluZ1xyXG4gICAgICBuIC89IDI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICBsYXN0IGJ5dGUsIHNoaWZ0IGV2ZXJ5dGhpbmdcclxuICAgICAgZCAvPSAyOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgcmlnaHQgdXNpbmcgaW50ZWdlciBNYXRoIHVudGlsXHJcbiAgICAgIHggPj4+PSAxOyAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgIHdlIGhhdmUgZXhhY3RseSB0aGUgZGVzaXJlZCBiaXRzLlxyXG4gICAgfVxyXG4gICAgcmV0dXJuIChuICsgeCkgLyBkOyAgICAgICAgICAgICAgICAgLy8gRm9ybSB0aGUgbnVtYmVyIHdpdGhpbiBbMCwgMSkuXHJcbiAgfTtcclxufTtcclxuXHJcbm1vZHVsZS5leHBvcnRzLnJlc2V0R2xvYmFsID0gZnVuY3Rpb24gKCkge1xyXG4gIE1hdGgucmFuZG9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V0gPSBjdXJyWydhcmd1bWVudHMnXVtpXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKC9mdW5jdGlvbig/OlxccysoW1xcdyRdKykpK1xccypcXCgvLnRlc3QoY3Vyci50b1N0cmluZygpKSkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5wdXNoKG5ldyBTdGFja0ZyYW1lKHtmdW5jdGlvbk5hbWU6IFJlZ0V4cC4kMSB8fCB1bmRlZmluZWQsIGFyZ3M6IGFyZ3N9KSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sucHVzaChuZXcgU3RhY2tGcmFtZSh7YXJnczogYXJnc30pKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjdXJyID0gY3Vyci5jYWxsZXI7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhY2s7XG4gICAgICAgIH1cbiAgICB9O1xufSkpO1xuIiwiKGZ1bmN0aW9uKHJvb3QsIGZhY3RvcnkpIHtcbiAgICAndXNlIHN0cmljdCc7XG4gICAgLy8gVW5pdmVyc2FsIE1vZHVsZSBEZWZpbml0aW9uIChVTUQpIHRvIHN1cHBvcnQgQU1ELCBDb21tb25KUy9Ob2RlLmpzLCBSaGlubywgYW5kIGJyb3dzZXJzLlxuXG4gICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICBpZiAodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKSB7XG4gICAgICAgIGRlZmluZSgnc3RhY2tmcmFtZScsIFtdLCBmYWN0b3J5KTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBleHBvc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9iamVjdCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChvYmouaGFzT3duUHJvcGVydHkocHJvcHNbaV0pICYmIG9ialtwcm9wc1tpXV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzWydzZXQnICsgX2NhcGl0YWxpemUocHJvcHNbaV0pXShvYmpbcHJvcHNbaV1dKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBTdGFja0ZyYW1lLnByb3RvdHlwZSA9IHtcbiAgICAgICAgZ2V0QXJnczogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hcmdzO1xuICAgICAgICB9LFxuICAgICAgICBzZXRBcmdzOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKHYpICE9PSAnW29iamVjdCBBcnJheV0nKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJncyBtdXN0IGJlIGFuIEFycmF5Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmFyZ3MgPSB2O1xuICAgICAgICB9LFxuXG4gICAgICAgIGdldEV2YWxPcmlnaW46IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZXZhbE9yaWdpbjtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0RXZhbE9yaWdpbjogZnVuY3Rpb24odikge1xuICAgICAgICAgICAgaWYgKHYgaW5zdGFuY2VvZiBTdGFja0ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5ldmFsT3JpZ2luID0gdjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodiBpbnN0YW5jZW9mIE9iamVjdCkge1xuICAg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J2dldCcgKyBfY2FwaXRhbGl6ZShib29sZWFuUHJvcHNbaV0pXSA9IF9nZXR0ZXIoYm9vbGVhblByb3BzW2ldKTtcbiAgICAgICAgU3RhY2tGcmFtZS5wcm90b3R5cGVbJ3NldCcgKyBfY2FwaXRhbGl6ZShib29sZWFuUHJvcHNbaV0pXSA9IChmdW5jdGlvbihwKSB7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odikge1xuICAgICAgICAgICAgICAgIHRoaXNbcF0gPSBCb29sZWFuKHYpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfSkoYm9vbGVhblByb3BzW2ldKTtcbiAgICB9XG5cbiAgICBmb3IgKHZhciBqID0gMDsgaiA8IG51bWVyaWNQcm9wcy5sZW5ndGg7IGorKykge1xuICAgICAgICBTdGFja0ZyYW1lLnByb3RvdHlwZVsnZ2V0JyArIF9jYXBpdGFsaXplKG51bWVyaWNQcm9wc1tqXSldID0gX2dldHRlcihudW1lcmljUHJvcHNbal0pO1xuICAgICAgICBTdGFja0ZyYW1lLnByb3RvdHlwZVsnc2V0JyArIF9jYXBpdGFsaXplKG51bWVyaWNQcm9wc1tqXSldID0gKGZ1bmN0aW9uKHApIHtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFfaXNOdW1iZXIodikpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihwICsgJyBtdXN0IGJlIGEgTnVtYmVyJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXNbcF0gPSBOdW1iZXIodik7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KShudW1lcmljUHJvcHNbal0pO1xuICAgIH1cblxuICAgIGZvciAodmFyIGsgPSAwOyBrIDwgc3RyaW5nUHJvcHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgU3RhY2tGcmFtZS5wcm90b3R5cGVbJ2dldCcgKyB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VJvb3QgIT0gbnVsbCkge1xuICAgICAgbmVlZGxlLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5zb3VyY2VSb290LCBuZWVkbGUuc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhuZWVkbGUuc291cmNlKSkge1xuICAgICAgcmV0dXJuIFtdO1xuICAgIH1cbiAgICBuZWVkbGUuc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKG5lZWRsZS5zb3VyY2UpO1xuXG4gICAgdmFyIG1hcHBpbmdzID0gW107XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhuZWVkbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsTGluZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib3JpZ2luYWxDb2x1bW5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmFyeVNlYXJjaC5MRUFTVF9VUFBFUl9CT1VORCk7XG4gICAgaWYgKGluZGV4ID49IDApIHtcbiAgICAgIHZhciBtYXBwaW5nID0gdGhpcy5fb3JpZ2luYWxNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChhQXJncy5jb2x1bW4gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICB2YXIgb3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG5cbiAgICAgICAgLy8gSXRlcmF0ZSB1bnRpbCBlaXRoZXIgd2UgcnVuIG91dCBvZiBtYXBwaW5ncywgb3Igd2UgcnVuIGludG9cbiAgICAgICAgLy8gYSBtYXBw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Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICB2YXIgcmVxID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7XG4gICAgICAgICAgICByZXEub3BlbignZ2V0JywgdXJsKTtcbiAgICAgICAgICAgIHJlcS5vbmVycm9yID0gcmVqZWN0O1xuICAgICAgICAgICAgcmVxLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IGZ1bmN0aW9uIG9ucmVhZHlzdGF0ZWNoYW5nZSgpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVxLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChyZXEuc3RhdHVzID49IDIwMCAmJiByZXEuc3RhdHVzIDwgMzAwKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgKHVybC5zdWJzdHIoMCwgNykgPT09ICdmaWxlOi8vJyAmJiByZXEucmVzcG9uc2VUZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXEucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoJ0hUVFAgc3RhdHVzOiAnICsgcmVxLnN0YXR1cyArICcgcmV0cmlldmluZyAnICsgdXJsKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmVxLnNlbmQoKTtcbiAgICAgICAgfSk7XG5cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDb252ZXJ0IGEgQmFzZTY0LWVuY29kZWQgc3RyaW5nIGludG8gaXRzIG9yaWdpbmFsIHJlcHJlc2VudGF0aW9uLlxuICAgICAqIFVzZWQgZm9yIGlubGluZSBzb3VyY2VtYXBzLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IGI2NHN0ciBCYXNlLTY0I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YmFzZWQsIHNvdXJjZVtdIGlzIDAtYmFzZWRcbiAgICAgICAgICAgIHZhciBsaW5lID0gbGluZXNbbGluZU51bWJlciAtIGkgLSAxXTtcbiAgICAgICAgICAgIHZhciBjb21tZW50UG9zID0gbGluZS5pbmRleE9mKCcvLycpO1xuICAgICAgICAgICAgaWYgKGNvbW1lbnRQb3MgPj0gMCkge1xuICAgICAgICAgICAgICAgIGxpbmUgPSBsaW5lLnN1YnN0cigwLCBjb21tZW50UG9zKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGxpbmUpIHtcbiAgICAgICAgICAgICAgICBjb2RlID0gbGluZSArIGNvZGU7XG4gICAgICAgICAgICAgICAgdmFyIGxlbiA9IHN5bnRheGVzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgbGVuOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtID0gc3ludGF4ZXNbaW5kZXhdLmV4ZWMoY29kZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtICYmIG1bMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtWzFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gX2Vuc3VyZVN1cHBvcnRlZEVudmlyb25tZW50KCkge1xuICAgICAgICBpZiAodHlwZW9mIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSAhPT0gJ2Z1bmN0aW9uJyB8fCB0eXBlb2YgT2JqZWN0LmNyZWF0ZSAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdVbmFibGUgdG8gY29uc3VtZSBzb3VyY2UgbWFwcyBpbiBvbGRlciBicm93c2VycycpO1xuIC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2tmcmFtZS5saW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogc3RhY2tmcmFtZS5jb2x1bW5OdW1iZXJcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAobG9jLnNvdXJjZSkge1xuICAgICAgICAgICAgICAgIC8vIGNhY2hlIG1hcHBlZCBzb3VyY2VzXG4gICAgICAgICAgICAgICAgdmFyIG1hcHBlZFNvdXJjZSA9IHNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3IobG9jLnNvdXJjZSk7XG4gICAgICAgICAgICAgICAgaWYgKG1hcHBlZFNvdXJjZSkge1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VDYWNoZVtsb2Muc291cmNlXSA9IG1hcHBlZFNvdXJjZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXNvbHZlKFxuICAgICAgICAgICAgICAgICAgICAvLyBnaXZlbiBzdGFja2ZyYW1lIGFuZCBzb3VyY2UgbG9jYXRpb24sIHVwZGF0ZSBzdGFja2ZyYW1lXG4gICAgICAgICAgICAgICAgICAgIG5ldyBTdGFja0ZyYW1lKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uTmFtZTogbG9jLm5hbWUgfHwgc3RhY2tmcmFtZS5mdW5jdGlvbk5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcmdzOiBzdGFja2ZyYW1lLmFyZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogbG9jLnNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxvYy5saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uTnVtYmVyOiBsb2MuY29sdW1uXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcignQ291bG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N1bWVyQ2FjaGUgfHwge307XG5cbiAgICAgICAgdGhpcy5hamF4ID0gb3B0cy5hamF4IHx8IF94ZHI7XG5cbiAgICAgICAgdGhpcy5fYXRvYiA9IG9wdHMuYXRvYiB8fCBfYXRvYjtcblxuICAgICAgICB0aGlzLl9nZXQgPSBmdW5jdGlvbiBfZ2V0KGxvY2F0aW9uKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgdmFyIGlzRGF0YVVybCA9IGxvY2F0aW9uLnN1YnN0cigwLCA1KSA9PT0gJ2RhdGE6JztcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zb3VyY2VDYWNoZVtsb2NhdGlvbl0pIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh0aGlzLnNvdXJjZUNhY2hlW2xvY2F0aW9uXSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChvcHRzLm9mZmxpbmUgJiYgIWlzRGF0YVVybCkge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKCdDYW5ub3QgbWFrZSBuZXR3b3JrIHJlcXVlc3RzIGluIG9mZmxpbmUgbW9kZScpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNEYXRhVXJsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkYXRhIFVSTHMgY2FuIGhhdmUgcGFyYW1ldGVycy5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNlZSBodHRwOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmMyMzk3XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3VwcG9ydGVkRW5jb2RpbmdSZWdleHAgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC9eZGF0YTphcHBsaWNhdGlvblxcL2pzb247KFtcXHc9OlwiLV0rOykqYmFzZTY0LC87XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBsb2NhdGlvbi5tYXRjaChzdXBwb3J0ZWRFbmNvZGluZ1JlZ2V4cCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc291cmNlTWFwU3RhcnQgPSBtYXRjaFswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVuY29kZWRTb3VyY2UgPSBsb2NhdGlvbi5zdWJzdHIoc291cmNlTWFwU3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPSB0aGlzLl9hdG9iKGVuY29kZWRTb3VyY2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlQ2FjaGVbbG9jYXRpb25dID0gc291cmNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoc291cmNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcignVGhlIGVuY29kaW5nIG9mIHRoZSBpbmxpbmUgc291cmNlbWFwIGlzIG5vdCBzdXBwb3J0ZWQnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgeGhyUHJvbWlzZSA9IHRoaXMuYWpheChsb2NhdGlvbiwge21ldGhvZDogJ2dldCd9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENhY2hlIHRoZSBQcm9taXNlIHRvIHByZXZlbnQgZHVwbGljYXRlIGluLWZsaWdodCByZXF1ZXN0c1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2VDYWNoZVtsb2NhdGlvbl0gPSB4aHJQcm9taXNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgeGhyUHJvbWlzZS50aGVuKHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LmJpbmQodGhpcykpO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGluZyBTb3VyY2VNYXBDb25zdW1lcnMgaXMgZXhwZW5zaXZlLCBzbyB0aGlzIHdyYXBzIHRoZSBjcmVhdGlvbiBvZiBhXG4gICAgICAgICAqIFNvdXJjZU1hcENvbnN1bWVyIGluIGEgcGVyLWluc3RhbmNlIGNhY2hlLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0ge1N0cmluZ30gc291cmNlTWFwcGluZ1VSTCA9IFVSTCB0byBmZXRjaCBzb3VyY2UgbWFwIGZyb21cbiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd9IGRlZmF1bHRTb3VyY2VSb290ID0gRGVmYXVsdCBzb3VyY2Ugcm9vdCBmb3Igc291cmNlIG1hcCBpZiB1bmRlZmluZWRcbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2V9IHRoYXQgcmVzb2x2ZXMgYSBTb3VyY2VNYXBDb25zdW1lclxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5fZ2V0U291cmNlTWFwQ29uc3VtZXIgPSBmdW5jdGlvbiBfZ2V0U291cmNlTWFwQ29uc3VtZXIoc291cmNlTWFwcGluZ1VSTCwgZGVmYXVsdFNvdXJjZVJvb3QpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zb3VyY2VNYXBDb25zdW1lckNhY2hlW3NvdXJjZU1hcHBpbmdVUkxdKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUodGhpcy5zb3VyY2VNYXBDb25zdW1lckNhY2hlW3NvdXJjZU1hcHBpbmdVUkxdKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc291cmNlTWFwQ29uc3VtZXJQcm9taXNlID0gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0KHNvdXJjZU1hcHBpbmdVUkwpLnRoZW4oZnVuY3Rpb24oc291cmNlTWFwU291cmNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzb3VyY2VNYXBTb3VyY2UgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZU1hcFNvdXJjZSA9IF9wYXJzZUpzb24oc291cmNlTWFwU291cmNlLnJlcGxhY2UoL15cXClcXF1cXH0nLywgJycpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzb3VyY2VNYXBTb3VyY2Uuc291cmNlUm9vdCA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlTWFwU291cmNlLnNvdXJjZVJvb3QgPSBkZWZhdWx0U291cmNlUm9vdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKG5ldyBTb3VyY2VNYXAuU291cmNlTWFwQ29uc3VtZXIoc291cmNlTWFwU291cmNlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCByZWplY3QpO1xuICAgICAgICAgICAgICAgICAgICB9LmJpbmQodGhpcykpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZU1hcENvbnN1bWVyQ2FjaGVbc291cmNlTWFwcGlu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5jb2x1bW5OdW1iZXI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBndWVzc2VkRnVuY3Rpb25OYW1lID0gX2ZpbmRGdW5jdGlvbk5hbWUoc291cmNlLCBsaW5lTnVtYmVyLCBjb2x1bW5OdW1iZXIpO1xuICAgICAgICAgICAgICAgICAgICAvLyBPbmx5IHJlcGxhY2UgZnVuY3Rpb25OYW1lIGlmIHdlIGZvdW5kIHNvbWV0aGluZ1xuICAgICAgICAgICAgICAgICAgICBpZiAoZ3Vlc3NlZEZ1bmN0aW9uTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25OYW1lOiBndWVzc2VkRnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3M6IHN0YWNrZnJhbWUuYXJncyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogc3RhY2tmcmFtZS5maWxlTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbk51bWJlcjogY29sdW1uTnVtYmVyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHN0YWNrZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgcmVqZWN0KVsnY2F0Y2gnXShyZWplY3QpO1xuICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2l2ZW4gYSBTdGFja0ZyYW1lLCBzZWVrIHNvdXJjZS1tYXBwZWQgbG9jYXRpb24gYW5kIHJldHV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nKSArIDEpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChzb3VyY2VNYXBwaW5nVVJMWzBdICE9PSAnLycgJiYgIWlzRGF0YVVybCAmJiAhKC9eaHR0cHM/OlxcL1xcL3xeXFwvXFwvL2kpLnRlc3Qoc291cmNlTWFwcGluZ1VSTCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZU1hcHBpbmdVUkwgPSBkZWZhdWx0U291cmNlUm9vdCArIHNvdXJjZU1hcHBpbmdVUkw7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0U291cmNlTWFwQ29uc3VtZXIoc291cmNlTWFwcGluZ1VSTCwgZGVmYXVsdFNvdXJjZVJvb3QpXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbihzb3VyY2VNYXBDb25zdW1lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfZXh0cmFjdExvY2F0aW9uSW5mb0Zyb21Tb3VyY2VNYXBTb3VyY2Uoc3RhY2tmcmFtZSwgc291cmNlTWFwQ29uc3VtZXIsIHNvdXJjZUNhY2hlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudGhlbihyZXNvbHZlKVsnY2F0Y2gnXShmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShzdGFja2ZyYW1lKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0uYmluZCh0aGlzKSwgcmVqZWN0KVsnY2F0Y2gnXShyZWplY3QpO1xuICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfTtcbiAgICB9O1xufSkpO1xuIiwiKGZ1bmN0aW9uKHJvb3QsIGZhY3RvcnkpIHtcbiAgICAndXNlIHN0cmljdC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Mge09iamVjdH0gbWVyZ2VkIGZpcnN0IGFuZCBzZWNvbmRcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIF9tZXJnZShmaXJzdCwgc2Vjb25kKSB7XG4gICAgICAgIHZhciB0YXJnZXQgPSB7fTtcblxuICAgICAgICBbZmlyc3QsIHNlY29uZF0uZm9yRWFjaChmdW5jdGlvbihvYmopIHtcbiAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gb2JqKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcHJvcF0gPSBvYmpbcHJvcF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBfaXNTaGFwZWRMaWtlUGFyc2FibGVFcnJvcihlcnIpIHtcbiAgICAgICAgcmV0dXJuIGVyci5zdGFjayB8fCBlcnJbJ29wZXJhI3NvdXJjZWxvYyddO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIF9maWx0ZXJlZChzdGFja2ZyYW1lcywgZmlsdGVyKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmlsdGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICByZXR1cm4gc3RhY2tmcmFtZXMuZmlsdGVyKGZpbHRlcik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHN0YWNrZnJhbWVzO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgYSBiYWNrdHJhY2UgZnJvbSBpbnZvY2F0aW9uIHBvaW50LlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0c1xuICAgICA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ICAgICAgICAvKipcbiAgICAgICAgICogR2l2ZW4gYW4gZXJyb3Igb2JqZWN0LCBwYXJzZSBpdC5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtFcnJvcn0gZXJyb3Igb2JqZWN0XG4gICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRzXG4gICAgICAgICAqIEByZXR1cm5zIHtQcm9taXNlfSBmb3IgQXJyYXlbU3RhY2tGcmFtZX1cbiAgICAgICAgICovXG4gICAgICAgIGZyb21FcnJvcjogZnVuY3Rpb24gU3RhY2tUcmFjZSQkZnJvbUVycm9yKGVycm9yLCBvcHRzKSB7XG4gICAgICAgICAgICBvcHRzID0gX21lcmdlKF9vcHRpb25zLCBvcHRzKTtcbiAgICAgICAgICAgIHZhciBncHMgPSBuZXcgU3RhY2tUcmFjZUdQUyhvcHRzKTtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0YWNrZnJhbWVzID0gX2ZpbHRlcmVkKEVycm9yU3RhY2tQYXJzZXIucGFyc2UoZXJyb3IpLCBvcHRzLmZpbHRlcik7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZShQcm9taXNlLmFsbChzdGFja2ZyYW1lcy5tYXAoZnVuY3Rpb24oc2YpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHJlc29sdmVPcmlnaW5hbCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHNmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgZ3BzLnBpbnBvaW50KHNmKS50aGVuKHJlc29sdmUsIHJlc29sdmVPcmlnaW5hbClbJ2NhdGNoJ10ocmVzb2x2ZU9yaWdpbmFsKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSkpKTtcbiAgICAgICAgICAgIH0uYmluZCh0aGlzKSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFVzZSBTdGFja0dlbmVyYXRvciB0byBnZW5lcmF0ZSBhIGJhY2t0cmFjZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9wdHNcbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2V9IG9mIEFycmF5W1N0YWNrRnJhbWVdXG4gICAgICAgICAqL1xuICAgICAgICBnZW5lcmF0ZUFydGlmaWNpYWxseTogZnVuY3Rpb24gU3RhY2tUcmFjZSQkZ2VuZXJhdGVBcnRpZmljaWFsbHkob3B0cykge1xuICAgICAgICAgICAgb3B0cyA9IF9tZXJnZShfb3B0aW9ucywgb3B0cyk7XG4gICAgICAgICAgICB2YXIgc3RhY2tGcmFtZXMgPSBTdGFja0dlbmVyYXRvci5iYWNrdHJhY2Uob3B0cyk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdHMuZmlsdGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgc3RhY2tGcmFtZXMgPSBzdGFja0ZyYW1lcy5maWx0ZXIob3B0cy5maWx0ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShzdGFja0ZyYW1lcyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdpdmVuIGEgZnVuY3Rpb24sIHdyYXAgaXQgc3VjaCB0aGF0IGludm9jYXRpb25zIHRyaWdnZXIgYSBjYWxsYmFjayB0aGF0XG4gICAgICAgICAqIGlzIGNhbGxlZCB3aXRoIGEgc3RhY2sgdHJhY2UuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZuI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JhY2spWydjYXRjaCddKGVycmJhY2spO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZyB8fCB0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKF9pc1NoYXBlZExpa2VQYXJzYWJsZUVycm9yKGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZyb21FcnJvcihlKS50aGVuKGNhbGxiYWNrLCBlcnJiYWNrKVsnY2F0Y2gnXShlcnJiYWNrKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0uYmluZCh0aGlzKTtcbiAgICAgICAgICAgIGluc3RydW1lbnRlZC5fX3N0YWNrdHJhY2VPcmlnaW5hbEZuID0gZm47XG5cbiAgICAgICAgICAgIHJldHVybiBpbnN0cnVtZW50ZWQ7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdpdmVuIGEgZnVuY3Rpb24gdGhhdCBoYXMgYmVlbiBpbnN0cnVtZW50ZWQsXG4gICAgICAgICAqIHJldmVydCB0aGUgZnVuY3Rpb24gdG8gaXQncyBvcmlnaW5hbCAobm9uLWluc3RydW1lbnRlZCkgc3RhdGUuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZuIHRvIGRlLWluc3RydW1lbnRcbiAgICAgICAgICovXG4gICAgICAgIGRlaW5zdHJ1bWVudDogZnVuY3Rpb24gU3RhY2tUcmFjZSQkZGVpbnN0cnVtZW50KGZuKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGZuICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDYW5ub3QgZGUtaW5zdHJ1bWVudCBub24t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R5c3RhdGVjaGFuZ2UgPSBmdW5jdGlvbiBvbnJlYWR5c3RhdGVjaGFuZ2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXEucmVhZHlTdGF0ZSA9PT0gNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcS5zdGF0dXMgPj0gMjAwICYmIHJlcS5zdGF0dXMgPCA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcS5yZXNwb25zZVRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKCdQT1NUIHRvICcgKyB1cmwgKyAnIGZhaWxlZCB3aXRoIHN0YXR1czogJyArIHJlcS5zdGF0dXMpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmVxLm9wZW4oJ3Bvc3QnLCB1cmwpO1xuXG4gICAgICAgICAgICAgICAgLy8gU2V0IHJlcXVlc3QgaGVhZGVyc1xuICAgICAgICAgICAgICAgIHJlcS5zZXRSZXF1ZXN0SGVhZGVyKCdDb250ZW50LVR5cGUnLCAnYXBwbGljYXRpb24vanNvbicpO1xuICAgICAgICAgICAgICAgIGlmIChyZXF1ZXN0T3B0aW9ucyAmJiB0eXBlb2YgcmVxdWVzdE9wdGlvbnMuaGVhZGVycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhlYWRlcnMgPSByZXF1ZXN0T3B0aW9ucy5oZWFkZXJzO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBoZWFkZXIgaW4gaGVhZGVycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhlYWRlcnMuaGFzT3duUHJvcGVydHkoaGVhZGVyKSkge1xuICAgICAgICAgICAgICAgICAgIC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4gIH1cbiAgaWYgKCFzdHIpIHtcbiAgICBpZiAoY3R4LnNlZW4uaW5kZXhPZihkZXNjLnZhbHVlKSA8IDApIHtcbiAgICAgIGlmIChpc051bGwocmVjdXJzZVRpbWVzKSkge1xuICAgICAgICBzdHIgPSBmb3JtYXRWYWx1ZShjdHgsIGRlc2MudmFsdWUsIG51bGwpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgc3RyID0gZm9ybWF0VmFsdWUoY3R4LCBkZXNjLnZhbHVlLCByZWN1cnNlVGltZXMgLSAxKTtcbiAgICAgIH1cbiAgICAgIGlmIChzdHIuaW5kZXhPZignXFxuJykgPiAtMSkge1xuICAgICAgICBpZiAoYXJyYXkpIHtcbiAgICAgICAgICBzdHIgPSBzdHIuc3BsaXQoJ1xcbicpLm1hcChmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICByZXR1cm4gJyAgJyArIGxpbmU7XG4gICAgICAgICAgfSkuam9pbignXFxuJykuc3Vic3RyKDIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHN0ciA9ICdcXG4nICsgc3RyLnNwbGl0KCdcXG4nKS5tYXAoZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgcmV0dXJuICcgICAnICsgbGluZTtcbiAgICAgICAgICB9KS5qb2luKCdcXG4nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBzdHIgPSBjdHguc3R5bGl6ZSgnW0NpcmN1bGFyXScsICdzcGVjaWFsJyk7XG4gICAgfVxuICB9XG4gIGlmIChpc1VuZGVmaW5lZChuYW1lKSkge1xuICAgIGlmIChhcnJheSAmJiBrZXkubWF0Y2goL15cXGQrJC8pKSB7XG4gICAgICByZXR1cm4gc3RyO1xuICAgIH1cbiAgICBuYW1lID0gSlNPTi5zdHJpbmdpZnkoJycgKyBrZXkpO1xuICAgIGlmIChuYW1lLm1hdGNoKC9eXCIoW2EtekEtWl9dW2EtekEtWl8wLTldKilcI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ndGggPiAwKSB7XG4gICAgICAgICAgaWYgKGlzRmluaXRlKG1lYW5EdXJhdGlvbikpIHtcbiAgICAgICAgICAgIGNvbDIucHVzaChcbiAgICAgICAgICAgICAgYCR7KG1lYW5EdXJhdGlvbiAvIE1JTExJU0VDT05EU19JTl9OQU5PU0VDT05EKS50b0ZpeGVkKDIpfW1zYFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb2wyLnB1c2goJy0nKVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb2wyLnB1c2goJ1VOVVNFRCcpXG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgY29sMyA9IFtmb3JtYXRMb2NhdGlvbih7IGxpbmUsIHVyaSB9KV1cbiAgICAgICAgXy50YWtlKG1hdGNoZXMsIDUpLmZvckVhY2gobWF0Y2ggPT4ge1xuICAgICAgICAgIGNvbDEucHVzaChgICAke21hdGNoLnRleHR9YClcbiAgICAgICAgICBpZiAoaXNGaW5pdGUobWF0Y2guZHVyYXRpb24pKSB7XG4gICAgICAgICAgICBjb2wyLnB1c2goYCR7bWF0Y2guZHVyYXRpb24gLyBNSUxMSVNFQ09ORFNfSU5fTkFOT1NFQ09ORH1tc2ApXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbDIucHVzaCgnLScpXG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbDMucHVzaChmb3JtYXRMb2NhdGlvbihtYXRjaCkpXG4gICAgICAgIH0pXG4gICAgICAgIGlmIChtYXRjaGVzLmxlbmd0aCA+IDUpIHtcbiAgICAgICAgICBjb2wxLnB1c2goYCAgJHttYXRjaGVzLmxlbmd0aCAtIDV9IG1vcmVgKVxuICAgICAgICB9XG4gICAgICAgIHRhYmxlLnB1c2goW2NvbDEuam9pbignXFxuJyksIGNvbDIuam9pbignXFxuJyksIGNvbDMuam9pbignXFxuJyldKVxuICAgICAgfVxuICAgIClcbiAg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VvZiAoYXJnKSA9PT0gJ2Jvb2xlYW4nOyB9XG4gICAgfSxcbiAgICBmdW5jOiB7XG4gICAgICAgIGNoZWNrOiBmdW5jdGlvbiAoYXJnKSB7IHJldHVybiB0eXBlb2YgKGFyZykgPT09ICdmdW5jdGlvbic7IH1cbiAgICB9LFxuICAgIHN0cmluZzoge1xuICAgICAgICBjaGVjazogZnVuY3Rpb24gKGFyZykgeyByZXR1cm4gdHlwZW9mIChhcmcpID09PSAnc3RyaW5nJzsgfVxuICAgIH0sXG4gICAgb2JqZWN0OiB7XG4gICAgICAgIGNoZWNrOiBmdW5jdGlvbiAoYXJnKSB7XG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIChhcmcpID09PSAnb2JqZWN0JyAmJiBhcmcgIT09IG51bGw7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG51bWJlcjoge1xuICAgICAgICBjaGVjazogZnVuY3Rpb24gKGFyZykge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiAoYXJnKSA9PT0gJ251bWJlcicgJiYgIWlzTmFOKGFyZyk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGZpbml0ZToge1xuICAgICAgICBjaGVjazogZnVuY3Rpb24gKGFyZykge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiAoYXJnKSA9PT0gJ251bWJlcicgJiYgIWlzTmFOKGFyZykgJiYgaXNGaW5pdGUoYXJnKTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgYnVmZmVyOiB7XG4gICAgICAgIGNoZWNrOiBmdW5jdGlvbiAoYXJnKSB7IHJldHVybiBCdWZmZXIuaXNCdWZmZXIoYXJnKTsgfSxcbiAgICAgICAgb3BlcmF0b3I6ICdCdWZmZXIuaXNCdWZmZXInXG4gICAgfSxcbiAgICBhcnJheToge1xuICAgICAgICBjaGVjazogZnVuY3Rpb24gKGFyZykgeyByZXR1cm4gQXJyYXkuaXNBcnJheShhcmcpOyB9LFxuICAgICAgICBvcGVyYXRvcjogJ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DtcbiAgICB9IGVsc2Uge1xuICAgICAgICBvdXQgPSBmdW5jdGlvbiAoYXJnLCBtc2cpIHtcbiAgICAgICAgICAgIGlmICghYXJnKSB7XG4gICAgICAgICAgICAgICAgX3Rvc3MobXNnLCAndHJ1ZScsIGFyZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgLyogc3RhbmRhcmQgY2hlY2tzICovXG4gICAga2V5cy5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgIGlmIChuZGVidWcpIHtcbiAgICAgICAgICAgIG91dFtrXSA9IG5vb3A7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHR5cGUgPSB0eXBlc1trXTtcbiAgICAgICAgb3V0W2tdID0gZnVuY3Rpb24gKGFyZywgbXNnKSB7XG4gICAgICAgICAgICBpZiAoIXR5cGUuY2hlY2soYXJnKSkge1xuICAgICAgICAgICAgICAgIF90b3NzKG1zZywgaywgdHlwZS5vcGVyYXRvciwgYXJnLCB0eXBlLmFjdHVhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSk7XG5cbiAgICAvKiBvcHRpb25hbCBjaGVja3MgKi9cbiAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgdmFyIG5hbWUgPSAnb3B0aW9uYWwnICsgX2NhcGl0YWxpemUoayk7XG4gICAgICAgIGlmIChuZGVidWcpIHtcbiAgICAgICAgICAgIG91dFtuYW1lXSA9IG5vb3A7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHR5cGUgPSB0eXBlc1trXTtcbiAgICAgICAgb3V0W25hbWVdID0gZnVuY3Rpb24gKGFyZywgbXNnKSB7XG4gICAgICAgICAgICBpZiAoYXJnID09PSB1bmRlZmluZWQgfHwgYXJnID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCF0eXBlLmNoZWNrKGFyZykpIHtcbiAgICAgICAgICAgICAgICBfdG9zcyhtc2csIGssIHR5cGUub3BlcmF0b3IsIGFyZywgdHlwZS5hY3R1YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0pO1xuXG4gICAgLyogYXJyYXlPZiBjaGVja3MgKi9cbiAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgdmFyIG5hbWUgPSAnYXJyYXlPZicgKyBfY2FwaXRhbGl6ZShrKTtcbiAgICAgICAgaWYgKG5kZWJ1Zykge1xuICAgICAgICAgICAgb3V0W25hbWVdID0gbm9vcDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdHlwZSA9IHR5cGVzW2tdO1xuICAgICAgICB2YXIgZXhwZWN0ZWQgPSAnWycgKyBrICsgJ10nO1xuICAgICAgICBvdXRbbmFtZV0gPSBmdW5jdGlvbiAoYXJnLCBtc2cpIHtcbiAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShhcmcpKSB7XG4gICAgICAgICAgICAgICAgX3Rvc3MobXNnLCBleHBlY3RlZCwgdHlwZS5vcGVyYXRvciwgYXJnLCB0eXBlLmFjdHVhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgaTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBhcmcubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoIXR5cGUuY2hlY2soYXJnW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICBfdG9zcyhtc2csIGV4cGVjdGVkLCB0eXBlLm9wZXJhdG9yLCBhcmcsIHR5cGUuYWN0dWFsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSk7XG5cbiAgICAvKiBvcHRpb25hbEFycmF5T2YgY2hlY2tzICovXG4gICAga2V5cy5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgIHZhciBuYW1lID0gJ29wdGlvbmFsQXJyYXlPZicgKyBfY2FwaXRhbGl6ZShrKTtcbiAgICAgICAgaWYgKG5kZWJ1Zykge1xuICAgICAgICAgICAgb3V0W25hbWVdID0gbm9vcDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdHlwZSA9IHR5cGVzW2tdO1xuICAgICAgICB2YXIgZXhwZWN0ZWQgPSAnWycgKyBrICsgJ10nO1xuICAgICAgICBvdXRbbmFtZV0gPSBmdW5jdGlvbiAoYXJnLCBtc2cpIHtcbiAgICAgICAgICAgIGlmIChhcmcgPT09IHVuZGVmaW5lZCB8fCBhcmcgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoYXJnKSkge1xuICAgICAgICAgICAgICAgIF90b3NzKG1zZywgZXhwZWN0ZWQsIHR5cGUub3BlcmF0b3IsIGFyZywgdHlwZS5hY3R1YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgYXJnLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0eXBlLmNoZWNrKGFyZ1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgX3Rvc3MobXNnLCBleHBlY3RlZCwgdHlwZS5vcGVyYXRvciwgYXJnLCB0eXBlLmFjdHVhbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0pO1xuXG4gICAgLyogcmUtZXhwb3J0IGJ1aWx0LWluIGFzc2VydGlvbnMgKi9cbiAgICBPYmplY3Qua2V5cyhhc3NlcnQpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgIC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gICAgIHN0YWNrLnBvcCgpO1xuICAgICAgcmVwbGFjZW1lbnRTdGFjay5wb3AoKTtcbiAgICAgIHJldHVybiBjYW5vbmljYWxpemVkT2JqO1xuICAgIH1cblxuICAgIGlmIChvYmogJiYgb2JqLnRvSlNPTikge1xuICAgICAgb2JqID0gb2JqLnRvSlNPTigpO1xuICAgIH1cblxuICAgIGlmIChfdHlwZW9mKG9iaikgPT09ICdvYmplY3QnICYmIG9iaiAhPT0gbnVsbCkge1xuICAgICAgc3RhY2sucHVzaChvYmopO1xuICAgICAgY2Fub25pY2FsaXplZE9iaiA9IHt9O1xuICAgICAgcmVwbGFjZW1lbnRTdGFjay5wdXNoKGNhbm9uaWNhbGl6ZWRPYmopO1xuXG4gICAgICB2YXIgc29ydGVkS2V5cyA9IFtdLFxuICAgICAgICAgIF9rZXk7XG5cbiAgICAgIGZvciAoX2tleSBpbiBvYmopIHtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShfa2V5KSkge1xuICAgICAgICAgIHNvcnRlZEtleXMucHVzaChfa2V5KTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBzb3J0ZWRLZXlzLnNvcnQoKTtcblxuICAgICAgZm9yIChpID0gMDsgaSA8IHNvcnRlZEtleXMubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgX2tleSA9IHNvcnRlZEtleXNbaV07XG4gICAgICAgIGNhbm9uaWNhbGl6ZWRPYmpbX2tleV0gPSBjYW5vbmljYWxpemUob2JqW19rZXldLCBzdGFjaywgcmVwbGFjZW1lbnRTdGFjaywgcmVwbGFjZXIsIF9rZXkpO1xuICAgICAgfVxuXG4gICAgICBzdGFjay5wb3AoKTtcbiAgICAgIHJlcGxhY2VtZW50U3RhY2sucG9wKCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBvYmo7XG4gICAgfV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AnLFxuICAgICAgICAgICAgY29udGVudCA9IGxpbmUubGVuZ3RoID4gMCA/IGxpbmUuc3Vic3RyKDEpIDogbGluZTtcblxuICAgICAgICBpZiAob3BlcmF0aW9uID09PSAnICcgfHwgb3BlcmF0aW9uID09PSAnLScpIHtcbiAgICAgICAgICAvLyBDb250ZXh0IHNhbml0eSBjaGVja1xuICAgICAgICAgIGlmICghY29tcGFyZUxpbmUodG9Qb3MgKyAxLCBsaW5lc1t0b1Bvc10sIG9wZXJhdGlvbiwgY29udGVudCkpIHtcbiAgICAgICAgICAgIGVycm9yQ291bnQrKztcblxuICAgICAgICAgICAgaWYgKGVycm9yQ291bnQgPiBmdXp6RmFjdG9yKSB7XG4gICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB0b1BvcysrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH0gLy8gU2VhcmNoIGJlc3QgZml0IG9mZnNldHMgZm9yIGVhY2ggaHVuayBiYXNlZCBvbiB0aGUgcHJldmlvdXMgb25lc1xuXG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGh1bmtzLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgaHVuayA9IGh1bmtzW2ldLFxuICAgICAgICAgIG1heExpbmUgPSBsaW5lcy5sZW5ndGggLSBodW5rLm9sZExpbmVzLFxuICAgICAgICAgIGxvY2FsT2Zmc2V0ID0gMCxcbiAgICAgICAgICB0b1BvcyA9IG9mZnNldCArIGh1bmsub2xkU3RhcnQgLSAxO1xuICAgICAgdmFyIGl0ZXJhdG9yID0gZGlzdGFuY2VJdGVyYXRvcih0b1BvcywgbWluTGluZSwgbWF4TGluZSk7XG5cbiAgICAgIGZvciAoOyBsb2NhbE9mZnNldCAhPT0gdW5kZWZpbmVkOyBsb2NhbE9mZnNldCA9IGl0ZXJhdG9yKCkpIHtcbiAgICAgICA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xuICAgICAgICAgICAgb3BlcmF0aW9uID0gbGluZS5sZW5ndGggPiAwID8gbGluZVswXSA6ICcgJyxcbiAgICAgICAgICAgIGNvbnRlbnQgPSBsaW5lLmxlbmd0aCA+IDAgPyBsaW5lLnN1YnN0cigxKSA6IGxpbmUsXG4gICAgICAgICAgICBkZWxpbWl0ZXIgPSBfaHVuay5saW5lZGVsaW1pdGVyc1tqXTtcblxuICAgICAgICBpZiAob3BlcmF0aW9uID09PSAnICcpIHtcbiAgICAgICAgICBfdG9Qb3MrKztcbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIGxpbmVzLnNwbGljZShfdG9Qb3MsIDEpO1xuICAgICAgICAgIGRlbGltaXRlcnMuc3BsaWNlKF90b1BvcywgMSk7XG4gICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICcrJykge1xuICAgICAgICAgIGxpbmVzLnNwbGljZShfdG9Qb3MsIDAsIGNvbnRlbnQpO1xuICAgICAgICAgIGRlbGltaXRlcnMuc3BsaWNlKF90b1BvcywgMCwgZGVsaW1pdGVyKTtcbiAgICAgICAgICBfdG9Qb3MrKztcbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICdcXFxcJykge1xuICAgICAgICAgIHZhciBwcmV2aW91c09wZXJhdGlvbiA9IF9odW5rLmxpbmVzW2ogLSAxXSA/IF9odW5rLmxpbmVzW2ogLSAxXVswXSA6IG51bGw7XG5cbiAgICAgICAgICBpZiAocHJldmlvdXNPcGVyYXRpb24gPT09ICcrJykge1xuICAgICAgICAgICAgcmVtb3ZlRU9GTkwgPSB0cnVlO1xuICAgICAgICAgIH0gZWxzZSBpZiAocHJldmlvdXNPcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgICAgYWRkRU9GTkwgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxu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UmFuZ2UyLCBfdG9Db25zdW1hYmxlQXJyYXkoY29udGV4dExpbmVzKGxpbmVzKSkpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgX2N1clJhbmdlMztcblxuICAgICAgICAgICAgLy8gZW5kIHRoZSByYW5nZSBhbmQgb3V0cHV0XG4gICAgICAgICAgICB2YXIgY29udGV4dFNpemUgPSBNYXRoLm1pbihsaW5lcy5sZW5ndGgsIG9wdGlvbnMuY29udGV4dCk7XG5cbiAgICAgICAgICAgIChfY3VyUmFuZ2UzID0gY3VyUmFuZ2UpLnB1c2guYXBwbHkoX2N1clJhbmdlMywgX3RvQ29uc3VtYWJsZUFycmF5KGNvbnRleHRMaW5lcyhsaW5lcy5zbGljZSgwLCBjb250ZXh0U2l6ZSkpKSk7XG5cbiAgICAgICAgICAgIHZhciBodW5rID0ge1xuICAgICAgICAgICAgICBvbGRTdGFydDogb2xkUmFuZ2VTdGFydCxcbiAgICAgICAgICAgICAgb2xkTGluZXM6IG9sZExpbmUgLSBvbGRSYW5nZVN0YXJ0ICsgY29udGV4dFNpemUsXG4gICAgICAgICAgICAgIG5ld1N0YXJ0OiBuZXdSYW5nZVN0YXJ0LFxuICAgICAgICAgICAgICBuZXdMaW5lczogbmV3TGluZSAtIG5ld1JhbmdlU3RhcnQgKyBjb250ZXh0U2l6ZSxcbiAgICAgICAgICAgICAgbGluZXM6IGN1clJhbmdlXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAoaSA+PSBkaWZmLmxlbmd0aCAtIDIgJiYgbGluZXMubGVuZ3RoIDw9IG9wdGlvbnMuY29udGV4dCkge1xuICAgICAgICAgICAgICAvLyBFT0YgaXMgaW5zaWRlIHRoaXMgaHVua1xuICAgICAgICAgICAgICB2YXIgb2xkRU9GTmV3bGluZSA9IC9cXG4kLy50ZXN0KG9sZFN0cik7XG4gICAgICAgICAgICAgIHZhciBuZXdFT0ZOZXdsaW5lID0gL1xcbiQvLnRlc3Qob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mVzLmZvckVhY2goZnVuY3Rpb24gKGxpbmUpIHtcbiAgICAgIGlmICh0eXBlb2YgbGluZSAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgdmFyIG15Q291bnQgPSBjYWxjT2xkTmV3TGluZUNvdW50KGxpbmUubWluZSk7XG4gICAgICAgIHZhciB0aGVpckNvdW50ID0gY2FsY09sZE5ld0xpbmVDb3VudChsaW5lLnRoZWlycyk7XG5cbiAgICAgICAgaWYgKG9sZExpbmVzICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBpZiAobXlDb3VudC5vbGRMaW5lcyA9PT0gdGhlaXJDb3VudC5vbGRMaW5lcykge1xuICAgICAgICAgICAgb2xkTGluZXMgKz0gbXlDb3VudC5vbGRMaW5lcztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb2xkTGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG5ld0xpbmVzICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBpZiAobXlDb3VudC5uZXdMaW5lcyA9PT0gdGhlaXJDb3VudC5uZXdMaW5lcykge1xuICAgICAgICAgICAgbmV3TGluZXMgKz0gbXlDb3VudC5uZXdMaW5lcztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbmV3TGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAobmV3TGluZXMgIT09IHVuZGVmaW5lZCAmJiAobGluZVswXSA9PT0gJysnIHx8IGxpbmVbMF0gPT09ICcgJykpIHtcbiAgICAgICAgICBuZXdMaW5lcysrO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG9sZExpbmVzICE9PSB1bmRlZmluZWQgJiYgKGxpbmVbMF0gPT09ICctJyB8fCBsaW5lWzBdID09PSAnICcpKSB7XG4gICAgICAgICAgb2xkTGluZXMrKztcbiA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W50U3RyUG9zID0gc3RyUG9zaXRpb247XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVnZXhHcm91cFN0cnVjdHVyZUNoaWxkcmVuLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgaW5kZXggPSByZWdleEdyb3VwU3RydWN0dXJlQ2hpbGRyZW5baV1bMF07XG4gICAgICAgICAgICB2YXIgb3JpZ2luYWxJbmRleCA9IHJlZ2V4R3JvdXBTdHJ1Y3R1cmVDaGlsZHJlbltpXVsxXTtcbiAgICAgICAgICAgIGlmIChvcmlnaW5hbEluZGV4KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0W29yaWdpbmFsSW5kZXhdID0gcmVzdWx0UmVnZXhbaW5kZXhdO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVzdWx0W29yaWdpbmFsSW5kZXhdID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5pbmRleFtvcmlnaW5hbEluZGV4XSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuaW5kZXhbb3JpZ2luYWxJbmRleF0gPSBjdXJyZW50U3RyUG9zO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyZWdleEdyb3VwU3RydWN0dXJlQ2hpbGRyZW5baV1bM10pIHtcbiAgICAgICAgICAgICAgICBleGVjSW50ZXJuYWwoY3VycmVudFN0clBvcywgcmVnZXhHcm91cFN0cnVjdHVyZUNoaWxkcmVuW2ldWzNdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgcmVzdWx0UmVnZXhbaW5kZXhdICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudFN0clBvcyArPSByZXN1bHRSZWdleFtpbmRleF0ubGVuZ3RoO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ID0gJyc7XG4gICAgICAgIHZhciBuZXdTdWJzdHJpbmdGdW5jdGlvbiA9IG5ld1N1YnN0cmluZ0Z1bmN0aW9uQXJyYXlbbmV3U3Vic3RyaW5nRnVuY3Rpb25JbmRleF07XG4gICAgICAgIC8vIGlmKCFuZXdTdWJzdHJpbmdGdW5jdGlvbil7XG4gICAgICAgIC8vICAgICBuZXdTdWJzdHJpbmdGdW5jdGlvbiArPSAnJztcbiAgICAgICAgLy8gfVxuICAgICAgICBpZiAodHlwZW9mIG5ld1N1YnN0cmluZ0Z1bmN0aW9uID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBuZXdTdWJzdHJpbmdGdW5jdGlvbi5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNoYXJBdCA9IG5ld1N1YnN0cmluZ0Z1bmN0aW9uLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICBpZiAoY2hhckF0ID09PSAnJCcpIHtcbiAgICAgICAgICAgICAgICAgICAgaSsrO1xuICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBuZXdTdWJzdHJpbmdGdW5jdGlvbi5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICckJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gJyQnO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA9PT0gJyYnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZFN0cmluZyArPSByZXN1bHRFeGVjW25ld1N1YnN0cmluZ0Z1bmN0aW9uSW5kZXhdO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA9PT0gJ2AnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZFN0cmluZyArPSBzdHIuc3Vic3RyaW5nKDAsIHJlc3VsdEV4ZWMuaW5kZXhbbmV3U3Vic3RyaW5nRnVuY3Rpb25JbmRleF0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA9PT0gXCInXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9IHN0ci5zdWJzdHJpbmcocmVzdWx0RXhlYy5pbmRleFtuZXdTdWJzdHJpbmdGdW5jdGlvbkluZGV4XSArIHJlc3VsdEV4ZWNbbmV3U3Vic3RyaW5nRnVuY3Rpb25JbmRleF0ubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaGFyQXQgPj0gJzAnICYmIGNoYXJBdCA8PSAnOScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbnQgPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBuZXdTdWJzdHJpbmdGdW5jdGlvbi5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hhckF0ID49ICcwJyAmJiBjaGFyQXQgPD0gJzknKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gbmV3U3Vic3RyaW5nRnVuY3Rpb24uY2hhckF0KGkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdEV4ZWNbaW50XSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9IHJlc3VsdEV4ZWNbaW50XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWRTdHJpbmcgKz0gJyQnICsgaW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9zdHJhbmdlIG5vdCBzdXJlIHdoZXRoZXIgdGhpcyBpcyBjb3JyZWN0IC0gaW5pdGlhbGx5IGl0IHdhczogY29tcHV0ZWRTdHJpbmcgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9idXQgdW5pdCB0ZXN0cyBpbiBOUE0gdG9sZCBkaWZmZXJlbnRseSEuLi5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9ICckJyArIGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkU3RyaW5nICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3U3Vic3RyaW5nRnVuY3Rpb24gaW5zdGFuY2VvZiBGdW5jdGlvbikge1xuICAgICAgICAgICAgdmFyIGFyZ3MgPSBbcmVzdWx0RXhlY1tuZXdTdWJzdHJpbmdGdW5jdGlvbkluZGV4XV07XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHJlc3VsdEV4ZWMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBhcmdzLnB1c2gocmVzdWx0RXhlY1tqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgaiA8IHJlc3VsdEV4ZWMuaW5kZXgubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICBhcmdzLnB1c2gocmVzdWx0RXhlYy5pbmRleFtrXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhcmd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G4gICAgICAgIHZhciBmaXhJbmRleE9uR3JvdXBpbmdTdHJ1Y3R1cmUgPSBmdW5jdGlvbiAoZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50KSB7XG4gICAgICAgICAgICB2YXIgcmVnZXhGb3JUaGlzR3JvdXAgPSAnJztcbiAgICAgICAgICAgIHZhciBjaGFyQXQ7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNoYXJBdCA9IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgcmVnZXhGb3JUaGlzR3JvdXAgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaSArIDEgPT09IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzJdLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGludCA9ICcnO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hhckF0ID49ICcwJyAmJiBjaGFyQXQgPD0gJzknKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnQgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICAgICAgaSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzJdLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoaW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWdleEZvclRoaXNHcm91cCArPSBpbmRleE1hcFtpbnRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVnZXhGb3JUaGlzR3JvdXAgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY2hhckF0ID09PSAnWycpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgKyAxID09PSBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5jaGFyQXQoaSk7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgoY2hhckF0ICE9PSAnXScgfHwgKGdyb3VwaW5nU3RydWN0dXJlRWxlbWVudFsyXS5jaGFyQXQoaSAtIDEpID09PSAnXFxcXCcgJiYgZ3JvdXBpbmdTdHJ1Y3R1cmVFbGVtZW50WzJdLmNoYXJBdChpIC0gMikgIT09ICdcXFxcJykpICYmIGkgPCBncm91cGluZ1N0cnVjdHVyZUVsZW1lbnRbMl0ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWdleEZvclRoaXNHcm91cCArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSBncm91cGluZ1N0cnVjdHVyZUVsZ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AgICAgLy8yMDE3MDQxNiAtIGJ1ZyB0aGUgaW5kZXggbWFwIGNhbiBjaGFuZ2UgbGF0ZXIgaWYgYWRkaXRpb25hbCBzdXJyb3VuZGluZyBwYXJhbnRoZXNpcyBhcmUgYWRkZWRcbiAgICAgICAgICAgICAgICAgICAgLy9UaGVyZWZvcmUgdGhpcyBjYWxjdWxhdGlvbiBuZWVkcyB0byBiZSBkb25lIGluIHRoZSBlbmQhXG4gICAgICAgICAgICAgICAgICAgIC8vdG1wU3RyICs9ICdcXFxcJyArIGluZGV4TWFwW2ludF07XG4gICAgICAgICAgICAgICAgICAgIHRtcFN0ciArPSAnXFxcXCcgKyBpbnQ7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zQmFja1JlZmVyZW5jZVswXSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGludC5pbmRleE9mKCc4JykgPj0gMCB8fCBpbnQuaW5kZXhPZignOScpID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vaWYgaXQgaXMgYSBub24gb2N0YWwgZGlnaXQgdGhlbiB0cmVhdCBpdCBhcyBzaW1wbGUgbnVtYmVyXG4gICAgICAgICAgICAgICAgICAgICAgICB0bXBTdHIgKz0gaW50O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9vdGhlcndpc2UgaXQgaXMgYSBjaGFyYWN0ZXIgZXNjYXBlXG4gICAgICAgICAgICAgICAgICAgICAgICB0bXBTdHIgKz0gJ1xcXFwnICsgJ3gnICsgKFwiMFwiICsgKHBhcnNlSW50KGludCwgOCkudG9TdHJpbmcoMTYpKSkuc2xpY2UoLTIpLnRvVXBwZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc291cmNlWzBdICs9ICdcXFxcJyArIGludDtcbiAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXS0tO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0bXBTdHIgKz0gJ1xcXFwnICsgY2hhckF0O1xuICAgICAgICAgICAgICAgIHNvdXJjZVswXSArPSAnXFxcXCcgKyBjaGFyQXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY2hhckF0ID09PSAnWycpIHtcbiAgICAgICAgICAgIC8vcGFyc2UgY2hhcmFjdGVyIHNldFxuICAgICAgICAgICAgdG1wU3RyICs9ICdbJztcbiAgICAgICAgICAgIHNvdXJjZVswXSArPSAnWyc7XG4gICAgICAgICAgICBpZiAocG9zSW5kZXhPcmlnSW5kZXhbMF0gKyAxID09PSByZWdleC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICBjaGFyQXQgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgd2hpbGUgKChjaGFyQXQgIT09ICddJyB8fCAocmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdIC0gMSkgPT09ICdcXFxcJyAmJiByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0gLSAyKSAhPT0gJ1xcXFwnKSkgJiYgcG9zSW5kZXhPcmlnSW5kZXhbMF0gPCByZWdleC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB0bXBTdHIgKz0gY2hhckF0O1xuICAgICAgICAgICAgICAgIHNvdXJjZVswXSArPSBjaGFyQXQ7XG4gICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICBjaGFyQXQgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdG1wU3RyICs9IGNoYXJBdDtcbiAgICAgICAgICAgIHNvdXJjZVswXSArPSBjaGFyQXQ7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY2hhckF0ID09PSAnfCcpIHtcbiAgICAgICAgICAgIC8vZmluYWxpemUgcGVuZGluZyB0bXAgZ3JvdXAgc3RyaW5nIGlmIGFueVxuICAgICAgICAgICAgLy8yMDE3MDMyNyAtIHRoaXMgaXMgbm90IG5lY2Vzc2FyeVxuICAgICAgICAgICAgLy8gaWYgKHRtcFN0ciAmJiBncm91cFN0cnVjdHVyZVszXS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAvLyAgICAgLy9jb21wbGV0ZSBncm91cGluZzogcHV0IHRyYWlsaW5nIGFuZCBwZW5kaW5nIGNoYXJhY3RlcnMgc2VxdWVuY2VzIGludG8gZ3JvdXBzXG4gICAgICAgICAgICAvLyAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMV0rKztcbiAgICAgICAgICAgIC8vICAgICB0bXBTdHIgPSAnKCcgKyB0bXBTdHIgKyAnKSc7XG4gICAgICAgICAgICAvLyAgICAgZ3JvdXBTdHJ1Y3R1cmVbM10ucHVzaChbcG9zSW5kZXhPcmlnSW5kZXhbMV0sICwgdG1wU3RyLCBbXV0pO1xuICAgICAgICAgICAgLy8gfVxuICAgICAgICAgICAgZ3JvdXBTdHJ1Y3R1cmVbMl0gKz0gdG1wU3RyICsgJ3wnO1xuICAgICAgICAgICAgdG1wU3RyID0gJyc7XG4gICAgICAgICAgICBzb3VyY2VbMF0gKz0gJ3wnO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNoYXJBdCA9PT0gJyknKSB7XG4gICAgICAgICAgICAvL2hhbmRsZSBncm91cCBlbmRpbmdcbiAgICAgICAgICAgIC8vMjAxNzAzMjcgLSBub3QgcmVxdWlyZWQgdG8gZ3JvdXAgaGVyZSBiZWNhdXNlIGl0IGlzIGFscmVhZHkgY29udGFpbmVkIGluIGEgcGFyZW50IGdyb3VwXG4gICAgICAgICAgICAvLyBpZiAodG1wU3RyICYmIGdyb3VwU3RydWN0dXJlWzNdLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIC8vICAgICAvL2NvbXBsZXRlIGdyb3VwaW5nOiBwdXQgdHJhaWxpbmcgYW5kIHBlbmRpbmcgY2hhcmFjdGVycyBzZXF1ZW5jZXMgaW50byBncm91cHNcbiAgICAgICAgICAgIC8vICAgICBwb3NJbmRleE9yaWdJbmRleFsxXSsrO1xuICAgICAgICAgICAgLy8gICAgIHRtcFN0ciA9ICcoJyArIHRtcFN0ciArICcpJztcbiAgICAgICAgICAgIC8vICAgICBncm91cFN0cnVjdHVyZVszXS5wdXNoKFtwb3NJbmRleE9yaWdJbmRleFsxXSwgLCB0bXBTdHIsIFtdXSk7XG4gICAgICAgICAgICAvLyB9XG4gICAgICAgICAgICBncm91cFN0cnVjdHVyZVsyXSArPSB0bXBTdHIgKyAnKSc7XG4gICAgICAgICAgICBzb3VyY2VbMF0gKz0gJyknO1xuICAgICAgICAgICAgcmV0dXJuIGdyb3VwU3RydWN0dXJlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjaGFyQXQgPT09ICcoJykge1xuICAgICAgICAgICAgLy9oYW5kbGUgZ3JvdXAgc3RhcnRcbiAgICAgICAgICAgIGlmICh0bXBTdHIpIHtcbiAgICAgICAgICAgICAgICAvL2NvbXBsZXRlIGdyb3VwaW5nOiBwdXQgdHJhaWxpbmcgYW5kIHBlbmRpbmcgY2hhcmFjdGVycyBzZXF1ZW5jZXMgaW50byBub24gcmVtZW1iZXJpbmcgZ3JvdXBzXG4gICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMV0rKztcbiAgICAgICAgICAgICAgICB0bXBTdHIgPSAnKCcgKyB0bXBTdHIgKyAnKSc7XG4gICAgICAgICAgICAgICAgZ3JvdXBTdHJ1Y3R1cmVbM10ucHVzaChbcG9zSW5kZXhPcmlnSW5kZXhbMV0sIHVuZGVmaW5lZCwgdG1wU3RyLCBbXV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgIHZhciByZWdleEdyb3VwU3RydWN0dXJlSW50ZXJuYWw7XG4gICAgICAgICAgICB2YXIgaWR4ID0gcG9zSW5kZXhPcmlnSW5kZXhbMV0gKyAxO1xuICAgICAgICAgICAgaXNDYXB0dXJpbmdHcm91cCA9IHRydWU7XG4gICAgICAgICAgICAvLyBjaGVjayB3aGV0aGVyIGdyb3VwIGlzIGFuIGFzc2VydGlvblxuICAgICAgICAgICAgaWYgKHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSkgPT09ICc/JyAmJiBwb3NJbmRleE9yaWdJbmRleFswXSArIDEgPCByZWdleC5sZW5ndGggJiYgKHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSArIDEpID09PSAnPScgfHwgcmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdICsgMSkgPT09ICchJyB8fCByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0gKyAxKSA9PT0gJzonKSkge1xuICAgICAgICAgICAgICAgIC8vSGFuZGxlIGFzc2VydGlvblxuICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgdmFyIGFzc2VydGlvbkNoYXIgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgLy93ZSBvbmx5IHNldCBpc0NhcHR1cmluZ0dyb3VwIHRvIGZhbHNlIGluIGNhc2Ug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hbMF07XG4gICAgICAgICAgICB2YXIgcXVhbnRpZmllclN0cmluZyA9ICcnO1xuICAgICAgICAgICAgaWYgKHBvc0luZGV4T3JpZ0luZGV4WzBdICsgMSA8IHJlZ2V4Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIC8vcGFyc2UgcXVhbnRpZmllclxuICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSArIDEpO1xuICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICcqJykge1xuICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nID0gJyonO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhckF0ID09PSAnKycpIHtcbiAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyA9ICcrJztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYXJBdCA9PT0gJz8nKSB7XG4gICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgPSAnPyc7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaGFyQXQgPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nID0gJ3snO1xuICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hhckF0ID49ICcwJyAmJiBjaGFyQXQgPD0gJzknICYmIHBvc0luZGV4T3JpZ0luZGV4WzBdIDwgcmVnZXgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyQXQgPSByZWdleC5jaGFyQXQocG9zSW5kZXhPcmlnSW5kZXhbMF0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChjaGFyQXQgPT09ICd9Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpZmllclN0cmluZyArPSAnfSc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hhckF0ID09PSAnLCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nICs9ICcsJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NJbmRleE9yaWdJbmRleFswXSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJBdCA9IHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoYXJBdCA+PSAnMCcgJiYgY2hhckF0IDw9ICc5JyAmJiBwb3NJbmRleE9yaWdJbmRleFswXSA8IHJlZ2V4Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWFudGlmaWVyU3RyaW5nICs9IGNoYXJBdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zSW5kZXhPcmlnSW5kZXhbMF0rKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhckF0ID0gcmVnZXguY2hhckF0KHBvc0luZGV4T3JpZ0luZGV4WzBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoYXJBdCA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgKz0gJ30nO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aWZpZXJTdHJpbmcgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocXVhbnRpZmllclN0cmluZy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlZ2V4R3JvdXBTdHJ1Y3R1cmVJbnRlcm5hbFsyXSArPSBxdWFudGlmaWVyU3RyaW5nO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VbMF0gKz0gcXVhbnRpZmllclN0cmluZztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlZ2V4LmNoYXJBdChwb3NJbmRleE9yaWdJbmRleFswXSArIDEpID09PSAnPycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvc0luZGV4T3JpZ0luZGV4WzBdKys7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWdleEdyb3VwU3RydWN0dXJlSW50ZXJuYWxbMl0gKz0gJz8nO1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlWzBdICs9ICc/JztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZW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lckNhY2hlID0gY3IobnVsbCk7XG4gICAgdmFyIGdldHRlckNhY2hlID0gY3IobnVsbCk7XG4gICAgY2FsbGVyQ2FjaGVbXCIgc2l6ZVwiXSA9IGdldHRlckNhY2hlW1wiIHNpemVcIl0gPSAwO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKFByb21pc2UpIHtcbnZhciB1dGlsID0gX2RlcmVxXyhcIi4vdXRpbFwiKTtcbnZhciBjYW5FdmFsdWF0ZSA9IHV0aWwuY2FuRXZhbHVhdGU7XG52YXIgaXNJZGVudGlmaWVyID0gdXRpbC5pc0lkZW50aWZpZXI7XG5cbnZhciBnZXRNZXRob2RDYWxsZXI7XG52YXIgZ2V0R2V0dGVyO1xuaWYgKCF0cnVlKSB7XG52YXIgbWFrZU1ldGhvZENhbGxlciA9IGZ1bmN0aW9uIChtZXRob2ROYW1lKSB7XG4gICAgcmV0dXJuIG5ldyBGdW5jdGlvbihcImVuc3VyZU1ldGhvZFwiLCBcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIHJldHVybiBmdW5jdGlvbihvYmopIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAndXNlIHN0cmljdCcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB2YXIgbGVuID0gdGhpcy5sZW5ndGg7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBlbnN1cmVNZXRob2Qob2JqLCAnbWV0aG9kTmFtZScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBzd2l0Y2gobGVuKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gb2JqLm1ldGhvZE5hbWUodGhpc1swXSk7ICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gb2JqLm1ldGhvZE5hbWUodGhpc1swXSwgdGhpc1sxXSk7ICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgY2FzZSAzOiByZXR1cm4gb2JqLm1ldGhvZE5hbWUodGhpc1swXSwgdGhpc1sxXSwgdGhpc1syXSk7ICAgIFxcblxcXG4gICAgICAgICAgICAgICAgY2FzZSAwOiByZXR1cm4gb2JqLm1ldGhvZE5hbWUoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmoubWV0aG9kTmFtZS5hcHBseShvYmosIHRoaXMpOyAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIFwiLnJlcGxhY2UoL21ldGhvZE5hbWUvZywgbWV0aG9kTmFtZSkpKGVuc3VyZU1ldGhvZCk7XG59O1xuXG52YXIgbWFrZUdldHRlciA9IGZ1bmN0aW9uIChwcm9wZXJ0eU5hbWUpIHtcbiAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKFwib2JqXCIsIFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgJ3VzZSBzdHJpY3QnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgcmV0dXJuIG9iai5wcm9wZXJ0eU5hbWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgXCIucmVwbGFjZShcInByb3BlcnR5TmFtZVwiLCBwcm9wZXJ0eU5hbWUpKTtcbn07XG5cbnZhciBnZXRDb21waWxlZCA9IGZ1bmN0aW9uKG5hbWUsIGNvbXBpbGVyLCBjYWNoZSkge1xuICAgIHZhciByZXQgPSBjYWNoZVtuYW1lXTtcbiAgICBpZiAodHlwZW9mIHJldCAhPT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgIGlmICghaXNJZGVudGlmaWVyKG5hbWUpKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICByZXQgPSBjb21waWxlcihuYW1lKTtcbiAgICAgICAgY2FjaGVbbmFtZV0gPSByZXQ7XG4gICAgICAgIGNhY2hlW1wiIHNpemVcIl0rKztcbiAgICAgICAgaWYgKGNhY2hlW1wiIHNpemVcIl0gPiA1MTIpIHtcbiAgICAgICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY2FjaGUpO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCAyNTY7ICsraSkgZGVsZXRlIGNhY2hlW2tleXNbaV1dO1xuICAgICAgICAgICAgY2FjaGVbXCIgc2l6ZVwiXSA9IGtleXMubGVuZ3RoIC0gMjU2O1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXQ7XG59O1xuXG5nZXRNZXRob2RDYWxsZXIgPSBmdW5jdGlvbihuYW1lKSB7XG4gICAgcmV0dXJuIGdldENvbXBpbGVkKG5hbWUsIG1ha2VNZXRob2RDYWxsZXIsIGNhbGxlckNhY2hlKTtcbn07XG5cbmdldEdldHRlciA9IGZ1bmN0aW9uKG5h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GNoZXNQcmVkaWNhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRyeUNhdGNoKGNiKS5jYWxsKGJvdW5kVG8sIGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodXRpbC5pc09iamVjdChlKSkge1xuICAgICAgICAgICAgICAgIHZhciBrZXlzID0gZ2V0S2V5cyhpdGVtKTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGtleXMubGVuZ3RoOyArK2opIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IGtleXNbal07XG4gICAgICAgICAgICAgICAgICAgIGlmIChpdGVtW2tleV0gIT0gZVtrZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBwcmVkaWNhdGVMb29wO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnlDYXRjaChjYikuY2FsbChib3VuZFRvLCBlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTkVYVF9GSUxURVI7XG4gICAgfTtcbn1cblxucmV0dXJuIGNhdGNoRmlsdGVyO1xufTtcblxufSx7XCIuL2VzNVwiOjEzLFwiLi91dGlsXCI6MzZ9XSw4OltmdW5jdGlvbihfZGVyZXFfLG1vZHVsZSxleHBvcnRzKXtcblwidXNlIHN0cmljdFwiO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbihQcm9taXNlKSB7XG52YXIgbG9uZ1N0YWNrVHJhY2VzID0gZmFsc2U7XG52YXIgY29udGV4dFN0YWNrID0gW107XG5cblByb21pc2UucHJvdG90eXBlLl9wcm9taXNlQ3JlYXRlZCA9IGZ1bmN0aW9uKCkge307XG5Qcm9taXNlLnByb3RvdHlwZS5fcHVzaENvbnRleHQgPSBmdW5jdGlvbigpIHt9O1xuUHJvbWlzZS5wcm90b3R5c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vbWlzZSB8fCB0aGlzKTtcbn07XG5cblByb21pc2Uub25Qb3NzaWJseVVuaGFuZGxlZFJlamVjdGlvbiA9IGZ1bmN0aW9uIChmbikge1xuICAgIHZhciBkb21haW4gPSBnZXREb21haW4oKTtcbiAgICBwb3NzaWJseVVuaGFuZGxlZFJlamVjdGlvbiA9XG4gICAgICAgIHR5cGVvZiBmbiA9PT0gXCJmdW5jdGlvblwiID8gKGRvbWFpbiA9PT0gbnVsbCA/XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZuIDogdXRpbC5kb21haW5CaW5kKGRvbWFpbiwgZm4pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQ7XG59O1xuXG5Qcm9taXNlLm9uVW5oYW5kbGVkUmVqZWN0aW9uSGFuZGxlZCA9IGZ1bmN0aW9uIChmbikge1xuICAgIHZhciBkb21haW4gPSBnZXREb21haW4oKTtcbiAgICB1bmhhbmRsZWRSZWplY3Rpb25IYW5kbGVkID1cbiAgICAgICAgdHlwZW9mIGZuID09PSBcImZ1bmN0aW9uXCIgPyAoZG9tYWluID09PSBudWxsID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm4gOiB1dGlsLmRvbWFpbkJpbmQoZG9tYWluLCBmbikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbn07XG5cbnZhciBkaXNhYmxlTG9uZ1N0YWNrVHJhY2VzID0gZnVuY3Rpb24oKSB7fTtcblByb21pc2UubG9uZ1N0YWNrVHJhY2VzID0gZnVuY3Rpb24gKCkge1xuICAgIGlmIChhc3luYy5oYXZlSXRlbXNRdWV1ZWQoKSAmJiAhY29uZmlnLmxvbmdTdGFja1RyYWNlcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJjYW5ub3QgZW5hYmxlIGxvbmcgc3RhY2sgdHJhY2VzIGFmdGVyIH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rpb25cIikge1xuICAgICAgICAgICAgdmFyIGV2ZW50ID0gbmV3IEN1c3RvbUV2ZW50KFwiQ3VzdG9tRXZlbnRcIik7XG4gICAgICAgICAgICB1dGlsLmdsb2JhbC5kaXNwYXRjaEV2ZW50KGV2ZW50KTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbihuYW1lLCBldmVudCkge1xuICAgICAgICAgICAgICAgIHZhciBldmVudERhdGEgPSB7XG4gICAgICAgICAgICAgICAgICAgIGRldGFpbDogZXZlbnQsXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbGFibGU6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGVzNS5kZWZpbmVQcm9wZXJ0eShcbiAgICAgICAgICAgICAgICAgICAgZXZlbnREYXRhLCBcInByb21pc2VcIiwge3ZhbHVlOiBldmVudC5wcm9taXNlfSk7XG4gICAgICAgICAgICAgICAgZXM1LmRlZmluZVByb3BlcnR5KGV2ZW50RGF0YSwgXCJyZWFzb25cIiwge3ZhbHVlOiBldmVudC5yZWFzb259KTtcbiAgICAgICAgICAgICAgICB2YXIgZG9tRXZlbnQgPSBuZXcgQ3VzdG9tRXZlbnQobmFtZS50b0xvd2VyQ2FzZSgpLCBldmVudERhdGEpO1xuICAgICAgICAgICAgICAgIHJldHVybiAhdXRpbC5nbG9iYWwuZGlzcGF0Y2hFdmVudChkb21FdmVudCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBFdmVudCA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICB2YXIgZXZlbnQgPSBuZXcgRXZlbnQoXCJDdXN0b21FdmVudFwiKTtcbiAgICAgICAgICAgIHV0aWwuZ2xvYmFsLmRpc3BhdGNoRXZlbnQoZXZlbnQpO1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG5hbWUsIGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIGRvbUV2ZW50ID0gbmV3IEV2ZW50KG5hbWUudG9Mb3dlckNhc2UoKSwge1xuICAgICAgICAgICAgICAgICAgICBjYW5jZWxhYmxlOiB0cnVlXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgZG9tRXZlbnQuZGV0YWlsID0gZXZlbnQ7XG4gICAgICAgICAgICAgICAgZXM1LmRlZmluZVByb3BlcnR5KGRvbUV2ZW50LCBcInByb21pc2VcIiwge3ZhbHVlOiBldmVudC5wcm9taXNlfSk7XG4gICAgICAgICAgICAgICAgZXM1LmRlZmluZVByb3BlcnR5KGRvbUV2ZW50LCBcInJlYXNvblwiLCB7dmFsdWU6IGV2ZW50LnJlYXNvbn0pO1xuICAgICAgICAgICAgICAgIHJldHVybiAhdXRpbC5nbG9iYWwuZGlzcGF0Y2hFdmVudChkb21FdmVudCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGV2ZW50ID0gZG9jdW1lbnQuY3JlYXRlRXZlbnQoXCJDdXN0b21FdmVudFwiKTtcbiAgICAgICAgICAgIGV2ZW50LmluaXRDdXN0b21FdmVudChcInRlc3Rpbmd0aGVldmVudFwiLCBmYWxzZSwgdHJ1ZSwge30pO1xuICAgICAgICAgICAgdXRpbC5nbG9iYWwuZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24obmFtZSwgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgZG9tRXZlbnQgPSBkb2N1bWVudC5jcmVhdGVFdmVudChcIkN1c3RvbUV2ZW50XCIpO1xuICAgICAgICAgICAgICAgIGRvbUV2ZW50LmluaXRDdXN0b21FdmVudChuYW1lLnRvTG93ZXJDYXNlKCksIGZhbHNlLCB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBldmVudCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICF1dGlsLmdsb2JhbC5kaXNwYXRjaEV2ZW50KGRv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lwiO1xuICAgICAgICBpZiAocHJvbWlzZUNyZWF0ZWQuX3RyYWNlKSB7XG4gICAgICAgICAgICB2YXIgdHJhY2VMaW5lcyA9IHByb21pc2VDcmVhdGVkLl90cmFjZS5zdGFjay5zcGxpdChcIlxcblwiKTtcbiAgICAgICAgICAgIHZhciBzdGFjayA9IGNsZWFuU3RhY2sodHJhY2VMaW5lcyk7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gc3RhY2subGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHN0YWNrW2ldO1xuICAgICAgICAgICAgICAgIGlmICghbm9kZUZyYW1lUGF0dGVybi50ZXN0KGxpbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5lTWF0Y2hlcyA9IGxpbmUubWF0Y2gocGFyc2VMaW5lUGF0dGVybik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsaW5lTWF0Y2hlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlckxpbmUgID0gXCJhdCBcIiArIGxpbmVNYXRjaGVzWzFdICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIjpcIiArIGxpbmVNYXRjaGVzWzJdICsgXCI6XCIgKyBsaW5lTWF0Y2hlc1szXSArIFwiIFwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHN0YWNrLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgZmlyc3RVc2VyTGluZSA9IHN0YWNrWzBdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdHJhY2VMaW5lcy5sZW5ndGg7ICsraSkge1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmFjZUxpbmVzW2ldID09PSBmaXJzdFVzZXJMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdG9yTGluZSA9IFwiXFxuXCIgKyB0cmFjZUxpbmVzW2kgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG1zZyA9IFwiYSBwcm9taXNlIHdhcyBjcmVhdGVkIGluIGEgXCIgKyBuYW1lICtcbiAgICAgICAgICAgIFwiaGFuZGxlciBcIiArIGhhbmRsZXJMaW5lICsgXCJidXQgd2FzIG5vdCByZXR1cm5lZCBmcm9tIGl0LCBcIiArXG4gICAgICAgICAgICBcInNlZSBodHRwOi8vZ29vLmdsL3JScU1Vd1wiICtcbiAgICAgICAgICAgIGNyZWF0b3JMaW5lO1xuICAgICAgICBwcm9taXNlLl93YXJuKG1zZywgdHJ1ZSwgcHJvbWlzZUNyZWF0ZWQpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZGVwcmVjYXRlZChuYW1lLCByZXBsYWNlbWVudCkge1xuICAgIHZhciBtZXNzYWdlID0gbmFtZSArXG4gICAgICAgIFwiIGlzIGRlcHJlY2F0ZWQgYW5kIHdpbGwgYmUgcmVtb3ZlZCBpbiBhIGZ1dHVyZSB2ZXJzaW9uLlwiO1xuICAgIGlmIChyZXBsYWNlbWVudCkgbWVzc2FnZSArPSBcIiBVc2UgXCIgKyByZXBsYWNlbWVudCArIFwiIGluc3RlYWQuXCI7XG4gICAgcmV0dXJuIHdhcm4obWVzc2FnZSk7XG59XG5cbmZ1bmN0aW9uIHdhcm4obWVzc2FnZSwgc2hvdWxkVXNlT3duVHJhY2UsIHByb21pc2UpIHtcbiAgICBpZiAoIWNvbmZpZy53YXJuaW5ncykgcmV0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YWdlICsgXCJcXG5cIiArIHN0YWNrcy5qb2luKFwiXFxuXCIpO1xufVxuXG5mdW5jdGlvbiByZW1vdmVEdXBsaWNhdGVPckVtcHR5SnVtcHMoc3RhY2tzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzdGFja3MubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgaWYgKHN0YWNrc1tpXS5sZW5ndGggPT09IDAgfHxcbiAgICAgICAgICAgICgoaSArIDEgPCBzdGFja3MubGVuZ3RoKSAmJiBzdGFja3NbaV1bMF0gPT09IHN0YWNrc1tpKzFdWzBdKSkge1xuICAgICAgICAgICAgc3RhY2tzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZnVuY3Rpb24gcmVtb3ZlQ29tbW9uUm9vdHMoc3RhY2tzKSB7XG4gICAgdmFyIGN1cnJlbnQgPSBzdGFja3NbMF07XG4gICAgZm9yICh2YXIgaSA9IDE7IGkgPCBzdGFja3MubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgdmFyIHByZXYgPSBzdGFja3NbaV07XG4gICAgICAgIHZhciBjdXJyZW50TGFzdEluZGV4ID0gY3VycmVudC5sZW5ndGggLSAxO1xuICAgICAgICB2YXIgY3VycmVudExhc3RMaW5lID0gY3VycmVudFtjdXJyZW50TGFzdEluZGV4XTtcbiAgICAgICAgdmFyIGNvbW1vblJvb3RNZWV0UG9pbnQgPSAtMTtcblxuICAgICAgICBmb3IgKHZhciBqID0gcHJldi5sZW5ndGggLSAxOyBqID49IDA7IC0taikge1xuICAgICAgICAgICAgaWYgKHByZXZbal0gPT09IGN1cnJlbnRMYXN0TGluZSkge1xuICAgICAgICAgICAgICAgIGNvbW1vblJvb3RNZWV0UG9pbnQgPSBqO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaiA9IGNvbW1vblJvb3RNZWV0UG9pbnQ7IGogPj0gMDsgLS1qKSB7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHByZXZbal07XG4gICAgICAgICAgICBpZiAoY3VycmVudFtjdXJyZW50TGFzdEluZGV4XSA9PT0gbGluZSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnQucG9wKCk7XG4gICAgICAgICAgICAgICAgY3VycmVudExhc3RJbmRleC0tO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjdXJyZW50ID0gcHJldjtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIGNsZWFuU3RhY2soc3RhY2spIHtcbiAgICB2YXIgcmV0ID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzdGFjay5sZW5ndGg7ICsraSkge1xuICAgICAgICB2YXIgbGluZSA9IHN0YWNrW2ldO1xuICAgICAgICB2YXIgaXNUcmFjZUxpbmUgPSBcIiAgICAoTm8gc3RhY2sgdHJhY2UpXCIgPT09IGxpbmUgfHxcbiAgICAgICAgICAgIHN0YWNrRnJhbWVQYXR0ZXJuLnRlc3QobGluZSk7XG4gICAgICAgIHZhciBpc0ludGVybmFsRnJhbWUgPSBpc1RyYWNlTGluZSAmJiBzaG91bGRJZ25vcmUobGluZSk7XG4gICAgICAgIGlmIChpc1RyYWNlTGluZSAmJiAhaXNJbnRlcm5hbEZyYW1lKSB7XG4gICAgICAgICAgICBpZiAoaW5kZW50U3RhY2tGcmFtZXMgJiYgbGluZS5jaGFyQXQoMCkgIT09IFwiIFwiKSB7XG4gICAgICAgICAgICAgICAgbGluZSA9IFwiICAgIFwiICsgbGluZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldC5wdXNoKGxpbmUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXQ7XG59XG5cbmZ1bmN0aW9uIHN0YWNrRnJhbWVzQXNBcnJheShlc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E9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHZhciBtZXNzYWdlO1xuICAgICAgICBpZiAodXRpbC5pc09iamVjdChlcnJvcikpIHtcbiAgICAgICAgICAgIHZhciBzdGFjayA9IGVycm9yLnN0YWNrO1xuICAgICAgICAgICAgbWVzc2FnZSA9IHRpdGxlICsgZm9ybWF0U3RhY2soc3RhY2ssIGVycm9yKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1lc3NhZ2UgPSB0aXRsZSArIFN0cmluZyhlcnJvcik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHR5cGVvZiBwcmludFdhcm5pbmcgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgcHJpbnRXYXJuaW5nKG1lc3NhZ2UsIGlzU29mdCk7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGNvbnNvbGUubG9nID09PSBcImZ1bmN0aW9uXCIgfHxcbiAgICAgICAgICAgIHR5cGVvZiBjb25zb2xlLmxvZyA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgY29uc29sZS5sb2cobWVzc2FnZSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmZ1bmN0aW9uIGZpcmVSZWplY3Rpb25FdmVudChuYW1lLCBsb2NhbEhhbmRsZXIsIHJlYXNvbiwgcHJvbWlzZSkge1xuICAgIHZhciBsb2NhbEV2ZW50RmlyZWQgPSBmYWxzZTtcbiAgICB0cnkge1xuICAgICAgICBpZiAodHlwZW9mIGxvY2FsSGFuZGxlciA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICBsb2NhbEV2ZW50RmlyZWQgPSB0cnVlO1xuICAgICAgICAgICAgaWYgKG5hbWUgPT09IFwicmVqZWN0aW9uSGFuZGxlZFwiKSB7XG4gICAgICAgICAgICAgICAgbG9jYWxIYW5kbGVyKHByb21pc2UpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsb2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uICAgICAgICAgICAgICAgIG5vZGVzW2luZGV4IC0gMV0uX3BhcmVudCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBub2Rlc1tpbmRleCAtIDFdLl9sZW5ndGggPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbm9kZXNbaV0uX3BhcmVudCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIG5vZGVzW2ldLl9sZW5ndGggPSAxO1xuICAgICAgICAgICAgdmFyIGN5Y2xlRWRnZU5vZGUgPSBpID4gMCA/IG5vZGVzW2kgLSAxXSA6IHRoaXM7XG5cbiAgICAgICAgICAgIGlmIChpbmRleCA8IGxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICBjeWNsZUVkZ2VOb2RlLl9wYXJlbnQgPSBub2Rlc1tpbmRleCArIDFdO1xuICAgICAgICAgICAgICAgIGN5Y2xlRWRnZU5vZGUuX3BhcmVudC51bmN5Y2xlKCk7XG4gICAgICAgICAgICAgICAgY3ljbGVFZGdlTm9kZS5fbGVuZ3RoID1cbiAgICAgICAgICAgICAgICAgICAgY3ljbGVFZGdlTm9kZS5fcGFyZW50Ll9sZW5ndGggKyAxO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjeWNsZUVkZ2VOb2RlLl9wYXJlbnQgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgY3ljbGVFZGdlTm9kZS5fbGVuZ3RoID0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBjdXJyZW50Q2hpbGRMZW5ndGggPSBjeWNsZUVkZ2VOb2RlLl9sZW5ndGggKyAxO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IGkgLSAyOyBqID49IDA7IC0taikge1xuICAgICAgICAgICAgICAgIG5vZGVzW2pdLl9sZW5ndGggPSBjdXJyZW50Q2hpbGRMZW5ndGg7XG4gICAgICAgICAgICAgICAgY3VycmVudENoaWxkTGVuZ3RoKys7XG4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b24oc3RhY2ssIGVycm9yKSB7XG4gICAgICAgIGlmICh0eXBlb2Ygc3RhY2sgPT09IFwic3RyaW5nXCIpIHJldHVybiBzdGFjaztcblxuICAgICAgICBpZiAoZXJyb3IubmFtZSAhPT0gdW5kZWZpbmVkICYmXG4gICAgICAgICAgICBlcnJvci5tZXNzYWdlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBlcnJvci50b1N0cmluZygpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmb3JtYXROb25FcnJvcihlcnJvcik7XG4gICAgfTtcblxuICAgIGlmICh0eXBlb2YgRXJyb3Iuc3RhY2tUcmFjZUxpbWl0ID09PSBcIm51bWJlclwiICYmXG4gICAgICAgIHR5cGVvZiBFcnJvci5jYXB0dXJlU3RhY2tUcmFjZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgIEVycm9yLnN0YWNrVHJhY2VMaW1pdCArPSA2O1xuICAgICAgICBzdGFja0ZyYW1lUGF0dGVybiA9IHY4c3RhY2tGcmFtZVBhdHRlcm47XG4gICAgICAgIGZvcm1hdFN0YWNrID0gdjhzdGFja0Zvcm1hdHRlcjtcbiAgICAgICAgdmFyIGNhcHR1cmVTdGFja1RyYWNlID0gRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2U7XG5cbiAgICAgICAgc2hvdWxkSWdub3JlID0gZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgcmV0dXJuIGJsdWViaXJkRnJhbWVQYXR0ZXJuLnRlc3QobGluZSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBmdW5jdGlvbihyZWNlaXZlciwgaWdub3JlVW50aWwpIHtcbiAgICAgICAgICAgIEVycm9yLnN0YWNrVHJhY2VMaW1pdCArPSA2O1xuICAgICAgICAgICAgY2FwdHVyZVN0YWNrVHJhY2UocmVjZWl2ZXIsIGlnbm9yZVVudGlsKTtcbiAgICAgICAgICAgIEVycm9yLnN0YWNrVHJhY2VMaW1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jdGlvbihvYmosIHByb3ApIHtcbiAgICAgICAgICAgIHZhciBkZXNjcmlwdG9yID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIHByb3ApO1xuICAgICAgICAgICAgcmV0dXJuICEhKCFkZXNjcmlwdG9yIHx8IGRlc2NyaXB0b3Iud3JpdGFibGUgfHwgZGVzY3JpcHRvci5zZXQpO1xuICAgICAgICB9XG4gICAgfTtcbn0gZWxzZSB7XG4gICAgdmFyIGhhcyA9IHt9Lmhhc093blByb3BlcnR5O1xuICAgIHZhciBzdHIgPSB7fS50b1N0cmluZztcbiAgICB2YXIgcHJvdG8gPSB7fS5jb25zdHJ1Y3Rvci5wcm90b3R5cGU7XG5cbiAgICB2YXIgT2JqZWN0S2V5cyA9IGZ1bmN0aW9uIChvKSB7XG4gICAgICAgIHZhciByZXQgPSBbXTtcbiAgICAgICAgZm9yICh2YXIga2V5IGluIG8pIHtcbiAgICAgICAgICAgIGlmIChoYXMuY2FsbChvLCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgcmV0LnB1c2goa2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH07XG5cbiAgICB2YXIgT2JqZWN0R2V0RGVzY3JpcHRvciA9IGZ1bmN0aW9uKG8sIGtleSkge1xuICAgICAgICByZXR1cm4ge3ZhbHVlOiBvW2tleV19O1xuICAgIH07XG5cbiAgICB2YXIgT2JqZWN0RGVmaW5lUHJvcGVydHkgPSBmdW5jdGlvbiAobywga2V5LCBkZXNjKSB7XG4gICAgICAgIG9ba2V5XSA9IGRlc2MudmFsdWU7XG4gICAgICAgIHJldHVybiBvO1xuICAgIH07XG5cbiAgICB2YXIgT2JqZWN0RnJlZXplID0gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH07XG5cbiAgICB2YXIgT2JqZWN0R2V0UHJvdG90eXBlT2YgPSBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gT2JqZWN0KG9iaikuY29uc3RydWN0b3IucHJvdG90eXBlO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJvdG87XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIEFycmF5SXNBcnJheSA9IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJldHVybiBzdHIuY2FsbChvYmopID09PSBcIltvYmplY3QgQXJyYXldXCI7XG4gICAgICAgIH1cbiAgICAgICAgY2F0Y2goZSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIG1vZHVsZS5leHBvcnRzID0ge1xuICAgICAgICBpc0FycmF5OiBBcnJheUlzQXJyYXksXG4gICAgICAgIGtleXM6IE9iamVjdEtleXMsXG4gICAgICAgIG5hbWVzOiBPYmplY3RLZXlzLFxuICAgICAgICBkZWZpbmVQcm9wZXJ0eTogT2JqZWN0RGVmaW5lUHJvcGVydHksXG4gICAgICAgIGdldERlc2NyaXB0b3I6IE9iamVjdEdldERlc2NyaXB0b3IsXG4gICAgICAgIGZyZWV6ZTogT2JqZWN0RnJlZXplLFxuICAgICAgICBnZXRQcm90b3R5cGVPZjogT2JqZWN0R2V0UHJvdG90eXBlT2YsXG4gICAgICAgIGlzRVM1OiBpc0VTNSxcbiAgICAgICAgcHJvcGVydHlJc1dyaXRhYmxlOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxufSx7fV0sMTQ6W2Z1bmN0aW9uKF9kZXJlcV8sbW9kdWxlLGV4cG9ydHMpe1xuXCJ1c2Ugc3RyaWN0XCI7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKFByb21pc2UsIElOVEVSTkFM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m4gZXJyb3JPYmo7XG59XG5mdW5jdGlvbiBmaW5hbGx5SGFuZGxlcihyZWFzb25PclZhbHVlKSB7XG4gICAgdmFyIHByb21pc2UgPSB0aGlzLnByb21pc2U7XG4gICAgdmFyIGhhbmRsZXIgPSB0aGlzLmhhbmRsZXI7XG5cbiAgICBpZiAoIXRoaXMuY2FsbGVkKSB7XG4gICAgICAgIHRoaXMuY2FsbGVkID0gdHJ1ZTtcbiAgICAgICAgdmFyIHJldCA9IHRoaXMuaXNGaW5hbGx5SGFuZGxlcigpXG4gICAgICAgICAgICA/IGhhbmRsZXIuY2FsbChwcm9taXNlLl9ib3VuZFZhbHVlKCkpXG4gICAgICAgICAgICA6IGhhbmRsZXIuY2FsbChwcm9taXNlLl9ib3VuZFZhbHVlKCksIHJlYXNvbk9yVmFsdWUpO1xuICAgICAgICBpZiAocmV0ID09PSBORVhUX0ZJTFRFUikge1xuICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfSBlbHNlIGlmIChyZXQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcHJvbWlzZS5fc2V0UmV0dXJuZWROb25VbmRlZmluZWQoKTtcbiAgICAgICAgICAgIHZhciBtYXliZVByb21pc2UgPSB0cnlDb252ZXJ0VG9Qcm9taXNlKHJldCwgcHJvbWlzZSk7XG4gICAgICAgICAgICBpZiAobWF5YmVQcm9taXNlIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNhbmNlbFByb21pc2UgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWF5YmVQcm9taXNlLl9pc0NhbmNlbGxlZCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVhc29uID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgQ2FuY2VsbGF0aW9uRXJyb3IoXCJsYXRlIGNhbmNlbGxhdGlvbiBvYnNlcnZlclwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2UuX2F0dGFjaEV4dHJhVHJhY2UocmVhc29uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yT2JqLmUgPSByZWFzb247XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3JPYmo7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF5YmVQcm9taXNlLmlzUGVuZGluZygpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UuX2F0dGFjaENhbmNlbGxhdGlvbkNhbGxiYWNrKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBGaW5hbGx5SGFuZGxlckNhbmNlbFJlYWN0aW9uKHRoaXMpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbWF5YmVQcm9taXNlLl90aGVuKFxuICAgICAgICAgICAgICAgICAgICBzdWNjZWVkLCBmYWlsLCB1bmRlZmluZWQsIHRoaXMsIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAocHJvbWlzZS5pc1JlamVjdGVkKCkpIHtcbiAgICAgICAgY2hlY2tDYW5jZWwodGhpcyk7XG4gICAgICAgIGVycm9yT2JqLmUgPSByZWFzb25PclZhbHVlO1xuICAgICAgICByZXR1cm4gZXJyb3JPYmo7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY2hlY2tDYW5jZWwodGhpcyk7XG4gICAgICAgIHJldHVybiByZWFzb25PclZhbHVlO1xuICAgIH1cbn1cblxuUHJvbWlzZS5wcm90b3R5cGUuX3Bhc3NUaHJvdWdoID0gZnVuY3Rpb24oaGFuZGxlciwgdHlwZSwgc3VjY2VzcywgZmFpbCkge1xuICAgIGlmICh0eXBlb2YgaGFuZGxlciAhPT0gXCJmdW5jdGlvblwiKSByZXR1cm4gdGhpcy50aGVuKCk7XG4gICAgcmV0dXJuIHRoaXMuX3RoZW4oc3VjY2VzcyxcbiAgICAgICAgICAgICAgICAgICAgICBmYWlsLFxuICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgICBuZXcgUGFzc1Rocm91Z2hIYW5kbGVyQ29udGV4dCh0aGlzLCB0eXBlLCBoYW5kbGVyKSxcbiAgICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQpO1xufTtcblxuUHJvbWlzZS5wcm90b3R5cGUubGFzdGx5ID1cblByb21pc2UucHJvdG90eXBlW1wiZmluYWxseVwiXSA9IGZ1bmN0aW9uIChoYW5kbGVyKSB7XG4gICAgcmV0dXJuIHRoaXMuX3Bhc3NUaHJvdWdoKGhhbmRsZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsbHlIYW5kbGVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5hbGx5SGFuZGxlcik7XG59O1xuXG5cblByb21pc2UucHJvdG90eXBlLnRhcCA9IGZ1bmN0aW9uIChoYW5kbGVyKSB7XG4gICAgcmV0dXJuIHRoaXMuX3Bhc3NUaHJvdWdoKGhhbmRsZXIsIDEsIGZpbmFsbHlIYW5kbGVyKTtcbn07XG5cblByb21pc2UucHJvdG90eXBlLnRhcENhdGNoID0gZnVuY3Rpb24gKGhhbmRsZXJPclByZWRpY2F0ZSkge1xuICAgIHZhciBsZW4gPSBhcmd1bWVudHMubGVuZ3RoO1xuICAgIGlmKGxlbiA9PT0gMSkge1xuICAgICAgICByZXR1cm4gdGhpcy5fcGFzc1Rocm91Z2goaGFuZGxlck9yUHJlZGljYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsbHlIYW5kbGVyKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICAgdmFyIGNhdGNoSW5zdGFuY2VzID0gbmV3IEFycmF5KGxlbiAtIDEpLFxuICAgICAgICAgICAgaiA9IDAsIGk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW4gLSAxOyArK2kpIHtcbiAgICAgICAgICAgIHZhciBpdGVtID0gYXJndW1lbnRzW2ldO1xuICAgICAgICAgICAgaWYgKHV0aWwuaXNPYmplY3QoaXRlbSkpIHtcbiAgICAgICAgICAgICAgICBjYXRjaEluc3RhbmNlc1tqKytdID0gaXRlbTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIFwidGFwQ2F0Y2ggc3RhdGVtZW50IHByZWRpY2F0ZTogXCJcbiAgICAgICAgICAgICAgICAgICAgKyBcImV4cGVjdGluZyBhbiBvYmplY3QgYnV0IGdvdCBcIiArIHV0aWwuY2xhc3NTdHJpbmcoaXRlbSlcbiAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjYXRjaEluc3RhbmNlcy5sZW5ndGggPSBqO1xuICAgICAgICB2YXIgaGFuZGxlciA9IGFyZ3VtZW50c1tpXTtcbiAgICAgICAgcmV0dXJuIHRoaXMuX3Bhc3NUaHJvdWdoKGNhdGNoRmlsdGVyKGNhdGNoSW5zdGFuY2VzLCBoYW5kbGVyLCB0aGlzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5hbGx5SGFuZGxlcik7XG4gICAgfVxuXG59O1xuXG5yZXR1cm4gUGFzc1Rocm91Z2hIYW5kbGVyQ29udGV4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mFsdWU7XG4gICAgaWYgKHJlc3VsdC5kb25lID09PSB0cnVlKSB7XG4gICAgICAgIHRoaXMuX2NsZWFudXAoKTtcbiAgICAgICAgaWYgKHRoaXMuX2NhbmNlbGxhdGlvblBoYXNlKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJvbWlzZS5jYW5jZWwoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlLl9yZXNvbHZlQ2FsbGJhY2sodmFsdWUpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UodmFsdWUsIHRoaXMuX3Byb21pc2UpO1xuICAgICAgICBpZiAoIShtYXliZVByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlKSkge1xuICAgICAgICAgICAgbWF5YmVQcm9taXNlID1cbiAgICAgICAgICAgICAgICBwcm9taXNlRnJvbVlpZWxkSGFuZGxlcihtYXliZVByb21pc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5feWllbGRIYW5kbGVycyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9taXNlKTtcbiAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9wcm9taXNlUmVqZWN0ZWQoXG4gICAgICAgICAgICAgICAgICAgIG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICBcIkEgdmFsdWUgJXMgd2FzIHlpZWxkZWQgdGhhdCBjb3VsZCBub3QgYmUgdHJlYXRlZCBhcyBhIHByb21pc2VcXHUwMDBhXFx1MDAwYSAgICBTZWUgaHR0cDovL2dvby5nbC9NcXJGbVhcXHUwMDBhXFx1MDAwYVwiLnJlcGxhY2UoXCIlc1wiLCBTdHJpbmcodmFsdWUpKSArXG4gICAgICAgICAgICAgICAgICAgICAgICBcIkZyb20gY29yb3V0aW5lOlxcdTAwMGFcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zdGFjay5zcGxpdChcIlxcblwiKS5zbGljZSgxLCAtNykuam9pbihcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbWF5YmVQcm9taXNlID0gbWF5YmVQcm9taXNlLl90YXJnZXQoKTtcbiAgICAgICAgdmFyIGJpdEZpZWxkID0gbWF5YmVQcm9taXNlLl9iaXRGaWVsZDtcbiAgICAgICAgO1xuICAgICAgICBpZiAoKChiaXRGaWVsZCAmIDUwMzk3MTg0KSA9PT0gMCkpIHtcbiAgICAgICAgICAgIHRoaXMuX3lpZWxkZWRQcm9taXNlID0gbWF5YmVQcm9taXNlO1xuICAgICAgICAgICAgbWF5YmVQcm9taXNlLl9wcm94eSh0aGlzLCBudWxsKTtcbiAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMzM1NTQ0MzIpICE9PSAwKSkge1xuICAgICAgICAgICAgUHJvbWlzZS5fYXN5bmMuaW52b2tlKFxuICAgICAgICAgICAgICAgIHRoaXMuX3Byb21pc2VGdWxmaWxsZWQsIHRoaXMsIG1heWJlUHJvbWlzZS5fdmFsdWUoKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMTY3NzcyMTYpICE9PSAwKSkge1xuICAgICAgICAgICAgUHJvbWlzZS5fYXN5bmMuaW52b2tlKFxuICAgICAgICAgICAgICAgIHRoaXMuX3Byb21pc2VSZWplY3RlZCwgdGhpcywgbWF5YmVQcm9taXNlLl9yZWFzb24oKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuX3Byb21pc2V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gIGdldERvbWFpbikge1xudmFyIHV0aWwgPSBfZGVyZXFfKFwiLi91dGlsXCIpO1xudmFyIGNhbkV2YWx1YXRlID0gdXRpbC5jYW5FdmFsdWF0ZTtcbnZhciB0cnlDYXRjaCA9IHV0aWwudHJ5Q2F0Y2g7XG52YXIgZXJyb3JPYmogPSB1dGlsLmVycm9yT2JqO1xudmFyIHJlamVjdDtcblxuaWYgKCF0cnVlKSB7XG5pZiAoY2FuRXZhbHVhdGUpIHtcbiAgICB2YXIgdGhlbkNhbGxiYWNrID0gZnVuY3Rpb24oaSkge1xuICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKFwidmFsdWVcIiwgXCJob2xkZXJcIiwgXCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAndXNlIHN0cmljdCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBob2xkZXIucEluZGV4ID0gdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBob2xkZXIuY2hlY2tGdWxmaWxsbWVudCh0aGlzKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBcIi5yZXBsYWNlKC9JbmRleC9nLCBpKSk7XG4gICAgfTtcblxuICAgIHZhciBwcm9taXNlU2V0dGVyID0gZnVuY3Rpb24oaSkge1xuICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKFwicHJvbWlzZVwiLCBcImhvbGRlclwiLCBcIiAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAndXNlIHN0cmljdCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBob2xkZXIucEluZGV4ID0gcHJvbWlzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBcIi5yZXBsYWNlKC9JbmRleC9nLCBpKSk7XG4gICAgfTtcblxuICAgIHZhciBnZW5lcmF0ZUhvbGRlckNsYXNzID0gZnVuY3Rpb24odG90YWwpIHtcbiAgICAgICAgdmFyIHByb3BzID0gbmV3IEFycmF5KHRvdGFsKTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgcHJvcHNbaV0gPSBcInRoaXMucFwiICsgKGkrMSk7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGFzc2lnbm1lbnQgPSBwcm9wcy5qb2luKFwiID0gXCIpICsgXCIgPSBudWxsO1wiO1xuICAgICAgICB2YXIgY2FuY2VsbGF0aW9uQ29kZT0gXCJ2YXIgcHJvbWlzZTtcXG5cIiArIHByb3BzLm1hcChmdW5jdGlvbihwcm9wKSB7XG4gICAgICAgICAgICByZXR1cm4gXCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgICAgIHByb21pc2UgPSBcIiArIHByb3AgKyBcIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgaWYgKHByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UuY2FuY2VsKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBcIjtcbiAgICAgICAgfSkuam9pbihcIlxcblwiKTtcbiAgICAgICAgdmFyIHBhc3NlZEFyZ3VtZW50cyA9IHByb3BzLmpvaW4oXCIsIFwiKTtcbiAgICAgICAgdmFyIG5hbWUgPSBcIkhvbGRlciRcIiArIHRvdGFsO1xuXG5cbiAgICAgICAgdmFyIGNvZGUgPSBcInJldHVybiBmdW5jdGlvbih0cnlDYXRjaCwgZXJyb3JPYmosIFByb21pc2UsIGFzeW5jKSB7ICAgIFxcblxcXG4gICAgICAgICAgICAndXNlIHN0cmljdCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBmdW5jdGlvbiBbVGhlTmFtZV0oZm4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgW1RoZVByb3BlcnRpZXNdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgdGhpcy5mbiA9IGZuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgdGhpcy5hc3luY05lZWRlZCA9IHRydWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgdGhpcy5ub3cgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBbVGhlTmFtZV0ucHJvdG90eXBlLl9jYWxsRnVuY3Rpb24gPSBmdW5jdGlvbihwcm9taXNlKSB7ICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgcHJvbWlzZS5fcHVzaENvbnRleHQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgdmFyIHJldCA9IHRyeUNhdGNoKHRoaXMuZm4pKFtUaGVQYXNzZWRBcmd1bWVudHNdKTsgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgcHJvbWlzZS5fcG9wQ29udGV4dCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgaWYgKHJldCA9PT0gZXJyb3JPYmopIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UuX3JlamVjdENhbGxiYWNrKHJldC5lLCBmYWxzZSk7ICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UuX3Jlc29sdmVDYWxsYmFjayhyZXQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBbVGhlTmFtZV0ucHJvdG90eXBlLmNoZWNrRnVsZmlsbG1lbnQgPSBmdW5jdGlvbihwcm9taXNlKSB7ICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgdmFyIG5vdyA9ICsrdGhpcy5ub3c7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgaWYgKG5vdyA9PT0gW1RoZVRvdGFsXSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmFzeW5jTmVlZGVkKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhc3luYy5pbnZva2UodGhpcy5fY2FsbEZ1bmN0aW9uLCB0aGlzLCBwcm9taXNlKTsgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWxsRnVuY3Rpb24ocHJvbWlzZSk7ICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBbVGhlTmFtZV0ucHJvdG90eXBlLl9yZXN1bHRDYW5jZWxsZWQgPSBmdW5jdGlvbigpIHsgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgW0NhbmNlbGxhdGlvbkNvZGVdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICByZXR1cm4gW1RoZU5hbWVdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIH0odHJ5Q2F0Y2gsIGVycm9yT2JqLCBQcm9taXNlLCBhc3luYyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIFwiO1xuXG4gICAgICAgIGNvZGUgPSBjb2RlLnJlcGxhY2UoL1xcW1RoZU5hbWVcXF0vZywgbmFtZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC9cXFtUaGVUb3RhbFxcXS9nLCB0b3RhbClcbiAgICAgICAgICAgIC5yZXBsYWNlKC9cXFtUaGVQYXNzZWRBcmd1bWVudHNcXF0vZywgcGFzc2VkQXJndW1lbnRzKVxuICAgICAgICAgICAgLnJlcGxhY2UoL1xcW1RoZVByb3BlcnRpZXNcXF0vZywgYXNzaWdubWVudClcbiAgICAgICAgICAgIC5yZXBsYWNlKC9cXFtDYW5jZWxsYXRpb25Db2RlXFxdL2csIGNhbmNlbGxhdGlvbkNvZGUpO1xuXG4gICAgICAgIHJldHVybiBuZXcgRnVuY3Rpb24oXCJ0cnlDYXRjaFwiLCBcImVycm9yT2JqXCIsIFwiUHJvbWlzZVwiLCBcImFzeW5jX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bGFzdCAtIDFdO1xuICAgICAgICAgICAgICAgIHZhciBob2xkZXIgPSBuZXcgSG9sZGVyQ2xhc3MoZm4pO1xuICAgICAgICAgICAgICAgIHZhciBjYWxsYmFja3MgPSB0aGVuQ2FsbGJhY2tzO1xuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsYXN0OyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UoYXJndW1lbnRzW2ldLCByZXQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobWF5YmVQcm9taXNlIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVQcm9taXNlID0gbWF5YmVQcm9taXNlLl90YXJnZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBiaXRGaWVsZCA9IG1heWJlUHJvbWlzZS5fYml0RmllbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChiaXRGaWVsZCAmIDUwMzk3MTg0KSA9PT0gMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UuX3RoZW4oY2FsbGJhY2tzW2ldLCByZWplY3QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZCwgcmV0LCBob2xkZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2VTZXR0ZXJzW2ldKG1heWJlUHJvbWlzZSwgaG9sZGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBob2xkZXIuYXN5bmNOZWVkZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKChiaXRGaWVsZCAmIDMzNTU0NDMyKSAhPT0gMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja3NbaV0uY2FsbChyZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVQcm9taXNlLl92YWx1ZSgpLCBob2xkZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMTY3NzcyMTYpICE9PSAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldC5fcmVqZWN0KG1heWJlUHJvbWlzZS5fcmVhc29uKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQuX2NhbmNlbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2tzW2ldLmNhbGwocmV0LCBtYXliZVByb21pc2UsIGhvbGRlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIXJldC5faXNGYXRlU2VhbGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhvbGRlci5hc3luY05lZWRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRvbWFpbiA9IGdldERvbWFpbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRvbWFpbiAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvbGRlci5mbiA9IHV0aWwuZG9tYWluQmluZChkb21haW4sIGhvbGRlci5mbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0Ll9zZXRBc3luY0d1YXJhbnRlZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0Ll9zZXRPbkNhbmNlbChob2xkZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHZhciBhcmdzID0gW10uc2xpY2UuY2FsbChhcmd1bWVudHMpOztcbiAgICBpZiAoZm4pIGFyZ3MucG9wKCk7XG4gICAgdmFyIHJldCA9IG5ldyBQcm9taXNlQXJyYXkoYXJncykucHJvbWlzZSgpO1xuICAgIHJldHVybiBmbiAhPT0gdW5kZWZpbmVkID8gcmV0LnNwcmVhZChmbikgOiByZXQ7XG59O1xuXG59O1xuXG59LHtcIi4vdXRpbFwiOjM2fV0sMTg6W2Z1bmN0aW9uKF9kZXJlcV8sbW9kdWxlLGV4cG9ydHMpe1xuXCJ1c2Ugc3RyaWN0XCI7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKFByb21pc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFByb21pc2VBcnJheSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYXBpUmVqZWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0cnlDb252ZXJ0VG9Qcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRFUk5BTCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZGVidWcpIHtcbnZhciBnZXREb21haW4gPSBQcm9taXNlLl9nZXREb21haW47XG52YXIgdXRpbCA9IF9kZXJlcV8oXCIuL3V0aWxcIik7XG52YXIgdHJ5Q2F0Y2ggPSB1dGlsLnRyeUNhdGNoO1xudmFyIGVycm9yT2JqID0gdXRpbC5lcnJvck9iajtcbnZhciBhc3luYyA9IFByb21pc2UuX2FzeW5jO1xuXG5mdW5jdGlvbiBNYXBwaW5nUHJvbWlzZUFycmF5KHByb21pc2VzLCBmbiwgbGltaXQsIF9maWx0ZXIpIHtcbiAgICB0aGlzLmNvbnN0cnVjdG9yJChwcm9taXNlcyk7XG4gICAgdGhpcy5f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HByb21pc2VDcmVhdGVkLFxuICAgICAgICAgICAgcHJlc2VydmVkVmFsdWVzICE9PSBudWxsID8gXCJQcm9taXNlLmZpbHRlclwiIDogXCJQcm9taXNlLm1hcFwiLFxuICAgICAgICAgICAgcHJvbWlzZVxuICAgICAgICApO1xuICAgICAgICBpZiAocmV0ID09PSBlcnJvck9iaikge1xuICAgICAgICAgICAgdGhpcy5fcmVqZWN0KHJldC5lKTtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UocmV0LCB0aGlzLl9wcm9taXNlKTtcbiAgICAgICAgaWYgKG1heWJlUHJvbWlzZSBpbnN0YW5jZW9mIFByb21pc2UpIHtcbiAgICAgICAgICAgIG1heWJlUHJvbWlzZSA9IG1heWJlUHJvbWlzZS5fdGFyZ2V0KCk7XG4gICAgICAgICAgICB2YXIgYml0RmllbGQgPSBtYXliZVByb21pc2UuX2JpdEZpZWxkO1xuICAgICAgICAgICAgO1xuICAgICAgICAgICAgaWYgKCgoYml0RmllbGQgJiA1MDM5NzE4NCkgPT09IDApKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxpbWl0ID49IDEpIHRoaXMuX2luRmxpZ2h0Kys7XG4gICAgICAgICAgICAgICAgdmFsdWVzW2luZGV4XSA9IG1heWJlUHJvbWlzZTtcbiAgICAgICAgICAgICAgICBtYXliZVByb21pc2UuX3Byb3h5KHRoaXMsIChpbmRleCArIDEpICogLTEpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKChiaXRGaWVsZCAmIDMzNTU0NDMyKSAhPT0gMCkpIHtcbiAgICAgICAgICAgICAgICByZXQgPSBtYXliZVByb21pc2UuX3ZhbHVlKCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCgoYml0RmllbGQgJiAxNjc3NzIxNikgIT09IDApKS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AgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoXG4gICAgICAgICAgICAgICAgICAgIG5ldyBUeXBlRXJyb3IoXCInY29uY3VycmVuY3knIG11c3QgYmUgYSBudW1iZXIgYnV0IGl0IGlzIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHV0aWwuY2xhc3NTdHJpbmcob3B0aW9ucy5jb25jdXJyZW5jeSkpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxpbWl0ID0gb3B0aW9ucy5jb25jdXJyZW5jeTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib3B0aW9ucyBhcmd1bWVudCBtdXN0IGJlIGFuIG9iamVjdCBidXQgaXQgaXMgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1dGlsLmNsYXNzU3RyaW5nKG9wdGlvbnMpKSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgbGltaXQgPSB0eXBlb2YgbGltaXQgPT09IFwibnVtYmVyXCIgJiZcbiAgICAgICAgaXNGaW5pdGUobGltaXQpICYmIGxpbWl0ID49IDEgPyBsaW1pdCA6IDA7XG4gICAgcmV0dXJuIG5ldyBNYXBwaW5nUHJvbWlzZUFycmF5KHByb21pc2VzLCBmbiwgbGltaXQsIF9maWx0ZXIpLnByb21pc2UoKTtcbn1cblxuUHJvbWlzZS5wcm90b3R5cGUubWFwID0gZnVuY3Rpb24gKGZuLCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIG1hcCh0aGlzLCBmbiwgb3B0aW9ucywgbnVsbCk7XG59O1xuXG5Qcm9taXNlLm1hcCA9IGZ1bmN0aW9uIChwcm9taXNlcywgZm4sIG9wdGlvbnMsIF9maWx0ZXIpIHtcbiAgICByZXR1cm4gbWFwKHByb21pc2VzLCBmbiwgb3B0aW9ucywgX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GVkRXJyb3Iob2JqKSkge1xuICAgICAgICByZXQgPSBuZXcgT3BlcmF0aW9uYWxFcnJvcihvYmopO1xuICAgICAgICByZXQubmFtZSA9IG9iai5uYW1lO1xuICAgICAgICByZXQubWVzc2FnZSA9IG9iai5tZXNzYWdlO1xuICAgICAgICByZXQuc3RhY2sgPSBvYmouc3RhY2s7XG4gICAgICAgIHZhciBrZXlzID0gZXM1LmtleXMob2JqKTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICB2YXIga2V5ID0ga2V5c1tpXTtcbiAgICAgICAgICAgIGlmICghckVycm9yS2V5LnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgICAgIHJldFtrZXldID0gb2JqW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICB9XG4gICAgdXRpbC5tYXJrQXNPcmlnaW5hdGluZ0Zyb21SZWplY3Rpb24ob2JqKTtcbiAgICByZXR1cm4gb2JqO1xufVxuXG5mdW5jdGlvbiBub2RlYmFja0ZvclByb21pc2UocHJvbWlzZSwgbXVsdGlBcmdzKSB7XG4gICAgcmV0dXJuIGZ1bmN0aW9uKGVyciwgdmFsdWUpIHtcbiAgICAgICAgaWYgKHByb21pc2UgPT09IG51bGwpIHJldHVybjtcbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgdmFyIHdyYXBwZWQgPSB3cmFwQXNPcGVyYXRpb25hbEVycm9yKG1heWJlV3JhcEFzRXJyb3IoZXJyKSk7XG4gICAgICAgICAgICBwcm9taXNlLl9hdHRhY2hFeHRyYVRyYWNlKHdyYXBwZWQpO1xuICAgICAgICAgICAgcHJvbWlzZS5fcmVqZWN0KHdyYXBwZWQpO1xuICAgICAgICB9IGVsc2UgaWYgKCFtdWx0aUFyZ3MpIHtcbiAgICAgICAgICAgIHByb21pc2UuX2Z1bGZpbGwodmFsdWUpO1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AgdGhpcy5fZmlyZUV2ZW50KFwicHJvbWlzZUNyZWF0ZWRcIiwgdGhpcyk7XG59XG5cblByb21pc2UucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiBcIltvYmplY3QgUHJvbWlzZV1cIjtcbn07XG5cblByb21pc2UucHJvdG90eXBlLmNhdWdodCA9IFByb21pc2UucHJvdG90eXBlW1wiY2F0Y2hcIl0gPSBmdW5jdGlvbiAoZm4pIHtcbiAgICB2YXIgbGVuID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgICBpZiAobGVuID4gMSkge1xuICAgICAgICB2YXIgY2F0Y2hJbnN0YW5jZXMgPSBuZXcgQXJyYXkobGVuIC0gMSksXG4gICAgICAgICAgICBqID0gMCwgaTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbiAtIDE7ICsraSkge1xuICAgICAgICAgICAgdmFyIGl0ZW0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICBpZiAodXRpbC5pc09iamVjdChpdGVtKSkge1xuICAgICAgICAgICAgICAgIGNhdGNoSW5zdGFuY2VzW2orK10gPSBpdGVtO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXBpUmVqZWN0aW9uKFwiQ2F0Y2ggc3RhdGVtZW50IHByZWRpY2F0ZTogXCIgK1xuICAgICAgICAgICAgICAgICAgICBcImV4cGVjdGluZyBhbiBvYmplY3QgYnV0IGdvdCBcIiArIHV0aWwuY2xhc3NTdHJpbmcoaXRlbSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhdGNoSW5zdGFuY2VzLmxlbmd0aCA9IGo7XG4gICAgICAgIGZuID0gYXJndW1lbnRzW2ldO1xuXG4gICAgICAgIGlmICh0eXBlb2YgZm4gIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIlRoZSBsYXN0I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ICAgICAgdGhpcy5fZnVsZmlsbG1lbnRIYW5kbGVyMCA9XG4gICAgICAgICAgICAgICAgZG9tYWluID09PSBudWxsID8gZnVsZmlsbCA6IHV0aWwuZG9tYWluQmluZChkb21haW4sIGZ1bGZpbGwpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgcmVqZWN0ID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgIHRoaXMuX3JlamVjdGlvbkhhbmRsZXIwID1cbiAgICAgICAgICAgICAgICBkb21haW4gPT09IG51bGwgPyByZWplY3QgOiB1dGlsLmRvbWFpbkJpbmQoZG9tYWluLCByZWplY3QpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGJhc2UgPSBpbmRleCAqIDQgLSA0O1xuICAgICAgICB0aGlzW2Jhc2UgKyAyXSA9IHByb21pc2U7XG4gICAgICAgIHRoaXNbYmFzZSArIDNdID0gcmVjZWl2ZXI7XG4gICAgICAgIGlmICh0eXBlb2YgZnVsZmlsbCA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICB0aGlzW2Jhc2UgKyAwXSA9XG4gICAgICAgICAgICAgICAgZG9tYWluID09PSBudWxsID8gZnVsZmlsbCA6IHV0aWwuZG9tYWluQmluZChkb21haW4sIGZ1bGZpbGwpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgcmVqZWN0ID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgIHRoaXNbYmFzZSArIDFdID1cbiAgICAgICAgICAgICAgICBkb21haW4gPT09IG51bGwgPyByZWplY3QgOiB1dGlsLmRvbWFpbkJpbmQoZG9tYWluLCByZWplY3QpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHRoaXMuX3NldExlbmd0aChpbmRleCArIDEpO1xuICAgIHJldHVybiBpbmRleDtcbn07XG5cblByb21pc2UucHJvdG90eXBlLl9wcm94eSA9IGZ1bmN0aW9uIChwcm94eWFibG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GNyZWF0ZUNvbnRleHQsIElOVEVSTkFMLCBkZWJ1Zyk7XG5fZGVyZXFfKCcuL2FueS5qcycpKFByb21pc2UpO1xuX2RlcmVxXygnLi9lYWNoLmpzJykoUHJvbWlzZSwgSU5URVJOQUwpO1xuX2RlcmVxXygnLi9maWx0ZXIuanMnKShQcm9taXNlLCBJTlRFUk5BTCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICB1dGlsLnRvRmFzdFByb3BlcnRpZXMoUHJvbWlzZSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgdXRpbC50b0Zhc3RQcm9wZXJ0aWVzKFByb21pc2UucHJvdG90eXBlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZ1bmN0aW9uIGZpbGxUeXBlcyh2YWx1ZSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgdmFyIHAgPSBuZXcgUHJvbWlzZShJTlRFUk5BTCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgIHAuX2Z1bGZpbGxtZW50SGFuZGxlcjAgPSB2YWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICBwLl9yZWplY3Rpb25IYW5kbGVyMCA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgcC5fcHJvbWlzZTAgPSB2YWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgIHAuX3JlY2VpdmVyMCA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAvLyBDb21wbGV0ZSBzbGFjayB0cmFja2luZywgb3B0IG91dCBvZiBmaWVsZC10eXBlIHRyYWNraW5nIGFuZCAgICAgICAgICAgXG4gICAgLy8gc3RhYmlsaXplIG1hcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcyh7YTogMX0pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBmaWxsVHlwZXMoe2I6IDJ9KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZmlsbFR5cGVzKHtjOiAzfSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcygxKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBmaWxsVHlwZXMoZnVuY3Rpb24oKXt9KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZmlsbFR5cGVzKHVuZGVmaW5lZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIGZpbGxUeXBlcyhmYWxzZSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICBmaWxsVHlwZXMobmV3IFByb21pc2UoSU5URVJOQUwpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgZGVidWcuc2V0Qm91bmRzKEFzeW5jLmZpcnN0TGluZUVycm9yLCB1dGlsLmxhc3RMaW5lRXJyb3IpOyAgICAgICAgICAgICAgIFxuICAgIHJldHVybiBQcm9taXNlOyAgIC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A8IGxlbjsgKytpKSB7XG4gICAgICAgIHZhciBtYXliZVByb21pc2UgPSB0cnlDb252ZXJ0VG9Qcm9taXNlKHZhbHVlc1tpXSwgcmVzdWx0KTtcblxuICAgICAgICBpZiAobWF5YmVQcm9taXNlIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgbWF5YmVQcm9taXNlID0gbWF5YmVQcm9taXNlLl90YXJnZXQoKTtcbiAgICAgICAgICAgIGJpdEZpZWxkID0gbWF5YmVQcm9taXNlLl9iaXRGaWVsZDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGJpdEZpZWxkID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc1Jlc29sdmVkKSB7XG4gICAgICAgICAgICBpZiAoYml0RmllbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBtYXliZVByb21pc2Uuc3VwcHJlc3NVbmhhbmRsZWRSZWplY3Rpb25zKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoYml0RmllbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIGlmICgoKGJpdEZpZWxkICYgNTAzOTcxODQpID09PSAwKSkge1xuICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5fcHJveHkodGhpcywgaSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzW2ldID0gbWF5YmVQcm9taXNlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoKGJpdEZpZWxkICYgMzM1NTQ0MzIpICE9PSAwKSkge1xuICAgICAgICAgICAgICAgIGlzUmVzb2x2ZWQgPSB0aGlzLl9wcm9taXNlRnVsZmlsbGVkKG1heWJlUHJvbWlzZS5fdmFsdWUoKSwgaSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCgoYml0RmllbGQgJiAxNjc3NzIxNikgIT09IDApKSB7XG4gICAgICAgICAgICAgICAgaXNSZXNvbHZlZCA9IHRoaXMuX3Byb21p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G5mdW5jdGlvbiBjaGVja1ZhbGlkKHJldCwgc3VmZml4LCBzdWZmaXhSZWdleHApIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJldC5sZW5ndGg7IGkgKz0gMikge1xuICAgICAgICB2YXIga2V5ID0gcmV0W2ldO1xuICAgICAgICBpZiAoc3VmZml4UmVnZXhwLnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgdmFyIGtleVdpdGhvdXRBc3luY1N1ZmZpeCA9IGtleS5yZXBsYWNlKHN1ZmZpeFJlZ2V4cCwgXCJcIik7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHJldC5sZW5ndGg7IGogKz0gMikge1xuICAgICAgICAgICAgICAgIGlmIChyZXRbal0gPT09IGtleVdpdGhvdXRBc3luY1N1ZmZpeCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQ2Fubm90IHByb21pc2lmeSBhbiBBUEkgdGhhdCBoYXMgbm9ybWFsIG1ldGhvZHMgd2l0aCAnJXMnLXN1ZmZpeFxcdTAwMGFcXHUwMDBhICAgIFNlZSBodHRwOi8vZ29vLmdsL01xckZtWFxcdTAwMGFcIlxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoXCIlc1wiLCBzdWZmaXgpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmZ1bmN0aW9uIHByb21pc2lmaWFibGVNZXRob2RzKG9iaiwgc3VmZml4LCBzdWZmaXhSZWdleHAsIGZpbHRlcikge1xuICAgIHZhciBrZXlzID0gdXRpbC5pbmhlcml0ZWREYXRhS2V5cyhvYmopO1xuICAgIHZhciByZXQgPSBbXTtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgdmFyIGtleSA9IGtleXNbaV07XG4gICAgICAgIHZhciB2YWx1ZSA9IG9ial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cltpXSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXQgKz0gXCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHZhciBhcmdzID0gbmV3IEFycmF5KGxlbiArIDEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIHZhciBpID0gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyArK2kpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgICAgIGFyZ3NbaV0gPSBhcmd1bWVudHNbaV07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGFyZ3NbaV0gPSBub2RlYmFjazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIFtDb2RlRm9yQ2FsbF0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxcbiAgICAgICAgXCIucmVwbGFjZShcIltDb2RlRm9yQ2FsbF1cIiwgKHNob3VsZFByb3h5VGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFwicmV0ID0gY2FsbGJhY2suYXBwbHkodGhpcywgYXJncyk7XFxuXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBcInJldCA9IGNhbGxiYWNrLmFwcGx5KHJlY2VpdmVyLCBhcmdzKTtcXG5cIikpO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH1cblxuICAgIHZhciBnZXRGdW5jdGlvbkNvZGUgPSB0eXBlb2YgY2FsbGJhY2sgPT09IFwic3RyaW5nXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAoXCJ0aGlzICE9IG51bGwgPyB0aGlzWydcIitjYWxsYmFjaytcIiddIDogZm5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBcImZuXCI7XG4gICAgdmFyIGJvZHkgPSBcIid1c2Ugc3RyaWN0JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICB2YXIgcmV0ID0gZnVuY3Rpb24gKFBhcmFtZXRlcnMpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgJ3VzZSBzdHJpY3QnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgdmFyIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgdmFyIHByb21pc2UgPSBuZXcgUHJvbWlzZShJTlRFUk5BTCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgcHJvbWlzZS5fY2FwdHVyZVN0YWNrVHJhY2UoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG5cXFxuICAgICAgICAgICAgdmFyIG5vZGViYWNrID0gbm9kZWJhY2tGb3JQcm9taXNlKHByb21pc2UsIFwiICsgbXVsdGlBcmdzICsgXCIpOyAgIFxcblxcXG4gICAgICAgICAgICB2YXIgcmV0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB2YXIgY2FsbGJhY2sgPSB0cnlDYXRjaChbR2V0RnVuY3Rpb25Db2RlXSk7ICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBzd2l0Y2gobGVuKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgW0NvZGVGb3JTd2l0Y2hDYXNlXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBpZiAocmV0ID09PSBlcnJvck9iaikgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICAgICAgcHJvbWlzZS5fcmVqZWN0Q2FsbGJhY2sobWF5YmVXcmFwQXNFcnJvcihyZXQuZSksIHRydWUsIHRydWUpO1xcblxcXG4gICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgICAgICBpZiAoIXByb21pc2UuX2lzRmF0ZVNlYWxlZCgpKSBwcm9taXNlLl9zZXRBc3luY0d1YXJhbnRlZWQoKTsgICAgIFxcblxcXG4gICAgICAgICAgICByZXR1cm4gcHJvbWlzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIG5vdEVudW1lcmFibGVQcm9wKHJldCwgJ19faXNQcm9taXNpZmllZF9fJywgdHJ1ZSk7ICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgICAgIHJldHVybiByZXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcXG4gICAgXCIucmVwbGFjZShcIltDb2RlRm9yU3dpdGNoQ2FzZV1cIiwgZ2VuZXJhdGVBcmd1bWVudFN3aXRjaENhc2UoKSlcbiAgICAgICAgLnJlcGxhY2UoXCJbR2V0RnVuY3Rpb25Db2RlXVwiLCBnZXRGdW5jdGlvbkNvZGUpO1xuICAgIGJvZHkgPSBib2R5LnJlcGxhY2UoXCJQYXJhbWV0ZXJzXCIsIHBhcmFtZXRlckRlY2xhcmF0aW9uKG5ld1BhcmFtZXRlckNvdW50KSk7XG4gICAgcmV0dXJuIG5ldyBGdW5jdGlvbihcIlByb21pc2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZm5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicmVjZWl2ZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwid2l0aEFwcGVuZGVkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBcIm1heWJlV3JhcEFzRXJyb3JcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwibm9kZWJhY2tGb3JQcm9taXNlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBcInRyeUNhdGNoXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBcImVycm9yT2JqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBcIm5vdEVudW1lcmFibGVQcm9wXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBcIklOVEVSTkFMXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5KShcbiAgICAgICAgICAgICAgICAgICAgUHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgZm4sXG4gICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyLFxuICAgICAgICAgICAgICAgICAgICB3aXRoQXBwZW5kZWQsXG4gICAgICAgICAgICAgICAgICAgIG1heWJlV3JhcEFzRXJyb3IsXG4gICAgICAgICAgICAgICAgICAgIG5vZGViYWNrRm9yUHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgdXRpbC50cnlDYXRjaCxcbiAgICAgICAgICAgICAgICAgICAgdXRpbC5lcnJvck9iaixcbiAgICAgICAgICAgICAgICAgICAgdXRpbC5ub3RFbnVtZXJhYmxlUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgSU5URVJOQUwpO1xufTtcbn1cblxuZnVuY3Rpb24gbWFrZU5vZGVQcm9taXNpZmllZENsb3N1cmUoY2FsbGJhY2ssIHJlY2VpdmVyLCBfLCBmbiwgX18sIG11bHRpQXJncykge1xuICAgIHZhciBkZWZhdWx0VGhpcyA9IChmdW5jdGlvbigpIHtyZXR1cm4gdGhpczt9KSgpO1xuICAgIHZhciBtZXRob2QgPSBjYWxsYmFjaztcbiAgICBpZiAodHlwZW9mIG1ldGhvZCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICBjYWxsYmFjayA9IGZuO1xuICAgIH1cbiAgICBmdW5jdGlvbiBwcm9taXNpZmllZCgpIHtcbiAgICAgICAgdmFyIF9yZWNlaXZlciA9IHJlY2VpdmVyO1xuICAgICAgICBpZiAocmVjZWl2ZXIgPT09IFRISVMpIF9yZWNlaXZlciA9IHRoaXM7XG4gICAgICAgIHZhciBwcm9taXNlID0gbmV3IFByb21pc2UoSU5URVJOQUwpO1xuICAgICAgICBwcm9taXNlLl9jYXB0dXJlU3RhY2tUcmFjZSgpO1xuICAgICAgICB2YXIgY2IgPSB0eXBlb2YgbWV0aG9kID09PSBcInN0cmluZ1wiICYmIHRoaXMgIT09IGRlZmF1bHRUaGlz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B2YXIgcmV0ID0gbmV3IFByb21pc2UoSU5URVJOQUwpO1xuICAgICAgICAgICAgICAgIG9iai5fdGhlbihcbiAgICAgICAgICAgICAgICAgICAgcmV0Ll9mdWxmaWxsLFxuICAgICAgICAgICAgICAgICAgICByZXQuX3JlamVjdCxcbiAgICAgICAgICAgICAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgICAgICByZXQsXG4gICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZG9UaGVuYWJsZShvYmosIHRoZW4sIGNvbnRleHQpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBvYmo7XG59XG5cbmZ1bmN0aW9uIGRvR2V0VGhlbihvYmopIHtcbiAgICByZXR1cm4gb2JqLnRoZW47XG59XG5cbmZ1bmN0aW9uIGdldFRoZW4ob2JqKSB7XG4gICAgdHJ5IHtcbiAgICAgICAgcmV0dXJuIGRvR2V0VGhlbihvYmopO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgZXJyb3JPYmouZSA9IGU7XG4gICAgICAgIHJldHVybiBlcnJvck9iajtcbiAgICB9XG59XG5cbnZhciBoYXNQcm9wID0ge30uaGFzT3duUHJvcGVydHk7XG5mdW5jdGlvbiBpc0FueUJsdWViaXJkUHJvbWlzZShvYmopIHtcbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gaGFzUHJvcC5jYWxsKG9iaiwgXCJfcHJvbWlzZTBcIik7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBkb1RoZW5hYmxlKHgsIHRoZW4sIGNvbnRleHQpIHtcbiAgICB2YXIgcHJvbWlzZSA9IG5ldyBQcm9taXNlKElOVEVSTkFMKTtcbiAgICB2YXIgcmV0ID0gcHJvb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hYmxlKHRoZW5hYmxlLl9nZXREaXNwb3NlcigpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWF5YmVQcm9taXNlO1xuICAgIH1cbiAgICBmdW5jdGlvbiBkaXNwb3NlKHJlc291cmNlcywgaW5zcGVjdGlvbikge1xuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHZhciBsZW4gPSByZXNvdXJjZXMubGVuZ3RoO1xuICAgICAgICB2YXIgcmV0ID0gbmV3IFByb21pc2UoSU5URVJOQUwpO1xuICAgICAgICBmdW5jdGlvbiBpdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGlmIChpID49IGxlbikgcmV0dXJuIHJldC5fZnVsZmlsbCgpO1xuICAgICAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IGNhc3RQcmVzZXJ2aW5nRGlzcG9zYWJsZShyZXNvdXJjZXNbaSsrXSk7XG4gICAgICAgICAgICBpZiAobWF5YmVQcm9taXNlIGluc3RhbmNlb2YgUHJvbWlzZSAmJlxuICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5faXNEaXNwb3NhYmxlKCkpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBtYXliZVByb21pc2UgPSB0cnlDb252ZXJ0VG9Qcm9taXNlKFxuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVQcm9taXNlLl9nZXREaXNwb3NlcigpLnRyeURpc3Bvc2UoaW5zcGVjdGlvbiksXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXMucHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhyb3dlcihlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG1heWJlUHJvbWlzZSBpbnN0YW5jZW9mIFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1heWJlUHJvbWlzZS5fdGhlbihpdGVyYXRvciwgdGhyb3dlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudWxsLCBudWxsLCBudWxsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpdGVyYXRvcigpO1xuICAgICAgICB9XG4gICAgICAgIGl0ZXJhdG9yKCk7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gRGlzcG9zZXIoZGF0YSwgcHJvbWlzZSwgY29udGV4dCkge1xuICAgICAgICB0aGlzLl9kYXRhID0gZGF0YTtcbiAgICAgICAgdGhpcy5fcHJvbWlzZSA9IHByb21pc2U7XG4gICAgICAgIHRoaXMuX2NvbnRleHQgPSBjb250ZXh0O1xuICAgIH1cblxuICAgIERpc3Bvc2VyLnByb3RvdHlwZS5kYXRhID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fZGF0YTtcbiAgICB9O1xuXG4gICAgRGlzcG9zZXIucHJvdG90eXBlLnByb21pc2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9wcm9taXNlO1xuICAgIH07XG5cbiAgICBEaXNwb3Nlci5wcm90b3R5cGUucmVzb3VyY2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb21pc2UoKS5pc0Z1bGZpbGxlZCgpKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9taXNlKCkudmFsdWUoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTlVMTDtcbiAgICB9O1xuXG4gICAgRGlzcG9zZXIucHJvdG90eXBlLnRyeURpc3Bvc2UgPSBmdW5jdGlvbihpbnNwZWN0aW9uKSB7XG4gICAgICAgIHZhciByZXNvdXJjZSA9IHRoaXMucmVzb3VyY2UoKTtcbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzLl9jb250Z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IFByb21pc2UudXNpbmdcIik7XG4gICAgICAgIHZhciBmbiA9IGFyZ3VtZW50c1tsZW4gLSAxXTtcbiAgICAgICAgaWYgKHR5cGVvZiBmbiAhPT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICByZXR1cm4gYXBpUmVqZWN0aW9uKFwiZXhwZWN0aW5nIGEgZnVuY3Rpb24gYnV0IGdvdCBcIiArIHV0aWwuY2xhc3NTdHJpbmcoZm4pKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgaW5wdXQ7XG4gICAgICAgIHZhciBzcHJlYWRBcmdzID0gdHJ1ZTtcbiAgICAgICAgaWYgKGxlbiA9PT0gMiAmJiBBcnJheS5pc0FycmF5KGFyZ3VtZW50c1swXSkpIHtcbiAgICAgICAgICAgIGlucHV0ID0gYXJndW1lbnRzWzBdO1xuICAgICAgICAgICAgbGVuID0gaW5wdXQubGVuZ3RoO1xuICAgICAgICAgICAgc3ByZWFkQXJncyA9IGZhbHNlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaW5wdXQgPSBhcmd1bWVudHM7XG4gICAgICAgICAgICBsZW4tLTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgcmVzb3VyY2VzID0gbmV3IFJlc291cmNlTGlzdChsZW4pO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgKytpKSB7XG4gICAgICAgICAgICB2YXIgcmVzb3VyY2UgPSBpbnB1dFtpXTtcbiAgICAgICAgICAgIGlmIChEaXNwb3Nlci5pc0Rpc3Bvc2VyKHJlc291cmNlKSkge1xuICAgICAgICAgICAgICAgIHZhciBkaXNwb3NlciA9IHJlc291cmNlO1xuICAgICAgICAgICAgICAgIHJlc291cmNlID0gcmVzb3VyY2UucHJvbWlzZSgpO1xuICAgICAgICAgICAgICAgIHJlc291cmNlLl9zZXREaXNwb3NhYmxlKGRpc3Bvc2VyKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG1heWJlUHJvbWlzZSA9IHRyeUNvbnZlcnRUb1Byb21pc2UocmVzb3VyY2UpO1xuICAgICAgICAgICAgICAgIGlmIChtYXliZVByb21pc2UgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc291cmNlID1cbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlUHJvbWlzZS5fdGhlbihtYXliZVVud3JhcERpc3Bvc2VyLCBudWxsLCBudWxsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzOiByZXNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGlcbiAgICAgICAgICAgICAgICAgICAgfSwgdW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXNvdXJjZXNbaV0gPSByZXNvdXJjZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByZWZsZWN0ZWRSZXNvdXJjZXMgPSBuZXcgQXJyYXkocmVzb3VyY2VzLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVmbGVjdGVkUmVzb3VyY2VzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICByZWZsZWN0ZWRSZXNvdXJjZXNbaV0gPSBQcm9taXNlLnJlc29sdmUocmVzb3VyY2VzW2ldKS5yZWZsZWN0KCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcmVzdWx0UHJvbWlzZSA9IFByb21pc2UuYWxsKHJlZmxlY3RlZFJlc291cmNlcylcbiAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKGluc3BlY3Rpb25zKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpbnNwZWN0aW9ucy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5zcGVjdGlvbiA9IGluc3BlY3Rpb25zW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5zcGVjdGlvbi5pc1JlamVjdGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yT2JqLmUgPSBpbnNwZWN0aW9uLmVycm9yKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3JPYmo7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIWluc3BlY3Rpb24uaXNGdWxmaWxsZWQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0UHJvbWlzZS5jYW5jZWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbnNwZWN0aW9uc1tpXSA9IGluc3BlY3Rpb24udmFsdWUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcHJvbWlzZS5fcHVzaENvbnRleHQoKTtcblxuICAgICAgICAgICAgICAgIGZuID0gdHJ5Q2F0Y2goZm4pO1xuICAgICAgICAgICAgICAgIHZhciByZXQgPSBzcHJlYWRBcmdzXG4gICAgICAgICAgICAgICAgICAgID8gZm4uYXBwbHkodW5kZWZpbmVkLCBpbnNwZWN0aW9ucykgOiBmbihpbnNwZWN0aW9ucyk7XG4gICAgICAgICAgICAgICAgdmFyIHByb21pc2VDcmVhdGVkID0gcHJvbWlzZS5fcG9wQ29udGV4dCgpO1xuICAgICAgICAgICAgICAgIGRlYnVnLmNoZWNrRm9yZ290dGVuUmV0dXJucyhcbiAgICAgICAgICAgICAgICAgICAgcmV0LCBwcm9taXNlQ3JlYXRlZCwgXCJQcm9taXNlLnVzaW5nXCIsIHByb21pc2UpO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICB2YXIgcHJvbWlzZSA9IHJlc3VsdFByb21pc2UubGFzdGx5KGZ1bmN0aW9uKCkge1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Fsc2U7XG4gICAgfTtcblxuICAgIGlmIChlczUuaXNFUzUpIHtcbiAgICAgICAgdmFyIGdldEtleXMgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcztcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG9iaikge1xuICAgICAgICAgICAgdmFyIHJldCA9IFtdO1xuICAgICAgICAgICAgdmFyIHZpc2l0ZWRLZXlzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgICAgIHdoaWxlIChvYmogIT0gbnVsbCAmJiAhaXNFeGNsdWRlZFByb3RvKG9iaikpIHtcbiAgICAgICAgICAgICAgICB2YXIga2V5cztcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBrZXlzID0gZ2V0S2V5cyhvYmopO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBrZXkgPSBrZXlzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAodmlzaXRlZEtleXNba2V5XSkgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIHZpc2l0ZWRLZXlzW2tleV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iob2JqLCBrZXkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVzYyAhPSBudWxsICYmIGRlc2MuZ2V0ID09IG51bGwgJiYgZGVzYy5zZXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvYmogPSBlczUuZ2V0UHJvdG90eXBlT2Yob2JqKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGhhc1Byb3AgPSB7fS5oYXNPd25Qcm9wZXJ0eTtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG9iaikge1xuICAgICAgICAgICAgaWYgKGlzRXhjbHVkZWRQcm90byhvYmopKSByZXR1cm4gW107XG4gICAgICAgICAgICB2YXIgcmV0ID0gW107XG5cbiAgICAgICAgICAgIC8qanNoaW50IGZvcmluOmZhbHNlICovXG4gICAgICAgICAgICBlbnVtZXJhdGlvbjogZm9yICh2YXIga2V5IGluIG9iaikge1xuICAgICAgICAgICAgICAgIGlmIChoYXNQcm9wLmNhbGwob2JqLCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldC5wdXNoKGtleSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBleGNsdWRlZFByb3RvdHlwZXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoYXNQcm9wLmNhbGwoZXhjbHVkZWRQcm90b3R5cGVzW2ldLCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUgZW51bWVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9O1xuICAgIH1cblxufSkoKTtcblxudmFyIHRoaXNBc3NpZ25tZW50UGF0dGVybiA9IC90aGlzXFxzKlxcLlxccypcXFMrXFxzKj0vO1xu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m90b3R5cGUgPSBvYmo7XG4gICAgdmFyIHJlY2VpdmVyID0gbmV3IEZha2VDb25zdHJ1Y3RvcigpO1xuICAgIGZ1bmN0aW9uIGljKCkge1xuICAgICAgICByZXR1cm4gdHlwZW9mIHJlY2VpdmVyLmZvbztcbiAgICB9XG4gICAgaWMoKTtcbiAgICBpYygpO1xuICAgIHJldHVybiBvYmo7XG4gICAgZXZhbChvYmopO1xufVxuXG52YXIgcmlkZW50ID0gL15bYS16JF9dW2EteiRfMC05XSokL2k7XG5mdW5jdGlvbiBpc0lkZW50aWZpZXIoc3RyKSB7XG4gICAgcmV0dXJuIHJpZGVudC50ZXN0KHN0cik7XG59XG5cbmZ1bmN0aW9uIGZpbGxlZFJhbmdlKGNvdW50LCBwcmVmaXgsIHN1ZmZpeCkge1xuICAgIHZhciByZXQgPSBuZXcgQXJyYXkoY291bnQpO1xuICAgIGZvcih2YXIgaSA9IDA7IGkgPCBjb3VudDsgKytpKSB7XG4gICAgICAgIHJldFtpXSA9IHByZWZpeCArIGkgKyBzdWZmaXg7XG4gICAgfVxuICAgIHJldHVybiByZXQ7XG59XG5cbmZ1bmN0aW9uIHNhZmVUb1N0cmluZyhvYmopIHtcbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gb2JqICsgXCJcIjtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHJldHVybiBcIltubyBzdHJpbmcgcmVwcmVzZW50YXRpb25dXCI7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpc0Vycm9yKG9iaikge1xuICAgIHJldHVybiBvYmogaW5zdGFuY2VvZiBFcnJvciB8fFxuICAgICAgICAob2JqICE9PSBudWxsICYmXG4gICAgICAgICAgIHR5cGVvZiBvYmogPT09IFwib2JqZWN0XCIgJiZcbiAgICAgICAgICAgdHlwZW9mIG9iai5tZXNzYWdlID09PSBcInN0cmluZ1wiICYmXG4gICAgICAgICAgIHR5cGVvZiBvYmoubmFtZSA9PT0gXCJzdHJpbmdcIik7XG59XG5c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wiKS5tYXAoTnVtYmVyKTtcbiAgICB9IGVsc2UgaWYgKHByb2Nlc3MudmVyc2lvbikge1xuICAgICAgICB2ZXJzaW9uID0gcHJvY2Vzcy52ZXJzaW9uLnNwbGl0KFwiLlwiKS5tYXAoTnVtYmVyKTtcbiAgICB9XG4gICAgcmV0dXJuICh2ZXJzaW9uWzBdID09PSAwICYmIHZlcnNpb25bMV0gPiAxMCkgfHwgKHZlcnNpb25bMF0gPiAwKTtcbn0pKCk7XG5cbmlmIChyZXQuaXNOb2RlKSByZXQudG9GYXN0UHJvcGVydGllcyhwcm9jZXNzKTtcblxudHJ5IHt0aHJvdyBuZXcgRXJyb3IoKTsgfSBjYXRjaCAoZSkge3JldC5sYXN0TGluZUVycm9yID0gZTt9XG5tb2R1bGUuZXhwb3J0cyA9IHJldDtcblxufSx7XCIuL2VzNVwiOjEzfV19LHt9LFs0XSkoNClcbn0pOyAgICAgICAgICAgICAgICAgICAgO2lmICh0eXBlb2Ygd2luZG93ICE9PSAndW5kZWZpbmVkJyAmJiB3aW5kb3cgIT09IG51bGwpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LlAgPSB3aW5kb3cuUHJvbWlzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHNlbGYgIT09ICd1bmRlZmluZWQnICYmIHNlbGYgIT09IG51bGwpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuUCA9IHNlbGYuUHJvbWlzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IiwidmFyIGNvbmNhdE1hcCA9IHJlcXVpcmUoJ2NvbmNhdC1tYXAnKTtcbnZhciBiYWxhbmNlZCA9IHJlcXVpcmUoJ2JhbGFuY2VkLW1hdGNoJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZXhwYW5kVG9wO1xuXG52YXIg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b3JFYWNoKGZ1bmN0aW9uKGNlbGwsIGNvbHVtbkluZGV4KSB7XG4gICAgICAgIGNlbGwueSA9IHJvd0luZGV4O1xuICAgICAgICBjZWxsLnggPSBjb2x1bW5JbmRleDtcbiAgICAgICAgZm9yIChsZXQgeSA9IHJvd0luZGV4OyB5ID49IDA7IHktLSkge1xuICAgICAgICAgIGxldCByb3cyID0gdGFibGVbeV07XG4gICAgICAgICAgbGV0IHhNYXggPSB5ID09PSByb3dJbmRleCA/IGNvbHVtbkluZGV4IDogcm93Mi5sZW5ndGg7XG4gICAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB4TWF4OyB4KyspIHtcbiAgICAgICAgICAgIGxldCBjZWxsMiA9IHJvdzJbeF07XG4gICAgICAgICAgICB3aGlsZSAoY2VsbHNDb25mbGljdChjZWxsLCBjZWxsMikpIHtcbiAgICAgICAgICAgICAgY2VsbC54Kys7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIGZ1bmN0aW9uIG1heFdpZHRoKHRhYmxlKSB7XG4gICAgbGV0IG13ID0gMDtcbiAgICB0YWJsZS5mb3JFYWNoKGZ1bmN0aW9uKHJvdykge1xuICAgICAgcm93LmZvckVhY2goZnVuY3Rpb24oY2VsbCkge1xuICAgICAgICBtdyA9IE1hdGgubWF4KG13LCBjZWxsLnggKyAoY2VsbC5jb2xTcGFuIHx8IDEpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICAgIHJldHVybiBtdztcbiAgfVxuXG4gIGZ1bmN0aW9uIG1heEhlaWdodCh0YWJsZSkge1xuICAgIHJldHVybiB0YWJsZS5sZW5ndGg7XG4gIH1cblxuICBmdW5jdGlvbiBjZWxsc0NvbmZsaWN0KGNlbGwxLCBjZWxsMikge1xuICAgIGxldCB5TWluMSA9IGNlbGwxLnk7XG4gICAgbGV0IHlNYXgxID0gY2VsbDEueSAtIDEgKyAoY2VsbDE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AgICAgICAgIHgrKztcbiAgICAgICAgICB9XG4gICAgICAgICAgbGV0IHkyID0geSArIDE7XG4gICAgICAgICAgd2hpbGUgKHkyIDwgaF9tYXggJiYgYWxsQmxhbmsodGFibGUsIHkyLCBvcHRzLngsIG9wdHMueCArIG9wdHMuY29sU3BhbikpIHtcbiAgICAgICAgICAgIG9wdHMucm93U3BhbisrO1xuICAgICAgICAgICAgeTIrKztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsZXQgY2VsbCA9IG5ldyBDZWxsKG9wdHMpO1xuICAgICAgICAgIGNlbGwueCA9IG9wdHMueDtcbiAgICAgICAgICBjZWxsLnkgPSBvcHRzLnk7XG4gICAgICAgICAgaW5zZXJ0Q2VsbChjZWxsLCB0YWJsZVt5XSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBmdW5jdGlvbiBnZW5lcmF0ZUNlbGxzKHJvd3MpIHtcbiAgICByZXR1cm4gcm93cy5tYXAoZnVuY3Rpb24ocm93KSB7XG4gICAgICBpZiAoIUFycmF5LmlzQXJyYXkocm93KSkge1xuICAgICAgICBsZXQga2V5ID0gT2JqZWN0LmtleXMocm93KVswXTtcbiAgICAgICAgcm93ID0gcm93W2tleV07XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHJvdykpIHtcbiAgICAgICAgICByb3cgPSByb3cuc2xpY2UoKTtcbiAgICAgICAgICByb3cudW5zaGlmdChrZXkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJvdyA9IFtrZXksIHJvd107XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiByb3cubWFwKGZ1bmN0aW9uKGNlbGwpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBDZWxsKGNlbGwpO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICBmdW5jdGlvbiBtYWtlVGFibGVMYXlvdXQocm93cykge1xuICAgIGxldCBjZWxsUm93cyA9IGdlbmVyYXRlQ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ICfMiycsICfMjycsXG4gICAgICAnzJInLCAnzJMnLCAnzJQnLCAnzL0nLFxuICAgICAgJ8yJJywgJ82jJywgJ82kJywgJ82lJyxcbiAgICAgICfNpicsICfNpycsICfNqCcsICfNqScsXG4gICAgICAnzaonLCAnzasnLCAnzawnLCAnza0nLFxuICAgICAgJ82uJywgJ82vJywgJ8y+JywgJ82bJyxcbiAgICAgICfNhicsICfMmicsXG4gICAgXSxcbiAgICAnZG93bic6IFtcbiAgICAgICfMlicsICfMlycsICfMmCcsICfMmScsXG4gICAgICAnzJwnLCAnzJ0nLCAnzJ4nLCAnzJ8nLFxuICAgICAgJ8ygJywgJ8ykJywgJ8ylJywgJ8ymJyxcbiAgICAgICfMqScsICfMqicsICfMqycsICfMrCcsXG4gICAgICAnzK0nLCAnzK4nLCAnzK8nLCAnzLAnLFxuICAgICAgJ8yxJywgJ8yyJywgJ8yzJywgJ8y5JyxcbiAgICAgICfMuicsICfMuycsICfMvCcsICfNhScsXG4gICAgICAnzYcnLCAnzYgnLCAnzYknLCAnzY0nLFxuICAgICAgJ82OJywgJ82TJywgJ82UJywgJ82VJyxcbiAgICAgICfNlicsICfNmScsICfNmicsICfMoycsXG4gICAgXSxcbiAgICAnbWlkJzogW1xuICAgICAgJ8yVJywgJ8ybJywgJ8yAJywgJ8yBJyxcbiAgICAgICfNmCcsICfMoScsICfMoicsICfMpycsXG4gICAgICAnzKgnLCAnzLQnLCAnzLUnLCAnzLYnLFxuICAgICAgJ82cJywgJ82dJywgJ82eJyxcbiAgICAgICfNnycsICfNoCcsICfNoicsICfMuCcsXG4gICAgICAnzLcnLCAnzaEnLCAnINKJJyxcbiAgICBdLFxuICB9O1xuICB2YXIgYWxsID0gW10uY29uY2F0KHNvdWwudXAsIHNvdWwuZG93biwgc291bC5taWQpO1xuXG4gIGZ1bmN0aW9uIHJhbmRvbU51bWJlcihyYW5nZSkge1xuICAgIHZhciByID0gTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogcmFuZ2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dkb3duJzogMCwgJ21pZCc6IDB9O1xuICAgICAgc3dpdGNoIChvcHRpb25zLnNpemUpIHtcbiAgICAgICAgY2FzZSAnbWluaSc6XG4gICAgICAgICAgY291bnRzLnVwID0gcmFuZG9tTnVtYmVyKDgpO1xuICAgICAgICAgIGNvdW50cy5taWQgPSByYW5kb21OdW1iZXIoMik7XG4gICAgICAgICAgY291bnRzLmRvd24gPSByYW5kb21OdW1iZXIoOCk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ21heGknOlxuICAgICAgICAgIGNvdW50cy51cCA9IHJhbmRvbU51bWJlcigxNikgKyAzO1xuICAgICAgICAgIGNvdW50cy5taWQgPSByYW5kb21OdW1iZXIoNCkgKyAxO1xuICAgICAgICAgIGNvdW50cy5kb3duID0gcmFuZG9tTnVtYmVyKDY0KSArIDM7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgY291bnRzLnVwID0gcmFuZG9tTnVtYmVyKDgpICsgMTtcbiAgICAgICAgICBjb3VudHMubWlkID0gcmFuZG9tTnVtYmVyKDYpIC8gMjtcbiAgICAgICAgICBjb3VudHMuZG93biA9IHJhbmRvbU51bWJlcig4KSArIDE7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICAgIHZhciBhcnIgPSBbJ3VwJywgJ21pZCcsICdkb3duJ107XG4gICAgICBmb3IgKHZhciBkIGluIGFycikge1xuICAgICAgICB2YXIgaW5kZXggPSBhcnJbZF07XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDw9IGNvdW50c1tpbmRleF07IGkrKykge1xuICAgICAgICAgIGlmIChvcHRpb25zW2luZGV4XSkge1xuICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0ICsgc291bFtpbmRleF1bcmFuZG9tTnVtYmVyKHNvdWxbaW5kZXhdLmxlbmd0aCldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1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5jYWxsKCcwJywgNyAtIHQubGVuZ3RoKSArIHQ7XG4gICAgICAgIH1cbiAgICAgIH0gcmV0dXJuIHM7XG4gICAgfTtcblxuICAgIGlmIChmcmFjdERpZ2l0cyA8IDAgfHwgZnJhY3REaWdpdHMgPiAyMCkgdGhyb3cgUmFuZ2VFcnJvcignSW5jb3JyZWN0IGZyYWN0aW9uIGRpZ2l0cycpO1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICBpZiAobnVtYmVyICE9IG51bWJlcikgcmV0dXJuICdOYU4nO1xuICAgIGlmIChudW1iZXIgPD0gLTFlMjEgfHwgbnVtYmVyID49IDFlMjEpIHJldHVybiBTdHJpbmcobnVtYmVyKTtcbiAgICBpZiAobnVtYmVyIDwgMCkge1xuICAgICAgc2lnbiA9ICctJztcbiAgICAgIG51bWJlciA9IC1udW1iZXI7XG4gICAgfVxuICAgIGlmIChudW1iZXIgPiAxZS0yMSkge1xuICAgICAgZSA9IGxvZyhudW1iZXIgKiBwb3coMiwgNjksIDEpKSAtIDY5O1xuICAgICAgeiA9IGUgPCAwID8gbnVtYmVyICogcG93KDIsIC1lLCAxKSA6IG51bWJlciAvIHBvdygyLCBlLCAxKTtcbiAgICAgIHogKj0gMHgxMDAwMDAwMDAwMDAwMDtcbiAgICAgIGUgPSA1MiAtIGU7XG4gICAgICBpZiAoZSA+IDApIHtcbiAgICAgICAgbXVsdGlwbHkoMCwgeik7XG4gICAgICAgIGogPSBmcmFjdERpZ2l0cztcbiAgICAgICAgd2hpbGUgKGogPj0gNykge1xuICAgICAgICAgIG11bHRpcGx5KDFlNywgMCk7XG4gICAgICAgICAgaiAtPSA3O1xuICAgICAgICB9XG4gICAgICAgIG11bHRpcGx5KHBvdygxMCwgaiwgMSksIDApO1xuICAgICAgICBqID0gZSAtIDE7XG4gICAgICAgIHdoaWxlIChqID49IDIzKSB7XG4gICAgICAgICAgZGl2aWRlKDEgPDwgMjMpO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gICB2YXIgaGFuZGxlciA9IG9rID8gcmVhY3Rpb24ub2sgOiByZWFjdGlvbi5mYWlsO1xuICAgICAgdmFyIHJlc29sdmUgPSByZWFjdGlvbi5yZXNvbHZlO1xuICAgICAgdmFyIHJlamVjdCA9IHJlYWN0aW9uLnJlamVjdDtcbiAgICAgIHZhciBkb21haW4gPSByZWFjdGlvbi5kb21haW47XG4gICAgICB2YXIgcmVzdWx0LCB0aGVuLCBleGl0ZWQ7XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZS5yZWplY3Rpb24gPT09IFVOSEFORExFRCkgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSwgc3RhdGUpO1xuICAgICAgICAgICAgc3RhdGUucmVqZWN0aW9uID0gSEFORExFRDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTsgLy8gY2FuIHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWpl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KyApIGlzIG5lZWRlZCwgaW4gY29tYmluYXRpb24gd2l0aCBzb21lIFMgc2xpY2luZywgdG9cbiAgICAgIC8vIHNpbXVsYXRlIHRoZSAneScgZmxhZy5cbiAgICAgIHZhciBzcGxpdHRlciA9IG5ldyBDKFNVUFBPUlRTX1kgPyByeCA6ICdeKD86JyArIHJ4LnNvdXJjZSArICcpJywgZmxhZ3MpO1xuICAgICAgdmFyIGxpbSA9IGxpbWl0ID09PSB1bmRlZmluZWQgPyBNQVhfVUlOVDMyIDogbGltaXQgPj4+IDA7XG4gICAgICBpZiAobGltID09PSAwKSByZXR1cm4gW107XG4gICAgICBpZiAoUy5sZW5ndGggPT09IDApIHJldHVybiBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgUykgPT09IG51bGwgPyBbU10gOiBbXTtcbiAgICAgIHZhciBwID0gMDtcbiAgICAgIHZhciBxID0gMDtcbiAgICAgIHZhciBBID0gW107XG4gICAgICB3aGlsZSAocSA8IFMubGVuZ3RoKSB7XG4gICAgICAgIHNwbGl0dGVyLmxhc3RJbmRleCA9IFNVUFBPUlRTX1kgPyBxIDogMDtcbiAgICAgICAgdmFyIHogPSBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgU1VQUE9SVFNfWSA/IFMgOiBTLnNsaWNlKHEpKTtcbiAgICAgICAgdmFyIGU7XG4gICAgICAgIGlmIChcbiAgICAgICAgICB6ID09PSBudWxsIHx8XG4gICAgICAgICAgKGUgPSBtaW4odG9MZW5ndGgoc3BsaXR0ZXIubGFzdEluZGV4ICsgKFNVUFBPUlRTX1kgPyAwIDogcSkpLCBTLmxlbmd0aCkpID09PSBwXG4gICAgICAgICkge1xuICAgICAgICAgIHEgPSBhZHZhbmNlU3RyaW5nSW5kZXgoUywgcSwgdW5pY29kZU1hdGNoaW5nKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBBLnB1c2goUy5zbGljZShwLCBxKSk7XG4gICAgICAgICAgaWYgKEEubGVuZ3Ro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pIHtcbiAgICBpZiAoaW5wdXQuY2hhckF0KDEpICE9ICc6JykgcmV0dXJuO1xuICAgIHBvaW50ZXIgKz0gMjtcbiAgICBwaWVjZUluZGV4Kys7XG4gICAgY29tcHJlc3MgPSBwaWVjZUluZGV4O1xuICB9XG4gIHdoaWxlIChjaGFyKCkpIHtcbiAgICBpZiAocGllY2VJbmRleCA9PSA4KSByZXR1cm47XG4gICAgaWYgKGNoYXIoKSA9PSAnOicpIHtcbiAgICAgIGlmIChjb21wcmVzcyAhPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgcG9pbnRlcisrO1xuICAgICAgcGllY2VJbmRleCsrO1xuICAgICAgY29tcHJlc3MgPSBwaWVjZUluZGV4O1xuICAgICAgY29udGludWU7XG4gICAgfVxuICAgIHZhbHVlID0gbGVuZ3RoID0gMDtcbiAgICB3aGlsZSAobGVuZ3RoIDwgNCAmJiBIRVgudGVzdChjaGFyKCkpKSB7XG4gICAgICB2YWx1ZSA9IHZhbHVlICogMTYgKyBwYXJzZUludChjaGFyKCksIDE2KTtcbiAgICAgIHBvaW50ZXIrKztcbiAgICAgIGxlbmd0aCsrO1xuICAgIH1cbiAgICBpZiAoY2hhcigpID09ICcuJykge1xuICAgICAgaWYgKGxlbmd0aCA9PSAwKSByZXR1cm47XG4gICAgICBwb2ludGVyIC09IGxlbmd0aDtcbiAgICAgIGlmIChwaWVjZUluZGV4ID4gNikgcmV0dXJuO1xuICAgICAgbnVtYmVyc1NlZW4gPSAwO1xuICAgICAgd2hpbGUgKGNoYXIoKSkge1xuICAgICAgICBpcHY0UGllY2UgPSBudWxsO1xuICAgICAgICBpZiAobnVtYmVyc1NlZW4gPiAwKSB7XG4gICAgICAgICAgaWYgKGNoYXIoKSA9PSAnLicgJiYgbnVtYmVyc1NlZW4gPCA0KSBwb2ludGVyKys7XG4gICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFESUdJVC50ZXN0KGNoYXIoKSkpIHJldHVybjtcbiAgICAgICAgd2hpbGUgKERJR0lULnRlc3QoY2hhcigpKSkge1xuICAgICAgICAgIG51bWJlciA9IHBhcnNlSW50KGNoYXIoKSwgMTApO1xuICAgICAgICAgIGlmIChpcHY0UGllY2UgPT09IG51bGwpIGlwdjRQaWVjZSA9IG51bWJlcjtcbiAgICAgICAgICBlbHNlIGlmIChpcHY0UGllY2UgPT0gMCkgcmV0dXJuO1xuICAgICAgICAgIGVsc2UgaXB2NFBpZWNlID0gaXB2NFBpZWNlICogMTAgKyBudW1iZXI7XG4gICAgICAgICAgaWYgKGlwdjRQaWVjZSA+IDI1NSkgcmV0dXJuO1xuICAgICAgICAgIHBvaW50ZXIrKztcbiAgICAgICAgfVxuICAgICAgICBhZGRyZXNzW3BpZWNlSW5kZXhdID0gYWRkcmVzc1twaWVjZUluZGV4XSAqIDI1NiArIGlwdjRQaWVjZTtcbiAgICAgICAgbnVtYmVyc1NlZW4rKztcbiAgICAgICAgaWYgKG51bWJlcnNTZWVuID09IDIgfHwgbnVtYmVyc1NlZW4gPT0gNCkgcGllY2VJbmRleCsrO1xuICAgICAgfVxuICAgICAgaWYgKG51bWJlcnNTZWVuICE9IDQpIHJldHVybjtcbiAgICAgIGJyZWFrO1xuICAgIH0gZWxzZSBpZiAoY2hhcigpID09ICc6Jykge1xuICAgICAgcG9pbnRlcisrO1xuICAgICAgaWYgKCFjaGFyKCkpIHJldHVybjtcbiAgICB9IGVsc2UgaWYgKGNoYXIoKSkgcmV0dXJuO1xuICAgIGFkZHJlc3NbcGllY2VJbmRleCsrXSA9IHZhbHVlO1xuICB9XG4gIGlmIChjb21wcmVzcyAhPT0gbnVsbCkge1xuICAgIHN3YXBzID0gcGllY2VJbmRleCAtIGNvbXByZXNzO1xuICAgIHBpZWNlSW5kZXggPSA3O1xuICAgIHdoaWxlIChwaWVjZUluZGV4ICE9IDAgJiYgc3dhcHMgPiAwKSB7XG4gICAgICBzd2FwID0gYWRkcmVzc1twaWVjZUluZGV4XTtcb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ludGVyID0gMDtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSBlbHNlIHJldHVybiBJTlZBTElEX1NDSEVNRTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgTk9fU0NIRU1FOlxuICAgICAgICBpZiAoIWJhc2UgfHwgKGJhc2UuY2Fubm90QmVBQmFzZVVSTCAmJiBjaGFyICE9ICcjJykpIHJldHVybiBJTlZBTElEX1NDSEVNRTtcbiAgICAgICAgaWYgKGJhc2UuY2Fubm90QmVBQmFzZVVSTCAmJiBjaGFyID09ICcjJykge1xuICAgICAgICAgIHVybC5zY2hlbWUgPSBiYXNlLnNjaGVtZTtcbiAgICAgICAgICB1cmwucGF0aCA9IGJhc2UucGF0aC5zbGljZSgpO1xuICAgICAgICAgIHVybC5xdWVyeSA9IGJhc2UucXVlcnk7XG4gICAgICAgICAgdXJsLmZyYWdtZW50ID0gJyc7XG4gICAgICAgICAgdXJsLmNhbm5vdEJlQUJhc2VVUkwgPSB0cnVlO1xuICAgICAgICAgIHN0YXRlID0gRlJBR01FTlQ7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgc3RhdGUgPSBiYXNlLnNjaGVtZSA9PSAnZmlsZScgPyBGSUxFIDogUkVMQVRJVkU7XG4gICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICBjYXNlIFNQRUNJQUxfUkVMQVRJVkVfT1JfQVVUSE9SSVRZOlxuICAgICAgICBpZiAoY2hhciA9PSAnLycgJiYgY29kZVBvaW50c1twb2ludGVyICsgMV0gPT0gJy8nKSB7XG4gICAgICAgICAgc3RhdGUgPSBTUEVDSUFMX0FVVEhPUklUWV9JR05PUkVfU0xBU0hFUztcbiAgICAgICAgICBwb2ludGVyKys7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc3RhdGUgPSBSRUxBVElWRTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSBicmVhaztcblxuICAgICAgY2FzZSB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5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGNvZGVQb2ludCA9IGJ1ZmZlckNvZGVQb2ludHNbaV07XG4gICAgICAgICAgICBpZiAoY29kZVBvaW50ID09ICc6JyAmJiAhc2VlblBhc3N3b3JkVG9rZW4pIHtcbiAgICAgICAgICAgICAgc2VlblBhc3N3b3JkVG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBlbmNvZGVkQ29kZVBvaW50cyA9IHBlcmNlbnRFbmNvZGUoY29kZVBvaW50LCB1c2VyaW5mb1BlcmNlbnRFbmNvZGVTZXQpO1xuICAgICAgICAgICAgaWYgKHNlZW5QYXNzd29yZFRva2VuKSB1cmwucGFzc3dvcmQgKz0gZW5jb2RlZENvZGVQb2ludHM7XG4gICAgICAgICAgICBlbHNlIHVybC51c2VybmFtZSArPSBlbmNvZGVkQ29kZVBvaW50cztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnVmZmVyID0gJyc7XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgY2hhciA9PSBFT0YgfHwgY2hhciA9PSAnLycgfHwgY2hhciA9PSAnPycgfHwgY2hhciA9PSAnIycgfHxcbiAgICAgICAgICAoY2hhciA9PSAnXFxcXCcgJiYgaXNTcGVjaWFsKHVybCkpXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChzZWVuQXQgJiYgYnVmZmVyID09ICcnKSByZXR1cm4gSU5WQUxJRF9BVVRIT1JJVFk7XG4gICAgICAgICAgcG9pbnRlciAtPSBhcnJheUZyb20oYnVmZmVyKS5sZW5ndGggKyAxO1xuICAgICAgICAgIGJ1ZmZlciA9ICcnO1xuICAgICAgICAgIHN0YXRlID0gSE9TVDtcbiAgICAgICAgfSBlbHNlIGJ1ZmZlciArPSBjaGFyO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSBIT1NUOlxuICAgICAgY2FzZSBIT1NUTkF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RhdGUgPSBQQVRIX1NUQVJUO1xuICAgICAgICAgIGlmIChzdGF0ZU92ZXJyaWRlKSByZXR1cm47XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoYXIgPT0gJ1snKSBzZWVuQnJhY2tldCA9IHRydWU7XG4gICAgICAgICAgZWxzZSBpZiAoY2hhciA9PSAnXScpIHNlZW5CcmFja2V0ID0gZmFsc2U7XG4gICAgICAgICAgYnVmZmVyICs9IGNoYXI7XG4gICAgICAgIH0gYnJlYWs7XG5cbiAgICAgIGNhc2UgUE9SVDpcbiAgICAgICAgaWYgKERJR0lULnRlc3QoY2hhcikpIHtcbiAgICAgICAgICBidWZmZXIgKz0gY2hhcjtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICBjaGFyID09IEVPRiB8fCBjaGFyID09ICcvJyB8fCBjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJyB8fFxuICAgICAgICAgIChjaGFyID09ICdcXFxcJyAmJiBpc1NwZWNpYWwodXJsKSkgfHxcbiAgICAgICAgICBzdGF0ZU92ZXJyaWRlXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChidWZmZXIgIT0gJycpIHtcbiAgICAgICAgICAgIHZhciBwb3J0ID0gcGFyc2VJbnQoYnVmZmVyLCAxMCk7XG4gICAgICAgICAgICBpZiAocG9ydCA+IDB4RkZGRikgcmV0dXJuIElOVkFMSURfUE9SVDtcbiAgICAgICAgICAgIHVybC5wb3J0ID0gKGlzU3BlY2lhbCh1cmwpICYmIHBvcnQgPT09IHNwZWNpYWxTY2hlbWVzW3VybC5zY2hlbWVdKSA/IG51bGwgOiBwb3J0O1xuICAgICAgICAgICAgYnVmZmVyID0gJyc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChzdGF0ZU92ZXJyaWRlKSByZXR1cm47XG4gICAgICAgICAgc3RhdGUgPSBQQVRIX1NUQVJUO1xuICAgICAgICAgIGNvbnRpbnV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50cy5zbGljZShwb2ludGVyKS5qb2luKCcnKSkpIHtcbiAgICAgICAgICAgICAgdXJsLmhvc3QgPSBiYXNlLmhvc3Q7XG4gICAgICAgICAgICAgIHVybC5wYXRoID0gYmFzZS5wYXRoLnNsaWNlKCk7XG4gICAgICAgICAgICAgIHNob3J0ZW5VUkxzUGF0aCh1cmwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RhdGUgPSBQQVRIO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHN0YXRlID0gUEFUSDtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSBicmVhaztcblxuICAgICAgY2FzZSBGSUxFX1NMQVNIOlxuICAgICAgICBpZiAoY2hhciA9PSAnLycgfHwgY2hhciA9PSAnXFxcXCcpIHtcbiAgICAgICAgICBzdGF0ZSA9IEZJTEVfSE9TVDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoYmFzZSAmJiBiYXNlLnNjaGVtZSA9PSAnZmlsZScgJiYgIXN0YXJ0c1dpdGhXaW5kb3dzRHJpdmVMZXR0ZXIoY29kZVBvaW50cy5zbGljZShwb2ludGVyKS5qb2luKCcnKSkpIHtcbiAgICAgICAgICBpZiAoaXNXaW5kb3dzRHJpdmVMZXR0ZXIoYmFzZS5wYXRoWzBdLCB0cnVlKSkgdXJsLnBhdGgucHVzaChiYXNlLnBhdGhbMF0pO1xuICAgICAgICAgIGVsc2UgdXJsLmhvc3QgPSBiYXNlLmhvc3Q7XG4gICAgICAgIH1cbiAgICAgICAgc3RhdGUgPSBQQVRIO1xuICAgICAgICBjb250aW51ZTtcblxuICAgICAgY2FzZSBGSUxFX0hPU1Q6XG4gICAgICAgIGlmIChjaGFyID09IEVPRiB8fCBjaGFyID09ICcvJyB8fCBjaGFyID09ICdcXFxcJyB8fCBjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJykge1xuICAgICAgICAgIGlmICghc3RhdGVPdmVycmlkZSAmJiBpc1dpbmRvd3NEcml2ZUxldHRlcihidWZmZXIpKSB7XG4gICAgICAgICAgICBzdGF0ZSA9IFBBVEg7XG4gICAgICAgICAgfSBlbHNlIGlmIChidWZmZXIgPT0gJycpIHtcbiAgICAgICAgICAgIHVybC5ob3N0ID0gJyc7XG4gICAgICAgICAgICBpZiAoc3RhdGVPdmVycmlkZSkgcmV0dXJuO1xuICAgICAgICAgICAgc3RhdGUgPSBQQVRIX1NUQVJUO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmYWlsdXJlID0gcGFyc2VIb3N0KHVybCwgYnVmZmVyKTtcbiAgICAgICAgICAgIGlmIChmYWlsdXJlKSByZXR1cm4gZmFpbHVyZTtcbiAgICAgICAgICAgIGlmICh1cmwuaG9zdCA9PSAnbG9jYWxob3N0JykgdXJsLmhvc3QgPSAnJztcbiAgICAgICAgICAgIGlmIChzdGF0ZU92ZXJyaWRlKSByZXR1cm47XG4gICAgICAgICAgICBidWZmZXIgPSAnJztcbiAgICAgICAgICAgIHN0YXRlID0gUEFUSF9TVEFSVDtcbiAgICAgICAgICB9IGNvbnRpbnVlO1xuICAgICAgICB9IGVsc2UgYnVmZmVyICs9IGNoYXI7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIFBBVEhfU1RBUlQ6XG4gICAgICAgIGlmIChpc1NwZWNpYWwodXJsKSkge1xuICAgICAgICAgIHN0YXRlID0gUEFUSDtcbiAgICAgICAgICBpZiAoY2hhciAhPSAnLycgJiYgY2hhciAhPSAnXFxcXCcpIGNvbnRpbnVlO1xuICAgICAgICB9IGVsc2UgaWYgKCFzdGF0ZU92ZXJyaWRlICYmIGNoYXIgPT0gJz8nKSB7XG4gICAgICAgICAgdXJsLnF1ZXJ5ID0gJyc7XG4gICAgICAgICAgc3RhdGUgPSBRVUVSWTtcbiAgICAgICAgfSBlbHNlIGlmICghc3RhdGVPdmVycmlkZSAmJiBjaGFyID09ICcjJykge1xuICAgICAgICAgIHVybC5mcmFnbWVudCA9ICcnO1xuICAgICAgICAgIHN0YXRlID0gRlJBR01FTlQ7XG4gICAgICAgIH0gZWxzZSBpZiAoY2hhciAhPSBFT0YpIHtcbiAgICAgICAgICBzdGF0ZSA9IFBBVEg7XG4gICAgICAgICAgaWYgKGNoYXIgIT0gJy8nKSBjb250aW51ZTtcbiAgICAgICAgfSBicmVhaztcblxuICAgICAgY2FzZSBQQVRIOlxuICAgICAgICBpZiAoXG4gICAgICAgICAgY2hhciA9PSBFT0YgfHwgY2hhciA9PSAnLycgfHxcbiAgICAgICAgICAoY2hhciA9PSAnXFxcXCcgJiYgaXNTcGVjaWFsKHVybCkpIHx8XG4gICAgICAgICAgKCFzdGF0ZU92ZXJyaWRlICYmIChjaGFyID09ICc/JyB8fCBjaGFyID09ICcjJykpXG4gICAgICAgICkge1xuICAgICAgICAgIGlmIChpc0RvdWJsZURvdChidWZmZXIpKSB7XG4gICAgICAgICAgICBzaG9ydGVuVVJMc1BhdGgodXJsKTtcbiAgICAgICAgICAgIGlmIChjaGFyICE9ICcvJyAmJiAhKGNoYXIgPT0gJ1xcXFwnICYmIGlzU3BlY2lhbCh1cmwpKSkge1xuICAgICAgICAgICAgICB1cmwucGF0aC5wdXNoKCcnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGlzU2luZ2xlRG90KGJ1ZmZlcikpIHtcbiAgICAgICAgICAgIGlmIChjaGFyICE9ICcvJyAmJiAhKGNoYXIgPT0gJ1xcXFwnICYmIGlzU3BlY2lhbCh1cmwpKSkge1xuICAgICAgICAgICAgICB1cmwucGF0aC5wdXNoKCcnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHVybC5zY2hlbWUgPT0gJ2ZpbGUnICYmICF1cmwucGF0aC5sZW5ndGggJiYgaXNXaW5kb3dzRHJpdmVMZXR0ZXIoYnVmZmVyKSkge1xuICAgICAgICAgICAgICBpZiAodXJsLmhvc3QpIHVybC5ob3N0ID0gJyc7XG4gICAgICAgICAgICAgIGJ1ZmZlciA9IGJ1ZmZlci5jaGFyQXQoMCkgKyAnOic7IC8vIG5vcm1hbGl6ZSB3aW5kb3dzIGRyaXZlIGxldHRlclxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdXJsLnBhdGgucHVzaChidWZmZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBidWZmZXIgPSAnJztcbiAgICAgICAgICBpZiAodXJsLnNjaGVtZSA9PSAnZmlsZScgJiYgKGNoYXIgPT0gRU9GIHx8IGNoYXIgPT0gJz8nIHx8IGNoYXIgPT0gJyMnKSkge1xuICAgICAgICAgICAgd2hpbGUgKHVybC5wYXRoLmxlbmd0aCA+IDEgJiYgdXJsLnBhdGhbMF0gPT09ICcnKSB7XG4gICAgICAgICAgICAgIHVybC5wYXRoLnNoaWZ0KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChjaGFyID09ICc/Jykge1xuICAgICAgICAgICAgdXJsLnF1ZXJ5ID0gJyc7XG4gICAgICAgICAgICBzdGF0ZSA9IFFVRVJZO1xuICAgICAgICAgIH0gZWxzZSBpZiAoY2hhciA9PSAnIycpIHtcbiAgICAgICAgICAgIHVybC5mcmFnbWVudCA9ICcnO1xuICAgICAgICAgICAgc3RhdGUgPSBGUkFHTUVOVDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgYnVmZmVyICs9IHBlcmNlbnRFbmNvZGUoY2hhciwgcGF0aFBlcmNlbnRFbmNvZGVTZXQpO1xuICAgICAgICB9IGJyZWFrO1xuXG4gICAgICBjYXNlIENBTk5PVF9CRV9BX0JBU0VfVVJMX1BBVEg6XG4gICAgICAgIGlmIChjaGFyID09ICc/Jykge1xuICAgICAgICAgIHVybC5xdWVyeSA9ICcnO1xuICAgICAgICAgIHN0YXRlID0gUV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ciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiBleHByZXNzaW9uLnJlcGxhY2UoQUxURVJOQVRJVkVfTk9OX1dISVRFU1BBQ0VfVEVYVF9SRUdFWFAoKSwgZnVuY3Rpb24gKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgZV8xLCBfYTtcbiAgICAgICAgICAgIC8vIHJlcGxhY2UgXFwvIHdpdGggL1xuICAgICAgICAgICAgLy8gcmVwbGFjZSAvIHdpdGggfFxuICAgICAgICAgICAgdmFyIHJlcGxhY2VtZW50ID0gbWF0Y2gucmVwbGFjZSgvXFwvL2csICd8JykucmVwbGFjZSgvXFxcXFxcfC9nLCAnLycpO1xuICAgICAgICAgICAgaWYgKHJlcGxhY2VtZW50LmluZGV4T2YoJ3wnKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfYiA9IF9fdmFsdWVzKHJlcGxhY2VtZW50LnNwbGl0KC9cXHwvKSksIF9jID0gX2IubmV4dCgpOyAhX2MuZG9uZTsgX2MgPSBfYi5uZXh0KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0ID0gX2MudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jaGVja05vUGFyYW1ldGVyVHlwZShwYXJ0LCBQQVJBTUVURVJfVFlQRVNfQ0FOTk9UX0JFX0FMVEVSTkFUSVZFKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaCAoZV8xXzEpIHsgZV8xID0geyBlcnJvcjogZV8xXzEgfTsgfVxuICAgICAgICAgICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF9jICYmICFfYy5kb25lICYmIChfYSA9IF9iLnJldHVybikpIF9hLmNhbGwoX2IpO1xuIC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gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaCAoZV8yXzEpIHsgZV8yID0geyBlcnJvcjogZV8yXzEgfTsgfVxuICAgICAgICAgICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMV8xICYmICFiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJzXzFfMS5kb25lICYmIChfYiA9IGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMS5yZXR1cm4pKSBfYi5jYWxsKGJlc3RQYXJhbWV0ZXJUeXBlTWF0Y2hlcnNfMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmluYWxseSB7IGlmIChlXzIpIHRocm93IGVfMi5lcnJvcjsgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwYXJhbWV0ZXJUeXBlcyA9IHBhcmFtZXRlclR5cGVzLnNvcnQoUGFyYW1ldGVyVHlwZV8xLmRlZmF1bHQuY29tcGFyZSk7XG4gICAgICAgICAgICAgICAgcGFyYW1ldGVyVHlwZUNvbWJpbmF0aW9ucy5wdXNoKHBhcmFtZXRlclR5cGVzKTtcbiAgICAgICAgICAgICAgICBleHByZXNzaW9uVGVtcGxhdGUgKz0gZXNjYXBlKHRleHQuc2xpY2UocG9zLCBiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJfMS5zdGFydCkpO1xuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25UZW1wbGF0ZSArPSAneyVzfSc7XG4gICAgICAgICAgICAgICAgcG9zID1cbiAgICAgICAgICAgICAgICAgICAgYmVzdFBhcmFtZXRlclR5cGVNYXRjaGVyXzEuc3RhcnQgKyBiZXN0UGFyYW1ldGVyVHlwZU1hdGNoZXJfMS5ncm91cC5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJicmVha1wiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHBvcyA+PSB0ZXh0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBcImJyZWFrXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zdGFudC1jb25kaXRpb25cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgIHZhciBzdGF0ZV8xID0gX2xvb3BfMSgpO1xuICAgICAgICAgICAgaWYgKHN0YXRlXzEgPT09IFwiYnJlYWtcIilcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBleHByZXNzaW9uVGVtcGxhdGUgKz0gZXNjYXBlKHRleHQuc2xpY2UocG9zKSk7XG4gICAgICAgIHJldHVybiBuZXcgQ29tYmluYXRvcmlhbEdlbmVyYXRlZEV4cHJlc3Npb25GYWN0b3J5XzEuZGVmYXVsdChleHByZXNzaW9uVGVtcGxhdGUsIHBhcmFtZXRlclR5cGVDb21iaW5hdGlvbnMpLmdlbmVyYXRlRXhwcmVzc2lvbnMoKTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIEBkZXByZWNhdGVkXG4gICAgICovXG4gICAgQ3VjdW1iZXJFeHByZXNzaW9uR2VuZXJhdG9yLnByb3RvdHlwZS5nZW5lcmF0ZUV4cHJlc3Npb24gPSBmdW5jdGlvbiAodGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICByZXR1cm4gdXRpbF8xLmRlZmF1bHQuZGVwcmVjYXRlKGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLmdlbmVyYXRlRXhwcmVzc2lvbnModGV4dClbM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mRvbmUgJiYgKF9hID0gX2IucmV0dXJuKSkgX2EuY2FsbChfYik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmaW5hbGx5IHsgaWYgKGVfMykgdGhyb3cgZV8zLmVycm9yOyB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHBhcmFtZXRlck1hdGNoZXJzO1xuICAgIH07XG4gICAgQ3VjdW1iZXJFeHByZXNzaW9uR2VuZXJhdG9yLmNyZWF0ZVBhcmFtZXRlclR5cGVNYXRjaGVyczIgPSBmdW5jdGlvbiAocGFyYW1ldGVyVHlwZSwgdGV4dCkge1xuICAgICAgICB2YXIgZV80LCBfYTtcbiAgICAgICAgLy8gVE9ETzogW10ubWFwXG4gICAgICAgIHZhciByZXN1bHQgPSBbXTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGZvciAodmFyIF9iID0gX192YWx1ZXMocGFyYW1ldGVyVHlwZS5yZWdleHBTdHJpbmdzKSwgX2MgPSBfYi5uZXh0KCk7ICFfYy5kb25lOyBfYyA9IF9iLm5leHQoKSkge1xuICAgICAgICAgICAgICAgIHZhciByZWdleHAgPSBfYy52YWx1ZTtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaChuZXcgUGFyYW1ldGVyVHlwZU1hdGNoZXJfMS5kZWZhdWx0KHBhcmFtZXRlclR5cGUsIHJlZ2V4cCwgdGV4dCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlXzRfMSkgeyBlXzQgPSB7IGVycm9yOiBlXzRfMSB9OyB9XG4gICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoX2MgJiYgIV9jLmRvbmUgJiYgKF9hID0gX2IucmV0dXJuKSkgX2EuY2FsbChfYik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmaW5hbGx5IHsgaWYgKGVfNCkgdGhyb3cgZV80LmVycm9yOyB9XG4gICAg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HNlIGlmIChjID09PSAnXScgJiYgIWVzY2FwaW5nKSB7XG4gICAgICAgICAgICAgICAgY2hhckNsYXNzID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID09PSAnKCcgJiYgIWVzY2FwaW5nICYmICFjaGFyQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKG5ldyBHcm91cEJ1aWxkZXJfMS5kZWZhdWx0KCkpO1xuICAgICAgICAgICAgICAgIGdyb3VwU3RhcnRTdGFjay5wdXNoKG4gKyAxKTtcbiAgICAgICAgICAgICAgICBub25DYXB0dXJpbmdNYXliZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoYyA9PT0gJyknICYmICFlc2NhcGluZyAmJiAhY2hhckNsYXNzKSB7XG4gICAgICAgICAgICAgICAgdmFyIGdiID0gc3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgdmFyIGdyb3VwU3RhcnQgPSBncm91cFN0YXJ0U3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgaWYgKGdiLmNhcHR1cmluZykge1xuICAgICAgICAgICAgICAgICAgICBnYi5zb3VyY2UgPSBfdGhpcy5yZWdleHAuc291cmNlLnN1YnN0cmluZyhncm91cFN0YXJ0LCBuKTtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbc3RhY2subGVuZ3RoIC0gMV0uYWRkKGdiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGdiLm1vdmVDaGlsZHJlblRvKHN0YWNrW3N0YWNrLmxlbmd0aCAtIDFdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbm9uQ2FwdHVyaW5nTWF5YmUgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPT09ICc/JyAmJiBsYXN0ID09PSAnKCcpIHtcbiAgICAgICAgICAgICAgICBub25DYXB0dXJpbmdNYXliZSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICgoYyA9PT0gJzonIHx8IGMgPT09ICchJyB8fCBjID09PSAnPScgfHwgYyA9PT0gJzwnKSAmJlxuICAgICAgICAgICAgICAgIGxhc3QgPT09ICc/JyAmJlxuICAgICAgICAgICAgICAgIG5vbkNhcHR1cmluZ01heWJlKSB7XG4gICAgICAgICAgICAgICAgc3RhY2tbc3RhY2subGVuZ3RoIC0gMV0uc2V0Tm9uQ2FwdHVyaW5nKCk7XG4gICAgICAgICAgICAgICAgbm9uQ2FwdHVyaW5nTWF5YmUgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVzY2FwaW5nID0gYyA9PT0gJ1xcXFwnICYmICFlc2NhcGluZztcbiAgICAgICAgICAgIGxhc3QgPSBjO1xuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5ncm91cEJ1aWxkZXIgPSBzdGFjay5wb3AoKTtcbiAgICB9XG4gICAgVHJlZVJlZ2V4cC5wcm90b3R5cGUubWF0Y2ggPSBmdW5jdGlvbiAocykge1xuICAgICAgICB2YXIgbWF0Y2ggPSB0aGlzLnJlZ2V4LmV4ZWMocyk7XG4gICAgICAgIGlmICghbWF0Y2gpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHZhciBncm91cEluZGV4ID0gMDtcbiAgICAgICAgdmFyIG5leHRHcm91cEluZGV4ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gZ3JvdXBJbmRleCsrOyB9O1xuICAgICAgICByZXR1cm4gdGhpcy5ncm91cEJ1aWxkZXIuYnVpbGQobWF0Y2gsIG5leHRHcm91cEluZGV4KTtcbiAgICB9O1xuICAgIHJldHVybiBUcmVlUmVnZXhwO1xufSgpKTtcbmV4cG9ydHMuZGVmYXVsdCA9IFRyZWVSZWdleHA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cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICgnKCcgPT09IHRva2VuKSB7XG4gICAgICAgICAgICBjaGVjayhleHBlY3RlZFRva2VuVHlwZSwgT1BFUkFORCk7XG4gICAgICAgICAgICBvcGVyYXRvcnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICBleHBlY3RlZFRva2VuVHlwZSA9IE9QRVJBTkQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoJyknID09PSB0b2tlbikge1xuICAgICAgICAgICAgY2hlY2soZXhwZWN0ZWRUb2tlblR5cGUsIE9QRVJBVE9SKTtcbiAgICAgICAgICAgIHdoaWxlIChvcGVyYXRvcnMubGVuZ3RoID4gMCAmJiBwZWVrKG9wZXJhdG9ycykgIT09ICcoJykge1xuICAgICAgICAgICAgICAgIHB1c2hFeHByKHBvcChvcGVyYXRvcnMpLCBleHByZXNzaW9ucyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob3BlcmF0b3JzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdTeW50YXggZXJyb3IuIFVubWF0Y2hlZCApJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocGVlayhvcGVyYXRvcnMpID09PSAnKCcpIHtcbiAgICAgICAgICAgICAgICBwb3Aob3BlcmF0b3JzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV4cGVjdGVkVG9rZW5UeXBlID0gT1BFUkFUT1I7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjaGVjayhleHBlY3RlZFRva2VuVHlwZSwgT1BFUkFORCk7XG4gICAgICAgICAgICBwdXNoRXhwcih0b2tlbiwgZXhwcmVzc2lvbnMpO1xuICAgICAgICAgICAgZXhwZWN0ZWRUb2tlblR5cGUgPSBPUEVSQVRPUjtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIHdoaWxlIChvcGVyYXRvcnMubGVuZ3RoID4gMCkge1xuICAgICAgICBpZiAocGVlayhvcGVyYXRvcnMpID09PSAnKCcpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKCdTeW50YXggZXJyb3IuIFVubWF0Y2hlZCAoJyk7XG4gICAgICAgIH1cbiAgICAgICAgcHVzaEV4cHIocG9wKG9wZXJhdG9ycyksIGV4cHJlc3Npb25zKTtcbiAgICB9XG4gICAgcmV0dXJuIHBvcChleHByZXNzaW9ucyk7XG59XG5leHBvcnRzLmRlZmF1bHQgPSBwYXJzZTtcbmZ1bmN0aW9uIHRva2VuaXplKGV4cHIpIHtcbiAgICB2YXIgdG9rZW5zID0gW107XG4gICAgdmFyIGlzRXNjYXBlZCA9IGZhbHNlO1xuICAgIHZhciB0b2tlbjtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4cHIubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdmFyIGMgPSBleHByLmNoYXJBdChpKTtcbiAgICAgICAgaWYgKCdcXFxcJyA9PT0gYykge1xuICAgICAgICAgICAgaXNFc2NhcGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmICgvXFxzLy50ZXN0KGMpKSB7XG4gICAgICAgICAgICAgICAgLy8gc2tpcFxuICAgICAgICAgICAgICAgIGlmICh0b2tlbikge1xuICAgICAgICAgICAgICAgICAgICAvLyBlbmQgb2YgdG9rZW5cbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4uam9pbignJykpO1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoKGMgPT09ICcoJyB8fCBjID09PSAnKScpICYmICFpc0VzY2FwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBlbmQgb2YgdG9rZW5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuLmpvaW4oJycpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKGMpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0b2tlbiA/IHRva2VuIDogW107IC8vIHN0YXJ0IG9mIHRva2VuXG4gICAgICAgICAgICAgICAgdG9rZW4ucHVzaChjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzRXNjYXBlZCA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmICh0b2tlbikge1xuICAgICAgICB0b2tlbnMucHVzaCh0b2tlbi5qb2luKCcnKSk7XG4gICAgfVxuICAgIHJldHVybiB0b2tlbnM7XG59XG5mdW5jdGlvbiBpc1VuYXJ5KHRva2VuKSB7XG4gICAgcmV0dXJuICdub3QnID09PSB0b2tlbjtcbn1cbmZ1bmN0aW9uIGlzQmluYXJ5KHRva2VuKSB7XG4gICAgcmV0dXJuICdvcicgPT09IHRva2VuIHx8ICdhbmQnID09PSB0b2tlbjtcbn1cbmZ1bmN0aW9uIGlzT3AodG9rZW4pIHtcbiAgICByZXR1cm4gQVNTT0NbdG9rZW5dICE9PSB1bmRlZmluZWQ7XG59XG5mdW5jdGlvbiBjaGVjayhleHBlY3RlZFRva2VuVHlwZSwgdG9rZW5UeXBlKSB7XG4gICAgaWYgKGV4cGVjdGVkVG9rZW5UeXBlICE9PSB0b2tlblR5cGUpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdTeW50YXggZXJyb3IuIEV4cGVjdGVkICcgKyBleHBlY3RlZFRva2VuVHlwZSk7XG4gICAgfVxuf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Ly8gRmFpbC1mYXN0IGJ1dCByZXR1cm4gbG9jYXRpb25zIGxpa2UgXCIobmF0aXZlKVwiXG4gICAgICAgICAgICBpZiAodXJsTGlrZS5pbmRleE9mKCc6JykgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFt1cmxMaWtlXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHJlZ0V4cCA9IC8oLis/KSg/OlxcOihcXGQrKSk/KD86XFw6KFxcZCspKT8kLztcbiAgICAgICAgICAgIHZhciBwYXJ0cyA9IHJlZ0V4cC5leGVjKHVybExpa2UucmVwbGFjZSgvW1xcKFxcKV0vZywgJycpKTtcbiAgICAgICAgICAgIHJldHVybiBbcGFydHNbMV0sIHBhcnRzWzJdIHx8IHVuZGVmaW5lZCwgcGFydHNbM10gfHwgdW5kZWZpbmVkXTtcbiAgICAgICAgfSxcblxuICAgICAgICBwYXJzZVY4T3JJRTogZnVuY3Rpb24gRXJyb3JTdGFja1BhcnNlciQkcGFyc2VWOE9ySUUoZXJyb3IpIHtcbiAgICAgICAgICAgIHZhciBmaWx0ZXJlZCA9IGVycm9yLnN0YWNrLnNwbGl0KCdcXG4nKS5maWx0ZXIoZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAhIWxpbmUubWF0Y2goQ0hST01FX0lFX1NUQUNLX1JFR0VYUCk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkLm1hcChmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxpbmUuaW5kZXhPZignKGV2YWwgJykgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaHJvdyBhd2F5IGV2YWwgaW5mb3JtYXRpb24gdW50aWwgd2UgaW1wbGVtZW50IHN0YWNrdHJhY2UuanMvc3RhY2tmcmFtZSM4XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSBsaW5lL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ICAgdmFyIGxvY2F0aW9uUGFydHMgPSB0aGlzLmV4dHJhY3RMb2NhdGlvbihsb2NhdGlvbiA/IGxvY2F0aW9uWzFdIDogdG9rZW5zLnBvcCgpKTtcbiAgICAgICAgICAgICAgICB2YXIgZnVuY3Rpb25OYW1lID0gdG9rZW5zLmpvaW4oJyAnKSB8fCB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgdmFyIGZpbGVOYW1lID0gWydldmFsJywgJzxhbm9ueW1vdXM+J10uaW5kZXhPZihsb2NhdGlvblBhcnRzWzBdKSA+IC0xID8gdW5kZWZpbmVkIDogbG9jYXRpb25QYXJ0c1swXTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uTmFtZTogZnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogZmlsZU5hbWUsXG4gICAgICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxvY2F0aW9uUGFydHNbMV0sXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbk51bWJlcjogbG9jYXRpb25QYXJ0c1syXSxcbiAgICAgICAgICAgICAgICAgICAgc291cmNlOiBsaW5lXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgfSxcblxuICAgICAgICBwYXJzZUZGT3JTYWZhcmk6IGZ1bmN0aW9uIEVycm9yU3RhY2tQYXJzZXIkJHBhcnNlRkZPclNhZmFyaShlcnJvcikge1xuICAgICAgICAgICAgdmFyIGZpbHRlcmVkID0gZXJyb3Iuc3RhY2suc3BsaXQoJ1xcbicpLmZpbHRlcihmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICFsaW5lLm1hdGNoKFNBRkFSSV9OQVRJVkVfQ09ERV9SRUdFWFApO1xuICAgICAgICAgICAgfSwgdGhpcyk7XG5cbiAgICAgICAgICAgIHJldHVybiBmaWx0ZXJlZC5tYXAoZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgICAgIC8vIFRocm93IGF3YXkgZXZhbCBpbmZvcm1hdGlvbiB1bnRpbCB3ZSBpbXBsZW1lbnQgc3RhY2t0cmFjZS5qcy9zdGFja2ZyYW1lIzhcbiAgICAgICAgICAgICAgICBpZiAobGluZS5pbmRleE9mKCcgPiBldmFsJykgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gbGluZS5yZXBsYWNlKC8gbGluZSAoXFxkKykoPzogPiBldmFsIGxpbmUgXFxkKykqID4gZXZhbFxcOlxcZCtcXDpcXGQrL2csICc6JDEnKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobGluZS5pbmRleE9mKCdAJykgPT09IC0xICYmIGxpbmUuaW5kZXhPZignOicpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBTYWZhcmkgZXZhbCBmcmFtZXMgb25seSBoYXZlIGZ1bmN0aW9uIG5hbWVzIGFuZCBub3RoaW5nIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBTdGFja0ZyYW1lKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uTmFtZTogbGluZVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZnVuY3Rpb25OYW1lUmVnZXggPSAvKCguKlwiLitcIlteQF0qKT9bXkBdKikoPzpAKS87XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaGVzID0gbGluZS5tYXRjaChmdW5jdGlvbk5hbWVSZWdleCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmdW5jdGlvbk5hbWUgPSBtYXRjaGVzICYmIG1hdGNoZXNbMV0gPyBtYXRjaGVzWzFdIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYXRpb25QYXJ0cyA9IHRoaXMuZXh0cmFjdExvY2F0aW9uKGxpbmUucmVwbGFjZShmdW5jdGlvbk5hbWVSZWdleCwgJycpKTtcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFN0YWNrRnJhbWUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25OYW1lOiBmdW5jdGlvbk5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogbG9jYXRpb25QYXJ0c1swXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxvY2F0aW9uUGFydHNbMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW5OdW1iZXI6IGxvY2F0aW9uUGFydHNbMl0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2U6IGxpbmVcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcGFyc2VPcGVyYTogZnVuY3Rpb24gRXJyb3JTdGFja1BhcnNlciQkcGFyc2VPcGVyYShlKSB7XG4gICAgICAgICAgICBpZiAoIWUuc3RhY2t0cmFjZSB8fCAoZS5tZXNzYWdlLmluZGV4T2YoJ1xcbicpID4gLTEgJiZcbiAgICAgICAgICAgICAgICBlLm1lc3NhZ2Uuc3BsaXQoJ1xcbicpLmxlbmd0aCA+IGUuc3RhY2t0cmFjZS5zcGxpdCgnXFxuJykubGVuZ3RoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcnNlT3BlcmE5KGUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghZS5zdGFjaykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcnNlT3BlcmExMChlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VPcGVyYTExKGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIHBhcnNlT3BlcmE5OiBmdW5jdGlvbiBFcnJvclN0YWNrUGFyc2VyJCRwYXJzZU9wZXJhOShlKSB7XG4gICAgICAgICAgICB2YXIgbGluZVJFID0gL0xpbmUgKFxcZCspLipzY3JpcHQgKD86aW4gKT8oXFxTKykvaTtcbiAgICAgICAgICAgIHZhciBsaW5lcyA9IGUubWVzc2FnZS5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gW107XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAyLCBsZW4gPSBsaW5lcy5sZW5ndGg7IGkgPCBsZW47IGkgKz0gMikge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmVSRS5leGVjKGxpbmVzW2ldKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gobmV3IFN0YWNrRnJhbWUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWU6IG1hdGNoWzJdLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbWF0Y2hbMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2U6IGxpbmVzW2ldXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcGFyc2VPcGVyYTEwOiBmdW5jdGlvbiBFcnJvclN0YWNrUGFyc2VyJCRwYXJzZU9wZXJhMTAoZSkge1xuICAgICAgICAgICAgdmFyIGxpbmVSRSA9IC9MaW5lIChcXGQrKS4qc2NyaXB0ICg/OmluICk/KFxcUyspKD86OiBJbiBmdW5jdGlvbiAoXFxTKykpPyQvaTtcbiAgICAgICAgICAgIHZhciBsaW5lcyA9IGUuc3RhY2t0cmFjZS5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gW107XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBsaW5lcy5sZW5ndGg7IGkgPCBsZW47IGkgKz0gMikge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmVSRS5leGVjKGxpbmVzW2ldKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25OYW1lOiBtYXRjaFszXSB8fCB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWU6IG1hdGNoWzJdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IG1hdGNoWzFdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogbGluZXNbaV1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9LFxuXG4gICAgICAgIC8vIE9wZXJhIDEwLjY1KyBFcnJvci5zdGFjayB2ZXJ5IHNpbWlsYXIgdG8gRkYvU2FmYXJpXG4gICAgICAgIHBhcnNlT3BlcmExMTogZnVuY3Rpb24gRXJyb3JTdGFja1BhcnNlciQkcGFyc2VPcGVyYTExKGVycm9yKSB7XG4gICAgICAgICAgICB2YXIgZmlsdGVyZWQgPSBlcnJvci5zdGFjay5zcGxpdCgnXFxuJykuZmlsdGVyKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICAgIC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HZhciBsaXN0ZW5lcnMsIGV2ZW50cywgaTtcblxuICAgICAgZXZlbnRzID0gdGhpcy5fZXZlbnRzO1xuICAgICAgaWYgKCFldmVudHMpXG4gICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICAvLyBub3QgbGlzdGVuaW5nIGZvciByZW1vdmVMaXN0ZW5lciwgbm8gbmVlZCB0byBlbWl0XG4gICAgICBpZiAoIWV2ZW50cy5yZW1vdmVMaXN0ZW5lcikge1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgIHRoaXMuX2V2ZW50cyA9IG9iamVjdENyZWF0ZShudWxsKTtcbiAgICAgICAgICB0aGlzLl9ldmVudHNDb3VudCA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoZXZlbnRzW3R5cGVdKSB7XG4gICAgICAgICAgaWYgKC0tdGhpcy5fZXZlbnRzQ291bnQgPT09IDApXG4gICAgICAgICAgICB0aGlzLl9ldmVudHMgPSBvYmplY3RDcmVhdGUobnVsbCk7XG4gICAgICAgICAgZWxzZVxuICAgICAgICAgICAgZGVsZXRlIGV2ZW50c1t0eXBlXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cblxuICAgICAgLy8gZW1pdCByZW1vdmVMaXN0ZW5lciBmb3IgYWxsIGxpc3RlbmVycyBvbiBhbGwgZXZlbnRzXG4gICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICB2YXIga2V5cyA9IG9iamVjdEtleXMoZXZlbnRzKTtcbiAgICAgICAgdmFyIGtleTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGtleXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICBrZXkgPSBrZXlzW2ldO1xuICAgICAgICAgIGlmIChrZXkgPT09ICdyZW1vdmVMaXN0ZW5lcicpIGNvbnRpbnVlO1xuICAgICAgICAgIHRoaXMucmVtb3ZlQWxsTGlz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gICAgICAgIHJlc3VsdC5jb250ZW50VHlwZSA9IGNvbnRlbnRUeXBlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICBjYXNlICdEYXRhVGFibGUnOlxuICAgICAgICB2YXIgcm93cyA9IGdldFRhYmxlUm93cyhub2RlKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0eXBlOiBub2RlLnJ1bGVUeXBlLFxuICAgICAgICAgIGxvY2F0aW9uOiByb3dzWzBdLmxvY2F0aW9uLFxuICAgICAgICAgIHJvd3M6IHJvd3MsXG4gICAgICAgIH1cbiAgICAgIGNhc2UgJ0JhY2tncm91bmQnOlxuICAgICAgICB2YXIgYmFja2dyb3VuZExpbmUgPSBub2RlLmdldFRva2VuKCdCYWNrZ3JvdW5kTGluZScpO1xuICAgICAgICB2YXIgZGVzY3JpcHRpb24gPSBnZXREZXNjcmlwdGlvbihub2RlKTtcbiAgICAgICAgdmFyIHN0ZXBzID0gZ2V0U3RlcHMobm9kZSk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0eXBlOiBub2RlLnJ1bGVUeXBlLFxuICAgICAgICAgIGxvY2F0aW9uOiBnZXRMb2NhdGlvbihiYWNrZ3JvdW5kTGluZSksXG4gICAgICAgICAga2V5d29yZDogYmFja2dyb3VuZExpbmUubWF0Y2hlZEtleXdvcmQsXG4gICAgICAgICAgbmFtZTogYmFja2dyb3VuZExpbmUubWF0Y2hlZFRleHQsXG4gICAgICAgICAgZGVzY3JpcHRpb246IGRlc2NyaXB0aW9uLFxuICAgICAgICAgIHN0ZXBzOiBzdGVwc1xuICAgICAgICB9O1xuICAgICAgY2FzZSAnU2NlbmFyaW9fRGVmaW5pdGlvbic6XG4gICAgICAgIHZhciB0YWdzID0gZ2V0VGFncyhub2RlKTtcbiAgICAgICAgdmFyIHNjZW5hcmlvTm9kZSA9IG5vZGUuZ2V0U2luZ2xlKCdTY2VuYXJpbycpO1xuICAgICAgICBp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AgIFwiKiBcIixcbiAgICAgIFwi15XXktedIFwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLXqNen16JcIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLXkNeR15wgXCJcbiAgICBdLFxuICAgIFwiZXhhbXBsZXNcIjogW1xuICAgICAgXCLXk9eV15LXnteQ15XXqlwiXG4gICAgXSxcbiAgICBcImZlYXR1cmVcIjogW1xuICAgICAgXCLXqteb15XXoNeUXCJcbiAgICBdLFxuICAgIFwiZ2l2ZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLXkdeU15nXoNeq158gXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIkhlYnJld1wiLFxuICAgIFwibmF0aXZlXCI6IFwi16LXkdeo15nXqlwiLFxuICAgIFwic2NlbmFyaW9cIjogW1xuICAgICAgXCLXqteo15fXmdepXCJcbiAgICBdLFxuICAgIFwic2NlbmFyaW9PdXRsaW5lXCI6IFtcbiAgICAgIFwi16rXkdeg15nXqiDXqteo15fXmdepXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIteQ15YgXCIsXG4gICAgICBcIteQ15bXmSBcIlxuICAgIF0sXG4gICAgXCJ3aGVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi15vXkNep16ggXCJcbiAgICBdXG4gIH0sXG4gIFwiaGlcIjoge1xuICAgIFwiYW5kXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi4KSU4KSwIFwiLFxuICAgICAgXCLgpKTgpKXgpL4gXCJcbiAgICBdLFxuICAgIFwiYmFja2dyb3VuZFwiOiBbXG4gICAgICBcIuCkquClg+Ckt+CljeCkoOCkreClguCkruCkv1wiXG4gICAgXSxcbiAgICBcImJ1dFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuCkquCksCBcIixcbiAgICAg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gIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIlF1YW5kbyBcIlxuICAgIF1cbiAgfSxcbiAgXCJqYVwiOiB7XG4gICAgXCJhbmRcIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLjgYvjgaRcIlxuICAgIF0sXG4gICAgXCJiYWNrZ3JvdW5kXCI6IFtcbiAgICAgIFwi6IOM5pmvXCJcbiAgICBdLFxuICAgIFwiYnV0XCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi44GX44GL44GXXCIsXG4gICAgICBcIuS9huOBl1wiLFxuICAgICAgXCLjgZ/jgaDjgZdcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcIuS+i1wiLFxuICAgICAgXCLjgrXjg7Pjg5fjg6tcIlxuICAgIF0sXG4gICAgXCJmZWF0dXJlXCI6IFtcbiAgICAgIFwi44OV44Kj44O844OB44OjXCIsXG4gICAgICBcIuapn+iDvVwiXG4gICAgXSxcbiAgICBcImdpdmVuXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi5YmN5o+QXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIkphcGFuZXNlXCIsXG4gICAgXCJuYXRpdmVcIjogXCLml6XmnKzoqp5cIixcbiAgICBcInNjZW5hcmlvXCI6IFtcbiAgICAgIFwi44K344OK44Oq44KqXCJcbiAgICBdLFxuICAgIFwic2NlbmFyaW9PdXRsaW5lXCI6IFtcbiAgICAgIFwi44K344OK44Oq44Kq44Ki44Km44OI44Op44Kk44OzXCIsXG4gICAgICBcIuOCt+ODiuODquOCquODhuODs+ODl+ODrOODvOODiFwiLFxuICAgICAgXCLjg4bjg7Pjg5fjg6xcIixcbiAgICAgIFwi44K344OK44Oq44Kq44OG44Oz44OX44OsXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIuOBquOCieOBsFwiXG4gICAgXSxcbiAgICBcIndo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gXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIlNsb3Zha1wiLFxuICAgIFwibmF0aXZlXCI6IFwiU2xvdmVuc2t5XCIsXG4gICAgXCJzY2VuYXJpb1wiOiBbXG4gICAgICBcIlNjZW7DoXJcIlxuICAgIF0sXG4gICAgXCJzY2VuYXJpb091dGxpbmVcIjogW1xuICAgICAgXCJOw6HEjXJ0IFNjZW7DoXJ1XCIsXG4gICAgICBcIk7DocSNcnQgU2NlbsOhcmFcIixcbiAgICAgIFwiT3Nub3ZhIFNjZW7DoXJhXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIlRhayBcIixcbiAgICAgIFwiUG90b20gXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcIktlxI8gXCIsXG4gICAgICBcIkFrIFwiXG4gICAgXVxuICB9LFxuICBcInNsXCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIkluIFwiLFxuICAgICAgXCJUZXIgXCJcbiAgICBdLFxuICAgIFwiYmFja2dyb3VuZFwiOiBbXG4gICAgICBcIktvbnRla3N0XCIsXG4gICAgICBcIk9zbm92YVwiLFxuICAgICAgXCJPemFkamVcIlxuICAgIF0sXG4gICAgXCJidXRcIjogW1xuICAgICAgXCJUb2RhIFwiLFxuICAgICAgXCJBbXBhayBcIixcbiAgICAgIFwiVmVuZGFyIFwiXG4gICAgXSxcbiAgICBcImV4YW1wbGVzXCI6IFtcbiAgICAgIFwiUHJpbWVyaVwiLFxuICAgICAgXCJTY2VuYXJpamlcIlxuICAgIF0sXG4gICAgXCJmZWF0dXJlXCI6IFtcbiAgICAgIFwiRnVua2Npb25hbG5vc3RcIixcbiAgICAgIFwiRnVua2NpamFcIixcbiAgICAgIFwiTW/Fvm5vc3RpXCIsXG4gICAgICBcIk1vem5vc3RpXCIsXG4gICAgICBcIkxhc3Rub3N0XCIsXG4gICAgICBcIlpuYc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C8IFwiLFxuICAgICAgXCLQktOZIFwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLQmtC10YDQtdGIXCJcbiAgICBdLFxuICAgIFwiYnV0XCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAgIFwi0JvTmdC60LjQvSBcIixcbiAgICAgIFwi05jQvNC80LAgXCJcbiAgICBdLFxuICAgIFwiZXhhbXBsZXNcIjogW1xuICAgICAgXCLSrtGA0L3TmdC60LvTmdGAXCIsXG4gICAgICBcItCc0LjRgdCw0LvQu9Cw0YBcIlxuICAgIF0sXG4gICAgXCJmZWF0dXJlXCI6IFtcbiAgICAgIFwi0JzTqdC80LrQuNC90LvQtdC6XCIsXG4gICAgICBcItKu0LfQtdC90YfTmdC70LXQutC70LXQu9C10LpcIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItOY0LnRgtC40LogXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIlRhdGFyXCIsXG4gICAgXCJuYXRpdmVcIjogXCLQotCw0YLQsNGA0YfQsFwiLFxuICAgIFwic2NlbmFyaW9cIjogW1xuICAgICAgXCLQodGG0LXQvdCw0YDQuNC5XCJcbiAgICBdLFxuICAgIFwic2NlbmFyaW9PdXRsaW5lXCI6IFtcbiAgICAgIFwi0KHRhtC10L3QsNGA0LjQudC90YvSoyDRgtOp0LfQtdC70LXRiNC1XCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCd05nRgtC40pfTmdC005kgXCJcbiAgICBdLFxuICAgIFwid2hlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItOY0LPTmdGAIFwiXG4gICAgXVxuICB9LFxuICBcInVrXCI6IHtcbiAgICBcImFuZFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCGIFwiLFxuICAgICAgXCLQkCDRgtCw0LrQvtC2IFwiLFxuICAgICAgXCLQotCwIFwiXG4gICAgXSxcbiAgICBcImJhY2tncm91bmRcIjogW1xuICAgICAgXCLQn9C10YDQtdC00YPQvNC+0LLQsFwiXG4gICAgXSxcbiAgICBcImJ1dFwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCQ0LvQtSBcIlxuICAgIF0sXG4gICAgXCJleGFtcGxlc1wiOiBbXG4gICAgICBcItCf0YDQuNC60LvQsNC00LhcIlxuICAgIF0sXG4gICAgXCJmZWF0dXJlXCI6IFtcbiAgICAgIFwi0KTRg9C90LrRhtGW0L7QvdCw0LtcIlxuICAgIF0sXG4gICAgXCJnaXZlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCf0YDQuNC/0YPRgdGC0LjQvNC+IFwiLFxuICAgICAgXCLQn9GA0LjQv9GD0YHRgtC40LzQviwg0YnQviBcIixcbiAgICAgIFwi0J3QtdGF0LDQuSBcIixcbiAgICAgIFwi0JTQsNC90L4gXCJcbiAgICBdLFxuICAgIFwibmFtZVwiOiBcIlVrcmFpbmlhblwiLFxuICAgIFwibmF0aXZlXCI6IFwi0KPQutGA0LDRl9C90YHRjNC60LBcIixcbiAgICBcInNjZW5hcmlvXCI6IFtcbiAgICAgIFwi0KHRhtC10L3QsNGA0ZbQuVwiXG4gICAgXSxcbiAgICBcInNjZW5hcmlvT3V0bGluZVwiOiBbXG4gICAgICBcItCh0YLRgNGD0LrRgtGD0YDQsCDRgdGG0LXQvdCw0YDRltGOXCJcbiAgICBdLFxuICAgIFwidGhlblwiOiBbXG4gICAgICBcIiogXCIsXG4gICAgICBcItCi0L4gXCIsXG4gICAgICBcItCi0L7QtNGWIFwiXG4gICAgXSxcbiAgICBcIndoZW5cIjogW1xuICAgICAgXCIqIFwiLFxuICAgICAgXCLQr9C60YnQviBcIixcbiAgICAgIFwi0JrQvtC70LggXCJcbiAgICBdXG4gIH0sXG4gIFwidXJcIjoge1xuICAgIFwiYW5kXCI6IFtcbiAgICAgIFwiKiBcIixcbiAgICAg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7XG4gICAgICBlbmRSdWxlKGNvbnRleHQsICdGZWF0dXJlJyk7XG4gICAgICBidWlsZChjb250ZXh0LCB0b2tlbik7XG4gICAgICByZXR1cm4gMjc7XG4gICAgfVxuICAgIGlmKG1hdGNoX0VtcHR5KGNvbnRleHQsIHRva2VuKSkge1xuICAgICAgYnVpbGQoY29udGV4dCwgdG9rZW4pO1xuICAgICAgcmV0dXJuIDE3O1xuICAgIH1cbiAgICBpZihtYXRjaF9Db21tZW50KGNvbnRleHQsIHRva2VuKSkge1xuICAgICAgYnVpbGQoY29udGV4dCwgdG9rZW4pO1xuICAgICAgcmV0dXJuIDE5O1xuICAgIH1cbiAgICBpZihtYXRjaF9TdGVwTGluZShjb250ZXh0LCB0b2tlbikpIHtcbiAgICAgIHN0YXJ0UnVsZShjb250ZXh0LCAnU3RlcCcpO1xuICAgICAgYnVpbGQoY29udGV4dCwgdG9rZW4pO1xuICAgICAgcmV0dXJuIDIwO1xuICAgIH1cbiAgICBpZihtYXRjaF9UYWdMaW5lKGNvbnRleHQsIHRva2VuKSkge1xuICAgICAgaWYobG9va2FoZWFkXzAoY29udGV4dCwgdG9rZW4pKSB7XG4gICAgICBzdGFydFJ1bGUoY29udGV4dCwgJ0V4YW1wbGVzX0RlZmluaXRpb24nKTtcbiAgICAgIHN0YXJ0UnVsZShjb250ZXh0LCAnVGFncycpO1xuICAgICAgYnVpbGQoY29udGV4dCwgdG9rZW4pO1xuICAgICAgcmV0dXJuIDIyO1xuICAgICAgfVxuICAgIH1cbiAgICBpZihtYXRjaF9UYWdMaW5lKGNvbnRleHQsIHRva2VuKSkge1xuICAgICAgZW5kUnVsZShjb250ZXh0LCAnU2NlbmFyaW9PdXRsaW5lJyk7XG4gICAgICBlbmRSdWxlKGNvbnRleHQsICdTY2VuYXJpb19EZWZpbml0aW9uJyk7XG4gICAgICBzdGFydFJ1bGUoY29udGV4dCwgJ1NjZW5hcmlvX0RlZmluaXRpb24nKTtcbiAgICAgIHN0YXJ0UnVsZSh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ICAgICAgICAgZnMuY2xvc2VTeW5jKGZkKVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gcmV0XG4gICAgfVxuICB9XG5cbiAgZnVuY3Rpb24gcGF0Y2hMdXRpbWVzIChmcykge1xuICAgIGlmIChjb25zdGFudHMuaGFzT3duUHJvcGVydHkoXCJPX1NZTUxJTktcIikpIHtcbiAgICAgIGZzLmx1dGltZXMgPSBmdW5jdGlvbiAocGF0aCwgYXQsIG10LCBjYikge1xuICAgICAgICBmcy5vcGVuKHBhdGgsIGNvbnN0YW50cy5PX1NZTUxJTkssIGZ1bmN0aW9uIChlciwgZmQpIHtcbiAgICAgICAgICBpZiAoZXIpIHtcbiAgICAgICAgICAgIGlmIChjYikgY2IoZXIpXG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICB9XG4gICAgICAgICAgZnMuZnV0aW1lcyhmZCwgYXQsIG10LCBmdW5jdGlvbiAoZXIpIHtcbiAgICAgICAgICAgIGZzLmNsb3NlKGZkLCBmdW5jdGlvbiAoZXIyKSB7XG4gICAgICAgICAgICAgIGlmIChjYikgY2IoZXIgfHwgZXIyKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBmcy5sdXRpbWVzU3luYyA9IGZ1bmN0aW9uIChwYXRoLCBhdCwgbXQpIHtcbiAgICAgICAgdmFyIGZkID0gZnMub3BlblN5bmMocGF0aCwgY29uc3RhbnRzLk9fU1lNTElOSylcbiAgICAgICAgdmFyIHJldFxuICAgICAgICB2YXIgdGhyZXcgPSB0cnVlXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0ID0gZnMuZnV0aW1lc1N5bmMoZmQsIGF0LCBtdClcbiAgICAgICAgICB0aHJldyA9IGZhbHNlXG4gICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgaWYgKHRocmV3KSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBmcy5jbG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iBvYmpUYWc7XG4gICAgICBvdGhUYWcgPSBvdGhUYWcgPT0gYXJnc1RhZyA/IG9iamVjdFRhZyA6IG90aFRhZztcblxuICAgICAgdmFyIG9iaklzT2JqID0gb2JqVGFnID09IG9iamVjdFRhZyxcbiAgICAgICAgICBvdGhJc09iaiA9IG90aFRhZyA9PSBvYmplY3RUYWcsXG4gICAgICAgICAgaXNTYW1lVGFnID0gb2JqVGFnID09IG90aFRhZztcblxuICAgICAgaWYgKGlzU2FtZVRhZyAmJiBpc0J1ZmZlcihvYmplY3QpKSB7XG4gICAgICAgIGlmICghaXNCdWZmZXIob3RoZXIpKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIG9iaklzQXJyID0gdHJ1ZTtcbiAgICAgICAgb2JqSXNPYmogPSBmYWxzZTtcbiAgICAgIH1cbiAgICAgIGlmIChpc1NhbWVUYWcgJiYgIW9iaklzT2JqKSB7XG4gICAgICAgIHN0YWNrIHx8IChzdGFjayA9IG5ldyBTdGFjayk7XG4gICAgICAgIHJldHVybiAob2JqSXNBcnIgfHwgaXNUeXBlZEFycmF5KG9iamVjdCkpXG4gICAgICAgICAgPyBlcXVhbEFycmF5cyhvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKVxuICAgICAgICAgIDogZXF1YWxCeVRhZyhvYmplY3QsIG90aGVyLCBvYmpUYWcsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spO1xuICAgICAgfVxuICAgICAgaWYgKCEoYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHKSkge1xuICAgICAgICB2YXIgb2JqSXNXcmFwcGVkID0gb2JqSXNPYmogJiYgaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsICdfX3dyYXBwZWRfXycpLFxuICAgICAgICAgICAgb3RoSXNXcmFwcGVkID0gb3RoSXNPYmogJiYg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biAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpO1xuICAgICAgd2hpbGUgKGluZGV4LS0pIHtcbiAgICAgICAgdmFyIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdO1xuICAgICAgICBpZiAoKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKVxuICAgICAgICAgICAgICA/IGRhdGFbMV0gIT09IG9iamVjdFtkYXRhWzBdXVxuICAgICAgICAgICAgICA6ICEoZGF0YVswXSBpbiBvYmplY3QpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdO1xuICAgICAgICB2YXIga2V5ID0gZGF0YVswXSxcbiAgICAgICAgICAgIG9ialZhbHVlID0gb2JqZWN0W2tleV0sXG4gICAgICAgICAgICBzcmNWYWx1ZSA9IGRhdGFbMV07XG5cbiAgICAgICAgaWYgKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKSB7XG4gICAgICAgICAgaWYgKG9ialZhbHVlID09PSB1bmRlZmluZWQgJiYgIShrZXkgaW4gb2JqZWN0KSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB2YXIgc3RhY2sgPSBuZXcgU3RhY2s7XG4gICAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBjdXN0b21pemVyKG9ialZhbHVlLCBzcmNWYWx1ZSwga2V5LCBvYmplY3QsIHNvdXJjZSwgc3RhY2spO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIShyZXN1bHQgPT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgID8gYmFzZUlzRXF1YWwoc3JjVmFsdWUsIG9ialZhbH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hc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHdoaWxlIChsZW5ndGgtLSkge1xuICAgICAgICB2YXIgaW5kZXggPSBpbmRleGVzW2xlbmd0aF07XG4gICAgICAgIGlmIChsZW5ndGggPT0gbGFzdEluZGV4IHx8IGluZGV4ICE9PSBwcmV2aW91cykge1xuICAgICAgICAgIHZhciBwcmV2aW91cyA9IGluZGV4O1xuICAgICAgICAgIGlmIChpc0luZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgc3BsaWNlLmNhbGwoYXJyYXksIGluZGV4LCAxKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYmFzZVVuc2V0KGFycmF5LCBpbmRleCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gYXJyYXk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucmFuZG9tYCB3aXRob3V0IHN1cHBvcnQgZm9yIHJldHVybmluZ1xuICAgICAqIGZsb2F0aW5nLXBvaW50IG51bWJlcnMuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSBsb3dlciBUaGUgbG93ZXIgYm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHVwcGVyIFRoZSB1cHBlciBib3VuZC5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByYW5kb20gbnVtYmVyLlxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGJhc2VSYW5kb20obG93ZXIsIHVwcGVyKSB7XG4gICAgICByZXR1cm4gbG93ZXIgKyBuYXRpdmVGbG9vcihuYXRpdmVSYW5kb20oKSAqICh1cHBlciAtIGxvd2VyICsgMSkpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnJhb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gPT0gMVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgIHdyYXBwZXIgPSB3cmFwcGVyW2dldEZ1bmNOYW1lKGRhdGFbMF0pXS5hcHBseSh3cmFwcGVyLCBkYXRhWzNdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgd3JhcHBlciA9IChmdW5jLmxlbmd0aCA9PSAxICYmIGlzTGF6aWFibGUoZnVuYykpXG4gICAgICAgICAgICAgID8gd3JhcHBlcltmdW5jTmFtZV0oKVxuICAgICAgICAgICAgICA6IHdyYXBwZXIudGhydShmdW5jKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBhcmdzID0gYXJndW1lbnRzLFxuICAgICAgICAgICAgICB2YWx1ZSA9IGFyZ3NbMF07XG5cbiAgICAgICAgICBpZiAod3JhcHBlciAmJiBhcmdzLmxlbmd0aCA9PSAxICYmIGlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgICByZXR1cm4gd3JhcHBlci5wbGFudCh2YWx1ZSkudmFsdWUoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIGluZGV4ID0gMCxcbiAgICAgICAgICAgICAgcmVzdWx0ID0gbGVuZ3RoID8gZnVuY3NbaW5kZXhdLmFwcGx5KHRoaXMsIGFyZ3MpIDogdmFsdWU7XG5cbiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZnVuY3NbaW5kZXhdLmNhbGwodGhpcywgcmVzdWx0KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IHdyYXBzIGBmdW5jYCB0byBpbnZva2UgaXQgd2l0aCBvcHRpb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ylcbiAgICAgICAgICAgIDogY3VzdG9taXplcihhcnJWYWx1ZSwgb3RoVmFsdWUsIGluZGV4LCBhcnJheSwgb3RoZXIsIHN0YWNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29tcGFyZWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmIChjb21wYXJlZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlc3VsdCA9IGZhbHNlO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIC8vIFJlY3Vyc2l2ZWx5IGNvbXBhcmUgYXJyYXlzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuXG4gICAgICAgIGlmIChzZWVuKSB7XG4gICAgICAgICAgaWYgKCFhcnJheVNvbWUob3RoZXIsIGZ1bmN0aW9uKG90aFZhbHVlLCBvdGhJbmRleCkge1xuICAgICAgICAgICAgICAgIGlmICghY2FjaGVIYXMoc2Vlbiwgb3RoSW5kZXgpICYmXG4gICAgICAgICAgICAgICAgICAgIChhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHwgZXF1YWxGdW5jKGFyclZhbHVlLCBvdGhWYWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spKSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlZW4ucHVzaChvdGhJbmRleCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoIShcbiAgICAgICAgICAgICAgYXJyVmFsdWUgPT09IG90aFZhbHVlIHx8XG4gICAgICAgICAgICAgICAgZXF1YWxGdW5jKGFyclZhbHVlLCBvdGhWYWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spXG4gICAgICAgICAgICApKS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5XSxcbiAgICAgICAgICAgIG90aFZhbHVlID0gb3RoZXJba2V5XTtcblxuICAgICAgICBpZiAoY3VzdG9taXplcikge1xuICAgICAgICAgIHZhciBjb21wYXJlZCA9IGlzUGFydGlhbFxuICAgICAgICAgICAgPyBjdXN0b21pemVyKG90aFZhbHVlLCBvYmpWYWx1ZSwga2V5LCBvdGhlciwgb2JqZWN0LCBzdGFjaylcbiAgICAgICAgICAgIDogY3VzdG9taXplcihvYmpWYWx1ZSwgb3RoVmFsdWUsIGtleSwgb2JqZWN0LCBvdGhlciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICAgIC8vIFJlY3Vyc2l2ZWx5IGNvbXBhcmUgb2JqZWN0cyAoc3VzY2VwdGlibGUgdG8gY2FsbCBzdGFjayBsaW1pdHMpLlxuICAgICAgICBpZiAoIShjb21wYXJlZCA9PT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgID8gKG9ialZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMob2JqVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpXG4gICAgICAgICAgICAgIDogY29tcGFyZWRcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBza2lwQ3RvciB8fCAoc2tpcEN0b3IgPSBrZXkgPT0gJ2NvbnN0cnVjdG9yJyk7XG4gICAgICB9XG4gICAgICBpZiAocmVzdWx0ICYmICFza2lwQ3Rvcikge1xuICAgICAgICB2YXIgb2JqQ3RvciA9IG9iamVjdC5jb25zdHJ1Y3RvcixcbiAgICAgICAgICAgIG90aEN0b3IgPSBvdGhlci5jb25zdHJ1Y3RvcjtcblxuICAgICAgICAvLyBOb24gYE9iamVjdGAgb2JqZWN0IGluc3RhbmNlcyB3aXRoIGRpZmZlcmVudCBjb25zdHJ1Y3RvcnMgYXJlIG5vdCBlcXVh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G4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBzeW1ib2xzLlxuICAgICAqL1xuICAgIHZhciBnZXRTeW1ib2xzID0gIW5hdGl2ZUdldFN5bWJvbHMgPyBzdHViQXJyYXkgOiBmdW5jdGlvbihvYmplY3QpIHtcbiAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICBvYmplY3QgPSBPYmplY3Qob2JqZWN0KTtcbiAgICAgIHJldHVybiBhcnJheUZpbHRlcihuYXRpdmVHZXRTeW1ib2xzKG9iamVjdCksIGZ1bmN0aW9uKHN5bWJvbCkge1xuICAgICAgICByZXR1cm4gcHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChvYmplY3QsIHN5bWJvbCk7XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBzeW1ib2xzIG9mIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBzeW1ib2xzLlxuICAgICAqL1xuICAgIHZhciBnZXRTeW1ib2xzSW4gPSAhbmF0aXZlR2V0U3ltYm9scyA/IHN0dWJBcnJheSA6IGZ1bmN0aW9uKG9iamVjdCkge1xuICAgICAgdmFyIHJlc3VsdCA9IFtdO1xuICAgICAgd2hpbGUgKG9iamVjdCkge1xuICAgICAgICBhcnJheVB1c2gocmVzdWx0LCBnZXRTeW1ib2xzKG9iamVjdCkpO1xuICAgICAgICBvYmplY3QgPSBnZXRQcm90b3R5cGUob2JqZWN0KTtcbiAgICAgIH1cbiAgICAgIHJldHVybiByZXN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ICAqIGluaGVyaXRlZCBzb3VyY2UgcHJvcGVydGllcy5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMC4wXG4gICAgICogQGFsaWFzIGV4dGVuZFxuICAgICAqIEBjYXRlZ29yeSBPYmplY3RcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuXG4gICAgICogQHBhcmFtIHsuLi5PYmplY3R9IFtzb3VyY2VzXSBUaGUgc291cmNlIG9iamVjdHMuXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAc2VlIF8uYXNzaWduXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIGZ1bmN0aW9uIEZvbygpIHtcbiAgICAgKiAgIHRoaXMuYSA9IDE7XG4gICAgICogfVxuICAgICAqXG4gICAgICogZnVuY3Rpb24gQmFyKCkge1xuICAgICAqICAgdGhpcy5jID0gMztcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBGb28ucHJvdG90eXBlLmIgPSAyO1xuICAgICAqIEJhci5wcm90b3R5cGUuZCA9IDQ7XG4gICAgICpcbiAgICAgKiBfLmFzc2lnbkluKHsgJ2EnOiAwIH0sIG5ldyBGb28sIG5ldyBCYXIpO1xuICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMywgJ2QnOiA0IH1cbiAgICAgKi9cbiAgICB2YXIgYXNzaWduSW4gPSBjcmVhdGVBc3NpZ25lcihmdW5jdGlvbihvYmplY3QsIHNvdXJjZSkge1xuICAgICAgY29weU9iamVjdChzb3VyY2UsIGtleXNJbihzb3VyY2UpLCBvYmplY3QpO1xuICAgIH0pO1xuXG4gICAgLyoqXG4gICAgICog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N0LCBzb3VyY2VzKSB7XG4gICAgICBvYmplY3QgPSBPYmplY3Qob2JqZWN0KTtcblxuICAgICAgdmFyIGluZGV4ID0gLTE7XG4gICAgICB2YXIgbGVuZ3RoID0gc291cmNlcy5sZW5ndGg7XG4gICAgICB2YXIgZ3VhcmQgPSBsZW5ndGggPiAyID8gc291cmNlc1syXSA6IHVuZGVmaW5lZDtcblxuICAgICAgaWYgKGd1YXJkICYmIGlzSXRlcmF0ZWVDYWxsKHNvdXJjZXNbMF0sIHNvdXJjZXNbMV0sIGd1YXJkKSkge1xuICAgICAgICBsZW5ndGggPSAxO1xuICAgICAgfVxuXG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICB2YXIgc291cmNlID0gc291cmNlc1tpbmRleF07XG4gICAgICAgIHZhciBwcm9wcyA9IGtleXNJbihzb3VyY2UpO1xuICAgICAgICB2YXIgcHJvcHNJbmRleCA9IC0xO1xuICAgICAgICB2YXIgcHJvcHNMZW5ndGggPSBwcm9wcy5sZW5ndGg7XG5cbiAgICAgICAgd2hpbGUgKCsrcHJvcHNJbmRleCA8IHByb3BzTGVuZ3RoKSB7XG4gICAgICAgICAgdmFyIGtleSA9IHByb3BzW3Byb3BzSW5kZXhdO1xuICAgICAgICAgIHZhciB2YWx1ZSA9IG9iamVjdFtrZXldO1xuXG4gICAgICAgICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQgfHxcbiAgICAgICAgICAgICAgKGVxKHZhbHVlLCBvYmplY3RQcm90b1trZXldKSAmJiAhaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpKSB7XG4gICAgICAgICAgICBvYmplY3Rba2V5XSA9IHNvdXJjZVtrZXldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gb2JqZWN0O1xuICAgIH0pO1xuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5kZWZhdWx0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AgICApICtcbiAgICAgICAgKGlzRXZhbHVhdGluZ1xuICAgICAgICAgID8gJywgX19qID0gQXJyYXkucHJvdG90eXBlLmpvaW47XFxuJyArXG4gICAgICAgICAgICBcImZ1bmN0aW9uIHByaW50KCkgeyBfX3AgKz0gX19qLmNhbGwoYXJndW1lbnRzLCAnJykgfVxcblwiXG4gICAgICAgICAgOiAnO1xcbidcbiAgICAgICAgKSArXG4gICAgICAgIHNvdXJjZSArXG4gICAgICAgICdyZXR1cm4gX19wXFxufSc7XG5cbiAgICAgIHZhciByZXN1bHQgPSBhdHRlbXB0KGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gRnVuY3Rpb24oaW1wb3J0c0tleXMsIHNvdXJjZVVSTCArICdyZXR1cm4gJyArIHNvdXJjZSlcbiAgICAgICAgICAuYXBwbHkodW5kZWZpbmVkLCBpbXBvcnRzVmFsdWVzKTtcbiAgICAgIH0pO1xuXG4gICAgICAvLyBQcm92aWRlIHRoZSBjb21waWxlZCBmdW5jdGlvbidzIHNvdXJjZSBieSBpdHMgYHRvU3RyaW5nYCBtZXRob2Qgb3JcbiAgICAgIC8vIHRoZSBgc291cmNlYCBwcm9wZXJ0eSBhcyBhIGNvbnZlbmllbmNlIGZvciBpbmxpbmluZyBjb21waWxlZCB0ZW1wbGF0ZXMuXG4gICAgICByZXN1bHQuc291cmNlID0gc291cmNlO1xuICAgICAgaWYgKGlzRXJyb3IocmVzdWx0KSkge1xuICAgICAgICB0aHJvdyByZXN1bHQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENvbnZlcnRzIGBzdHJpbmdgLCBhcyBhIHdob2xlLCB0byBsb3dlciBjYXNlIGp1c3QgbGlrZVxuICAgICAqIFtTdHJpbmcjdG9Mb3dlckNhc2VdKGh0dHBzOi8vbWRuLmlvL3RvTG93ZXJDYXNlKS5cbiAgICAgKlxuICAgICAqIEBzdGF0aWNcbiAgICAgKi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Ugb3B0aW9ucyBvYmplY3QuXG4gICAgICogQHBhcmFtIHtib29sZWFufSBbb3B0aW9ucy5jaGFpbj10cnVlXSBTcGVjaWZ5IHdoZXRoZXIgbWl4aW5zIGFyZSBjaGFpbmFibGUuXG4gICAgICogQHJldHVybnMge0Z1bmN0aW9ufE9iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogZnVuY3Rpb24gdm93ZWxzKHN0cmluZykge1xuICAgICAqICAgcmV0dXJuIF8uZmlsdGVyKHN0cmluZywgZnVuY3Rpb24odikge1xuICAgICAqICAgICByZXR1cm4gL1thZWlvdV0vaS50ZXN0KHYpO1xuICAgICAqICAgfSk7XG4gICAgICogfVxuICAgICAqXG4gICAgICogXy5taXhpbih7ICd2b3dlbHMnOiB2b3dlbHMgfSk7XG4gICAgICogXy52b3dlbHMoJ2ZyZWQnKTtcbiAgICAgKiAvLyA9PiBbJ2UnXVxuICAgICAqXG4gICAgICogXygnZnJlZCcpLnZvd2VscygpLnZhbHVlKCk7XG4gICAgICogLy8gPT4gWydlJ11cbiAgICAgKlxuICAgICAqIF8ubWl4aW4oeyAndm93ZWxzJzogdm93ZWxzIH0sIHsgJ2NoYWluJzogZmFsc2UgfSk7XG4gICAgICogXygnZnJlZCcpLnZvd2VscygpO1xuICAgICAqIC8vID0+IFsnZSddXG4gICAgICovXG4gICAgZnVuY3Rpb24gbWl4aW4ob2JqZWN0LCBzb3VyY2UsIG9wdGlvbnMpIHtcbiAgICAgIHZhciBwcm9wcyA9IGtleXMoc291cmNlKSxcbiAgICAgICAgICBtZXRob2ROYW1lcyA9IGJhc2VGdW5jdGlvbnMoc291cmNlLCBwcm9wcyk7XG5cbiAgICAgIGlmIChvcHRpb25zID09IG51bGwgJiZcbiAgICAgICAgICAhKGlzT2JqZWN0KHNvdXJjZSkgJiYgKG1ldGhvZE5hbWVzLmxlbmd0aCB8fCAhcHJvcHMubGVuZ3RoKSkpIHtcbiAgICAgICAgb3B0aW9ucyA9IHNvdXJjZTtcbiAgICAgICAgc291cmNlID0gb2JqZWN0O1xuICAgICAgICBvYmplY3QgPSB0aGlzO1xuICAgICAgICBtZXRob2ROYW1lcyA9IGJhc2VGdW5jdGlvbnMoc291cmNlLCBrZXlzKHNvdXJjZSkpO1xuICAgICAgfVxuICAgICAgdmFyIGNoYWluID0gIShpc09iamVjdChvcHRpb25zKSAmJiAnY2hhaW4nIGluIG9wdGlvbnMpIHx8ICEhb3B0aW9ucy5jaGFpbixcbiAgICAgICAgICBpc0Z1bmMgPSBpc0Z1bmN0aW9uKG9iamVjdCk7XG5cbiAgICAgIGFycmF5RWFjaChtZXRob2ROYW1lcywgZnVuY3Rpb24obWV0aG9kTmFtZSkge1xuICAgICAgICB2YXIgZnVuYyA9IHNvdXJjZVttZXRob2ROYW1lXTtcbiAgICAgICAgb2JqZWN0W21ldGhvZE5hbWVdID0gZnVuYztcbiAgICAgICAgaWYgKGlzRnVuYykge1xuICAgICAgICAgIG9iamVjdC5wcm90b3R5cGVbbWV0aG9kTmFtZV0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBjaGFpbkFsbCA9IHRoaXMuX19jaGFpbl9fO1xuICAgICAgICAgICAgaWYgKGNoYWluIHx8IGNoYWluQWxsKSB7XG4gICAgICAgICAgICAgIHZhciByZXN1bHQgPSBvYmplY3QodGhpcy5fX3dyYXBwZWRfXyksXG4gICAgICAgICAgICAgICAgICBhY3Rpb25zID0gcmVzdWx0Ll9fYWN0aW9uc19fID0gY29weUFycmF5KHRoaXMuX19hY3Rpb25zX18pO1xuXG4gICAgICAgICAgICAgIGFjdGlvbnMucHVzaCh7ICdmdW5jJzogZnVuYywgJ2FyZ3MnOiBhcmd1bWVudHMsICd0aGlzQXJnJzogb2JqZWN0IH0pO1xuICAgICAgICAgICAgICByZXN1bHQuX19jaGFpbl9fID0gY2hhaW5BbGw7XG4gICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7X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3J5IFV0aWxcbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBlbXB0eSBhcnJheS5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIGFycmF5cyA9IF8udGltZXMoMiwgXy5zdHViQXJyYXkpO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXlzKTtcbiAgICAgKiAvLyA9PiBbW10sIFtdXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXlzWzBdID09PSBhcnJheXNbMV0pO1xuICAgICAqIC8vID0+IGZhbHNlXG4gICAgICovXG4gICAgZnVuY3Rpb24gc3R1YkFycmF5KCkge1xuICAgICAgcmV0dXJuIFtdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYGZhbHNlYC5cbiAgICAgKlxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAbWVtYmVyT2YgX1xuICAgICAqIEBzaW5jZSA0LjEzLjBcbiAgICAgKiBAY2F0ZWdvcnkgVXRpbFxuICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGBmYWxzZWAuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIF8udGltZXMoMiwgXy5zdHViRmFsc2UpO1xuICAgICAqIC8vID0+IFtmYWxzZSwgZmFsc2VdXG4gICAgICovXG4gICAgZnVuY3Rpb24gc3R1YkZhbHNlKCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYSBuZXcgZW1wdHkgb2JqZWN0LlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMTMuMFxuICAgICAqIEBjYXRlZ29yeSBVdGlsXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGVtcHR5IG9iamVjdC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIG9iamVjdHMgPSBfLnRpbWVzKDIsIF8uc3R1Yk9iamVjdCk7XG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzKTtcbiAgICAgKiAvLyA9PiBbe30sIHt9XVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2cob2JqZWN0c1swXSA9PT0gb2JqZWN0c1sxXSk7XG4gICAgICogLy8gPT4gZmFsc2VcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzdHViT2JqZWN0KCkge1xuICAgICAgcmV0dXJuIHt9O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYW4gZW1wdHkgc3RyaW5nLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMTMuMFxuICAgICAqIEBjYXRlZ29yeSBVdGlsXG4gICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgZW1wdHkgc3RyaW5nLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBfLnRpbWVzKDIsIF8uc3R1YlN0cmluZyk7XG4gICAgICogLy8gPT4gWycnLCAnJ11cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzdHViU3RyaW5nKCkge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYHRydWVgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMTMuMFxuICAgICAqIEBjYXRlZ29yeSBVdGlsXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBfLnRpbWVzKDIsIF8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ICAgIGNvbnRpbnVlXG4gICAgICAgIH1cblxuICAgICAgICBjbGVhclN0YXRlQ2hhcigpXG4gICAgICAgIGhhc01hZ2ljID0gdHJ1ZVxuICAgICAgICB2YXIgcGwgPSBwYXR0ZXJuTGlzdFN0YWNrLnBvcCgpXG4gICAgICAgIC8vIG5lZ2F0aW9uIGlzICg/Oig/IWpzKVteL10qKVxuICAgICAgICAvLyBUaGUgb3RoZXJzIGFyZSAoPzo8cGF0dGVybj4pPHR5cGU+XG4gICAgICAgIHJlICs9IHBsLmNsb3NlXG4gICAgICAgIGlmIChwbC50eXBlID09PSAnIScpIHtcbiAgICAgICAgICBuZWdhdGl2ZUxpc3RzLnB1c2gocGwpXG4gICAgICAgIH1cbiAgICAgICAgcGwucmVFbmQgPSByZS5sZW5ndGhcbiAgICAgIGNvbnRpbnVlXG5cbiAgICAgIGNhc2UgJ3wnOlxuICAgICAgICBpZiAoaW5DbGFzcyB8fCAhcGF0dGVybkxpc3RTdGFjay5sZW5ndGggfHwgZXNjYXBpbmcpIHtcbiAgICAgICAgICByZSArPSAnXFxcXHwnXG4gICAgICAgICAgZXNjYXBpbmcgPSBmYWxzZVxuICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgIH1cblxuICAgICAgICBjbGVhclN0YXRlQ2hhcigpXG4gICAgICAgIHJlICs9ICd8J1xuICAgICAgY29udGludWVcblxuICAgICAgLy8gdGhlc2UgYXJlIG1vc3RseSB0aGUgc2FtZSBpbiByZWdleHAgYW5kIGdsb2JcbiAgICAgIGNhc2UgJ1snOlxuICAgICAgICAvLyBzd2FsbG93IGFueSBzdGF0ZS10cmFja2luZyBjaGFyIGJlZm9yZSB0aGUgW1xuICAgICAgICBjbGVhclN0YXRlQ2hhcigpXG5cbiAgICAgICAgaWYgKGluQ2xhc3MpIHtcbiAgICAgICAgICByZSArPSAnXFxcXCcgKyBjXG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuXG4gICAgICAgIGluQ2xhc3MgPSB0cnVl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gVE9ETzogSXQgd291bGQgcHJvYmFibHkgYmUgZmFzdGVyIHRvIGRldGVybWluZSB0aGlzXG4gICAgICAgICAgLy8gd2l0aG91dCBhIHRyeS9jYXRjaCBhbmQgYSBuZXcgUmVnRXhwLCBidXQgaXQncyB0cmlja3lcbiAgICAgICAgICAvLyB0byBkbyBzYWZlbHkuICBGb3Igbm93LCB0aGlzIGlzIHNhZmUgYW5kIHdvcmtzLlxuICAgICAgICAgIHZhciBjcyA9IHBhdHRlcm4uc3Vic3RyaW5nKGNsYXNzU3RhcnQgKyAxLCBpKVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBSZWdFeHAoJ1snICsgY3MgKyAnXScpXG4gICAgICAgICAgfSBjYXRjaCAoZXIpIHtcbiAgICAgICAgICAgIC8vIG5vdCBhIHZhbGlkIGNsYXNzIVxuICAgICAgICAgICAgdmFyIHNwID0gdGhpcy5wYXJzZShjcywgU1VCUEFSU0UpXG4gICAgICAgICAgICByZSA9IHJlLnN1YnN0cigwLCByZUNsYXNzU3RhcnQpICsgJ1xcXFxbJyArIHNwWzBdICsgJ1xcXFxdJ1xuICAgICAgICAgICAgaGFzTWFnaWMgPSBoYXNNYWdpYyB8fCBzcFsxXVxuICAgICAgICAgICAgaW5DbGFzcyA9IGZhbHNlXG4gICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGZpbmlzaCB1cCB0aGUgY2xhc3MuXG4gICAgICAgIGhhc01hZ2ljID0gdHJ1ZVxuICAgICAgICBpbkNsYXNzID0gZmFsc2VcbiAgICAgICAgcmUgKz0gY1xuICAgICAgY29udGludWVcblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgLy8gc3dhbGxvdyBhbnkgc3RhdGUgY2hhciB0aGF0IHdhc24ndCBjb25zdW1lZFxuICAgICAgICBjbGVhclN0YXRlQ2hhcigpXG5cbiAgICAgICAgaWYgKGVzY2FwaW5nKSB7XG4gICAgICAgICA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YXJnIH07XG4gIH07XG5cbiAgZnVuY3Rpb24gQXN5bmNJdGVyYXRvcihnZW5lcmF0b3IpIHtcbiAgICBmdW5jdGlvbiBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGdlbmVyYXRvclttZXRob2RdLCBnZW5lcmF0b3IsIGFyZyk7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICByZWplY3QocmVjb3JkLmFyZyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgcmVzdWx0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgdmFyIHZhbHVlID0gcmVzdWx0LnZhbHVlO1xuICAgICAgICBpZiAodmFsdWUgJiZcbiAgICAgICAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gXCJvYmplY3RcIiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwodmFsdWUsIFwiX19hd2FpdFwiKSkge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUodmFsdWUuX19hd2FpdCkudGhlbihmdW5jdGlvbih2YWx1ZSkge1xuICAgICAgICAgICAgaW52b2tlKFwibmV4dFwiLCB2YWx1ZSwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9LCBmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICAgIGludm9rZShcInRocm93XCIsIGVyciwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUodmFsdWUpLnRoZW4oZnVuY3Rpb24odW53cmFwcGVkKSB7XG4gICAgICAgICAgLy8gV2hlbiBhIHlpZWxkZWQgUHJvbWlzZSBpcyByZXNvbHZlZCwgaXRzIGZpbmFsIHZhbHVlIGJlY29tZXNcbiAgICAgICAgICAvLyB0aGUgLnZhbHVlIG9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IHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgPyBHZW5TdGF0ZUNvbXBsZXRlZFxuICAgICAgICAgICAgOiBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC5hcmcgPT09IENvbnRpbnVlU2VudGluZWwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZTogcmVjb3JkLmFyZyxcbiAgICAgICAgICAgIGRvbmU6IGNvbnRleHQuZG9uZVxuICAgICAgICAgIH07XG5cbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgc3RhdGUgPSBHZW5T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gICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5Lm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ZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICA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FzZWRpciwgZnVuY3Rpb24gKGVyciwgbiwgcGtnKSB7XG4gICAgICAgICAgICBpZiAoZXJyKSBjYihlcnIpO1xuICAgICAgICAgICAgZWxzZSBpZiAoY29yZVt4XSkgcmV0dXJuIGNiKG51bGwsIHgpO1xuICAgICAgICAgICAgZWxzZSBpZiAobikge1xuICAgICAgICAgICAgICAgIHJldHVybiBtYXliZVVud3JhcFN5bWxpbmsobiwgb3B0cywgZnVuY3Rpb24gKGVyciwgcmVhbE4pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IoZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNiKG51bGwsIHJlYWxOLCBwa2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBtb2R1bGVFcnJvciA9IG5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIgKyB4ICsgXCInIGZyb20gJ1wiICsgcGFyZW50ICsgXCInXCIpO1xuICAgICAgICAgICAgICAgIG1vZHVsZUVycm9yLmNvZGUgPSAnTU9EVUxFX05PVF9GT1VORCc7XG4gICAgICAgICAgICAgICAgY2IobW9kdWxlRXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBvbmZpbGUoZXJyLCBtLCBwa2cpIHtcbiAgICAgICAgaWYgKGVycikgY2IoZXJyKTtcbiAgICAgICAgZWxzZSBpZiAobSkgY2IobnVsbCwgbSwgcGtnKTtcbiAgICAgICAgZWxzZSBsb2FkQXNEaXJlY3RvcnkocmVzLCBmdW5jdGlvbiAoZXJyLCBkLCBwa2cpIHtcbiAgICAgICAgICAgIGlmIChlcnIpIGNiKGVycik7XG4gICAgICAgICAgICBlbHNlIGlmIChkKSB7XG4gICAgICAgICAgICAgICAgbWF5YmVVbndyYXBTeW1saW5rKGQsIG9wdHMsIGZ1bmN0aW9uIChlcnIsIHJlYWxEKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNiKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYihudWxsLCByZWFsRCwgcGtnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgbW9kdWxlRXJyb3IgPSBuZXcgRXJyb3IoXCJDYW5ub3QgZmluZCBtb2R1bGUgJ1wiICsgeCArIFwiJyBmcm9tICdcIiArIHBhcmVudCArIFwiJ1wiKTtcbiAgICAgICAgICAgICAgICBtb2R1bGVFcnJvci5jb2RlID0gJ01PRFVMRV9OT1RfRk9VTkQnO1xuICAgICAgICAgICAgICAgIGNiKG1vZHVsZUVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbG9hZEFzRmlsZSh4LCB0aGVQYWNrYWdlLCBjYWxsYmFjaykge1xuICAgICAgICB2YXIgbG9hZEFzRmlsZVBhY2thZ2UgPSB0aGVQYWNrYWdlO1xuICAgICAgICB2YXIgY2IgPSBjYWxsYmFjaztcbiAgICAgICAgaWYgKHR5cGVvZiBsb2FkQXNGaWxlUGFja2FnZSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgY2IgPSBsb2FkQXNGaWxlUGFja2FnZTtcbiAgICAgICAgICAgIGxvYWRBc0ZpbGVQYWNrYWdlID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGV4dHMgPSBbJyddLmNvbmNhdChleHRlbnNpb25zKTtcbiAgICAgICAgbG9hZChleHRzLCB4LCBsb2FkQXNGaWxlUGFja2FnZSk7XG5cbiAgICAgICAgZnVuY3Rpb24gbG9hZChleHRzLCB4LCBsb2FkUGFja2FnZSkge1xuICAgICAgICAgICAgaWYgKGV4dHMubGVuZ3RoID09PSAwKSByZXR1cm4gY2IobnVsbCwgdW5kZWZpbmVkLCBsb2FkUGFja2FnZSk7XG4gICAgICAgICAgICB2YXIgZmlsZSA9IHggKyBleHRzWzBdO1xuXG4gICAgICAgICAgICB2YXIgcGtnID0gbG9hZFBhY2thZ2U7XG4gICAgICAgICAgICBpZiAocGtnKSBvbnBrZyhudWxsLCBwa2cpO1xuICAgICAgICAgICAgZWxzZSBsb2FkcGtnKHBhdGguZGlybmFtZShmaWxlKSwgb25wa2cpO1xuXG4gICAgICAgICAgICBmdW5jdGlvbiBvbnBrZyhlcnIsIHBrZ18sIGRpcikge1xuICAgICAgICAgICAgICAgIHBrZyA9IHBrZ187XG4gICAgICAgICAgICAgICAgaWYgKGVycikgcmV0dXJuIGNiKGVycik7XG4gICAgICAgICAgICAgICAgaWYgKGRpciAmJiBwa2cgJiYgb3B0cy5wYXRoRmlsdGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZmlsZSA9IHBhdGgucmVsYXRpdmUoZGlyLCBmaWxlKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbCA9IHJmaWxlLnNsaWNlKDAsIHJmaWxlLmxlbmd0aCAtIGV4dHNbMF0ubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHIgPSBvcHRzLnBhdGhGaWx0ZXIocGtnLCB4LCByZWwpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocikgcmV0dXJuIGxvYWQoXG4gICAgICAgICAgICAgICAgICAgICAgICBbJyddLmNvbmNhdChleHRlbnNpb25zLnNsaWNlKCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aC5yZXNvbHZlKGRpciwgciksXG4gICAgICAgICAgICAgICAgICAgICAgICBwa2dcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaXNGaWxlKGZpbGUsIG9uZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gb25leChlcnIsIGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycikgcmV0dXJuIGNiKGVycik7XG4gICAgICAgICAgICAgICAgaWYgKGV4KSByZXR1cm4gY2IobnVsbCwgZmlsZSwgcGtnKTtcbiAgICAgICAgICAgICAgICBsb2FkKGV4dHMuc2xpY2UoMSksIHgsIHBrZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsb2FkcGtnKGRpciwgY2IpIHtcbiAgICAgICAgaWYgKGRpciA9PT0gJycgfHwgZGlyID09PSAnLycpIHJldHVybiBjYihudWxsKTtcbiAgICAgICAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT09ICd3aW4zMicgJiYgKC9eXFx3OlsvXFxcXF0qJC8pLnRlc3QoZGlyKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNiKG51bGwpO1xuICAgICAgICB9XG4gICAgICAgIGlmICgoL1svXFxcXF1ub2RlX21vZHVsZXNbL1xcXFxdKiQvKS50ZXN0KGRpcikpIHJldHVybiBjYihudWxsKTtcblxuICAgICAgICB2YXIgcGtnZmlsZSA9IHBhdGguam9pbihkaXIsICdwYWNrYWdlLmpzb24nKTtcbiAgICAgICAgaXNGaWxlKHBrZ2ZpbGUsIGZ1bmN0aW9uIChlcnIsIGV4KSB7XG4gICAgICAgICAgICAvLyBvbiBlcnIsIGV4IGlzIGZhbHNlXG4gICAgICAgICAgICBpZiAoIWV4KSByZXR1cm4gbG9hZHBrZyhwYXRoLmRpcm5hbWUoZGlyKSwgY2IpO1xuXG4gICAgICAgICAgICByZWFkRmlsZShwa2dmaWxlLCBmdW5jdGlvbiAoZXJyLCBib2R5KSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycikgY2IoZXJyKTtcbiAgICAgICAgICAgICAgICB0cnkgeyB2YXIgcGtnID0gSlNPTi5wYXJzZShib2R5KTsgfSBjYXRjaCAoanNvbkVycikge31cblxuICAgICAgICAgICAgICAgIGlmIChwa2cgJiYgb3B0cy5wYWNrYWdlRmlsdGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHBrZyA9IG9wdHMucGFja2FnZUZpbHRlcihwa2csIHBrZ2ZpbGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYihudWxsLCBwa2csIGRpcik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbG9hZEFzRGlyZWN0b3J5KHgsIGxvYWRBc0RpcmVjdG9yeVBhY2thZ2UsIGNhbGxiYWNrKSB7XG4gICAgICAgIHZhciBjYiA9IGNhbGxiYWNrO1xuICAgICAgICB2YXIgZnBrZyA9IGxvYWRBc0RpcmVjdG9yeVBhY2thZ2U7XG4gICAgICAgIGlmICh0eXBlb2YgZnBrZyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgY2IgPSBmcGtnO1xuICAgICAgICAgICAgZnBrZyA9IG9wdHMucGFja2FnZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBwa2dmaWxlID0gcGF0aC5qb2luKHgsICdwYWNrYWdlLmpzb24nKTtcbiAgICAgICAgaXNGaWxlKHBrZ2ZpbGUsIGZ1bmN0aW9uIChlcnIsIGV4KSB7XG4gICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgIGlmICghZXgpIHJldHVybiBsb2FkQXNGaWxlKHBhdGguam9pbih4LCAnaW5kZXgnKSwgZnBrZywgY2IpO1xuXG4gICAgICAgICAgICByZWFkRmlsZShwa2dmaWxlLCBmdW5jdGlvbiAoZXJyLCBib2R5KSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycikgcmV0dXJuIGNiKGVycik7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBrZyA9IEpTT04ucGFyc2UoYm9keSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoanNvbkVycikge31cblxuICAgICAgICAgICAgICAgIGlmIChvcHRzLnBhY2thZ2VGaWx0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgcGtnID0gb3B0cy5wYWNrYWdlRmlsdGVyKHBrZywgcGtnZmlsZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHBrZy5tYWluKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGtnLm1haW4gIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbkVycm9yID0gbmV3IFR5cGVFcnJvcigncGFja2FnZSDigJwnICsgcGtnLm5hbWUgKyAn4oCdIGBtYWluYCBtdXN0IGJlIGEgc3RyaW5nJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYWluRXJyb3IuY29kZSA9ICdJTlZBTElEX1BBQ0tBR0VfTUFJTic7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2IobWFpbkVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocGtnLm1haW4gPT09ICcuJyB8fCBwa2cubWFpbiA9PT0gJy4vJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGtnLm1haW4gPSAnaW5kZXgnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxvYWRBc0ZpbGUocGF0aC5yZXNvbHZlKHgsIHBrZy5tYWluKSwgcGtnLCBmdW5jdGlvbiAoZXJyLCBtLCBwa2cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHJldHVybiBjYihlcnIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG0pIHJldHVybiBjYihudWxsLCBtLCBwa2cpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwa2cpIHJldHVybiBsb2FkQXNGaWxlKHBhdGguam9pbih4LCAnaW5kZXgnKSwgcGtnLCBjYik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXIgPSBwYXRoLnJlc29sdmUoeCwgcGtnLm1haW4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9hZEFzRGlyZWN0b3J5KGRpciwgcGtnLCBmdW5jdGlvbiAoZXJyLCBuLCBwa2cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobikgcmV0dXJuIGNiKG51bGwsIG4sIHBrZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZEFzRmlsZShwYXRoLmpvaW4oeCwgJ2luZGV4JyksIHBrZywgY2IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbG9hZEFzRmlsZShwYXRoLmpvaW4oeCwgJy9pbmRleCcpLCBwa2csIGNiKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwcm9jZXNzRGlycyhjYiwgZGlycykge1xuICAgICAgICBpZiAoZGlycy5sZW5ndGggPT09IDApIHJldHVybiBjYihudWxsLCB1bmRlZmluZWQpO1xuICAgICAgICB2YXIgZGlyID0gZGlyc1swXTtcblxuICAgICAgICBpc0RpcmVjdG9yeShkaXIsIGlzZGlyKTtcblxuICAgICAgICBmdW5jdGlvbiBpc2RpcihlcnIsIGlzZGlyKSB7XG4gICAgICAgICAgICBpZiAoZ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uICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzRmlsZSh4KSkge1xuICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4dGVuc2lvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmaWxlID0geCArIGV4dGVuc2lvbnNbaV07XG4gICAgICAgICAgICBpZiAoaXNGaWxlKGZpbGUpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsb2FkcGtnKGRpcikge1xuICAgICAgICBpZiAoZGlyID09PSAnJyB8fCBkaXIgPT09ICcvJykgcmV0dXJuO1xuICAgICAgICBpZiAocHJvY2Vzcy5wbGF0Zm9ybSA9PT0gJ3dpbjMyJyAmJiAoL15cXHc6Wy9cXFxcXSokLykudGVzdChkaXIpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCgvWy9cXFxcXW5vZGVfbW9kdWxlc1svXFxcXF0qJC8pLnRlc3QoZGlyKSkgcmV0dXJuO1xuXG4gICAgICAgIHZhciBwa2dmaWxlID0gcGF0aC5qb2luKGRpciwgJ3BhY2thZ2UuanNvbicpO1xuXG4gICAgICAgIGlmICghaXNGaWxlKHBrZ2ZpbGUpKSB7XG4gICAgICAgICAgICByZXR1cm4gbG9hZHBrZyhwYXRoLmRpcm5hbWUoZGlyKSk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgYm9keSA9IHJlYWRGaWxlU3luYyhwa2dmaWxlKTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIHBrZyA9IEpTT04ucGFyc2UoYm9keSk7XG4gICAgICAgIH0gY2F0Y2ggKGpzb25FcnIpIHt9XG5cbiAgICAgICAgaWYgKHBrZyAmJiBvcHRzLnBhY2thZ2VGaWx0ZXIpIHtcbiAgICAgICAgICAgIHBrZyA9IG9wdHMucGFja2FnZUZpbHRlcihwa2csIGRpcik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4geyBwa2c6IHBrZywgZGlyOiBkaXIgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsb2FkQXNEaXJlY3RvcnlTeW5jKHgpIHtcbiAgICAgICAgdmFyIHBrZ2ZpbGUgPSBwYXRoLmpvaW4oeCwgJy9wYWNrYWdlLmpzb24nKTtcbiAgICAgICAgaWYgKGlzRmlsZShwa2dmaWxlKSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICB2YXIgYm9keSA9IHJlYWRGaWxlU3luYyhwa2dmaWxlLCAnVVRGOCcpO1xuICAgICAgICAgICAgICAgIHZhciBwa2cgPSBKU09OLnBhcnNlKGJvZHkpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cblxuICAgICAgICAgICAgaWYgKG9wdHMucGFja2FnZUZpbHRlcikge1xuICAgICAgICAgICAgICAgIHBrZyA9IG9wdHMucGFja2FnZUZpbHRlcihwa2csIHgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocGtnLm1haW4pIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBrZy5tYWluICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbkVycm9yID0gbmV3IFR5cGVFcnJvcigncGFja2FnZSDigJwnICsgcGtnLm5hbWUgKyAn4oCdIGBtYWluYCBtdXN0IGJlIGEgc3RyaW5nJyk7XG4gICAgICAgICAgICAgICAgICAgIG1haW5FcnJvci5jb2RlID0gJ0lOVkFMSURfUEFDS0FHRV9NQUlOJztcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbWFpbkVycm9yO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocGtnLm1haW4gPT09ICcuJyB8fCBwa2cubWFpbiA9PT0gJy4vJykge1xuICAgICAgICAgICAgICAgICAgICBwa2cubWFpbiA9ICdpbmRleCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtID0gbG9hZEFzRmlsZVN5bmMocGF0aC5yZXNvbHZlKHgsIHBrZy5tYWluKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtKSByZXR1cm4gbTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG4gPSBsb2FkQXNEaXJlY3RvcnlTeW5jKHBhdGgucmVzb2x2ZSh4LCBwa2cubWFpbikpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobikgcmV0dXJuIG47XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBsb2FkQXNGaWxlU3luYyhwYXRoLmpvaW4oeCwgJy9pbmRleCcpKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsb2FkTm9kZU1vZHVsZXNTeW5jKHgsIHN0YXJ0KSB7XG4gICAgICAgIHZhciBkaXJzID0gbm9kZU1vZHVsZXNQYXRocyhzdGFydCwgb3B0cywgeCk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGlycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGRpciA9IGRpcnNbaV07XG4gICAgICAgICAgICBpZiAoaXNEaXJlY3RvcnkoZGlyKSkge1xuICAgICAgICAgICAgICAgIHZhciBtID0gbG9hZEFzRmlsZVN5bmMocGF0aC5qb2luKGRpciwgJy8nLCB4KSk7XG4gICAgICAgICAgICAgICAgaWYgKG0pIHJldHVybiBtO1xuICAgICAgICAgICAgICAgIHZhciBuID0gbG9hZEFzRGlyZWN0b3J5U3luYyhwYXRoLmpvaW4oZGlyLCAnLycsIHgpKTtcbiAgICAgICAgICAgICAgICBpZiAobikgcmV0dXJuI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1cm4gZnVuY3Rpb24oKSB7ICAgICAgICAgLy8gQ2xvc3VyZSB0byByZXR1cm4gYSByYW5kb20gZG91YmxlOlxyXG4gICAgdmFyIG4gPSBhcmM0LmcoY2h1bmtzKSwgICAgICAgICAgICAgLy8gU3RhcnQgd2l0aCBhIG51bWVyYXRvciBuIDwgMiBeIDQ4XHJcbiAgICAgICAgZCA9IHN0YXJ0ZGVub20sICAgICAgICAgICAgICAgICAvLyAgIGFuZCBkZW5vbWluYXRvciBkID0gMiBeIDQ4LlxyXG4gICAgICAgIHggPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICBhbmQgbm8gJ2V4dHJhIGxhc3QgYnl0ZScuXHJcbiAgICB3aGlsZSAobiA8IHNpZ25pZmljYW5jZSkgeyAgICAgICAgICAvLyBGaWxsIHVwIGFsbCBzaWduaWZpY2FudCBkaWdpdHMgYnlcclxuICAgICAgbiA9IChuICsgeCkgKiB3aWR0aDsgICAgICAgICAgICAgIC8vICAgc2hpZnRpbmcgbnVtZXJhdG9yIGFuZFxyXG4gICAgICBkICo9IHdpZHRoOyAgICAgICAgICAgICAgICAgICAgICAgLy8gICBkZW5vbWluYXRvciBhbmQgZ2VuZXJhdGluZyBhXHJcbiAgICAgIHggPSBhcmM0LmcoMSk7ICAgICAgICAgICAgICAgICAgICAvLyAgIG5ldyBsZWFzdC1zaWduaWZpY2FudC1ieXRlLlxyXG4gICAgfVxyXG4gICAgd2hpbGUgKG4gPj0gb3ZlcmZsb3cpIHsgICAgICAgICAgICAgLy8gVG8gYXZvaWQgcm91bmRpbmcgdXAsIGJlZm9yZSBhZGRpbmdcclxuICAgICAgbiAvPSAyOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgbGFzdCBieXRlLCBzaGlmdCBldmVyeXRoaW5nXHJcbiAgICAgIGQgLz0gMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgIHJpZ2h0IHVzaW5nIGludGVnZXIgTWF0aCB1bnRpbFxyXG4g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IHN0YWNrLmxlbmd0aCA8IG1heFN0YWNrU2l6ZSAmJiBjdXJyWydhcmd1bWVudHMnXSkge1xuICAgICAgICAgICAgICAgIC8vIEFsbG93IFY4IG9wdGltaXphdGlvbnNcbiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IG5ldyBBcnJheShjdXJyWydhcmd1bWVudHMnXS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJncy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICBhcmdzW2ldID0gY3VyclsnYXJndW1lbnRzJ11baV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgvZnVuY3Rpb24oPzpcXHMrKFtcXHckXSspKStcXHMqXFwoLy50ZXN0KGN1cnIudG9TdHJpbmcoKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sucHVzaChuZXcgU3RhY2tGcmFtZSh7ZnVuY3Rpb25OYW1lOiBSZWdFeHAuJDEgfHwgdW5kZWZpbmVkLCBhcmdzOiBhcmdzfSkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gobmV3IFN0YWNrRnJhbWUoe2FyZ3M6IGFyZ3N9KSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgY3VyciA9IGN1cnIuY2FsbGVyO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YWNrO1xuICAgICAgICB9XG4gICAgfTtcbn0pKTtcbiIsIihmdW5jdGlvbihyb290LCBmYWN0b3J5KSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuICAgIC8vIFVuaXZlcnNhbCB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bmVOdW1iZXInXTtcbiAgICB2YXIgc3RyaW5nUHJvcHMgPSBbJ2ZpbGVOYW1lJywgJ2Z1bmN0aW9uTmFtZScsICdzb3VyY2UnXTtcbiAgICB2YXIgYXJyYXlQcm9wcyA9IFsnYXJncyddO1xuXG4gICAgdmFyIHByb3BzID0gYm9vbGVhblByb3BzLmNvbmNhdChudW1lcmljUHJvcHMsIHN0cmluZ1Byb3BzLCBhcnJheVByb3BzKTtcblxuICAgIGZ1bmN0aW9uIFN0YWNrRnJhbWUob2JqKSB7XG4gICAgICAgIGlmIChvYmogaW5zdGFuY2VvZiBPYmplY3QpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KHByb3BzW2ldKSAmJiBvYmpbcHJvcHNbaV1dICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc1snc2V0JyArIF9jYXBpdGFsaXplKHByb3BzW2ldKV0ob2JqW3Byb3BzW2ldXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgU3RhY2tGcmFtZS5wcm90b3R5cGUgPSB7XG4gICAgICAgIGdldEFyZ3M6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXJncztcbiAgICAgICAgfSxcbiAgICAgICAgc2V0QXJnczogZnVuY3Rpb24odikge1xuICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh2KSAhPT0gJ1tvYmplY3QgQXJyYXldJykge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0FyZ3MgbXVzdCBiZSBhbiBBcnJheScpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5hcmdzID0gdjtcbiAgICAgICAgfS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yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gob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cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5I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XG4gICAgfVxufSh0aGlzLCBmdW5jdGlvbihTb3VyY2VNYXAsIFN0YWNrRnJhbWUpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICAvKipcbiAgICAgKiBNYWtlIGEgWC1Eb21haW4gcmVxdWVzdCB0byB1cmwgYW5kIGNhbGxiYWNrLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IHVybFxuICAgICAqIEByZXR1cm5zIHtQcm9taXNlfSB3aXRoIHJlc3BvbnNlIHRleHQgaWYgZnVsZmlsbGVkXG4gICAgICovXG4gICAgZnVuY3Rpb24gX3hkcih1cmwpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgdmFyIHJlcSA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpO1xuICAgICAgICAgICAgcmVxLm9wZW4oJ2dldCcsIHVybCk7XG4gICAgICAgICAgICByZXEub25lcnJvciA9IHJlamVjdDtcbiAgICAgICAgICAgIHJlcS5vbnJlYWR5c3RhdGVjaGFuZ2UgPSBmdW5jdGlvbiBvbnJlYWR5c3RhdGVjaGFuZ2UoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlcS5yZWFkeVN0YXRlID09PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgocmVxLnN0YXR1cyA+PSAyMDAgJiYgcmVxLnN0YXR1cyA8IDMwMCkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICh1cmwuc3Vic3RyKDAsIDcpID09PSAnZmlsZTovLycgJiYgcmVxLnJlc3BvbnNlVGV4dCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVxLnJlc3BvbnNlVGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKCdIVFRQIHN0YXR1czogJyArIHJlcS5zdGF0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ICB2YXIgbGluZXMgPSBzb3VyY2Uuc3BsaXQoJ1xcbicpO1xuXG4gICAgICAgIC8vIFdhbGsgYmFja3dhcmRzIGluIHRoZSBzb3VyY2UgbGluZXMgdW50aWwgd2UgZmluZCB0aGUgbGluZSB3aGljaCBtYXRjaGVzIG9uZSBvZiB0aGUgcGF0dGVybnMgYWJvdmVcbiAgICAgICAgdmFyIGNvZGUgPSAnJztcbiAgICAgICAgdmFyIG1heExpbmVzID0gTWF0aC5taW4obGluZU51bWJlciwgMjApO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG1heExpbmVzOyArK2kpIHtcbiAgICAgICAgICAgIC8vIGxpbmVObyBpcyAxLWJhc2VkLCBzb3VyY2VbXSBpcyAwLWJhc2VkXG4gICAgICAgICAgICB2YXIgbGluZSA9IGxpbmVzW2xpbmVOdW1iZXIgLSBpIC0gMV07XG4gICAgICAgICAgICB2YXIgY29tbWVudFBvcyA9IGxpbmUuaW5kZXhPZignLy8nKTtcbiAgICAgICAgICAgIGlmIChjb21tZW50UG9zID49IDApIHtcbiAgICAgICAgICAgICAgICBsaW5lID0gbGluZS5zdWJzdHIoMCwgY29tbWVudFBvcyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChsaW5lKSB7XG4gICAgICAgICAgICAgICAgY29kZSA9IGxpbmUgKyBjb2RlO1xuICAgICAgICAgICAgICAgIHZhciBsZW4gPSBzeW50YXhlcy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaW5kZXggPSAwOyBpbmRleCA8IGxlbjsgaW5kZXgrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbSA9IHN5bnRheGVzW2luZGV4XS5leGVjKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobSAmJiBtWzFdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbVsxXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbi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gZm91bmQnKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIF9leHRyYWN0TG9jYXRpb25JbmZvRnJvbVNvdXJjZU1hcFNvdXJjZShzdGFja2ZyYW1lLCBzb3VyY2VNYXBDb25zdW1lciwgc291cmNlQ2FjaGUpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgdmFyIGxvYyA9IHNvdXJjZU1hcENvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgICAgICAgICAgIGxpbmU6IHN0YWNrZnJhbWUubGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IHN0YWNrZnJhbWUuY29sdW1uTnVtYmVyXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGxvYy5zb3VyY2UpIHtcbiAgICAgICAgICAgICAgICAvLyBjYWNoZSBtYXBwZWQgc291cmNlc1xuICAgICAgICAgICAgICAgIHZhciBtYXBwZWRTb3VyY2UgPSBzb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKGxvYy5zb3VyY2UpO1xuICAgICAgICAgICAgICAgIGlmIChtYXBwZWRTb3VyY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgc291cmNlQ2FjaGVbbG9jLnNvdXJjZV0gPSBtYXBwZWRTb3VyY2U7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShcbiAgICAgICAgICAgICAgICAgICAgLy8gZ2l2ZW4gc3RhY2tmcmFtZSBhbmQgc291cmNlIGxvY2F0aW9uLCB1cGRhdGUgc3RhY2tmcmFtZVxuICAgICAgICAgICAgICAgICAgICBuZXcgU3RhY2tGcmFtZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbk5hbWU6IGxvYy5uYW1lIHx8IHN0YWNrZnJhbWUuZnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXJnczogc3RhY2tmcmFtZS5hcmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWU6IGxvYy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBsb2MubGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbk51bWJlcjogbG9jLmNvbHVtblxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoJ0NvdWxkIG5vdCBnZXQgb3JpZ2luYWwgc291cmNlIGZvciBnaXZlbiBzdGFja2ZyYW1lIGFuZCBzb3VyY2UgbWFwJykpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAY29uc3RydWN0b3JcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0c1xuICAgICAqICAgICAgb3B0cy5zb3VyY2VDYWNoZSA9IHt1cmw6IFwiU291cmNlIFN0cmluZ1wifSA9PiBwcmVsb2FkIHNvdXJjZSBjYWNoZVxuICAgICAqICAgICAgb3B0cy5zb3VyY2VNYXBDb25zdW1lckNhY2hlID0gey9wYXRoL2ZpbGUuanMubWFwOiBTb3VyY2VNYXBDb25zdW1lcn1cbiAgICAgKiAgICAgIG9wdHMub2ZmbGluZSA9IFRydWUgdG8gcHJldmVudCBuZXR3b3JrIHJlcXVlc3RzLlxuICAgICAqICAgICAgICAgICAgICBCZXN0IGVmZm9ydCB3aXRob3V0IHNvdXJjZXMgb3Igc291cmNlIG1hcHMuXG4gICAgICogICAgICBvcHRzLmFqYXggPSBQcm9taXNlIHJldHVybmluZyBmdW5jdGlvbiB0byBtYWtlIFgtRG9tYWluIHJlcXVlc3RzXG4gICAgICovXG4gICAgcmV0dXJuIGZ1bmN0aW9uIFN0YWNrVHJhY2V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GF0YVVybCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGF0YSBVUkxzIGNhbiBoYXZlIHBhcmFtZXRlcnMuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzZWUgaHR0cDovL3Rvb2xzLmlldGYub3JnL2h0bWwvcmZjMjM5N1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN1cHBvcnRlZEVuY29kaW5nUmVnZXhwID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvXmRhdGE6YXBwbGljYXRpb25cXC9qc29uOyhbXFx3PTpcIi1dKzspKmJhc2U2NCwvO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1hdGNoID0gbG9jYXRpb24ubWF0Y2goc3VwcG9ydGVkRW5jb2RpbmdSZWdleHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNvdXJjZU1hcFN0YXJ0ID0gbWF0Y2hbMF0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbmNvZGVkU291cmNlID0gbG9jYXRpb24uc3Vic3RyKHNvdXJjZU1hcFN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc291cmNlID0gdGhpcy5fYXRvYihlbmNvZGVkU291cmNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZUNhY2hlW2xvY2F0aW9uXSA9IHNvdXJjZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHNvdXJjZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoJ1RoZSBlbmNvZGluZyBvZiB0aGUgaW5saW5lIHNvdXJjZW1hcCBpcyBub3Qgc3VwcG9ydGVkJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHhoclByb21pc2UgPSB0aGlzLmFqYXgobG9jYXRpb24sIHttZXRob2Q6ICdnZXQnfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBDYWNoZSB0aGUgUHJvbWlzZSB0byBwcmV2ZW50IGR1cGxpY2F0ZSBpbi1mbGlnaHQgcmVxdWVzdHNcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlQ2FjaGVbbG9jYXRpb25dID0geGhyUHJvbWlzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHhoclByb21pc2UudGhlbihyZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRpbmcgU291cmNlTWFwQ29uc3VtZXJzIGlzIGV4cGVuc2l2ZSwgc28gdGhpcyB3cmFwcyB0aGUgY3JlYXRpb24gb2YgYVxuICAgICAgICAgKiBTb3VyY2VNYXBDb25zdW1lciBpbiBhIHBlci1pbnN0YW5jZSBjYWNoZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd9IHNvdXJjZU1hcHBpbmdVUkwgPSBVUkwgdG8gZmV0Y2ggc291cmNlIG1hcCBmcm9tXG4gICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBkZWZhdWx0U291cmNlUm9vdCA9IERlZmF1bHQgc291cmNlIHJvb3QgZm9yIHNvdXJjZSBtYXAgaWYgdW5kZWZpbmVkXG4gICAgICAgICAqIEByZXR1cm5zIHtQcm9taXNlfSB0aGF0IHJlc29sdmVzIGEgU291cmNlTWFwQ29uc3VtZXJcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuX2dldFNvdXJjZU1hcENvbnN1bWVyID0gZnVuY3Rpb24gX2dldFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcHBpbmdVUkwsIGRlZmF1bHRTb3VyY2VSb290KSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc291cmNlTWFwQ29uc3VtZXJDYWNoZVtzb3VyY2VNYXBwaW5nVVJMXSkge1xuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHRoaXMuc291cmNlTWFwQ29uc3VtZXJDYWNoZVtzb3VyY2VNYXBwaW5nVVJMXSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNvdXJjZU1hcENvbnN1bWVyUHJvbWlzZSA9IG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldChzb3VyY2VNYXBwaW5nVVJMKS50aGVuKGZ1bmN0aW9uKHNvdXJjZU1hcFNvdXJjZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlTWFwU291cmNlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VNYXBTb3VyY2UgPSBfcGFyc2VKc29uKHNvdXJjZU1hcFNvdXJjZS5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlTWFwU291cmNlLnNvdXJjZVJvb3QgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZU1hcFNvdXJjZS5zb3VyY2VSb290ID0gZGVmYXVsdFNvdXJjZVJvb3Q7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShuZXcgU291cmNlTWFwLlNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcFNvdXJjZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgcmVqZWN0KTtcbiAgICAgICAgICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2VNYXBDb25zdW1lckNhY2hlW3NvdXJjZU1hcHBpbmdVUkxdID0gc291cmNlTWFwQ29uc3VtZXJQcm9taXNlO1xuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHNvdXJjZU1hcENvbnN1bWVyUHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2l2ZW4gYSBTdGFja0ZyYW1lLCBlbmhhbmNlIGZ1bmN0aW9uIG5hbWUgYW5kIHVzZSBzb3VyY2UgbWFwcyBmb3IgYVxuICAgICAgICAgKiBiZXR0ZXIgU3RhY2tGcmFtZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtTdGFja0ZyYW1lfSBzdGFja2ZyYW1lIG9iamVjdFxuICAgICAgICAgKiBAcmV0dXJucyB7UHJvbWlzZX0gdGhhdCByZXNvbHZlcyB3aXRoIHdpdGggc291cmNlLW1hcHBlZCBTdGFja0ZyYW1lXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnBpbnBvaW50ID0gZnVuY3Rpb24gU3RhY2tUcmFjZUdQUyQkcGlucG9pbnQoc3RhY2tmcmFtZSkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgIHRoaXM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2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgX2Vuc3VyZVN0YWNrRnJhbWVJc0xlZ2l0KHN0YWNrZnJhbWUpO1xuICAgICAgICAgICAgICAgIHRoaXMuX2dldChzdGFja2ZyYW1lLmZpbGVOYW1lKS50aGVuKGZ1bmN0aW9uIGdldFNvdXJjZUNhbGxiYWNrKHNvdXJjZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGluZU51bWJlciA9IHN0YWNrZnJhbWUubGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbHVtbk51bWJlciA9IHN0YWNrZnJhbWUuY29sdW1uTnVtYmVyO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZ3Vlc3NlZEZ1bmN0aW9uTmFtZSA9IF9maW5kRnVuY3Rpb25OYW1lKHNvdXJjZSwgbGluZU51bWJlciwgY29sdW1uTnVtYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gT25seSByZXBsYWNlIGZ1bmN0aW9uTmFtZSBpZiB3ZSBmb3VuZCBzb21ldGhpbmdcbiAgICAgICAgICAgICAgICAgICAgaWYgKGd1ZXNzZWRGdW5jdGlvbk5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUobmV3IFN0YWNrRnJhbWUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uTmFtZTogZ3Vlc3NlZEZ1bmN0aW9uTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdzOiBzdGFja2ZyYW1lLmFyZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWU6IHN0YWNrZnJhbWUuZmlsZU5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW5OdW1iZXI6IGNvbHVtbk51bWJlclxuICAgICAgICAgICAgICAgIC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pbHRlcikge1xuICAgICAgICBpZiAodHlwZW9mIGZpbHRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgcmV0dXJuIHN0YWNrZnJhbWVzLmZpbHRlcihmaWx0ZXIpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBzdGFja2ZyYW1lcztcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IGEgYmFja3RyYWNlIGZyb20gaW52b2NhdGlvbiBwb2ludC5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9wdHNcbiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBvZiBTdGFja0ZyYW1lXG4gICAgICAgICAqL1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uIFN0YWNrVHJhY2UkJGdldChvcHRzKSB7XG4gICAgICAgICAgICB2YXIgZXJyID0gX2dlbmVyYXRlRXJyb3IoKTtcbiAgICAgICAgICAgIHJldHVybiBfaXNTaGFwZWRMaWtlUGFyc2FibGVFcnJvcihlcnIpID8gdGhpcy5mcm9tRXJyb3IoZXJyLCBvcHRzKSA6IHRoaXMuZ2VuZXJhdGVBcnRpZmljaWFsbHkob3B0cyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldCBhIGJhY2t0cmFjZSBmcm9tIGludm9jYXRpb24gcG9pbnQuXG4gICAgICAgICAqIElNUE9SVEFOVDogRG9lcyBub3QgaGFuZGxlIHNvdXJjZSBtYXBzIG9yIGd1ZXNzIGZ1bmN0aW9uIG5hbWVzIVxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0c1xuICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IG9mIFN0YWNrRnJhbWVcbiAgICAgICAgICovXG4gICAgICAgIGdldFN5bmM6IGZ1bmN0aW9uIFN0YWNrVHJhY2UkJGdldFN5bmMob3B0cykge1xuICAgICAg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4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiByZXNvbHZlT3JpZ2luYWwoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShzZik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGdwcy5waW5wb2ludChzZikudGhlbihyZXNvbHZlLCByZXNvbHZlT3JpZ2luYWwpWydjYXRjaCddKHJlc29sdmVPcmlnaW5hbCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICB9LmJpbmQodGhpcykpO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVc2UgU3RhY2tHZW5lcmF0b3IgdG8gZ2VuZXJhdGUgYSBiYWNrdHJhY2UuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRzXG4gICAgICAgICAqIEByZXR1cm5zIHtQcm9taXNlfSBvZiBBcnJheVtTdGFja0ZyYW1lXVxuICAgICAgICAgKi9cbiAgICAgICAgZ2VuZXJhdGVBcnRpZmljaWFsbHk6IGZ1bmN0aW9uIFN0YWNrVHJhY2UkJGdlbmVyYXRlQXJ0aWZpY2lhbGx5KG9wdHMpIHtcbiAgICAgICAgICAgIG9wdHMgPSBfbWVyZ2UoX29wdGlvbnMsIG9wdHMpO1xuICAgICAgICAgICAgdmFyIHN0YWNrRnJhbWVzID0gU3RhY2tHZW5lcmF0b3IuYmFja3RyYWNlKG9wdHMpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRzLmZpbHRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgIHN0YWNrRnJhbWVzID0gc3RhY2tGcmFtZXMuZmlsdGVyKG9wdHMuZml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JpZ2luYWxGbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgIC8vIEFscmVhZHkgaW5zdHJ1bWVudGVkLCByZXR1cm4gZ2l2ZW4gRnVuY3Rpb25cbiAgICAgICAgICAgICAgICByZXR1cm4gZm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBpbnN0cnVtZW50ZWQgPSBmdW5jdGlvbiBTdGFja1RyYWNlJCRpbnN0cnVtZW50ZWQoKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXQoKS50aGVuKGNhbGxiYWNrLCBlcnJiYWNrKVsnY2F0Y2gnXShlcnJiYWNrKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZuLmFwcGx5KHRoaXNBcmcgfHwgdGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChfaXNTaGFwZWRMaWtlUGFyc2FibGVFcnJvcihlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mcm9tRXJyb3IoZSkudGhlbihjYWxsYmFjaywgZXJyYmFjaylbJ2NhdGNoJ10oZXJyYmFjayk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LmJpbmQodGhpcyk7XG4gICAgICAgICAgICBpbnN0cnVtZW50ZWQuX19zdGFja3RyYWNlT3JpZ2luYWxGbiA9IGZuO1xuXG4gICAgICAgICAgICByZXR1cm4gaW5zdHJ1bWVudGVkO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHaXZlbiBhIGZ1bmN0aW9uIHRoYXQgaGFzIGJlZW4gaW5zdHJ1bWVudGVkLFxuICAgICAgICAgKiByZXZlcnQgdGhlIGZ1bmN0aW9uI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GlvbnNcbiAgICAgICAgICovXG4gICAgICAgIHJlcG9ydDogZnVuY3Rpb24gU3RhY2tUcmFjZSQkcmVwb3J0KHN0YWNrZnJhbWVzLCB1cmwsIGVycm9yTXNnLCByZXF1ZXN0T3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgIHZhciByZXEgPSBuZXcgWE1MSHR0cFJlcXVlc3QoKTtcbiAgICAgICAgICAgICAgICByZXEub25lcnJvciA9IHJlamVjdDtcbiAgICAgICAgICAgICAgICByZXEub25yZWFkeXN0YXRlY2hhbmdlID0gZnVuY3Rpb24gb25yZWFkeXN0YXRlY2hhbmdlKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVxLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXEuc3RhdHVzID49IDIwMCAmJiByZXEuc3RhdHVzIDwgNDAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXEucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcignUE9TVCB0byAnICsgdXJsICsgJyBmYWlsZWQgd2l0aCBzdGF0dXM6ICcgKyByZXEuc3RhdHVzKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJlcS5vcGVuKCdwb3N0JywgdXJsKTtcblxuICAgICAgICAgICAgICAgIC8vIFNldCByZXF1ZXN0IGhlYWRlcnNcbiAgICAgICAgICAgICAgICByZXEuc2V0UmVxdWVzdEhlYWRlcignQ29udGVudC1UeXBlJywgJ2FwcGxpY2F0aW9uL2pzb24nKTtcbiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdE9wdGlvbnMgJiYgdHlwZW9mIHJlcXVlc3RPcHRpb25zLmhlYWRlcnMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBoZWFkZXJzID0gcmVxdWVzdE9wdGlvbnMuaGVhZGVycztcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaGVhZGVyIGluIGhlYWRlcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoZWFkZXJzLmhhc093blByb3BlcnR5KGhlYWRlcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXEuc2V0UmVxdWVzdEhlYWRlcihoZWFkZXIsIGhlYWRlcnNbaGVhZGVyXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YXIgcmVwb3J0UGF5bG9hZCA9IHtzdGFjazogc3RhY2tmcmFtZXN9O1xuICAgICAgICAgICAgICAgIGlmIChlcnJvck1zZyAhPT0gdW5kZWZpbmVkICYmIGVycm9yTXNnICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlcG9ydFBheWxvYWQubWVzc2FnZSA9IGVycm9yTXNnO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJlcS5zZW5kKEpTT04uc3RyaW5naWZ5KHJlcG9ydFBheWxvYWQpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbn0pKTtcbiIsIi8vIENvcHlyaWdodCBKb3llbnQsIEluYy4gYW5kIG90aGVyIE5vZGUgY29udHJpYnV0b3JzLlxuLy9cbi8vIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhXG4vLyBjb3B5IG9mIHRoaXMgc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gJiYgZGVsaW1TdGFydCA+IGxhc3RPdXRlckVuZCkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgaWYgKGxlZnRNYXRjaCkge1xuICAgICAgICBpZiAoIW9wZW5Ub2tlbnMpIHtcbiAgICAgICAgICBvdXRlclN0YXJ0ID0gZGVsaW1TdGFydDtcbiAgICAgICAgICBpbm5lclN0YXJ0ID0gZGVsaW1FbmQ7XG4gICAgICAgIH1cblxuICAgICAgICArK29wZW5Ub2tlbnM7XG4gICAgICB9IGVsc2UgaWYgKHJpZ2h0TWF0Y2ggJiYgb3BlblRva2Vucykge1xuICAgICAgICBpZiAoISAtLW9wZW5Ub2tlbnMpIHtcbiAgICAgICAgICBpZiAodk4pIHtcbiAgICAgICAgICAgIGlmICh2TlswXSAmJiBvdXRlclN0YXJ0ID4gbGFzdE91dGVyRW5kKSB7XG4gICAgICAgICAgICAgIG91dHB1dC5wdXNoKHJvdyh2TlswXSwgc3RyLnNsaWNlKGxhc3RPdXRlckVuZCwgb3V0ZXJTdGFydCksIGxhc3RPdXRlckVuZCwgb3V0ZXJTdGFydCkpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodk5bMV0pIHtcbiAgICAgICAgICAgICAgb3V0cHV0LnB1c2gocm93KHZOWzFdLCBzdHIuc2xpY2Uob3V0ZXJTdGFydCwgaW5uZXJTdGFydCksIG91dGVyU3RhcnQsIGlubmVyU3RhcnQpKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHZOWzJdKSB7XG4gICAgICAgICAgICAgIG91dHB1dC5wdXNoKHJvdyh2TlsyXSwgc3RyLnNsaWNlKGlubmVyU3RhcnQsIGRlbGltU3RhcnQpLCBpbm5lclN0YXJ0LCBkZWxpbVN0YXJ0KSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh2TlszXSkge1xuICAgICAgICAgICAgICBvdXRwdXQucHVzaChyb3codk5bM10sIHN0ci5zbGljZShk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uICAgICAgICAnbmFtZSc6ICdJbktobWVyJyxcbiAgICAgICAgJ2JtcCc6ICdcXHUxNzgwLVxcdTE3RkYnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luS2htZXJfU3ltYm9scycsXG4gICAgICAgICdibXAnOiAnXFx1MTlFMC1cXHUxOUZGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJbktob2praScsXG4gICAgICAgICdhc3RyYWwnOiAnXFx1RDgwNFtcXHVERTAwLVxcdURFNEZdJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJbktodWRhd2FkaScsXG4gICAgICAgICdhc3RyYWwnOiAnXFx1RDgwNFtcXHVERUIwLVxcdURFRkZdJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJbkxhbycsXG4gICAgICAgICdibXAnOiAnXFx1MEU4MC1cXHUwRUZGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJbkxhdGluXzFfU3VwcGxlbWVudCcsXG4gICAgICAgICdibXAnOiAnXFx4ODAtXFx4RkYnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luTGF0aW5fRXh0ZW5kZWRfQScsXG4gICAgICAgICdibXAnOiAnXFx1MDEwMC1cXHUwMTdGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJbkxhdGluX0V4dGVuZGVkX0FkZGl0aW9uYWwnLFxuICAgICAgICAnYm1wJzogJ1xcdTFFMDAtXFx1MUVGRidcbiAgICB9LFxuICAgIHtcbiAgICAgICAgJ25hbWUnOiAnSW5MYXRpbl9FeHRlbmRlZF9CJyxcbiAgICAgICAgJ2JtcCc6ICdcXHUwMTgwLVxcdTAyNEYnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luTGF0aW5fRXh0ZW5kZWRfQycsXG4gICAgICAgICdibXAnOiAnXFx1MkM2MC1cXHUyQ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UZdJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblN5bG90aV9OYWdyaScsXG4gICAgICAgICdibXAnOiAnXFx1QTgwMC1cXHVBODJGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblN5cmlhYycsXG4gICAgICAgICdibXAnOiAnXFx1MDcwMC1cXHUwNzRGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblN5cmlhY19TdXBwbGVtZW50JyxcbiAgICAgICAgJ2JtcCc6ICdcXHUwODYwLVxcdTA4NkYnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luVGFnYWxvZycsXG4gICAgICAgICdibXAnOiAnXFx1MTcwMC1cXHUxNzFGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblRhZ2JhbndhJyxcbiAgICAgICAgJ2JtcCc6ICdcXHUxNzYwLVxcdTE3N0YnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luVGFncycsXG4gICAgICAgICdhc3RyYWwnOiAnXFx1REI0MFtcXHVEQzAwLVxcdURDN0ZdJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblRhaV9MZScsXG4gICAgICAgICdibXAnOiAnXFx1MTk1MC1cXHUxOTdGJ1xuICAgIH0sXG4gICAge1xuICAgICAgICAnbmFtZSc6ICdJblRhaV9UaGFtJyxcbiAgICAgICAgJ2JtcCc6ICdcXHUxQTIwLVxcdTFBQUYnXG4gICAgfSxcbiAgICB7XG4gICAgICAgICduYW1lJzogJ0luVGFpX1ZpZXQnLFxuICAgICAgICAnYm1wJzogJ1xcdUFBODAtXFx1QUFERidcbiAgICB9LFxuICAgIHtcbiAgICAgICAgJ25hbWUnOiAnSW5UYWlfWHVhbl9KaW5nX1N5bWJvbHMnLFxuICAgICAgICAnYXN0cmFsJzogJ1xcdUQ4MzRbXFx1REYwMC1cXHVERjVGXSdcb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UREM0EtXFx1REQzRVxcdURENDAtXFx1REQ3RlxcdUREQjgtXFx1RERCQlxcdURERDBcXHVEREQxXFx1REUwNFxcdURFMDctXFx1REUwQlxcdURFMTRcXHVERTE4XFx1REUzNlxcdURFMzdcXHVERTNCLVxcdURFM0VcXHVERTQ5LVxcdURFNEZcXHVERTU5LVxcdURFNUZcXHVERUEwLVxcdURFQkZcXHVERUU3LVxcdURFRUFcXHVERUY3LVxcdURFRkZcXHVERjM2LVxcdURGMzhcXHVERjU2XFx1REY1N1xcdURGNzMtXFx1REY3N1xcdURGOTItXFx1REY5OFxcdURGOUQtXFx1REZBOFxcdURGQjAtXFx1REZGRl18XFx1RDgwM1tcXHVEQzQ5LVxcdURDN0ZcXHVEQ0IzLVxcdURDQkZcXHVEQ0YzLVxcdURDRjlcXHVERDI4LVxcdUREMkZcXHVERDNBLVxcdURFNUZcXHVERTdGLVxcdURFRkZcXHVERjI4LVxcdURGMkZcXHVERjVBLVxcdURGRkZdfFxcdUQ4MDRbXFx1REM0RS1cXHVEQzUxXFx1REM3MC1cXHVEQzdFXFx1RENCRFxcdURDQzItXFx1RENDRlxcdURDRTktXFx1RENFRlxcdURDRkEtXFx1RENGRlxcdUREMzVcXHVERDQ3LVxcdURENEZcXHVERDc3LVxcdUREN0ZcXHVERENFXFx1RERDRlxcdURERTBcXHVEREY1LVxcdURERkZcXHVERTEyXFx1REUzRi1cXHVERTdGXFx1REU4N1xcdURFODlcXHVERThFXFx1REU5RVxcdURFQUEtXFx1REVBRlxcdURFRUItXFx1REVFRlxcdURFRkEtXFx1REVGRlxcdURGMDRcXHVERjBEXFx1REYwRVxcdURGMTFcXHVERjEyXFx1REYyOVxcdURGMzFcXHVERjM0XFx1REYzQVxcdURGNDVcXHVERjQ2XFx1REY0OVxcdURGNEFcXHVERjRFXFx1REY0RlxcdURGNTEtXFx1REY1NlxcdURGNTgtXFx1REY1Q1xcdURGNjRcXHVERjY1XFx1REY2RC1cXHVERjZGXFx1REY3NS1cXHVER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DhcXHVERDAwLVxcdUREMjNcXHVERjAwLVxcdURGMUNcXHVERjI3XFx1REYzMC1cXHVERjQ1XXxcXHVEODA0W1xcdURDMDMtXFx1REMzN1xcdURDODMtXFx1RENBRlxcdURDRDAtXFx1RENFOFxcdUREMDMtXFx1REQyNlxcdURENDRcXHVERDUwLVxcdURENzJcXHVERDc2XFx1REQ4My1cXHVEREIyXFx1RERDMS1cXHVEREM0XFx1REREQVxcdURERENcXHVERTAwLVxcdURFMTFcXHVERTEzLVxcdURFMkJcXHVERTgwLVxcdURFODZcXHVERTg4XFx1REU4QS1cXHVERThEXFx1REU4Ri1cXHVERTlEXFx1REU5Ri1cXHVERUE4XFx1REVCMC1cXHVERURFXFx1REYwNS1cXHVERjBDXFx1REYwRlxcdURGMTBcXHVERjEzLVxcdURGMjhcXHVERjJBLVxcdURGMzBcXHVERjMyXFx1REYzM1xcdURGMzUtXFx1REYzOVxcdURGM0RcXHVERjUwXFx1REY1RC1cXHVERjYxXXxcXHVEODA1W1xcdURDMDAtXFx1REMzNFxcdURDNDctXFx1REM0QVxcdURDODAtXFx1RENBRlxcdURDQzRcXHVEQ0M1XFx1RENDN1xcdUREODAtXFx1RERBRVxcdURERDgtXFx1REREQlxcdURFMDAtXFx1REUyRlxcdURFNDRcXHVERTgwLVxcdURFQUFcXHVERjAwLVxcdURGMUFdfFxcdUQ4MDZbXFx1REMwMC1cXHVEQzJCXFx1RENGRlxcdURFMDBcXHVERTBCLVxcdURFMzJcXHVERTNBXFx1REU1MFxcdURFNUMtXFx1REU4M1xcdURFODYtXFx1REU4OVxcdURFOURcXHVERUMwLVxcdURFRjhdfFxcdUQ4MDdbXFx1REMwMC1cXHVEQzA4XFx1REMwQS1cXHVEQzJFXFx1REM0MFxcdURDNzItXFx1REM4RlxcdUREMDAtXFx1REQwNlxcdUREMDhcXHVERDA5XFx1REQwQi1cXHVERDMwXFx1REQ0NlxcdURENjAtXFx1REQ2NVxcdURENjdcXHVERDY4XFx1REQ2QS1cXHV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lxcdUREMjctXFx1REQzNFxcdURENDVcXHVERDQ2XFx1REQ3M1xcdUREODAtXFx1REQ4MlxcdUREQjMtXFx1RERDMFxcdUREQzktXFx1RERDQ1xcdURFMkMtXFx1REUzN1xcdURFM0VcXHVERURGLVxcdURFRUFcXHVERjAwLVxcdURGMDNcXHVERjNCXFx1REYzQ1xcdURGM0UtXFx1REY0NFxcdURGNDdcXHVERjQ4XFx1REY0Qi1cXHVERjREXFx1REY1N1xcdURGNjJcXHVERjYzXFx1REY2Ni1cXHVERjZDXFx1REY3MC1cXHVERjc0XXxcXHVEODA1W1xcdURDMzUtXFx1REM0NlxcdURDNUVcXHVEQ0IwLVxcdURDQzNcXHVEREFGLVxcdUREQjVcXHVEREI4LVxcdUREQzBcXHVERERDXFx1RERERFxcdURFMzAtXFx1REU0MFxcdURFQUItXFx1REVCN1xcdURGMUQtXFx1REYyQl18XFx1RDgwNltcXHVEQzJDLVxcdURDM0FcXHVERTAxLVxcdURFMEFcXHVERTMzLVxcdURFMzlcXHVERTNCLVxcdURFM0VcXHVERTQ3XFx1REU1MS1cXHVERTVCXFx1REU4QS1cXHVERTk5XXxcXHVEODA3W1xcdURDMkYtXFx1REMzNlxcdURDMzgtXFx1REMzRlxcdURDOTItXFx1RENBN1xcdURDQTktXFx1RENCNlxcdUREMzEtXFx1REQzNlxcdUREM0FcXHVERDNDXFx1REQzRFxcdUREM0YtXFx1REQ0NVxcdURENDdcXHVERDhBLVxcdUREOEVcXHVERDkwXFx1REQ5MVxcdUREOTMtXFx1REQ5N1xcdURFRjMtXFx1REVGNl18XFx1RDgxQVtcXHVERUYwLVxcdURFRjRcXHVERjMwLVxcdURGMzZdfFxcdUQ4MUJbXFx1REY1MS1cXHVERjdFXFx1REY4Ri1cXHVERjkyXXxcXHVEODJGW1xcdURDOURcXHVEQzlFXXxcXHVEODM0W1xcdURENjUtXFx1REQ2OVxcdURENkQtXFx1REQ3MlxcdUREN0ItXFx1REQ4MlxcdUREODUtXFx1REQ4Qlx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jQwLVxcdURGNTVcXHVERjYwLVxcdURGNjddfFxcdUQ4MDJbXFx1REMwMC1cXHVEQzA1XFx1REMwOFxcdURDMEEtXFx1REMzNVxcdURDMzdcXHVEQzM4XFx1REMzQ1xcdURDM0YtXFx1REM1NVxcdURDNjAtXFx1REM3NlxcdURDODAtXFx1REM5RVxcdURDRTAtXFx1RENGMlxcdURDRjRcXHVEQ0Y1XFx1REQwMC1cXHVERDE1XFx1REQyMC1cXHVERDM5XFx1REQ4MC1cXHVEREI3XFx1RERCRVxcdUREQkZcXHVERTAwLVxcdURFMDNcXHVERTA1XFx1REUwNlxcdURFMEMtXFx1REUxM1xcdURFMTUtXFx1REUxN1xcdURFMTktXFx1REUzNVxcdURFNjAtXFx1REU3Q1xcdURFODAtXFx1REU5Q1xcdURFQzAtXFx1REVDN1xcdURFQzktXFx1REVFNFxcdURGMDAtXFx1REYzNVxcdURGNDAtXFx1REY1NVxcdURGNjAtXFx1REY3MlxcdURGODAtXFx1REY5MV18XFx1RDgwM1tcXHVEQzAwLVxcdURDNDhcXHVEQzgwLVxcdURDQjJcXHVEQ0MwLVxcdURDRjJcXHVERDAwLVxcdUREMjdcXHVERjAwLVxcdURGMUNcXHVERjI3XFx1REYzMC1cXHVERjQ1XXxcXHVEODA0W1xcdURDMDAtXFx1REM0NVxcdURDODItXFx1RENCOFxcdURDRDAtXFx1RENFOFxcdUREMDAtXFx1REQzMlxcdURENDQtXFx1REQ0NlxcdURENTAtXFx1REQ3MlxcdURENzZcXHVERDgwLVxcdUREQkZcXHVEREMxLVxcdUREQzRcXHVERERBXFx1REREQ1xcdURFMDAtXFx1REUxMVxcdURFMTMtXFx1REUzNFxcdURFMzdcXHVERTNFXFx1REU4MC1cXHVERTg2XFx1REU4OFxcdURFOEEtXFx1REU4RFxcdURFOEYtXFx1REU5RFxcdURFOUYtXFx1REVBOFxcdURFQjAtXFx1REVFOFxcdURGMDAtXFx1REYwM1xcdURGMDUtXFx1REYwQ1xcdURGMEZcXHVERjE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gICAgICBBcmd2UGFyc2VyLm1lcmdlSnNvbignLS1mb3JtYXQtb3B0aW9ucycpLFxuICAgICAgICB7fVxuICAgICAgKVxuICAgICAgLm9wdGlvbihcbiAgICAgICAgJy0taTE4bi1rZXl3b3JkcyA8SVNPIDYzOS0xPicsXG4gICAgICAgICdsaXN0IGxhbmd1YWdlIGtleXdvcmRzJyxcbiAgICAgICAgQXJndlBhcnNlci52YWxpZGF0ZUxhbmd1YWdlLFxuICAgICAgICAnJ1xuICAgICAgKVxuICAgICAgLm9wdGlvbignLS1pMThuLWxhbmd1YWdlcycsICdsaXN0IGxhbmd1YWdlcycpXG4gICAgICAub3B0aW9uKFxuICAgICAgICAnLS1sYW5ndWFnZSA8SVNPIDYzOS0xPicsXG4gICAgICAgICdwcm92aWRlIHRoZSBkZWZhdWx0IGxhbmd1YWdlIGZvciBmZWF0dXJlIGZpbGVzJyxcbiAgICAgICAgJydcbiAgICAgIClcbiAgICAgIC5vcHRpb24oXG4gICAgICAgICctLW5hbWUgPFJFR0VYUD4nLFxuICAgICAgICAnb25seSBleGVjdXRlIHRoZSBzY2VuYXJpb3Mgd2l0aCBuYW1lIG1hdGNoaW5nIHRoZSBleHByZXNzaW9uIChyZXBlYXRhYmxlKScsXG4gICAgICAgIEFyZ3ZQYXJzZXIuY29sbGVjdCxcbiAgICAgICAgW11cbiAgICAgIClcbiAgICAgIC5vcHRpb24oJy0tbm8tc3RyaWN0JywgJ3N1Y2NlZWQgZXZlbiBpZiB0aGVyZSBhcmUgcGVuZGluZyBzdGVwcycpXG4gICAgICAub3B0aW9uKFxuICAgICAgICAnLS1vcmRlciA8VFlQRVs6U0VFRF0+JyxcbiAgICAgICAgJ3J1biBzY2VuYXJpb3MgaW4gdGhlIHNwZWNpZmllZCBvcmRlci4gVHlwZSBzaG91bGQgYmUgYGRlZmluZWRgIG9yIGByYW5kb21gJyxcbiAgICAgICAgJ2RlZmluZWQnXG4gICAgICApXG4gICAgICAub3B0aW9uKFxuICAgICAgICA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B7IGVycm9yLCByZXN1bHQgfVxuICB9XG59XG4iXX0= diff --git a/package.json b/package.json index 760390ce3..e799a6065 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "gherkin", "tests" ], - "version": "6.0.1", + "version": "6.0.2", "homepage": "http://github.com/cucumber/cucumber-js", "author": "Julien Biezemans (http://jbpros.net)", "contributors": [