From a0fb3bebea93f0f765a3f0386fc8f92e6843f0a3 Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Fri, 12 Feb 2016 14:42:27 -0500 Subject: [PATCH] v0.5.1 --- dist/tangram.debug.js | 25497 ++++++++++++++++++++-------------------- dist/tangram.min.js | 34 +- src/utils/version.js | 2 +- 3 files changed, 12779 insertions(+), 12754 deletions(-) diff --git a/dist/tangram.debug.js b/dist/tangram.debug.js index 19a4f6835..e09b13f70 100644 --- a/dist/tangram.debug.js +++ b/dist/tangram.debug.js @@ -1327,36 +1327,26 @@ function boxIntersect(red, blue, visit, full) { return retval } - -var RESULT - -function appendItem(i,j) { - RESULT.push([i,j]) -} - -function intersectFullArray(x) { - RESULT = [] - boxIntersect(x, x, appendItem, true) - return RESULT -} - -function intersectBipartiteArray(x, y) { - RESULT = [] - boxIntersect(x, y, appendItem, false) - return RESULT -} - //User-friendly wrapper, handle full input and no-visitor cases function boxIntersectWrapper(arg0, arg1, arg2) { var result switch(arguments.length) { case 1: - return intersectFullArray(arg0) + result = [] + boxIntersect(arg0, arg0, function(i,j) { + result.push([i, j]) + }, true) + return result case 2: if(typeof arg1 === 'function') { - return boxIntersect(arg0, arg0, arg1, true) + var visit = arg1 + return boxIntersect(arg0, arg0, visit, true) } else { - return intersectBipartiteArray(arg0, arg1) + result = [] + boxIntersect(arg0, arg1, function(i,j) { + result.push([i, j]) + }, false) + return result } case 3: return boxIntersect(arg0, arg1, arg2, false) @@ -3896,7 +3886,7 @@ function decodeUtf8Char (str) { } } -},{"base64-js":28,"ieee754":145,"is-array":148}],39:[function(_dereq_,module,exports){ +},{"base64-js":28,"ieee754":144,"is-array":147}],39:[function(_dereq_,module,exports){ _dereq_('../../modules/es6.string.iterator'); _dereq_('../../modules/es6.array.from'); module.exports = _dereq_('../../modules/$.core').Array.from; @@ -6499,15115 +6489,15120 @@ function Node(p) { } },{}],136:[function(_dereq_,module,exports){ -/* - Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. +'use strict'; - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: +module.exports = clip; - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +/* clip features between two axis-parallel lines: + * | | + * ___|___ | / + * / | \____|____/ + * | | + */ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ +function clip(features, scale, k1, k2, axis, intersect, minAll, maxAll) { -(function (root, factory) { - 'use strict'; + k1 /= scale; + k2 /= scale; - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. + if (minAll >= k1 && maxAll <= k2) return features; // trivial accept + else if (minAll > k2 || maxAll < k1) return null; // trivial reject - /* istanbul ignore next */ - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); + var clipped = []; + + for (var i = 0; i < features.length; i++) { + + var feature = features[i], + geometry = feature.geometry, + type = feature.type, + min, max; + + min = feature.min[axis]; + max = feature.max[axis]; + + if (min >= k1 && max <= k2) { // trivial accept + clipped.push(feature); + continue; + } else if (min > k2 || max < k1) continue; // trivial reject + + var slices = type === 1 ? + clipPoints(geometry, k1, k2, axis) : + clipGeometry(geometry, k1, k2, axis, intersect, type === 3); + + if (slices.length) { + // if a feature got clipped, it will likely get clipped on the next zoom level as well, + // so there's no need to recalculate bboxes + clipped.push({ + geometry: slices, + type: type, + tags: features[i].tags || null, + min: feature.min, + max: feature.max + }); + } } -}(this, function (exports) { - 'use strict'; - var Token, - TokenName, - FnExprTokens, - Syntax, - PlaceHolders, - Messages, - Regex, - source, - strict, - index, - lineNumber, - lineStart, - hasLineTerminator, - lastIndex, - lastLineNumber, - lastLineStart, - startIndex, - startLineNumber, - startLineStart, - scanning, - length, - lookahead, - state, - extra, - isBindingElement, - isAssignmentTarget, - firstCoverInitializedNameError; + return clipped.length ? clipped : null; +} - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8, - RegularExpression: 9, - Template: 10 - }; +function clipPoints(geometry, k1, k2, axis) { + var slice = []; - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - TokenName[Token.RegularExpression] = 'RegularExpression'; - TokenName[Token.Template] = 'Template'; + for (var i = 0; i < geometry.length; i++) { + var a = geometry[i], + ak = a[axis]; - // A function following one of those tokens is an expression. - FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', - 'return', 'case', 'delete', 'throw', 'void', - // assignment operators - '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', - '&=', '|=', '^=', ',', - // binary/unary operators - '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', - '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', - '<=', '<', '>', '!=', '!==']; + if (ak >= k1 && ak <= k2) slice.push(a); + } + return slice; +} - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForOfStatement: 'ForOfStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchCase: 'SwitchCase', - SwitchStatement: 'SwitchStatement', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; +function clipGeometry(geometry, k1, k2, axis, intersect, closed) { - PlaceHolders = { - ArrowParameterPlaceHolder: 'ArrowParameterPlaceHolder' - }; + var slices = []; - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedTemplate: 'Unexpected quasi %0', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode', - TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', - ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', - DefaultRestParameter: 'Unexpected token =', - ObjectPatternAsRestParameter: 'Unexpected token {', - DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', - ConstructorSpecialMethod: 'Class constructor may not be an accessor', - DuplicateConstructor: 'A class may only have one constructor', - StaticPrototype: 'Classes may not have static property named prototype', - MissingFromClause: 'Unexpected token', - NoAsAfterImportNamespace: 'Unexpected token', - InvalidModuleSpecifier: 'Unexpected token', - IllegalImportDeclaration: 'Unexpected token', - IllegalExportDeclaration: 'Unexpected token', - DuplicateBinding: 'Duplicate binding %0' - }; + for (var i = 0; i < geometry.length; i++) { - // See also tools/generate-unicode-regex.js. - Regex = { - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\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\u19C1-\u19C7\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\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\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/, + var ak = 0, + bk = 0, + b = null, + points = geometry[i], + area = points.area, + dist = points.dist, + len = points.length, + a, j, last; - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\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-\u0A75\u0A81-\u0A83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-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\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\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\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DBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\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\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; + var slice = []; - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. + for (j = 0; j < len - 1; j++) { + a = b || points[j]; + b = points[j + 1]; + ak = bk || a[axis]; + bk = b[axis]; - function assert(condition, message) { - /* istanbul ignore if */ - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } + if (ak < k1) { - function isDecimalDigit(ch) { - return (ch >= 0x30 && ch <= 0x39); // 0..9 - } + if ((bk > k2)) { // ---|-----|--> + slice.push(intersect(a, b, k1), intersect(a, b, k2)); + if (!closed) slice = newSlice(slices, slice, area, dist); - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } + } else if (bk >= k1) slice.push(intersect(a, b, k1)); // ---|--> | - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } + } else if (ak > k2) { - function octalToDecimal(ch) { - // \0 is not octal escape sequence - var octal = (ch !== '0'), code = '01234567'.indexOf(ch); + if ((bk < k1)) { // <--|-----|--- + slice.push(intersect(a, b, k2), intersect(a, b, k1)); + if (!closed) slice = newSlice(slices, slice, area, dist); - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); + } else if (bk <= k2) slice.push(intersect(a, b, k2)); // | <--|--- - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } + } else { - return { - code: code, - octal: octal - }; - } + slice.push(a); - // ECMA-262 11.2 White Space + if (bk < k1) { // <--|--- | + slice.push(intersect(a, b, k1)); + if (!closed) slice = newSlice(slices, slice, area, dist); - function isWhiteSpace(ch) { - return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || - (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); - } + } else if (bk > k2) { // | ---|--> + slice.push(intersect(a, b, k2)); + if (!closed) slice = newSlice(slices, slice, area, dist); + } + // | --> | + } + } - // ECMA-262 11.3 Line Terminators + // add the last point + a = points[len - 1]; + ak = a[axis]; + if (ak >= k1 && ak <= k2) slice.push(a); - function isLineTerminator(ch) { - return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); - } + // close the polygon if its endpoints are not the same after clipping - // ECMA-262 11.6 Identifier Names and Identifiers + last = slice[slice.length - 1]; + if (closed && last && (slice[0][0] !== last[0] || slice[0][1] !== last[1])) slice.push(slice[0]); - function fromCodePoint(cp) { - return (cp < 0x10000) ? String.fromCharCode(cp) : - String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + - String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + // add the final slice + newSlice(slices, slice, area, dist); } - function isIdentifierStart(ch) { - return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))); - } + return slices; +} - function isIdentifierPart(ch) { - return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch >= 0x30 && ch <= 0x39) || // 0..9 - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))); +function newSlice(slices, slice, area, dist) { + if (slice.length) { + // we don't recalculate the area/length of the unclipped geometry because the case where it goes + // below the visibility threshold as a result of clipping is rare, so we avoid doing unnecessary work + slice.area = area; + slice.dist = dist; + + slices.push(slice); } + return []; +} - // ECMA-262 11.6.2.2 Future Reserved Words +},{}],137:[function(_dereq_,module,exports){ +'use strict'; - function isFutureReservedWord(id) { - switch (id) { - case 'enum': - case 'export': - case 'import': - case 'super': - return true; - default: - return false; - } - } +module.exports = convert; - function isStrictModeReservedWord(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - default: - return false; - } - } +var simplify = _dereq_('./simplify'); - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } +// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data - // ECMA-262 11.6.2.1 Keywords +function convert(data, tolerance) { + var features = []; - function isKeyword(id) { - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || - (id === 'try') || (id === 'let'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; + if (data.type === 'FeatureCollection') { + for (var i = 0; i < data.features.length; i++) { + convertFeature(features, data.features[i], tolerance); } + } else if (data.type === 'Feature') { + convertFeature(features, data, tolerance); + + } else { + // single geometry or a geometry collection + convertFeature(features, {geometry: data}, tolerance); } + return features; +} - // ECMA-262 11.4 Comments +function convertFeature(features, feature, tolerance) { + var geom = feature.geometry, + type = geom.type, + coords = geom.coordinates, + tags = feature.properties, + i, j, rings; - function addComment(type, value, start, end, loc) { - var comment; + if (type === 'Point') { + features.push(create(tags, 1, [projectPoint(coords)])); - assert(typeof start === 'number', 'Comment must have valid position'); + } else if (type === 'MultiPoint') { + features.push(create(tags, 1, project(coords))); - state.lastCommentStart = start; + } else if (type === 'LineString') { + features.push(create(tags, 2, [project(coords, tolerance)])); - comment = { - type: type, - value: value - }; - if (extra.range) { - comment.range = [start, end]; + } else if (type === 'MultiLineString' || type === 'Polygon') { + rings = []; + for (i = 0; i < coords.length; i++) { + rings.push(project(coords[i], tolerance)); } - if (extra.loc) { - comment.loc = loc; - } - extra.comments.push(comment); - if (extra.attachComment) { - extra.leadingComments.push(comment); - extra.trailingComments.push(comment); - } - if (extra.tokenize) { - comment.type = comment.type + 'Comment'; - if (extra.delegate) { - comment = extra.delegate(comment); + features.push(create(tags, type === 'Polygon' ? 3 : 2, rings)); + + } else if (type === 'MultiPolygon') { + rings = []; + for (i = 0; i < coords.length; i++) { + for (j = 0; j < coords[i].length; j++) { + rings.push(project(coords[i][j], tolerance)); } - extra.tokens.push(comment); } - } + features.push(create(tags, 3, rings)); - function skipSingleLineComment(offset) { - var start, loc, ch, comment; + } else if (type === 'GeometryCollection') { + for (i = 0; i < geom.geometries.length; i++) { + convertFeature(features, { + geometry: geom.geometries[i], + properties: tags + }, tolerance); + } - start = index - offset; - loc = { - start: { - line: lineNumber, - column: index - lineStart - offset - } - }; + } else { + throw new Error('Input data is not a valid GeoJSON object.'); + } +} - while (index < length) { - ch = source.charCodeAt(index); - ++index; - if (isLineTerminator(ch)) { - hasLineTerminator = true; - if (extra.comments) { - comment = source.slice(start + offset, index - 1); - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - addComment('Line', comment, start, index - 1, loc); - } - if (ch === 13 && source.charCodeAt(index) === 10) { - ++index; - } - ++lineNumber; - lineStart = index; - return; - } - } +function create(tags, type, geometry) { + var feature = { + geometry: geometry, + type: type, + tags: tags || null, + min: [2, 1], // initial bbox values; + max: [-1, 0] // note that coords are usually in [0..1] range + }; + calcBBox(feature); + return feature; +} - if (extra.comments) { - comment = source.slice(start + offset, index); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Line', comment, start, index, loc); - } +function project(lonlats, tolerance) { + var projected = []; + for (var i = 0; i < lonlats.length; i++) { + projected.push(projectPoint(lonlats[i])); + } + if (tolerance) { + simplify(projected, tolerance); + calcSize(projected); } + return projected; +} - function skipMultiLineComment() { - var start, loc, ch, comment; +function projectPoint(p) { + var sin = Math.sin(p[1] * Math.PI / 180), + x = (p[0] / 360 + 0.5), + y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI); - if (extra.comments) { - start = index - 2; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - } + y = y < -1 ? -1 : + y > 1 ? 1 : y; - while (index < length) { - ch = source.charCodeAt(index); - if (isLineTerminator(ch)) { - if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { - ++index; - } - hasLineTerminator = true; - ++lineNumber; - ++index; - lineStart = index; - } else if (ch === 0x2A) { - // Block comment ends with '*/'. - if (source.charCodeAt(index + 1) === 0x2F) { - ++index; - ++index; - if (extra.comments) { - comment = source.slice(start + 2, index - 2); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - } - return; - } - ++index; - } else { - ++index; - } - } + return [x, y, 0]; +} - // Ran off the end of the file - the whole thing is a comment - if (extra.comments) { - loc.end = { - line: lineNumber, - column: index - lineStart - }; - comment = source.slice(start + 2, index); - addComment('Block', comment, start, index, loc); - } - tolerateUnexpectedToken(); - } +// calculate area and length of the poly +function calcSize(points) { + var area = 0, + dist = 0; - function skipComment() { - var ch, start; - hasLineTerminator = false; + for (var i = 0, a, b; i < points.length - 1; i++) { + a = b || points[i]; + b = points[i + 1]; - start = (index === 0); - while (index < length) { - ch = source.charCodeAt(index); + area += a[0] * b[1] - b[0] * a[1]; - if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - hasLineTerminator = true; - ++index; - if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { - ++index; - } - ++lineNumber; - lineStart = index; - start = true; - } else if (ch === 0x2F) { // U+002F is '/' - ch = source.charCodeAt(index + 1); - if (ch === 0x2F) { - ++index; - ++index; - skipSingleLineComment(2); - start = true; - } else if (ch === 0x2A) { // U+002A is '*' - ++index; - ++index; - skipMultiLineComment(); - } else { - break; - } - } else if (start && ch === 0x2D) { // U+002D is '-' - // U+003E is '>' - if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { - // '-->' is a single-line comment - index += 3; - skipSingleLineComment(3); - } else { - break; - } - } else if (ch === 0x3C) { // U+003C is '<' - if (source.slice(index + 1, index + 4) === '!--') { - ++index; // `<` - ++index; // `!` - ++index; // `-` - ++index; // `-` - skipSingleLineComment(4); - } else { - break; - } - } else { - break; - } - } + // use Manhattan distance instead of Euclidian one to avoid expensive square root computation + dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]); } + points.area = Math.abs(area / 2); + points.dist = dist; +} - function scanHexEscape(prefix) { - var i, len, ch, code = 0; +// calculate the feature bounding box for faster clipping later +function calcBBox(feature) { + var geometry = feature.geometry, + min = feature.min, + max = feature.max; - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); + if (feature.type === 1) calcRingBBox(min, max, geometry); + else for (var i = 0; i < geometry.length; i++) calcRingBBox(min, max, geometry[i]); + + return feature; +} + +function calcRingBBox(min, max, points) { + for (var i = 0, p; i < points.length; i++) { + p = points[i]; + min[0] = Math.min(p[0], min[0]); + max[0] = Math.max(p[0], max[0]); + min[1] = Math.min(p[1], min[1]); + max[1] = Math.max(p[1], max[1]); } +} - function scanUnicodeCodePointEscape() { - var ch, code; +},{"./simplify":139}],138:[function(_dereq_,module,exports){ +'use strict'; - ch = source[index]; - code = 0; +module.exports = geojsonvt; - // At least, one hex digit is required. - if (ch === '}') { - throwUnexpectedToken(); - } +var convert = _dereq_('./convert'), // GeoJSON conversion and preprocessing + clip = _dereq_('./clip'), // stripe clipping algorithm + wrap = _dereq_('./wrap'), // date line processing + createTile = _dereq_('./tile'); // final simplified tile generation - while (index < length) { - ch = source[index++]; - if (!isHexDigit(ch)) { - break; - } - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } - if (code > 0x10FFFF || ch !== '}') { - throwUnexpectedToken(); - } +function geojsonvt(data, options) { + return new GeoJSONVT(data, options); +} - return fromCodePoint(code); +function GeoJSONVT(data, options) { + options = this.options = extend(Object.create(this.options), options); + + var debug = options.debug; + + if (debug) console.time('preprocess data'); + + var z2 = 1 << options.maxZoom, // 2^z + features = convert(data, options.tolerance / (z2 * options.extent)); + + this.tiles = {}; + this.tileCoords = []; + + if (debug) { + console.timeEnd('preprocess data'); + console.log('index: maxZoom: %d, maxPoints: %d', options.indexMaxZoom, options.indexMaxPoints); + console.time('generate tiles'); + this.stats = {}; + this.total = 0; } - function codePointAt(i) { - var cp, first, second; + features = wrap(features, options.buffer / options.extent, intersectX); - cp = source.charCodeAt(i); - if (cp >= 0xD800 && cp <= 0xDBFF) { - second = source.charCodeAt(i + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - first = cp; - cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } + // start slicing from the top tile down + if (features.length) this.splitTile(features, 0, 0, 0); - return cp; + if (debug) { + if (features.length) console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints); + console.timeEnd('generate tiles'); + console.log('tiles generated:', this.total, JSON.stringify(this.stats)); } +} - function getComplexIdentifier() { - var cp, ch, id; +GeoJSONVT.prototype.options = { + maxZoom: 14, // max zoom to preserve detail on + indexMaxZoom: 5, // max zoom in the tile index + indexMaxPoints: 100000, // max number of points per tile in the tile index + solidChildren: false, // whether to tile solid square tiles further + tolerance: 3, // simplification tolerance (higher means simpler) + extent: 4096, // tile extent + buffer: 64, // tile buffer on each side + debug: 0 // logging level (0, 1 or 2) +}; - cp = codePointAt(index); - id = fromCodePoint(cp); - index += id.length; +GeoJSONVT.prototype.splitTile = function (features, z, x, y, cz, cx, cy) { - // '\u' (U+005C, U+0075) denotes an escaped character. - if (cp === 0x5C) { - if (source.charCodeAt(index) !== 0x75) { - throwUnexpectedToken(); - } - ++index; - if (source[index] === '{') { - ++index; - ch = scanUnicodeCodePointEscape(); - } else { - ch = scanHexEscape('u'); - cp = ch.charCodeAt(0); - if (!ch || ch === '\\' || !isIdentifierStart(cp)) { - throwUnexpectedToken(); - } - } - id = ch; - } + var stack = [features, z, x, y], + options = this.options, + debug = options.debug; - while (index < length) { - cp = codePointAt(index); - if (!isIdentifierPart(cp)) { - break; - } - ch = fromCodePoint(cp); - id += ch; - index += ch.length; + // avoid recursion by using a processing queue + while (stack.length) { + y = stack.pop(); + x = stack.pop(); + z = stack.pop(); + features = stack.pop(); - // '\u' (U+005C, U+0075) denotes an escaped character. - if (cp === 0x5C) { - id = id.substr(0, id.length - 1); - if (source.charCodeAt(index) !== 0x75) { - throwUnexpectedToken(); - } - ++index; - if (source[index] === '{') { - ++index; - ch = scanUnicodeCodePointEscape(); - } else { - ch = scanHexEscape('u'); - cp = ch.charCodeAt(0); - if (!ch || ch === '\\' || !isIdentifierPart(cp)) { - throwUnexpectedToken(); - } - } - id += ch; - } - } + var z2 = 1 << z, + id = toID(z, x, y), + tile = this.tiles[id], + tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * options.extent); - return id; - } + if (!tile) { + if (debug > 1) console.time('creation'); - function getIdentifier() { - var start, ch; + tile = this.tiles[id] = createTile(features, z2, x, y, tileTolerance, z === options.maxZoom); + this.tileCoords.push({z: z, x: x, y: y}); - start = index++; - while (index < length) { - ch = source.charCodeAt(index); - if (ch === 0x5C) { - // Blackslash (U+005C) marks Unicode escape sequence. - index = start; - return getComplexIdentifier(); - } else if (ch >= 0xD800 && ch < 0xDFFF) { - // Need to handle surrogate pairs. - index = start; - return getComplexIdentifier(); - } - if (isIdentifierPart(ch)) { - ++index; - } else { - break; + if (debug) { + if (debug > 1) { + console.log('tile z%d-%d-%d (features: %d, points: %d, simplified: %d)', + z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified); + console.timeEnd('creation'); + } + var key = 'z' + z; + this.stats[key] = (this.stats[key] || 0) + 1; + this.total++; } } - return source.slice(start, index); - } - - function scanIdentifier() { - var start, id, type; + // save reference to original geometry in tile so that we can drill down later if we stop now + tile.source = features; - start = index; + // stop tiling if the tile is solid clipped square + if (!options.solidChildren && isClippedSquare(tile, options.extent, options.buffer)) continue; - // Backslash (U+005C) starts an escaped character. - id = (source.charCodeAt(index) === 0x5C) ? getComplexIdentifier() : getIdentifier(); + // if it's the first-pass tiling + if (!cz) { + // stop tiling if we reached max zoom, or if the tile is too simple + if (z === options.indexMaxZoom || tile.numPoints <= options.indexMaxPoints) continue; - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - type = Token.Identifier; - } else if (isKeyword(id)) { - type = Token.Keyword; - } else if (id === 'null') { - type = Token.NullLiteral; - } else if (id === 'true' || id === 'false') { - type = Token.BooleanLiteral; + // if a drilldown to a specific tile } else { - type = Token.Identifier; + // stop tiling if we reached base zoom or our target tile zoom + if (z === options.maxZoom || z === cz) continue; + + // stop tiling if it's not an ancestor of the target tile + var m = 1 << (cz - z); + if (x !== Math.floor(cx / m) || y !== Math.floor(cy / m)) continue; } - return { - type: type, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } + // if we slice further down, no need to keep source geometry + tile.source = null; + if (debug > 1) console.time('clipping'); - // ECMA-262 11.7 Punctuators + // values we'll use for clipping + var k1 = 0.5 * options.buffer / options.extent, + k2 = 0.5 - k1, + k3 = 0.5 + k1, + k4 = 1 + k1, + tl, bl, tr, br, left, right; - function scanPunctuator() { - var token, str; + tl = bl = tr = br = null; - token = { - type: Token.Punctuator, - value: '', - lineNumber: lineNumber, - lineStart: lineStart, - start: index, - end: index - }; + left = clip(features, z2, x - k1, x + k3, 0, intersectX, tile.min[0], tile.max[0]); + right = clip(features, z2, x + k2, x + k4, 0, intersectX, tile.min[0], tile.max[0]); - // Check for most common single-character punctuators. - str = source[index]; - switch (str) { + if (left) { + tl = clip(left, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]); + bl = clip(left, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]); + } - case '(': - if (extra.tokenize) { - extra.openParenToken = extra.tokenValues.length; - } - ++index; - break; + if (right) { + tr = clip(right, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]); + br = clip(right, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]); + } - case '{': - if (extra.tokenize) { - extra.openCurlyToken = extra.tokenValues.length; - } - state.curlyStack.push('{'); - ++index; - break; - - case '.': - ++index; - if (source[index] === '.' && source[index + 1] === '.') { - // Spread operator: ... - index += 2; - str = '...'; - } - break; + if (debug > 1) console.timeEnd('clipping'); - case '}': - ++index; - state.curlyStack.pop(); - break; - case ')': - case ';': - case ',': - case '[': - case ']': - case ':': - case '?': - case '~': - ++index; - break; + if (tl) stack.push(tl, z + 1, x * 2, y * 2); + if (bl) stack.push(bl, z + 1, x * 2, y * 2 + 1); + if (tr) stack.push(tr, z + 1, x * 2 + 1, y * 2); + if (br) stack.push(br, z + 1, x * 2 + 1, y * 2 + 1); + } +}; - default: - // 4-character punctuator. - str = source.substr(index, 4); - if (str === '>>>=') { - index += 4; - } else { +GeoJSONVT.prototype.getTile = function (z, x, y) { + var options = this.options, + extent = options.extent, + debug = options.debug; - // 3-character punctuators. - str = str.substr(0, 3); - if (str === '===' || str === '!==' || str === '>>>' || - str === '<<=' || str === '>>=') { - index += 3; - } else { + var z2 = 1 << z; + x = ((x % z2) + z2) % z2; // wrap tile x coordinate - // 2-character punctuators. - str = str.substr(0, 2); - if (str === '&&' || str === '||' || str === '==' || str === '!=' || - str === '+=' || str === '-=' || str === '*=' || str === '/=' || - str === '++' || str === '--' || str === '<<' || str === '>>' || - str === '&=' || str === '|=' || str === '^=' || str === '%=' || - str === '<=' || str === '>=' || str === '=>') { - index += 2; - } else { + var id = toID(z, x, y); + if (this.tiles[id]) return transformTile(this.tiles[id], extent); - // 1-character punctuators. - str = source[index]; - if ('<>=!+-*%&|^/'.indexOf(str) >= 0) { - ++index; - } - } - } - } - } + if (debug > 1) console.log('drilling down to z%d-%d-%d', z, x, y); - if (index === token.start) { - throwUnexpectedToken(); - } + var z0 = z, + x0 = x, + y0 = y, + parent; - token.end = index; - token.value = str; - return token; + while (!parent && z0 > 0) { + z0--; + x0 = Math.floor(x0 / 2); + y0 = Math.floor(y0 / 2); + parent = this.tiles[toID(z0, x0, y0)]; } - // ECMA-262 11.8.3 Numeric Literals + if (!parent) return null; - function scanHexLiteral(start) { - var number = ''; + if (debug > 1) console.log('found parent tile z%d-%d-%d', z0, x0, y0); - while (index < length) { - if (!isHexDigit(source[index])) { - break; - } - number += source[index++]; - } + // if we found a parent tile containing the original geometry, we can drill down from it + if (parent.source) { + if (isClippedSquare(parent, extent, options.buffer)) return transformTile(parent, extent); - if (number.length === 0) { - throwUnexpectedToken(); - } + if (debug > 1) console.time('drilling down'); + this.splitTile(parent.source, z0, x0, y0, z, x, y); + if (debug > 1) console.timeEnd('drilling down'); + } - if (isIdentifierStart(source.charCodeAt(index))) { - throwUnexpectedToken(); - } + if (!this.tiles[id]) return null; - return { - type: Token.NumericLiteral, - value: parseInt('0x' + number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } + return transformTile(this.tiles[id], extent); +}; - function scanBinaryLiteral(start) { - var ch, number; +function transformTile(tile, extent) { + if (tile.transformed) return tile; - number = ''; + var z2 = tile.z2, + tx = tile.x, + ty = tile.y, + i, j, k; - while (index < length) { - ch = source[index]; - if (ch !== '0' && ch !== '1') { - break; - } - number += source[index++]; - } + for (i = 0; i < tile.features.length; i++) { + var feature = tile.features[i], + geom = feature.geometry, + type = feature.type; - if (number.length === 0) { - // only 0b or 0B - throwUnexpectedToken(); - } + if (type === 1) { + for (j = 0; j < geom.length; j++) geom[j] = transformPoint(geom[j], extent, z2, tx, ty); - if (index < length) { - ch = source.charCodeAt(index); - /* istanbul ignore else */ - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwUnexpectedToken(); + } else { + for (j = 0; j < geom.length; j++) { + var ring = geom[j]; + for (k = 0; k < ring.length; k++) ring[k] = transformPoint(ring[k], extent, z2, tx, ty); } } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 2), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; } - function scanOctalLiteral(prefix, start) { - var number, octal; + tile.transformed = true; - if (isOctalDigit(prefix)) { - octal = true; - number = '0' + source[index++]; - } else { - octal = false; - ++index; - number = ''; - } + return tile; +} - while (index < length) { - if (!isOctalDigit(source[index])) { - break; - } - number += source[index++]; - } +function transformPoint(p, extent, z2, tx, ty) { + var x = Math.round(extent * (p[0] * z2 - tx)), + y = Math.round(extent * (p[1] * z2 - ty)); + return [x, y]; +} - if (!octal && number.length === 0) { - // only 0o or 0O - throwUnexpectedToken(); - } +function toID(z, x, y) { + return (((1 << z) * y + x) * 32) + z; +} - if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { - throwUnexpectedToken(); - } +function intersectX(a, b, x) { + return [x, (x - a[0]) * (b[1] - a[1]) / (b[0] - a[0]) + a[1], 1]; +} +function intersectY(a, b, y) { + return [(y - a[1]) * (b[0] - a[0]) / (b[1] - a[1]) + a[0], y, 1]; +} - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } +function extend(dest, src) { + for (var i in src) dest[i] = src[i]; + return dest; +} - function isImplicitOctalLiteral() { - var i, ch; +// checks whether a tile is a whole-area fill after clipping; if it is, there's no sense slicing it further +function isClippedSquare(tile, extent, buffer) { - // Implicit octal, unless there is a non-octal digit. - // (Annex B.1.1 on Numeric Literals) - for (i = index + 1; i < length; ++i) { - ch = source[i]; - if (ch === '8' || ch === '9') { - return false; - } - if (!isOctalDigit(ch)) { - return true; - } - } + var features = tile.source; + if (features.length !== 1) return false; - return true; + var feature = features[0]; + if (feature.type !== 3 || feature.geometry.length > 1) return false; + + var len = feature.geometry[0].length; + if (len !== 5) return false; + + for (var i = 0; i < len; i++) { + var p = transformPoint(feature.geometry[0][i], extent, tile.z2, tile.x, tile.y); + if ((p[0] !== -buffer && p[0] !== extent + buffer) || + (p[1] !== -buffer && p[1] !== extent + buffer)) return false; } - function scanNumericLiteral() { - var number, start, ch; + return true; +} - ch = source[index]; - assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); +},{"./clip":136,"./convert":137,"./tile":140,"./wrap":141}],139:[function(_dereq_,module,exports){ +'use strict'; - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; +module.exports = simplify; - // Hex number starts with '0x'. - // Octal number starts with '0'. - // Octal number in ES6 starts with '0o'. - // Binary number in ES6 starts with '0b'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - ++index; - return scanHexLiteral(start); - } - if (ch === 'b' || ch === 'B') { - ++index; - return scanBinaryLiteral(start); - } - if (ch === 'o' || ch === 'O') { - return scanOctalLiteral(ch, start); - } +// calculate simplification data using optimized Douglas-Peucker algorithm - if (isOctalDigit(ch)) { - if (isImplicitOctalLiteral()) { - return scanOctalLiteral(ch, start); - } - } - } +function simplify(points, tolerance) { - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } + var sqTolerance = tolerance * tolerance, + len = points.length, + first = 0, + last = len - 1, + stack = [], + i, maxSqDist, sqDist, index; - if (ch === '.') { - number += source[index++]; - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } + // always retain the endpoints (1 is the max value) + points[first][2] = 1; + points[last][2] = 1; - if (ch === 'e' || ch === 'E') { - number += source[index++]; + // avoid recursion by using a stack + while (last) { - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - if (isDecimalDigit(source.charCodeAt(index))) { - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - } else { - throwUnexpectedToken(); + maxSqDist = 0; + + for (i = first + 1; i < last; i++) { + sqDist = getSqSegDist(points[i], points[first], points[last]); + + if (sqDist > maxSqDist) { + index = i; + maxSqDist = sqDist; } } - if (isIdentifierStart(source.charCodeAt(index))) { - throwUnexpectedToken(); - } + if (maxSqDist > sqTolerance) { + points[index][2] = maxSqDist; // save the point importance in squared pixels as a z coordinate + stack.push(first); + stack.push(index); + first = index; - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; + } else { + last = stack.pop(); + first = stack.pop(); + } } +} - // ECMA-262 11.8.4 String Literals +// square distance from a point to a segment +function getSqSegDist(p, a, b) { - function scanStringLiteral() { - var str = '', quote, start, ch, unescaped, octToDec, octal = false; + var x = a[0], y = a[1], + bx = b[0], by = b[1], + px = p[0], py = p[1], + dx = bx - x, + dy = by - y; - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); + if (dx !== 0 || dy !== 0) { - start = index; - ++index; + var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy); - while (index < length) { - ch = source[index++]; + if (t > 1) { + x = bx; + y = by; - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!ch || !isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - str += scanUnicodeCodePointEscape(); - } else { - unescaped = scanHexEscape(ch); - if (!unescaped) { - throw throwUnexpectedToken(); - } - str += unescaped; - } - break; - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - case '8': - case '9': - str += ch; - tolerateUnexpectedToken(); - break; + } else if (t > 0) { + x += dx * t; + y += dy * t; + } + } - default: - if (isOctalDigit(ch)) { - octToDec = octalToDecimal(ch); + dx = px - x; + dy = py - y; - octal = octToDec.octal || octal; - str += String.fromCharCode(octToDec.code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - break; - } else { - str += ch; - } - } + return dx * dx + dy * dy; +} - if (quote !== '') { - throwUnexpectedToken(); - } +},{}],140:[function(_dereq_,module,exports){ +'use strict'; - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: startLineNumber, - lineStart: startLineStart, - start: start, - end: index - }; +module.exports = createTile; + +function createTile(features, z2, tx, ty, tolerance, noSimplify) { + var tile = { + features: [], + numPoints: 0, + numSimplified: 0, + numFeatures: 0, + source: null, + x: tx, + y: ty, + z2: z2, + transformed: false, + min: [2, 1], + max: [-1, 0] + }; + for (var i = 0; i < features.length; i++) { + tile.numFeatures++; + addFeature(tile, features[i], tolerance, noSimplify); + + var min = features[i].min, + max = features[i].max; + + if (min[0] < tile.min[0]) tile.min[0] = min[0]; + if (min[1] < tile.min[1]) tile.min[1] = min[1]; + if (max[0] > tile.max[0]) tile.max[0] = max[0]; + if (max[1] > tile.max[1]) tile.max[1] = max[1]; } + return tile; +} - // ECMA-262 11.8.6 Template Literal Lexical Components +function addFeature(tile, feature, tolerance, noSimplify) { - function scanTemplate() { - var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped; + var geom = feature.geometry, + type = feature.type, + simplified = [], + sqTolerance = tolerance * tolerance, + i, j, ring, p; - terminated = false; - tail = false; - start = index; - head = (source[index] === '`'); - rawOffset = 2; + if (type === 1) { + for (i = 0; i < geom.length; i++) { + simplified.push(geom[i]); + tile.numPoints++; + tile.numSimplified++; + } - ++index; + } else { - while (index < length) { - ch = source[index++]; - if (ch === '`') { - rawOffset = 1; - tail = true; - terminated = true; - break; - } else if (ch === '$') { - if (source[index] === '{') { - state.curlyStack.push('${'); - ++index; - terminated = true; - break; - } - cooked += ch; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'n': - cooked += '\n'; - break; - case 'r': - cooked += '\r'; - break; - case 't': - cooked += '\t'; - break; - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - cooked += scanUnicodeCodePointEscape(); - } else { - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - cooked += unescaped; - } else { - index = restore; - cooked += ch; - } - } - break; - case 'b': - cooked += '\b'; - break; - case 'f': - cooked += '\f'; - break; - case 'v': - cooked += '\v'; - break; + // simplify and transform projected coordinates for tile geometry + for (i = 0; i < geom.length; i++) { + ring = geom[i]; - default: - if (ch === '0') { - if (isDecimalDigit(source.charCodeAt(index))) { - // Illegal: \01 \02 and so on - throwError(Messages.TemplateOctalLiteral); - } - cooked += '\0'; - } else if (isOctalDigit(ch)) { - // Illegal: \1 \2 - throwError(Messages.TemplateOctalLiteral); - } else { - cooked += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - cooked += '\n'; - } else { - cooked += ch; + // filter out tiny polylines & polygons + if (!noSimplify && ((type === 2 && ring.dist < tolerance) || + (type === 3 && ring.area < sqTolerance))) { + tile.numPoints += ring.length; + continue; } - } - if (!terminated) { - throwUnexpectedToken(); - } + var simplifiedRing = []; - if (!head) { - state.curlyStack.pop(); - } + for (j = 0; j < ring.length; j++) { + p = ring[j]; + // keep points with importance > tolerance + if (noSimplify || p[2] > sqTolerance) { + simplifiedRing.push(p); + tile.numSimplified++; + } + tile.numPoints++; + } - return { - type: Token.Template, - value: { - cooked: cooked, - raw: source.slice(start + 1, index - rawOffset) - }, - head: head, - tail: tail, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; + simplified.push(simplifiedRing); + } } - // ECMA-262 11.8.5 Regular Expression Literals - - function testRegExp(pattern, flags) { - // The BMP character to use as a replacement for astral symbols when - // translating an ES6 "u"-flagged pattern to an ES5-compatible - // approximation. - // Note: replacing with '\uFFFF' enables false positives in unlikely - // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid - // pattern that would not be detected by this substitution. - var astralSubstitute = '\uFFFF', - tmp = pattern; + if (simplified.length) { + tile.features.push({ + geometry: simplified, + type: type, + tags: feature.tags || null + }); + } +} - if (flags.indexOf('u') >= 0) { - tmp = tmp - // Replace every Unicode escape sequence with the equivalent - // BMP character or a constant ASCII code point in the case of - // astral symbols. (See the above note on `astralSubstitute` - // for more information.) - .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { - var codePoint = parseInt($1 || $2, 16); - if (codePoint > 0x10FFFF) { - throwUnexpectedToken(null, Messages.InvalidRegExp); - } - if (codePoint <= 0xFFFF) { - return String.fromCharCode(codePoint); - } - return astralSubstitute; - }) - // Replace each paired surrogate with a single ASCII symbol to - // avoid throwing on regular expressions that are only valid in - // combination with the "u" flag. - .replace( - /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - astralSubstitute - ); - } +},{}],141:[function(_dereq_,module,exports){ +'use strict'; - // First, detect invalid regular expressions. - try { - RegExp(tmp); - } catch (e) { - throwUnexpectedToken(null, Messages.InvalidRegExp); - } +var clip = _dereq_('./clip'); - // Return a regular expression object for this pattern-flag pair, or - // `null` in case the current environment doesn't support the flags it - // uses. - try { - return new RegExp(pattern, flags); - } catch (exception) { - return null; - } - } +module.exports = wrap; - function scanRegExpBody() { - var ch, str, classMarker, terminated, body; +function wrap(features, buffer, intersectX) { + var merged = features, + left = clip(features, 1, -1 - buffer, buffer, 0, intersectX, -1, 2), // left world copy + right = clip(features, 1, 1 - buffer, 2 + buffer, 0, intersectX, -1, 2); // right world copy - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; + if (left || right) { + merged = clip(features, 1, -buffer, 1 + buffer, 0, intersectX, -1, 2); // center world copy - classMarker = false; - terminated = false; - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch.charCodeAt(0))) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } - str += ch; - } else if (isLineTerminator(ch.charCodeAt(0))) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } - } - } + if (left) merged = shiftFeatureCoords(left, 1).concat(merged); // merge left into center + if (right) merged = merged.concat(shiftFeatureCoords(right, -1)); // merge right into center + } - if (!terminated) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } + return merged; +} - // Exclude leading and trailing slash. - body = str.substr(1, str.length - 2); - return { - value: body, - literal: str - }; - } +function shiftFeatureCoords(features, offset) { + var newFeatures = []; - function scanRegExpFlags() { - var ch, str, flags, restore; + for (var i = 0; i < features.length; i++) { + var feature = features[i], + type = feature.type; - str = ''; - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch.charCodeAt(0))) { - break; - } + var newGeometry; - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - for (str += '\\u'; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - tolerateUnexpectedToken(); - } else { - str += '\\'; - tolerateUnexpectedToken(); - } - } else { - flags += ch; - str += ch; + if (type === 1) { + newGeometry = shiftCoords(feature.geometry, offset); + } else { + newGeometry = []; + for (var j = 0; j < feature.geometry.length; j++) { + newGeometry.push(shiftCoords(feature.geometry[j], offset)); } } - return { - value: flags, - literal: str - }; + newFeatures.push({ + geometry: newGeometry, + type: type, + tags: feature.tags, + min: [feature.min[0] + offset, feature.min[1]], + max: [feature.max[0] + offset, feature.max[1]] + }); } - function scanRegExp() { - var start, body, flags, value; - scanning = true; - - lookahead = null; - skipComment(); - start = index; + return newFeatures; +} - body = scanRegExpBody(); - flags = scanRegExpFlags(); - value = testRegExp(body.value, flags.value); - scanning = false; - if (extra.tokenize) { - return { - type: Token.RegularExpression, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } +function shiftCoords(points, offset) { + var newPoints = []; + newPoints.area = points.area; + newPoints.dist = points.dist; - return { - literal: body.literal + flags.literal, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - start: start, - end: index - }; + for (var i = 0; i < points.length; i++) { + newPoints.push([points[i][0] + offset, points[i][1], points[i][2]]); } + return newPoints; +} - function collectRegex() { - var pos, loc, regex, token; +},{"./clip":136}],142:[function(_dereq_,module,exports){ +/** + * @fileoverview gl-matrix - High performance matrix and vector operations + * @author Brandon Jones + * @author Colin MacKenzie IV + * @version 2.2.1 + */ - skipComment(); +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - regex = scanRegExp(); + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - loc.end = { - line: lineNumber, - column: index - lineStart - }; +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* istanbul ignore next */ - if (!extra.tokenize) { - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - regex: regex.regex, - range: [pos, index], - loc: loc - }); - } +(function(_global) { + "use strict"; - return regex; + var shim = {}; + if (typeof(exports) === 'undefined') { + if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + shim.exports = {}; + define(function() { + return shim.exports; + }); + } else { + // gl-matrix lives in a browser, define its namespaces in global + shim.exports = typeof(window) !== 'undefined' ? window : _global; } + } + else { + // gl-matrix lives in commonjs, define its namespaces in exports + shim.exports = exports; + } - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } + (function(exports) { + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - // Using the following algorithm: - // https://github.com/mozilla/sweet.js/wiki/design +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - function advanceSlash() { - var regex, previous, check; + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - function testKeyword(value) { - return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z'); - } +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - previous = extra.tokenValues[extra.tokens.length - 1]; - regex = (previous !== null); - switch (previous) { - case 'this': - case ']': - regex = false; - break; +if(!GLMAT_EPSILON) { + var GLMAT_EPSILON = 0.000001; +} - case ')': - check = extra.tokenValues[extra.openParenToken - 1]; - regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with'); - break; +if(!GLMAT_ARRAY_TYPE) { + var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array; +} - case '}': - // Dividing a function by anything makes little sense, - // but we have to check for that. - regex = false; - if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) { - // Anonymous function, e.g. function(){} /42 - check = extra.tokenValues[extra.openCurlyToken - 4]; - regex = check ? (FnExprTokens.indexOf(check) < 0) : false; - } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) { - // Named function, e.g. function f(){} /42/ - check = extra.tokenValues[extra.openCurlyToken - 5]; - regex = check ? (FnExprTokens.indexOf(check) < 0) : true; - } - } +if(!GLMAT_RANDOM) { + var GLMAT_RANDOM = Math.random; +} - return regex ? collectRegex() : scanPunctuator(); - } +/** + * @class Common utilities + * @name glMatrix + */ +var glMatrix = {}; - function advance() { - var cp, token; +/** + * Sets the type of array used when creating new vectors and matricies + * + * @param {Type} type Array type, such as Float32Array or Array + */ +glMatrix.setMatrixArrayType = function(type) { + GLMAT_ARRAY_TYPE = type; +} - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - start: index, - end: index - }; - } +if(typeof(exports) !== 'undefined') { + exports.glMatrix = glMatrix; +} - cp = source.charCodeAt(index); +var degree = Math.PI / 180; - if (isIdentifierStart(cp)) { - token = scanIdentifier(); - if (strict && isStrictModeReservedWord(token.value)) { - token.type = Token.Keyword; - } - return token; - } - - // Very common: ( and ) and ; - if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { - return scanPunctuator(); - } +/** +* Convert Degree To Radian +* +* @param {Number} Angle in Degrees +*/ +glMatrix.toRadian = function(a){ + return a * degree; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - // String literal starts with single quote (U+0027) or double quote (U+0022). - if (cp === 0x27 || cp === 0x22) { - return scanStringLiteral(); - } +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - // Dot (.) U+002E can also start a floating-point number, hence the need - // to check the next character. - if (cp === 0x2E) { - if (isDecimalDigit(source.charCodeAt(index + 1))) { - return scanNumericLiteral(); - } - return scanPunctuator(); - } + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - if (isDecimalDigit(cp)) { - return scanNumericLiteral(); - } +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - // Slash (/) U+002F can also start a regex. - if (extra.tokenize && cp === 0x2F) { - return advanceSlash(); - } +/** + * @class 2 Dimensional Vector + * @name vec2 + */ - // Template literals start with ` (U+0060) for template head - // or } (U+007D) for template middle or template tail. - if (cp === 0x60 || (cp === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) { - return scanTemplate(); - } +var vec2 = {}; - // Possible identifier start in a surrogate pair. - if (cp >= 0xD800 && cp < 0xDFFF) { - cp = codePointAt(index); - if (isIdentifierStart(cp)) { - return scanIdentifier(); - } - } +/** + * Creates a new, empty vec2 + * + * @returns {vec2} a new 2D vector + */ +vec2.create = function() { + var out = new GLMAT_ARRAY_TYPE(2); + out[0] = 0; + out[1] = 0; + return out; +}; - return scanPunctuator(); - } +/** + * Creates a new vec2 initialized with values from an existing vector + * + * @param {vec2} a vector to clone + * @returns {vec2} a new 2D vector + */ +vec2.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(2); + out[0] = a[0]; + out[1] = a[1]; + return out; +}; - function collectToken() { - var loc, token, value, entry; +/** + * Creates a new vec2 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} a new 2D vector + */ +vec2.fromValues = function(x, y) { + var out = new GLMAT_ARRAY_TYPE(2); + out[0] = x; + out[1] = y; + return out; +}; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; +/** + * Copy the values from one vec2 to another + * + * @param {vec2} out the receiving vector + * @param {vec2} a the source vector + * @returns {vec2} out + */ +vec2.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + return out; +}; - token = advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; +/** + * Set the components of a vec2 to the given values + * + * @param {vec2} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} out + */ +vec2.set = function(out, x, y) { + out[0] = x; + out[1] = y; + return out; +}; - if (token.type !== Token.EOF) { - value = source.slice(token.start, token.end); - entry = { - type: TokenName[token.type], - value: value, - range: [token.start, token.end], - loc: loc - }; - if (token.regex) { - entry.regex = { - pattern: token.regex.pattern, - flags: token.regex.flags - }; - } - if (extra.tokenValues) { - extra.tokenValues.push((entry.type === 'Punctuator' || entry.type === 'Keyword') ? entry.value : null); - } - if (extra.tokenize) { - if (!extra.range) { - delete entry.range; - } - if (!extra.loc) { - delete entry.loc; - } - if (extra.delegate) { - entry = extra.delegate(entry); - } - } - extra.tokens.push(entry); - } +/** + * Adds two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.add = function(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + return out; +}; - return token; - } +/** + * Subtracts vector b from vector a + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.subtract = function(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + return out; +}; - function lex() { - var token; - scanning = true; +/** + * Alias for {@link vec2.subtract} + * @function + */ +vec2.sub = vec2.subtract; - lastIndex = index; - lastLineNumber = lineNumber; - lastLineStart = lineStart; +/** + * Multiplies two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.multiply = function(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + return out; +}; - skipComment(); +/** + * Alias for {@link vec2.multiply} + * @function + */ +vec2.mul = vec2.multiply; - token = lookahead; +/** + * Divides two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.divide = function(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + return out; +}; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; +/** + * Alias for {@link vec2.divide} + * @function + */ +vec2.div = vec2.divide; - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - scanning = false; - return token; - } +/** + * Returns the minimum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + return out; +}; - function peek() { - scanning = true; +/** + * Returns the maximum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ +vec2.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + return out; +}; - skipComment(); +/** + * Scales a vec2 by a scalar number + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec2} out + */ +vec2.scale = function(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + return out; +}; - lastIndex = index; - lastLineNumber = lineNumber; - lastLineStart = lineStart; +/** + * Adds two vec2's after scaling the second operand by a scalar value + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec2} out + */ +vec2.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + (b[0] * scale); + out[1] = a[1] + (b[1] * scale); + return out; +}; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; +/** + * Calculates the euclidian distance between two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} distance between a and b + */ +vec2.distance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1]; + return Math.sqrt(x*x + y*y); +}; - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - scanning = false; - } +/** + * Alias for {@link vec2.distance} + * @function + */ +vec2.dist = vec2.distance; - function Position() { - this.line = startLineNumber; - this.column = startIndex - startLineStart; - } +/** + * Calculates the squared euclidian distance between two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} squared distance between a and b + */ +vec2.squaredDistance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1]; + return x*x + y*y; +}; - function SourceLocation() { - this.start = new Position(); - this.end = null; - } +/** + * Alias for {@link vec2.squaredDistance} + * @function + */ +vec2.sqrDist = vec2.squaredDistance; - function WrappingSourceLocation(startToken) { - this.start = { - line: startToken.lineNumber, - column: startToken.start - startToken.lineStart - }; - this.end = null; - } +/** + * Calculates the length of a vec2 + * + * @param {vec2} a vector to calculate length of + * @returns {Number} length of a + */ +vec2.length = function (a) { + var x = a[0], + y = a[1]; + return Math.sqrt(x*x + y*y); +}; - function Node() { - if (extra.range) { - this.range = [startIndex, 0]; - } - if (extra.loc) { - this.loc = new SourceLocation(); - } - } +/** + * Alias for {@link vec2.length} + * @function + */ +vec2.len = vec2.length; - function WrappingNode(startToken) { - if (extra.range) { - this.range = [startToken.start, 0]; - } - if (extra.loc) { - this.loc = new WrappingSourceLocation(startToken); - } - } +/** + * Calculates the squared length of a vec2 + * + * @param {vec2} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +vec2.squaredLength = function (a) { + var x = a[0], + y = a[1]; + return x*x + y*y; +}; - WrappingNode.prototype = Node.prototype = { +/** + * Alias for {@link vec2.squaredLength} + * @function + */ +vec2.sqrLen = vec2.squaredLength; - processComment: function () { - var lastChild, - innerComments, - leadingComments, - trailingComments, - bottomRight = extra.bottomRightStack, - i, - comment, - last = bottomRight[bottomRight.length - 1]; +/** + * Negates the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to negate + * @returns {vec2} out + */ +vec2.negate = function(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + return out; +}; - if (this.type === Syntax.Program) { - if (this.body.length > 0) { - return; - } - } - /** - * patch innnerComments for properties empty block - * `function a() {/** comments **\/}` - */ +/** + * Normalize a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to normalize + * @returns {vec2} out + */ +vec2.normalize = function(out, a) { + var x = a[0], + y = a[1]; + var len = x*x + y*y; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + out[0] = a[0] * len; + out[1] = a[1] * len; + } + return out; +}; - if (this.type === Syntax.BlockStatement && this.body.length === 0) { - innerComments = []; - for (i = extra.leadingComments.length - 1; i >= 0; --i) { - comment = extra.leadingComments[i]; - if (this.range[1] >= comment.range[1]) { - innerComments.unshift(comment); - extra.leadingComments.splice(i, 1); - extra.trailingComments.splice(i, 1); - } - } - if (innerComments.length) { - this.innerComments = innerComments; - //bottomRight.push(this); - return; - } - } +/** + * Calculates the dot product of two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} dot product of a and b + */ +vec2.dot = function (a, b) { + return a[0] * b[0] + a[1] * b[1]; +}; - if (extra.trailingComments.length > 0) { - trailingComments = []; - for (i = extra.trailingComments.length - 1; i >= 0; --i) { - comment = extra.trailingComments[i]; - if (comment.range[0] >= this.range[1]) { - trailingComments.unshift(comment); - extra.trailingComments.splice(i, 1); - } - } - extra.trailingComments = []; - } else { - if (last && last.trailingComments && last.trailingComments[0].range[0] >= this.range[1]) { - trailingComments = last.trailingComments; - delete last.trailingComments; - } - } - - // Eating the stack. - while (last && last.range[0] >= this.range[0]) { - lastChild = bottomRight.pop(); - last = bottomRight[bottomRight.length - 1]; - } - - if (lastChild) { - if (lastChild.leadingComments) { - leadingComments = []; - for (i = lastChild.leadingComments.length - 1; i >= 0; --i) { - comment = lastChild.leadingComments[i]; - if (comment.range[1] <= this.range[0]) { - leadingComments.unshift(comment); - lastChild.leadingComments.splice(i, 1); - } - } - - if (!lastChild.leadingComments.length) { - lastChild.leadingComments = undefined; - } - } - } else if (extra.leadingComments.length > 0) { - leadingComments = []; - for (i = extra.leadingComments.length - 1; i >= 0; --i) { - comment = extra.leadingComments[i]; - if (comment.range[1] <= this.range[0]) { - leadingComments.unshift(comment); - extra.leadingComments.splice(i, 1); - } - } - } - - - if (leadingComments && leadingComments.length > 0) { - this.leadingComments = leadingComments; - } - if (trailingComments && trailingComments.length > 0) { - this.trailingComments = trailingComments; - } - - bottomRight.push(this); - }, - - finish: function () { - if (extra.range) { - this.range[1] = lastIndex; - } - if (extra.loc) { - this.loc.end = { - line: lastLineNumber, - column: lastIndex - lastLineStart - }; - if (extra.source) { - this.loc.source = extra.source; - } - } - - if (extra.attachComment) { - this.processComment(); - } - }, - - finishArrayExpression: function (elements) { - this.type = Syntax.ArrayExpression; - this.elements = elements; - this.finish(); - return this; - }, - - finishArrayPattern: function (elements) { - this.type = Syntax.ArrayPattern; - this.elements = elements; - this.finish(); - return this; - }, - - finishArrowFunctionExpression: function (params, defaults, body, expression) { - this.type = Syntax.ArrowFunctionExpression; - this.id = null; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = false; - this.expression = expression; - this.finish(); - return this; - }, - - finishAssignmentExpression: function (operator, left, right) { - this.type = Syntax.AssignmentExpression; - this.operator = operator; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishAssignmentPattern: function (left, right) { - this.type = Syntax.AssignmentPattern; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishBinaryExpression: function (operator, left, right) { - this.type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : Syntax.BinaryExpression; - this.operator = operator; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishBlockStatement: function (body) { - this.type = Syntax.BlockStatement; - this.body = body; - this.finish(); - return this; - }, - - finishBreakStatement: function (label) { - this.type = Syntax.BreakStatement; - this.label = label; - this.finish(); - return this; - }, - - finishCallExpression: function (callee, args) { - this.type = Syntax.CallExpression; - this.callee = callee; - this.arguments = args; - this.finish(); - return this; - }, - - finishCatchClause: function (param, body) { - this.type = Syntax.CatchClause; - this.param = param; - this.body = body; - this.finish(); - return this; - }, - - finishClassBody: function (body) { - this.type = Syntax.ClassBody; - this.body = body; - this.finish(); - return this; - }, - - finishClassDeclaration: function (id, superClass, body) { - this.type = Syntax.ClassDeclaration; - this.id = id; - this.superClass = superClass; - this.body = body; - this.finish(); - return this; - }, - - finishClassExpression: function (id, superClass, body) { - this.type = Syntax.ClassExpression; - this.id = id; - this.superClass = superClass; - this.body = body; - this.finish(); - return this; - }, - - finishConditionalExpression: function (test, consequent, alternate) { - this.type = Syntax.ConditionalExpression; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - this.finish(); - return this; - }, - - finishContinueStatement: function (label) { - this.type = Syntax.ContinueStatement; - this.label = label; - this.finish(); - return this; - }, - - finishDebuggerStatement: function () { - this.type = Syntax.DebuggerStatement; - this.finish(); - return this; - }, - - finishDoWhileStatement: function (body, test) { - this.type = Syntax.DoWhileStatement; - this.body = body; - this.test = test; - this.finish(); - return this; - }, - - finishEmptyStatement: function () { - this.type = Syntax.EmptyStatement; - this.finish(); - return this; - }, - - finishExpressionStatement: function (expression) { - this.type = Syntax.ExpressionStatement; - this.expression = expression; - this.finish(); - return this; - }, - - finishForStatement: function (init, test, update, body) { - this.type = Syntax.ForStatement; - this.init = init; - this.test = test; - this.update = update; - this.body = body; - this.finish(); - return this; - }, - - finishForOfStatement: function (left, right, body) { - this.type = Syntax.ForOfStatement; - this.left = left; - this.right = right; - this.body = body; - this.finish(); - return this; - }, - - finishForInStatement: function (left, right, body) { - this.type = Syntax.ForInStatement; - this.left = left; - this.right = right; - this.body = body; - this.each = false; - this.finish(); - return this; - }, - - finishFunctionDeclaration: function (id, params, defaults, body, generator) { - this.type = Syntax.FunctionDeclaration; - this.id = id; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = generator; - this.expression = false; - this.finish(); - return this; - }, - - finishFunctionExpression: function (id, params, defaults, body, generator) { - this.type = Syntax.FunctionExpression; - this.id = id; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = generator; - this.expression = false; - this.finish(); - return this; - }, - - finishIdentifier: function (name) { - this.type = Syntax.Identifier; - this.name = name; - this.finish(); - return this; - }, - - finishIfStatement: function (test, consequent, alternate) { - this.type = Syntax.IfStatement; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - this.finish(); - return this; - }, - - finishLabeledStatement: function (label, body) { - this.type = Syntax.LabeledStatement; - this.label = label; - this.body = body; - this.finish(); - return this; - }, - - finishLiteral: function (token) { - this.type = Syntax.Literal; - this.value = token.value; - this.raw = source.slice(token.start, token.end); - if (token.regex) { - this.regex = token.regex; - } - this.finish(); - return this; - }, - - finishMemberExpression: function (accessor, object, property) { - this.type = Syntax.MemberExpression; - this.computed = accessor === '['; - this.object = object; - this.property = property; - this.finish(); - return this; - }, - - finishMetaProperty: function (meta, property) { - this.type = Syntax.MetaProperty; - this.meta = meta; - this.property = property; - this.finish(); - return this; - }, - - finishNewExpression: function (callee, args) { - this.type = Syntax.NewExpression; - this.callee = callee; - this.arguments = args; - this.finish(); - return this; - }, - - finishObjectExpression: function (properties) { - this.type = Syntax.ObjectExpression; - this.properties = properties; - this.finish(); - return this; - }, - - finishObjectPattern: function (properties) { - this.type = Syntax.ObjectPattern; - this.properties = properties; - this.finish(); - return this; - }, - - finishPostfixExpression: function (operator, argument) { - this.type = Syntax.UpdateExpression; - this.operator = operator; - this.argument = argument; - this.prefix = false; - this.finish(); - return this; - }, - - finishProgram: function (body, sourceType) { - this.type = Syntax.Program; - this.body = body; - this.sourceType = sourceType; - this.finish(); - return this; - }, - - finishProperty: function (kind, key, computed, value, method, shorthand) { - this.type = Syntax.Property; - this.key = key; - this.computed = computed; - this.value = value; - this.kind = kind; - this.method = method; - this.shorthand = shorthand; - this.finish(); - return this; - }, - - finishRestElement: function (argument) { - this.type = Syntax.RestElement; - this.argument = argument; - this.finish(); - return this; - }, - - finishReturnStatement: function (argument) { - this.type = Syntax.ReturnStatement; - this.argument = argument; - this.finish(); - return this; - }, - - finishSequenceExpression: function (expressions) { - this.type = Syntax.SequenceExpression; - this.expressions = expressions; - this.finish(); - return this; - }, - - finishSpreadElement: function (argument) { - this.type = Syntax.SpreadElement; - this.argument = argument; - this.finish(); - return this; - }, - - finishSwitchCase: function (test, consequent) { - this.type = Syntax.SwitchCase; - this.test = test; - this.consequent = consequent; - this.finish(); - return this; - }, - - finishSuper: function () { - this.type = Syntax.Super; - this.finish(); - return this; - }, - - finishSwitchStatement: function (discriminant, cases) { - this.type = Syntax.SwitchStatement; - this.discriminant = discriminant; - this.cases = cases; - this.finish(); - return this; - }, - - finishTaggedTemplateExpression: function (tag, quasi) { - this.type = Syntax.TaggedTemplateExpression; - this.tag = tag; - this.quasi = quasi; - this.finish(); - return this; - }, - - finishTemplateElement: function (value, tail) { - this.type = Syntax.TemplateElement; - this.value = value; - this.tail = tail; - this.finish(); - return this; - }, - - finishTemplateLiteral: function (quasis, expressions) { - this.type = Syntax.TemplateLiteral; - this.quasis = quasis; - this.expressions = expressions; - this.finish(); - return this; - }, - - finishThisExpression: function () { - this.type = Syntax.ThisExpression; - this.finish(); - return this; - }, - - finishThrowStatement: function (argument) { - this.type = Syntax.ThrowStatement; - this.argument = argument; - this.finish(); - return this; - }, - - finishTryStatement: function (block, handler, finalizer) { - this.type = Syntax.TryStatement; - this.block = block; - this.guardedHandlers = []; - this.handlers = handler ? [handler] : []; - this.handler = handler; - this.finalizer = finalizer; - this.finish(); - return this; - }, - - finishUnaryExpression: function (operator, argument) { - this.type = (operator === '++' || operator === '--') ? Syntax.UpdateExpression : Syntax.UnaryExpression; - this.operator = operator; - this.argument = argument; - this.prefix = true; - this.finish(); - return this; - }, - - finishVariableDeclaration: function (declarations) { - this.type = Syntax.VariableDeclaration; - this.declarations = declarations; - this.kind = 'var'; - this.finish(); - return this; - }, - - finishLexicalDeclaration: function (declarations, kind) { - this.type = Syntax.VariableDeclaration; - this.declarations = declarations; - this.kind = kind; - this.finish(); - return this; - }, - - finishVariableDeclarator: function (id, init) { - this.type = Syntax.VariableDeclarator; - this.id = id; - this.init = init; - this.finish(); - return this; - }, - - finishWhileStatement: function (test, body) { - this.type = Syntax.WhileStatement; - this.test = test; - this.body = body; - this.finish(); - return this; - }, - - finishWithStatement: function (object, body) { - this.type = Syntax.WithStatement; - this.object = object; - this.body = body; - this.finish(); - return this; - }, - - finishExportSpecifier: function (local, exported) { - this.type = Syntax.ExportSpecifier; - this.exported = exported || local; - this.local = local; - this.finish(); - return this; - }, - - finishImportDefaultSpecifier: function (local) { - this.type = Syntax.ImportDefaultSpecifier; - this.local = local; - this.finish(); - return this; - }, - - finishImportNamespaceSpecifier: function (local) { - this.type = Syntax.ImportNamespaceSpecifier; - this.local = local; - this.finish(); - return this; - }, - - finishExportNamedDeclaration: function (declaration, specifiers, src) { - this.type = Syntax.ExportNamedDeclaration; - this.declaration = declaration; - this.specifiers = specifiers; - this.source = src; - this.finish(); - return this; - }, - - finishExportDefaultDeclaration: function (declaration) { - this.type = Syntax.ExportDefaultDeclaration; - this.declaration = declaration; - this.finish(); - return this; - }, - - finishExportAllDeclaration: function (src) { - this.type = Syntax.ExportAllDeclaration; - this.source = src; - this.finish(); - return this; - }, - - finishImportSpecifier: function (local, imported) { - this.type = Syntax.ImportSpecifier; - this.local = local || imported; - this.imported = imported; - this.finish(); - return this; - }, - - finishImportDeclaration: function (specifiers, src) { - this.type = Syntax.ImportDeclaration; - this.specifiers = specifiers; - this.source = src; - this.finish(); - return this; - }, - - finishYieldExpression: function (argument, delegate) { - this.type = Syntax.YieldExpression; - this.argument = argument; - this.delegate = delegate; - this.finish(); - return this; - } - }; - - - function recordError(error) { - var e, existing; - - for (e = 0; e < extra.errors.length; e++) { - existing = extra.errors[e]; - // Prevent duplicated error. - /* istanbul ignore next */ - if (existing.index === error.index && existing.message === error.message) { - return; - } - } - - extra.errors.push(error); - } - - function constructError(msg, column) { - var error = new Error(msg); - try { - throw error; - } catch (base) { - /* istanbul ignore else */ - if (Object.create && Object.defineProperty) { - error = Object.create(base); - Object.defineProperty(error, 'column', { value: column }); - } - } finally { - return error; - } - } - - function createError(line, pos, description) { - var msg, column, error; - - msg = 'Line ' + line + ': ' + description; - column = pos - (scanning ? lineStart : lastLineStart) + 1; - error = constructError(msg, column); - error.lineNumber = line; - error.description = description; - error.index = pos; - return error; - } - - // Throw an exception - - function throwError(messageFormat) { - var args, msg; - - args = Array.prototype.slice.call(arguments, 1); - msg = messageFormat.replace(/%(\d)/g, - function (whole, idx) { - assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - } - ); - - throw createError(lastLineNumber, lastIndex, msg); - } - - function tolerateError(messageFormat) { - var args, msg, error; - - args = Array.prototype.slice.call(arguments, 1); - /* istanbul ignore next */ - msg = messageFormat.replace(/%(\d)/g, - function (whole, idx) { - assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - } - ); - - error = createError(lineNumber, lastIndex, msg); - if (extra.errors) { - recordError(error); - } else { - throw error; - } - } - - // Throw an exception because of the token. +/** + * Computes the cross product of two vec2's + * Note that the cross product must by definition produce a 3D vector + * + * @param {vec3} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec3} out + */ +vec2.cross = function(out, a, b) { + var z = a[0] * b[1] - a[1] * b[0]; + out[0] = out[1] = 0; + out[2] = z; + return out; +}; - function unexpectedTokenError(token, message) { - var value, msg = message || Messages.UnexpectedToken; +/** + * Performs a linear interpolation between two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec2} out + */ +vec2.lerp = function (out, a, b, t) { + var ax = a[0], + ay = a[1]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + return out; +}; - if (token) { - if (!message) { - msg = (token.type === Token.EOF) ? Messages.UnexpectedEOS : - (token.type === Token.Identifier) ? Messages.UnexpectedIdentifier : - (token.type === Token.NumericLiteral) ? Messages.UnexpectedNumber : - (token.type === Token.StringLiteral) ? Messages.UnexpectedString : - (token.type === Token.Template) ? Messages.UnexpectedTemplate : - Messages.UnexpectedToken; +/** + * Generates a random vector with the given scale + * + * @param {vec2} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec2} out + */ +vec2.random = function (out, scale) { + scale = scale || 1.0; + var r = GLMAT_RANDOM() * 2.0 * Math.PI; + out[0] = Math.cos(r) * scale; + out[1] = Math.sin(r) * scale; + return out; +}; - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - msg = Messages.UnexpectedReserved; - } else if (strict && isStrictModeReservedWord(token.value)) { - msg = Messages.StrictReservedWord; - } - } - } +/** + * Transforms the vec2 with a mat2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat2} m matrix to transform with + * @returns {vec2} out + */ +vec2.transformMat2 = function(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y; + out[1] = m[1] * x + m[3] * y; + return out; +}; - value = (token.type === Token.Template) ? token.value.raw : token.value; - } else { - value = 'ILLEGAL'; - } +/** + * Transforms the vec2 with a mat2d + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat2d} m matrix to transform with + * @returns {vec2} out + */ +vec2.transformMat2d = function(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y + m[4]; + out[1] = m[1] * x + m[3] * y + m[5]; + return out; +}; - msg = msg.replace('%0', value); +/** + * Transforms the vec2 with a mat3 + * 3rd vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat3} m matrix to transform with + * @returns {vec2} out + */ +vec2.transformMat3 = function(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[3] * y + m[6]; + out[1] = m[1] * x + m[4] * y + m[7]; + return out; +}; - return (token && typeof token.lineNumber === 'number') ? - createError(token.lineNumber, token.start, msg) : - createError(scanning ? lineNumber : lastLineNumber, scanning ? index : lastIndex, msg); - } +/** + * Transforms the vec2 with a mat4 + * 3rd vector component is implicitly '0' + * 4th vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec2} out + */ +vec2.transformMat4 = function(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[4] * y + m[12]; + out[1] = m[1] * x + m[5] * y + m[13]; + return out; +}; - function throwUnexpectedToken(token, message) { - throw unexpectedTokenError(token, message); - } +/** + * Perform some operation over an array of vec2s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +vec2.forEach = (function() { + var vec = vec2.create(); - function tolerateUnexpectedToken(token, message) { - var error = unexpectedTokenError(token, message); - if (extra.errors) { - recordError(error); - } else { - throw error; + return function(a, stride, offset, count, fn, arg) { + var i, l; + if(!stride) { + stride = 2; } - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpectedToken(token); + if(!offset) { + offset = 0; } - } - - /** - * @name expectCommaSeparator - * @description Quietly expect a comma when in tolerant mode, otherwise delegates - * to expect(value) - * @since 2.0 - */ - function expectCommaSeparator() { - var token; - - if (extra.errors) { - token = lookahead; - if (token.type === Token.Punctuator && token.value === ',') { - lex(); - } else if (token.type === Token.Punctuator && token.value === ';') { - lex(); - tolerateUnexpectedToken(token); - } else { - tolerateUnexpectedToken(token, Messages.UnexpectedToken); - } + + if(count) { + l = Math.min((count * stride) + offset, a.length); } else { - expect(','); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpectedToken(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - return lookahead.type === Token.Punctuator && lookahead.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - return lookahead.type === Token.Keyword && lookahead.value === keyword; - } - - // Return true if the next token matches the specified contextual keyword - // (where an identifier is sometimes a keyword depending on the context) - - function matchContextualKeyword(keyword) { - return lookahead.type === Token.Identifier && lookahead.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var op; - - if (lookahead.type !== Token.Punctuator) { - return false; - } - op = lookahead.value; - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(startIndex) === 0x3B || match(';')) { - lex(); - return; + l = a.length; } - if (hasLineTerminator) { - return; + for(i = offset; i < l; i += stride) { + vec[0] = a[i]; vec[1] = a[i+1]; + fn(vec, vec, arg); + a[i] = vec[0]; a[i+1] = vec[1]; } + + return a; + }; +})(); - // FIXME(ikarienator): this is seemingly an issue in the previous location info convention. - lastIndex = startIndex; - lastLineNumber = startLineNumber; - lastLineStart = startLineStart; - - if (lookahead.type !== Token.EOF && !match('}')) { - throwUnexpectedToken(lookahead); - } - } +/** + * Returns a string representation of a vector + * + * @param {vec2} vec vector to represent as a string + * @returns {String} string representation of the vector + */ +vec2.str = function (a) { + return 'vec2(' + a[0] + ', ' + a[1] + ')'; +}; - // Cover grammar support. - // - // When an assignment expression position starts with an left parenthesis, the determination of the type - // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) - // or the first comma. This situation also defers the determination of all the expressions nested in the pair. - // - // There are three productions that can be parsed in a parentheses pair that needs to be determined - // after the outermost pair is closed. They are: - // - // 1. AssignmentExpression - // 2. BindingElements - // 3. AssignmentTargets - // - // In order to avoid exponential backtracking, we use two flags to denote if the production can be - // binding element or assignment target. - // - // The three productions have the relationship: - // - // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression - // - // with a single exception that CoverInitializedName when used directly in an Expression, generates - // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the - // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. - // - // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not - // effect the current flags. This means the production the parser parses is only used as an expression. Therefore - // the CoverInitializedName check is conducted. - // - // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates - // the flags outside of the parser. This means the production the parser parses is used as a part of a potential - // pattern. The CoverInitializedName check is deferred. - function isolateCoverGrammar(parser) { - var oldIsBindingElement = isBindingElement, - oldIsAssignmentTarget = isAssignmentTarget, - oldFirstCoverInitializedNameError = firstCoverInitializedNameError, - result; - isBindingElement = true; - isAssignmentTarget = true; - firstCoverInitializedNameError = null; - result = parser(); - if (firstCoverInitializedNameError !== null) { - throwUnexpectedToken(firstCoverInitializedNameError); - } - isBindingElement = oldIsBindingElement; - isAssignmentTarget = oldIsAssignmentTarget; - firstCoverInitializedNameError = oldFirstCoverInitializedNameError; - return result; - } +if(typeof(exports) !== 'undefined') { + exports.vec2 = vec2; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - function inheritCoverGrammar(parser) { - var oldIsBindingElement = isBindingElement, - oldIsAssignmentTarget = isAssignmentTarget, - oldFirstCoverInitializedNameError = firstCoverInitializedNameError, - result; - isBindingElement = true; - isAssignmentTarget = true; - firstCoverInitializedNameError = null; - result = parser(); - isBindingElement = isBindingElement && oldIsBindingElement; - isAssignmentTarget = isAssignmentTarget && oldIsAssignmentTarget; - firstCoverInitializedNameError = oldFirstCoverInitializedNameError || firstCoverInitializedNameError; - return result; - } +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - // ECMA-262 13.3.3 Destructuring Binding Patterns + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - function parseArrayPattern(params, kind) { - var node = new Node(), elements = [], rest, restNode; - expect('['); +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - if (match('...')) { - restNode = new Node(); - lex(); - params.push(lookahead); - rest = parseVariableIdentifier(kind); - elements.push(restNode.finishRestElement(rest)); - break; - } else { - elements.push(parsePatternWithDefault(params, kind)); - } - if (!match(']')) { - expect(','); - } - } +/** + * @class 3 Dimensional Vector + * @name vec3 + */ - } +var vec3 = {}; - expect(']'); +/** + * Creates a new, empty vec3 + * + * @returns {vec3} a new 3D vector + */ +vec3.create = function() { + var out = new GLMAT_ARRAY_TYPE(3); + out[0] = 0; + out[1] = 0; + out[2] = 0; + return out; +}; - return node.finishArrayPattern(elements); - } +/** + * Creates a new vec3 initialized with values from an existing vector + * + * @param {vec3} a vector to clone + * @returns {vec3} a new 3D vector + */ +vec3.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(3); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; +}; - function parsePropertyPattern(params, kind) { - var node = new Node(), key, keyToken, computed = match('['), init; - if (lookahead.type === Token.Identifier) { - keyToken = lookahead; - key = parseVariableIdentifier(); - if (match('=')) { - params.push(keyToken); - lex(); - init = parseAssignmentExpression(); +/** + * Creates a new vec3 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} a new 3D vector + */ +vec3.fromValues = function(x, y, z) { + var out = new GLMAT_ARRAY_TYPE(3); + out[0] = x; + out[1] = y; + out[2] = z; + return out; +}; - return node.finishProperty( - 'init', key, false, - new WrappingNode(keyToken).finishAssignmentPattern(key, init), false, false); - } else if (!match(':')) { - params.push(keyToken); - return node.finishProperty('init', key, false, key, false, true); - } - } else { - key = parseObjectPropertyKey(); - } - expect(':'); - init = parsePatternWithDefault(params, kind); - return node.finishProperty('init', key, computed, init, false, false); - } +/** + * Copy the values from one vec3 to another + * + * @param {vec3} out the receiving vector + * @param {vec3} a the source vector + * @returns {vec3} out + */ +vec3.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; +}; - function parseObjectPattern(params, kind) { - var node = new Node(), properties = []; +/** + * Set the components of a vec3 to the given values + * + * @param {vec3} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} out + */ +vec3.set = function(out, x, y, z) { + out[0] = x; + out[1] = y; + out[2] = z; + return out; +}; - expect('{'); +/** + * Adds two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.add = function(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + return out; +}; - while (!match('}')) { - properties.push(parsePropertyPattern(params, kind)); - if (!match('}')) { - expect(','); - } - } +/** + * Subtracts vector b from vector a + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.subtract = function(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + return out; +}; - lex(); +/** + * Alias for {@link vec3.subtract} + * @function + */ +vec3.sub = vec3.subtract; - return node.finishObjectPattern(properties); - } +/** + * Multiplies two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.multiply = function(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + return out; +}; - function parsePattern(params, kind) { - if (match('[')) { - return parseArrayPattern(params, kind); - } else if (match('{')) { - return parseObjectPattern(params, kind); - } else if (matchKeyword('let')) { - if (kind === 'const' || kind === 'let') { - tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken); - } - } +/** + * Alias for {@link vec3.multiply} + * @function + */ +vec3.mul = vec3.multiply; - params.push(lookahead); - return parseVariableIdentifier(kind); - } +/** + * Divides two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.divide = function(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + return out; +}; - function parsePatternWithDefault(params, kind) { - var startToken = lookahead, pattern, previousAllowYield, right; - pattern = parsePattern(params, kind); - if (match('=')) { - lex(); - previousAllowYield = state.allowYield; - state.allowYield = true; - right = isolateCoverGrammar(parseAssignmentExpression); - state.allowYield = previousAllowYield; - pattern = new WrappingNode(startToken).finishAssignmentPattern(pattern, right); - } - return pattern; - } +/** + * Alias for {@link vec3.divide} + * @function + */ +vec3.div = vec3.divide; - // ECMA-262 12.2.5 Array Initializer +/** + * Returns the minimum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + return out; +}; - function parseArrayInitializer() { - var elements = [], node = new Node(), restSpread; +/** + * Returns the maximum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + return out; +}; - expect('['); +/** + * Scales a vec3 by a scalar number + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec3} out + */ +vec3.scale = function(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + return out; +}; - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else if (match('...')) { - restSpread = new Node(); - lex(); - restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression)); +/** + * Adds two vec3's after scaling the second operand by a scalar value + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec3} out + */ +vec3.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + (b[0] * scale); + out[1] = a[1] + (b[1] * scale); + out[2] = a[2] + (b[2] * scale); + return out; +}; - if (!match(']')) { - isAssignmentTarget = isBindingElement = false; - expect(','); - } - elements.push(restSpread); - } else { - elements.push(inheritCoverGrammar(parseAssignmentExpression)); +/** + * Calculates the euclidian distance between two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} distance between a and b + */ +vec3.distance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1], + z = b[2] - a[2]; + return Math.sqrt(x*x + y*y + z*z); +}; - if (!match(']')) { - expect(','); - } - } - } +/** + * Alias for {@link vec3.distance} + * @function + */ +vec3.dist = vec3.distance; - lex(); +/** + * Calculates the squared euclidian distance between two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} squared distance between a and b + */ +vec3.squaredDistance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1], + z = b[2] - a[2]; + return x*x + y*y + z*z; +}; - return node.finishArrayExpression(elements); - } +/** + * Alias for {@link vec3.squaredDistance} + * @function + */ +vec3.sqrDist = vec3.squaredDistance; - // ECMA-262 12.2.6 Object Initializer +/** + * Calculates the length of a vec3 + * + * @param {vec3} a vector to calculate length of + * @returns {Number} length of a + */ +vec3.length = function (a) { + var x = a[0], + y = a[1], + z = a[2]; + return Math.sqrt(x*x + y*y + z*z); +}; - function parsePropertyFunction(node, paramInfo, isGenerator) { - var previousStrict, body; +/** + * Alias for {@link vec3.length} + * @function + */ +vec3.len = vec3.length; - isAssignmentTarget = isBindingElement = false; +/** + * Calculates the squared length of a vec3 + * + * @param {vec3} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +vec3.squaredLength = function (a) { + var x = a[0], + y = a[1], + z = a[2]; + return x*x + y*y + z*z; +}; - previousStrict = strict; - body = isolateCoverGrammar(parseFunctionSourceElements); +/** + * Alias for {@link vec3.squaredLength} + * @function + */ +vec3.sqrLen = vec3.squaredLength; - if (strict && paramInfo.firstRestricted) { - tolerateUnexpectedToken(paramInfo.firstRestricted, paramInfo.message); - } - if (strict && paramInfo.stricted) { - tolerateUnexpectedToken(paramInfo.stricted, paramInfo.message); - } +/** + * Negates the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to negate + * @returns {vec3} out + */ +vec3.negate = function(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + return out; +}; - strict = previousStrict; - return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body, isGenerator); +/** + * Normalize a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to normalize + * @returns {vec3} out + */ +vec3.normalize = function(out, a) { + var x = a[0], + y = a[1], + z = a[2]; + var len = x*x + y*y + z*z; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + out[0] = a[0] * len; + out[1] = a[1] * len; + out[2] = a[2] * len; } + return out; +}; - function parsePropertyMethodFunction() { - var params, method, node = new Node(), - previousAllowYield = state.allowYield; - - state.allowYield = false; - params = parseParams(); - state.allowYield = previousAllowYield; - - state.allowYield = false; - method = parsePropertyFunction(node, params, false); - state.allowYield = previousAllowYield; - - return method; - } +/** + * Calculates the dot product of two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} dot product of a and b + */ +vec3.dot = function (a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; +}; - function parseObjectPropertyKey() { - var token, node = new Node(), expr; +/** + * Computes the cross product of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ +vec3.cross = function(out, a, b) { + var ax = a[0], ay = a[1], az = a[2], + bx = b[0], by = b[1], bz = b[2]; - token = lex(); + out[0] = ay * bz - az * by; + out[1] = az * bx - ax * bz; + out[2] = ax * by - ay * bx; + return out; +}; - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. +/** + * Performs a linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec3} out + */ +vec3.lerp = function (out, a, b, t) { + var ax = a[0], + ay = a[1], + az = a[2]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + return out; +}; - switch (token.type) { - case Token.StringLiteral: - case Token.NumericLiteral: - if (strict && token.octal) { - tolerateUnexpectedToken(token, Messages.StrictOctalLiteral); - } - return node.finishLiteral(token); - case Token.Identifier: - case Token.BooleanLiteral: - case Token.NullLiteral: - case Token.Keyword: - return node.finishIdentifier(token.value); - case Token.Punctuator: - if (token.value === '[') { - expr = isolateCoverGrammar(parseAssignmentExpression); - expect(']'); - return expr; - } - break; - } - throwUnexpectedToken(token); - } +/** + * Generates a random vector with the given scale + * + * @param {vec3} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec3} out + */ +vec3.random = function (out, scale) { + scale = scale || 1.0; - function lookaheadPropertyName() { - switch (lookahead.type) { - case Token.Identifier: - case Token.StringLiteral: - case Token.BooleanLiteral: - case Token.NullLiteral: - case Token.NumericLiteral: - case Token.Keyword: - return true; - case Token.Punctuator: - return lookahead.value === '['; - } - return false; - } + var r = GLMAT_RANDOM() * 2.0 * Math.PI; + var z = (GLMAT_RANDOM() * 2.0) - 1.0; + var zScale = Math.sqrt(1.0-z*z) * scale; - // This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals, - // it might be called at a position where there is in fact a short hand identifier pattern or a data property. - // This can only be determined after we consumed up to the left parentheses. - // - // In order to avoid back tracking, it returns `null` if the position is not a MethodDefinition and the caller - // is responsible to visit other options. - function tryParseMethodDefinition(token, key, computed, node) { - var value, options, methodNode, params, - previousAllowYield = state.allowYield; + out[0] = Math.cos(r) * zScale; + out[1] = Math.sin(r) * zScale; + out[2] = z * scale; + return out; +}; - if (token.type === Token.Identifier) { - // check for `get` and `set`; +/** + * Transforms the vec3 with a mat4. + * 4th vector component is implicitly '1' + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec3} out + */ +vec3.transformMat4 = function(out, a, m) { + var x = a[0], y = a[1], z = a[2]; + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12]; + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13]; + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14]; + return out; +}; - if (token.value === 'get' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); - expect('('); - expect(')'); +/** + * Transforms the vec3 with a mat3. + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {mat4} m the 3x3 matrix to transform with + * @returns {vec3} out + */ +vec3.transformMat3 = function(out, a, m) { + var x = a[0], y = a[1], z = a[2]; + out[0] = x * m[0] + y * m[3] + z * m[6]; + out[1] = x * m[1] + y * m[4] + z * m[7]; + out[2] = x * m[2] + y * m[5] + z * m[8]; + return out; +}; - state.allowYield = false; - value = parsePropertyFunction(methodNode, { - params: [], - defaults: [], - stricted: null, - firstRestricted: null, - message: null - }, false); - state.allowYield = previousAllowYield; +/** + * Transforms the vec3 with a quat + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {quat} q quaternion to transform with + * @returns {vec3} out + */ +vec3.transformQuat = function(out, a, q) { + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations - return node.finishProperty('get', key, computed, value, false, false); - } else if (token.value === 'set' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); - expect('('); + var x = a[0], y = a[1], z = a[2], + qx = q[0], qy = q[1], qz = q[2], qw = q[3], - options = { - params: [], - defaultCount: 0, - defaults: [], - firstRestricted: null, - paramSet: {} - }; - if (match(')')) { - tolerateUnexpectedToken(lookahead); - } else { - state.allowYield = false; - parseParam(options); - state.allowYield = previousAllowYield; - if (options.defaultCount === 0) { - options.defaults = []; - } - } - expect(')'); + // calculate quat * vec + ix = qw * x + qy * z - qz * y, + iy = qw * y + qz * x - qx * z, + iz = qw * z + qx * y - qy * x, + iw = -qx * x - qy * y - qz * z; - state.allowYield = false; - value = parsePropertyFunction(methodNode, options, false); - state.allowYield = previousAllowYield; + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; + return out; +}; - return node.finishProperty('set', key, computed, value, false, false); - } - } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); +/* +* Rotate a 3D vector around the x-axis +* @param {vec3} out The receiving vec3 +* @param {vec3} a The vec3 point to rotate +* @param {vec3} b The origin of the rotation +* @param {Number} c The angle of rotation +* @returns {vec3} out +*/ +vec3.rotateX = function(out, a, b, c){ + var p = [], r=[]; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; - state.allowYield = true; - params = parseParams(); - state.allowYield = previousAllowYield; + //perform rotation + r[0] = p[0]; + r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c); + r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c); - state.allowYield = false; - value = parsePropertyFunction(methodNode, params, true); - state.allowYield = previousAllowYield; + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; - return node.finishProperty('init', key, computed, value, true, false); - } + return out; +}; - if (key && match('(')) { - value = parsePropertyMethodFunction(); - return node.finishProperty('init', key, computed, value, true, false); - } +/* +* Rotate a 3D vector around the y-axis +* @param {vec3} out The receiving vec3 +* @param {vec3} a The vec3 point to rotate +* @param {vec3} b The origin of the rotation +* @param {Number} c The angle of rotation +* @returns {vec3} out +*/ +vec3.rotateY = function(out, a, b, c){ + var p = [], r=[]; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + + //perform rotation + r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c); + r[1] = p[1]; + r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c); + + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + + return out; +}; - // Not a MethodDefinition. - return null; - } +/* +* Rotate a 3D vector around the z-axis +* @param {vec3} out The receiving vec3 +* @param {vec3} a The vec3 point to rotate +* @param {vec3} b The origin of the rotation +* @param {Number} c The angle of rotation +* @returns {vec3} out +*/ +vec3.rotateZ = function(out, a, b, c){ + var p = [], r=[]; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + + //perform rotation + r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c); + r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c); + r[2] = p[2]; + + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + + return out; +}; - function parseObjectProperty(hasProto) { - var token = lookahead, node = new Node(), computed, key, maybeMethod, proto, value; +/** + * Perform some operation over an array of vec3s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +vec3.forEach = (function() { + var vec = vec3.create(); - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - } - maybeMethod = tryParseMethodDefinition(token, key, computed, node); - if (maybeMethod) { - return maybeMethod; + return function(a, stride, offset, count, fn, arg) { + var i, l; + if(!stride) { + stride = 3; } - if (!key) { - throwUnexpectedToken(lookahead); + if(!offset) { + offset = 0; } - - // Check for duplicated __proto__ - if (!computed) { - proto = (key.type === Syntax.Identifier && key.name === '__proto__') || - (key.type === Syntax.Literal && key.value === '__proto__'); - if (hasProto.value && proto) { - tolerateError(Messages.DuplicateProtoProperty); - } - hasProto.value |= proto; + + if(count) { + l = Math.min((count * stride) + offset, a.length); + } else { + l = a.length; } - if (match(':')) { - lex(); - value = inheritCoverGrammar(parseAssignmentExpression); - return node.finishProperty('init', key, computed, value, false, false); + for(i = offset; i < l; i += stride) { + vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; + fn(vec, vec, arg); + a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; } + + return a; + }; +})(); - if (token.type === Token.Identifier) { - if (match('=')) { - firstCoverInitializedNameError = lookahead; - lex(); - value = isolateCoverGrammar(parseAssignmentExpression); - return node.finishProperty('init', key, computed, - new WrappingNode(token).finishAssignmentPattern(key, value), false, true); - } - return node.finishProperty('init', key, computed, key, false, true); - } +/** + * Returns a string representation of a vector + * + * @param {vec3} vec vector to represent as a string + * @returns {String} string representation of the vector + */ +vec3.str = function (a) { + return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'; +}; - throwUnexpectedToken(lookahead); - } +if(typeof(exports) !== 'undefined') { + exports.vec3 = vec3; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - function parseObjectInitializer() { - var properties = [], hasProto = {value: false}, node = new Node(); +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - expect('{'); + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - while (!match('}')) { - properties.push(parseObjectProperty(hasProto)); +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - if (!match('}')) { - expectCommaSeparator(); - } - } +/** + * @class 4 Dimensional Vector + * @name vec4 + */ - expect('}'); +var vec4 = {}; - return node.finishObjectExpression(properties); - } +/** + * Creates a new, empty vec4 + * + * @returns {vec4} a new 4D vector + */ +vec4.create = function() { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; + return out; +}; - function reinterpretExpressionAsPattern(expr) { - var i; - switch (expr.type) { - case Syntax.Identifier: - case Syntax.MemberExpression: - case Syntax.RestElement: - case Syntax.AssignmentPattern: - break; - case Syntax.SpreadElement: - expr.type = Syntax.RestElement; - reinterpretExpressionAsPattern(expr.argument); - break; - case Syntax.ArrayExpression: - expr.type = Syntax.ArrayPattern; - for (i = 0; i < expr.elements.length; i++) { - if (expr.elements[i] !== null) { - reinterpretExpressionAsPattern(expr.elements[i]); - } - } - break; - case Syntax.ObjectExpression: - expr.type = Syntax.ObjectPattern; - for (i = 0; i < expr.properties.length; i++) { - reinterpretExpressionAsPattern(expr.properties[i].value); - } - break; - case Syntax.AssignmentExpression: - expr.type = Syntax.AssignmentPattern; - reinterpretExpressionAsPattern(expr.left); - break; - default: - // Allow other node type for tolerant parsing. - break; - } - } +/** + * Creates a new vec4 initialized with values from an existing vector + * + * @param {vec4} a vector to clone + * @returns {vec4} a new 4D vector + */ +vec4.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +}; - // ECMA-262 12.2.9 Template Literals +/** + * Creates a new vec4 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} a new 4D vector + */ +vec4.fromValues = function(x, y, z, w) { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; +}; - function parseTemplateElement(option) { - var node, token; +/** + * Copy the values from one vec4 to another + * + * @param {vec4} out the receiving vector + * @param {vec4} a the source vector + * @returns {vec4} out + */ +vec4.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +}; - if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) { - throwUnexpectedToken(); - } +/** + * Set the components of a vec4 to the given values + * + * @param {vec4} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} out + */ +vec4.set = function(out, x, y, z, w) { + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; +}; - node = new Node(); - token = lex(); +/** + * Adds two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.add = function(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; +}; - return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail); - } +/** + * Subtracts vector b from vector a + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.subtract = function(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; +}; - function parseTemplateLiteral() { - var quasi, quasis, expressions, node = new Node(); +/** + * Alias for {@link vec4.subtract} + * @function + */ +vec4.sub = vec4.subtract; - quasi = parseTemplateElement({ head: true }); - quasis = [quasi]; - expressions = []; +/** + * Multiplies two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.multiply = function(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + out[3] = a[3] * b[3]; + return out; +}; - while (!quasi.tail) { - expressions.push(parseExpression()); - quasi = parseTemplateElement({ head: false }); - quasis.push(quasi); - } +/** + * Alias for {@link vec4.multiply} + * @function + */ +vec4.mul = vec4.multiply; - return node.finishTemplateLiteral(quasis, expressions); - } +/** + * Divides two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.divide = function(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + out[3] = a[3] / b[3]; + return out; +}; - // ECMA-262 12.2.10 The Grouping Operator +/** + * Alias for {@link vec4.divide} + * @function + */ +vec4.div = vec4.divide; - function parseGroupExpression() { - var expr, expressions, startToken, i, params = []; +/** + * Returns the minimum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + out[3] = Math.min(a[3], b[3]); + return out; +}; - expect('('); +/** + * Returns the maximum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ +vec4.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + out[3] = Math.max(a[3], b[3]); + return out; +}; - if (match(')')) { - lex(); - if (!match('=>')) { - expect('=>'); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [], - rawParams: [] - }; - } +/** + * Scales a vec4 by a scalar number + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec4} out + */ +vec4.scale = function(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; +}; - startToken = lookahead; - if (match('...')) { - expr = parseRestElement(params); - expect(')'); - if (!match('=>')) { - expect('=>'); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [expr] - }; - } +/** + * Adds two vec4's after scaling the second operand by a scalar value + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec4} out + */ +vec4.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + (b[0] * scale); + out[1] = a[1] + (b[1] * scale); + out[2] = a[2] + (b[2] * scale); + out[3] = a[3] + (b[3] * scale); + return out; +}; - isBindingElement = true; - expr = inheritCoverGrammar(parseAssignmentExpression); +/** + * Calculates the euclidian distance between two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} distance between a and b + */ +vec4.distance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1], + z = b[2] - a[2], + w = b[3] - a[3]; + return Math.sqrt(x*x + y*y + z*z + w*w); +}; - if (match(',')) { - isAssignmentTarget = false; - expressions = [expr]; +/** + * Alias for {@link vec4.distance} + * @function + */ +vec4.dist = vec4.distance; - while (startIndex < length) { - if (!match(',')) { - break; - } - lex(); +/** + * Calculates the squared euclidian distance between two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} squared distance between a and b + */ +vec4.squaredDistance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1], + z = b[2] - a[2], + w = b[3] - a[3]; + return x*x + y*y + z*z + w*w; +}; - if (match('...')) { - if (!isBindingElement) { - throwUnexpectedToken(lookahead); - } - expressions.push(parseRestElement(params)); - expect(')'); - if (!match('=>')) { - expect('=>'); - } - isBindingElement = false; - for (i = 0; i < expressions.length; i++) { - reinterpretExpressionAsPattern(expressions[i]); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: expressions - }; - } +/** + * Alias for {@link vec4.squaredDistance} + * @function + */ +vec4.sqrDist = vec4.squaredDistance; - expressions.push(inheritCoverGrammar(parseAssignmentExpression)); - } +/** + * Calculates the length of a vec4 + * + * @param {vec4} a vector to calculate length of + * @returns {Number} length of a + */ +vec4.length = function (a) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + return Math.sqrt(x*x + y*y + z*z + w*w); +}; - expr = new WrappingNode(startToken).finishSequenceExpression(expressions); - } +/** + * Alias for {@link vec4.length} + * @function + */ +vec4.len = vec4.length; +/** + * Calculates the squared length of a vec4 + * + * @param {vec4} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +vec4.squaredLength = function (a) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + return x*x + y*y + z*z + w*w; +}; - expect(')'); +/** + * Alias for {@link vec4.squaredLength} + * @function + */ +vec4.sqrLen = vec4.squaredLength; - if (match('=>')) { - if (expr.type === Syntax.Identifier && expr.name === 'yield') { - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [expr] - }; - } +/** + * Negates the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to negate + * @returns {vec4} out + */ +vec4.negate = function(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = -a[3]; + return out; +}; - if (!isBindingElement) { - throwUnexpectedToken(lookahead); - } +/** + * Normalize a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to normalize + * @returns {vec4} out + */ +vec4.normalize = function(out, a) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + var len = x*x + y*y + z*z + w*w; + if (len > 0) { + len = 1 / Math.sqrt(len); + out[0] = a[0] * len; + out[1] = a[1] * len; + out[2] = a[2] * len; + out[3] = a[3] * len; + } + return out; +}; - if (expr.type === Syntax.SequenceExpression) { - for (i = 0; i < expr.expressions.length; i++) { - reinterpretExpressionAsPattern(expr.expressions[i]); - } - } else { - reinterpretExpressionAsPattern(expr); - } +/** + * Calculates the dot product of two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} dot product of a and b + */ +vec4.dot = function (a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; +}; - expr = { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: expr.type === Syntax.SequenceExpression ? expr.expressions : [expr] - }; - } - isBindingElement = false; - return expr; - } +/** + * Performs a linear interpolation between two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec4} out + */ +vec4.lerp = function (out, a, b, t) { + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + out[3] = aw + t * (b[3] - aw); + return out; +}; +/** + * Generates a random vector with the given scale + * + * @param {vec4} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec4} out + */ +vec4.random = function (out, scale) { + scale = scale || 1.0; - // ECMA-262 12.2 Primary Expressions + //TODO: This is a pretty awful way of doing this. Find something better. + out[0] = GLMAT_RANDOM(); + out[1] = GLMAT_RANDOM(); + out[2] = GLMAT_RANDOM(); + out[3] = GLMAT_RANDOM(); + vec4.normalize(out, out); + vec4.scale(out, out, scale); + return out; +}; - function parsePrimaryExpression() { - var type, token, expr, node; +/** + * Transforms the vec4 with a mat4. + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec4} out + */ +vec4.transformMat4 = function(out, a, m) { + var x = a[0], y = a[1], z = a[2], w = a[3]; + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + return out; +}; - if (match('(')) { - isBindingElement = false; - return inheritCoverGrammar(parseGroupExpression); - } +/** + * Transforms the vec4 with a quat + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to transform + * @param {quat} q quaternion to transform with + * @returns {vec4} out + */ +vec4.transformQuat = function(out, a, q) { + var x = a[0], y = a[1], z = a[2], + qx = q[0], qy = q[1], qz = q[2], qw = q[3], - if (match('[')) { - return inheritCoverGrammar(parseArrayInitializer); - } + // calculate quat * vec + ix = qw * x + qy * z - qz * y, + iy = qw * y + qz * x - qx * z, + iz = qw * z + qx * y - qy * x, + iw = -qx * x - qy * y - qz * z; - if (match('{')) { - return inheritCoverGrammar(parseObjectInitializer); - } + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; + return out; +}; - type = lookahead.type; - node = new Node(); +/** + * Perform some operation over an array of vec4s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +vec4.forEach = (function() { + var vec = vec4.create(); - if (type === Token.Identifier) { - if (state.sourceType === 'module' && lookahead.value === 'await') { - tolerateUnexpectedToken(lookahead); - } - expr = node.finishIdentifier(lex().value); - } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { - isAssignmentTarget = isBindingElement = false; - if (strict && lookahead.octal) { - tolerateUnexpectedToken(lookahead, Messages.StrictOctalLiteral); - } - expr = node.finishLiteral(lex()); - } else if (type === Token.Keyword) { - if (!strict && state.allowYield && matchKeyword('yield')) { - return parseNonComputedProperty(); - } - if (!strict && matchKeyword('let')) { - return node.finishIdentifier(lex().value); - } - isAssignmentTarget = isBindingElement = false; - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - if (matchKeyword('this')) { - lex(); - return node.finishThisExpression(); - } - if (matchKeyword('class')) { - return parseClassExpression(); - } - throwUnexpectedToken(lex()); - } else if (type === Token.BooleanLiteral) { - isAssignmentTarget = isBindingElement = false; - token = lex(); - token.value = (token.value === 'true'); - expr = node.finishLiteral(token); - } else if (type === Token.NullLiteral) { - isAssignmentTarget = isBindingElement = false; - token = lex(); - token.value = null; - expr = node.finishLiteral(token); - } else if (match('/') || match('/=')) { - isAssignmentTarget = isBindingElement = false; - index = startIndex; + return function(a, stride, offset, count, fn, arg) { + var i, l; + if(!stride) { + stride = 4; + } - if (typeof extra.tokens !== 'undefined') { - token = collectRegex(); - } else { - token = scanRegExp(); - } - lex(); - expr = node.finishLiteral(token); - } else if (type === Token.Template) { - expr = parseTemplateLiteral(); + if(!offset) { + offset = 0; + } + + if(count) { + l = Math.min((count * stride) + offset, a.length); } else { - throwUnexpectedToken(lex()); + l = a.length; } - return expr; - } + for(i = offset; i < l; i += stride) { + vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3]; + fn(vec, vec, arg); + a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3]; + } + + return a; + }; +})(); - // ECMA-262 12.3 Left-Hand-Side Expressions +/** + * Returns a string representation of a vector + * + * @param {vec4} vec vector to represent as a string + * @returns {String} string representation of the vector + */ +vec4.str = function (a) { + return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; +}; - function parseArguments() { - var args = [], expr; +if(typeof(exports) !== 'undefined') { + exports.vec4 = vec4; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - expect('('); +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - if (!match(')')) { - while (startIndex < length) { - if (match('...')) { - expr = new Node(); - lex(); - expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression)); - } else { - expr = isolateCoverGrammar(parseAssignmentExpression); - } - args.push(expr); - if (match(')')) { - break; - } - expectCommaSeparator(); - } - } + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - expect(')'); +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - return args; - } +/** + * @class 2x2 Matrix + * @name mat2 + */ - function parseNonComputedProperty() { - var token, node = new Node(); +var mat2 = {}; - token = lex(); +/** + * Creates a new identity mat2 + * + * @returns {mat2} a new 2x2 matrix + */ +mat2.create = function() { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +}; - if (!isIdentifierName(token)) { - throwUnexpectedToken(token); - } +/** + * Creates a new mat2 initialized with values from an existing matrix + * + * @param {mat2} a matrix to clone + * @returns {mat2} a new 2x2 matrix + */ +mat2.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +}; - return node.finishIdentifier(token.value); - } +/** + * Copy the values from one mat2 to another + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ +mat2.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +}; - function parseNonComputedMember() { - expect('.'); +/** + * Set a mat2 to the identity matrix + * + * @param {mat2} out the receiving matrix + * @returns {mat2} out + */ +mat2.identity = function(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +}; - return parseNonComputedProperty(); +/** + * Transpose the values of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ +mat2.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a1 = a[1]; + out[1] = a[2]; + out[2] = a1; + } else { + out[0] = a[0]; + out[1] = a[2]; + out[2] = a[1]; + out[3] = a[3]; } + + return out; +}; - function parseComputedMember() { - var expr; - - expect('['); - - expr = isolateCoverGrammar(parseExpression); +/** + * Inverts a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ +mat2.invert = function(out, a) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - expect(']'); + // Calculate the determinant + det = a0 * a3 - a2 * a1; - return expr; + if (!det) { + return null; } + det = 1.0 / det; + + out[0] = a3 * det; + out[1] = -a1 * det; + out[2] = -a2 * det; + out[3] = a0 * det; - // ECMA-262 12.3.3 The new Operator + return out; +}; - function parseNewExpression() { - var callee, args, node = new Node(); +/** + * Calculates the adjugate of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ +mat2.adjoint = function(out, a) { + // Caching this value is nessecary if out == a + var a0 = a[0]; + out[0] = a[3]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a0; - expectKeyword('new'); + return out; +}; - if (match('.')) { - lex(); - if (lookahead.type === Token.Identifier && lookahead.value === 'target') { - if (state.inFunctionBody) { - lex(); - return node.finishMetaProperty('new', 'target'); - } - } - throwUnexpectedToken(lookahead); - } +/** + * Calculates the determinant of a mat2 + * + * @param {mat2} a the source matrix + * @returns {Number} determinant of a + */ +mat2.determinant = function (a) { + return a[0] * a[3] - a[2] * a[1]; +}; - callee = isolateCoverGrammar(parseLeftHandSideExpression); - args = match('(') ? parseArguments() : []; +/** + * Multiplies two mat2's + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @returns {mat2} out + */ +mat2.multiply = function (out, a, b) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + return out; +}; - isAssignmentTarget = isBindingElement = false; +/** + * Alias for {@link mat2.multiply} + * @function + */ +mat2.mul = mat2.multiply; - return node.finishNewExpression(callee, args); - } +/** + * Rotates a mat2 by the given angle + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ +mat2.rotate = function (out, a, rad) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + s = Math.sin(rad), + c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + return out; +}; - // ECMA-262 12.3.4 Function Calls +/** + * Scales the mat2 by the dimensions in the given vec2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the matrix to rotate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat2} out + **/ +mat2.scale = function(out, a, v) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + v0 = v[0], v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + return out; +}; - function parseLeftHandSideExpressionAllowCall() { - var quasi, expr, args, property, startToken, previousAllowIn = state.allowIn; +/** + * Returns a string representation of a mat2 + * + * @param {mat2} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ +mat2.str = function (a) { + return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; +}; - startToken = lookahead; - state.allowIn = true; +/** + * Returns Frobenius norm of a mat2 + * + * @param {mat2} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +mat2.frob = function (a) { + return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2))) +}; - if (matchKeyword('super') && state.inFunctionBody) { - expr = new Node(); - lex(); - expr = expr.finishSuper(); - if (!match('(') && !match('.') && !match('[')) { - throwUnexpectedToken(lookahead); - } - } else { - expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); - } +/** + * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix + * @param {mat2} L the lower triangular matrix + * @param {mat2} D the diagonal matrix + * @param {mat2} U the upper triangular matrix + * @param {mat2} a the input matrix to factorize + */ - for (;;) { - if (match('.')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseNonComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); - } else if (match('(')) { - isBindingElement = false; - isAssignmentTarget = false; - args = parseArguments(); - expr = new WrappingNode(startToken).finishCallExpression(expr, args); - } else if (match('[')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); - } else if (lookahead.type === Token.Template && lookahead.head) { - quasi = parseTemplateLiteral(); - expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); - } else { - break; - } - } - state.allowIn = previousAllowIn; +mat2.LDU = function (L, D, U, a) { + L[2] = a[2]/a[0]; + U[0] = a[0]; + U[1] = a[1]; + U[3] = a[3] - L[2] * U[1]; + return [L, D, U]; +}; - return expr; - } +if(typeof(exports) !== 'undefined') { + exports.mat2 = mat2; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - // ECMA-262 12.3 Left-Hand-Side Expressions +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - function parseLeftHandSideExpression() { - var quasi, expr, property, startToken; - assert(state.allowIn, 'callee of new expression always allow in keyword.'); + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - startToken = lookahead; +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - if (matchKeyword('super') && state.inFunctionBody) { - expr = new Node(); - lex(); - expr = expr.finishSuper(); - if (!match('[') && !match('.')) { - throwUnexpectedToken(lookahead); - } - } else { - expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); - } +/** + * @class 2x3 Matrix + * @name mat2d + * + * @description + * A mat2d contains six elements defined as: + *
+ * [a, c, tx,
+ *  b, d, ty]
+ * 
+ * This is a short form for the 3x3 matrix: + *
+ * [a, c, tx,
+ *  b, d, ty,
+ *  0, 0, 1]
+ * 
+ * The last row is ignored so the array is shorter and operations are faster. + */ - for (;;) { - if (match('[')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); - } else if (match('.')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseNonComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); - } else if (lookahead.type === Token.Template && lookahead.head) { - quasi = parseTemplateLiteral(); - expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); - } else { - break; - } - } - return expr; - } +var mat2d = {}; - // ECMA-262 12.4 Postfix Expressions +/** + * Creates a new identity mat2d + * + * @returns {mat2d} a new 2x3 matrix + */ +mat2d.create = function() { + var out = new GLMAT_ARRAY_TYPE(6); + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +}; - function parsePostfixExpression() { - var expr, token, startToken = lookahead; +/** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param {mat2d} a matrix to clone + * @returns {mat2d} a new 2x3 matrix + */ +mat2d.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(6); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +}; - expr = inheritCoverGrammar(parseLeftHandSideExpressionAllowCall); +/** + * Copy the values from one mat2d to another + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the source matrix + * @returns {mat2d} out + */ +mat2d.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +}; - if (!hasLineTerminator && lookahead.type === Token.Punctuator) { - if (match('++') || match('--')) { - // ECMA-262 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - tolerateError(Messages.StrictLHSPostfix); - } +/** + * Set a mat2d to the identity matrix + * + * @param {mat2d} out the receiving matrix + * @returns {mat2d} out + */ +mat2d.identity = function(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +}; - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } +/** + * Inverts a mat2d + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the source matrix + * @returns {mat2d} out + */ +mat2d.invert = function(out, a) { + var aa = a[0], ab = a[1], ac = a[2], ad = a[3], + atx = a[4], aty = a[5]; - isAssignmentTarget = isBindingElement = false; + var det = aa * ad - ab * ac; + if(!det){ + return null; + } + det = 1.0 / det; - token = lex(); - expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr); - } - } + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; +}; - return expr; - } +/** + * Calculates the determinant of a mat2d + * + * @param {mat2d} a the source matrix + * @returns {Number} determinant of a + */ +mat2d.determinant = function (a) { + return a[0] * a[3] - a[1] * a[2]; +}; - // ECMA-262 12.5 Unary Operators +/** + * Multiplies two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @returns {mat2d} out + */ +mat2d.multiply = function (out, a, b) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], + b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + out[4] = a0 * b4 + a2 * b5 + a4; + out[5] = a1 * b4 + a3 * b5 + a5; + return out; +}; - function parseUnaryExpression() { - var token, expr, startToken; +/** + * Alias for {@link mat2d.multiply} + * @function + */ +mat2d.mul = mat2d.multiply; - if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { - expr = parsePostfixExpression(); - } else if (match('++') || match('--')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - // ECMA-262 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - tolerateError(Messages.StrictLHSPrefix); - } - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - isAssignmentTarget = isBindingElement = false; - } else if (match('+') || match('-') || match('~') || match('!')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - isAssignmentTarget = isBindingElement = false; - } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - tolerateError(Messages.StrictDelete); - } - isAssignmentTarget = isBindingElement = false; - } else { - expr = parsePostfixExpression(); - } +/** + * Rotates a mat2d by the given angle + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ +mat2d.rotate = function (out, a, rad) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], + s = Math.sin(rad), + c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + out[4] = a4; + out[5] = a5; + return out; +}; - return expr; - } +/** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to translate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat2d} out + **/ +mat2d.scale = function(out, a, v) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], + v0 = v[0], v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + out[4] = a4; + out[5] = a5; + return out; +}; - function binaryPrecedence(token, allowIn) { - var prec = 0; +/** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to translate + * @param {vec2} v the vec2 to translate the matrix by + * @returns {mat2d} out + **/ +mat2d.translate = function(out, a, v) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], + v0 = v[0], v1 = v[1]; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = a0 * v0 + a2 * v1 + a4; + out[5] = a1 * v0 + a3 * v1 + a5; + return out; +}; - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return 0; - } +/** + * Returns a string representation of a mat2d + * + * @param {mat2d} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ +mat2d.str = function (a) { + return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + + a[3] + ', ' + a[4] + ', ' + a[5] + ')'; +}; - switch (token.value) { - case '||': - prec = 1; - break; +/** + * Returns Frobenius norm of a mat2d + * + * @param {mat2d} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +mat2d.frob = function (a) { + return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1)) +}; - case '&&': - prec = 2; - break; +if(typeof(exports) !== 'undefined') { + exports.mat2d = mat2d; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - case '|': - prec = 3; - break; +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - case '^': - prec = 4; - break; + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - case '&': - prec = 5; - break; +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - case '==': - case '!=': - case '===': - case '!==': - prec = 6; - break; +/** + * @class 3x3 Matrix + * @name mat3 + */ - case '<': - case '>': - case '<=': - case '>=': - case 'instanceof': - prec = 7; - break; +var mat3 = {}; - case 'in': - prec = allowIn ? 7 : 0; - break; +/** + * Creates a new identity mat3 + * + * @returns {mat3} a new 3x3 matrix + */ +mat3.create = function() { + var out = new GLMAT_ARRAY_TYPE(9); + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +}; - case '<<': - case '>>': - case '>>>': - prec = 8; - break; +/** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {mat4} a the source 4x4 matrix + * @returns {mat3} out + */ +mat3.fromMat4 = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + return out; +}; - case '+': - case '-': - prec = 9; - break; +/** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param {mat3} a matrix to clone + * @returns {mat3} a new 3x3 matrix + */ +mat3.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(9); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +}; - case '*': - case '/': - case '%': - prec = 11; - break; +/** + * Copy the values from one mat3 to another + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ +mat3.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +}; - default: - break; - } +/** + * Set a mat3 to the identity matrix + * + * @param {mat3} out the receiving matrix + * @returns {mat3} out + */ +mat3.identity = function(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +}; - return prec; +/** + * Transpose the values of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ +mat3.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], a02 = a[2], a12 = a[5]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a01; + out[5] = a[7]; + out[6] = a02; + out[7] = a12; + } else { + out[0] = a[0]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a[1]; + out[4] = a[4]; + out[5] = a[7]; + out[6] = a[2]; + out[7] = a[5]; + out[8] = a[8]; } + + return out; +}; - // ECMA-262 12.6 Multiplicative Operators - // ECMA-262 12.7 Additive Operators - // ECMA-262 12.8 Bitwise Shift Operators - // ECMA-262 12.9 Relational Operators - // ECMA-262 12.10 Equality Operators - // ECMA-262 12.11 Binary Bitwise Operators - // ECMA-262 12.12 Binary Logical Operators - - function parseBinaryExpression() { - var marker, markers, expr, token, prec, stack, right, operator, left, i; +/** + * Inverts a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ +mat3.invert = function(out, a) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8], - marker = lookahead; - left = inheritCoverGrammar(parseUnaryExpression); + b01 = a22 * a11 - a12 * a21, + b11 = -a22 * a10 + a12 * a20, + b21 = a21 * a10 - a11 * a20, - token = lookahead; - prec = binaryPrecedence(token, state.allowIn); - if (prec === 0) { - return left; - } - isAssignmentTarget = isBindingElement = false; - token.prec = prec; - lex(); + // Calculate the determinant + det = a00 * b01 + a01 * b11 + a02 * b21; - markers = [marker, lookahead]; - right = isolateCoverGrammar(parseUnaryExpression); + if (!det) { + return null; + } + det = 1.0 / det; - stack = [left, token, right]; + out[0] = b01 * det; + out[1] = (-a22 * a01 + a02 * a21) * det; + out[2] = (a12 * a01 - a02 * a11) * det; + out[3] = b11 * det; + out[4] = (a22 * a00 - a02 * a20) * det; + out[5] = (-a12 * a00 + a02 * a10) * det; + out[6] = b21 * det; + out[7] = (-a21 * a00 + a01 * a20) * det; + out[8] = (a11 * a00 - a01 * a10) * det; + return out; +}; - while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { +/** + * Calculates the adjugate of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ +mat3.adjoint = function(out, a) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8]; - // Reduce: make a binary expression from the three topmost entries. - while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { - right = stack.pop(); - operator = stack.pop().value; - left = stack.pop(); - markers.pop(); - expr = new WrappingNode(markers[markers.length - 1]).finishBinaryExpression(operator, left, right); - stack.push(expr); - } + out[0] = (a11 * a22 - a12 * a21); + out[1] = (a02 * a21 - a01 * a22); + out[2] = (a01 * a12 - a02 * a11); + out[3] = (a12 * a20 - a10 * a22); + out[4] = (a00 * a22 - a02 * a20); + out[5] = (a02 * a10 - a00 * a12); + out[6] = (a10 * a21 - a11 * a20); + out[7] = (a01 * a20 - a00 * a21); + out[8] = (a00 * a11 - a01 * a10); + return out; +}; - // Shift. - token = lex(); - token.prec = prec; - stack.push(token); - markers.push(lookahead); - expr = isolateCoverGrammar(parseUnaryExpression); - stack.push(expr); - } +/** + * Calculates the determinant of a mat3 + * + * @param {mat3} a the source matrix + * @returns {Number} determinant of a + */ +mat3.determinant = function (a) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8]; - // Final reduce to clean-up the stack. - i = stack.length - 1; - expr = stack[i]; - markers.pop(); - while (i > 1) { - expr = new WrappingNode(markers.pop()).finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr); - i -= 2; - } + return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); +}; - return expr; - } +/** + * Multiplies two mat3's + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @returns {mat3} out + */ +mat3.multiply = function (out, a, b) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8], + b00 = b[0], b01 = b[1], b02 = b[2], + b10 = b[3], b11 = b[4], b12 = b[5], + b20 = b[6], b21 = b[7], b22 = b[8]; - // ECMA-262 12.13 Conditional Operator + out[0] = b00 * a00 + b01 * a10 + b02 * a20; + out[1] = b00 * a01 + b01 * a11 + b02 * a21; + out[2] = b00 * a02 + b01 * a12 + b02 * a22; - function parseConditionalExpression() { - var expr, previousAllowIn, consequent, alternate, startToken; + out[3] = b10 * a00 + b11 * a10 + b12 * a20; + out[4] = b10 * a01 + b11 * a11 + b12 * a21; + out[5] = b10 * a02 + b11 * a12 + b12 * a22; - startToken = lookahead; + out[6] = b20 * a00 + b21 * a10 + b22 * a20; + out[7] = b20 * a01 + b21 * a11 + b22 * a21; + out[8] = b20 * a02 + b21 * a12 + b22 * a22; + return out; +}; - expr = inheritCoverGrammar(parseBinaryExpression); - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = isolateCoverGrammar(parseAssignmentExpression); - state.allowIn = previousAllowIn; - expect(':'); - alternate = isolateCoverGrammar(parseAssignmentExpression); +/** + * Alias for {@link mat3.multiply} + * @function + */ +mat3.mul = mat3.multiply; - expr = new WrappingNode(startToken).finishConditionalExpression(expr, consequent, alternate); - isAssignmentTarget = isBindingElement = false; - } +/** + * Translate a mat3 by the given vector + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to translate + * @param {vec2} v vector to translate by + * @returns {mat3} out + */ +mat3.translate = function(out, a, v) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8], + x = v[0], y = v[1]; - return expr; - } + out[0] = a00; + out[1] = a01; + out[2] = a02; - // ECMA-262 14.2 Arrow Function Definitions + out[3] = a10; + out[4] = a11; + out[5] = a12; - function parseConciseBody() { - if (match('{')) { - return parseFunctionSourceElements(); - } - return isolateCoverGrammar(parseAssignmentExpression); - } + out[6] = x * a00 + y * a10 + a20; + out[7] = x * a01 + y * a11 + a21; + out[8] = x * a02 + y * a12 + a22; + return out; +}; - function checkPatternParam(options, param) { - var i; - switch (param.type) { - case Syntax.Identifier: - validateParam(options, param, param.name); - break; - case Syntax.RestElement: - checkPatternParam(options, param.argument); - break; - case Syntax.AssignmentPattern: - checkPatternParam(options, param.left); - break; - case Syntax.ArrayPattern: - for (i = 0; i < param.elements.length; i++) { - if (param.elements[i] !== null) { - checkPatternParam(options, param.elements[i]); - } - } - break; - case Syntax.YieldExpression: - break; - default: - assert(param.type === Syntax.ObjectPattern, 'Invalid type'); - for (i = 0; i < param.properties.length; i++) { - checkPatternParam(options, param.properties[i].value); - } - break; - } - } - function reinterpretAsCoverFormalsList(expr) { - var i, len, param, params, defaults, defaultCount, options, token; +/** + * Rotates a mat3 by the given angle + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ +mat3.rotate = function (out, a, rad) { + var a00 = a[0], a01 = a[1], a02 = a[2], + a10 = a[3], a11 = a[4], a12 = a[5], + a20 = a[6], a21 = a[7], a22 = a[8], - defaults = []; - defaultCount = 0; - params = [expr]; + s = Math.sin(rad), + c = Math.cos(rad); - switch (expr.type) { - case Syntax.Identifier: - break; - case PlaceHolders.ArrowParameterPlaceHolder: - params = expr.params; - break; - default: - return null; - } + out[0] = c * a00 + s * a10; + out[1] = c * a01 + s * a11; + out[2] = c * a02 + s * a12; - options = { - paramSet: {} - }; + out[3] = c * a10 - s * a00; + out[4] = c * a11 - s * a01; + out[5] = c * a12 - s * a02; - for (i = 0, len = params.length; i < len; i += 1) { - param = params[i]; - switch (param.type) { - case Syntax.AssignmentPattern: - params[i] = param.left; - if (param.right.type === Syntax.YieldExpression) { - if (param.right.argument) { - throwUnexpectedToken(lookahead); - } - param.right.type = Syntax.Identifier; - param.right.name = 'yield'; - delete param.right.argument; - delete param.right.delegate; - } - defaults.push(param.right); - ++defaultCount; - checkPatternParam(options, param.left); - break; - default: - checkPatternParam(options, param); - params[i] = param; - defaults.push(null); - break; - } - } + out[6] = a20; + out[7] = a21; + out[8] = a22; + return out; +}; - if (strict || !state.allowYield) { - for (i = 0, len = params.length; i < len; i += 1) { - param = params[i]; - if (param.type === Syntax.YieldExpression) { - throwUnexpectedToken(lookahead); - } - } - } +/** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to rotate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat3} out + **/ +mat3.scale = function(out, a, v) { + var x = v[0], y = v[1]; - if (options.message === Messages.StrictParamDupe) { - token = strict ? options.stricted : options.firstRestricted; - throwUnexpectedToken(token, options.message); - } + out[0] = x * a[0]; + out[1] = x * a[1]; + out[2] = x * a[2]; - if (defaultCount === 0) { - defaults = []; - } + out[3] = y * a[3]; + out[4] = y * a[4]; + out[5] = y * a[5]; - return { - params: params, - defaults: defaults, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - } + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +}; - function parseArrowFunctionExpression(options, node) { - var previousStrict, previousAllowYield, body; +/** + * Copies the values from a mat2d into a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat2d} a the matrix to copy + * @returns {mat3} out + **/ +mat3.fromMat2d = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = 0; - if (hasLineTerminator) { - tolerateUnexpectedToken(lookahead); - } - expect('=>'); + out[3] = a[2]; + out[4] = a[3]; + out[5] = 0; - previousStrict = strict; - previousAllowYield = state.allowYield; - state.allowYield = true; + out[6] = a[4]; + out[7] = a[5]; + out[8] = 1; + return out; +}; - body = parseConciseBody(); +/** +* Calculates a 3x3 matrix from the given quaternion +* +* @param {mat3} out mat3 receiving operation result +* @param {quat} q Quaternion to create matrix from +* +* @returns {mat3} out +*/ +mat3.fromQuat = function (out, q) { + var x = q[0], y = q[1], z = q[2], w = q[3], + x2 = x + x, + y2 = y + y, + z2 = z + z, - if (strict && options.firstRestricted) { - throwUnexpectedToken(options.firstRestricted, options.message); - } - if (strict && options.stricted) { - tolerateUnexpectedToken(options.stricted, options.message); - } + xx = x * x2, + yx = y * x2, + yy = y * y2, + zx = z * x2, + zy = z * y2, + zz = z * z2, + wx = w * x2, + wy = w * y2, + wz = w * z2; - strict = previousStrict; - state.allowYield = previousAllowYield; + out[0] = 1 - yy - zz; + out[3] = yx - wz; + out[6] = zx + wy; - return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement); - } + out[1] = yx + wz; + out[4] = 1 - xx - zz; + out[7] = zy - wx; - // ECMA-262 14.4 Yield expression + out[2] = zx - wy; + out[5] = zy + wx; + out[8] = 1 - xx - yy; - function parseYieldExpression() { - var argument, expr, delegate, previousAllowYield; + return out; +}; - argument = null; - expr = new Node(); - delegate = false; +/** +* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix +* +* @param {mat3} out mat3 receiving operation result +* @param {mat4} a Mat4 to derive the normal matrix from +* +* @returns {mat3} out +*/ +mat3.normalFromMat4 = function (out, a) { + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], + a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], + a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], + a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], - expectKeyword('yield'); + b00 = a00 * a11 - a01 * a10, + b01 = a00 * a12 - a02 * a10, + b02 = a00 * a13 - a03 * a10, + b03 = a01 * a12 - a02 * a11, + b04 = a01 * a13 - a03 * a11, + b05 = a02 * a13 - a03 * a12, + b06 = a20 * a31 - a21 * a30, + b07 = a20 * a32 - a22 * a30, + b08 = a20 * a33 - a23 * a30, + b09 = a21 * a32 - a22 * a31, + b10 = a21 * a33 - a23 * a31, + b11 = a22 * a33 - a23 * a32, - if (!hasLineTerminator) { - previousAllowYield = state.allowYield; - state.allowYield = false; - delegate = match('*'); - if (delegate) { - lex(); - argument = parseAssignmentExpression(); - } else { - if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) { - argument = parseAssignmentExpression(); - } - } - state.allowYield = previousAllowYield; - } + // Calculate the determinant + det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - return expr.finishYieldExpression(argument, delegate); + if (!det) { + return null; } + det = 1.0 / det; - // ECMA-262 12.14 Assignment Operators - - function parseAssignmentExpression() { - var token, expr, right, list, startToken; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - startToken = lookahead; - token = lookahead; + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - if (!state.allowYield && matchKeyword('yield')) { - return parseYieldExpression(); - } + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - expr = parseConditionalExpression(); + return out; +}; - if (expr.type === PlaceHolders.ArrowParameterPlaceHolder || match('=>')) { - isAssignmentTarget = isBindingElement = false; - list = reinterpretAsCoverFormalsList(expr); +/** + * Returns a string representation of a mat3 + * + * @param {mat3} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ +mat3.str = function (a) { + return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + + a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + + a[6] + ', ' + a[7] + ', ' + a[8] + ')'; +}; - if (list) { - firstCoverInitializedNameError = null; - return parseArrowFunctionExpression(list, new WrappingNode(startToken)); - } +/** + * Returns Frobenius norm of a mat3 + * + * @param {mat3} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +mat3.frob = function (a) { + return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2))) +}; - return expr; - } - if (matchAssign()) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } +if(typeof(exports) !== 'undefined') { + exports.mat3 = mat3; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - // ECMA-262 12.1.1 - if (strict && expr.type === Syntax.Identifier) { - if (isRestrictedWord(expr.name)) { - tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); - } - if (isStrictModeReservedWord(expr.name)) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } - } +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - if (!match('=')) { - isAssignmentTarget = isBindingElement = false; - } else { - reinterpretExpressionAsPattern(expr); - } + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - token = lex(); - right = isolateCoverGrammar(parseAssignmentExpression); - expr = new WrappingNode(startToken).finishAssignmentExpression(token.value, expr, right); - firstCoverInitializedNameError = null; - } +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - return expr; - } +/** + * @class 4x4 Matrix + * @name mat4 + */ - // ECMA-262 12.15 Comma Operator +var mat4 = {}; - function parseExpression() { - var expr, startToken = lookahead, expressions; +/** + * Creates a new identity mat4 + * + * @returns {mat4} a new 4x4 matrix + */ +mat4.create = function() { + var out = new GLMAT_ARRAY_TYPE(16); + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +}; - expr = isolateCoverGrammar(parseAssignmentExpression); +/** + * Creates a new mat4 initialized with values from an existing matrix + * + * @param {mat4} a matrix to clone + * @returns {mat4} a new 4x4 matrix + */ +mat4.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(16); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +}; - if (match(',')) { - expressions = [expr]; +/** + * Copy the values from one mat4 to another + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ +mat4.copy = function(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +}; - while (startIndex < length) { - if (!match(',')) { - break; - } - lex(); - expressions.push(isolateCoverGrammar(parseAssignmentExpression)); - } +/** + * Set a mat4 to the identity matrix + * + * @param {mat4} out the receiving matrix + * @returns {mat4} out + */ +mat4.identity = function(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +}; - expr = new WrappingNode(startToken).finishSequenceExpression(expressions); - } +/** + * Transpose the values of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ +mat4.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], a02 = a[2], a03 = a[3], + a12 = a[6], a13 = a[7], + a23 = a[11]; - return expr; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a01; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a02; + out[9] = a12; + out[11] = a[14]; + out[12] = a03; + out[13] = a13; + out[14] = a23; + } else { + out[0] = a[0]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a[1]; + out[5] = a[5]; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a[2]; + out[9] = a[6]; + out[10] = a[10]; + out[11] = a[14]; + out[12] = a[3]; + out[13] = a[7]; + out[14] = a[11]; + out[15] = a[15]; } + + return out; +}; - // ECMA-262 13.2 Block +/** + * Inverts a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ +mat4.invert = function(out, a) { + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], + a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], + a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], + a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], - function parseStatementListItem() { - if (lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'export': - if (state.sourceType !== 'module') { - tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration); - } - return parseExportDeclaration(); - case 'import': - if (state.sourceType !== 'module') { - tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration); - } - return parseImportDeclaration(); - case 'const': - return parseLexicalDeclaration({inFor: false}); - case 'function': - return parseFunctionDeclaration(new Node()); - case 'class': - return parseClassDeclaration(); - } - } + b00 = a00 * a11 - a01 * a10, + b01 = a00 * a12 - a02 * a10, + b02 = a00 * a13 - a03 * a10, + b03 = a01 * a12 - a02 * a11, + b04 = a01 * a13 - a03 * a11, + b05 = a02 * a13 - a03 * a12, + b06 = a20 * a31 - a21 * a30, + b07 = a20 * a32 - a22 * a30, + b08 = a20 * a33 - a23 * a30, + b09 = a21 * a32 - a22 * a31, + b10 = a21 * a33 - a23 * a31, + b11 = a22 * a33 - a23 * a32, - if (matchKeyword('let') && isLexicalDeclaration()) { - return parseLexicalDeclaration({inFor: false}); - } + // Calculate the determinant + det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - return parseStatement(); + if (!det) { + return null; } + det = 1.0 / det; - function parseStatementList() { - var list = []; - while (startIndex < length) { - if (match('}')) { - break; - } - list.push(parseStatementListItem()); - } + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; + out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; + out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; + out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; + out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; + out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; + out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; - return list; - } + return out; +}; - function parseBlock() { - var block, node = new Node(); +/** + * Calculates the adjugate of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ +mat4.adjoint = function(out, a) { + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], + a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], + a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], + a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - expect('{'); + out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)); + out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)); + out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)); + out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)); + out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)); + out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)); + out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)); + out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)); + out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)); + out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)); + out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)); + out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)); + out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)); + out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)); + out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)); + out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)); + return out; +}; - block = parseStatementList(); +/** + * Calculates the determinant of a mat4 + * + * @param {mat4} a the source matrix + * @returns {Number} determinant of a + */ +mat4.determinant = function (a) { + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], + a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], + a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], + a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], - expect('}'); + b00 = a00 * a11 - a01 * a10, + b01 = a00 * a12 - a02 * a10, + b02 = a00 * a13 - a03 * a10, + b03 = a01 * a12 - a02 * a11, + b04 = a01 * a13 - a03 * a11, + b05 = a02 * a13 - a03 * a12, + b06 = a20 * a31 - a21 * a30, + b07 = a20 * a32 - a22 * a30, + b08 = a20 * a33 - a23 * a30, + b09 = a21 * a32 - a22 * a31, + b10 = a21 * a33 - a23 * a31, + b11 = a22 * a33 - a23 * a32; - return node.finishBlockStatement(block); - } + // Calculate the determinant + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; +}; - // ECMA-262 13.3.2 Variable Statement +/** + * Multiplies two mat4's + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @returns {mat4} out + */ +mat4.multiply = function (out, a, b) { + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], + a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], + a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], + a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - function parseVariableIdentifier(kind) { - var token, node = new Node(); + // Cache only the current line of the second matrix + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30; + out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31; + out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32; + out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - token = lex(); + b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7]; + out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30; + out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31; + out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32; + out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - if (token.type === Token.Keyword && token.value === 'yield') { - if (strict) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } if (!state.allowYield) { - throwUnexpectedToken(token); - } - } else if (token.type !== Token.Identifier) { - if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } else { - if (strict || token.value !== 'let' || kind !== 'var') { - throwUnexpectedToken(token); - } - } - } else if (state.sourceType === 'module' && token.type === Token.Identifier && token.value === 'await') { - tolerateUnexpectedToken(token); - } + b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11]; + out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30; + out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31; + out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32; + out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - return node.finishIdentifier(token.value); - } + b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15]; + out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30; + out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31; + out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32; + out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; + return out; +}; - function parseVariableDeclaration(options) { - var init = null, id, node = new Node(), params = []; +/** + * Alias for {@link mat4.multiply} + * @function + */ +mat4.mul = mat4.multiply; - id = parsePattern(params, 'var'); +/** + * Translate a mat4 by the given vector + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to translate + * @param {vec3} v vector to translate by + * @returns {mat4} out + */ +mat4.translate = function (out, a, v) { + var x = v[0], y = v[1], z = v[2], + a00, a01, a02, a03, + a10, a11, a12, a13, + a20, a21, a22, a23; - // ECMA-262 12.2.1 - if (strict && isRestrictedWord(id.name)) { - tolerateError(Messages.StrictVarName); - } + if (a === out) { + out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; + out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; + out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; + out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; + } else { + a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; + a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; + a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; - if (match('=')) { - lex(); - init = isolateCoverGrammar(parseAssignmentExpression); - } else if (id.type !== Syntax.Identifier && !options.inFor) { - expect('='); - } + out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03; + out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13; + out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23; - return node.finishVariableDeclarator(id, init); + out[12] = a00 * x + a10 * y + a20 * z + a[12]; + out[13] = a01 * x + a11 * y + a21 * z + a[13]; + out[14] = a02 * x + a12 * y + a22 * z + a[14]; + out[15] = a03 * x + a13 * y + a23 * z + a[15]; } - function parseVariableDeclarationList(options) { - var opt, list; - - opt = { inFor: options.inFor }; - list = [parseVariableDeclaration(opt)]; - - while (match(',')) { - lex(); - list.push(parseVariableDeclaration(opt)); - } - - return list; - } + return out; +}; - function parseVariableStatement(node) { - var declarations; +/** + * Scales the mat4 by the dimensions in the given vec3 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to scale + * @param {vec3} v the vec3 to scale the matrix by + * @returns {mat4} out + **/ +mat4.scale = function(out, a, v) { + var x = v[0], y = v[1], z = v[2]; - expectKeyword('var'); + out[0] = a[0] * x; + out[1] = a[1] * x; + out[2] = a[2] * x; + out[3] = a[3] * x; + out[4] = a[4] * y; + out[5] = a[5] * y; + out[6] = a[6] * y; + out[7] = a[7] * y; + out[8] = a[8] * z; + out[9] = a[9] * z; + out[10] = a[10] * z; + out[11] = a[11] * z; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +}; - declarations = parseVariableDeclarationList({ inFor: false }); +/** + * Rotates a mat4 by the given angle + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @param {vec3} axis the axis to rotate around + * @returns {mat4} out + */ +mat4.rotate = function (out, a, rad, axis) { + var x = axis[0], y = axis[1], z = axis[2], + len = Math.sqrt(x * x + y * y + z * z), + s, c, t, + a00, a01, a02, a03, + a10, a11, a12, a13, + a20, a21, a22, a23, + b00, b01, b02, + b10, b11, b12, + b20, b21, b22; - consumeSemicolon(); + if (Math.abs(len) < GLMAT_EPSILON) { return null; } + + len = 1 / len; + x *= len; + y *= len; + z *= len; - return node.finishVariableDeclaration(declarations); - } + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; - // ECMA-262 13.3.1 Let and Const Declarations + a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; + a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; + a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; - function parseLexicalBinding(kind, options) { - var init = null, id, node = new Node(), params = []; + // Construct the elements of the rotation matrix + b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s; + b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s; + b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c; - id = parsePattern(params, kind); + // Perform rotation-specific matrix multiplication + out[0] = a00 * b00 + a10 * b01 + a20 * b02; + out[1] = a01 * b00 + a11 * b01 + a21 * b02; + out[2] = a02 * b00 + a12 * b01 + a22 * b02; + out[3] = a03 * b00 + a13 * b01 + a23 * b02; + out[4] = a00 * b10 + a10 * b11 + a20 * b12; + out[5] = a01 * b10 + a11 * b11 + a21 * b12; + out[6] = a02 * b10 + a12 * b11 + a22 * b12; + out[7] = a03 * b10 + a13 * b11 + a23 * b12; + out[8] = a00 * b20 + a10 * b21 + a20 * b22; + out[9] = a01 * b20 + a11 * b21 + a21 * b22; + out[10] = a02 * b20 + a12 * b21 + a22 * b22; + out[11] = a03 * b20 + a13 * b21 + a23 * b22; - // ECMA-262 12.2.1 - if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) { - tolerateError(Messages.StrictVarName); - } + if (a !== out) { // If the source and destination differ, copy the unchanged last row + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + return out; +}; - if (kind === 'const') { - if (!matchKeyword('in') && !matchContextualKeyword('of')) { - expect('='); - init = isolateCoverGrammar(parseAssignmentExpression); - } - } else if ((!options.inFor && id.type !== Syntax.Identifier) || match('=')) { - expect('='); - init = isolateCoverGrammar(parseAssignmentExpression); - } +/** + * Rotates a matrix by the given angle around the X axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +mat4.rotateX = function (out, a, rad) { + var s = Math.sin(rad), + c = Math.cos(rad), + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; - return node.finishVariableDeclarator(id, init); + if (a !== out) { // If the source and destination differ, copy the unchanged rows + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; } - function parseBindingList(kind, options) { - var list = [parseLexicalBinding(kind, options)]; + // Perform axis-specific matrix multiplication + out[4] = a10 * c + a20 * s; + out[5] = a11 * c + a21 * s; + out[6] = a12 * c + a22 * s; + out[7] = a13 * c + a23 * s; + out[8] = a20 * c - a10 * s; + out[9] = a21 * c - a11 * s; + out[10] = a22 * c - a12 * s; + out[11] = a23 * c - a13 * s; + return out; +}; - while (match(',')) { - lex(); - list.push(parseLexicalBinding(kind, options)); - } +/** + * Rotates a matrix by the given angle around the Y axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +mat4.rotateY = function (out, a, rad) { + var s = Math.sin(rad), + c = Math.cos(rad), + a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; - return list; + if (a !== out) { // If the source and destination differ, copy the unchanged rows + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; } + // Perform axis-specific matrix multiplication + out[0] = a00 * c - a20 * s; + out[1] = a01 * c - a21 * s; + out[2] = a02 * c - a22 * s; + out[3] = a03 * c - a23 * s; + out[8] = a00 * s + a20 * c; + out[9] = a01 * s + a21 * c; + out[10] = a02 * s + a22 * c; + out[11] = a03 * s + a23 * c; + return out; +}; - function tokenizerState() { - return { - index: index, - lineNumber: lineNumber, - lineStart: lineStart, - hasLineTerminator: hasLineTerminator, - lastIndex: lastIndex, - lastLineNumber: lastLineNumber, - lastLineStart: lastLineStart, - startIndex: startIndex, - startLineNumber: startLineNumber, - startLineStart: startLineStart, - lookahead: lookahead, - tokenCount: extra.tokens ? extra.tokens.length : 0 - }; - } +/** + * Rotates a matrix by the given angle around the Z axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +mat4.rotateZ = function (out, a, rad) { + var s = Math.sin(rad), + c = Math.cos(rad), + a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; - function resetTokenizerState(ts) { - index = ts.index; - lineNumber = ts.lineNumber; - lineStart = ts.lineStart; - hasLineTerminator = ts.hasLineTerminator; - lastIndex = ts.lastIndex; - lastLineNumber = ts.lastLineNumber; - lastLineStart = ts.lastLineStart; - startIndex = ts.startIndex; - startLineNumber = ts.startLineNumber; - startLineStart = ts.startLineStart; - lookahead = ts.lookahead; - if (extra.tokens) { - extra.tokens.splice(ts.tokenCount, extra.tokens.length); - } + if (a !== out) { // If the source and destination differ, copy the unchanged last row + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; } - function isLexicalDeclaration() { - var lexical, ts; - - ts = tokenizerState(); - - lex(); - lexical = (lookahead.type === Token.Identifier) || match('[') || match('{') || - matchKeyword('let') || matchKeyword('yield'); + // Perform axis-specific matrix multiplication + out[0] = a00 * c + a10 * s; + out[1] = a01 * c + a11 * s; + out[2] = a02 * c + a12 * s; + out[3] = a03 * c + a13 * s; + out[4] = a10 * c - a00 * s; + out[5] = a11 * c - a01 * s; + out[6] = a12 * c - a02 * s; + out[7] = a13 * c - a03 * s; + return out; +}; - resetTokenizerState(ts); +/** + * Creates a matrix from a quaternion rotation and vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {vec3} v Translation vector + * @returns {mat4} out + */ +mat4.fromRotationTranslation = function (out, q, v) { + // Quaternion math + var x = q[0], y = q[1], z = q[2], w = q[3], + x2 = x + x, + y2 = y + y, + z2 = z + z, - return lexical; - } + xx = x * x2, + xy = x * y2, + xz = x * z2, + yy = y * y2, + yz = y * z2, + zz = z * z2, + wx = w * x2, + wy = w * y2, + wz = w * z2; - function parseLexicalDeclaration(options) { - var kind, declarations, node = new Node(); + out[0] = 1 - (yy + zz); + out[1] = xy + wz; + out[2] = xz - wy; + out[3] = 0; + out[4] = xy - wz; + out[5] = 1 - (xx + zz); + out[6] = yz + wx; + out[7] = 0; + out[8] = xz + wy; + out[9] = yz - wx; + out[10] = 1 - (xx + yy); + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + + return out; +}; - kind = lex().value; - assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); +mat4.fromQuat = function (out, q) { + var x = q[0], y = q[1], z = q[2], w = q[3], + x2 = x + x, + y2 = y + y, + z2 = z + z, - declarations = parseBindingList(kind, options); + xx = x * x2, + yx = y * x2, + yy = y * y2, + zx = z * x2, + zy = z * y2, + zz = z * z2, + wx = w * x2, + wy = w * y2, + wz = w * z2; - consumeSemicolon(); + out[0] = 1 - yy - zz; + out[1] = yx + wz; + out[2] = zx - wy; + out[3] = 0; - return node.finishLexicalDeclaration(declarations, kind); - } + out[4] = yx - wz; + out[5] = 1 - xx - zz; + out[6] = zy + wx; + out[7] = 0; - function parseRestElement(params) { - var param, node = new Node(); + out[8] = zx + wy; + out[9] = zy - wx; + out[10] = 1 - xx - yy; + out[11] = 0; - lex(); + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; - if (match('{')) { - throwError(Messages.ObjectPatternAsRestParameter); - } + return out; +}; - params.push(lookahead); +/** + * Generates a frustum matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Number} left Left bound of the frustum + * @param {Number} right Right bound of the frustum + * @param {Number} bottom Bottom bound of the frustum + * @param {Number} top Top bound of the frustum + * @param {Number} near Near bound of the frustum + * @param {Number} far Far bound of the frustum + * @returns {mat4} out + */ +mat4.frustum = function (out, left, right, bottom, top, near, far) { + var rl = 1 / (right - left), + tb = 1 / (top - bottom), + nf = 1 / (near - far); + out[0] = (near * 2) * rl; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = (near * 2) * tb; + out[6] = 0; + out[7] = 0; + out[8] = (right + left) * rl; + out[9] = (top + bottom) * tb; + out[10] = (far + near) * nf; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[14] = (far * near * 2) * nf; + out[15] = 0; + return out; +}; - param = parseVariableIdentifier(); +/** + * Generates a perspective projection matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ +mat4.perspective = function (out, fovy, aspect, near, far) { + var f = 1.0 / Math.tan(fovy / 2), + nf = 1 / (near - far); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = (far + near) * nf; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[14] = (2 * far * near) * nf; + out[15] = 0; + return out; +}; - if (match('=')) { - throwError(Messages.DefaultRestParameter); - } +/** + * Generates a orthogonal projection matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ +mat4.ortho = function (out, left, right, bottom, top, near, far) { + var lr = 1 / (left - right), + bt = 1 / (bottom - top), + nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 2 * nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = (far + near) * nf; + out[15] = 1; + return out; +}; - if (!match(')')) { - throwError(Messages.ParameterAfterRestParameter); - } +/** + * Generates a look-at matrix with the given eye position, focal point, and up axis + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {vec3} eye Position of the viewer + * @param {vec3} center Point the viewer is looking at + * @param {vec3} up vec3 pointing up + * @returns {mat4} out + */ +mat4.lookAt = function (out, eye, center, up) { + var x0, x1, x2, y0, y1, y2, z0, z1, z2, len, + eyex = eye[0], + eyey = eye[1], + eyez = eye[2], + upx = up[0], + upy = up[1], + upz = up[2], + centerx = center[0], + centery = center[1], + centerz = center[2]; - return node.finishRestElement(param); + if (Math.abs(eyex - centerx) < GLMAT_EPSILON && + Math.abs(eyey - centery) < GLMAT_EPSILON && + Math.abs(eyez - centerz) < GLMAT_EPSILON) { + return mat4.identity(out); } - // ECMA-262 13.4 Empty Statement - - function parseEmptyStatement(node) { - expect(';'); - return node.finishEmptyStatement(); - } + z0 = eyex - centerx; + z1 = eyey - centery; + z2 = eyez - centerz; - // ECMA-262 12.4 Expression Statement + len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); + z0 *= len; + z1 *= len; + z2 *= len; - function parseExpressionStatement(node) { - var expr = parseExpression(); - consumeSemicolon(); - return node.finishExpressionStatement(expr); + x0 = upy * z2 - upz * z1; + x1 = upz * z0 - upx * z2; + x2 = upx * z1 - upy * z0; + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); + if (!len) { + x0 = 0; + x1 = 0; + x2 = 0; + } else { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; } - // ECMA-262 13.6 If statement - - function parseIfStatement(node) { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } + y0 = z1 * x2 - z2 * x1; + y1 = z2 * x0 - z0 * x2; + y2 = z0 * x1 - z1 * x0; - return node.finishIfStatement(test, consequent, alternate); + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); + if (!len) { + y0 = 0; + y1 = 0; + y2 = 0; + } else { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; } - // ECMA-262 13.7 Iteration Statements + out[0] = x0; + out[1] = y0; + out[2] = z0; + out[3] = 0; + out[4] = x1; + out[5] = y1; + out[6] = z1; + out[7] = 0; + out[8] = x2; + out[9] = y2; + out[10] = z2; + out[11] = 0; + out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); + out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); + out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); + out[15] = 1; - function parseDoWhileStatement(node) { - var body, test, oldInIteration; + return out; +}; - expectKeyword('do'); +/** + * Returns a string representation of a mat4 + * + * @param {mat4} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ +mat4.str = function (a) { + return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + + a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + + a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + + a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')'; +}; - oldInIteration = state.inIteration; - state.inIteration = true; +/** + * Returns Frobenius norm of a mat4 + * + * @param {mat4} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +mat4.frob = function (a) { + return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) )) +}; - body = parseStatement(); - state.inIteration = oldInIteration; +if(typeof(exports) !== 'undefined') { + exports.mat4 = mat4; +} +; +/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. - expectKeyword('while'); +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - expect('('); + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - test = parseExpression(); +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - expect(')'); +/** + * @class Quaternion + * @name quat + */ - if (match(';')) { - lex(); - } +var quat = {}; - return node.finishDoWhileStatement(body, test); - } +/** + * Creates a new identity quat + * + * @returns {quat} a new quaternion + */ +quat.create = function() { + var out = new GLMAT_ARRAY_TYPE(4); + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +}; - function parseWhileStatement(node) { - var test, body, oldInIteration; +/** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param {quat} out the receiving quaternion. + * @param {vec3} a the initial vector + * @param {vec3} b the destination vector + * @returns {quat} out + */ +quat.rotationTo = (function() { + var tmpvec3 = vec3.create(); + var xUnitVec3 = vec3.fromValues(1,0,0); + var yUnitVec3 = vec3.fromValues(0,1,0); - expectKeyword('while'); + return function(out, a, b) { + var dot = vec3.dot(a, b); + if (dot < -0.999999) { + vec3.cross(tmpvec3, xUnitVec3, a); + if (vec3.length(tmpvec3) < 0.000001) + vec3.cross(tmpvec3, yUnitVec3, a); + vec3.normalize(tmpvec3, tmpvec3); + quat.setAxisAngle(out, tmpvec3, Math.PI); + return out; + } else if (dot > 0.999999) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } else { + vec3.cross(tmpvec3, a, b); + out[0] = tmpvec3[0]; + out[1] = tmpvec3[1]; + out[2] = tmpvec3[2]; + out[3] = 1 + dot; + return quat.normalize(out, out); + } + }; +})(); - expect('('); +/** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param {vec3} view the vector representing the viewing direction + * @param {vec3} right the vector representing the local "right" direction + * @param {vec3} up the vector representing the local "up" direction + * @returns {quat} out + */ +quat.setAxes = (function() { + var matr = mat3.create(); - test = parseExpression(); + return function(out, view, right, up) { + matr[0] = right[0]; + matr[3] = right[1]; + matr[6] = right[2]; - expect(')'); + matr[1] = up[0]; + matr[4] = up[1]; + matr[7] = up[2]; - oldInIteration = state.inIteration; - state.inIteration = true; + matr[2] = -view[0]; + matr[5] = -view[1]; + matr[8] = -view[2]; - body = parseStatement(); + return quat.normalize(out, quat.fromMat3(out, matr)); + }; +})(); - state.inIteration = oldInIteration; +/** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {quat} a quaternion to clone + * @returns {quat} a new quaternion + * @function + */ +quat.clone = vec4.clone; - return node.finishWhileStatement(test, body); - } +/** + * Creates a new quat initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} a new quaternion + * @function + */ +quat.fromValues = vec4.fromValues; - function parseForStatement(node) { - var init, forIn, initSeq, initStartToken, test, update, left, right, kind, declarations, - body, oldInIteration, previousAllowIn = state.allowIn; +/** + * Copy the values from one quat to another + * + * @param {quat} out the receiving quaternion + * @param {quat} a the source quaternion + * @returns {quat} out + * @function + */ +quat.copy = vec4.copy; - init = test = update = null; - forIn = true; +/** + * Set the components of a quat to the given values + * + * @param {quat} out the receiving quaternion + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} out + * @function + */ +quat.set = vec4.set; - expectKeyword('for'); +/** + * Set a quat to the identity quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ +quat.identity = function(out) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +}; - expect('('); +/** + * Sets a quat from the given angle and rotation axis, + * then returns it. + * + * @param {quat} out the receiving quaternion + * @param {vec3} axis the axis around which to rotate + * @param {Number} rad the angle in radians + * @returns {quat} out + **/ +quat.setAxisAngle = function(out, axis, rad) { + rad = rad * 0.5; + var s = Math.sin(rad); + out[0] = s * axis[0]; + out[1] = s * axis[1]; + out[2] = s * axis[2]; + out[3] = Math.cos(rad); + return out; +}; - if (match(';')) { - lex(); - } else { - if (matchKeyword('var')) { - init = new Node(); - lex(); +/** + * Adds two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {quat} out + * @function + */ +quat.add = vec4.add; - state.allowIn = false; - declarations = parseVariableDeclarationList({ inFor: true }); - state.allowIn = previousAllowIn; +/** + * Multiplies two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {quat} out + */ +quat.multiply = function(out, a, b) { + var ax = a[0], ay = a[1], az = a[2], aw = a[3], + bx = b[0], by = b[1], bz = b[2], bw = b[3]; - if (declarations.length === 1 && matchKeyword('in')) { - init = init.finishVariableDeclaration(declarations); - lex(); - left = init; - right = parseExpression(); - init = null; - } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { - init = init.finishVariableDeclaration(declarations); - lex(); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - init = init.finishVariableDeclaration(declarations); - expect(';'); - } - } else if (matchKeyword('const') || matchKeyword('let')) { - init = new Node(); - kind = lex().value; + out[0] = ax * bw + aw * bx + ay * bz - az * by; + out[1] = ay * bw + aw * by + az * bx - ax * bz; + out[2] = az * bw + aw * bz + ax * by - ay * bx; + out[3] = aw * bw - ax * bx - ay * by - az * bz; + return out; +}; - if (!strict && lookahead.value === 'in') { - init = init.finishIdentifier(kind); - lex(); - left = init; - right = parseExpression(); - init = null; - } else { - state.allowIn = false; - declarations = parseBindingList(kind, {inFor: true}); - state.allowIn = previousAllowIn; +/** + * Alias for {@link quat.multiply} + * @function + */ +quat.mul = quat.multiply; - if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) { - init = init.finishLexicalDeclaration(declarations, kind); - lex(); - left = init; - right = parseExpression(); - init = null; - } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { - init = init.finishLexicalDeclaration(declarations, kind); - lex(); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - consumeSemicolon(); - init = init.finishLexicalDeclaration(declarations, kind); - } - } - } else { - initStartToken = lookahead; - state.allowIn = false; - init = inheritCoverGrammar(parseAssignmentExpression); - state.allowIn = previousAllowIn; +/** + * Scales a quat by a scalar number + * + * @param {quat} out the receiving vector + * @param {quat} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {quat} out + * @function + */ +quat.scale = vec4.scale; - if (matchKeyword('in')) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInForIn); - } +/** + * Rotates a quaternion by the given angle about the X axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +quat.rotateX = function (out, a, rad) { + rad *= 0.5; - lex(); - reinterpretExpressionAsPattern(init); - left = init; - right = parseExpression(); - init = null; - } else if (matchContextualKeyword('of')) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInForLoop); - } + var ax = a[0], ay = a[1], az = a[2], aw = a[3], + bx = Math.sin(rad), bw = Math.cos(rad); - lex(); - reinterpretExpressionAsPattern(init); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - if (match(',')) { - initSeq = [init]; - while (match(',')) { - lex(); - initSeq.push(isolateCoverGrammar(parseAssignmentExpression)); - } - init = new WrappingNode(initStartToken).finishSequenceExpression(initSeq); - } - expect(';'); - } - } - } + out[0] = ax * bw + aw * bx; + out[1] = ay * bw + az * bx; + out[2] = az * bw - ay * bx; + out[3] = aw * bw - ax * bx; + return out; +}; - if (typeof left === 'undefined') { +/** + * Rotates a quaternion by the given angle about the Y axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +quat.rotateY = function (out, a, rad) { + rad *= 0.5; - if (!match(';')) { - test = parseExpression(); - } - expect(';'); + var ax = a[0], ay = a[1], az = a[2], aw = a[3], + by = Math.sin(rad), bw = Math.cos(rad); - if (!match(')')) { - update = parseExpression(); - } - } + out[0] = ax * bw - az * by; + out[1] = ay * bw + aw * by; + out[2] = az * bw + ax * by; + out[3] = aw * bw - ay * by; + return out; +}; - expect(')'); +/** + * Rotates a quaternion by the given angle about the Z axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +quat.rotateZ = function (out, a, rad) { + rad *= 0.5; - oldInIteration = state.inIteration; - state.inIteration = true; + var ax = a[0], ay = a[1], az = a[2], aw = a[3], + bz = Math.sin(rad), bw = Math.cos(rad); - body = isolateCoverGrammar(parseStatement); + out[0] = ax * bw + ay * bz; + out[1] = ay * bw - ax * bz; + out[2] = az * bw + aw * bz; + out[3] = aw * bw - az * bz; + return out; +}; - state.inIteration = oldInIteration; +/** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate W component of + * @returns {quat} out + */ +quat.calculateW = function (out, a) { + var x = a[0], y = a[1], z = a[2]; - return (typeof left === 'undefined') ? - node.finishForStatement(init, test, update, body) : - forIn ? node.finishForInStatement(left, right, body) : - node.finishForOfStatement(left, right, body); - } + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = -Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); + return out; +}; - // ECMA-262 13.8 The continue statement +/** + * Calculates the dot product of two quat's + * + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {Number} dot product of a and b + * @function + */ +quat.dot = vec4.dot; - function parseContinueStatement(node) { - var label = null, key; +/** + * Performs a linear interpolation between two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {quat} out + * @function + */ +quat.lerp = vec4.lerp; - expectKeyword('continue'); +/** + * Performs a spherical linear interpolation between two quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {quat} out + */ +quat.slerp = function (out, a, b, t) { + // benchmarks: + // http://jsperf.com/quaternion-slerp-implementations - // Optimize the most common form: 'continue;'. - if (source.charCodeAt(startIndex) === 0x3B) { - lex(); + var ax = a[0], ay = a[1], az = a[2], aw = a[3], + bx = b[0], by = b[1], bz = b[2], bw = b[3]; - if (!state.inIteration) { - throwError(Messages.IllegalContinue); - } + var omega, cosom, sinom, scale0, scale1; - return node.finishContinueStatement(null); - } + // calc cosine + cosom = ax * bx + ay * by + az * bz + aw * bw; + // adjust signs (if necessary) + if ( cosom < 0.0 ) { + cosom = -cosom; + bx = - bx; + by = - by; + bz = - bz; + bw = - bw; + } + // calculate coefficients + if ( (1.0 - cosom) > 0.000001 ) { + // standard case (slerp) + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } else { + // "from" and "to" quaternions are very close + // ... so we can do a linear interpolation + scale0 = 1.0 - t; + scale1 = t; + } + // calculate final values + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + + return out; +}; - if (hasLineTerminator) { - if (!state.inIteration) { - throwError(Messages.IllegalContinue); - } +/** + * Calculates the inverse of a quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate inverse of + * @returns {quat} out + */ +quat.invert = function(out, a) { + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + dot = a0*a0 + a1*a1 + a2*a2 + a3*a3, + invDot = dot ? 1.0/dot : 0; + + // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - return node.finishContinueStatement(null); - } + out[0] = -a0*invDot; + out[1] = -a1*invDot; + out[2] = -a2*invDot; + out[3] = a3*invDot; + return out; +}; - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); +/** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate conjugate of + * @returns {quat} out + */ +quat.conjugate = function (out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + return out; +}; - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.UnknownLabel, label.name); - } - } +/** + * Calculates the length of a quat + * + * @param {quat} a vector to calculate length of + * @returns {Number} length of a + * @function + */ +quat.length = vec4.length; - consumeSemicolon(); +/** + * Alias for {@link quat.length} + * @function + */ +quat.len = quat.length; - if (label === null && !state.inIteration) { - throwError(Messages.IllegalContinue); - } +/** + * Calculates the squared length of a quat + * + * @param {quat} a vector to calculate squared length of + * @returns {Number} squared length of a + * @function + */ +quat.squaredLength = vec4.squaredLength; - return node.finishContinueStatement(label); - } +/** + * Alias for {@link quat.squaredLength} + * @function + */ +quat.sqrLen = quat.squaredLength; - // ECMA-262 13.9 The break statement +/** + * Normalize a quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a quaternion to normalize + * @returns {quat} out + * @function + */ +quat.normalize = vec4.normalize; - function parseBreakStatement(node) { - var label = null, key; +/** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + * + * @param {quat} out the receiving quaternion + * @param {mat3} m rotation matrix + * @returns {quat} out + * @function + */ +quat.fromMat3 = function(out, m) { + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + var fTrace = m[0] + m[4] + m[8]; + var fRoot; - expectKeyword('break'); + if ( fTrace > 0.0 ) { + // |w| > 1/2, may as well choose w > 1/2 + fRoot = Math.sqrt(fTrace + 1.0); // 2w + out[3] = 0.5 * fRoot; + fRoot = 0.5/fRoot; // 1/(4w) + out[0] = (m[7]-m[5])*fRoot; + out[1] = (m[2]-m[6])*fRoot; + out[2] = (m[3]-m[1])*fRoot; + } else { + // |w| <= 1/2 + var i = 0; + if ( m[4] > m[0] ) + i = 1; + if ( m[8] > m[i*3+i] ) + i = 2; + var j = (i+1)%3; + var k = (i+2)%3; + + fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0); + out[i] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; + out[3] = (m[k*3+j] - m[j*3+k]) * fRoot; + out[j] = (m[j*3+i] + m[i*3+j]) * fRoot; + out[k] = (m[k*3+i] + m[i*3+k]) * fRoot; + } + + return out; +}; - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(lastIndex) === 0x3B) { - lex(); +/** + * Returns a string representation of a quatenion + * + * @param {quat} vec vector to represent as a string + * @returns {String} string representation of the vector + */ +quat.str = function (a) { + return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; +}; - if (!(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } +if(typeof(exports) !== 'undefined') { + exports.quat = quat; +} +; - return node.finishBreakStatement(null); - } - if (hasLineTerminator) { - if (!(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } - } else if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.UnknownLabel, label.name); - } - } - consumeSemicolon(); - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } - return node.finishBreakStatement(label); - } - // ECMA-262 13.10 The return statement - function parseReturnStatement(node) { - var argument = null; - expectKeyword('return'); - if (!state.inFunctionBody) { - tolerateError(Messages.IllegalReturn); - } - // 'return' followed by a space and an identifier is very common. - if (source.charCodeAt(lastIndex) === 0x20) { - if (isIdentifierStart(source.charCodeAt(lastIndex + 1))) { - argument = parseExpression(); - consumeSemicolon(); - return node.finishReturnStatement(argument); - } - } - if (hasLineTerminator) { - // HACK - return node.finishReturnStatement(null); - } - if (!match(';')) { - if (!match('}') && lookahead.type !== Token.EOF) { - argument = parseExpression(); - } - } + })(shim.exports); +})(this); - consumeSemicolon(); +},{}],143:[function(_dereq_,module,exports){ +module.exports = parseErrors - return node.finishReturnStatement(argument); - } +function parseErrors(log) { + log = String(log) - // ECMA-262 13.11 The with statement + var logs = [] + var result - function parseWithStatement(node) { - var object, body; + while (result = log.match(/ERROR\:([^\n]+)/)) { + log = log.slice(result.index + 1) - if (strict) { - tolerateError(Messages.StrictModeWith); - } + var line = result[1].trim() + var seps = line.split(':') + var emsg = seps.slice(2).join(':').trim() + var file = parseInt(seps[0], 10) + var line = parseInt(seps[1], 10) - expectKeyword('with'); + logs.push({ + message: emsg + , file: file + , line: line + }) + } - expect('('); + return logs +} - object = parseExpression(); +},{}],144:[function(_dereq_,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] - expect(')'); + i += d - body = parseStatement(); + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - return node.finishWithStatement(object, body); - } + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - // ECMA-262 13.12 The switch statement + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} - function parseSwitchCase() { - var test, consequent = [], statement, node = new Node(); +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); + value = Math.abs(value) - while (startIndex < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatementListItem(); - consequent.push(statement); - } + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } - return node.finishSwitchCase(test, consequent); + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 } + } - function parseSwitchStatement(node) { - var discriminant, cases, clause, oldInSwitch, defaultFound; + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - expectKeyword('switch'); + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - expect('('); + buffer[offset + i - d] |= s * 128 +} - discriminant = parseExpression(); +},{}],145:[function(_dereq_,module,exports){ +/*! + * node-inherit + * Copyright(c) 2011 Dmitry Filatov + * MIT Licensed + */ - expect(')'); +module.exports = _dereq_('./lib/inherit'); - expect('{'); +},{"./lib/inherit":146}],146:[function(_dereq_,module,exports){ +/** + * @module inherit + * @version 2.2.3 + * @author Filatov Dmitry + * @description This module provides some syntax sugar for "class" declarations, constructors, mixins, "super" calls and static members. + */ - cases = []; +(function(global) { - if (match('}')) { - lex(); - return node.finishSwitchStatement(discriminant, cases); +var hasIntrospection = (function(){'_';}).toString().indexOf('_') > -1, + emptyBase = function() {}, + hasOwnProperty = Object.prototype.hasOwnProperty, + objCreate = Object.create || function(ptp) { + var inheritance = function() {}; + inheritance.prototype = ptp; + return new inheritance(); + }, + objKeys = Object.keys || function(obj) { + var res = []; + for(var i in obj) { + hasOwnProperty.call(obj, i) && res.push(i); } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (startIndex < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError(Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); + return res; + }, + extend = function(o1, o2) { + for(var i in o2) { + hasOwnProperty.call(o2, i) && (o1[i] = o2[i]); } - state.inSwitch = oldInSwitch; - - expect('}'); - - return node.finishSwitchStatement(discriminant, cases); - } - - // ECMA-262 13.14 The throw statement + return o1; + }, + toStr = Object.prototype.toString, + isArray = Array.isArray || function(obj) { + return toStr.call(obj) === '[object Array]'; + }, + isFunction = function(obj) { + return toStr.call(obj) === '[object Function]'; + }, + noOp = function() {}, + needCheckProps = true, + testPropObj = { toString : '' }; - function parseThrowStatement(node) { - var argument; +for(var i in testPropObj) { // fucking ie hasn't toString, valueOf in for + testPropObj.hasOwnProperty(i) && (needCheckProps = false); +} - expectKeyword('throw'); +var specProps = needCheckProps? ['toString', 'valueOf'] : null; - if (hasLineTerminator) { - throwError(Messages.NewlineAfterThrow); +function getPropList(obj) { + var res = objKeys(obj); + if(needCheckProps) { + var specProp, i = 0; + while(specProp = specProps[i++]) { + obj.hasOwnProperty(specProp) && res.push(specProp); } - - argument = parseExpression(); - - consumeSemicolon(); - - return node.finishThrowStatement(argument); } - // ECMA-262 13.15 The try statement - - function parseCatchClause() { - var param, params = [], paramMap = {}, key, i, body, node = new Node(); - - expectKeyword('catch'); + return res; +} - expect('('); - if (match(')')) { - throwUnexpectedToken(lookahead); +function override(base, res, add) { + var addList = getPropList(add), + j = 0, len = addList.length, + name, prop; + while(j < len) { + if((name = addList[j++]) === '__self') { + continue; } + prop = add[name]; + if(isFunction(prop) && + (!hasIntrospection || prop.toString().indexOf('.__base') > -1)) { + res[name] = (function(name, prop) { + var baseMethod = base[name]? + base[name] : + name === '__constructor'? // case of inheritance from plain function + res.__self.__parent : + noOp, + result = function() { + var baseSaved = this.__base; - param = parsePattern(params); - for (i = 0; i < params.length; i++) { - key = '$' + params[i].value; - if (Object.prototype.hasOwnProperty.call(paramMap, key)) { - tolerateError(Messages.DuplicateBinding, params[i].value); - } - paramMap[key] = true; - } + this.__base = result.__base; + var res = prop.apply(this, arguments); + this.__base = baseSaved; - // ECMA-262 12.14.1 - if (strict && isRestrictedWord(param.name)) { - tolerateError(Messages.StrictCatchVariable); - } + return res; + }; + result.__base = baseMethod; - expect(')'); - body = parseBlock(); - return node.finishCatchClause(param, body); + return result; + })(name, prop); + } else { + res[name] = prop; + } } +} - function parseTryStatement(node) { - var block, handler = null, finalizer = null; +function applyMixins(mixins, res) { + var i = 1, mixin; + while(mixin = mixins[i++]) { + res? + isFunction(mixin)? + inherit.self(res, mixin.prototype, mixin) : + inherit.self(res, mixin) : + res = isFunction(mixin)? + inherit(mixins[0], mixin.prototype, mixin) : + inherit(mixins[0], mixin); + } + return res || mixins[0]; +} - expectKeyword('try'); +/** +* Creates class +* @exports +* @param {Function|Array} [baseClass|baseClassAndMixins] class (or class and mixins) to inherit from +* @param {Object} prototypeFields +* @param {Object} [staticFields] +* @returns {Function} class +*/ +function inherit() { + var args = arguments, + withMixins = isArray(args[0]), + hasBase = withMixins || isFunction(args[0]), + base = hasBase? withMixins? applyMixins(args[0]) : args[0] : emptyBase, + props = args[hasBase? 1 : 0] || {}, + staticProps = args[hasBase? 2 : 1], + res = props.__constructor || (hasBase && base.prototype.__constructor)? + function() { + return this.__constructor.apply(this, arguments); + } : + hasBase? + function() { + return base.apply(this, arguments); + } : + function() {}; - block = parseBlock(); + if(!hasBase) { + res.prototype = props; + res.prototype.__self = res.prototype.constructor = res; + return extend(res, staticProps); + } - if (matchKeyword('catch')) { - handler = parseCatchClause(); - } + extend(res, base); - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } + res.__parent = base; - if (!handler && !finalizer) { - throwError(Messages.NoCatchOrFinally); - } + var basePtp = base.prototype, + resPtp = res.prototype = objCreate(basePtp); - return node.finishTryStatement(block, handler, finalizer); - } + resPtp.__self = resPtp.constructor = res; - // ECMA-262 13.16 The debugger statement + props && override(basePtp, resPtp, props); + staticProps && override(base, res, staticProps); - function parseDebuggerStatement(node) { - expectKeyword('debugger'); + return res; +} - consumeSemicolon(); +inherit.self = function() { + var args = arguments, + withMixins = isArray(args[0]), + base = withMixins? applyMixins(args[0], args[0][0]) : args[0], + props = args[1], + staticProps = args[2], + basePtp = base.prototype; - return node.finishDebuggerStatement(); - } + props && override(basePtp, basePtp, props); + staticProps && override(base, base, staticProps); - // 13 Statements + return base; +}; - function parseStatement() { - var type = lookahead.type, - expr, - labeledBody, - key, - node; +var defineAsGlobal = true; +if(typeof exports === 'object') { + module.exports = inherit; + defineAsGlobal = false; +} - if (type === Token.EOF) { - throwUnexpectedToken(lookahead); - } +if(typeof modules === 'object') { + modules.define('inherit', function(provide) { + provide(inherit); + }); + defineAsGlobal = false; +} - if (type === Token.Punctuator && lookahead.value === '{') { - return parseBlock(); - } - isAssignmentTarget = isBindingElement = true; - node = new Node(); +if(typeof define === 'function') { + define(function(_dereq_, exports, module) { + module.exports = inherit; + }); + defineAsGlobal = false; +} - if (type === Token.Punctuator) { - switch (lookahead.value) { - case ';': - return parseEmptyStatement(node); - case '(': - return parseExpressionStatement(node); - default: - break; - } - } else if (type === Token.Keyword) { - switch (lookahead.value) { - case 'break': - return parseBreakStatement(node); - case 'continue': - return parseContinueStatement(node); - case 'debugger': - return parseDebuggerStatement(node); - case 'do': - return parseDoWhileStatement(node); - case 'for': - return parseForStatement(node); - case 'function': - return parseFunctionDeclaration(node); - case 'if': - return parseIfStatement(node); - case 'return': - return parseReturnStatement(node); - case 'switch': - return parseSwitchStatement(node); - case 'throw': - return parseThrowStatement(node); - case 'try': - return parseTryStatement(node); - case 'var': - return parseVariableStatement(node); - case 'while': - return parseWhileStatement(node); - case 'with': - return parseWithStatement(node); - default: - break; - } - } +defineAsGlobal && (global.inherit = inherit); - expr = parseExpression(); +})(this); - // ECMA-262 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); +},{}],147:[function(_dereq_,module,exports){ - key = '$' + expr.name; - if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.Redeclaration, 'Label', expr.name); - } +/** + * isArray + */ - state.labelSet[key] = true; - labeledBody = parseStatement(); - delete state.labelSet[key]; - return node.finishLabeledStatement(expr, labeledBody); - } +var isArray = Array.isArray; - consumeSemicolon(); +/** + * toString + */ - return node.finishExpressionStatement(expr); - } +var str = Object.prototype.toString; - // ECMA-262 14.1 Function Definition +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ - function parseFunctionSourceElements() { - var statement, body = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesisCount, - node = new Node(); +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; - expect('{'); +},{}],148:[function(_dereq_,module,exports){ +'use strict'; - while (startIndex < length) { - if (lookahead.type !== Token.StringLiteral) { - break; - } - token = lookahead; - statement = parseStatementListItem(); - body.push(statement); - if (statement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } +var yaml = _dereq_('./lib/js-yaml.js'); - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - oldParenthesisCount = state.parenthesizedCount; - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - state.parenthesizedCount = 0; +module.exports = yaml; - while (startIndex < length) { - if (match('}')) { - break; - } - body.push(parseStatementListItem()); - } +},{"./lib/js-yaml.js":149}],149:[function(_dereq_,module,exports){ +'use strict'; - expect('}'); - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - state.parenthesizedCount = oldParenthesisCount; +var loader = _dereq_('./js-yaml/loader'); +var dumper = _dereq_('./js-yaml/dumper'); - return node.finishBlockStatement(body); - } - function validateParam(options, param, name) { - var key = '$' + name; - if (strict) { - if (isRestrictedWord(name)) { - options.stricted = param; - options.message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = Messages.StrictParamDupe; - } - } else if (!options.firstRestricted) { - if (isRestrictedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = Messages.StrictParamDupe; - } - } - options.paramSet[key] = true; - } +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} - function parseParam(options) { - var token, param, params = [], i, def; - token = lookahead; - if (token.value === '...') { - param = parseRestElement(params); - validateParam(options, param.argument, param.argument.name); - options.params.push(param); - options.defaults.push(null); - return false; - } +module.exports.Type = _dereq_('./js-yaml/type'); +module.exports.Schema = _dereq_('./js-yaml/schema'); +module.exports.FAILSAFE_SCHEMA = _dereq_('./js-yaml/schema/failsafe'); +module.exports.JSON_SCHEMA = _dereq_('./js-yaml/schema/json'); +module.exports.CORE_SCHEMA = _dereq_('./js-yaml/schema/core'); +module.exports.DEFAULT_SAFE_SCHEMA = _dereq_('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_FULL_SCHEMA = _dereq_('./js-yaml/schema/default_full'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = _dereq_('./js-yaml/exception'); - param = parsePatternWithDefault(params); - for (i = 0; i < params.length; i++) { - validateParam(options, params[i], params[i].value); - } +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = _dereq_('./js-yaml/schema/failsafe'); +module.exports.SAFE_SCHEMA = _dereq_('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_SCHEMA = _dereq_('./js-yaml/schema/default_full'); - if (param.type === Syntax.AssignmentPattern) { - def = param.right; - param = param.left; - ++options.defaultCount; - } +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); - options.params.push(param); - options.defaults.push(def); +},{"./js-yaml/dumper":151,"./js-yaml/exception":152,"./js-yaml/loader":153,"./js-yaml/schema":155,"./js-yaml/schema/core":156,"./js-yaml/schema/default_full":157,"./js-yaml/schema/default_safe":158,"./js-yaml/schema/failsafe":159,"./js-yaml/schema/json":160,"./js-yaml/type":161}],150:[function(_dereq_,module,exports){ +'use strict'; - return !match(')'); - } - function parseParams(firstRestricted) { - var options; +function isNothing(subject) { + return (typeof subject === 'undefined') || (null === subject); +} - options = { - params: [], - defaultCount: 0, - defaults: [], - firstRestricted: firstRestricted - }; - expect('('); +function isObject(subject) { + return (typeof subject === 'object') && (null !== subject); +} - if (!match(')')) { - options.paramSet = {}; - while (startIndex < length) { - if (!parseParam(options)) { - break; - } - expect(','); - } - } - expect(')'); +function toArray(sequence) { + if (Array.isArray(sequence)) { + return sequence; + } else if (isNothing(sequence)) { + return []; + } + return [ sequence ]; +} - if (options.defaultCount === 0) { - options.defaults = []; - } - return { - params: options.params, - defaults: options.defaults, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; } + } - function parseFunctionDeclaration(node, identifierIsOptional) { - var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, - isGenerator, previousAllowYield; + return target; +} - previousAllowYield = state.allowYield; - expectKeyword('function'); +function repeat(string, count) { + var result = '', cycle; - isGenerator = match('*'); - if (isGenerator) { - lex(); - } + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } - if (!identifierIsOptional || !match('(')) { - token = lookahead; - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } + return result; +} - state.allowYield = !isGenerator; - tmp = parseParams(firstRestricted); - params = tmp.params; - defaults = tmp.defaults; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } +function isNegativeZero(number) { + return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number); +} - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwUnexpectedToken(firstRestricted, message); - } - if (strict && stricted) { - tolerateUnexpectedToken(stricted, message); - } - strict = previousStrict; - state.allowYield = previousAllowYield; +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; - return node.finishFunctionDeclaration(id, params, defaults, body, isGenerator); - } +},{}],151:[function(_dereq_,module,exports){ +'use strict'; - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, tmp, - params = [], defaults = [], body, previousStrict, node = new Node(), - isGenerator, previousAllowYield; +/*eslint-disable no-use-before-define*/ - previousAllowYield = state.allowYield; +var common = _dereq_('./common'); +var YAMLException = _dereq_('./exception'); +var DEFAULT_FULL_SCHEMA = _dereq_('./schema/default_full'); +var DEFAULT_SAFE_SCHEMA = _dereq_('./schema/default_safe'); - expectKeyword('function'); +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; - isGenerator = match('*'); - if (isGenerator) { - lex(); - } +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - state.allowYield = !isGenerator; - if (!match('(')) { - token = lookahead; - id = (!strict && !isGenerator && matchKeyword('yield')) ? parseNonComputedProperty() : parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } +var ESCAPE_SEQUENCES = {}; - tmp = parseParams(firstRestricted); - params = tmp.params; - defaults = tmp.defaults; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwUnexpectedToken(firstRestricted, message); - } - if (strict && stricted) { - tolerateUnexpectedToken(stricted, message); - } - strict = previousStrict; - state.allowYield = previousAllowYield; +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; - return node.finishFunctionExpression(id, params, defaults, body, isGenerator); - } +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; - // ECMA-262 14.5 Class Definitions + if (null === map) { + return {}; + } - function parseClassBody() { - var classBody, token, isStatic, hasConstructor = false, body, method, computed, key; + result = {}; + keys = Object.keys(map); - classBody = new Node(); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); - expect('{'); - body = []; - while (!match('}')) { - if (match(';')) { - lex(); - } else { - method = new Node(); - token = lookahead; - isStatic = false; - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - if (key.name === 'static' && (lookaheadPropertyName() || match('*'))) { - token = lookahead; - isStatic = true; - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - } - } - } - method = tryParseMethodDefinition(token, key, computed, method); - if (method) { - method['static'] = isStatic; // jscs:ignore requireDotNotation - if (method.kind === 'init') { - method.kind = 'method'; - } - if (!isStatic) { - if (!method.computed && (method.key.name || method.key.value.toString()) === 'constructor') { - if (method.kind !== 'method' || !method.method || method.value.generator) { - throwUnexpectedToken(token, Messages.ConstructorSpecialMethod); - } - if (hasConstructor) { - throwUnexpectedToken(token, Messages.DuplicateConstructor); - } else { - hasConstructor = true; - } - method.kind = 'constructor'; - } - } else { - if (!method.computed && (method.key.name || method.key.value.toString()) === 'prototype') { - throwUnexpectedToken(token, Messages.StaticPrototype); - } - } - method.type = Syntax.MethodDefinition; - delete method.method; - delete method.shorthand; - body.push(method); - } else { - throwUnexpectedToken(lookahead); - } - } - } - lex(); - return classBody.finishClassBody(body); + if ('!!' === tag.slice(0, 2)) { + tag = 'tag:yaml.org,2002:' + tag.slice(2); } - function parseClassDeclaration(identifierIsOptional) { - var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; - strict = true; - - expectKeyword('class'); + type = schema.compiledTypeMap[tag]; - if (!identifierIsOptional || lookahead.type === Token.Identifier) { - id = parseVariableIdentifier(); - } + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } - if (matchKeyword('extends')) { - lex(); - superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); - } - classBody = parseClassBody(); - strict = previousStrict; + result[tag] = style; + } - return classNode.finishClassDeclaration(id, superClass, classBody); - } + return result; +} - function parseClassExpression() { - var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; - strict = true; +function encodeHex(character) { + var string, handle, length; - expectKeyword('class'); + string = character.toString(16).toUpperCase(); - if (lookahead.type === Token.Identifier) { - id = parseVariableIdentifier(); - } + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } - if (matchKeyword('extends')) { - lex(); - superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); - } - classBody = parseClassBody(); - strict = previousStrict; + return '\\' + handle + common.repeat('0', length - string.length) + string; +} - return classNode.finishClassExpression(id, superClass, classBody); - } +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; - // ECMA-262 15.2 Modules + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; - function parseModuleSpecifier() { - var node = new Node(); + this.tag = null; + this.result = ''; - if (lookahead.type !== Token.StringLiteral) { - throwError(Messages.InvalidModuleSpecifier); - } - return node.finishLiteral(lex()); - } + this.duplicates = []; + this.usedDuplicates = null; +} - // ECMA-262 15.2.3 Exports +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; - function parseExportSpecifier() { - var exported, local, node = new Node(), def; - if (matchKeyword('default')) { - // export {default} from 'something'; - def = new Node(); - lex(); - local = def.finishIdentifier('default'); - } else { - local = parseVariableIdentifier(); - } - if (matchContextualKeyword('as')) { - lex(); - exported = parseNonComputedProperty(); - } - return node.finishExportSpecifier(local, exported); + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== '\n') { + result += ind; } + result += line; + } - function parseExportNamedDeclaration(node) { - var declaration = null, - isExportFromIdentifier, - src = null, specifiers = []; + return result; +} - // non-default export - if (lookahead.type === Token.Keyword) { - // covers: - // export var f = 1; - switch (lookahead.value) { - case 'let': - case 'const': - declaration = parseLexicalDeclaration({inFor: false}); - return node.finishExportNamedDeclaration(declaration, specifiers, null); - case 'var': - case 'class': - case 'function': - declaration = parseStatementListItem(); - return node.finishExportNamedDeclaration(declaration, specifiers, null); - } - } +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} - expect('{'); - while (!match('}')) { - isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); - specifiers.push(parseExportSpecifier()); - if (!match('}')) { - expect(','); - if (match('}')) { - break; - } - } - } - expect('}'); +function testImplicitResolving(state, str) { + var index, length, type; - if (matchContextualKeyword('from')) { - // covering: - // export {default} from 'foo'; - // export {foo} from 'foo'; - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - } else if (isExportFromIdentifier) { - // covering: - // export {default}; // missing fromClause - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } else { - // cover - // export {foo}; - consumeSemicolon(); - } - return node.finishExportNamedDeclaration(declaration, specifiers, src); + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; } + } - function parseExportDefaultDeclaration(node) { - var declaration = null, - expression = null; + return false; +} - // covers: - // export default ... - expectKeyword('default'); +function StringBuilder(source) { + this.source = source; + this.result = ''; + this.checkpoint = 0; +} - if (matchKeyword('function')) { - // covers: - // export default function foo () {} - // export default function () {} - declaration = parseFunctionDeclaration(new Node(), true); - return node.finishExportDefaultDeclaration(declaration); - } - if (matchKeyword('class')) { - declaration = parseClassDeclaration(true); - return node.finishExportDefaultDeclaration(declaration); - } +StringBuilder.prototype.takeUpTo = function (position) { + var er; - if (matchContextualKeyword('from')) { - throwError(Messages.UnexpectedToken, lookahead.value); - } + if (position < this.checkpoint) { + er = new Error('position should be > checkpoint'); + er.position = position; + er.checkpoint = this.checkpoint; + throw er; + } - // covers: - // export default {}; - // export default []; - // export default (1 + 2); - if (match('{')) { - expression = parseObjectInitializer(); - } else if (match('[')) { - expression = parseArrayInitializer(); - } else { - expression = parseAssignmentExpression(); - } - consumeSemicolon(); - return node.finishExportDefaultDeclaration(expression); - } + this.result += this.source.slice(this.checkpoint, position); + this.checkpoint = position; + return this; +}; - function parseExportAllDeclaration(node) { - var src; +StringBuilder.prototype.escapeChar = function () { + var character, esc; - // covers: - // export * from 'foo'; - expect('*'); - if (!matchContextualKeyword('from')) { - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); + character = this.source.charCodeAt(this.checkpoint); + esc = ESCAPE_SEQUENCES[character] || encodeHex(character); + this.result += esc; + this.checkpoint += 1; - return node.finishExportAllDeclaration(src); - } + return this; +}; - function parseExportDeclaration() { - var node = new Node(); - if (state.inFunctionBody) { - throwError(Messages.IllegalExportDeclaration); - } +StringBuilder.prototype.finish = function () { + if (this.source.length > this.checkpoint) { + this.takeUpTo(this.source.length); + } +}; - expectKeyword('export'); +function writeScalar(state, object, level, iskey) { + var simple, first, spaceWrap, folded, literal, single, double, + sawLineFeed, linePosition, longestLine, indent, max, character, + position, escapeSeq, hexEsc, previous, lineLength, modifier, + trailingLineBreaks, result; - if (matchKeyword('default')) { - return parseExportDefaultDeclaration(node); - } - if (match('*')) { - return parseExportAllDeclaration(node); - } - return parseExportNamedDeclaration(node); - } + if (0 === object.length) { + state.dump = "''"; + return; + } - // ECMA-262 15.2.2 Imports + if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { + state.dump = "'" + object + "'"; + return; + } - function parseImportSpecifier() { - // import {} ...; - var local, imported, node = new Node(); + simple = true; + first = object.length ? object.charCodeAt(0) : 0; + spaceWrap = (CHAR_SPACE === first || + CHAR_SPACE === object.charCodeAt(object.length - 1)); - imported = parseNonComputedProperty(); - if (matchContextualKeyword('as')) { - lex(); - local = parseVariableIdentifier(); - } + // Simplified check for restricted first characters + // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29 + if (CHAR_MINUS === first || + CHAR_QUESTION === first || + CHAR_COMMERCIAL_AT === first || + CHAR_GRAVE_ACCENT === first) { + simple = false; + } - return node.finishImportSpecifier(local, imported); - } + // can only use > and | if not wrapped in spaces or is not a key. + if (spaceWrap) { + simple = false; + folded = false; + literal = false; + } else { + folded = !iskey; + literal = !iskey; + } - function parseNamedImports() { - var specifiers = []; - // {foo, bar as bas} - expect('{'); - while (!match('}')) { - specifiers.push(parseImportSpecifier()); - if (!match('}')) { - expect(','); - if (match('}')) { - break; - } - } - } - expect('}'); - return specifiers; - } + single = true; + double = new StringBuilder(object); - function parseImportDefaultSpecifier() { - // import ...; - var local, node = new Node(); + sawLineFeed = false; + linePosition = 0; + longestLine = 0; - local = parseNonComputedProperty(); + indent = state.indent * level; + max = state.lineWidth; + if (max === -1) { + // Replace -1 with biggest ingeger number according to + // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 + max = 9007199254740991; + } - return node.finishImportDefaultSpecifier(local); + if (indent < 40) { + max -= indent; + } else { + max = 40; + } + + for (position = 0; position < object.length; position++) { + character = object.charCodeAt(position); + if (simple) { + // Characters that can never appear in the simple scalar + if (!simpleChar(character)) { + simple = false; + } else { + // Still simple. If we make it all the way through like + // this, then we can just dump the string as-is. + continue; + } } - function parseImportNamespaceSpecifier() { - // import <* as foo> ...; - var local, node = new Node(); + if (single && character === CHAR_SINGLE_QUOTE) { + single = false; + } - expect('*'); - if (!matchContextualKeyword('as')) { - throwError(Messages.NoAsAfterImportNamespace); - } - lex(); - local = parseNonComputedProperty(); + escapeSeq = ESCAPE_SEQUENCES[character]; + hexEsc = needsHexEscape(character); - return node.finishImportNamespaceSpecifier(local); + if (!escapeSeq && !hexEsc) { + continue; } - function parseImportDeclaration() { - var specifiers = [], src, node = new Node(); - - if (state.inFunctionBody) { - throwError(Messages.IllegalImportDeclaration); + if (character !== CHAR_LINE_FEED && + character !== CHAR_DOUBLE_QUOTE && + character !== CHAR_SINGLE_QUOTE) { + folded = false; + literal = false; + } else if (character === CHAR_LINE_FEED) { + sawLineFeed = true; + single = false; + if (position > 0) { + previous = object.charCodeAt(position - 1); + if (previous === CHAR_SPACE) { + literal = false; + folded = false; + } + } + if (folded) { + lineLength = position - linePosition; + linePosition = position; + if (lineLength > longestLine) { + longestLine = lineLength; } + } + } - expectKeyword('import'); + if (character !== CHAR_DOUBLE_QUOTE) { + single = false; + } - if (lookahead.type === Token.StringLiteral) { - // import 'foo'; - src = parseModuleSpecifier(); - } else { + double.takeUpTo(position); + double.escapeChar(); + } - if (match('{')) { - // import {bar} - specifiers = specifiers.concat(parseNamedImports()); - } else if (match('*')) { - // import * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (isIdentifierName(lookahead) && !matchKeyword('default')) { - // import foo - specifiers.push(parseImportDefaultSpecifier()); - if (match(',')) { - lex(); - if (match('*')) { - // import foo, * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (match('{')) { - // import foo, {bar} - specifiers = specifiers.concat(parseNamedImports()); - } else { - throwUnexpectedToken(lookahead); - } - } - } else { - throwUnexpectedToken(lex()); - } + if (simple && testImplicitResolving(state, object)) { + simple = false; + } - if (!matchContextualKeyword('from')) { - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - } + modifier = ''; + if (folded || literal) { + trailingLineBreaks = 0; + if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) { + trailingLineBreaks += 1; + if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) { + trailingLineBreaks += 1; + } + } - consumeSemicolon(); - return node.finishImportDeclaration(specifiers, src); + if (trailingLineBreaks === 0) { + modifier = '-'; + } else if (trailingLineBreaks === 2) { + modifier = '+'; } + } - // ECMA-262 15.1 Scripts + if (literal && longestLine < max) { + folded = false; + } - function parseScriptBody() { - var statement, body = [], token, directive, firstRestricted; + // If it's literally one line, then don't bother with the literal. + // We may still want to do a fold, though, if it's a super long line. + if (!sawLineFeed) { + literal = false; + } - while (startIndex < length) { - token = lookahead; - if (token.type !== Token.StringLiteral) { - break; - } + if (simple) { + state.dump = object; + } else if (single) { + state.dump = '\'' + object + '\''; + } else if (folded) { + result = fold(object, max); + state.dump = '>' + modifier + '\n' + indentString(result, indent); + } else if (literal) { + if (!modifier) { + object = object.replace(/\n$/, ''); + } + state.dump = '|' + modifier + '\n' + indentString(object, indent); + } else if (double) { + double.finish(); + state.dump = '"' + double.result + '"'; + } else { + throw new Error('Failed to dump scalar value'); + } - statement = parseStatementListItem(); - body.push(statement); - if (statement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } + return; +} - while (startIndex < length) { - statement = parseStatementListItem(); - /* istanbul ignore if */ - if (typeof statement === 'undefined') { - break; - } - body.push(statement); - } - return body; +// The `trailing` var is a regexp match of any trailing `\n` characters. +// +// There are three cases we care about: +// +// 1. One trailing `\n` on the string. Just use `|` or `>`. +// This is the assumed default. (trailing = null) +// 2. No trailing `\n` on the string. Use `|-` or `>-` to "chomp" the end. +// 3. More than one trailing `\n` on the string. Use `|+` or `>+`. +// +// In the case of `>+`, these line breaks are *not* doubled (like the line +// breaks within the string), so it's important to only end with the exact +// same number as we started. +function fold(object, max) { + var result = '', + position = 0, + length = object.length, + trailing = /\n+$/.exec(object), + newLine; + + if (trailing) { + length = trailing.index + 1; + } + + while (position < length) { + newLine = object.indexOf('\n', position); + if (newLine > length || newLine === -1) { + if (result) { + result += '\n\n'; + } + result += foldLine(object.slice(position, length), max); + position = length; + } else { + if (result) { + result += '\n\n'; + } + result += foldLine(object.slice(position, newLine), max); + position = newLine + 1; } + } + if (trailing && trailing[0] !== '\n') { + result += trailing[0]; + } - function parseProgram() { - var body, node; + return result; +} - peek(); - node = new Node(); +function foldLine(line, max) { + if (line === '') { + return line; + } - body = parseScriptBody(); - return node.finishProgram(body, state.sourceType); - } + var foldRe = /[^\s] [^\s]/g, + result = '', + prevMatch = 0, + foldStart = 0, + match = foldRe.exec(line), + index, + foldEnd, + folded; - function filterTokenLocation() { - var i, entry, token, tokens = []; + while (match) { + index = match.index; - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (entry.regex) { - token.regex = { - pattern: entry.regex.pattern, - flags: entry.regex.flags - }; - } - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } + // when we cross the max len, if the previous match would've + // been ok, use that one, and carry on. If there was no previous + // match on this fold section, then just have a long line. + if (index - foldStart > max) { + if (prevMatch !== foldStart) { + foldEnd = prevMatch; + } else { + foldEnd = index; + } - extra.tokens = tokens; + if (result) { + result += '\n'; + } + folded = line.slice(foldStart, foldEnd); + result += folded; + foldStart = foldEnd + 1; } + prevMatch = index + 1; + match = foldRe.exec(line); + } + + if (result) { + result += '\n'; + } + + // if we end up with one last word at the end, then the last bit might + // be slightly bigger than we wanted, because we exited out of the loop. + if (foldStart !== prevMatch && line.length - foldStart > max) { + result += line.slice(foldStart, prevMatch) + '\n' + + line.slice(prevMatch + 1); + } else { + result += line.slice(foldStart); + } - function tokenize(code, options, delegate) { - var toString, - tokens; + return result; +} - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } +// Returns true if character can be found in a simple scalar +function simpleChar(character) { + return CHAR_TAB !== character && + CHAR_LINE_FEED !== character && + CHAR_CARRIAGE_RETURN !== character && + CHAR_COMMA !== character && + CHAR_LEFT_SQUARE_BRACKET !== character && + CHAR_RIGHT_SQUARE_BRACKET !== character && + CHAR_LEFT_CURLY_BRACKET !== character && + CHAR_RIGHT_CURLY_BRACKET !== character && + CHAR_SHARP !== character && + CHAR_AMPERSAND !== character && + CHAR_ASTERISK !== character && + CHAR_EXCLAMATION !== character && + CHAR_VERTICAL_LINE !== character && + CHAR_GREATER_THAN !== character && + CHAR_SINGLE_QUOTE !== character && + CHAR_DOUBLE_QUOTE !== character && + CHAR_PERCENT !== character && + CHAR_COLON !== character && + !ESCAPE_SEQUENCES[character] && + !needsHexEscape(character); +} - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - length = source.length; - lookahead = null; - state = { - allowIn: true, - allowYield: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1, - curlyStack: [] - }; +// Returns true if the character code needs to be escaped. +function needsHexEscape(character) { + return !((0x00020 <= character && character <= 0x00007E) || + (0x00085 === character) || + (0x000A0 <= character && character <= 0x00D7FF) || + (0x0E000 <= character && character <= 0x00FFFD) || + (0x10000 <= character && character <= 0x10FFFF)); +} - extra = {}; +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; - // Options matching. - options = options || {}; + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (0 !== index) { + _result += ', '; + } + _result += state.dump; + } + } - // Of course we collect tokens here. - options.tokens = true; - extra.tokens = []; - extra.tokenValues = []; - extra.tokenize = true; - extra.delegate = delegate; + state.tag = _tag; + state.dump = '[' + _result + ']'; +} - // The following two fields are necessary to compute the Regex tokens. - extra.openParenToken = -1; - extra.openCurlyToken = -1; +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || 0 !== index) { + _result += generateNextLine(state, level); + } + _result += '- ' + state.dump; + } + } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} - try { - peek(); - if (lookahead.type === Token.EOF) { - return extra.tokens; - } +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; - lex(); - while (lookahead.type !== Token.EOF) { - try { - lex(); - } catch (lexError) { - if (extra.errors) { - recordError(lexError); - // We have to break on the first error - // to avoid infinite loops. - break; - } else { - throw lexError; - } - } - } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; - tokens = extra.tokens; - if (typeof extra.errors !== 'undefined') { - tokens.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } - return tokens; + if (0 !== index) { + pairBuffer += ', '; } - function parse(code, options) { - var program, toString; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - length = source.length; - lookahead = null; - state = { - allowIn: true, - allowYield: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1, - curlyStack: [], - sourceType: 'script' - }; - strict = false; + if (state.dump.length > 1024) { + pairBuffer += '? '; + } - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; + pairBuffer += state.dump + ': '; - if (extra.loc && options.source !== null && options.source !== undefined) { - extra.source = toString(options.source); - } + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - if (extra.attachComment) { - extra.range = true; - extra.comments = []; - extra.bottomRightStack = []; - extra.trailingComments = []; - extra.leadingComments = []; - } - if (options.sourceType === 'module') { - // very restrictive condition for now - state.sourceType = options.sourceType; - strict = true; - } - } + pairBuffer += state.dump; - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } + // Both key and value are valid. + _result += pairBuffer; + } - return program; - } + state.tag = _tag; + state.dump = '{' + _result + '}'; +} - // Sync with *.json manifests. - exports.version = '2.7.1'; +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; - exports.tokenize = tokenize; + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } - exports.parse = parse; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; - // Deep copy. - /* istanbul ignore next */ - exports.Syntax = (function () { - var name, types = {}; + if (!compact || 0 !== index) { + pairBuffer += generateNextLine(state, level); + } - if (typeof Object.create === 'function') { - types = Object.create(null); - } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } + explicitPair = (null !== state.tag && '?' !== state.tag) || + (state.dump && state.dump.length > 1024); - return types; - }()); + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } -})); -/* vim: set sw=4 ts=4 et tw=80 : */ + pairBuffer += state.dump; -},{}],137:[function(_dereq_,module,exports){ -'use strict'; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } -module.exports = clip; + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } -/* clip features between two axis-parallel lines: - * | | - * ___|___ | / - * / | \____|____/ - * | | - */ + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } -function clip(features, scale, k1, k2, axis, intersect, minAll, maxAll) { + pairBuffer += state.dump; - k1 /= scale; - k2 /= scale; + // Both key and value are valid. + _result += pairBuffer; + } - if (minAll >= k1 && maxAll <= k2) return features; // trivial accept - else if (minAll > k2 || maxAll < k1) return null; // trivial reject + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} - var clipped = []; +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; - for (var i = 0; i < features.length; i++) { + typeList = explicit ? state.explicitTypes : state.implicitTypes; - var feature = features[i], - geometry = feature.geometry, - type = feature.type, - min, max; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; - min = feature.min[axis]; - max = feature.max[axis]; + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { - if (min >= k1 && max <= k2) { // trivial accept - clipped.push(feature); - continue; - } else if (min > k2 || max < k1) continue; // trivial reject + state.tag = explicit ? type.tag : '?'; - var slices = type === 1 ? - clipPoints(geometry, k1, k2, axis) : - clipGeometry(geometry, k1, k2, axis, intersect, type === 3); + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; - if (slices.length) { - // if a feature got clipped, it will likely get clipped on the next zoom level as well, - // so there's no need to recalculate bboxes - clipped.push({ - geometry: slices, - type: type, - tags: features[i].tags || null, - min: feature.min, - max: feature.max - }); + if ('[object Function]' === _toString.call(type.represent)) { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); } - } - - return clipped.length ? clipped : null; -} - -function clipPoints(geometry, k1, k2, axis) { - var slice = []; - for (var i = 0; i < geometry.length; i++) { - var a = geometry[i], - ak = a[axis]; + state.dump = _result; + } - if (ak >= k1 && ak <= k2) slice.push(a); + return true; } - return slice; + } + + return false; } -function clipGeometry(geometry, k1, k2, axis, intersect, closed) { +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; - var slices = []; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } - for (var i = 0; i < geometry.length; i++) { + var type = _toString.call(state.dump); - var ak = 0, - bk = 0, - b = null, - points = geometry[i], - area = points.area, - dist = points.dist, - len = points.length, - a, j, last; + if (block) { + block = (0 > state.flowLevel || state.flowLevel > level); + } - var slice = []; + var objectOrArray = '[object Object]' === type || '[object Array]' === type, + duplicateIndex, + duplicate; - for (j = 0; j < len - 1; j++) { - a = b || points[j]; - b = points[j + 1]; - ak = bk || a[axis]; - bk = b[axis]; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } - if (ak < k1) { + if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { + compact = false; + } - if ((bk > k2)) { // ---|-----|--> - slice.push(intersect(a, b, k1), intersect(a, b, k2)); - if (!closed) slice = newSlice(slices, slice, area, dist); + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if ('[object Object]' === type) { + if (block && (0 !== Object.keys(state.dump).length)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if ('[object Array]' === type) { + if (block && (0 !== state.dump.length)) { + writeBlockSequence(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if ('[object String]' === type) { + if ('?' !== state.tag) { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) { + return false; + } + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } - } else if (bk >= k1) slice.push(intersect(a, b, k1)); // ---|--> | + if (null !== state.tag && '?' !== state.tag) { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } - } else if (ak > k2) { + return true; +} - if ((bk < k1)) { // <--|-----|--- - slice.push(intersect(a, b, k2), intersect(a, b, k1)); - if (!closed) slice = newSlice(slices, slice, area, dist); +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; - } else if (bk <= k2) slice.push(intersect(a, b, k2)); // | <--|--- + inspectNode(object, objects, duplicatesIndexes); - } else { + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} - slice.push(a); +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; - if (bk < k1) { // <--|--- | - slice.push(intersect(a, b, k1)); - if (!closed) slice = newSlice(slices, slice, area, dist); + if (null !== object && 'object' === typeof object) { + index = objects.indexOf(object); + if (-1 !== index) { + if (-1 === duplicatesIndexes.indexOf(index)) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); - } else if (bk > k2) { // | ---|--> - slice.push(intersect(a, b, k2)); - if (!closed) slice = newSlice(slices, slice, area, dist); - } - // | --> | - } + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); } + } else { + objectKeyList = Object.keys(object); - // add the last point - a = points[len - 1]; - ak = a[axis]; - if (ak >= k1 && ak <= k2) slice.push(a); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} - // close the polygon if its endpoints are not the same after clipping +function dump(input, options) { + options = options || {}; - last = slice[slice.length - 1]; - if (closed && last && (slice[0][0] !== last[0] || slice[0][1] !== last[1])) slice.push(slice[0]); + var state = new State(options); - // add the final slice - newSlice(slices, slice, area, dist); - } + getDuplicateReferences(input, state); - return slices; + if (writeNode(state, 0, input, true, true)) { + return state.dump + '\n'; + } + return ''; } -function newSlice(slices, slice, area, dist) { - if (slice.length) { - // we don't recalculate the area/length of the unclipped geometry because the case where it goes - // below the visibility threshold as a result of clipping is rare, so we avoid doing unnecessary work - slice.area = area; - slice.dist = dist; - - slices.push(slice); - } - return []; +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } -},{}],138:[function(_dereq_,module,exports){ +module.exports.dump = dump; +module.exports.safeDump = safeDump; + +},{"./common":150,"./exception":152,"./schema/default_full":157,"./schema/default_safe":158}],152:[function(_dereq_,module,exports){ +// YAML error class. http://stackoverflow.com/questions/8458984 +// 'use strict'; -module.exports = convert; -var simplify = _dereq_('./simplify'); +var inherits = _dereq_('inherit'); -// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data -function convert(data, tolerance) { - var features = []; +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); - if (data.type === 'FeatureCollection') { - for (var i = 0; i < data.features.length; i++) { - convertFeature(features, data.features[i], tolerance); - } - } else if (data.type === 'Feature') { - convertFeature(features, data, tolerance); + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } - } else { - // single geometry or a geometry collection - convertFeature(features, {geometry: data}, tolerance); - } - return features; + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); } -function convertFeature(features, feature, tolerance) { - var geom = feature.geometry, - type = geom.type, - coords = geom.coordinates, - tags = feature.properties, - i, j, rings; - - if (type === 'Point') { - features.push(create(tags, 1, [projectPoint(coords)])); - } else if (type === 'MultiPoint') { - features.push(create(tags, 1, project(coords))); +// Inherit from Error +inherits(YAMLException, Error); - } else if (type === 'LineString') { - features.push(create(tags, 2, [project(coords, tolerance)])); - } else if (type === 'MultiLineString' || type === 'Polygon') { - rings = []; - for (i = 0; i < coords.length; i++) { - rings.push(project(coords[i], tolerance)); - } - features.push(create(tags, type === 'Polygon' ? 3 : 2, rings)); +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; - } else if (type === 'MultiPolygon') { - rings = []; - for (i = 0; i < coords.length; i++) { - for (j = 0; j < coords[i].length; j++) { - rings.push(project(coords[i][j], tolerance)); - } - } - features.push(create(tags, 3, rings)); + result += this.reason || '(unknown reason)'; - } else if (type === 'GeometryCollection') { - for (i = 0; i < geom.geometries.length; i++) { - convertFeature(features, { - geometry: geom.geometries[i], - properties: tags - }, tolerance); - } + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } - } else { - throw new Error('Input data is not a valid GeoJSON object.'); - } -} + return result; +}; -function create(tags, type, geometry) { - var feature = { - geometry: geometry, - type: type, - tags: tags || null, - min: [2, 1], // initial bbox values; - max: [-1, 0] // note that coords are usually in [0..1] range - }; - calcBBox(feature); - return feature; -} -function project(lonlats, tolerance) { - var projected = []; - for (var i = 0; i < lonlats.length; i++) { - projected.push(projectPoint(lonlats[i])); - } - if (tolerance) { - simplify(projected, tolerance); - calcSize(projected); - } - return projected; -} +module.exports = YAMLException; -function projectPoint(p) { - var sin = Math.sin(p[1] * Math.PI / 180), - x = (p[0] / 360 + 0.5), - y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI); +},{"inherit":145}],153:[function(_dereq_,module,exports){ +'use strict'; - y = y < -1 ? -1 : - y > 1 ? 1 : y; +/*eslint-disable max-len,no-use-before-define*/ - return [x, y, 0]; -} +var common = _dereq_('./common'); +var YAMLException = _dereq_('./exception'); +var Mark = _dereq_('./mark'); +var DEFAULT_SAFE_SCHEMA = _dereq_('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = _dereq_('./schema/default_full'); -// calculate area and length of the poly -function calcSize(points) { - var area = 0, - dist = 0; - for (var i = 0, a, b; i < points.length - 1; i++) { - a = b || points[i]; - b = points[i + 1]; +var _hasOwnProperty = Object.prototype.hasOwnProperty; - area += a[0] * b[1] - b[0] * a[1]; - // use Manhattan distance instead of Euclidian one to avoid expensive square root computation - dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]); - } - points.area = Math.abs(area / 2); - points.dist = dist; -} +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; -// calculate the feature bounding box for faster clipping later -function calcBBox(feature) { - var geometry = feature.geometry, - min = feature.min, - max = feature.max; - if (feature.type === 1) calcRingBBox(min, max, geometry); - else for (var i = 0; i < geometry.length; i++) calcRingBBox(min, max, geometry[i]); +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; - return feature; -} -function calcRingBBox(min, max, points) { - for (var i = 0, p; i < points.length; i++) { - p = points[i]; - min[0] = Math.min(p[0], min[0]); - max[0] = Math.max(p[0], max[0]); - min[1] = Math.min(p[1], min[1]); - max[1] = Math.max(p[1], max[1]); - } -} +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; -},{"./simplify":140}],139:[function(_dereq_,module,exports){ -'use strict'; -module.exports = geojsonvt; +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} -var convert = _dereq_('./convert'), // GeoJSON conversion and preprocessing - clip = _dereq_('./clip'), // stripe clipping algorithm - wrap = _dereq_('./wrap'), // date line processing - createTile = _dereq_('./tile'); // final simplified tile generation +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} -function geojsonvt(data, options) { - return new GeoJSONVT(data, options); +function is_FLOW_INDICATOR(c) { + return 0x2C/* , */ === c || + 0x5B/* [ */ === c || + 0x5D/* ] */ === c || + 0x7B/* { */ === c || + 0x7D/* } */ === c; } -function GeoJSONVT(data, options) { - options = this.options = extend(Object.create(this.options), options); +function fromHexCode(c) { + var lc; - var debug = options.debug; + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } - if (debug) console.time('preprocess data'); + /*eslint-disable no-bitwise*/ + lc = c | 0x20; - var z2 = 1 << options.maxZoom, // 2^z - features = convert(data, options.tolerance / (z2 * options.extent)); + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } - this.tiles = {}; - this.tileCoords = []; + return -1; +} - if (debug) { - console.timeEnd('preprocess data'); - console.log('index: maxZoom: %d, maxPoints: %d', options.indexMaxZoom, options.indexMaxPoints); - console.time('generate tiles'); - this.stats = {}; - this.total = 0; - } +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} - features = wrap(features, options.buffer / options.extent, intersectX); +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } - // start slicing from the top tile down - if (features.length) this.splitTile(features, 0, 0, 0); + return -1; +} - if (debug) { - if (features.length) console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints); - console.timeEnd('generate tiles'); - console.log('tiles generated:', this.total, JSON.stringify(this.stats)); - } +function simpleEscapeSequence(c) { + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; } -GeoJSONVT.prototype.options = { - maxZoom: 14, // max zoom to preserve detail on - indexMaxZoom: 5, // max zoom in the tile index - indexMaxPoints: 100000, // max number of points per tile in the tile index - solidChildren: false, // whether to tile solid square tiles further - tolerance: 3, // simplification tolerance (higher means simpler) - extent: 4096, // tile extent - buffer: 64, // tile buffer on each side - debug: 0 // logging level (0, 1 or 2) -}; +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00); +} -GeoJSONVT.prototype.splitTile = function (features, z, x, y, cz, cx, cy) { +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} - var stack = [features, z, x, y], - options = this.options, - debug = options.debug; - // avoid recursion by using a processing queue - while (stack.length) { - y = stack.pop(); - x = stack.pop(); - z = stack.pop(); - features = stack.pop(); +function State(input, options) { + this.input = input; - var z2 = 1 << z, - id = toID(z, x, y), - tile = this.tiles[id], - tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * options.extent); + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; - if (!tile) { - if (debug > 1) console.time('creation'); + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; - tile = this.tiles[id] = createTile(features, z2, x, y, tileTolerance, z === options.maxZoom); - this.tileCoords.push({z: z, x: x, y: y}); + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; - if (debug) { - if (debug > 1) { - console.log('tile z%d-%d-%d (features: %d, points: %d, simplified: %d)', - z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified); - console.timeEnd('creation'); - } - var key = 'z' + z; - this.stats[key] = (this.stats[key] || 0) + 1; - this.total++; - } - } + this.documents = []; - // save reference to original geometry in tile so that we can drill down later if we stop now - tile.source = features; + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ - // stop tiling if the tile is solid clipped square - if (!options.solidChildren && isClippedSquare(tile, options.extent, options.buffer)) continue; +} - // if it's the first-pass tiling - if (!cz) { - // stop tiling if we reached max zoom, or if the tile is too simple - if (z === options.indexMaxZoom || tile.numPoints <= options.indexMaxPoints) continue; - // if a drilldown to a specific tile - } else { - // stop tiling if we reached base zoom or our target tile zoom - if (z === options.maxZoom || z === cz) continue; +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} - // stop tiling if it's not an ancestor of the target tile - var m = 1 << (cz - z); - if (x !== Math.floor(cx / m) || y !== Math.floor(cy / m)) continue; - } +function throwError(state, message) { + throw generateError(state, message); +} - // if we slice further down, no need to keep source geometry - tile.source = null; +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} - if (debug > 1) console.time('clipping'); - // values we'll use for clipping - var k1 = 0.5 * options.buffer / options.extent, - k2 = 0.5 - k1, - k3 = 0.5 + k1, - k4 = 1 + k1, - tl, bl, tr, br, left, right; +var directiveHandlers = { - tl = bl = tr = br = null; + YAML: function handleYamlDirective(state, name, args) { - left = clip(features, z2, x - k1, x + k3, 0, intersectX, tile.min[0], tile.max[0]); - right = clip(features, z2, x + k2, x + k4, 0, intersectX, tile.min[0], tile.max[0]); + var match, major, minor; - if (left) { - tl = clip(left, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]); - bl = clip(left, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]); - } + if (null !== state.version) { + throwError(state, 'duplication of %YAML directive'); + } - if (right) { - tr = clip(right, z2, y - k1, y + k3, 1, intersectY, tile.min[1], tile.max[1]); - br = clip(right, z2, y + k2, y + k4, 1, intersectY, tile.min[1], tile.max[1]); - } + if (1 !== args.length) { + throwError(state, 'YAML directive accepts exactly one argument'); + } - if (debug > 1) console.timeEnd('clipping'); + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (tl) stack.push(tl, z + 1, x * 2, y * 2); - if (bl) stack.push(bl, z + 1, x * 2, y * 2 + 1); - if (tr) stack.push(tr, z + 1, x * 2 + 1, y * 2); - if (br) stack.push(br, z + 1, x * 2 + 1, y * 2 + 1); - } -}; + if (null === match) { + throwError(state, 'ill-formed argument of the YAML directive'); + } -GeoJSONVT.prototype.getTile = function (z, x, y) { - var options = this.options, - extent = options.extent, - debug = options.debug; + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); - var z2 = 1 << z; - x = ((x % z2) + z2) % z2; // wrap tile x coordinate + if (1 !== major) { + throwError(state, 'unacceptable YAML version of the document'); + } - var id = toID(z, x, y); - if (this.tiles[id]) return transformTile(this.tiles[id], extent); + state.version = args[0]; + state.checkLineBreaks = (minor < 2); - if (debug > 1) console.log('drilling down to z%d-%d-%d', z, x, y); + if (1 !== minor && 2 !== minor) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, - var z0 = z, - x0 = x, - y0 = y, - parent; + TAG: function handleTagDirective(state, name, args) { - while (!parent && z0 > 0) { - z0--; - x0 = Math.floor(x0 / 2); - y0 = Math.floor(y0 / 2); - parent = this.tiles[toID(z0, x0, y0)]; - } + var handle, prefix; - if (!parent) return null; + if (2 !== args.length) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } - if (debug > 1) console.log('found parent tile z%d-%d-%d', z0, x0, y0); + handle = args[0]; + prefix = args[1]; - // if we found a parent tile containing the original geometry, we can drill down from it - if (parent.source) { - if (isClippedSquare(parent, extent, options.buffer)) return transformTile(parent, extent); + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } - if (debug > 1) console.time('drilling down'); - this.splitTile(parent.source, z0, x0, y0, z, x, y); - if (debug > 1) console.timeEnd('drilling down'); - } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } - if (!this.tiles[id]) return null; + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } - return transformTile(this.tiles[id], extent); + state.tagMap[handle] = prefix; + } }; -function transformTile(tile, extent) { - if (tile.transformed) return tile; - - var z2 = tile.z2, - tx = tile.x, - ty = tile.y, - i, j, k; - for (i = 0; i < tile.features.length; i++) { - var feature = tile.features[i], - geom = feature.geometry, - type = feature.type; +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; - if (type === 1) { - for (j = 0; j < geom.length; j++) geom[j] = transformPoint(geom[j], extent, z2, tx, ty); + if (start < end) { + _result = state.input.slice(start, end); - } else { - for (j = 0; j < geom.length; j++) { - var ring = geom[j]; - for (k = 0; k < ring.length; k++) ring[k] = transformPoint(ring[k], extent, z2, tx, ty); - } + if (checkJson) { + for (_position = 0, _length = _result.length; + _position < _length; + _position += 1) { + _character = _result.charCodeAt(_position); + if (!(0x09 === _character || + 0x20 <= _character && _character <= 0x10FFFF)) { + throwError(state, 'expected valid JSON character'); } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); } - tile.transformed = true; - - return tile; + state.result += _result; + } } -function transformPoint(p, extent, z2, tx, ty) { - var x = Math.round(extent * (p[0] * z2 - tx)), - y = Math.round(extent * (p[1] * z2 - ty)); - return [x, y]; -} +function mergeMappings(state, destination, source) { + var sourceKeys, key, index, quantity; -function toID(z, x, y) { - return (((1 << z) * y + x) * 32) + z; -} + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } -function intersectX(a, b, x) { - return [x, (x - a[0]) * (b[1] - a[1]) / (b[0] - a[0]) + a[1], 1]; -} -function intersectY(a, b, y) { - return [(y - a[1]) * (b[0] - a[0]) / (b[1] - a[1]) + a[0], y, 1]; -} + sourceKeys = Object.keys(source); -function extend(dest, src) { - for (var i in src) dest[i] = src[i]; - return dest; -} + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; -// checks whether a tile is a whole-area fill after clipping; if it is, there's no sense slicing it further -function isClippedSquare(tile, extent, buffer) { + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + } + } +} - var features = tile.source; - if (features.length !== 1) return false; +function storeMappingPair(state, _result, keyTag, keyNode, valueNode) { + var index, quantity; - var feature = features[0]; - if (feature.type !== 3 || feature.geometry.length > 1) return false; + keyNode = String(keyNode); - var len = feature.geometry[0].length; - if (len !== 5) return false; + if (null === _result) { + _result = {}; + } - for (var i = 0; i < len; i++) { - var p = transformPoint(feature.geometry[0][i], extent, tile.z2, tile.x, tile.y); - if ((p[0] !== -buffer && p[0] !== extent + buffer) || - (p[1] !== -buffer && p[1] !== extent + buffer)) return false; + if ('tag:yaml.org,2002:merge' === keyTag) { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index]); + } + } else { + mergeMappings(state, _result, valueNode); } + } else { + _result[keyNode] = valueNode; + } - return true; + return _result; } -},{"./clip":137,"./convert":138,"./tile":141,"./wrap":142}],140:[function(_dereq_,module,exports){ -'use strict'; +function readLineBreak(state) { + var ch; -module.exports = simplify; + ch = state.input.charCodeAt(state.position); -// calculate simplification data using optimized Douglas-Peucker algorithm + if (0x0A/* LF */ === ch) { + state.position++; + } else if (0x0D/* CR */ === ch) { + state.position++; + if (0x0A/* LF */ === state.input.charCodeAt(state.position)) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } -function simplify(points, tolerance) { + state.line += 1; + state.lineStart = state.position; +} - var sqTolerance = tolerance * tolerance, - len = points.length, - first = 0, - last = len - 1, - stack = [], - i, maxSqDist, sqDist, index; +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); - // always retain the endpoints (1 is the max value) - points[first][2] = 1; - points[last][2] = 1; + while (0 !== ch) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } - // avoid recursion by using a stack - while (last) { + if (allowComments && 0x23/* # */ === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && 0 !== ch); + } - maxSqDist = 0; + if (is_EOL(ch)) { + readLineBreak(state); - for (i = first + 1; i < last; i++) { - sqDist = getSqSegDist(points[i], points[first], points[last]); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; - if (sqDist > maxSqDist) { - index = i; - maxSqDist = sqDist; - } - } + while (0x20/* Space */ === ch) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } - if (maxSqDist > sqTolerance) { - points[index][2] = maxSqDist; // save the point importance in squared pixels as a z coordinate - stack.push(first); - stack.push(index); - first = index; + if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } - } else { - last = stack.pop(); - first = stack.pop(); - } - } + return lineBreaks; } -// square distance from a point to a segment -function getSqSegDist(p, a, b) { +function testDocumentSeparator(state) { + var _position = state.position, + ch; - var x = a[0], y = a[1], - bx = b[0], by = b[1], - px = p[0], py = p[1], - dx = bx - x, - dy = by - y; + ch = state.input.charCodeAt(_position); - if (dx !== 0 || dy !== 0) { + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((0x2D/* - */ === ch || 0x2E/* . */ === ch) && + state.input.charCodeAt(_position + 1) === ch && + state.input.charCodeAt(_position + 2) === ch) { - var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy); + _position += 3; - if (t > 1) { - x = bx; - y = by; + ch = state.input.charCodeAt(_position); - } else if (t > 0) { - x += dx * t; - y += dy * t; - } + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; } + } - dx = px - x; - dy = py - y; + return false; +} - return dx * dx + dy * dy; +function writeFoldedLines(state, count) { + if (1 === count) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } } -},{}],141:[function(_dereq_,module,exports){ -'use strict'; -module.exports = createTile; +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; -function createTile(features, z2, tx, ty, tolerance, noSimplify) { - var tile = { - features: [], - numPoints: 0, - numSimplified: 0, - numFeatures: 0, - source: null, - x: tx, - y: ty, - z2: z2, - transformed: false, - min: [2, 1], - max: [-1, 0] - }; - for (var i = 0; i < features.length; i++) { - tile.numFeatures++; - addFeature(tile, features[i], tolerance, noSimplify); + ch = state.input.charCodeAt(state.position); - var min = features[i].min, - max = features[i].max; + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + 0x23/* # */ === ch || + 0x26/* & */ === ch || + 0x2A/* * */ === ch || + 0x21/* ! */ === ch || + 0x7C/* | */ === ch || + 0x3E/* > */ === ch || + 0x27/* ' */ === ch || + 0x22/* " */ === ch || + 0x25/* % */ === ch || + 0x40/* @ */ === ch || + 0x60/* ` */ === ch) { + return false; + } - if (min[0] < tile.min[0]) tile.min[0] = min[0]; - if (min[1] < tile.min[1]) tile.min[1] = min[1]; - if (max[0] > tile.max[0]) tile.max[0] = max[0]; - if (max[1] > tile.max[1]) tile.max[1] = max[1]; + if (0x3F/* ? */ === ch || 0x2D/* - */ === ch) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; } - return tile; -} + } -function addFeature(tile, feature, tolerance, noSimplify) { + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; - var geom = feature.geometry, - type = feature.type, - simplified = [], - sqTolerance = tolerance * tolerance, - i, j, ring, p; + while (0 !== ch) { + if (0x3A/* : */ === ch) { + following = state.input.charCodeAt(state.position + 1); - if (type === 1) { - for (i = 0; i < geom.length; i++) { - simplified.push(geom[i]); - tile.numPoints++; - tile.numSimplified++; - } + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } - } else { + } else if (0x23/* # */ === ch) { + preceding = state.input.charCodeAt(state.position - 1); - // simplify and transform projected coordinates for tile geometry - for (i = 0; i < geom.length; i++) { - ring = geom[i]; + if (is_WS_OR_EOL(preceding)) { + break; + } - // filter out tiny polylines & polygons - if (!noSimplify && ((type === 2 && ring.dist < tolerance) || - (type === 3 && ring.area < sqTolerance))) { - tile.numPoints += ring.length; - continue; - } + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; - var simplifiedRing = []; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); - for (j = 0; j < ring.length; j++) { - p = ring[j]; - // keep points with importance > tolerance - if (noSimplify || p[2] > sqTolerance) { - simplifiedRing.push(p); - tile.numSimplified++; - } - tile.numPoints++; - } + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } - simplified.push(simplifiedRing); - } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; } - if (simplified.length) { - tile.features.push({ - geometry: simplified, - type: type, - tags: feature.tags || null - }); + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; } -},{}],142:[function(_dereq_,module,exports){ -'use strict'; +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; -var clip = _dereq_('./clip'); + ch = state.input.charCodeAt(state.position); -module.exports = wrap; + if (0x27/* ' */ !== ch) { + return false; + } -function wrap(features, buffer, intersectX) { - var merged = features, - left = clip(features, 1, -1 - buffer, buffer, 0, intersectX, -1, 2), // left world copy - right = clip(features, 1, 1 - buffer, 2 + buffer, 0, intersectX, -1, 2); // right world copy + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; - if (left || right) { - merged = clip(features, 1, -buffer, 1 + buffer, 0, intersectX, -1, 2); // center world copy + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (0x27/* ' */ === ch) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); - if (left) merged = shiftFeatureCoords(left, 1).concat(merged); // merge left into center - if (right) merged = merged.concat(shiftFeatureCoords(right, -1)); // merge right into center + if (0x27/* ' */ === ch) { + captureStart = captureEnd = state.position; + state.position++; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; } + } - return merged; + throwError(state, 'unexpected end of the stream within a single quoted scalar'); } -function shiftFeatureCoords(features, offset) { - var newFeatures = []; +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; - for (var i = 0; i < features.length; i++) { - var feature = features[i], - type = feature.type; + ch = state.input.charCodeAt(state.position); - var newGeometry; + if (0x22/* " */ !== ch) { + return false; + } - if (type === 1) { - newGeometry = shiftCoords(feature.geometry, offset); - } else { - newGeometry = []; - for (var j = 0; j < feature.geometry.length; j++) { - newGeometry.push(shiftCoords(feature.geometry[j], offset)); - } - } + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; - newFeatures.push({ - geometry: newGeometry, - type: type, - tags: feature.tags, - min: [feature.min[0] + offset, feature.min[1]], - max: [feature.max[0] + offset, feature.max[1]] - }); - } + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (0x22/* " */ === ch) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; - return newFeatures; -} + } else if (0x5C/* \ */ === ch) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); -function shiftCoords(points, offset) { - var newPoints = []; - newPoints.area = points.area; - newPoints.dist = points.dist; + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); - for (var i = 0; i < points.length; i++) { - newPoints.push([points[i][0] + offset, points[i][1], points[i][2]]); - } - return newPoints; -} + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; -},{"./clip":137}],143:[function(_dereq_,module,exports){ -/** - * @fileoverview gl-matrix - High performance matrix and vector operations - * @author Brandon Jones - * @author Colin MacKenzie IV - * @version 2.2.1 - */ + } else { + throwError(state, 'expected hexadecimal character'); + } + } -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + state.result += charFromCodepoint(hexResult); -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + state.position++; - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + } else { + throwError(state, 'unknown escape sequence'); + } -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; -(function(_global) { - "use strict"; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); - var shim = {}; - if (typeof(exports) === 'undefined') { - if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - shim.exports = {}; - define(function() { - return shim.exports; - }); } else { - // gl-matrix lives in a browser, define its namespaces in global - shim.exports = typeof(window) !== 'undefined' ? window : _global; + state.position++; + captureEnd = state.position; } } - else { - // gl-matrix lives in commonjs, define its namespaces in exports - shim.exports = exports; - } - (function(exports) { - /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + keyNode, + keyTag, + valueNode, + ch; - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + ch = state.input.charCodeAt(state.position); -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + if (null !== state.anchor) { + state.anchorMap[state.anchor] = _result; + } -if(!GLMAT_EPSILON) { - var GLMAT_EPSILON = 0.000001; -} + ch = state.input.charCodeAt(++state.position); -if(!GLMAT_ARRAY_TYPE) { - var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array; -} + while (0 !== ch) { + skipSeparationSpace(state, true, nodeIndent); -if(!GLMAT_RANDOM) { - var GLMAT_RANDOM = Math.random; -} + ch = state.input.charCodeAt(state.position); -/** - * @class Common utilities - * @name glMatrix - */ -var glMatrix = {}; + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } -/** - * Sets the type of array used when creating new vectors and matricies - * - * @param {Type} type Array type, such as Float32Array or Array - */ -glMatrix.setMatrixArrayType = function(type) { - GLMAT_ARRAY_TYPE = type; -} + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; -if(typeof(exports) !== 'undefined') { - exports.glMatrix = glMatrix; -} + if (0x3F/* ? */ === ch) { + following = state.input.charCodeAt(state.position + 1); -var degree = Math.PI / 180; + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } -/** -* Convert Degree To Radian -* -* @param {Number} Angle in Degrees -*/ -glMatrix.toRadian = function(a){ - return a * degree; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + ch = state.input.charCodeAt(state.position); - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + if ((isExplicitPair || state.line === _line) && 0x3A/* : */ === ch) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (isMapping) { + storeMappingPair(state, _result, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } -/** - * @class 2 Dimensional Vector - * @name vec2 - */ + skipSeparationSpace(state, true, nodeIndent); -var vec2 = {}; + ch = state.input.charCodeAt(state.position); -/** - * Creates a new, empty vec2 - * - * @returns {vec2} a new 2D vector - */ -vec2.create = function() { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = 0; - out[1] = 0; - return out; -}; + if (0x2C/* , */ === ch) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } -/** - * Creates a new vec2 initialized with values from an existing vector - * - * @param {vec2} a vector to clone - * @returns {vec2} a new 2D vector - */ -vec2.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = a[0]; - out[1] = a[1]; - return out; -}; + throwError(state, 'unexpected end of the stream within a flow collection'); +} -/** - * Creates a new vec2 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} a new 2D vector - */ -vec2.fromValues = function(x, y) { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = x; - out[1] = y; - return out; -}; +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; -/** - * Copy the values from one vec2 to another - * - * @param {vec2} out the receiving vector - * @param {vec2} a the source vector - * @returns {vec2} out - */ -vec2.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; -}; + ch = state.input.charCodeAt(state.position); -/** - * Set the components of a vec2 to the given values - * - * @param {vec2} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} out - */ -vec2.set = function(out, x, y) { - out[0] = x; - out[1] = y; - return out; -}; + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } -/** - * Adds two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.add = function(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; -}; + state.kind = 'scalar'; + state.result = ''; -/** - * Subtracts vector b from vector a - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.subtract = function(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; -}; + while (0 !== ch) { + ch = state.input.charCodeAt(++state.position); -/** - * Alias for {@link vec2.subtract} - * @function - */ -vec2.sub = vec2.subtract; + if (0x2B/* + */ === ch || 0x2D/* - */ === ch) { + if (CHOMPING_CLIP === chomping) { + chomping = (0x2B/* + */ === ch) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } -/** - * Multiplies two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.multiply = function(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; -}; + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } -/** - * Alias for {@link vec2.multiply} - * @function - */ -vec2.mul = vec2.multiply; + } else { + break; + } + } -/** - * Divides two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; -}; + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); -/** - * Alias for {@link vec2.divide} - * @function - */ -vec2.div = vec2.divide; + if (0x23/* # */ === ch) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (0 !== ch)); + } + } -/** - * Returns the minimum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; -}; + while (0 !== ch) { + readLineBreak(state); + state.lineIndent = 0; -/** - * Returns the maximum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; -}; + ch = state.input.charCodeAt(state.position); -/** - * Scales a vec2 by a scalar number - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec2} out - */ -vec2.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; -}; + while ((!detectedIndent || state.lineIndent < textIndent) && + (0x20/* Space */ === ch)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } -/** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec2} out - */ -vec2.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - return out; -}; + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } -/** - * Calculates the euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} distance between a and b - */ -vec2.distance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return Math.sqrt(x*x + y*y); -}; + if (is_EOL(ch)) { + emptyLines++; + continue; + } -/** - * Alias for {@link vec2.distance} - * @function - */ -vec2.dist = vec2.distance; + // End of the scalar. + if (state.lineIndent < textIndent) { -/** - * Calculates the squared euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} squared distance between a and b - */ -vec2.squaredDistance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return x*x + y*y; -}; + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (detectedIndent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } -/** - * Alias for {@link vec2.squaredDistance} - * @function - */ -vec2.sqrDist = vec2.squaredDistance; + // Break this `while` cycle and go to the funciton's epilogue. + break; + } -/** - * Calculates the length of a vec2 - * - * @param {vec2} a vector to calculate length of - * @returns {Number} length of a - */ -vec2.length = function (a) { - var x = a[0], - y = a[1]; - return Math.sqrt(x*x + y*y); -}; + // Folded style: use fancy rules to handle line breaks. + if (folding) { -/** - * Alias for {@link vec2.length} - * @function - */ -vec2.len = vec2.length; + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat('\n', emptyLines + 1); -/** - * Calculates the squared length of a vec2 - * - * @param {vec2} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec2.squaredLength = function (a) { - var x = a[0], - y = a[1]; - return x*x + y*y; -}; + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); -/** - * Alias for {@link vec2.squaredLength} - * @function - */ -vec2.sqrLen = vec2.squaredLength; + // Just one line break - perceive as the same line. + } else if (0 === emptyLines) { + if (detectedIndent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } -/** - * Negates the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to negate - * @returns {vec2} out - */ -vec2.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; -}; + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } -/** - * Normalize a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to normalize - * @returns {vec2} out - */ -vec2.normalize = function(out, a) { - var x = a[0], - y = a[1]; - var len = x*x + y*y; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; + // Literal style: just add exact number of line breaks between content lines. + } else if (detectedIndent) { + // If current line isn't the first one - count line break from the last content line. + state.result += common.repeat('\n', emptyLines + 1); + } else { + // In case of the first content line - count only empty lines. + state.result += common.repeat('\n', emptyLines); } - return out; -}; -/** - * Calculates the dot product of two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} dot product of a and b - */ -vec2.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1]; -}; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; -/** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param {vec3} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec3} out - */ -vec2.cross = function(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; -}; + while (!is_EOL(ch) && (0 !== ch)) { + ch = state.input.charCodeAt(++state.position); + } -/** - * Performs a linear interpolation between two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec2} out - */ -vec2.lerp = function (out, a, b, t) { - var ax = a[0], - ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; -}; + captureSegment(state, captureStart, state.position, false); + } -/** - * Generates a random vector with the given scale - * - * @param {vec2} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec2} out - */ -vec2.random = function (out, scale) { - scale = scale || 1.0; - var r = GLMAT_RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; -}; + return true; +} -/** - * Transforms the vec2 with a mat2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat2 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; -}; +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; -/** - * Transforms the vec2 with a mat2d - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2d} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat2d = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; -}; + if (null !== state.anchor) { + state.anchorMap[state.anchor] = _result; + } -/** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat3} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat3 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; -}; + ch = state.input.charCodeAt(state.position); -/** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat4 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; -}; + while (0 !== ch) { -/** - * Perform some operation over an array of vec2s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec2.forEach = (function() { - var vec = vec2.create(); + if (0x2D/* - */ !== ch) { + break; + } - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 2; - } + following = state.input.charCodeAt(state.position + 1); - if(!offset) { - offset = 0; - } - - if(count) { - l = Math.min((count * stride) + offset, a.length); - } else { - l = a.length; - } + if (!is_WS_OR_EOL(following)) { + break; + } - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; - } - - return a; - }; -})(); + detected = true; + state.position++; -/** - * Returns a string representation of a vector - * - * @param {vec2} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec2.str = function (a) { - return 'vec2(' + a[0] + ', ' + a[1] + ')'; -}; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } -if(typeof(exports) !== 'undefined') { - exports.vec2 = vec2; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + ch = state.input.charCodeAt(state.position); - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} -/** - * @class 3 Dimensional Vector - * @name vec3 - */ +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; -var vec3 = {}; + if (null !== state.anchor) { + state.anchorMap[state.anchor] = _result; + } -/** - * Creates a new, empty vec3 - * - * @returns {vec3} a new 3D vector - */ -vec3.create = function() { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = 0; - out[1] = 0; - out[2] = 0; - return out; -}; + ch = state.input.charCodeAt(state.position); -/** - * Creates a new vec3 initialized with values from an existing vector - * - * @param {vec3} a vector to clone - * @returns {vec3} a new 3D vector - */ -vec3.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -}; + while (0 !== ch) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. -/** - * Creates a new vec3 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} a new 3D vector - */ -vec3.fromValues = function(x, y, z) { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; -}; + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((0x3F/* ? */ === ch || 0x3A/* : */ === ch) && is_WS_OR_EOL(following)) { -/** - * Copy the values from one vec3 to another - * - * @param {vec3} out the receiving vector - * @param {vec3} a the source vector - * @returns {vec3} out - */ -vec3.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -}; + if (0x3F/* ? */ === ch) { + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } -/** - * Set the components of a vec3 to the given values - * - * @param {vec3} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} out - */ -vec3.set = function(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; -}; + detected = true; + atExplicitKey = true; + allowCompact = true; -/** - * Adds two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.add = function(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; -}; + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; -/** - * Subtracts vector b from vector a - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.subtract = function(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; -}; + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed'); + } -/** - * Alias for {@link vec3.subtract} - * @function - */ -vec3.sub = vec3.subtract; + state.position += 1; + ch = following; -/** - * Multiplies two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.multiply = function(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; -}; + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } -/** - * Alias for {@link vec3.multiply} - * @function - */ -vec3.mul = vec3.multiply; + if (0x3A/* : */ === ch) { + ch = state.input.charCodeAt(++state.position); -/** - * Divides two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; -}; + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } -/** - * Alias for {@link vec3.divide} - * @function - */ -vec3.div = vec3.divide; + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } -/** - * Returns the minimum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; -}; + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; -/** - * Returns the maximum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; -}; + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); -/** - * Scales a vec3 by a scalar number - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec3} out - */ -vec3.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; -}; + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } -/** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec3} out - */ -vec3.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - out[2] = a[2] + (b[2] * scale); - return out; -}; + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); -/** - * Calculates the euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} distance between a and b - */ -vec3.distance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1], - z = b[2] - a[2]; - return Math.sqrt(x*x + y*y + z*z); -}; + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } -/** - * Alias for {@link vec3.distance} - * @function - */ -vec3.dist = vec3.distance; + } else { + break; // Reading is done. Go to the epilogue. + } -/** - * Calculates the squared euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} squared distance between a and b - */ -vec3.squaredDistance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1], - z = b[2] - a[2]; - return x*x + y*y + z*z; -}; + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } -/** - * Alias for {@link vec3.squaredDistance} - * @function - */ -vec3.sqrDist = vec3.squaredDistance; + if (!atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, valueNode); + keyTag = keyNode = valueNode = null; + } -/** - * Calculates the length of a vec3 - * - * @param {vec3} a vector to calculate length of - * @returns {Number} length of a - */ -vec3.length = function (a) { - var x = a[0], - y = a[1], - z = a[2]; - return Math.sqrt(x*x + y*y + z*z); -}; + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } -/** - * Alias for {@link vec3.length} - * @function - */ -vec3.len = vec3.length; + if (state.lineIndent > nodeIndent && (0 !== ch)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } -/** - * Calculates the squared length of a vec3 - * - * @param {vec3} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec3.squaredLength = function (a) { - var x = a[0], - y = a[1], - z = a[2]; - return x*x + y*y + z*z; -}; + // + // Epilogue. + // -/** - * Alias for {@link vec3.squaredLength} - * @function - */ -vec3.sqrLen = vec3.squaredLength; + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + } -/** - * Negates the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to negate - * @returns {vec3} out - */ -vec3.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; -}; + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } -/** - * Normalize a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to normalize - * @returns {vec3} out - */ -vec3.normalize = function(out, a) { - var x = a[0], - y = a[1], - z = a[2]; - var len = x*x + y*y + z*z; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - } - return out; -}; + return detected; +} -/** - * Calculates the dot product of two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} dot product of a and b - */ -vec3.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -}; +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; -/** - * Computes the cross product of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.cross = function(out, a, b) { - var ax = a[0], ay = a[1], az = a[2], - bx = b[0], by = b[1], bz = b[2]; + ch = state.input.charCodeAt(state.position); - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; -}; + if (0x21/* ! */ !== ch) { + return false; + } -/** - * Performs a linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec3} out - */ -vec3.lerp = function (out, a, b, t) { - var ax = a[0], - ay = a[1], - az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; -}; + if (null !== state.tag) { + throwError(state, 'duplication of a tag property'); + } -/** - * Generates a random vector with the given scale - * - * @param {vec3} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec3} out - */ -vec3.random = function (out, scale) { - scale = scale || 1.0; + ch = state.input.charCodeAt(++state.position); - var r = GLMAT_RANDOM() * 2.0 * Math.PI; - var z = (GLMAT_RANDOM() * 2.0) - 1.0; - var zScale = Math.sqrt(1.0-z*z) * scale; + if (0x3C/* < */ === ch) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; -}; + } else if (0x21/* ! */ === ch) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); -/** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec3} out - */ -vec3.transformMat4 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12]; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13]; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14]; - return out; -}; + } else { + tagHandle = '!'; + } -/** - * Transforms the vec3 with a mat3. - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat4} m the 3x3 matrix to transform with - * @returns {vec3} out - */ -vec3.transformMat3 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; -}; + _position = state.position; -/** - * Transforms the vec3 with a quat - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {quat} q quaternion to transform with - * @returns {vec3} out - */ -vec3.transformQuat = function(out, a, q) { - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (0 !== ch && 0x3E/* > */ !== ch); - var x = a[0], y = a[1], z = a[2], - qx = q[0], qy = q[1], qz = q[2], qw = q[3], + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (0 !== ch && !is_WS_OR_EOL(ch)) { - // calculate quat * vec - ix = qw * x + qy * z - qz * y, - iy = qw * y + qz * x - qx * z, - iz = qw * z + qx * y - qy * x, - iw = -qx * x - qy * y - qz * z; + if (0x21/* ! */ === ch) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); - // calculate result * inverse quat - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return out; -}; + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } -/* -* Rotate a 3D vector around the x-axis -* @param {vec3} out The receiving vec3 -* @param {vec3} a The vec3 point to rotate -* @param {vec3} b The origin of the rotation -* @param {Number} c The angle of rotation -* @returns {vec3} out -*/ -vec3.rotateX = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } - //perform rotation - r[0] = p[0]; - r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c); - r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c); + ch = state.input.charCodeAt(++state.position); + } - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; + tagName = state.input.slice(_position, state.position); - return out; -}; + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } -/* -* Rotate a 3D vector around the y-axis -* @param {vec3} out The receiving vec3 -* @param {vec3} a The vec3 point to rotate -* @param {vec3} b The origin of the rotation -* @param {Number} c The angle of rotation -* @returns {vec3} out -*/ -vec3.rotateY = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c); - r[1] = p[1]; - r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c); - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -}; + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } -/* -* Rotate a 3D vector around the z-axis -* @param {vec3} out The receiving vec3 -* @param {vec3} a The vec3 point to rotate -* @param {vec3} b The origin of the rotation -* @param {Number} c The angle of rotation -* @returns {vec3} out -*/ -vec3.rotateZ = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c); - r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c); - r[2] = p[2]; - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -}; + if (isVerbatim) { + state.tag = tagName; -/** - * Perform some operation over an array of vec3s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec3.forEach = (function() { - var vec = vec3.create(); + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 3; - } + } else if ('!' === tagHandle) { + state.tag = '!' + tagName; - if(!offset) { - offset = 0; - } - - if(count) { - l = Math.min((count * stride) + offset, a.length); - } else { - l = a.length; - } + } else if ('!!' === tagHandle) { + state.tag = 'tag:yaml.org,2002:' + tagName; - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; - } - - return a; - }; -})(); + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } -/** - * Returns a string representation of a vector - * - * @param {vec3} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec3.str = function (a) { - return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'; -}; + return true; +} -if(typeof(exports) !== 'undefined') { - exports.vec3 = vec3; +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (0x26/* & */ !== ch) { + return false; + } + + if (null !== state.anchor) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; } -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +function readAlias(state) { + var _position, alias, + ch; - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + ch = state.input.charCodeAt(state.position); -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (0x2A/* * */ !== ch) { + return false; + } -/** - * @class 4 Dimensional Vector - * @name vec4 - */ + ch = state.input.charCodeAt(++state.position); + _position = state.position; -var vec4 = {}; + while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } -/** - * Creates a new, empty vec4 - * - * @returns {vec4} a new 4D vector - */ -vec4.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 0; - return out; -}; + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } -/** - * Creates a new vec4 initialized with values from an existing vector - * - * @param {vec4} a vector to clone - * @returns {vec4} a new 4D vector - */ -vec4.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + alias = state.input.slice(_position, state.position); -/** - * Creates a new vec4 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} a new 4D vector - */ -vec4.fromValues = function(x, y, z, w) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; -}; + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } -/** - * Copy the values from one vec4 to another - * - * @param {vec4} out the receiving vector - * @param {vec4} a the source vector - * @returns {vec4} out - */ -vec4.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} -/** - * Set the components of a vec4 to the given values - * - * @param {vec4} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} out - */ -vec4.set = function(out, x, y, z, w) { - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; -}; +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } -/** - * Alias for {@link vec4.multiply} - * @function - */ -vec4.mul = vec4.multiply; + if (1 === indentStatus) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; -/** - * Divides two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - out[3] = a[3] / b[3]; - return out; -}; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } -/** - * Alias for {@link vec4.divide} - * @function - */ -vec4.div = vec4.divide; + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } -/** - * Returns the minimum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - out[3] = Math.min(a[3], b[3]); - return out; -}; + if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } -/** - * Returns the maximum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - out[3] = Math.max(a[3], b[3]); - return out; -}; + blockIndent = state.position - state.lineStart; -/** - * Scales a vec4 by a scalar number - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec4} out - */ -vec4.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; -}; + if (1 === indentStatus) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; -/** - * Adds two vec4's after scaling the second operand by a scalar value - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec4} out - */ -vec4.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - out[2] = a[2] + (b[2] * scale); - out[3] = a[3] + (b[3] * scale); - return out; -}; + } else if (readAlias(state)) { + hasContent = true; -/** - * Calculates the euclidian distance between two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} distance between a and b - */ -vec4.distance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1], - z = b[2] - a[2], - w = b[3] - a[3]; - return Math.sqrt(x*x + y*y + z*z + w*w); -}; + if (null !== state.tag || null !== state.anchor) { + throwError(state, 'alias node should not have any properties'); + } -/** - * Alias for {@link vec4.distance} - * @function - */ -vec4.dist = vec4.distance; + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; -/** - * Calculates the squared euclidian distance between two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} squared distance between a and b - */ -vec4.squaredDistance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1], - z = b[2] - a[2], - w = b[3] - a[3]; - return x*x + y*y + z*z + w*w; -}; + if (null === state.tag) { + state.tag = '?'; + } + } + + if (null !== state.anchor) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (0 === indentStatus) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (null !== state.tag && '!' !== state.tag) { + if ('?' === state.tag) { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; + typeIndex < typeQuantity; + typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (null !== state.anchor) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { + type = state.typeMap[state.tag]; + + if (null !== state.result && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (null !== state.anchor) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + return null !== state.tag || null !== state.anchor || hasContent; +} -/** - * Alias for {@link vec4.squaredDistance} - * @function - */ -vec4.sqrDist = vec4.squaredDistance; +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; -/** - * Calculates the length of a vec4 - * - * @param {vec4} a vector to calculate length of - * @returns {Number} length of a - */ -vec4.length = function (a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - return Math.sqrt(x*x + y*y + z*z + w*w); -}; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; -/** - * Alias for {@link vec4.length} - * @function - */ -vec4.len = vec4.length; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + skipSeparationSpace(state, true, -1); -/** - * Calculates the squared length of a vec4 - * - * @param {vec4} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec4.squaredLength = function (a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - return x*x + y*y + z*z + w*w; -}; + ch = state.input.charCodeAt(state.position); -/** - * Alias for {@link vec4.squaredLength} - * @function - */ -vec4.sqrLen = vec4.squaredLength; + if (state.lineIndent > 0 || 0x25/* % */ !== ch) { + break; + } -/** - * Negates the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to negate - * @returns {vec4} out - */ -vec4.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = -a[3]; - return out; -}; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; -/** - * Normalize a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to normalize - * @returns {vec4} out - */ -vec4.normalize = function(out, a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - var len = x*x + y*y + z*z + w*w; - if (len > 0) { - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - out[3] = a[3] * len; + while (0 !== ch && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); } - return out; -}; -/** - * Calculates the dot product of two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} dot product of a and b - */ -vec4.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; -}; + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; -/** - * Performs a linear interpolation between two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec4} out - */ -vec4.lerp = function (out, a, b, t) { - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - out[3] = aw + t * (b[3] - aw); - return out; -}; + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } -/** - * Generates a random vector with the given scale - * - * @param {vec4} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec4} out - */ -vec4.random = function (out, scale) { - scale = scale || 1.0; + while (0 !== ch) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } - //TODO: This is a pretty awful way of doing this. Find something better. - out[0] = GLMAT_RANDOM(); - out[1] = GLMAT_RANDOM(); - out[2] = GLMAT_RANDOM(); - out[3] = GLMAT_RANDOM(); - vec4.normalize(out, out); - vec4.scale(out, out, scale); - return out; -}; + if (0x23/* # */ === ch) { + do { ch = state.input.charCodeAt(++state.position); } + while (0 !== ch && !is_EOL(ch)); + break; + } -/** - * Transforms the vec4 with a mat4. - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec4} out - */ -vec4.transformMat4 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2], w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return out; -}; + if (is_EOL(ch)) { + break; + } -/** - * Transforms the vec4 with a quat - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to transform - * @param {quat} q quaternion to transform with - * @returns {vec4} out - */ -vec4.transformQuat = function(out, a, q) { - var x = a[0], y = a[1], z = a[2], - qx = q[0], qy = q[1], qz = q[2], qw = q[3], + _position = state.position; - // calculate quat * vec - ix = qw * x + qy * z - qz * y, - iy = qw * y + qz * x - qx * z, - iz = qw * z + qx * y - qy * x, - iw = -qx * x - qy * y - qz * z; + while (0 !== ch && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } - // calculate result * inverse quat - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return out; -}; + directiveArgs.push(state.input.slice(_position, state.position)); + } -/** - * Perform some operation over an array of vec4s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec4.forEach = (function() { - var vec = vec4.create(); + if (0 !== ch) { + readLineBreak(state); + } - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 4; - } + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } - if(!offset) { - offset = 0; - } - - if(count) { - l = Math.min((count * stride) + offset, a.length); - } else { - l = a.length; - } + skipSeparationSpace(state, true, -1); - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3]; - } - - return a; - }; -})(); + if (0 === state.lineIndent && + 0x2D/* - */ === state.input.charCodeAt(state.position) && + 0x2D/* - */ === state.input.charCodeAt(state.position + 1) && + 0x2D/* - */ === state.input.charCodeAt(state.position + 2)) { + state.position += 3; + skipSeparationSpace(state, true, -1); -/** - * Returns a string representation of a vector - * - * @param {vec4} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec4.str = function (a) { - return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } -if(typeof(exports) !== 'undefined') { - exports.vec4 = vec4; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + state.documents.push(state.result); -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (state.position === state.lineStart && testDocumentSeparator(state)) { -/** - * @class 2x2 Matrix - * @name mat2 - */ + if (0x2E/* . */ === state.input.charCodeAt(state.position)) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } -var mat2 = {}; + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} -/** - * Creates a new identity mat2 - * - * @returns {mat2} a new 2x2 matrix - */ -mat2.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; -/** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param {mat2} a matrix to clone - * @returns {mat2} a new 2x2 matrix - */ -mat2.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; +function loadDocuments(input, options) { + input = String(input); + options = options || {}; -/** - * Copy the values from one mat2 to another - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + if (input.length !== 0) { -/** - * Set a mat2 to the identity matrix - * - * @param {mat2} out the receiving matrix - * @returns {mat2} out - */ -mat2.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; + // Add tailing `\n` if not exists + if (0x0A/* LF */ !== input.charCodeAt(input.length - 1) && + 0x0D/* CR */ !== input.charCodeAt(input.length - 1)) { + input += '\n'; + } -/** - * Transpose the values of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); } - - return out; -}; + } -/** - * Inverts a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.invert = function(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + var state = new State(input, options); - // Calculate the determinant - det = a0 * a3 - a2 * a1; + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; - if (!det) { - return null; - } - det = 1.0 / det; - - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; + while (0x20/* Space */ === state.input.charCodeAt(state.position)) { + state.lineIndent += 1; + state.position += 1; + } - return out; -}; + while (state.position < (state.length - 1)) { + readDocument(state); + } -/** - * Calculates the adjugate of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.adjoint = function(out, a) { - // Caching this value is nessecary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; + return state.documents; +} - return out; -}; -/** - * Calculates the determinant of a mat2 - * - * @param {mat2} a the source matrix - * @returns {Number} determinant of a - */ -mat2.determinant = function (a) { - return a[0] * a[3] - a[2] * a[1]; -}; +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; -/** - * Multiplies two mat2's - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @returns {mat2} out - */ -mat2.multiply = function (out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; -}; + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (0 === documents.length) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (1 === documents.length) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} -/** - * Alias for {@link mat2.multiply} - * @function - */ -mat2.mul = mat2.multiply; -/** - * Rotates a mat2 by the given angle - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ -mat2.rotate = function (out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - s = Math.sin(rad), - c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; -}; +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} -/** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the matrix to rotate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat2} out - **/ -mat2.scale = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; -}; -/** - * Returns a string representation of a mat2 - * - * @param {mat2} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat2.str = function (a) { - return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; -/** - * Returns Frobenius norm of a mat2 - * - * @param {mat2} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat2.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2))) -}; +},{"./common":150,"./exception":152,"./mark":154,"./schema/default_full":157,"./schema/default_safe":158}],154:[function(_dereq_,module,exports){ +'use strict'; -/** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param {mat2} L the lower triangular matrix - * @param {mat2} D the diagonal matrix - * @param {mat2} U the upper triangular matrix - * @param {mat2} a the input matrix to factorize - */ -mat2.LDU = function (L, D, U, a) { - L[2] = a[2]/a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; -}; +var common = _dereq_('./common'); -if(typeof(exports) !== 'undefined') { - exports.mat2 = mat2; + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; } -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (!this.buffer) { + return null; + } -/** - * @class 2x3 Matrix - * @name mat2d - * - * @description - * A mat2d contains six elements defined as: - *
- * [a, c, tx,
- *  b, d, ty]
- * 
- * This is a short form for the 3x3 matrix: - *
- * [a, c, tx,
- *  b, d, ty,
- *  0, 0, 1]
- * 
- * The last row is ignored so the array is shorter and operations are faster. - */ + indent = indent || 4; + maxLength = maxLength || 75; -var mat2d = {}; + head = ''; + start = this.position; -/** - * Creates a new identity mat2d - * - * @returns {mat2d} a new 2x3 matrix - */ -mat2d.create = function() { - var out = new GLMAT_ARRAY_TYPE(6); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; -}; + while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } -/** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param {mat2d} a matrix to clone - * @returns {mat2d} a new 2x3 matrix - */ -mat2d.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -}; + tail = ''; + end = this.position; -/** - * Copy the values from one mat2d to another - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the source matrix - * @returns {mat2d} out - */ -mat2d.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -}; + while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } -/** - * Set a mat2d to the identity matrix - * - * @param {mat2d} out the receiving matrix - * @returns {mat2d} out - */ -mat2d.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; }; -/** - * Inverts a mat2d - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the source matrix - * @returns {mat2d} out - */ -mat2d.invert = function(out, a) { - var aa = a[0], ab = a[1], ac = a[2], ad = a[3], - atx = a[4], aty = a[5]; - var det = aa * ad - ab * ac; - if(!det){ - return null; +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; } - det = 1.0 / det; + } - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; + return where; }; -/** - * Calculates the determinant of a mat2d - * - * @param {mat2d} a the source matrix - * @returns {Number} determinant of a - */ -mat2d.determinant = function (a) { - return a[0] * a[3] - a[1] * a[2]; -}; -/** - * Multiplies two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @returns {mat2d} out - */ -mat2d.multiply = function (out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; -}; +module.exports = Mark; -/** - * Alias for {@link mat2d.multiply} - * @function - */ -mat2d.mul = mat2d.multiply; +},{"./common":150}],155:[function(_dereq_,module,exports){ +'use strict'; +/*eslint-disable max-len*/ -/** - * Rotates a mat2d by the given angle - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ -mat2d.rotate = function (out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - s = Math.sin(rad), - c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; -}; +var common = _dereq_('./common'); +var YAMLException = _dereq_('./exception'); +var Type = _dereq_('./type'); -/** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to translate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat2d} out - **/ -mat2d.scale = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; -}; -/** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to translate - * @param {vec2} v the vec2 to translate the matrix by - * @returns {mat2d} out - **/ -mat2d.translate = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - v0 = v[0], v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; -}; +function compileList(schema, name, result) { + var exclude = []; -/** - * Returns a string representation of a mat2d - * - * @param {mat2d} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat2d.str = function (a) { - return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + - a[3] + ', ' + a[4] + ', ' + a[5] + ')'; -}; + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); -/** - * Returns Frobenius norm of a mat2d - * - * @param {mat2d} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat2d.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1)) -}; + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag) { + exclude.push(previousIndex); + } + }); -if(typeof(exports) !== 'undefined') { - exports.mat2d = mat2d; + result.push(currentType); + }); + + return result.filter(function (type, index) { + return -1 === exclude.indexOf(index); + }); } -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +function compileMap(/* lists... */) { + var result = {}, index, length; -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + function collectType(type) { + result[type.tag] = type; + } -/** - * @class 3x3 Matrix - * @name mat3 - */ + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } -var mat3 = {}; + return result; +} -/** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ -mat3.create = function() { - var out = new GLMAT_ARRAY_TYPE(9); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -}; -/** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {mat4} a the source 4x4 matrix - * @returns {mat3} out - */ -mat3.fromMat4 = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; -}; +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; -/** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {mat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ -mat3.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; + this.implicit.forEach(function (type) { + if (type.loadKind && 'scalar' !== type.loadKind) { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } -/** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; + schemas = common.toArray(schemas); + types = common.toArray(types); -/** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ -mat3.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -}; + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } -/** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); }; -/** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.invert = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], - b01 = a22 * a11 - a12 * a21, - b11 = -a22 * a10 + a12 * a20, - b21 = a21 * a10 - a11 * a20, +module.exports = Schema; - // Calculate the determinant - det = a00 * b01 + a01 * b11 + a02 * b21; +},{"./common":150,"./exception":152,"./type":161}],156:[function(_dereq_,module,exports){ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; -}; +'use strict'; -/** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.adjoint = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8]; - out[0] = (a11 * a22 - a12 * a21); - out[1] = (a02 * a21 - a01 * a22); - out[2] = (a01 * a12 - a02 * a11); - out[3] = (a12 * a20 - a10 * a22); - out[4] = (a00 * a22 - a02 * a20); - out[5] = (a02 * a10 - a00 * a12); - out[6] = (a10 * a21 - a11 * a20); - out[7] = (a01 * a20 - a00 * a21); - out[8] = (a00 * a11 - a01 * a10); - return out; -}; +var Schema = _dereq_('../schema'); -/** - * Calculates the determinant of a mat3 - * - * @param {mat3} a the source matrix - * @returns {Number} determinant of a - */ -mat3.determinant = function (a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8]; - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); -}; +module.exports = new Schema({ + include: [ + _dereq_('./json') + ] +}); -/** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ -mat3.multiply = function (out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], +},{"../schema":155,"./json":160}],157:[function(_dereq_,module,exports){ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. - b00 = b[0], b01 = b[1], b02 = b[2], - b10 = b[3], b11 = b[4], b12 = b[5], - b20 = b[6], b21 = b[7], b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; +'use strict'; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; -}; +var Schema = _dereq_('../schema'); -/** - * Alias for {@link mat3.multiply} - * @function - */ -mat3.mul = mat3.multiply; -/** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to translate - * @param {vec2} v vector to translate by - * @returns {mat3} out - */ -mat3.translate = function(out, a, v) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], - x = v[0], y = v[1]; +module.exports = Schema.DEFAULT = new Schema({ + include: [ + _dereq_('./default_safe') + ], + explicit: [ + _dereq_('../type/js/undefined'), + _dereq_('../type/js/regexp'), + _dereq_('../type/js/function') + ] +}); - out[0] = a00; - out[1] = a01; - out[2] = a02; +},{"../schema":155,"../type/js/function":166,"../type/js/regexp":167,"../type/js/undefined":168,"./default_safe":158}],158:[function(_dereq_,module,exports){ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) - out[3] = a10; - out[4] = a11; - out[5] = a12; - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; -}; +'use strict'; -/** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ -mat3.rotate = function (out, a, rad) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], - s = Math.sin(rad), - c = Math.cos(rad); +var Schema = _dereq_('../schema'); - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; +module.exports = new Schema({ + include: [ + _dereq_('./core') + ], + implicit: [ + _dereq_('../type/timestamp'), + _dereq_('../type/merge') + ], + explicit: [ + _dereq_('../type/binary'), + _dereq_('../type/omap'), + _dereq_('../type/pairs'), + _dereq_('../type/set') + ] +}); - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; -}; +},{"../schema":155,"../type/binary":162,"../type/merge":170,"../type/omap":172,"../type/pairs":173,"../type/set":175,"../type/timestamp":177,"./core":156}],159:[function(_dereq_,module,exports){ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 -/** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ -mat3.scale = function(out, a, v) { - var x = v[0], y = v[1]; - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; +'use strict'; - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; +var Schema = _dereq_('../schema'); -/** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat2d} a the matrix to copy - * @returns {mat3} out - **/ -mat3.fromMat2d = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; +module.exports = new Schema({ + explicit: [ + _dereq_('../type/str'), + _dereq_('../type/seq'), + _dereq_('../type/map') + ] +}); - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; -}; +},{"../schema":155,"../type/map":169,"../type/seq":174,"../type/str":176}],160:[function(_dereq_,module,exports){ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. -/** -* Calculates a 3x3 matrix from the given quaternion -* -* @param {mat3} out mat3 receiving operation result -* @param {quat} q Quaternion to create matrix from -* -* @returns {mat3} out -*/ -mat3.fromQuat = function (out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3], - x2 = x + x, - y2 = y + y, - z2 = z + z, - xx = x * x2, - yx = y * x2, - yy = y * y2, - zx = z * x2, - zy = z * y2, - zz = z * z2, - wx = w * x2, - wy = w * y2, - wz = w * z2; +'use strict'; - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; +var Schema = _dereq_('../schema'); - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - return out; -}; +module.exports = new Schema({ + include: [ + _dereq_('./failsafe') + ], + implicit: [ + _dereq_('../type/null'), + _dereq_('../type/bool'), + _dereq_('../type/int'), + _dereq_('../type/float') + ] +}); -/** -* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix -* -* @param {mat3} out mat3 receiving operation result -* @param {mat4} a Mat4 to derive the normal matrix from -* -* @returns {mat3} out -*/ -mat3.normalFromMat4 = function (out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], +},{"../schema":155,"../type/bool":163,"../type/float":164,"../type/int":165,"../type/null":171,"./failsafe":159}],161:[function(_dereq_,module,exports){ +'use strict'; - b00 = a00 * a11 - a01 * a10, - b01 = a00 * a12 - a02 * a10, - b02 = a00 * a13 - a03 * a10, - b03 = a01 * a12 - a02 * a11, - b04 = a01 * a13 - a03 * a11, - b05 = a02 * a13 - a03 * a12, - b06 = a20 * a31 - a21 * a30, - b07 = a20 * a32 - a22 * a30, - b08 = a20 * a33 - a23 * a30, - b09 = a21 * a32 - a22 * a31, - b10 = a21 * a33 - a23 * a31, - b11 = a22 * a33 - a23 * a32, +var YAMLException = _dereq_('./exception'); - // Calculate the determinant - det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; - if (!det) { - return null; +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (null !== map) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } - det = 1.0 / det; + }); - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; +module.exports = Type; - return out; -}; +},{"./exception":152}],162:[function(_dereq_,module,exports){ +'use strict'; -/** - * Returns a string representation of a mat3 - * - * @param {mat3} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat3.str = function (a) { - return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + - a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + - a[6] + ', ' + a[7] + ', ' + a[8] + ')'; -}; +/*eslint-disable no-bitwise*/ + +// A trick for browserified version. +// Since we make browserifier to ignore `buffer` module, NodeBuffer will be undefined +var NodeBuffer = _dereq_('buffer').Buffer; +var Type = _dereq_('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (null === data) { + return false; + } + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); -/** - * Returns Frobenius norm of a mat3 - * - * @param {mat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat3.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2))) -}; + // Skip CR/LF + if (code > 64) { continue; } + // Fail on illegal characters + if (code < 0) { return false; } -if(typeof(exports) !== 'undefined') { - exports.mat3 = mat3; + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; } -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + // Collect by 6*4 bits (3 bytes) -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } -/** - * @class 4x4 Matrix - * @name mat4 - */ + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } -var mat4 = {}; + // Dump tail -/** - * Creates a new identity mat4 - * - * @returns {mat4} a new 4x4 matrix - */ -mat4.create = function() { - var out = new GLMAT_ARRAY_TYPE(16); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; -}; + tailbits = (max % 4) * 6; -/** - * Creates a new mat4 initialized with values from an existing matrix - * - * @param {mat4} a matrix to clone - * @returns {mat4} a new 4x4 matrix - */ -mat4.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(16); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } -/** - * Copy the values from one mat4 to another - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + return new NodeBuffer(result); + } -/** - * Set a mat4 to the identity matrix - * - * @param {mat4} out the receiving matrix - * @returns {mat4} out - */ -mat4.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; -}; + return result; +} -/** - * Transpose the values of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a03 = a[3], - a12 = a[6], a13 = a[7], - a23 = a[11]; +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a01; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a02; - out[9] = a12; - out[11] = a[14]; - out[12] = a03; - out[13] = a13; - out[14] = a23; - } else { - out[0] = a[0]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a[1]; - out[5] = a[5]; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a[2]; - out[9] = a[6]; - out[10] = a[10]; - out[11] = a[14]; - out[12] = a[3]; - out[13] = a[7]; - out[14] = a[11]; - out[15] = a[15]; + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; } - - return out; -}; -/** - * Inverts a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.invert = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], + bits = (bits << 8) + object[idx]; + } - b00 = a00 * a11 - a01 * a10, - b01 = a00 * a12 - a02 * a10, - b02 = a00 * a13 - a03 * a10, - b03 = a01 * a12 - a02 * a11, - b04 = a01 * a13 - a03 * a11, - b05 = a02 * a13 - a03 * a12, - b06 = a20 * a31 - a21 * a30, - b07 = a20 * a32 - a22 * a30, - b08 = a20 * a33 - a23 * a30, - b09 = a21 * a32 - a22 * a31, - b10 = a21 * a33 - a23 * a31, - b11 = a22 * a33 - a23 * a32, + // Dump tail - // Calculate the determinant - det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + tail = max % 3; - if (!det) { - return null; - } - det = 1.0 / det; + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; - out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; - out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; - out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; - out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; - out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; - out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; + return result; +} - return out; -}; +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} -/** - * Calculates the adjugate of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.adjoint = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); - out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)); - out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)); - out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)); - out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)); - out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)); - out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)); - out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)); - out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)); - out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)); - out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)); - out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)); - out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)); - out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)); - out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)); - out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)); - out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)); - return out; -}; +},{"../type":161,"buffer":37}],163:[function(_dereq_,module,exports){ +'use strict'; -/** - * Calculates the determinant of a mat4 - * - * @param {mat4} a the source matrix - * @returns {Number} determinant of a - */ -mat4.determinant = function (a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], +var Type = _dereq_('../type'); - b00 = a00 * a11 - a01 * a10, - b01 = a00 * a12 - a02 * a10, - b02 = a00 * a13 - a03 * a10, - b03 = a01 * a12 - a02 * a11, - b04 = a01 * a13 - a03 * a11, - b05 = a02 * a13 - a03 * a12, - b06 = a20 * a31 - a21 * a30, - b07 = a20 * a32 - a22 * a30, - b08 = a20 * a33 - a23 * a30, - b09 = a21 * a32 - a22 * a31, - b10 = a21 * a33 - a23 * a31, - b11 = a22 * a33 - a23 * a32; +function resolveYamlBoolean(data) { + if (null === data) { + return false; + } - // Calculate the determinant - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; -}; + var max = data.length; -/** - * Multiplies two mat4's - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @returns {mat4} out - */ -mat4.multiply = function (out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} - // Cache only the current line of the second matrix - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33; +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} - b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7]; - out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33; +function isBoolean(object) { + return '[object Boolean]' === Object.prototype.toString.call(object); +} - b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11]; - out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33; +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); - b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15]; - out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - return out; -}; +},{"../type":161}],164:[function(_dereq_,module,exports){ +'use strict'; -/** - * Alias for {@link mat4.multiply} - * @function - */ -mat4.mul = mat4.multiply; +var common = _dereq_('../common'); +var Type = _dereq_('../type'); -/** - * Translate a mat4 by the given vector - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to translate - * @param {vec3} v vector to translate by - * @returns {mat4} out - */ -mat4.translate = function (out, a, v) { - var x = v[0], y = v[1], z = v[2], - a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23; +var YAML_FLOAT_PATTERN = new RegExp( + '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' + + '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' + + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + '|[-+]?\\.(?:inf|Inf|INF)' + + '|\\.(?:nan|NaN|NAN))$'); - if (a === out) { - out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; - out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; - out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; - out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; - } else { - a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; - a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; - a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; +function resolveYamlFloat(data) { + if (null === data) { + return false; + } - out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03; - out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13; - out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23; + if (!YAML_FLOAT_PATTERN.test(data)) { + return false; + } + return true; +} - out[12] = a00 * x + a10 * y + a20 * z + a[12]; - out[13] = a01 * x + a11 * y + a21 * z + a[13]; - out[14] = a02 * x + a12 * y + a22 * z + a[14]; - out[15] = a03 * x + a13 * y + a23 * z + a[15]; - } +function constructYamlFloat(data) { + var value, sign, base, digits; - return out; -}; + value = data.replace(/_/g, '').toLowerCase(); + sign = '-' === value[0] ? -1 : 1; + digits = []; -/** - * Scales the mat4 by the dimensions in the given vec3 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to scale - * @param {vec3} v the vec3 to scale the matrix by - * @returns {mat4} out - **/ -mat4.scale = function(out, a, v) { - var x = v[0], y = v[1], z = v[2]; + if (0 <= '+-'.indexOf(value[0])) { + value = value.slice(1); + } - out[0] = a[0] * x; - out[1] = a[1] * x; - out[2] = a[2] * x; - out[3] = a[3] * x; - out[4] = a[4] * y; - out[5] = a[5] * y; - out[6] = a[6] * y; - out[7] = a[7] * y; - out[8] = a[8] * z; - out[9] = a[9] * z; - out[10] = a[10] * z; - out[11] = a[11] * z; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + if ('.inf' === value) { + return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; -/** - * Rotates a mat4 by the given angle - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @param {vec3} axis the axis to rotate around - * @returns {mat4} out - */ -mat4.rotate = function (out, a, rad, axis) { - var x = axis[0], y = axis[1], z = axis[2], - len = Math.sqrt(x * x + y * y + z * z), - s, c, t, - a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23, - b00, b01, b02, - b10, b11, b12, - b20, b21, b22; + } else if ('.nan' === value) { + return NaN; - if (Math.abs(len) < GLMAT_EPSILON) { return null; } - - len = 1 / len; - x *= len; - y *= len; - z *= len; + } else if (0 <= value.indexOf(':')) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; + value = 0.0; + base = 1; - a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; - a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; - a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); - // Construct the elements of the rotation matrix - b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s; - b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s; - b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c; + return sign * value; - // Perform rotation-specific matrix multiplication - out[0] = a00 * b00 + a10 * b01 + a20 * b02; - out[1] = a01 * b00 + a11 * b01 + a21 * b02; - out[2] = a02 * b00 + a12 * b01 + a22 * b02; - out[3] = a03 * b00 + a13 * b01 + a23 * b02; - out[4] = a00 * b10 + a10 * b11 + a20 * b12; - out[5] = a01 * b10 + a11 * b11 + a21 * b12; - out[6] = a02 * b10 + a12 * b11 + a22 * b12; - out[7] = a03 * b10 + a13 * b11 + a23 * b12; - out[8] = a00 * b20 + a10 * b21 + a20 * b22; - out[9] = a01 * b20 + a11 * b21 + a21 * b22; - out[10] = a02 * b20 + a12 * b21 + a22 * b22; - out[11] = a03 * b20 + a13 * b21 + a23 * b22; + } + return sign * parseFloat(value, 10); +} - if (a !== out) { // If the source and destination differ, copy the unchanged last row - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - return out; -}; -/** - * Rotates a matrix by the given angle around the X axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateX = function (out, a, rad) { - var s = Math.sin(rad), - c = Math.cos(rad), - a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7], - a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - if (a !== out) { // If the source and destination differ, copy the unchanged rows - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': + return '.nan'; + case 'uppercase': + return '.NAN'; + case 'camelcase': + return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': + return '.inf'; + case 'uppercase': + return '.INF'; + case 'camelcase': + return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': + return '-.inf'; + case 'uppercase': + return '-.INF'; + case 'camelcase': + return '-.Inf'; } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } - // Perform axis-specific matrix multiplication - out[4] = a10 * c + a20 * s; - out[5] = a11 * c + a21 * s; - out[6] = a12 * c + a22 * s; - out[7] = a13 * c + a23 * s; - out[8] = a20 * c - a10 * s; - out[9] = a21 * c - a11 * s; - out[10] = a22 * c - a12 * s; - out[11] = a23 * c - a13 * s; - return out; -}; + res = object.toString(10); -/** - * Rotates a matrix by the given angle around the Y axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateY = function (out, a, rad) { - var s = Math.sin(rad), - c = Math.cos(rad), - a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3], - a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack - if (a !== out) { // If the source and destination differ, copy the unchanged rows - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} - // Perform axis-specific matrix multiplication - out[0] = a00 * c - a20 * s; - out[1] = a01 * c - a21 * s; - out[2] = a02 * c - a22 * s; - out[3] = a03 * c - a23 * s; - out[8] = a00 * s + a20 * c; - out[9] = a01 * s + a21 * c; - out[10] = a02 * s + a22 * c; - out[11] = a03 * s + a23 * c; - return out; -}; +function isFloat(object) { + return ('[object Number]' === Object.prototype.toString.call(object)) && + (0 !== object % 1 || common.isNegativeZero(object)); +} -/** - * Rotates a matrix by the given angle around the Z axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateZ = function (out, a, rad) { - var s = Math.sin(rad), - c = Math.cos(rad), - a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3], - a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); - if (a !== out) { // If the source and destination differ, copy the unchanged last row - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } +},{"../common":150,"../type":161}],165:[function(_dereq_,module,exports){ +'use strict'; - // Perform axis-specific matrix multiplication - out[0] = a00 * c + a10 * s; - out[1] = a01 * c + a11 * s; - out[2] = a02 * c + a12 * s; - out[3] = a03 * c + a13 * s; - out[4] = a10 * c - a00 * s; - out[5] = a11 * c - a01 * s; - out[6] = a12 * c - a02 * s; - out[7] = a13 * c - a03 * s; - return out; -}; +var common = _dereq_('../common'); +var Type = _dereq_('../type'); -/** - * Creates a matrix from a quaternion rotation and vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {vec3} v Translation vector - * @returns {mat4} out - */ -mat4.fromRotationTranslation = function (out, q, v) { - // Quaternion math - var x = q[0], y = q[1], z = q[2], w = q[3], - x2 = x + x, - y2 = y + y, - z2 = z + z, +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} - xx = x * x2, - xy = x * y2, - xz = x * z2, - yy = y * y2, - yz = y * z2, - zz = z * z2, - wx = w * x2, - wy = w * y2, - wz = w * z2; +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} - out[0] = 1 - (yy + zz); - out[1] = xy + wz; - out[2] = xz - wy; - out[3] = 0; - out[4] = xy - wz; - out[5] = 1 - (xx + zz); - out[6] = yz + wx; - out[7] = 0; - out[8] = xz + wy; - out[9] = yz - wx; - out[10] = 1 - (xx + yy); - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - - return out; -}; +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} -mat4.fromQuat = function (out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3], - x2 = x + x, - y2 = y + y, - z2 = z + z, +function resolveYamlInteger(data) { + if (null === data) { + return false; + } - xx = x * x2, - yx = y * x2, - yy = y * y2, - zx = z * x2, - zy = z * y2, - zz = z * z2, - wx = w * x2, - wy = w * y2, - wz = w * z2; + var max = data.length, + index = 0, + hasDigits = false, + ch; - out[0] = 1 - yy - zz; - out[1] = yx + wz; - out[2] = zx - wy; - out[3] = 0; + if (!max) { return false; } - out[4] = yx - wz; - out[5] = 1 - xx - zz; - out[6] = zy + wx; - out[7] = 0; + ch = data[index]; - out[8] = zx + wy; - out[9] = zy - wx; - out[10] = 1 - xx - yy; - out[11] = 0; + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; + if (ch === '0') { + // 0 + if (index + 1 === max) { return true; } + ch = data[++index]; - return out; -}; + // base 2, base 8, base 16 -/** - * Generates a frustum matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Number} left Left bound of the frustum - * @param {Number} right Right bound of the frustum - * @param {Number} bottom Bottom bound of the frustum - * @param {Number} top Top bound of the frustum - * @param {Number} near Near bound of the frustum - * @param {Number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.frustum = function (out, left, right, bottom, top, near, far) { - var rl = 1 / (right - left), - tb = 1 / (top - bottom), - nf = 1 / (near - far); - out[0] = (near * 2) * rl; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = (near * 2) * tb; - out[6] = 0; - out[7] = 0; - out[8] = (right + left) * rl; - out[9] = (top + bottom) * tb; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = (far * near * 2) * nf; - out[15] = 0; - return out; -}; + if (ch === 'b') { + // base 2 + index++; -/** - * Generates a perspective projection matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} fovy Vertical field of view in radians - * @param {number} aspect Aspect ratio. typically viewport width/height - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.perspective = function (out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2), - nf = 1 / (near - far); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = (2 * far * near) * nf; - out[15] = 0; - return out; -}; + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') { continue; } + if (ch !== '0' && ch !== '1') { + return false; + } + hasDigits = true; + } + return hasDigits; + } -/** - * Generates a orthogonal projection matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} left Left bound of the frustum - * @param {number} right Right bound of the frustum - * @param {number} bottom Bottom bound of the frustum - * @param {number} top Top bound of the frustum - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.ortho = function (out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right), - bt = 1 / (bottom - top), - nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 2 * nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = (far + near) * nf; - out[15] = 1; - return out; -}; -/** - * Generates a look-at matrix with the given eye position, focal point, and up axis - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {vec3} eye Position of the viewer - * @param {vec3} center Point the viewer is looking at - * @param {vec3} up vec3 pointing up - * @returns {mat4} out - */ -mat4.lookAt = function (out, eye, center, up) { - var x0, x1, x2, y0, y1, y2, z0, z1, z2, len, - eyex = eye[0], - eyey = eye[1], - eyez = eye[2], - upx = up[0], - upy = up[1], - upz = up[2], - centerx = center[0], - centery = center[1], - centerz = center[2]; + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') { continue; } + if (!isHexCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + return hasDigits; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') { continue; } + if (!isOctCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + return hasDigits; + } + + // base 10 (except 0) or base 60 - if (Math.abs(eyex - centerx) < GLMAT_EPSILON && - Math.abs(eyey - centery) < GLMAT_EPSILON && - Math.abs(eyez - centerz) < GLMAT_EPSILON) { - return mat4.identity(out); + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') { continue; } + if (ch === ':') { break; } + if (!isDecCode(data.charCodeAt(index))) { + return false; } + hasDigits = true; + } - z0 = eyex - centerx; - z1 = eyey - centery; - z2 = eyez - centerz; + if (!hasDigits) { return false; } - len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - z0 *= len; - z1 *= len; - z2 *= len; + // if !base60 - done; + if (ch !== ':') { return true; } - x0 = upy * z2 - upz * z1; - x1 = upz * z0 - upx * z2; - x2 = upx * z1 - upy * z0; - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - if (!len) { - x0 = 0; - x1 = 0; - x2 = 0; - } else { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') { sign = -1; } + value = value.slice(1); + ch = value[0]; + } + + if ('0' === value) { + return 0; + } + + if (ch === '0') { + if (value[1] === 'b') { + return sign * parseInt(value.slice(2), 2); } + if (value[1] === 'x') { + return sign * parseInt(value, 16); + } + return sign * parseInt(value, 8); - y0 = z1 * x2 - z2 * x1; - y1 = z2 * x0 - z0 * x2; - y2 = z0 * x1 - z1 * x0; + } - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - if (!len) { - y0 = 0; - y1 = 0; - y2 = 0; - } else { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return ('[object Number]' === Object.prototype.toString.call(object)) && + (0 === object % 1 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (object) { return '0b' + object.toString(2); }, + octal: function (object) { return '0' + object.toString(8); }, + decimal: function (object) { return object.toString(10); }, + hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +},{"../common":150,"../type":161}],166:[function(_dereq_,module,exports){ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + esprima = _dereq_('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') { esprima = window.esprima; } +} + +var Type = _dereq_('../../type'); + +function resolveJavascriptFunction(data) { + if (null === data) { + return false; + } + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if ('Program' !== ast.type || + 1 !== ast.body.length || + 'ExpressionStatement' !== ast.body[0].type || + 'FunctionExpression' !== ast.body[0].expression.type) { + return false; } - out[0] = x0; - out[1] = y0; - out[2] = z0; - out[3] = 0; - out[4] = x1; - out[5] = y1; - out[6] = z1; - out[7] = 0; - out[8] = x2; - out[9] = y2; - out[10] = z2; - out[11] = 0; - out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); - out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); - out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); - out[15] = 1; + return true; + } catch (err) { + return false; + } +} - return out; -}; +function constructJavascriptFunction(data) { + /*jslint evil:true*/ -/** - * Returns a string representation of a mat4 - * - * @param {mat4} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat4.str = function (a) { - return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + - a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + - a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + - a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')'; -}; + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; -/** - * Returns Frobenius norm of a mat4 - * - * @param {mat4} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat4.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) )) -}; + if ('Program' !== ast.type || + 1 !== ast.body.length || + 'ExpressionStatement' !== ast.body[0].type || + 'FunctionExpression' !== ast.body[0].expression.type) { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; -if(typeof(exports) !== 'undefined') { - exports.mat4 = mat4; + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); } -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +function isFunction(object) { + return '[object Function]' === Object.prototype.toString.call(object); +} -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); -/** - * @class Quaternion - * @name quat - */ +},{"../../type":161,"esprima":178}],167:[function(_dereq_,module,exports){ +'use strict'; -var quat = {}; +var Type = _dereq_('../../type'); -/** - * Creates a new identity quat - * - * @returns {quat} a new quaternion - */ -quat.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; +function resolveJavascriptRegExp(data) { + if (null === data) { + return false; + } -/** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param {quat} out the receiving quaternion. - * @param {vec3} a the initial vector - * @param {vec3} b the destination vector - * @returns {quat} out - */ -quat.rotationTo = (function() { - var tmpvec3 = vec3.create(); - var xUnitVec3 = vec3.fromValues(1,0,0); - var yUnitVec3 = vec3.fromValues(0,1,0); + if (0 === data.length) { + return false; + } - return function(out, a, b) { - var dot = vec3.dot(a, b); - if (dot < -0.999999) { - vec3.cross(tmpvec3, xUnitVec3, a); - if (vec3.length(tmpvec3) < 0.000001) - vec3.cross(tmpvec3, yUnitVec3, a); - vec3.normalize(tmpvec3, tmpvec3); - quat.setAxisAngle(out, tmpvec3, Math.PI); - return out; - } else if (dot > 0.999999) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } else { - vec3.cross(tmpvec3, a, b); - out[0] = tmpvec3[0]; - out[1] = tmpvec3[1]; - out[2] = tmpvec3[2]; - out[3] = 1 + dot; - return quat.normalize(out, out); - } - }; -})(); + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; -/** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param {vec3} view the vector representing the viewing direction - * @param {vec3} right the vector representing the local "right" direction - * @param {vec3} up the vector representing the local "up" direction - * @returns {quat} out - */ -quat.setAxes = (function() { - var matr = mat3.create(); + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if ('/' === regexp[0]) { + if (tail) { + modifiers = tail[1]; + } - return function(out, view, right, up) { - matr[0] = right[0]; - matr[3] = right[1]; - matr[6] = right[2]; + if (modifiers.length > 3) { return false; } + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') { return false; } - matr[1] = up[0]; - matr[4] = up[1]; - matr[7] = up[2]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } - matr[2] = -view[0]; - matr[5] = -view[1]; - matr[8] = -view[2]; + try { + return true; + } catch (error) { + return false; + } +} - return quat.normalize(out, quat.fromMat3(out, matr)); - }; -})(); +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; -/** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {quat} a quaternion to clone - * @returns {quat} a new quaternion - * @function - */ -quat.clone = vec4.clone; + // `/foo/gim` - tail can be maximum 4 chars + if ('/' === regexp[0]) { + if (tail) { + modifiers = tail[1]; + } + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } -/** - * Creates a new quat initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} a new quaternion - * @function - */ -quat.fromValues = vec4.fromValues; + return new RegExp(regexp, modifiers); +} -/** - * Copy the values from one quat to another - * - * @param {quat} out the receiving quaternion - * @param {quat} a the source quaternion - * @returns {quat} out - * @function - */ -quat.copy = vec4.copy; +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; -/** - * Set the components of a quat to the given values - * - * @param {quat} out the receiving quaternion - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} out - * @function - */ -quat.set = vec4.set; + if (object.global) { + result += 'g'; + } -/** - * Set a quat to the identity quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ -quat.identity = function(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; + if (object.multiline) { + result += 'm'; + } -/** - * Sets a quat from the given angle and rotation axis, - * then returns it. - * - * @param {quat} out the receiving quaternion - * @param {vec3} axis the axis around which to rotate - * @param {Number} rad the angle in radians - * @returns {quat} out - **/ -quat.setAxisAngle = function(out, axis, rad) { - rad = rad * 0.5; - var s = Math.sin(rad); - out[0] = s * axis[0]; - out[1] = s * axis[1]; - out[2] = s * axis[2]; - out[3] = Math.cos(rad); - return out; -}; + if (object.ignoreCase) { + result += 'i'; + } -/** - * Adds two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {quat} out - * @function - */ -quat.add = vec4.add; + return result; +} + +function isRegExp(object) { + return '[object RegExp]' === Object.prototype.toString.call(object); +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +},{"../../type":161}],168:[function(_dereq_,module,exports){ +'use strict'; -/** - * Multiplies two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {quat} out - */ -quat.multiply = function(out, a, b) { - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = b[0], by = b[1], bz = b[2], bw = b[3]; +var Type = _dereq_('../../type'); - out[0] = ax * bw + aw * bx + ay * bz - az * by; - out[1] = ay * bw + aw * by + az * bx - ax * bz; - out[2] = az * bw + aw * bz + ax * by - ay * bx; - out[3] = aw * bw - ax * bx - ay * by - az * bz; - return out; -}; +function resolveJavascriptUndefined() { + return true; +} -/** - * Alias for {@link quat.multiply} - * @function - */ -quat.mul = quat.multiply; +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} -/** - * Scales a quat by a scalar number - * - * @param {quat} out the receiving vector - * @param {quat} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {quat} out - * @function - */ -quat.scale = vec4.scale; +function representJavascriptUndefined() { + return ''; +} -/** - * Rotates a quaternion by the given angle about the X axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateX = function (out, a, rad) { - rad *= 0.5; +function isUndefined(object) { + return 'undefined' === typeof object; +} - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = Math.sin(rad), bw = Math.cos(rad); +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); - out[0] = ax * bw + aw * bx; - out[1] = ay * bw + az * bx; - out[2] = az * bw - ay * bx; - out[3] = aw * bw - ax * bx; - return out; -}; +},{"../../type":161}],169:[function(_dereq_,module,exports){ +'use strict'; -/** - * Rotates a quaternion by the given angle about the Y axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateY = function (out, a, rad) { - rad *= 0.5; +var Type = _dereq_('../type'); - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - by = Math.sin(rad), bw = Math.cos(rad); +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return null !== data ? data : {}; } +}); - out[0] = ax * bw - az * by; - out[1] = ay * bw + aw * by; - out[2] = az * bw + ax * by; - out[3] = aw * bw - ay * by; - return out; -}; +},{"../type":161}],170:[function(_dereq_,module,exports){ +'use strict'; -/** - * Rotates a quaternion by the given angle about the Z axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateZ = function (out, a, rad) { - rad *= 0.5; +var Type = _dereq_('../type'); - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bz = Math.sin(rad), bw = Math.cos(rad); +function resolveYamlMerge(data) { + return '<<' === data || null === data; +} - out[0] = ax * bw + ay * bz; - out[1] = ay * bw - ax * bz; - out[2] = az * bw + aw * bz; - out[3] = aw * bw - az * bz; - return out; -}; +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); -/** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate W component of - * @returns {quat} out - */ -quat.calculateW = function (out, a) { - var x = a[0], y = a[1], z = a[2]; +},{"../type":161}],171:[function(_dereq_,module,exports){ +'use strict'; - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = -Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); - return out; -}; +var Type = _dereq_('../type'); -/** - * Calculates the dot product of two quat's - * - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {Number} dot product of a and b - * @function - */ -quat.dot = vec4.dot; +function resolveYamlNull(data) { + if (null === data) { + return true; + } -/** - * Performs a linear interpolation between two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {quat} out - * @function - */ -quat.lerp = vec4.lerp; + var max = data.length; -/** - * Performs a spherical linear interpolation between two quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {quat} out - */ -quat.slerp = function (out, a, b, t) { - // benchmarks: - // http://jsperf.com/quaternion-slerp-implementations + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = b[0], by = b[1], bz = b[2], bw = b[3]; +function constructYamlNull() { + return null; +} - var omega, cosom, sinom, scale0, scale1; +function isNull(object) { + return null === object; +} - // calc cosine - cosom = ax * bx + ay * by + az * bz + aw * bw; - // adjust signs (if necessary) - if ( cosom < 0.0 ) { - cosom = -cosom; - bx = - bx; - by = - by; - bz = - bz; - bw = - bw; - } - // calculate coefficients - if ( (1.0 - cosom) > 0.000001 ) { - // standard case (slerp) - omega = Math.acos(cosom); - sinom = Math.sin(omega); - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } else { - // "from" and "to" quaternions are very close - // ... so we can do a linear interpolation - scale0 = 1.0 - t; - scale1 = t; - } - // calculate final values - out[0] = scale0 * ax + scale1 * bx; - out[1] = scale0 * ay + scale1 * by; - out[2] = scale0 * az + scale1 * bz; - out[3] = scale0 * aw + scale1 * bw; - - return out; -}; +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); -/** - * Calculates the inverse of a quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate inverse of - * @returns {quat} out - */ -quat.invert = function(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - dot = a0*a0 + a1*a1 + a2*a2 + a3*a3, - invDot = dot ? 1.0/dot : 0; - - // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 +},{"../type":161}],172:[function(_dereq_,module,exports){ +'use strict'; - out[0] = -a0*invDot; - out[1] = -a1*invDot; - out[2] = -a2*invDot; - out[3] = a3*invDot; - return out; -}; +var Type = _dereq_('../type'); -/** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate conjugate of - * @returns {quat} out - */ -quat.conjugate = function (out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - return out; -}; +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; -/** - * Calculates the length of a quat - * - * @param {quat} a vector to calculate length of - * @returns {Number} length of a - * @function - */ -quat.length = vec4.length; +function resolveYamlOmap(data) { + if (null === data) { + return true; + } -/** - * Alias for {@link quat.length} - * @function - */ -quat.len = quat.length; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; -/** - * Calculates the squared length of a quat - * - * @param {quat} a vector to calculate squared length of - * @returns {Number} squared length of a - * @function - */ -quat.squaredLength = vec4.squaredLength; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; -/** - * Alias for {@link quat.squaredLength} - * @function - */ -quat.sqrLen = quat.squaredLength; + if ('[object Object]' !== _toString.call(pair)) { + return false; + } -/** - * Normalize a quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a quaternion to normalize - * @returns {quat} out - * @function - */ -quat.normalize = vec4.normalize; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) { + pairHasKey = true; + } else { + return false; + } + } + } -/** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - * - * @param {quat} out the receiving quaternion - * @param {mat3} m rotation matrix - * @returns {quat} out - * @function - */ -quat.fromMat3 = function(out, m) { - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var fTrace = m[0] + m[4] + m[8]; - var fRoot; + if (!pairHasKey) { + return false; + } - if ( fTrace > 0.0 ) { - // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - out[3] = 0.5 * fRoot; - fRoot = 0.5/fRoot; // 1/(4w) - out[0] = (m[7]-m[5])*fRoot; - out[1] = (m[2]-m[6])*fRoot; - out[2] = (m[3]-m[1])*fRoot; + if (-1 === objectKeys.indexOf(pairKey)) { + objectKeys.push(pairKey); } else { - // |w| <= 1/2 - var i = 0; - if ( m[4] > m[0] ) - i = 1; - if ( m[8] > m[i*3+i] ) - i = 2; - var j = (i+1)%3; - var k = (i+2)%3; - - fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0); - out[i] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; - out[3] = (m[k*3+j] - m[j*3+k]) * fRoot; - out[j] = (m[j*3+i] + m[i*3+j]) * fRoot; - out[k] = (m[k*3+i] + m[i*3+k]) * fRoot; + return false; } - - return out; -}; + } -/** - * Returns a string representation of a quatenion - * - * @param {quat} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -quat.str = function (a) { - return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; + return true; +} -if(typeof(exports) !== 'undefined') { - exports.quat = quat; +function constructYamlOmap(data) { + return null !== data ? data : []; } -; +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); +},{"../type":161}],173:[function(_dereq_,module,exports){ +'use strict'; +var Type = _dereq_('../type'); +var _toString = Object.prototype.toString; +function resolveYamlPairs(data) { + if (null === data) { + return true; + } + var index, length, pair, keys, result, + object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if ('[object Object]' !== _toString.call(pair)) { + return false; + } + keys = Object.keys(pair); + if (1 !== keys.length) { + return false; + } + result[index] = [ keys[0], pair[keys[0]] ]; + } - })(shim.exports); -})(this); + return true; +} -},{}],144:[function(_dereq_,module,exports){ -module.exports = parseErrors +function constructYamlPairs(data) { + if (null === data) { + return []; + } -function parseErrors(log) { - log = String(log) + var index, length, pair, keys, result, + object = data; - var logs = [] - var result + result = new Array(object.length); - while (result = log.match(/ERROR\:([^\n]+)/)) { - log = log.slice(result.index + 1) + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; - var line = result[1].trim() - var seps = line.split(':') - var emsg = seps.slice(2).join(':').trim() - var file = parseInt(seps[0], 10) - var line = parseInt(seps[1], 10) + keys = Object.keys(pair); - logs.push({ - message: emsg - , file: file - , line: line - }) + result[index] = [ keys[0], pair[keys[0]] ]; } - return logs + return result; } -},{}],145:[function(_dereq_,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); - i += d +},{"../type":161}],174:[function(_dereq_,module,exports){ +'use strict'; - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} +var Type = _dereq_('../type'); - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return null !== data ? data : []; } +}); - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} +},{"../type":161}],175:[function(_dereq_,module,exports){ +'use strict'; -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 +var Type = _dereq_('../type'); - value = Math.abs(value) +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (null === data) { + return true; + } - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } + var key, object = data; - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (null !== object[key]) { + return false; + } } } - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + return true; +} - buffer[offset + i - d] |= s * 128 +function constructYamlSet(data) { + return null !== data ? data : {}; } -},{}],146:[function(_dereq_,module,exports){ -/*! - * node-inherit - * Copyright(c) 2011 Dmitry Filatov - * MIT Licensed - */ +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); -module.exports = _dereq_('./lib/inherit'); +},{"../type":161}],176:[function(_dereq_,module,exports){ +'use strict'; -},{"./lib/inherit":147}],147:[function(_dereq_,module,exports){ -/** - * @module inherit - * @version 2.2.2 - * @author Filatov Dmitry - * @description This module provides some syntax sugar for "class" declarations, constructors, mixins, "super" calls and static members. - */ +var Type = _dereq_('../type'); -(function(global) { +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return null !== data ? data : ''; } +}); -var hasIntrospection = (function(){'_';}).toString().indexOf('_') > -1, - emptyBase = function() {}, - hasOwnProperty = Object.prototype.hasOwnProperty, - objCreate = Object.create || function(ptp) { - var inheritance = function() {}; - inheritance.prototype = ptp; - return new inheritance(); - }, - objKeys = Object.keys || function(obj) { - var res = []; - for(var i in obj) { - hasOwnProperty.call(obj, i) && res.push(i); - } - return res; - }, - extend = function(o1, o2) { - for(var i in o2) { - hasOwnProperty.call(o2, i) && (o1[i] = o2[i]); - } +},{"../type":161}],177:[function(_dereq_,module,exports){ +'use strict'; - return o1; - }, - toStr = Object.prototype.toString, - isArray = Array.isArray || function(obj) { - return toStr.call(obj) === '[object Array]'; - }, - isFunction = function(obj) { - return toStr.call(obj) === '[object Function]'; - }, - noOp = function() {}, - needCheckProps = true, - testPropObj = { toString : '' }; +var Type = _dereq_('../type'); -for(var i in testPropObj) { // fucking ie hasn't toString, valueOf in for - testPropObj.hasOwnProperty(i) && (needCheckProps = false); -} +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute -var specProps = needCheckProps? ['toString', 'valueOf'] : null; +function resolveYamlTimestamp(data) { + if (null === data) { + return false; + } -function getPropList(obj) { - var res = objKeys(obj); - if(needCheckProps) { - var specProp, i = 0; - while(specProp = specProps[i++]) { - obj.hasOwnProperty(specProp) && res.push(specProp); - } - } + if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { + return false; + } - return res; + return true; } -function override(base, res, add) { - var addList = getPropList(add), - j = 0, len = addList.length, - name, prop; - while(j < len) { - if((name = addList[j++]) === '__self') { - continue; - } - prop = add[name]; - if(isFunction(prop) && - (!hasIntrospection || prop.toString().indexOf('.__base') > -1)) { - res[name] = (function(name, prop) { - var baseMethod = base[name]? - base[name] : - name === '__constructor'? // case of inheritance from plane function - res.__self.__parent : - noOp; - return function() { - var baseSaved = this.__base; - this.__base = baseMethod; - var res = prop.apply(this, arguments); - this.__base = baseSaved; - return res; - }; - })(name, prop); - } else { - res[name] = prop; - } - } -} +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; -function applyMixins(mixins, res) { - var i = 1, mixin; - while(mixin = mixins[i++]) { - res? - isFunction(mixin)? - inherit.self(res, mixin.prototype, mixin) : - inherit.self(res, mixin) : - res = isFunction(mixin)? - inherit(mixins[0], mixin.prototype, mixin) : - inherit(mixins[0], mixin); - } - return res || mixins[0]; -} + match = YAML_TIMESTAMP_REGEXP.exec(data); -/** -* Creates class -* @exports -* @param {Function|Array} [baseClass|baseClassAndMixins] class (or class and mixins) to inherit from -* @param {Object} prototypeFields -* @param {Object} [staticFields] -* @returns {Function} class -*/ -function inherit() { - var args = arguments, - withMixins = isArray(args[0]), - hasBase = withMixins || isFunction(args[0]), - base = hasBase? withMixins? applyMixins(args[0]) : args[0] : emptyBase, - props = args[hasBase? 1 : 0] || {}, - staticProps = args[hasBase? 2 : 1], - res = props.__constructor || (hasBase && base.prototype.__constructor)? - function() { - return this.__constructor.apply(this, arguments); - } : - hasBase? - function() { - return base.apply(this, arguments); - } : - function() {}; + if (null === match) { + throw new Error('Date resolve error'); + } - if(!hasBase) { - res.prototype = props; - res.prototype.__self = res.prototype.constructor = res; - return extend(res, staticProps); - } + // match: [1] year [2] month [3] day - extend(res, base); + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); - res.__parent = base; + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } - var basePtp = base.prototype, - resPtp = res.prototype = objCreate(basePtp); + // match: [4] hour [5] minute [6] second [7] fraction - resPtp.__self = resPtp.constructor = res; + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); - props && override(basePtp, resPtp, props); - staticProps && override(base, res, staticProps); + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } - return res; -} + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute -inherit.self = function() { - var args = arguments, - withMixins = isArray(args[0]), - base = withMixins? applyMixins(args[0], args[0][0]) : args[0], - props = args[1], - staticProps = args[2], - basePtp = base.prototype; + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if ('-' === match[9]) { + delta = -delta; + } + } - props && override(basePtp, basePtp, props); - staticProps && override(base, base, staticProps); + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - return base; -}; + if (delta) { + date.setTime(date.getTime() - delta); + } -var defineAsGlobal = true; -if(typeof exports === 'object') { - module.exports = inherit; - defineAsGlobal = false; + return date; } -if(typeof modules === 'object') { - modules.define('inherit', function(provide) { - provide(inherit); - }); - defineAsGlobal = false; +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); } -if(typeof define === 'function') { - define(function(_dereq_, exports, module) { - module.exports = inherit; - }); - defineAsGlobal = false; -} +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); -defineAsGlobal && (global.inherit = inherit); +},{"../type":161}],178:[function(_dereq_,module,exports){ +/* + Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. -})(this); + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: -},{}],148:[function(_dereq_,module,exports){ + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -/** - * isArray - */ + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ -var isArray = Array.isArray; +(function (root, factory) { + 'use strict'; -/** - * toString - */ + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. -var str = Object.prototype.toString; + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ + var Token, + TokenName, + FnExprTokens, + Syntax, + PlaceHolders, + Messages, + Regex, + source, + strict, + index, + lineNumber, + lineStart, + hasLineTerminator, + lastIndex, + lastLineNumber, + lastLineStart, + startIndex, + startLineNumber, + startLineStart, + scanning, + length, + lookahead, + state, + extra, + isBindingElement, + isAssignmentTarget, + firstCoverInitializedNameError; -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9, + Template: 10 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = ''; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + TokenName[Token.Template] = 'Template'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForOfStatement: 'ForOfStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + PlaceHolders = { + ArrowParameterPlaceHolder: 'ArrowParameterPlaceHolder' + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalReturn: 'Illegal return statement', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', + ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', + DefaultRestParameter: 'Unexpected token =', + ObjectPatternAsRestParameter: 'Unexpected token {', + DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', + ConstructorSpecialMethod: 'Class constructor may not be an accessor', + DuplicateConstructor: 'A class may only have one constructor', + StaticPrototype: 'Classes may not have static property named prototype', + MissingFromClause: 'Unexpected token', + NoAsAfterImportNamespace: 'Unexpected token', + InvalidModuleSpecifier: 'Unexpected token', + IllegalImportDeclaration: 'Unexpected token', + IllegalExportDeclaration: 'Unexpected token', + DuplicateBinding: 'Duplicate binding %0' + }; -},{}],149:[function(_dereq_,module,exports){ -'use strict'; + // See also tools/generate-unicode-regex.js. + Regex = { + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\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\u19C1-\u19C7\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\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\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/, + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\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-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\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-\u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u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17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D50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\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\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; -var yaml = _dereq_('./lib/js-yaml.js'); + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } -module.exports = yaml; + function isDecimalDigit(ch) { + return (ch >= 0x30 && ch <= 0x39); // 0..9 + } -},{"./lib/js-yaml.js":150}],150:[function(_dereq_,module,exports){ -'use strict'; + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } -var loader = _dereq_('./js-yaml/loader'); -var dumper = _dereq_('./js-yaml/dumper'); + function octalToDecimal(ch) { + // \0 is not octal escape sequence + var octal = (ch !== '0'), code = '01234567'.indexOf(ch); + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + return { + code: code, + octal: octal + }; + } -module.exports.Type = _dereq_('./js-yaml/type'); -module.exports.Schema = _dereq_('./js-yaml/schema'); -module.exports.FAILSAFE_SCHEMA = _dereq_('./js-yaml/schema/failsafe'); -module.exports.JSON_SCHEMA = _dereq_('./js-yaml/schema/json'); -module.exports.CORE_SCHEMA = _dereq_('./js-yaml/schema/core'); -module.exports.DEFAULT_SAFE_SCHEMA = _dereq_('./js-yaml/schema/default_safe'); -module.exports.DEFAULT_FULL_SCHEMA = _dereq_('./js-yaml/schema/default_full'); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.safeLoad = loader.safeLoad; -module.exports.safeLoadAll = loader.safeLoadAll; -module.exports.dump = dumper.dump; -module.exports.safeDump = dumper.safeDump; -module.exports.YAMLException = _dereq_('./js-yaml/exception'); + // ECMA-262 11.2 White Space -// Deprecated schema names from JS-YAML 2.0.x -module.exports.MINIMAL_SCHEMA = _dereq_('./js-yaml/schema/failsafe'); -module.exports.SAFE_SCHEMA = _dereq_('./js-yaml/schema/default_safe'); -module.exports.DEFAULT_SCHEMA = _dereq_('./js-yaml/schema/default_full'); + function isWhiteSpace(ch) { + return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || + (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); + } -// Deprecated functions from JS-YAML 1.x.x -module.exports.scan = deprecated('scan'); -module.exports.parse = deprecated('parse'); -module.exports.compose = deprecated('compose'); -module.exports.addConstructor = deprecated('addConstructor'); + // ECMA-262 11.3 Line Terminators -},{"./js-yaml/dumper":152,"./js-yaml/exception":153,"./js-yaml/loader":154,"./js-yaml/schema":156,"./js-yaml/schema/core":157,"./js-yaml/schema/default_full":158,"./js-yaml/schema/default_safe":159,"./js-yaml/schema/failsafe":160,"./js-yaml/schema/json":161,"./js-yaml/type":162}],151:[function(_dereq_,module,exports){ -'use strict'; + function isLineTerminator(ch) { + return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); + } + // ECMA-262 11.6 Identifier Names and Identifiers -function isNothing(subject) { - return (typeof subject === 'undefined') || (null === subject); -} + function fromCodePoint(cp) { + return (cp < 0x10000) ? String.fromCharCode(cp) : + String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + } + function isIdentifierStart(ch) { + return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) + (ch >= 0x41 && ch <= 0x5A) || // A..Z + (ch >= 0x61 && ch <= 0x7A) || // a..z + (ch === 0x5C) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))); + } -function isObject(subject) { - return (typeof subject === 'object') && (null !== subject); -} + function isIdentifierPart(ch) { + return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) + (ch >= 0x41 && ch <= 0x5A) || // A..Z + (ch >= 0x61 && ch <= 0x7A) || // a..z + (ch >= 0x30 && ch <= 0x39) || // 0..9 + (ch === 0x5C) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))); + } + // ECMA-262 11.6.2.2 Future Reserved Words -function toArray(sequence) { - if (Array.isArray(sequence)) { - return sequence; - } else if (isNothing(sequence)) { - return []; - } - return [ sequence ]; -} + function isFutureReservedWord(id) { + switch (id) { + case 'enum': + case 'export': + case 'import': + case 'super': + return true; + default: + return false; + } + } + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } -function extend(target, source) { - var index, length, key, sourceKeys; + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } - if (source) { - sourceKeys = Object.keys(source); + // ECMA-262 11.6.2.1 Keywords - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; + function isKeyword(id) { + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } } - } - return target; -} + // ECMA-262 11.4 Comments + function addComment(type, value, start, end, loc) { + var comment; -function repeat(string, count) { - var result = '', cycle; + assert(typeof start === 'number', 'Comment must have valid position'); - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } + state.lastCommentStart = start; - return result; -} + comment = { + type: type, + value: value + }; + if (extra.range) { + comment.range = [start, end]; + } + if (extra.loc) { + comment.loc = loc; + } + extra.comments.push(comment); + if (extra.attachComment) { + extra.leadingComments.push(comment); + extra.trailingComments.push(comment); + } + if (extra.tokenize) { + comment.type = comment.type + 'Comment'; + if (extra.delegate) { + comment = extra.delegate(comment); + } + extra.tokens.push(comment); + } + } + function skipSingleLineComment(offset) { + var start, loc, ch, comment; -function isNegativeZero(number) { - return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number); -} + start = index - offset; + loc = { + start: { + line: lineNumber, + column: index - lineStart - offset + } + }; + while (index < length) { + ch = source.charCodeAt(index); + ++index; + if (isLineTerminator(ch)) { + hasLineTerminator = true; + if (extra.comments) { + comment = source.slice(start + offset, index - 1); + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + addComment('Line', comment, start, index - 1, loc); + } + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + return; + } + } -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; + if (extra.comments) { + comment = source.slice(start + offset, index); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Line', comment, start, index, loc); + } + } -},{}],152:[function(_dereq_,module,exports){ -'use strict'; + function skipMultiLineComment() { + var start, loc, ch, comment; -/*eslint-disable no-use-before-define*/ + if (extra.comments) { + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + } -var common = _dereq_('./common'); -var YAMLException = _dereq_('./exception'); -var DEFAULT_FULL_SCHEMA = _dereq_('./schema/default_full'); -var DEFAULT_SAFE_SCHEMA = _dereq_('./schema/default_safe'); + while (index < length) { + ch = source.charCodeAt(index); + if (isLineTerminator(ch)) { + if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { + ++index; + } + hasLineTerminator = true; + ++lineNumber; + ++index; + lineStart = index; + } else if (ch === 0x2A) { + // Block comment ends with '*/'. + if (source.charCodeAt(index + 1) === 0x2F) { + ++index; + ++index; + if (extra.comments) { + comment = source.slice(start + 2, index - 2); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + } + return; + } + ++index; + } else { + ++index; + } + } -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; + // Ran off the end of the file - the whole thing is a comment + if (extra.comments) { + loc.end = { + line: lineNumber, + column: index - lineStart + }; + comment = source.slice(start + 2, index); + addComment('Block', comment, start, index, loc); + } + tolerateUnexpectedToken(); + } -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + function skipComment() { + var ch, start; + hasLineTerminator = false; -var ESCAPE_SEQUENCES = {}; + start = (index === 0); + while (index < length) { + ch = source.charCodeAt(index); -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; + if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + hasLineTerminator = true; + ++index; + if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { + ++index; + } + ++lineNumber; + lineStart = index; + start = true; + } else if (ch === 0x2F) { // U+002F is '/' + ch = source.charCodeAt(index + 1); + if (ch === 0x2F) { + ++index; + ++index; + skipSingleLineComment(2); + start = true; + } else if (ch === 0x2A) { // U+002A is '*' + ++index; + ++index; + skipMultiLineComment(); + } else { + break; + } + } else if (start && ch === 0x2D) { // U+002D is '-' + // U+003E is '>' + if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { + // '-->' is a single-line comment + index += 3; + skipSingleLineComment(3); + } else { + break; + } + } else if (ch === 0x3C) { // U+003C is '<' + if (source.slice(index + 1, index + 4) === '!--') { + ++index; // `<` + ++index; // `!` + ++index; // `-` + ++index; // `-` + skipSingleLineComment(4); + } else { + break; + } + } else { + break; + } + } + } -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; + function scanHexEscape(prefix) { + var i, len, ch, code = 0; -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } - if (null === map) { - return {}; - } + function scanUnicodeCodePointEscape() { + var ch, code; - result = {}; - keys = Object.keys(map); + ch = source[index]; + code = 0; - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); + // At least, one hex digit is required. + if (ch === '}') { + throwUnexpectedToken(); + } - if ('!!' === tag.slice(0, 2)) { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } + while (index < length) { + ch = source[index++]; + if (!isHexDigit(ch)) { + break; + } + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } - type = schema.compiledTypeMap[tag]; + if (code > 0x10FFFF || ch !== '}') { + throwUnexpectedToken(); + } - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; + return fromCodePoint(code); } - result[tag] = style; - } + function codePointAt(i) { + var cp, first, second; - return result; -} + cp = source.charCodeAt(i); + if (cp >= 0xD800 && cp <= 0xDBFF) { + second = source.charCodeAt(i + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + first = cp; + cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } -function encodeHex(character) { - var string, handle, length; + return cp; + } - string = character.toString(16).toUpperCase(); + function getComplexIdentifier() { + var cp, ch, id; - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } + cp = codePointAt(index); + id = fromCodePoint(cp); + index += id.length; - return '\\' + handle + common.repeat('0', length - string.length) + string; -} + // '\u' (U+005C, U+0075) denotes an escaped character. + if (cp === 0x5C) { + if (source.charCodeAt(index) !== 0x75) { + throwUnexpectedToken(); + } + ++index; + if (source[index] === '{') { + ++index; + ch = scanUnicodeCodePointEscape(); + } else { + ch = scanHexEscape('u'); + cp = ch.charCodeAt(0); + if (!ch || ch === '\\' || !isIdentifierStart(cp)) { + throwUnexpectedToken(); + } + } + id = ch; + } -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; + while (index < length) { + cp = codePointAt(index); + if (!isIdentifierPart(cp)) { + break; + } + ch = fromCodePoint(cp); + id += ch; + index += ch.length; - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; + // '\u' (U+005C, U+0075) denotes an escaped character. + if (cp === 0x5C) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 0x75) { + throwUnexpectedToken(); + } + ++index; + if (source[index] === '{') { + ++index; + ch = scanUnicodeCodePointEscape(); + } else { + ch = scanHexEscape('u'); + cp = ch.charCodeAt(0); + if (!ch || ch === '\\' || !isIdentifierPart(cp)) { + throwUnexpectedToken(); + } + } + id += ch; + } + } - this.tag = null; - this.result = ''; + return id; + } - this.duplicates = []; - this.usedDuplicates = null; -} + function getIdentifier() { + var start, ch; -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 0x5C) { + // Blackslash (U+005C) marks Unicode escape sequence. + index = start; + return getComplexIdentifier(); + } else if (ch >= 0xD800 && ch < 0xDFFF) { + // Need to handle surrogate pairs. + index = start; + return getComplexIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - if (line.length && line !== '\n') { - result += ind; + return source.slice(start, index); } - result += line; - } - return result; -} + function scanIdentifier() { + var start, id, type; -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} + start = index; -function testImplicitResolving(state, str) { - var index, length, type; + // Backslash (U+005C) starts an escaped character. + id = (source.charCodeAt(index) === 0x5C) ? getComplexIdentifier() : getIdentifier(); - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } - if (type.resolve(str)) { - return true; + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; } - } - return false; -} -function StringBuilder(source) { - this.source = source; - this.result = ''; - this.checkpoint = 0; -} + // ECMA-262 11.7 Punctuators -StringBuilder.prototype.takeUpTo = function (position) { - var er; + function scanPunctuator() { + var token, str; - if (position < this.checkpoint) { - er = new Error('position should be > checkpoint'); - er.position = position; - er.checkpoint = this.checkpoint; - throw er; - } + token = { + type: Token.Punctuator, + value: '', + lineNumber: lineNumber, + lineStart: lineStart, + start: index, + end: index + }; - this.result += this.source.slice(this.checkpoint, position); - this.checkpoint = position; - return this; -}; + // Check for most common single-character punctuators. + str = source[index]; + switch (str) { -StringBuilder.prototype.escapeChar = function () { - var character, esc; + case '(': + if (extra.tokenize) { + extra.openParenToken = extra.tokenValues.length; + } + ++index; + break; - character = this.source.charCodeAt(this.checkpoint); - esc = ESCAPE_SEQUENCES[character] || encodeHex(character); - this.result += esc; - this.checkpoint += 1; + case '{': + if (extra.tokenize) { + extra.openCurlyToken = extra.tokenValues.length; + } + state.curlyStack.push('{'); + ++index; + break; - return this; -}; + case '.': + ++index; + if (source[index] === '.' && source[index + 1] === '.') { + // Spread operator: ... + index += 2; + str = '...'; + } + break; -StringBuilder.prototype.finish = function () { - if (this.source.length > this.checkpoint) { - this.takeUpTo(this.source.length); - } -}; + case '}': + ++index; + state.curlyStack.pop(); + break; + case ')': + case ';': + case ',': + case '[': + case ']': + case ':': + case '?': + case '~': + ++index; + break; -function writeScalar(state, object, level, iskey) { - var simple, first, spaceWrap, folded, literal, single, double, - sawLineFeed, linePosition, longestLine, indent, max, character, - position, escapeSeq, hexEsc, previous, lineLength, modifier, - trailingLineBreaks, result; + default: + // 4-character punctuator. + str = source.substr(index, 4); + if (str === '>>>=') { + index += 4; + } else { - if (0 === object.length) { - state.dump = "''"; - return; - } + // 3-character punctuators. + str = str.substr(0, 3); + if (str === '===' || str === '!==' || str === '>>>' || + str === '<<=' || str === '>>=') { + index += 3; + } else { - if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { - state.dump = "'" + object + "'"; - return; - } + // 2-character punctuators. + str = str.substr(0, 2); + if (str === '&&' || str === '||' || str === '==' || str === '!=' || + str === '+=' || str === '-=' || str === '*=' || str === '/=' || + str === '++' || str === '--' || str === '<<' || str === '>>' || + str === '&=' || str === '|=' || str === '^=' || str === '%=' || + str === '<=' || str === '>=' || str === '=>') { + index += 2; + } else { - simple = true; - first = object.length ? object.charCodeAt(0) : 0; - spaceWrap = (CHAR_SPACE === first || - CHAR_SPACE === object.charCodeAt(object.length - 1)); + // 1-character punctuators. + str = source[index]; + if ('<>=!+-*%&|^/'.indexOf(str) >= 0) { + ++index; + } + } + } + } + } - // Simplified check for restricted first characters - // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29 - if (CHAR_MINUS === first || - CHAR_QUESTION === first || - CHAR_COMMERCIAL_AT === first || - CHAR_GRAVE_ACCENT === first) { - simple = false; - } + if (index === token.start) { + throwUnexpectedToken(); + } - // can only use > and | if not wrapped in spaces or is not a key. - if (spaceWrap) { - simple = false; - folded = false; - literal = false; - } else { - folded = !iskey; - literal = !iskey; - } + token.end = index; + token.value = str; + return token; + } - single = true; - double = new StringBuilder(object); + // ECMA-262 11.8.3 Numeric Literals - sawLineFeed = false; - linePosition = 0; - longestLine = 0; + function scanHexLiteral(start) { + var number = ''; - indent = state.indent * level; - max = state.lineWidth; - if (max === -1) { - // Replace -1 with biggest ingeger number according to - // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 - max = 9007199254740991; - } + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } - if (indent < 40) { - max -= indent; - } else { - max = 40; - } + if (number.length === 0) { + throwUnexpectedToken(); + } - for (position = 0; position < object.length; position++) { - character = object.charCodeAt(position); - if (simple) { - // Characters that can never appear in the simple scalar - if (!simpleChar(character)) { - simple = false; - } else { - // Still simple. If we make it all the way through like - // this, then we can just dump the string as-is. - continue; - } - } + if (isIdentifierStart(source.charCodeAt(index))) { + throwUnexpectedToken(); + } - if (single && character === CHAR_SINGLE_QUOTE) { - single = false; + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; } - escapeSeq = ESCAPE_SEQUENCES[character]; - hexEsc = needsHexEscape(character); + function scanBinaryLiteral(start) { + var ch, number; - if (!escapeSeq && !hexEsc) { - continue; - } + number = ''; - if (character !== CHAR_LINE_FEED && - character !== CHAR_DOUBLE_QUOTE && - character !== CHAR_SINGLE_QUOTE) { - folded = false; - literal = false; - } else if (character === CHAR_LINE_FEED) { - sawLineFeed = true; - single = false; - if (position > 0) { - previous = object.charCodeAt(position - 1); - if (previous === CHAR_SPACE) { - literal = false; - folded = false; + while (index < length) { + ch = source[index]; + if (ch !== '0' && ch !== '1') { + break; + } + number += source[index++]; } - } - if (folded) { - lineLength = position - linePosition; - linePosition = position; - if (lineLength > longestLine) { - longestLine = lineLength; + + if (number.length === 0) { + // only 0b or 0B + throwUnexpectedToken(); } - } - } - if (character !== CHAR_DOUBLE_QUOTE) { - single = false; + if (index < length) { + ch = source.charCodeAt(index); + /* istanbul ignore else */ + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwUnexpectedToken(); + } + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 2), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; } - double.takeUpTo(position); - double.escapeChar(); - } + function scanOctalLiteral(prefix, start) { + var number, octal; - if (simple && testImplicitResolving(state, object)) { - simple = false; - } + if (isOctalDigit(prefix)) { + octal = true; + number = '0' + source[index++]; + } else { + octal = false; + ++index; + number = ''; + } - modifier = ''; - if (folded || literal) { - trailingLineBreaks = 0; - if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - } - } + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } - if (trailingLineBreaks === 0) { - modifier = '-'; - } else if (trailingLineBreaks === 2) { - modifier = '+'; - } - } + if (!octal && number.length === 0) { + // only 0o or 0O + throwUnexpectedToken(); + } - if (literal && longestLine < max) { - folded = false; - } + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwUnexpectedToken(); + } - // If it's literally one line, then don't bother with the literal. - // We may still want to do a fold, though, if it's a super long line. - if (!sawLineFeed) { - literal = false; - } + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } - if (simple) { - state.dump = object; - } else if (single) { - state.dump = '\'' + object + '\''; - } else if (folded) { - result = fold(object, max); - state.dump = '>' + modifier + '\n' + indentString(result, indent); - } else if (literal) { - if (!modifier) { - object = object.replace(/\n$/, ''); + function isImplicitOctalLiteral() { + var i, ch; + + // Implicit octal, unless there is a non-octal digit. + // (Annex B.1.1 on Numeric Literals) + for (i = index + 1; i < length; ++i) { + ch = source[i]; + if (ch === '8' || ch === '9') { + return false; + } + if (!isOctalDigit(ch)) { + return true; + } + } + + return true; } - state.dump = '|' + modifier + '\n' + indentString(object, indent); - } else if (double) { - double.finish(); - state.dump = '"' + double.result + '"'; - } else { - throw new Error('Failed to dump scalar value'); - } - return; -} + function scanNumericLiteral() { + var number, start, ch; -// The `trailing` var is a regexp match of any trailing `\n` characters. -// -// There are three cases we care about: -// -// 1. One trailing `\n` on the string. Just use `|` or `>`. -// This is the assumed default. (trailing = null) -// 2. No trailing `\n` on the string. Use `|-` or `>-` to "chomp" the end. -// 3. More than one trailing `\n` on the string. Use `|+` or `>+`. -// -// In the case of `>+`, these line breaks are *not* doubled (like the line -// breaks within the string), so it's important to only end with the exact -// same number as we started. -function fold(object, max) { - var result = '', - position = 0, - length = object.length, - trailing = /\n+$/.exec(object), - newLine; + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); - if (trailing) { - length = trailing.index + 1; - } + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; - while (position < length) { - newLine = object.indexOf('\n', position); - if (newLine > length || newLine === -1) { - if (result) { - result += '\n\n'; - } - result += foldLine(object.slice(position, length), max); - position = length; - } else { - if (result) { - result += '\n\n'; - } - result += foldLine(object.slice(position, newLine), max); - position = newLine + 1; - } - } - if (trailing && trailing[0] !== '\n') { - result += trailing[0]; - } + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++index; + return scanBinaryLiteral(start); + } + if (ch === 'o' || ch === 'O') { + return scanOctalLiteral(ch, start); + } - return result; -} + if (isOctalDigit(ch)) { + if (isImplicitOctalLiteral()) { + return scanOctalLiteral(ch, start); + } + } + } -function foldLine(line, max) { - if (line === '') { - return line; - } + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } - var foldRe = /[^\s] [^\s]/g, - result = '', - prevMatch = 0, - foldStart = 0, - match = foldRe.exec(line), - index, - foldEnd, - folded; + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } - while (match) { - index = match.index; + if (ch === 'e' || ch === 'E') { + number += source[index++]; - // when we cross the max len, if the previous match would've - // been ok, use that one, and carry on. If there was no previous - // match on this fold section, then just have a long line. - if (index - foldStart > max) { - if (prevMatch !== foldStart) { - foldEnd = prevMatch; - } else { - foldEnd = index; - } + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwUnexpectedToken(); + } + } - if (result) { - result += '\n'; - } - folded = line.slice(foldStart, foldEnd); - result += folded; - foldStart = foldEnd + 1; + if (isIdentifierStart(source.charCodeAt(index))) { + throwUnexpectedToken(); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; } - prevMatch = index + 1; - match = foldRe.exec(line); - } - if (result) { - result += '\n'; - } + // ECMA-262 11.8.4 String Literals - // if we end up with one last word at the end, then the last bit might - // be slightly bigger than we wanted, because we exited out of the loop. - if (foldStart !== prevMatch && line.length - foldStart > max) { - result += line.slice(foldStart, prevMatch) + '\n' + - line.slice(prevMatch + 1); - } else { - result += line.slice(foldStart); - } + function scanStringLiteral() { + var str = '', quote, start, ch, unescaped, octToDec, octal = false; - return result; -} + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); -// Returns true if character can be found in a simple scalar -function simpleChar(character) { - return CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character && - CHAR_COMMA !== character && - CHAR_LEFT_SQUARE_BRACKET !== character && - CHAR_RIGHT_SQUARE_BRACKET !== character && - CHAR_LEFT_CURLY_BRACKET !== character && - CHAR_RIGHT_CURLY_BRACKET !== character && - CHAR_SHARP !== character && - CHAR_AMPERSAND !== character && - CHAR_ASTERISK !== character && - CHAR_EXCLAMATION !== character && - CHAR_VERTICAL_LINE !== character && - CHAR_GREATER_THAN !== character && - CHAR_SINGLE_QUOTE !== character && - CHAR_DOUBLE_QUOTE !== character && - CHAR_PERCENT !== character && - CHAR_COLON !== character && - !ESCAPE_SEQUENCES[character] && - !needsHexEscape(character); -} + start = index; + ++index; -// Returns true if the character code needs to be escaped. -function needsHexEscape(character) { - return !((0x00020 <= character && character <= 0x00007E) || - (0x00085 === character) || - (0x000A0 <= character && character <= 0x00D7FF) || - (0x0E000 <= character && character <= 0x00FFFD) || - (0x10000 <= character && character <= 0x10FFFF)); -} + while (index < length) { + ch = source[index++]; -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + str += scanUnicodeCodePointEscape(); + } else { + unescaped = scanHexEscape(ch); + if (!unescaped) { + throw throwUnexpectedToken(); + } + str += unescaped; + } + break; + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + case '8': + case '9': + str += ch; + tolerateUnexpectedToken(); + break; - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (0 !== index) { - _result += ', '; - } - _result += state.dump; - } - } + default: + if (isOctalDigit(ch)) { + octToDec = octalToDecimal(ch); - state.tag = _tag; - state.dump = '[' + _result + ']'; -} + octal = octToDec.octal || octal; + str += String.fromCharCode(octToDec.code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; + if (quote !== '') { + throwUnexpectedToken(); + } - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || 0 !== index) { - _result += generateNextLine(state, level); - } - _result += '- ' + state.dump; + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: startLineNumber, + lineStart: startLineStart, + start: start, + end: index + }; } - } - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} + // ECMA-262 11.8.6 Template Literal Lexical Components -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; + function scanTemplate() { + var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped; - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; + terminated = false; + tail = false; + start = index; + head = (source[index] === '`'); + rawOffset = 2; - if (0 !== index) { - pairBuffer += ', '; - } + ++index; - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; + while (index < length) { + ch = source[index++]; + if (ch === '`') { + rawOffset = 1; + tail = true; + terminated = true; + break; + } else if (ch === '$') { + if (source[index] === '{') { + state.curlyStack.push('${'); + ++index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + cooked += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + cooked += unescaped; + } else { + index = restore; + cooked += ch; + } + } + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } + default: + if (ch === '0') { + if (isDecimalDigit(source.charCodeAt(index))) { + // Illegal: \01 \02 and so on + throwError(Messages.TemplateOctalLiteral); + } + cooked += '\0'; + } else if (isOctalDigit(ch)) { + // Illegal: \1 \2 + throwError(Messages.TemplateOctalLiteral); + } else { + cooked += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + cooked += '\n'; + } else { + cooked += ch; + } + } - if (state.dump.length > 1024) { - pairBuffer += '? '; + if (!terminated) { + throwUnexpectedToken(); + } + + if (!head) { + state.curlyStack.pop(); + } + + return { + type: Token.Template, + value: { + cooked: cooked, + raw: source.slice(start + 1, index - rawOffset) + }, + head: head, + tail: tail, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; } - pairBuffer += state.dump + ': '; + // ECMA-262 11.8.5 Regular Expression Literals - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. + function testRegExp(pattern, flags) { + // The BMP character to use as a replacement for astral symbols when + // translating an ES6 "u"-flagged pattern to an ES5-compatible + // approximation. + // Note: replacing with '\uFFFF' enables false positives in unlikely + // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid + // pattern that would not be detected by this substitution. + var astralSubstitute = '\uFFFF', + tmp = pattern; + + if (flags.indexOf('u') >= 0) { + tmp = tmp + // Replace every Unicode escape sequence with the equivalent + // BMP character or a constant ASCII code point in the case of + // astral symbols. (See the above note on `astralSubstitute` + // for more information.) + .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { + var codePoint = parseInt($1 || $2, 16); + if (codePoint > 0x10FFFF) { + throwUnexpectedToken(null, Messages.InvalidRegExp); + } + if (codePoint <= 0xFFFF) { + return String.fromCharCode(codePoint); + } + return astralSubstitute; + }) + // Replace each paired surrogate with a single ASCII symbol to + // avoid throwing on regular expressions that are only valid in + // combination with the "u" flag. + .replace( + /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + astralSubstitute + ); + } + + // First, detect invalid regular expressions. + try { + RegExp(tmp); + } catch (e) { + throwUnexpectedToken(null, Messages.InvalidRegExp); + } + + // Return a regular expression object for this pattern-flag pair, or + // `null` in case the current environment doesn't support the flags it + // uses. + try { + return new RegExp(pattern, flags); + } catch (exception) { + return null; + } } - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} + function scanRegExpBody() { + var ch, str, classMarker, terminated, body; -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } + classMarker = false; + terminated = false; + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwUnexpectedToken(null, Messages.UnterminatedRegExp); + } + str += ch; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwUnexpectedToken(null, Messages.UnterminatedRegExp); + } else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } + } + } - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; + if (!terminated) { + throwUnexpectedToken(null, Messages.UnterminatedRegExp); + } - if (!compact || 0 !== index) { - pairBuffer += generateNextLine(state, level); + // Exclude leading and trailing slash. + body = str.substr(1, str.length - 2); + return { + value: body, + literal: str + }; } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; + function scanRegExpFlags() { + var ch, str, flags, restore; - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } + str = ''; + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } - explicitPair = (null !== state.tag && '?' !== state.tag) || - (state.dump && state.dump.length > 1024); + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + tolerateUnexpectedToken(); + } else { + str += '\\'; + tolerateUnexpectedToken(); + } + } else { + flags += ch; + str += ch; + } + } - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } + return { + value: flags, + literal: str + }; } - pairBuffer += state.dump; + function scanRegExp() { + var start, body, flags, value; + scanning = true; - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } + lookahead = null; + skipComment(); + start = index; - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } + body = scanRegExpBody(); + flags = scanRegExpFlags(); + value = testRegExp(body.value, flags.value); + scanning = false; + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; + return { + literal: body.literal + flags.literal, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + start: start, + end: index + }; } - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; + function collectRegex() { + var pos, loc, regex, token; - typeList = explicit ? state.explicitTypes : state.implicitTypes; + skipComment(); - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { + regex = scanRegExp(); - state.tag = explicit ? type.tag : '?'; + loc.end = { + line: lineNumber, + column: index - lineStart + }; - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; + /* istanbul ignore next */ + if (!extra.tokenize) { + // Pop the previous token, which is likely '/' or '/=' + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } - if ('[object Function]' === _toString.call(type.represent)) { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + regex: regex.regex, + range: [pos, index], + loc: loc + }); } - state.dump = _result; - } - - return true; + return regex; } - } - return false; -} + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design - if (!detectType(state, object, false)) { - detectType(state, object, true); - } + function advanceSlash() { + var regex, previous, check; - var type = _toString.call(state.dump); + function testKeyword(value) { + return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z'); + } - if (block) { - block = (0 > state.flowLevel || state.flowLevel > level); - } + previous = extra.tokenValues[extra.tokens.length - 1]; + regex = (previous !== null); - var objectOrArray = '[object Object]' === type || '[object Array]' === type, - duplicateIndex, - duplicate; + switch (previous) { + case 'this': + case ']': + regex = false; + break; - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } + case ')': + check = extra.tokenValues[extra.openParenToken - 1]; + regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with'); + break; - if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { - compact = false; - } + case '}': + // Dividing a function by anything makes little sense, + // but we have to check for that. + regex = false; + if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) { + // Anonymous function, e.g. function(){} /42 + check = extra.tokenValues[extra.openCurlyToken - 4]; + regex = check ? (FnExprTokens.indexOf(check) < 0) : false; + } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) { + // Named function, e.g. function f(){} /42/ + check = extra.tokenValues[extra.openCurlyToken - 5]; + regex = check ? (FnExprTokens.indexOf(check) < 0) : true; + } + } - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; + return regex ? collectRegex() : scanPunctuator(); } - if ('[object Object]' === type) { - if (block && (0 !== Object.keys(state.dump).length)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if ('[object Array]' === type) { - if (block && (0 !== state.dump.length)) { - writeBlockSequence(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + + function advance() { + var cp, token; + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + start: index, + end: index + }; } - } - } else if ('[object String]' === type) { - if ('?' !== state.tag) { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) { - return false; - } - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - if (null !== state.tag && '?' !== state.tag) { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } + cp = source.charCodeAt(index); - return true; -} + if (isIdentifierStart(cp)) { + token = scanIdentifier(); + if (strict && isStrictModeReservedWord(token.value)) { + token.type = Token.Keyword; + } + return token; + } -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; + // Very common: ( and ) and ; + if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { + return scanPunctuator(); + } - inspectNode(object, objects, duplicatesIndexes); + // String literal starts with single quote (U+0027) or double quote (U+0022). + if (cp === 0x27 || cp === 0x22) { + return scanStringLiteral(); + } - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} + // Dot (.) U+002E can also start a floating-point number, hence the need + // to check the next character. + if (cp === 0x2E) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; + if (isDecimalDigit(cp)) { + return scanNumericLiteral(); + } - if (null !== object && 'object' === typeof object) { - index = objects.indexOf(object); - if (-1 !== index) { - if (-1 === duplicatesIndexes.indexOf(index)) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); + // Slash (/) U+002F can also start a regex. + if (extra.tokenize && cp === 0x2F) { + return advanceSlash(); + } - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); + // Template literals start with ` (U+0060) for template head + // or } (U+007D) for template middle or template tail. + if (cp === 0x60 || (cp === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) { + return scanTemplate(); } - } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + // Possible identifier start in a surrogate pair. + if (cp >= 0xD800 && cp < 0xDFFF) { + cp = codePointAt(index); + if (isIdentifierStart(cp)) { + return scanIdentifier(); + } } - } + + return scanPunctuator(); } - } -} -function dump(input, options) { - options = options || {}; + function collectToken() { + var loc, token, value, entry; - var state = new State(options); + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; - getDuplicateReferences(input, state); + token = advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; - if (writeNode(state, 0, input, true, true)) { - return state.dump + '\n'; - } - return ''; -} + if (token.type !== Token.EOF) { + value = source.slice(token.start, token.end); + entry = { + type: TokenName[token.type], + value: value, + range: [token.start, token.end], + loc: loc + }; + if (token.regex) { + entry.regex = { + pattern: token.regex.pattern, + flags: token.regex.flags + }; + } + if (extra.tokenValues) { + extra.tokenValues.push((entry.type === 'Punctuator' || entry.type === 'Keyword') ? entry.value : null); + } + if (extra.tokenize) { + if (!extra.range) { + delete entry.range; + } + if (!extra.loc) { + delete entry.loc; + } + if (extra.delegate) { + entry = extra.delegate(entry); + } + } + extra.tokens.push(entry); + } -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} + return token; + } -module.exports.dump = dump; -module.exports.safeDump = safeDump; + function lex() { + var token; + scanning = true; -},{"./common":151,"./exception":153,"./schema/default_full":158,"./schema/default_safe":159}],153:[function(_dereq_,module,exports){ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; + lastIndex = index; + lastLineNumber = lineNumber; + lastLineStart = lineStart; + skipComment(); -var inherits = _dereq_('inherit'); + token = lookahead; + startIndex = index; + startLineNumber = lineNumber; + startLineStart = lineStart; -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); + lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); + scanning = false; + return token; + } - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } + function peek() { + scanning = true; - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); -} + skipComment(); + lastIndex = index; + lastLineNumber = lineNumber; + lastLineStart = lineStart; -// Inherit from Error -inherits(YAMLException, Error); + startIndex = index; + startLineNumber = lineNumber; + startLineStart = lineStart; + lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); + scanning = false; + } -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; + function Position() { + this.line = startLineNumber; + this.column = startIndex - startLineStart; + } - result += this.reason || '(unknown reason)'; + function SourceLocation() { + this.start = new Position(); + this.end = null; + } - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } + function WrappingSourceLocation(startToken) { + this.start = { + line: startToken.lineNumber, + column: startToken.start - startToken.lineStart + }; + this.end = null; + } - return result; -}; + function Node() { + if (extra.range) { + this.range = [startIndex, 0]; + } + if (extra.loc) { + this.loc = new SourceLocation(); + } + } + function WrappingNode(startToken) { + if (extra.range) { + this.range = [startToken.start, 0]; + } + if (extra.loc) { + this.loc = new WrappingSourceLocation(startToken); + } + } -module.exports = YAMLException; + WrappingNode.prototype = Node.prototype = { -},{"inherit":146}],154:[function(_dereq_,module,exports){ -'use strict'; + processComment: function () { + var lastChild, + innerComments, + leadingComments, + trailingComments, + bottomRight = extra.bottomRightStack, + i, + comment, + last = bottomRight[bottomRight.length - 1]; -/*eslint-disable max-len,no-use-before-define*/ + if (this.type === Syntax.Program) { + if (this.body.length > 0) { + return; + } + } + /** + * patch innnerComments for properties empty block + * `function a() {/** comments **\/}` + */ -var common = _dereq_('./common'); -var YAMLException = _dereq_('./exception'); -var Mark = _dereq_('./mark'); -var DEFAULT_SAFE_SCHEMA = _dereq_('./schema/default_safe'); -var DEFAULT_FULL_SCHEMA = _dereq_('./schema/default_full'); + if (this.type === Syntax.BlockStatement && this.body.length === 0) { + innerComments = []; + for (i = extra.leadingComments.length - 1; i >= 0; --i) { + comment = extra.leadingComments[i]; + if (this.range[1] >= comment.range[1]) { + innerComments.unshift(comment); + extra.leadingComments.splice(i, 1); + extra.trailingComments.splice(i, 1); + } + } + if (innerComments.length) { + this.innerComments = innerComments; + //bottomRight.push(this); + return; + } + } + if (extra.trailingComments.length > 0) { + trailingComments = []; + for (i = extra.trailingComments.length - 1; i >= 0; --i) { + comment = extra.trailingComments[i]; + if (comment.range[0] >= this.range[1]) { + trailingComments.unshift(comment); + extra.trailingComments.splice(i, 1); + } + } + extra.trailingComments = []; + } else { + if (last && last.trailingComments && last.trailingComments[0].range[0] >= this.range[1]) { + trailingComments = last.trailingComments; + delete last.trailingComments; + } + } -var _hasOwnProperty = Object.prototype.hasOwnProperty; + // Eating the stack. + while (last && last.range[0] >= this.range[0]) { + lastChild = bottomRight.pop(); + last = bottomRight[bottomRight.length - 1]; + } + if (lastChild) { + if (lastChild.leadingComments) { + leadingComments = []; + for (i = lastChild.leadingComments.length - 1; i >= 0; --i) { + comment = lastChild.leadingComments[i]; + if (comment.range[1] <= this.range[0]) { + leadingComments.unshift(comment); + lastChild.leadingComments.splice(i, 1); + } + } -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; + if (!lastChild.leadingComments.length) { + lastChild.leadingComments = undefined; + } + } + } else if (extra.leadingComments.length > 0) { + leadingComments = []; + for (i = extra.leadingComments.length - 1; i >= 0; --i) { + comment = extra.leadingComments[i]; + if (comment.range[1] <= this.range[0]) { + leadingComments.unshift(comment); + extra.leadingComments.splice(i, 1); + } + } + } -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; + if (leadingComments && leadingComments.length > 0) { + this.leadingComments = leadingComments; + } + if (trailingComments && trailingComments.length > 0) { + this.trailingComments = trailingComments; + } + bottomRight.push(this); + }, -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + finish: function () { + if (extra.range) { + this.range[1] = lastIndex; + } + if (extra.loc) { + this.loc.end = { + line: lastLineNumber, + column: lastIndex - lastLineStart + }; + if (extra.source) { + this.loc.source = extra.source; + } + } + if (extra.attachComment) { + this.processComment(); + } + }, -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} + finishArrayExpression: function (elements) { + this.type = Syntax.ArrayExpression; + this.elements = elements; + this.finish(); + return this; + }, -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} + finishArrayPattern: function (elements) { + this.type = Syntax.ArrayPattern; + this.elements = elements; + this.finish(); + return this; + }, -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} + finishArrowFunctionExpression: function (params, defaults, body, expression) { + this.type = Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.defaults = defaults; + this.body = body; + this.generator = false; + this.expression = expression; + this.finish(); + return this; + }, -function is_FLOW_INDICATOR(c) { - return 0x2C/* , */ === c || - 0x5B/* [ */ === c || - 0x5D/* ] */ === c || - 0x7B/* { */ === c || - 0x7D/* } */ === c; -} + finishAssignmentExpression: function (operator, left, right) { + this.type = Syntax.AssignmentExpression; + this.operator = operator; + this.left = left; + this.right = right; + this.finish(); + return this; + }, -function fromHexCode(c) { - var lc; + finishAssignmentPattern: function (left, right) { + this.type = Syntax.AssignmentPattern; + this.left = left; + this.right = right; + this.finish(); + return this; + }, - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } + finishBinaryExpression: function (operator, left, right) { + this.type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : Syntax.BinaryExpression; + this.operator = operator; + this.left = left; + this.right = right; + this.finish(); + return this; + }, - /*eslint-disable no-bitwise*/ - lc = c | 0x20; + finishBlockStatement: function (body) { + this.type = Syntax.BlockStatement; + this.body = body; + this.finish(); + return this; + }, - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } + finishBreakStatement: function (label) { + this.type = Syntax.BreakStatement; + this.label = label; + this.finish(); + return this; + }, - return -1; -} + finishCallExpression: function (callee, args) { + this.type = Syntax.CallExpression; + this.callee = callee; + this.arguments = args; + this.finish(); + return this; + }, -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} + finishCatchClause: function (param, body) { + this.type = Syntax.CatchClause; + this.param = param; + this.body = body; + this.finish(); + return this; + }, -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } + finishClassBody: function (body) { + this.type = Syntax.ClassBody; + this.body = body; + this.finish(); + return this; + }, - return -1; -} + finishClassDeclaration: function (id, superClass, body) { + this.type = Syntax.ClassDeclaration; + this.id = id; + this.superClass = superClass; + this.body = body; + this.finish(); + return this; + }, -function simpleEscapeSequence(c) { - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} + finishClassExpression: function (id, superClass, body) { + this.type = Syntax.ClassExpression; + this.id = id; + this.superClass = superClass; + this.body = body; + this.finish(); + return this; + }, -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00); -} + finishConditionalExpression: function (test, consequent, alternate) { + this.type = Syntax.ConditionalExpression; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + this.finish(); + return this; + }, -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} + finishContinueStatement: function (label) { + this.type = Syntax.ContinueStatement; + this.label = label; + this.finish(); + return this; + }, + finishDebuggerStatement: function () { + this.type = Syntax.DebuggerStatement; + this.finish(); + return this; + }, -function State(input, options) { - this.input = input; + finishDoWhileStatement: function (body, test) { + this.type = Syntax.DoWhileStatement; + this.body = body; + this.test = test; + this.finish(); + return this; + }, - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; + finishEmptyStatement: function () { + this.type = Syntax.EmptyStatement; + this.finish(); + return this; + }, - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; + finishExpressionStatement: function (expression) { + this.type = Syntax.ExpressionStatement; + this.expression = expression; + this.finish(); + return this; + }, - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; + finishForStatement: function (init, test, update, body) { + this.type = Syntax.ForStatement; + this.init = init; + this.test = test; + this.update = update; + this.body = body; + this.finish(); + return this; + }, - this.documents = []; + finishForOfStatement: function (left, right, body) { + this.type = Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + this.finish(); + return this; + }, - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ + finishForInStatement: function (left, right, body) { + this.type = Syntax.ForInStatement; + this.left = left; + this.right = right; + this.body = body; + this.each = false; + this.finish(); + return this; + }, -} + finishFunctionDeclaration: function (id, params, defaults, body, generator) { + this.type = Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.defaults = defaults; + this.body = body; + this.generator = generator; + this.expression = false; + this.finish(); + return this; + }, + finishFunctionExpression: function (id, params, defaults, body, generator) { + this.type = Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.defaults = defaults; + this.body = body; + this.generator = generator; + this.expression = false; + this.finish(); + return this; + }, -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} + finishIdentifier: function (name) { + this.type = Syntax.Identifier; + this.name = name; + this.finish(); + return this; + }, -function throwError(state, message) { - throw generateError(state, message); -} + finishIfStatement: function (test, consequent, alternate) { + this.type = Syntax.IfStatement; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + this.finish(); + return this; + }, -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} + finishLabeledStatement: function (label, body) { + this.type = Syntax.LabeledStatement; + this.label = label; + this.body = body; + this.finish(); + return this; + }, + finishLiteral: function (token) { + this.type = Syntax.Literal; + this.value = token.value; + this.raw = source.slice(token.start, token.end); + if (token.regex) { + this.regex = token.regex; + } + this.finish(); + return this; + }, -var directiveHandlers = { + finishMemberExpression: function (accessor, object, property) { + this.type = Syntax.MemberExpression; + this.computed = accessor === '['; + this.object = object; + this.property = property; + this.finish(); + return this; + }, - YAML: function handleYamlDirective(state, name, args) { + finishMetaProperty: function (meta, property) { + this.type = Syntax.MetaProperty; + this.meta = meta; + this.property = property; + this.finish(); + return this; + }, - var match, major, minor; + finishNewExpression: function (callee, args) { + this.type = Syntax.NewExpression; + this.callee = callee; + this.arguments = args; + this.finish(); + return this; + }, - if (null !== state.version) { - throwError(state, 'duplication of %YAML directive'); - } + finishObjectExpression: function (properties) { + this.type = Syntax.ObjectExpression; + this.properties = properties; + this.finish(); + return this; + }, - if (1 !== args.length) { - throwError(state, 'YAML directive accepts exactly one argument'); - } + finishObjectPattern: function (properties) { + this.type = Syntax.ObjectPattern; + this.properties = properties; + this.finish(); + return this; + }, - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + finishPostfixExpression: function (operator, argument) { + this.type = Syntax.UpdateExpression; + this.operator = operator; + this.argument = argument; + this.prefix = false; + this.finish(); + return this; + }, - if (null === match) { - throwError(state, 'ill-formed argument of the YAML directive'); - } + finishProgram: function (body, sourceType) { + this.type = Syntax.Program; + this.body = body; + this.sourceType = sourceType; + this.finish(); + return this; + }, - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); + finishProperty: function (kind, key, computed, value, method, shorthand) { + this.type = Syntax.Property; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.method = method; + this.shorthand = shorthand; + this.finish(); + return this; + }, - if (1 !== major) { - throwError(state, 'unacceptable YAML version of the document'); - } + finishRestElement: function (argument) { + this.type = Syntax.RestElement; + this.argument = argument; + this.finish(); + return this; + }, - state.version = args[0]; - state.checkLineBreaks = (minor < 2); + finishReturnStatement: function (argument) { + this.type = Syntax.ReturnStatement; + this.argument = argument; + this.finish(); + return this; + }, - if (1 !== minor && 2 !== minor) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, + finishSequenceExpression: function (expressions) { + this.type = Syntax.SequenceExpression; + this.expressions = expressions; + this.finish(); + return this; + }, - TAG: function handleTagDirective(state, name, args) { + finishSpreadElement: function (argument) { + this.type = Syntax.SpreadElement; + this.argument = argument; + this.finish(); + return this; + }, - var handle, prefix; + finishSwitchCase: function (test, consequent) { + this.type = Syntax.SwitchCase; + this.test = test; + this.consequent = consequent; + this.finish(); + return this; + }, - if (2 !== args.length) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } + finishSuper: function () { + this.type = Syntax.Super; + this.finish(); + return this; + }, - handle = args[0]; - prefix = args[1]; + finishSwitchStatement: function (discriminant, cases) { + this.type = Syntax.SwitchStatement; + this.discriminant = discriminant; + this.cases = cases; + this.finish(); + return this; + }, - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } + finishTaggedTemplateExpression: function (tag, quasi) { + this.type = Syntax.TaggedTemplateExpression; + this.tag = tag; + this.quasi = quasi; + this.finish(); + return this; + }, - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } + finishTemplateElement: function (value, tail) { + this.type = Syntax.TemplateElement; + this.value = value; + this.tail = tail; + this.finish(); + return this; + }, - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } + finishTemplateLiteral: function (quasis, expressions) { + this.type = Syntax.TemplateLiteral; + this.quasis = quasis; + this.expressions = expressions; + this.finish(); + return this; + }, - state.tagMap[handle] = prefix; - } -}; + finishThisExpression: function () { + this.type = Syntax.ThisExpression; + this.finish(); + return this; + }, + finishThrowStatement: function (argument) { + this.type = Syntax.ThrowStatement; + this.argument = argument; + this.finish(); + return this; + }, -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; + finishTryStatement: function (block, handler, finalizer) { + this.type = Syntax.TryStatement; + this.block = block; + this.guardedHandlers = []; + this.handlers = handler ? [handler] : []; + this.handler = handler; + this.finalizer = finalizer; + this.finish(); + return this; + }, - if (start < end) { - _result = state.input.slice(start, end); + finishUnaryExpression: function (operator, argument) { + this.type = (operator === '++' || operator === '--') ? Syntax.UpdateExpression : Syntax.UnaryExpression; + this.operator = operator; + this.argument = argument; + this.prefix = true; + this.finish(); + return this; + }, - if (checkJson) { - for (_position = 0, _length = _result.length; - _position < _length; - _position += 1) { - _character = _result.charCodeAt(_position); - if (!(0x09 === _character || - 0x20 <= _character && _character <= 0x10FFFF)) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } + finishVariableDeclaration: function (declarations) { + this.type = Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = 'var'; + this.finish(); + return this; + }, - state.result += _result; - } -} + finishLexicalDeclaration: function (declarations, kind) { + this.type = Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = kind; + this.finish(); + return this; + }, -function mergeMappings(state, destination, source) { - var sourceKeys, key, index, quantity; + finishVariableDeclarator: function (id, init) { + this.type = Syntax.VariableDeclarator; + this.id = id; + this.init = init; + this.finish(); + return this; + }, - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } + finishWhileStatement: function (test, body) { + this.type = Syntax.WhileStatement; + this.test = test; + this.body = body; + this.finish(); + return this; + }, - sourceKeys = Object.keys(source); + finishWithStatement: function (object, body) { + this.type = Syntax.WithStatement; + this.object = object; + this.body = body; + this.finish(); + return this; + }, - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; + finishExportSpecifier: function (local, exported) { + this.type = Syntax.ExportSpecifier; + this.exported = exported || local; + this.local = local; + this.finish(); + return this; + }, - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - } - } -} + finishImportDefaultSpecifier: function (local) { + this.type = Syntax.ImportDefaultSpecifier; + this.local = local; + this.finish(); + return this; + }, -function storeMappingPair(state, _result, keyTag, keyNode, valueNode) { - var index, quantity; + finishImportNamespaceSpecifier: function (local) { + this.type = Syntax.ImportNamespaceSpecifier; + this.local = local; + this.finish(); + return this; + }, - keyNode = String(keyNode); + finishExportNamedDeclaration: function (declaration, specifiers, src) { + this.type = Syntax.ExportNamedDeclaration; + this.declaration = declaration; + this.specifiers = specifiers; + this.source = src; + this.finish(); + return this; + }, - if (null === _result) { - _result = {}; - } + finishExportDefaultDeclaration: function (declaration) { + this.type = Syntax.ExportDefaultDeclaration; + this.declaration = declaration; + this.finish(); + return this; + }, - if ('tag:yaml.org,2002:merge' === keyTag) { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index]); - } - } else { - mergeMappings(state, _result, valueNode); - } - } else { - _result[keyNode] = valueNode; - } + finishExportAllDeclaration: function (src) { + this.type = Syntax.ExportAllDeclaration; + this.source = src; + this.finish(); + return this; + }, - return _result; -} + finishImportSpecifier: function (local, imported) { + this.type = Syntax.ImportSpecifier; + this.local = local || imported; + this.imported = imported; + this.finish(); + return this; + }, -function readLineBreak(state) { - var ch; + finishImportDeclaration: function (specifiers, src) { + this.type = Syntax.ImportDeclaration; + this.specifiers = specifiers; + this.source = src; + this.finish(); + return this; + }, - ch = state.input.charCodeAt(state.position); + finishYieldExpression: function (argument, delegate) { + this.type = Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + this.finish(); + return this; + } + }; - if (0x0A/* LF */ === ch) { - state.position++; - } else if (0x0D/* CR */ === ch) { - state.position++; - if (0x0A/* LF */ === state.input.charCodeAt(state.position)) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - state.line += 1; - state.lineStart = state.position; -} + function recordError(error) { + var e, existing; -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); + for (e = 0; e < extra.errors.length; e++) { + existing = extra.errors[e]; + // Prevent duplicated error. + /* istanbul ignore next */ + if (existing.index === error.index && existing.message === error.message) { + return; + } + } - while (0 !== ch) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); + extra.errors.push(error); } - if (allowComments && 0x23/* # */ === ch) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && 0 !== ch); + function constructError(msg, column) { + var error = new Error(msg); + try { + throw error; + } catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, 'column', { value: column }); + } + } finally { + return error; + } } - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; + function createError(line, pos, description) { + var msg, column, error; - while (0x20/* Space */ === ch) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; + msg = 'Line ' + line + ': ' + description; + column = pos - (scanning ? lineStart : lastLineStart) + 1; + error = constructError(msg, column); + error.lineNumber = line; + error.description = description; + error.index = pos; + return error; } - } - - if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((0x2D/* - */ === ch || 0x2E/* . */ === ch) && - state.input.charCodeAt(_position + 1) === ch && - state.input.charCodeAt(_position + 2) === ch) { + // Throw an exception - _position += 3; + function throwError(messageFormat) { + var args, msg; - ch = state.input.charCodeAt(_position); + args = Array.prototype.slice.call(arguments, 1); + msg = messageFormat.replace(/%(\d)/g, + function (whole, idx) { + assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + } + ); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + throw createError(lastLineNumber, lastIndex, msg); } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (1 === count) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - 0x23/* # */ === ch || - 0x26/* & */ === ch || - 0x2A/* * */ === ch || - 0x21/* ! */ === ch || - 0x7C/* | */ === ch || - 0x3E/* > */ === ch || - 0x27/* ' */ === ch || - 0x22/* " */ === ch || - 0x25/* % */ === ch || - 0x40/* @ */ === ch || - 0x60/* ` */ === ch) { - return false; - } + function tolerateError(messageFormat) { + var args, msg, error; - if (0x3F/* ? */ === ch || 0x2D/* - */ === ch) { - following = state.input.charCodeAt(state.position + 1); + args = Array.prototype.slice.call(arguments, 1); + /* istanbul ignore next */ + msg = messageFormat.replace(/%(\d)/g, + function (whole, idx) { + assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + } + ); - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; + error = createError(lineNumber, lastIndex, msg); + if (extra.errors) { + recordError(error); + } else { + throw error; + } } - } - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; + // Throw an exception because of the token. - while (0 !== ch) { - if (0x3A/* : */ === ch) { - following = state.input.charCodeAt(state.position + 1); + function unexpectedTokenError(token, message) { + var value, msg = message || Messages.UnexpectedToken; - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } + if (token) { + if (!message) { + msg = (token.type === Token.EOF) ? Messages.UnexpectedEOS : + (token.type === Token.Identifier) ? Messages.UnexpectedIdentifier : + (token.type === Token.NumericLiteral) ? Messages.UnexpectedNumber : + (token.type === Token.StringLiteral) ? Messages.UnexpectedString : + (token.type === Token.Template) ? Messages.UnexpectedTemplate : + Messages.UnexpectedToken; - } else if (0x23/* # */ === ch) { - preceding = state.input.charCodeAt(state.position - 1); + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + msg = Messages.UnexpectedReserved; + } else if (strict && isStrictModeReservedWord(token.value)) { + msg = Messages.StrictReservedWord; + } + } + } - if (is_WS_OR_EOL(preceding)) { - break; - } + value = (token.type === Token.Template) ? token.value.raw : token.value; + } else { + value = 'ILLEGAL'; + } - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; + msg = msg.replace('%0', value); - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); + return (token && typeof token.lineNumber === 'number') ? + createError(token.lineNumber, token.start, msg) : + createError(scanning ? lineNumber : lastLineNumber, scanning ? index : lastIndex, msg); + } - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } + function throwUnexpectedToken(token, message) { + throw unexpectedTokenError(token, message); } - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; + function tolerateUnexpectedToken(token, message) { + var error = unexpectedTokenError(token, message); + if (extra.errors) { + recordError(error); + } else { + throw error; + } } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpectedToken(token); + } } - ch = state.input.charCodeAt(++state.position); - } + /** + * @name expectCommaSeparator + * @description Quietly expect a comma when in tolerant mode, otherwise delegates + * to expect(value) + * @since 2.0 + */ + function expectCommaSeparator() { + var token; - captureSegment(state, captureStart, captureEnd, false); + if (extra.errors) { + token = lookahead; + if (token.type === Token.Punctuator && token.value === ',') { + lex(); + } else if (token.type === Token.Punctuator && token.value === ';') { + lex(); + tolerateUnexpectedToken(token); + } else { + tolerateUnexpectedToken(token, Messages.UnexpectedToken); + } + } else { + expect(','); + } + } - if (state.result) { - return true; - } + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. - state.kind = _kind; - state.result = _result; - return false; -} + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpectedToken(token); + } + } -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; + // Return true if the next token matches the specified punctuator. - ch = state.input.charCodeAt(state.position); + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } - if (0x27/* ' */ !== ch) { - return false; - } + // Return true if the next token matches the specified keyword - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; + function matchKeyword(keyword) { + return lookahead.type === Token.Keyword && lookahead.value === keyword; + } - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x27/* ' */ === ch) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); + // Return true if the next token matches the specified contextual keyword + // (where an identifier is sometimes a keyword depending on the context) - if (0x27/* ' */ === ch) { - captureStart = captureEnd = state.position; - state.position++; - } else { - return true; - } + function matchContextualKeyword(keyword) { + return lookahead.type === Token.Identifier && lookahead.value === keyword; + } - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; + // Return true if the next token is an assignment operator - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); + function matchAssign() { + var op; - } else { - state.position++; - captureEnd = state.position; + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; } - } - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} + function consumeSemicolon() { + // Catch the very common case first: immediately a semicolon (U+003B). + if (source.charCodeAt(startIndex) === 0x3B || match(';')) { + lex(); + return; + } -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; + if (hasLineTerminator) { + return; + } - ch = state.input.charCodeAt(state.position); + // FIXME(ikarienator): this is seemingly an issue in the previous location info convention. + lastIndex = startIndex; + lastLineNumber = startLineNumber; + lastLineStart = startLineStart; - if (0x22/* " */ !== ch) { - return false; - } + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpectedToken(lookahead); + } + } - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; + // Cover grammar support. + // + // When an assignment expression position starts with an left parenthesis, the determination of the type + // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) + // or the first comma. This situation also defers the determination of all the expressions nested in the pair. + // + // There are three productions that can be parsed in a parentheses pair that needs to be determined + // after the outermost pair is closed. They are: + // + // 1. AssignmentExpression + // 2. BindingElements + // 3. AssignmentTargets + // + // In order to avoid exponential backtracking, we use two flags to denote if the production can be + // binding element or assignment target. + // + // The three productions have the relationship: + // + // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression + // + // with a single exception that CoverInitializedName when used directly in an Expression, generates + // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the + // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. + // + // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not + // effect the current flags. This means the production the parser parses is only used as an expression. Therefore + // the CoverInitializedName check is conducted. + // + // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates + // the flags outside of the parser. This means the production the parser parses is used as a part of a potential + // pattern. The CoverInitializedName check is deferred. + function isolateCoverGrammar(parser) { + var oldIsBindingElement = isBindingElement, + oldIsAssignmentTarget = isAssignmentTarget, + oldFirstCoverInitializedNameError = firstCoverInitializedNameError, + result; + isBindingElement = true; + isAssignmentTarget = true; + firstCoverInitializedNameError = null; + result = parser(); + if (firstCoverInitializedNameError !== null) { + throwUnexpectedToken(firstCoverInitializedNameError); + } + isBindingElement = oldIsBindingElement; + isAssignmentTarget = oldIsAssignmentTarget; + firstCoverInitializedNameError = oldFirstCoverInitializedNameError; + return result; + } - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x22/* " */ === ch) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; + function inheritCoverGrammar(parser) { + var oldIsBindingElement = isBindingElement, + oldIsAssignmentTarget = isAssignmentTarget, + oldFirstCoverInitializedNameError = firstCoverInitializedNameError, + result; + isBindingElement = true; + isAssignmentTarget = true; + firstCoverInitializedNameError = null; + result = parser(); + isBindingElement = isBindingElement && oldIsBindingElement; + isAssignmentTarget = isAssignmentTarget && oldIsAssignmentTarget; + firstCoverInitializedNameError = oldFirstCoverInitializedNameError || firstCoverInitializedNameError; + return result; + } - } else if (0x5C/* \ */ === ch) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); + // ECMA-262 13.3.3 Destructuring Binding Patterns - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); + function parseArrayPattern(params, kind) { + var node = new Node(), elements = [], rest, restNode; + expect('['); - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; + while (!match(']')) { + if (match(',')) { + lex(); + elements.push(null); + } else { + if (match('...')) { + restNode = new Node(); + lex(); + params.push(lookahead); + rest = parseVariableIdentifier(kind); + elements.push(restNode.finishRestElement(rest)); + break; + } else { + elements.push(parsePatternWithDefault(params, kind)); + } + if (!match(']')) { + expect(','); + } + } - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; + } - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); + expect(']'); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; + return node.finishArrayPattern(elements); + } - } else { - throwError(state, 'expected hexadecimal character'); - } + function parsePropertyPattern(params, kind) { + var node = new Node(), key, keyToken, computed = match('['), init; + if (lookahead.type === Token.Identifier) { + keyToken = lookahead; + key = parseVariableIdentifier(); + if (match('=')) { + params.push(keyToken); + lex(); + init = parseAssignmentExpression(); + + return node.finishProperty( + 'init', key, false, + new WrappingNode(keyToken).finishAssignmentPattern(key, init), false, false); + } else if (!match(':')) { + params.push(keyToken); + return node.finishProperty('init', key, false, key, false, true); + } + } else { + key = parseObjectPropertyKey(); } + expect(':'); + init = parsePatternWithDefault(params, kind); + return node.finishProperty('init', key, computed, init, false, false); + } - state.result += charFromCodepoint(hexResult); + function parseObjectPattern(params, kind) { + var node = new Node(), properties = []; - state.position++; + expect('{'); - } else { - throwError(state, 'unknown escape sequence'); - } + while (!match('}')) { + properties.push(parsePropertyPattern(params, kind)); + if (!match('}')) { + expect(','); + } + } - captureStart = captureEnd = state.position; + lex(); - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; + return node.finishObjectPattern(properties); + } - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); + function parsePattern(params, kind) { + if (match('[')) { + return parseArrayPattern(params, kind); + } else if (match('{')) { + return parseObjectPattern(params, kind); + } else if (matchKeyword('let')) { + if (kind === 'const' || kind === 'let') { + tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken); + } + } - } else { - state.position++; - captureEnd = state.position; + params.push(lookahead); + return parseVariableIdentifier(kind); } - } - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} + function parsePatternWithDefault(params, kind) { + var startToken = lookahead, pattern, previousAllowYield, right; + pattern = parsePattern(params, kind); + if (match('=')) { + lex(); + previousAllowYield = state.allowYield; + state.allowYield = true; + right = isolateCoverGrammar(parseAssignmentExpression); + state.allowYield = previousAllowYield; + pattern = new WrappingNode(startToken).finishAssignmentPattern(pattern, right); + } + return pattern; + } -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - keyNode, - keyTag, - valueNode, - ch; + // ECMA-262 12.2.5 Array Initializer - ch = state.input.charCodeAt(state.position); + function parseArrayInitializer() { + var elements = [], node = new Node(), restSpread; - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } + expect('['); - if (null !== state.anchor) { - state.anchorMap[state.anchor] = _result; - } + while (!match(']')) { + if (match(',')) { + lex(); + elements.push(null); + } else if (match('...')) { + restSpread = new Node(); + lex(); + restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression)); - ch = state.input.charCodeAt(++state.position); + if (!match(']')) { + isAssignmentTarget = isBindingElement = false; + expect(','); + } + elements.push(restSpread); + } else { + elements.push(inheritCoverGrammar(parseAssignmentExpression)); - while (0 !== ch) { - skipSeparationSpace(state, true, nodeIndent); + if (!match(']')) { + expect(','); + } + } + } - ch = state.input.charCodeAt(state.position); + lex(); - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); + return node.finishArrayExpression(elements); + } + + // ECMA-262 12.2.6 Object Initializer + + function parsePropertyFunction(node, paramInfo, isGenerator) { + var previousStrict, body; + + isAssignmentTarget = isBindingElement = false; + + previousStrict = strict; + body = isolateCoverGrammar(parseFunctionSourceElements); + + if (strict && paramInfo.firstRestricted) { + tolerateUnexpectedToken(paramInfo.firstRestricted, paramInfo.message); + } + if (strict && paramInfo.stricted) { + tolerateUnexpectedToken(paramInfo.stricted, paramInfo.message); + } + + strict = previousStrict; + return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body, isGenerator); } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; + function parsePropertyMethodFunction() { + var params, method, node = new Node(), + previousAllowYield = state.allowYield; - if (0x3F/* ? */ === ch) { - following = state.input.charCodeAt(state.position + 1); + state.allowYield = false; + params = parseParams(); + state.allowYield = previousAllowYield; - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } + state.allowYield = false; + method = parsePropertyFunction(node, params, false); + state.allowYield = previousAllowYield; + + return method; } - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); + function parseObjectPropertyKey() { + var token, node = new Node(), expr; - ch = state.input.charCodeAt(state.position); + token = lex(); - if ((isExplicitPair || state.line === _line) && 0x3A/* : */ === ch) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. - if (isMapping) { - storeMappingPair(state, _result, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); + switch (token.type) { + case Token.StringLiteral: + case Token.NumericLiteral: + if (strict && token.octal) { + tolerateUnexpectedToken(token, Messages.StrictOctalLiteral); + } + return node.finishLiteral(token); + case Token.Identifier: + case Token.BooleanLiteral: + case Token.NullLiteral: + case Token.Keyword: + return node.finishIdentifier(token.value); + case Token.Punctuator: + if (token.value === '[') { + expr = isolateCoverGrammar(parseAssignmentExpression); + expect(']'); + return expr; + } + break; + } + throwUnexpectedToken(token); } - skipSeparationSpace(state, true, nodeIndent); + function lookaheadPropertyName() { + switch (lookahead.type) { + case Token.Identifier: + case Token.StringLiteral: + case Token.BooleanLiteral: + case Token.NullLiteral: + case Token.NumericLiteral: + case Token.Keyword: + return true; + case Token.Punctuator: + return lookahead.value === '['; + } + return false; + } - ch = state.input.charCodeAt(state.position); + // This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals, + // it might be called at a position where there is in fact a short hand identifier pattern or a data property. + // This can only be determined after we consumed up to the left parentheses. + // + // In order to avoid back tracking, it returns `null` if the position is not a MethodDefinition and the caller + // is responsible to visit other options. + function tryParseMethodDefinition(token, key, computed, node) { + var value, options, methodNode, params, + previousAllowYield = state.allowYield; - if (0x2C/* , */ === ch) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } + if (token.type === Token.Identifier) { + // check for `get` and `set`; - throwError(state, 'unexpected end of the stream within a flow collection'); -} + if (token.value === 'get' && lookaheadPropertyName()) { + computed = match('['); + key = parseObjectPropertyKey(); + methodNode = new Node(); + expect('('); + expect(')'); -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; + state.allowYield = false; + value = parsePropertyFunction(methodNode, { + params: [], + defaults: [], + stricted: null, + firstRestricted: null, + message: null + }, false); + state.allowYield = previousAllowYield; - ch = state.input.charCodeAt(state.position); + return node.finishProperty('get', key, computed, value, false, false); + } else if (token.value === 'set' && lookaheadPropertyName()) { + computed = match('['); + key = parseObjectPropertyKey(); + methodNode = new Node(); + expect('('); - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } + options = { + params: [], + defaultCount: 0, + defaults: [], + firstRestricted: null, + paramSet: {} + }; + if (match(')')) { + tolerateUnexpectedToken(lookahead); + } else { + state.allowYield = false; + parseParam(options); + state.allowYield = previousAllowYield; + if (options.defaultCount === 0) { + options.defaults = []; + } + } + expect(')'); - state.kind = 'scalar'; - state.result = ''; + state.allowYield = false; + value = parsePropertyFunction(methodNode, options, false); + state.allowYield = previousAllowYield; - while (0 !== ch) { - ch = state.input.charCodeAt(++state.position); + return node.finishProperty('set', key, computed, value, false, false); + } + } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyName()) { + computed = match('['); + key = parseObjectPropertyKey(); + methodNode = new Node(); - if (0x2B/* + */ === ch || 0x2D/* - */ === ch) { - if (CHOMPING_CLIP === chomping) { - chomping = (0x2B/* + */ === ch) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } + state.allowYield = true; + params = parseParams(); + state.allowYield = previousAllowYield; - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } + state.allowYield = false; + value = parsePropertyFunction(methodNode, params, true); + state.allowYield = previousAllowYield; - } else { - break; - } - } + return node.finishProperty('init', key, computed, value, true, false); + } - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); + if (key && match('(')) { + value = parsePropertyMethodFunction(); + return node.finishProperty('init', key, computed, value, true, false); + } - if (0x23/* # */ === ch) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (0 !== ch)); + // Not a MethodDefinition. + return null; } - } - - while (0 !== ch) { - readLineBreak(state); - state.lineIndent = 0; - ch = state.input.charCodeAt(state.position); + function parseObjectProperty(hasProto) { + var token = lookahead, node = new Node(), computed, key, maybeMethod, proto, value; - while ((!detectedIndent || state.lineIndent < textIndent) && - (0x20/* Space */ === ch)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } + computed = match('['); + if (match('*')) { + lex(); + } else { + key = parseObjectPropertyKey(); + } + maybeMethod = tryParseMethodDefinition(token, key, computed, node); + if (maybeMethod) { + return maybeMethod; + } - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } + if (!key) { + throwUnexpectedToken(lookahead); + } - if (is_EOL(ch)) { - emptyLines++; - continue; - } + // Check for duplicated __proto__ + if (!computed) { + proto = (key.type === Syntax.Identifier && key.name === '__proto__') || + (key.type === Syntax.Literal && key.value === '__proto__'); + if (hasProto.value && proto) { + tolerateError(Messages.DuplicateProtoProperty); + } + hasProto.value |= proto; + } - // End of the scalar. - if (state.lineIndent < textIndent) { + if (match(':')) { + lex(); + value = inheritCoverGrammar(parseAssignmentExpression); + return node.finishProperty('init', key, computed, value, false, false); + } - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (detectedIndent) { // i.e. only if the scalar is not empty. - state.result += '\n'; + if (token.type === Token.Identifier) { + if (match('=')) { + firstCoverInitializedNameError = lookahead; + lex(); + value = isolateCoverGrammar(parseAssignmentExpression); + return node.finishProperty('init', key, computed, + new WrappingNode(token).finishAssignmentPattern(key, value), false, true); + } + return node.finishProperty('init', key, computed, key, false, true); } - } - // Break this `while` cycle and go to the funciton's epilogue. - break; + throwUnexpectedToken(lookahead); } - // Folded style: use fancy rules to handle line breaks. - if (folding) { + function parseObjectInitializer() { + var properties = [], hasProto = {value: false}, node = new Node(); - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - state.result += common.repeat('\n', emptyLines + 1); + expect('{'); - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); + while (!match('}')) { + properties.push(parseObjectProperty(hasProto)); - // Just one line break - perceive as the same line. - } else if (0 === emptyLines) { - if (detectedIndent) { // i.e. only if we have already read some scalar content. - state.result += ' '; + if (!match('}')) { + expectCommaSeparator(); + } } - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } + expect('}'); - // Literal style: just add exact number of line breaks between content lines. - } else if (detectedIndent) { - // If current line isn't the first one - count line break from the last content line. - state.result += common.repeat('\n', emptyLines + 1); - } else { - // In case of the first content line - count only empty lines. - state.result += common.repeat('\n', emptyLines); + return node.finishObjectExpression(properties); } - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (0 !== ch)) { - ch = state.input.charCodeAt(++state.position); + function reinterpretExpressionAsPattern(expr) { + var i; + switch (expr.type) { + case Syntax.Identifier: + case Syntax.MemberExpression: + case Syntax.RestElement: + case Syntax.AssignmentPattern: + break; + case Syntax.SpreadElement: + expr.type = Syntax.RestElement; + reinterpretExpressionAsPattern(expr.argument); + break; + case Syntax.ArrayExpression: + expr.type = Syntax.ArrayPattern; + for (i = 0; i < expr.elements.length; i++) { + if (expr.elements[i] !== null) { + reinterpretExpressionAsPattern(expr.elements[i]); + } + } + break; + case Syntax.ObjectExpression: + expr.type = Syntax.ObjectPattern; + for (i = 0; i < expr.properties.length; i++) { + reinterpretExpressionAsPattern(expr.properties[i].value); + } + break; + case Syntax.AssignmentExpression: + expr.type = Syntax.AssignmentPattern; + reinterpretExpressionAsPattern(expr.left); + break; + default: + // Allow other node type for tolerant parsing. + break; + } } - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; + // ECMA-262 12.2.9 Template Literals - if (null !== state.anchor) { - state.anchorMap[state.anchor] = _result; - } + function parseTemplateElement(option) { + var node, token; - ch = state.input.charCodeAt(state.position); + if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) { + throwUnexpectedToken(); + } - while (0 !== ch) { + node = new Node(); + token = lex(); - if (0x2D/* - */ !== ch) { - break; + return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail); } - following = state.input.charCodeAt(state.position + 1); + function parseTemplateLiteral() { + var quasi, quasis, expressions, node = new Node(); - if (!is_WS_OR_EOL(following)) { - break; - } + quasi = parseTemplateElement({ head: true }); + quasis = [quasi]; + expressions = []; - detected = true; - state.position++; + while (!quasi.tail) { + expressions.push(parseExpression()); + quasi = parseTemplateElement({ head: false }); + quasis.push(quasi); + } - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } + return node.finishTemplateLiteral(quasis, expressions); } - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); + // ECMA-262 12.2.10 The Grouping Operator - ch = state.input.charCodeAt(state.position); + function parseGroupExpression() { + var expr, expressions, startToken, i, params = []; - if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } + expect('('); - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} + if (match(')')) { + lex(); + if (!match('=>')) { + expect('=>'); + } + return { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: [], + rawParams: [] + }; + } -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; + startToken = lookahead; + if (match('...')) { + expr = parseRestElement(params); + expect(')'); + if (!match('=>')) { + expect('=>'); + } + return { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: [expr] + }; + } - if (null !== state.anchor) { - state.anchorMap[state.anchor] = _result; - } + isBindingElement = true; + expr = inheritCoverGrammar(parseAssignmentExpression); - ch = state.input.charCodeAt(state.position); + if (match(',')) { + isAssignmentTarget = false; + expressions = [expr]; - while (0 !== ch) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. + while (startIndex < length) { + if (!match(',')) { + break; + } + lex(); - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((0x3F/* ? */ === ch || 0x3A/* : */ === ch) && is_WS_OR_EOL(following)) { + if (match('...')) { + if (!isBindingElement) { + throwUnexpectedToken(lookahead); + } + expressions.push(parseRestElement(params)); + expect(')'); + if (!match('=>')) { + expect('=>'); + } + isBindingElement = false; + for (i = 0; i < expressions.length; i++) { + reinterpretExpressionAsPattern(expressions[i]); + } + return { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: expressions + }; + } + + expressions.push(inheritCoverGrammar(parseAssignmentExpression)); + } - if (0x3F/* ? */ === ch) { - if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; + expr = new WrappingNode(startToken).finishSequenceExpression(expressions); } - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed'); - } + expect(')'); - state.position += 1; - ch = following; + if (match('=>')) { + if (expr.type === Syntax.Identifier && expr.name === 'yield') { + return { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: [expr] + }; + } - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (!isBindingElement) { + throwUnexpectedToken(lookahead); + } - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); + if (expr.type === Syntax.SequenceExpression) { + for (i = 0; i < expr.expressions.length; i++) { + reinterpretExpressionAsPattern(expr.expressions[i]); + } + } else { + reinterpretExpressionAsPattern(expr); + } - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); + expr = { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: expr.type === Syntax.SequenceExpression ? expr.expressions : [expr] + }; } + isBindingElement = false; + return expr; + } - if (0x3A/* : */ === ch) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } + // ECMA-262 12.2 Primary Expressions - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; + function parsePrimaryExpression() { + var type, token, expr, node; - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + if (match('(')) { + isBindingElement = false; + return inheritCoverGrammar(parseGroupExpression); + } - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. + if (match('[')) { + return inheritCoverGrammar(parseArrayInitializer); } - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + if (match('{')) { + return inheritCoverGrammar(parseObjectInitializer); + } - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } + type = lookahead.type; + node = new Node(); - } else { - break; // Reading is done. Go to the epilogue. - } + if (type === Token.Identifier) { + if (state.sourceType === 'module' && lookahead.value === 'await') { + tolerateUnexpectedToken(lookahead); + } + expr = node.finishIdentifier(lex().value); + } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { + isAssignmentTarget = isBindingElement = false; + if (strict && lookahead.octal) { + tolerateUnexpectedToken(lookahead, Messages.StrictOctalLiteral); + } + expr = node.finishLiteral(lex()); + } else if (type === Token.Keyword) { + if (!strict && state.allowYield && matchKeyword('yield')) { + return parseNonComputedProperty(); + } + if (!strict && matchKeyword('let')) { + return node.finishIdentifier(lex().value); + } + isAssignmentTarget = isBindingElement = false; + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + if (matchKeyword('this')) { + lex(); + return node.finishThisExpression(); + } + if (matchKeyword('class')) { + return parseClassExpression(); + } + throwUnexpectedToken(lex()); + } else if (type === Token.BooleanLiteral) { + isAssignmentTarget = isBindingElement = false; + token = lex(); + token.value = (token.value === 'true'); + expr = node.finishLiteral(token); + } else if (type === Token.NullLiteral) { + isAssignmentTarget = isBindingElement = false; + token = lex(); + token.value = null; + expr = node.finishLiteral(token); + } else if (match('/') || match('/=')) { + isAssignmentTarget = isBindingElement = false; + index = startIndex; - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; + if (typeof extra.tokens !== 'undefined') { + token = collectRegex(); + } else { + token = scanRegExp(); + } + lex(); + expr = node.finishLiteral(token); + } else if (type === Token.Template) { + expr = parseTemplateLiteral(); } else { - valueNode = state.result; + throwUnexpectedToken(lex()); } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, valueNode); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - if (state.lineIndent > nodeIndent && (0 !== ch)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; + return expr; } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - return detected; -} + // ECMA-262 12.3 Left-Hand-Side Expressions -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; + function parseArguments() { + var args = [], expr; - ch = state.input.charCodeAt(state.position); + expect('('); - if (0x21/* ! */ !== ch) { - return false; - } + if (!match(')')) { + while (startIndex < length) { + if (match('...')) { + expr = new Node(); + lex(); + expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression)); + } else { + expr = isolateCoverGrammar(parseAssignmentExpression); + } + args.push(expr); + if (match(')')) { + break; + } + expectCommaSeparator(); + } + } - if (null !== state.tag) { - throwError(state, 'duplication of a tag property'); - } + expect(')'); - ch = state.input.charCodeAt(++state.position); + return args; + } - if (0x3C/* < */ === ch) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); + function parseNonComputedProperty() { + var token, node = new Node(); - } else if (0x21/* ! */ === ch) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); + token = lex(); - } else { - tagHandle = '!'; - } + if (!isIdentifierName(token)) { + throwUnexpectedToken(token); + } - _position = state.position; + return node.finishIdentifier(token.value); + } - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (0 !== ch && 0x3E/* > */ !== ch); + function parseNonComputedMember() { + expect('.'); - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); + return parseNonComputedProperty(); } - } else { - while (0 !== ch && !is_WS_OR_EOL(ch)) { - if (0x21/* ! */ === ch) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); + function parseComputedMember() { + var expr; - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } + expect('['); - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } + expr = isolateCoverGrammar(parseExpression); - ch = state.input.charCodeAt(++state.position); + expect(']'); + + return expr; } - tagName = state.input.slice(_position, state.position); + // ECMA-262 12.3.3 The new Operator - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } + function parseNewExpression() { + var callee, args, node = new Node(); - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } + expectKeyword('new'); - if (isVerbatim) { - state.tag = tagName; + if (match('.')) { + lex(); + if (lookahead.type === Token.Identifier && lookahead.value === 'target') { + if (state.inFunctionBody) { + lex(); + return node.finishMetaProperty('new', 'target'); + } + } + throwUnexpectedToken(lookahead); + } - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; + callee = isolateCoverGrammar(parseLeftHandSideExpression); + args = match('(') ? parseArguments() : []; - } else if ('!' === tagHandle) { - state.tag = '!' + tagName; + isAssignmentTarget = isBindingElement = false; - } else if ('!!' === tagHandle) { - state.tag = 'tag:yaml.org,2002:' + tagName; + return node.finishNewExpression(callee, args); + } - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } + // ECMA-262 12.3.4 Function Calls - return true; -} + function parseLeftHandSideExpressionAllowCall() { + var quasi, expr, args, property, startToken, previousAllowIn = state.allowIn; -function readAnchorProperty(state) { - var _position, - ch; + startToken = lookahead; + state.allowIn = true; - ch = state.input.charCodeAt(state.position); + if (matchKeyword('super') && state.inFunctionBody) { + expr = new Node(); + lex(); + expr = expr.finishSuper(); + if (!match('(') && !match('.') && !match('[')) { + throwUnexpectedToken(lookahead); + } + } else { + expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); + } - if (0x26/* & */ !== ch) { - return false; - } + for (;;) { + if (match('.')) { + isBindingElement = false; + isAssignmentTarget = true; + property = parseNonComputedMember(); + expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); + } else if (match('(')) { + isBindingElement = false; + isAssignmentTarget = false; + args = parseArguments(); + expr = new WrappingNode(startToken).finishCallExpression(expr, args); + } else if (match('[')) { + isBindingElement = false; + isAssignmentTarget = true; + property = parseComputedMember(); + expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); + } else if (lookahead.type === Token.Template && lookahead.head) { + quasi = parseTemplateLiteral(); + expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); + } else { + break; + } + } + state.allowIn = previousAllowIn; - if (null !== state.anchor) { - throwError(state, 'duplication of an anchor property'); - } + return expr; + } - ch = state.input.charCodeAt(++state.position); - _position = state.position; + // ECMA-262 12.3 Left-Hand-Side Expressions - while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } + function parseLeftHandSideExpression() { + var quasi, expr, property, startToken; + assert(state.allowIn, 'callee of new expression always allow in keyword.'); - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } + startToken = lookahead; - state.anchor = state.input.slice(_position, state.position); - return true; -} + if (matchKeyword('super') && state.inFunctionBody) { + expr = new Node(); + lex(); + expr = expr.finishSuper(); + if (!match('[') && !match('.')) { + throwUnexpectedToken(lookahead); + } + } else { + expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); + } -function readAlias(state) { - var _position, alias, - ch; + for (;;) { + if (match('[')) { + isBindingElement = false; + isAssignmentTarget = true; + property = parseComputedMember(); + expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); + } else if (match('.')) { + isBindingElement = false; + isAssignmentTarget = true; + property = parseNonComputedMember(); + expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); + } else if (lookahead.type === Token.Template && lookahead.head) { + quasi = parseTemplateLiteral(); + expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); + } else { + break; + } + } + return expr; + } - ch = state.input.charCodeAt(state.position); + // ECMA-262 12.4 Postfix Expressions - if (0x2A/* * */ !== ch) { - return false; - } + function parsePostfixExpression() { + var expr, token, startToken = lookahead; - ch = state.input.charCodeAt(++state.position); - _position = state.position; + expr = inheritCoverGrammar(parseLeftHandSideExpressionAllowCall); - while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } + if (!hasLineTerminator && lookahead.type === Token.Punctuator) { + if (match('++') || match('--')) { + // ECMA-262 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + tolerateError(Messages.StrictLHSPostfix); + } - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } + if (!isAssignmentTarget) { + tolerateError(Messages.InvalidLHSInAssignment); + } - alias = state.input.slice(_position, state.position); + isAssignmentTarget = isBindingElement = false; - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } + token = lex(); + expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr); + } + } - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} + return expr; + } -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } + return expr; } - } - if (1 === indentStatus) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; + function binaryPrecedence(token, allowIn) { + var prec = 0; - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; } - } else { - allowBlockCollections = false; - } - } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } + switch (token.value) { + case '||': + prec = 1; + break; - if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } + case '&&': + prec = 2; + break; - blockIndent = state.position - state.lineStart; + case '|': + prec = 3; + break; - if (1 === indentStatus) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; + case '^': + prec = 4; + break; - } else if (readAlias(state)) { - hasContent = true; + case '&': + prec = 5; + break; - if (null !== state.tag || null !== state.anchor) { - throwError(state, 'alias node should not have any properties'); - } + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; - if (null === state.tag) { - state.tag = '?'; - } - } + case 'in': + prec = allowIn ? 7 : 0; + break; - if (null !== state.anchor) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (0 === indentStatus) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } + case '<<': + case '>>': + case '>>>': + prec = 8; + break; - if (null !== state.tag && '!' !== state.tag) { - if ('?' === state.tag) { - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; - typeIndex < typeQuantity; - typeIndex += 1) { - type = state.implicitTypes[typeIndex]; + case '+': + case '-': + prec = 9; + break; - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only assigned to plain scalars. So, it isn't - // needed to check for 'kind' conformity. + case '*': + case '/': + case '%': + prec = 11; + break; - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (null !== state.anchor) { - state.anchorMap[state.anchor] = state.result; - } - break; + default: + break; } - } - } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { - type = state.typeMap[state.tag]; - - if (null !== state.result && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (null !== state.anchor) { - state.anchorMap[state.anchor] = state.result; - } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); + return prec; } - } - return null !== state.tag || null !== state.anchor || hasContent; -} + // ECMA-262 12.6 Multiplicative Operators + // ECMA-262 12.7 Additive Operators + // ECMA-262 12.8 Bitwise Shift Operators + // ECMA-262 12.9 Relational Operators + // ECMA-262 12.10 Equality Operators + // ECMA-262 12.11 Binary Bitwise Operators + // ECMA-262 12.12 Binary Logical Operators -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; + function parseBinaryExpression() { + var marker, markers, expr, token, prec, stack, right, operator, left, i; - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; + marker = lookahead; + left = inheritCoverGrammar(parseUnaryExpression); - while (0 !== (ch = state.input.charCodeAt(state.position))) { - skipSeparationSpace(state, true, -1); + token = lookahead; + prec = binaryPrecedence(token, state.allowIn); + if (prec === 0) { + return left; + } + isAssignmentTarget = isBindingElement = false; + token.prec = prec; + lex(); - ch = state.input.charCodeAt(state.position); + markers = [marker, lookahead]; + right = isolateCoverGrammar(parseUnaryExpression); - if (state.lineIndent > 0 || 0x25/* % */ !== ch) { - break; - } + stack = [left, token, right]; - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; + while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { - while (0 !== ch && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + markers.pop(); + expr = new WrappingNode(markers[markers.length - 1]).finishBinaryExpression(operator, left, right); + stack.push(expr); + } - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + markers.push(lookahead); + expr = isolateCoverGrammar(parseUnaryExpression); + stack.push(expr); + } - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + expr = new WrappingNode(markers.pop()).finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + } + + return expr; } - while (0 !== ch) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (0x23/* # */ === ch) { - do { ch = state.input.charCodeAt(++state.position); } - while (0 !== ch && !is_EOL(ch)); - break; - } + // ECMA-262 12.13 Conditional Operator - if (is_EOL(ch)) { - break; - } + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate, startToken; - _position = state.position; + startToken = lookahead; - while (0 !== ch && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } + expr = inheritCoverGrammar(parseBinaryExpression); + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = isolateCoverGrammar(parseAssignmentExpression); + state.allowIn = previousAllowIn; + expect(':'); + alternate = isolateCoverGrammar(parseAssignmentExpression); - directiveArgs.push(state.input.slice(_position, state.position)); + expr = new WrappingNode(startToken).finishConditionalExpression(expr, consequent, alternate); + isAssignmentTarget = isBindingElement = false; + } + + return expr; } - if (0 !== ch) { - readLineBreak(state); + // ECMA-262 14.2 Arrow Function Definitions + + function parseConciseBody() { + if (match('{')) { + return parseFunctionSourceElements(); + } + return isolateCoverGrammar(parseAssignmentExpression); } - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); + function checkPatternParam(options, param) { + var i; + switch (param.type) { + case Syntax.Identifier: + validateParam(options, param, param.name); + break; + case Syntax.RestElement: + checkPatternParam(options, param.argument); + break; + case Syntax.AssignmentPattern: + checkPatternParam(options, param.left); + break; + case Syntax.ArrayPattern: + for (i = 0; i < param.elements.length; i++) { + if (param.elements[i] !== null) { + checkPatternParam(options, param.elements[i]); + } + } + break; + case Syntax.YieldExpression: + break; + default: + assert(param.type === Syntax.ObjectPattern, 'Invalid type'); + for (i = 0; i < param.properties.length; i++) { + checkPatternParam(options, param.properties[i].value); + } + break; + } } - } + function reinterpretAsCoverFormalsList(expr) { + var i, len, param, params, defaults, defaultCount, options, token; - skipSeparationSpace(state, true, -1); + defaults = []; + defaultCount = 0; + params = [expr]; - if (0 === state.lineIndent && - 0x2D/* - */ === state.input.charCodeAt(state.position) && - 0x2D/* - */ === state.input.charCodeAt(state.position + 1) && - 0x2D/* - */ === state.input.charCodeAt(state.position + 2)) { - state.position += 3; - skipSeparationSpace(state, true, -1); + switch (expr.type) { + case Syntax.Identifier: + break; + case PlaceHolders.ArrowParameterPlaceHolder: + params = expr.params; + break; + default: + return null; + } - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } + options = { + paramSet: {} + }; - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); + for (i = 0, len = params.length; i < len; i += 1) { + param = params[i]; + switch (param.type) { + case Syntax.AssignmentPattern: + params[i] = param.left; + if (param.right.type === Syntax.YieldExpression) { + if (param.right.argument) { + throwUnexpectedToken(lookahead); + } + param.right.type = Syntax.Identifier; + param.right.name = 'yield'; + delete param.right.argument; + delete param.right.delegate; + } + defaults.push(param.right); + ++defaultCount; + checkPatternParam(options, param.left); + break; + default: + checkPatternParam(options, param); + params[i] = param; + defaults.push(null); + break; + } + } - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } + if (strict || !state.allowYield) { + for (i = 0, len = params.length; i < len; i += 1) { + param = params[i]; + if (param.type === Syntax.YieldExpression) { + throwUnexpectedToken(lookahead); + } + } + } - state.documents.push(state.result); + if (options.message === Messages.StrictParamDupe) { + token = strict ? options.stricted : options.firstRestricted; + throwUnexpectedToken(token, options.message); + } - if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (defaultCount === 0) { + defaults = []; + } - if (0x2E/* . */ === state.input.charCodeAt(state.position)) { - state.position += 3; - skipSeparationSpace(state, true, -1); + return { + params: params, + defaults: defaults, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; } - return; - } - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} + function parseArrowFunctionExpression(options, node) { + var previousStrict, previousAllowYield, body; + + if (hasLineTerminator) { + tolerateUnexpectedToken(lookahead); + } + expect('=>'); + previousStrict = strict; + previousAllowYield = state.allowYield; + state.allowYield = true; -function loadDocuments(input, options) { - input = String(input); - options = options || {}; + body = parseConciseBody(); - if (input.length !== 0) { + if (strict && options.firstRestricted) { + throwUnexpectedToken(options.firstRestricted, options.message); + } + if (strict && options.stricted) { + tolerateUnexpectedToken(options.stricted, options.message); + } - // Add tailing `\n` if not exists - if (0x0A/* LF */ !== input.charCodeAt(input.length - 1) && - 0x0D/* CR */ !== input.charCodeAt(input.length - 1)) { - input += '\n'; - } + strict = previousStrict; + state.allowYield = previousAllowYield; - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); + return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement); } - } - var state = new State(input, options); + // ECMA-262 14.4 Yield expression - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; + function parseYieldExpression() { + var argument, expr, delegate, previousAllowYield; - while (0x20/* Space */ === state.input.charCodeAt(state.position)) { - state.lineIndent += 1; - state.position += 1; - } + argument = null; + expr = new Node(); + delegate = false; - while (state.position < (state.length - 1)) { - readDocument(state); - } + expectKeyword('yield'); - return state.documents; -} + if (!hasLineTerminator) { + previousAllowYield = state.allowYield; + state.allowYield = false; + delegate = match('*'); + if (delegate) { + lex(); + argument = parseAssignmentExpression(); + } else { + if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) { + argument = parseAssignmentExpression(); + } + } + state.allowYield = previousAllowYield; + } + + return expr.finishYieldExpression(argument, delegate); + } + // ECMA-262 12.14 Assignment Operators -function loadAll(input, iterator, options) { - var documents = loadDocuments(input, options), index, length; + function parseAssignmentExpression() { + var token, expr, right, list, startToken; - for (index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} + startToken = lookahead; + token = lookahead; + if (!state.allowYield && matchKeyword('yield')) { + return parseYieldExpression(); + } -function load(input, options) { - var documents = loadDocuments(input, options); + expr = parseConditionalExpression(); - if (0 === documents.length) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (1 === documents.length) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} + if (expr.type === PlaceHolders.ArrowParameterPlaceHolder || match('=>')) { + isAssignmentTarget = isBindingElement = false; + list = reinterpretAsCoverFormalsList(expr); + + if (list) { + firstCoverInitializedNameError = null; + return parseArrowFunctionExpression(list, new WrappingNode(startToken)); + } + return expr; + } -function safeLoadAll(input, output, options) { - loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} + if (matchAssign()) { + if (!isAssignmentTarget) { + tolerateError(Messages.InvalidLHSInAssignment); + } + // ECMA-262 12.1.1 + if (strict && expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); + } + if (isStrictModeReservedWord(expr.name)) { + tolerateUnexpectedToken(token, Messages.StrictReservedWord); + } + } -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} + if (!match('=')) { + isAssignmentTarget = isBindingElement = false; + } else { + reinterpretExpressionAsPattern(expr); + } + token = lex(); + right = isolateCoverGrammar(parseAssignmentExpression); + expr = new WrappingNode(startToken).finishAssignmentExpression(token.value, expr, right); + firstCoverInitializedNameError = null; + } -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; + return expr; + } -},{"./common":151,"./exception":153,"./mark":155,"./schema/default_full":158,"./schema/default_safe":159}],155:[function(_dereq_,module,exports){ -'use strict'; + // ECMA-262 12.15 Comma Operator + function parseExpression() { + var expr, startToken = lookahead, expressions; -var common = _dereq_('./common'); + expr = isolateCoverGrammar(parseAssignmentExpression); + if (match(',')) { + expressions = [expr]; -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} + while (startIndex < length) { + if (!match(',')) { + break; + } + lex(); + expressions.push(isolateCoverGrammar(parseAssignmentExpression)); + } + expr = new WrappingNode(startToken).finishSequenceExpression(expressions); + } -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; + return expr; + } - if (!this.buffer) { - return null; - } + // ECMA-262 13.2 Block - indent = indent || 4; - maxLength = maxLength || 75; + function parseStatementListItem() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'export': + if (state.sourceType !== 'module') { + tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration); + } + return parseExportDeclaration(); + case 'import': + if (state.sourceType !== 'module') { + tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration); + } + return parseImportDeclaration(); + case 'const': + return parseLexicalDeclaration({inFor: false}); + case 'function': + return parseFunctionDeclaration(new Node()); + case 'class': + return parseClassDeclaration(); + } + } - head = ''; - start = this.position; + if (matchKeyword('let') && isLexicalDeclaration()) { + return parseLexicalDeclaration({inFor: false}); + } - while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; + return parseStatement(); } - } - tail = ''; - end = this.position; + function parseStatementList() { + var list = []; + while (startIndex < length) { + if (match('}')) { + break; + } + list.push(parseStatementListItem()); + } - while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; + return list; } - } - snippet = this.buffer.slice(start, end); + function parseBlock() { + var block, node = new Node(); - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; + expect('{'); + block = parseStatementList(); -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; + expect('}'); - if (this.name) { - where += 'in "' + this.name + '" '; - } + return node.finishBlockStatement(block); + } - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + // ECMA-262 13.3.2 Variable Statement - if (!compact) { - snippet = this.getSnippet(); + function parseVariableIdentifier(kind) { + var token, node = new Node(); - if (snippet) { - where += ':\n' + snippet; + token = lex(); + + if (token.type === Token.Keyword && token.value === 'yield') { + if (strict) { + tolerateUnexpectedToken(token, Messages.StrictReservedWord); + } if (!state.allowYield) { + throwUnexpectedToken(token); + } + } else if (token.type !== Token.Identifier) { + if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) { + tolerateUnexpectedToken(token, Messages.StrictReservedWord); + } else { + if (strict || token.value !== 'let' || kind !== 'var') { + throwUnexpectedToken(token); + } + } + } else if (state.sourceType === 'module' && token.type === Token.Identifier && token.value === 'await') { + tolerateUnexpectedToken(token); + } + + return node.finishIdentifier(token.value); } - } - return where; -}; + function parseVariableDeclaration(options) { + var init = null, id, node = new Node(), params = []; + id = parsePattern(params, 'var'); -module.exports = Mark; + // ECMA-262 12.2.1 + if (strict && isRestrictedWord(id.name)) { + tolerateError(Messages.StrictVarName); + } -},{"./common":151}],156:[function(_dereq_,module,exports){ -'use strict'; + if (match('=')) { + lex(); + init = isolateCoverGrammar(parseAssignmentExpression); + } else if (id.type !== Syntax.Identifier && !options.inFor) { + expect('='); + } -/*eslint-disable max-len*/ + return node.finishVariableDeclarator(id, init); + } -var common = _dereq_('./common'); -var YAMLException = _dereq_('./exception'); -var Type = _dereq_('./type'); + function parseVariableDeclarationList(options) { + var opt, list; + opt = { inFor: options.inFor }; + list = [parseVariableDeclaration(opt)]; -function compileList(schema, name, result) { - var exclude = []; + while (match(',')) { + lex(); + list.push(parseVariableDeclaration(opt)); + } - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); + return list; + } - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag) { - exclude.push(previousIndex); - } - }); + function parseVariableStatement(node) { + var declarations; - result.push(currentType); - }); + expectKeyword('var'); - return result.filter(function (type, index) { - return -1 === exclude.indexOf(index); - }); -} + declarations = parseVariableDeclarationList({ inFor: false }); + consumeSemicolon(); -function compileMap(/* lists... */) { - var result = {}, index, length; + return node.finishVariableDeclaration(declarations); + } - function collectType(type) { - result[type.tag] = type; - } + // ECMA-262 13.3.1 Let and Const Declarations - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } + function parseLexicalBinding(kind, options) { + var init = null, id, node = new Node(), params = []; - return result; -} + id = parsePattern(params, kind); + // ECMA-262 12.2.1 + if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) { + tolerateError(Messages.StrictVarName); + } -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; + if (kind === 'const') { + if (!matchKeyword('in') && !matchContextualKeyword('of')) { + expect('='); + init = isolateCoverGrammar(parseAssignmentExpression); + } + } else if ((!options.inFor && id.type !== Syntax.Identifier) || match('=')) { + expect('='); + init = isolateCoverGrammar(parseAssignmentExpression); + } - this.implicit.forEach(function (type) { - if (type.loadKind && 'scalar' !== type.loadKind) { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + return node.finishVariableDeclarator(id, init); } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} + function parseBindingList(kind, options) { + var list = [parseLexicalBinding(kind, options)]; -Schema.DEFAULT = null; + while (match(',')) { + lex(); + list.push(parseLexicalBinding(kind, options)); + } + return list; + } -Schema.create = function createSchema() { - var schemas, types; - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; + function tokenizerState() { + return { + index: index, + lineNumber: lineNumber, + lineStart: lineStart, + hasLineTerminator: hasLineTerminator, + lastIndex: lastIndex, + lastLineNumber: lastLineNumber, + lastLineStart: lastLineStart, + startIndex: startIndex, + startLineNumber: startLineNumber, + startLineStart: startLineStart, + lookahead: lookahead, + tokenCount: extra.tokens ? extra.tokens.length : 0 + }; + } - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; + function resetTokenizerState(ts) { + index = ts.index; + lineNumber = ts.lineNumber; + lineStart = ts.lineStart; + hasLineTerminator = ts.hasLineTerminator; + lastIndex = ts.lastIndex; + lastLineNumber = ts.lastLineNumber; + lastLineStart = ts.lastLineStart; + startIndex = ts.startIndex; + startLineNumber = ts.startLineNumber; + startLineStart = ts.startLineStart; + lookahead = ts.lookahead; + if (extra.tokens) { + extra.tokens.splice(ts.tokenCount, extra.tokens.length); + } + } - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } + function isLexicalDeclaration() { + var lexical, ts; - schemas = common.toArray(schemas); - types = common.toArray(types); + ts = tokenizerState(); - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } + lex(); + lexical = (lookahead.type === Token.Identifier) || match('[') || match('{') || + matchKeyword('let') || matchKeyword('yield'); - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } + resetTokenizerState(ts); - return new Schema({ - include: schemas, - explicit: types - }); -}; + return lexical; + } + function parseLexicalDeclaration(options) { + var kind, declarations, node = new Node(); -module.exports = Schema; + kind = lex().value; + assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); -},{"./common":151,"./exception":153,"./type":162}],157:[function(_dereq_,module,exports){ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. + declarations = parseBindingList(kind, options); + consumeSemicolon(); -'use strict'; + return node.finishLexicalDeclaration(declarations, kind); + } + function parseRestElement(params) { + var param, node = new Node(); -var Schema = _dereq_('../schema'); + lex(); + if (match('{')) { + throwError(Messages.ObjectPatternAsRestParameter); + } -module.exports = new Schema({ - include: [ - _dereq_('./json') - ] -}); + params.push(lookahead); -},{"../schema":156,"./json":161}],158:[function(_dereq_,module,exports){ -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. + param = parseVariableIdentifier(); + if (match('=')) { + throwError(Messages.DefaultRestParameter); + } -'use strict'; + if (!match(')')) { + throwError(Messages.ParameterAfterRestParameter); + } + return node.finishRestElement(param); + } -var Schema = _dereq_('../schema'); + // ECMA-262 13.4 Empty Statement + function parseEmptyStatement(node) { + expect(';'); + return node.finishEmptyStatement(); + } -module.exports = Schema.DEFAULT = new Schema({ - include: [ - _dereq_('./default_safe') - ], - explicit: [ - _dereq_('../type/js/undefined'), - _dereq_('../type/js/regexp'), - _dereq_('../type/js/function') - ] -}); + // ECMA-262 12.4 Expression Statement -},{"../schema":156,"../type/js/function":167,"../type/js/regexp":168,"../type/js/undefined":169,"./default_safe":159}],159:[function(_dereq_,module,exports){ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) + function parseExpressionStatement(node) { + var expr = parseExpression(); + consumeSemicolon(); + return node.finishExpressionStatement(expr); + } + // ECMA-262 13.6 If statement -'use strict'; + function parseIfStatement(node) { + var test, consequent, alternate; + expectKeyword('if'); -var Schema = _dereq_('../schema'); + expect('('); + test = parseExpression(); -module.exports = new Schema({ - include: [ - _dereq_('./core') - ], - implicit: [ - _dereq_('../type/timestamp'), - _dereq_('../type/merge') - ], - explicit: [ - _dereq_('../type/binary'), - _dereq_('../type/omap'), - _dereq_('../type/pairs'), - _dereq_('../type/set') - ] -}); + expect(')'); -},{"../schema":156,"../type/binary":163,"../type/merge":171,"../type/omap":173,"../type/pairs":174,"../type/set":176,"../type/timestamp":178,"./core":157}],160:[function(_dereq_,module,exports){ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 + consequent = parseStatement(); + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } -'use strict'; + return node.finishIfStatement(test, consequent, alternate); + } + // ECMA-262 13.7 Iteration Statements -var Schema = _dereq_('../schema'); + function parseDoWhileStatement(node) { + var body, test, oldInIteration; + expectKeyword('do'); -module.exports = new Schema({ - explicit: [ - _dereq_('../type/str'), - _dereq_('../type/seq'), - _dereq_('../type/map') - ] -}); + oldInIteration = state.inIteration; + state.inIteration = true; -},{"../schema":156,"../type/map":170,"../type/seq":175,"../type/str":177}],161:[function(_dereq_,module,exports){ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + body = parseStatement(); + state.inIteration = oldInIteration; -'use strict'; + expectKeyword('while'); + expect('('); -var Schema = _dereq_('../schema'); + test = parseExpression(); + expect(')'); -module.exports = new Schema({ - include: [ - _dereq_('./failsafe') - ], - implicit: [ - _dereq_('../type/null'), - _dereq_('../type/bool'), - _dereq_('../type/int'), - _dereq_('../type/float') - ] -}); + if (match(';')) { + lex(); + } -},{"../schema":156,"../type/bool":164,"../type/float":165,"../type/int":166,"../type/null":172,"./failsafe":160}],162:[function(_dereq_,module,exports){ -'use strict'; + return node.finishDoWhileStatement(body, test); + } -var YAMLException = _dereq_('./exception'); + function parseWhileStatement(node) { + var test, body, oldInIteration; -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; + expectKeyword('while'); -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; + expect('('); -function compileStyleAliases(map) { - var result = {}; + test = parseExpression(); - if (null !== map) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } + expect(')'); - return result; -} + oldInIteration = state.inIteration; + state.inIteration = true; -function Type(tag, options) { - options = options || {}; + body = parseStatement(); - Object.keys(options).forEach(function (name) { - if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + state.inIteration = oldInIteration; + + return node.finishWhileStatement(test, body); } - }); - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + function parseForStatement(node) { + var init, forIn, initSeq, initStartToken, test, update, left, right, kind, declarations, + body, oldInIteration, previousAllowIn = state.allowIn; - if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} + init = test = update = null; + forIn = true; -module.exports = Type; + expectKeyword('for'); -},{"./exception":153}],163:[function(_dereq_,module,exports){ -'use strict'; + expect('('); -/*eslint-disable no-bitwise*/ + if (match(';')) { + lex(); + } else { + if (matchKeyword('var')) { + init = new Node(); + lex(); -// A trick for browserified version. -// Since we make browserifier to ignore `buffer` module, NodeBuffer will be undefined -var NodeBuffer = _dereq_('buffer').Buffer; -var Type = _dereq_('../type'); + state.allowIn = false; + declarations = parseVariableDeclarationList({ inFor: true }); + state.allowIn = previousAllowIn; + if (declarations.length === 1 && matchKeyword('in')) { + init = init.finishVariableDeclaration(declarations); + lex(); + left = init; + right = parseExpression(); + init = null; + } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { + init = init.finishVariableDeclaration(declarations); + lex(); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; + } else { + init = init.finishVariableDeclaration(declarations); + expect(';'); + } + } else if (matchKeyword('const') || matchKeyword('let')) { + init = new Node(); + kind = lex().value; -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + if (!strict && lookahead.value === 'in') { + init = init.finishIdentifier(kind); + lex(); + left = init; + right = parseExpression(); + init = null; + } else { + state.allowIn = false; + declarations = parseBindingList(kind, {inFor: true}); + state.allowIn = previousAllowIn; + if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) { + init = init.finishLexicalDeclaration(declarations, kind); + lex(); + left = init; + right = parseExpression(); + init = null; + } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { + init = init.finishLexicalDeclaration(declarations, kind); + lex(); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; + } else { + consumeSemicolon(); + init = init.finishLexicalDeclaration(declarations, kind); + } + } + } else { + initStartToken = lookahead; + state.allowIn = false; + init = inheritCoverGrammar(parseAssignmentExpression); + state.allowIn = previousAllowIn; -function resolveYamlBinary(data) { - if (null === data) { - return false; - } + if (matchKeyword('in')) { + if (!isAssignmentTarget) { + tolerateError(Messages.InvalidLHSInForIn); + } - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + lex(); + reinterpretExpressionAsPattern(init); + left = init; + right = parseExpression(); + init = null; + } else if (matchContextualKeyword('of')) { + if (!isAssignmentTarget) { + tolerateError(Messages.InvalidLHSInForLoop); + } - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); + lex(); + reinterpretExpressionAsPattern(init); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; + } else { + if (match(',')) { + initSeq = [init]; + while (match(',')) { + lex(); + initSeq.push(isolateCoverGrammar(parseAssignmentExpression)); + } + init = new WrappingNode(initStartToken).finishSequenceExpression(initSeq); + } + expect(';'); + } + } + } - // Skip CR/LF - if (code > 64) { continue; } + if (typeof left === 'undefined') { - // Fail on illegal characters - if (code < 0) { return false; } + if (!match(';')) { + test = parseExpression(); + } + expect(';'); - bitlen += 6; - } + if (!match(')')) { + update = parseExpression(); + } + } - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} + expect(')'); -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; + oldInIteration = state.inIteration; + state.inIteration = true; - // Collect by 6*4 bits (3 bytes) + body = isolateCoverGrammar(parseStatement); - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); + state.inIteration = oldInIteration; + + return (typeof left === 'undefined') ? + node.finishForStatement(init, test, update, body) : + forIn ? node.finishForInStatement(left, right, body) : + node.finishForOfStatement(left, right, body); } - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } + // ECMA-262 13.8 The continue statement - // Dump tail + function parseContinueStatement(node) { + var label = null, key; - tailbits = (max % 4) * 6; + expectKeyword('continue'); - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(startIndex) === 0x3B) { + lex(); - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - return new NodeBuffer(result); - } + if (!state.inIteration) { + throwError(Messages.IllegalContinue); + } - return result; -} + return node.finishContinueStatement(null); + } -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; + if (hasLineTerminator) { + if (!state.inIteration) { + throwError(Messages.IllegalContinue); + } - // Convert every three bytes to 4 ASCII characters. + return node.finishContinueStatement(null); + } - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError(Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError(Messages.IllegalContinue); + } + + return node.finishContinueStatement(label); } - bits = (bits << 8) + object[idx]; - } + // ECMA-262 13.9 The break statement - // Dump tail + function parseBreakStatement(node) { + var label = null, key; - tail = max % 3; + expectKeyword('break'); - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } + // Catch the very common case first: immediately a semicolon (U+003B). + if (source.charCodeAt(lastIndex) === 0x3B) { + lex(); - return result; -} + if (!(state.inIteration || state.inSwitch)) { + throwError(Messages.IllegalBreak); + } -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} + return node.finishBreakStatement(null); + } -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); + if (hasLineTerminator) { + if (!(state.inIteration || state.inSwitch)) { + throwError(Messages.IllegalBreak); + } + } else if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); -},{"../type":162,"buffer":37}],164:[function(_dereq_,module,exports){ -'use strict'; + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError(Messages.UnknownLabel, label.name); + } + } -var Type = _dereq_('../type'); + consumeSemicolon(); -function resolveYamlBoolean(data) { - if (null === data) { - return false; - } + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError(Messages.IllegalBreak); + } - var max = data.length; + return node.finishBreakStatement(label); + } - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} + // ECMA-262 13.10 The return statement -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} + function parseReturnStatement(node) { + var argument = null; -function isBoolean(object) { - return '[object Boolean]' === Object.prototype.toString.call(object); -} + expectKeyword('return'); -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); + if (!state.inFunctionBody) { + tolerateError(Messages.IllegalReturn); + } -},{"../type":162}],165:[function(_dereq_,module,exports){ -'use strict'; + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(lastIndex) === 0x20) { + if (isIdentifierStart(source.charCodeAt(lastIndex + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return node.finishReturnStatement(argument); + } + } -var common = _dereq_('../common'); -var Type = _dereq_('../type'); + if (hasLineTerminator) { + // HACK + return node.finishReturnStatement(null); + } -var YAML_FLOAT_PATTERN = new RegExp( - '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' + - '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' + - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - '|[-+]?\\.(?:inf|Inf|INF)' + - '|\\.(?:nan|NaN|NAN))$'); + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } -function resolveYamlFloat(data) { - if (null === data) { - return false; - } + consumeSemicolon(); - if (!YAML_FLOAT_PATTERN.test(data)) { - return false; - } - return true; -} + return node.finishReturnStatement(argument); + } -function constructYamlFloat(data) { - var value, sign, base, digits; + // ECMA-262 13.11 The with statement - value = data.replace(/_/g, '').toLowerCase(); - sign = '-' === value[0] ? -1 : 1; - digits = []; + function parseWithStatement(node) { + var object, body; - if (0 <= '+-'.indexOf(value[0])) { - value = value.slice(1); - } + if (strict) { + tolerateError(Messages.StrictModeWith); + } - if ('.inf' === value) { - return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + expectKeyword('with'); - } else if ('.nan' === value) { - return NaN; + expect('('); - } else if (0 <= value.indexOf(':')) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); + object = parseExpression(); - value = 0.0; - base = 1; + expect(')'); - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); + body = parseStatement(); - return sign * value; + return node.finishWithStatement(object, body); + } - } - return sign * parseFloat(value, 10); -} + // ECMA-262 13.12 The switch statement + function parseSwitchCase() { + var test, consequent = [], statement, node = new Node(); -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); -function representYamlFloat(object, style) { - var res; + while (startIndex < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + statement = parseStatementListItem(); + consequent.push(statement); + } - if (isNaN(object)) { - switch (style) { - case 'lowercase': - return '.nan'; - case 'uppercase': - return '.NAN'; - case 'camelcase': - return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': - return '.inf'; - case 'uppercase': - return '.INF'; - case 'camelcase': - return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': - return '-.inf'; - case 'uppercase': - return '-.INF'; - case 'camelcase': - return '-.Inf'; + return node.finishSwitchCase(test, consequent); } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - res = object.toString(10); + function parseSwitchStatement(node) { + var discriminant, cases, clause, oldInSwitch, defaultFound; + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return node.finishSwitchStatement(discriminant, cases); + } - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} + while (startIndex < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError(Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } -function isFloat(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 !== object % 1 || common.isNegativeZero(object)); -} + state.inSwitch = oldInSwitch; -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); + expect('}'); -},{"../common":151,"../type":162}],166:[function(_dereq_,module,exports){ -'use strict'; + return node.finishSwitchStatement(discriminant, cases); + } -var common = _dereq_('../common'); -var Type = _dereq_('../type'); + // ECMA-262 13.14 The throw statement -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} + function parseThrowStatement(node) { + var argument; -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} + expectKeyword('throw'); -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} + if (hasLineTerminator) { + throwError(Messages.NewlineAfterThrow); + } -function resolveYamlInteger(data) { - if (null === data) { - return false; - } + argument = parseExpression(); - var max = data.length, - index = 0, - hasDigits = false, - ch; + consumeSemicolon(); - if (!max) { return false; } + return node.finishThrowStatement(argument); + } - ch = data[index]; + // ECMA-262 13.15 The try statement - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } + function parseCatchClause() { + var param, params = [], paramMap = {}, key, i, body, node = new Node(); - if (ch === '0') { - // 0 - if (index + 1 === max) { return true; } - ch = data[++index]; + expectKeyword('catch'); - // base 2, base 8, base 16 + expect('('); + if (match(')')) { + throwUnexpectedToken(lookahead); + } - if (ch === 'b') { - // base 2 - index++; + param = parsePattern(params); + for (i = 0; i < params.length; i++) { + key = '$' + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) { + tolerateError(Messages.DuplicateBinding, params[i].value); + } + paramMap[key] = true; + } - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { continue; } - if (ch !== '0' && ch !== '1') { - return false; + // ECMA-262 12.14.1 + if (strict && isRestrictedWord(param.name)) { + tolerateError(Messages.StrictCatchVariable); } - hasDigits = true; - } - return hasDigits; + + expect(')'); + body = parseBlock(); + return node.finishCatchClause(param, body); } + function parseTryStatement(node) { + var block, handler = null, finalizer = null; - if (ch === 'x') { - // base 16 - index++; + expectKeyword('try'); - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { continue; } - if (!isHexCode(data.charCodeAt(index))) { - return false; + block = parseBlock(); + + if (matchKeyword('catch')) { + handler = parseCatchClause(); } - hasDigits = true; - } - return hasDigits; - } - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { continue; } - if (!isOctCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - return hasDigits; - } + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } - // base 10 (except 0) or base 60 + if (!handler && !finalizer) { + throwError(Messages.NoCatchOrFinally); + } - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { continue; } - if (ch === ':') { break; } - if (!isDecCode(data.charCodeAt(index))) { - return false; + return node.finishTryStatement(block, handler, finalizer); } - hasDigits = true; - } - if (!hasDigits) { return false; } + // ECMA-262 13.16 The debugger statement - // if !base60 - done; - if (ch !== ':') { return true; } + function parseDebuggerStatement(node) { + expectKeyword('debugger'); - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} + consumeSemicolon(); -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; + return node.finishDebuggerStatement(); + } - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } + // 13 Statements - ch = value[0]; + function parseStatement() { + var type = lookahead.type, + expr, + labeledBody, + key, + node; - if (ch === '-' || ch === '+') { - if (ch === '-') { sign = -1; } - value = value.slice(1); - ch = value[0]; - } + if (type === Token.EOF) { + throwUnexpectedToken(lookahead); + } - if ('0' === value) { - return 0; - } + if (type === Token.Punctuator && lookahead.value === '{') { + return parseBlock(); + } + isAssignmentTarget = isBindingElement = true; + node = new Node(); - if (ch === '0') { - if (value[1] === 'b') { - return sign * parseInt(value.slice(2), 2); - } - if (value[1] === 'x') { - return sign * parseInt(value, 16); - } - return sign * parseInt(value, 8); + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return parseEmptyStatement(node); + case '(': + return parseExpressionStatement(node); + default: + break; + } + } else if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return parseBreakStatement(node); + case 'continue': + return parseContinueStatement(node); + case 'debugger': + return parseDebuggerStatement(node); + case 'do': + return parseDoWhileStatement(node); + case 'for': + return parseForStatement(node); + case 'function': + return parseFunctionDeclaration(node); + case 'if': + return parseIfStatement(node); + case 'return': + return parseReturnStatement(node); + case 'switch': + return parseSwitchStatement(node); + case 'throw': + return parseThrowStatement(node); + case 'try': + return parseTryStatement(node); + case 'var': + return parseVariableStatement(node); + case 'while': + return parseWhileStatement(node); + case 'with': + return parseWithStatement(node); + default: + break; + } + } - } + expr = parseExpression(); - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); + // ECMA-262 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); - value = 0; - base = 1; + key = '$' + expr.name; + if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError(Messages.Redeclaration, 'Label', expr.name); + } - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); + state.labelSet[key] = true; + labeledBody = parseStatement(); + delete state.labelSet[key]; + return node.finishLabeledStatement(expr, labeledBody); + } - return sign * value; + consumeSemicolon(); - } + return node.finishExpressionStatement(expr); + } - return sign * parseInt(value, 10); -} + // ECMA-262 14.1 Function Definition -function isInteger(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 === object % 1 && !common.isNegativeZero(object)); -} + function parseFunctionSourceElements() { + var statement, body = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesisCount, + node = new Node(); -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (object) { return '0b' + object.toString(2); }, - octal: function (object) { return '0' + object.toString(8); }, - decimal: function (object) { return object.toString(10); }, - hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); + expect('{'); -},{"../common":151,"../type":162}],167:[function(_dereq_,module,exports){ -'use strict'; + while (startIndex < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; -var esprima; + statement = parseStatementListItem(); + body.push(statement); + if (statement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - esprima = _dereq_('esprima'); -} catch (_) { - /*global window */ - if (typeof window !== 'undefined') { esprima = window.esprima; } -} + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + oldParenthesisCount = state.parenthesizedCount; -var Type = _dereq_('../../type'); + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + state.parenthesizedCount = 0; -function resolveJavascriptFunction(data) { - if (null === data) { - return false; - } + while (startIndex < length) { + if (match('}')) { + break; + } + body.push(parseStatementListItem()); + } - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); + expect('}'); - if ('Program' !== ast.type || - 1 !== ast.body.length || - 'ExpressionStatement' !== ast.body[0].type || - 'FunctionExpression' !== ast.body[0].expression.type) { - return false; + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + state.parenthesizedCount = oldParenthesisCount; + + return node.finishBlockStatement(body); } - return true; - } catch (err) { - return false; - } -} + function validateParam(options, param, name) { + var key = '$' + name; + if (strict) { + if (isRestrictedWord(name)) { + options.stricted = param; + options.message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } + options.paramSet[key] = true; + } -function constructJavascriptFunction(data) { - /*jslint evil:true*/ + function parseParam(options) { + var token, param, params = [], i, def; - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; + token = lookahead; + if (token.value === '...') { + param = parseRestElement(params); + validateParam(options, param.argument, param.argument.name); + options.params.push(param); + options.defaults.push(null); + return false; + } - if ('Program' !== ast.type || - 1 !== ast.body.length || - 'ExpressionStatement' !== ast.body[0].type || - 'FunctionExpression' !== ast.body[0].expression.type) { - throw new Error('Failed to resolve function'); - } + param = parsePatternWithDefault(params); + for (i = 0; i < params.length; i++) { + validateParam(options, params[i], params[i].value); + } - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); + if (param.type === Syntax.AssignmentPattern) { + def = param.right; + param = param.left; + ++options.defaultCount; + } - body = ast.body[0].expression.body.range; + options.params.push(param); + options.defaults.push(def); - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); -} + return !match(')'); + } -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} + function parseParams(firstRestricted) { + var options; -function isFunction(object) { - return '[object Function]' === Object.prototype.toString.call(object); -} + options = { + params: [], + defaultCount: 0, + defaults: [], + firstRestricted: firstRestricted + }; -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); + expect('('); -},{"../../type":162,"esprima":136}],168:[function(_dereq_,module,exports){ -'use strict'; + if (!match(')')) { + options.paramSet = {}; + while (startIndex < length) { + if (!parseParam(options)) { + break; + } + expect(','); + } + } + + expect(')'); + + if (options.defaultCount === 0) { + options.defaults = []; + } + + return { + params: options.params, + defaults: options.defaults, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + } -var Type = _dereq_('../../type'); + function parseFunctionDeclaration(node, identifierIsOptional) { + var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, + isGenerator, previousAllowYield; -function resolveJavascriptRegExp(data) { - if (null === data) { - return false; - } + previousAllowYield = state.allowYield; - if (0 === data.length) { - return false; - } + expectKeyword('function'); - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; + isGenerator = match('*'); + if (isGenerator) { + lex(); + } - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; - } + if (!identifierIsOptional || !match('(')) { + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + tolerateUnexpectedToken(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } - if (modifiers.length > 3) { return false; } - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') { return false; } + state.allowYield = !isGenerator; + tmp = parseParams(firstRestricted); + params = tmp.params; + defaults = tmp.defaults; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - try { - return true; - } catch (error) { - return false; - } -} + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwUnexpectedToken(firstRestricted, message); + } + if (strict && stricted) { + tolerateUnexpectedToken(stricted, message); + } -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; + strict = previousStrict; + state.allowYield = previousAllowYield; - // `/foo/gim` - tail can be maximum 4 chars - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; + return node.finishFunctionDeclaration(id, params, defaults, body, isGenerator); } - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) { - result += 'g'; - } + function parseFunctionExpression() { + var token, id = null, stricted, firstRestricted, message, tmp, + params = [], defaults = [], body, previousStrict, node = new Node(), + isGenerator, previousAllowYield; - if (object.multiline) { - result += 'm'; - } + previousAllowYield = state.allowYield; - if (object.ignoreCase) { - result += 'i'; - } + expectKeyword('function'); - return result; -} + isGenerator = match('*'); + if (isGenerator) { + lex(); + } -function isRegExp(object) { - return '[object RegExp]' === Object.prototype.toString.call(object); -} + state.allowYield = !isGenerator; + if (!match('(')) { + token = lookahead; + id = (!strict && !isGenerator && matchKeyword('yield')) ? parseNonComputedProperty() : parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + tolerateUnexpectedToken(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); + tmp = parseParams(firstRestricted); + params = tmp.params; + defaults = tmp.defaults; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } -},{"../../type":162}],169:[function(_dereq_,module,exports){ -'use strict'; + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwUnexpectedToken(firstRestricted, message); + } + if (strict && stricted) { + tolerateUnexpectedToken(stricted, message); + } + strict = previousStrict; + state.allowYield = previousAllowYield; -var Type = _dereq_('../../type'); + return node.finishFunctionExpression(id, params, defaults, body, isGenerator); + } -function resolveJavascriptUndefined() { - return true; -} + // ECMA-262 14.5 Class Definitions -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} + function parseClassBody() { + var classBody, token, isStatic, hasConstructor = false, body, method, computed, key; -function representJavascriptUndefined() { - return ''; -} + classBody = new Node(); -function isUndefined(object) { - return 'undefined' === typeof object; -} + expect('{'); + body = []; + while (!match('}')) { + if (match(';')) { + lex(); + } else { + method = new Node(); + token = lookahead; + isStatic = false; + computed = match('['); + if (match('*')) { + lex(); + } else { + key = parseObjectPropertyKey(); + if (key.name === 'static' && (lookaheadPropertyName() || match('*'))) { + token = lookahead; + isStatic = true; + computed = match('['); + if (match('*')) { + lex(); + } else { + key = parseObjectPropertyKey(); + } + } + } + method = tryParseMethodDefinition(token, key, computed, method); + if (method) { + method['static'] = isStatic; // jscs:ignore requireDotNotation + if (method.kind === 'init') { + method.kind = 'method'; + } + if (!isStatic) { + if (!method.computed && (method.key.name || method.key.value.toString()) === 'constructor') { + if (method.kind !== 'method' || !method.method || method.value.generator) { + throwUnexpectedToken(token, Messages.ConstructorSpecialMethod); + } + if (hasConstructor) { + throwUnexpectedToken(token, Messages.DuplicateConstructor); + } else { + hasConstructor = true; + } + method.kind = 'constructor'; + } + } else { + if (!method.computed && (method.key.name || method.key.value.toString()) === 'prototype') { + throwUnexpectedToken(token, Messages.StaticPrototype); + } + } + method.type = Syntax.MethodDefinition; + delete method.method; + delete method.shorthand; + body.push(method); + } else { + throwUnexpectedToken(lookahead); + } + } + } + lex(); + return classBody.finishClassBody(body); + } -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); + function parseClassDeclaration(identifierIsOptional) { + var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; + strict = true; -},{"../../type":162}],170:[function(_dereq_,module,exports){ -'use strict'; + expectKeyword('class'); -var Type = _dereq_('../type'); + if (!identifierIsOptional || lookahead.type === Token.Identifier) { + id = parseVariableIdentifier(); + } -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return null !== data ? data : {}; } -}); + if (matchKeyword('extends')) { + lex(); + superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); + } + classBody = parseClassBody(); + strict = previousStrict; -},{"../type":162}],171:[function(_dereq_,module,exports){ -'use strict'; + return classNode.finishClassDeclaration(id, superClass, classBody); + } -var Type = _dereq_('../type'); + function parseClassExpression() { + var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; + strict = true; -function resolveYamlMerge(data) { - return '<<' === data || null === data; -} + expectKeyword('class'); -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); + if (lookahead.type === Token.Identifier) { + id = parseVariableIdentifier(); + } -},{"../type":162}],172:[function(_dereq_,module,exports){ -'use strict'; + if (matchKeyword('extends')) { + lex(); + superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); + } + classBody = parseClassBody(); + strict = previousStrict; -var Type = _dereq_('../type'); + return classNode.finishClassExpression(id, superClass, classBody); + } -function resolveYamlNull(data) { - if (null === data) { - return true; - } + // ECMA-262 15.2 Modules - var max = data.length; + function parseModuleSpecifier() { + var node = new Node(); - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} + if (lookahead.type !== Token.StringLiteral) { + throwError(Messages.InvalidModuleSpecifier); + } + return node.finishLiteral(lex()); + } -function constructYamlNull() { - return null; -} + // ECMA-262 15.2.3 Exports -function isNull(object) { - return null === object; -} + function parseExportSpecifier() { + var exported, local, node = new Node(), def; + if (matchKeyword('default')) { + // export {default} from 'something'; + def = new Node(); + lex(); + local = def.finishIdentifier('default'); + } else { + local = parseVariableIdentifier(); + } + if (matchContextualKeyword('as')) { + lex(); + exported = parseNonComputedProperty(); + } + return node.finishExportSpecifier(local, exported); + } -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); + function parseExportNamedDeclaration(node) { + var declaration = null, + isExportFromIdentifier, + src = null, specifiers = []; -},{"../type":162}],173:[function(_dereq_,module,exports){ -'use strict'; + // non-default export + if (lookahead.type === Token.Keyword) { + // covers: + // export var f = 1; + switch (lookahead.value) { + case 'let': + case 'const': + declaration = parseLexicalDeclaration({inFor: false}); + return node.finishExportNamedDeclaration(declaration, specifiers, null); + case 'var': + case 'class': + case 'function': + declaration = parseStatementListItem(); + return node.finishExportNamedDeclaration(declaration, specifiers, null); + } + } -var Type = _dereq_('../type'); + expect('{'); + while (!match('}')) { + isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); + specifiers.push(parseExportSpecifier()); + if (!match('}')) { + expect(','); + if (match('}')) { + break; + } + } + } + expect('}'); -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; + if (matchContextualKeyword('from')) { + // covering: + // export {default} from 'foo'; + // export {foo} from 'foo'; + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + } else if (isExportFromIdentifier) { + // covering: + // export {default}; // missing fromClause + throwError(lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } else { + // cover + // export {foo}; + consumeSemicolon(); + } + return node.finishExportNamedDeclaration(declaration, specifiers, src); + } -function resolveYamlOmap(data) { - if (null === data) { - return true; - } + function parseExportDefaultDeclaration(node) { + var declaration = null, + expression = null; - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; + // covers: + // export default ... + expectKeyword('default'); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; + if (matchKeyword('function')) { + // covers: + // export default function foo () {} + // export default function () {} + declaration = parseFunctionDeclaration(new Node(), true); + return node.finishExportDefaultDeclaration(declaration); + } + if (matchKeyword('class')) { + declaration = parseClassDeclaration(true); + return node.finishExportDefaultDeclaration(declaration); + } - if ('[object Object]' !== _toString.call(pair)) { - return false; - } + if (matchContextualKeyword('from')) { + throwError(Messages.UnexpectedToken, lookahead.value); + } - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) { - pairHasKey = true; + // covers: + // export default {}; + // export default []; + // export default (1 + 2); + if (match('{')) { + expression = parseObjectInitializer(); + } else if (match('[')) { + expression = parseArrayInitializer(); } else { - return false; + expression = parseAssignmentExpression(); } - } + consumeSemicolon(); + return node.finishExportDefaultDeclaration(expression); } - if (!pairHasKey) { - return false; - } + function parseExportAllDeclaration(node) { + var src; - if (-1 === objectKeys.indexOf(pairKey)) { - objectKeys.push(pairKey); - } else { - return false; + // covers: + // export * from 'foo'; + expect('*'); + if (!matchContextualKeyword('from')) { + throwError(lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + + return node.finishExportAllDeclaration(src); } - } - return true; -} + function parseExportDeclaration() { + var node = new Node(); + if (state.inFunctionBody) { + throwError(Messages.IllegalExportDeclaration); + } -function constructYamlOmap(data) { - return null !== data ? data : []; -} + expectKeyword('export'); -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); + if (matchKeyword('default')) { + return parseExportDefaultDeclaration(node); + } + if (match('*')) { + return parseExportAllDeclaration(node); + } + return parseExportNamedDeclaration(node); + } -},{"../type":162}],174:[function(_dereq_,module,exports){ -'use strict'; + // ECMA-262 15.2.2 Imports -var Type = _dereq_('../type'); + function parseImportSpecifier() { + // import {} ...; + var local, imported, node = new Node(); -var _toString = Object.prototype.toString; + imported = parseNonComputedProperty(); + if (matchContextualKeyword('as')) { + lex(); + local = parseVariableIdentifier(); + } -function resolveYamlPairs(data) { - if (null === data) { - return true; - } + return node.finishImportSpecifier(local, imported); + } - var index, length, pair, keys, result, - object = data; + function parseNamedImports() { + var specifiers = []; + // {foo, bar as bas} + expect('{'); + while (!match('}')) { + specifiers.push(parseImportSpecifier()); + if (!match('}')) { + expect(','); + if (match('}')) { + break; + } + } + } + expect('}'); + return specifiers; + } - result = new Array(object.length); + function parseImportDefaultSpecifier() { + // import ...; + var local, node = new Node(); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; + local = parseNonComputedProperty(); - if ('[object Object]' !== _toString.call(pair)) { - return false; + return node.finishImportDefaultSpecifier(local); } - keys = Object.keys(pair); + function parseImportNamespaceSpecifier() { + // import <* as foo> ...; + var local, node = new Node(); - if (1 !== keys.length) { - return false; - } + expect('*'); + if (!matchContextualKeyword('as')) { + throwError(Messages.NoAsAfterImportNamespace); + } + lex(); + local = parseNonComputedProperty(); - result[index] = [ keys[0], pair[keys[0]] ]; - } + return node.finishImportNamespaceSpecifier(local); + } - return true; -} + function parseImportDeclaration() { + var specifiers = [], src, node = new Node(); -function constructYamlPairs(data) { - if (null === data) { - return []; - } + if (state.inFunctionBody) { + throwError(Messages.IllegalImportDeclaration); + } - var index, length, pair, keys, result, - object = data; + expectKeyword('import'); - result = new Array(object.length); + if (lookahead.type === Token.StringLiteral) { + // import 'foo'; + src = parseModuleSpecifier(); + } else { - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; + if (match('{')) { + // import {bar} + specifiers = specifiers.concat(parseNamedImports()); + } else if (match('*')) { + // import * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (isIdentifierName(lookahead) && !matchKeyword('default')) { + // import foo + specifiers.push(parseImportDefaultSpecifier()); + if (match(',')) { + lex(); + if (match('*')) { + // import foo, * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (match('{')) { + // import foo, {bar} + specifiers = specifiers.concat(parseNamedImports()); + } else { + throwUnexpectedToken(lookahead); + } + } + } else { + throwUnexpectedToken(lex()); + } - keys = Object.keys(pair); + if (!matchContextualKeyword('from')) { + throwError(lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + } - result[index] = [ keys[0], pair[keys[0]] ]; - } + consumeSemicolon(); + return node.finishImportDeclaration(specifiers, src); + } - return result; -} + // ECMA-262 15.1 Scripts -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); + function parseScriptBody() { + var statement, body = [], token, directive, firstRestricted; -},{"../type":162}],175:[function(_dereq_,module,exports){ -'use strict'; + while (startIndex < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } -var Type = _dereq_('../type'); + statement = parseStatementListItem(); + body.push(statement); + if (statement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return null !== data ? data : []; } -}); + while (startIndex < length) { + statement = parseStatementListItem(); + /* istanbul ignore if */ + if (typeof statement === 'undefined') { + break; + } + body.push(statement); + } + return body; + } -},{"../type":162}],176:[function(_dereq_,module,exports){ -'use strict'; + function parseProgram() { + var body, node; -var Type = _dereq_('../type'); + peek(); + node = new Node(); -var _hasOwnProperty = Object.prototype.hasOwnProperty; + body = parseScriptBody(); + return node.finishProgram(body, state.sourceType); + } -function resolveYamlSet(data) { - if (null === data) { - return true; - } + function filterTokenLocation() { + var i, entry, token, tokens = []; - var key, object = data; + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (entry.regex) { + token.regex = { + pattern: entry.regex.pattern, + flags: entry.regex.flags + }; + } + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (null !== object[key]) { - return false; - } + extra.tokens = tokens; } - } - - return true; -} -function constructYamlSet(data) { - return null !== data ? data : {}; -} + function tokenize(code, options, delegate) { + var toString, + tokens; -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } -},{"../type":162}],177:[function(_dereq_,module,exports){ -'use strict'; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + startIndex = index; + startLineNumber = lineNumber; + startLineStart = lineStart; + length = source.length; + lookahead = null; + state = { + allowIn: true, + allowYield: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1, + curlyStack: [] + }; -var Type = _dereq_('../type'); + extra = {}; -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return null !== data ? data : ''; } -}); + // Options matching. + options = options || {}; -},{"../type":162}],178:[function(_dereq_,module,exports){ -'use strict'; + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenValues = []; + extra.tokenize = true; + extra.delegate = delegate; -var Type = _dereq_('../type'); + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; -function resolveYamlTimestamp(data) { - if (null === data) { - return false; - } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } - if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { - return false; - } + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } - return true; -} + lex(); + while (lookahead.type !== Token.EOF) { + try { + lex(); + } catch (lexError) { + if (extra.errors) { + recordError(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; + tokens = extra.tokens; + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } + return tokens; + } - match = YAML_TIMESTAMP_REGEXP.exec(data); + function parse(code, options) { + var program, toString; - if (null === match) { - throw new Error('Date resolve error'); - } + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } - // match: [1] year [2] month [3] day + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + startIndex = index; + startLineNumber = lineNumber; + startLineStart = lineStart; + length = source.length; + lookahead = null; + state = { + allowIn: true, + allowYield: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1, + curlyStack: [], + sourceType: 'script' + }; + strict = false; - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } + if (extra.loc && options.source !== null && options.source !== undefined) { + extra.source = toString(options.source); + } - // match: [4] hour [5] minute [6] second [7] fraction + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + if (extra.attachComment) { + extra.range = true; + extra.comments = []; + extra.bottomRightStack = []; + extra.trailingComments = []; + extra.leadingComments = []; + } + if (options.sourceType === 'module') { + // very restrictive condition for now + state.sourceType = options.sourceType; + strict = true; + } + } - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; + return program; } - fraction = +fraction; - } - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + // Sync with *.json manifests. + exports.version = '2.7.1'; - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if ('-' === match[9]) { - delta = -delta; - } - } + exports.tokenize = tokenize; - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + exports.parse = parse; - if (delta) { - date.setTime(date.getTime() - delta); - } + // Deep copy. + /* istanbul ignore next */ + exports.Syntax = (function () { + var name, types = {}; - return date; -} + if (typeof Object.create === 'function') { + types = Object.create(null); + } -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } -},{"../type":162}],179:[function(_dereq_,module,exports){ + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ + +},{}],179:[function(_dereq_,module,exports){ /* * loglevel - https://github.com/pimterry/loglevel * @@ -22136,7 +22131,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":145}],182:[function(_dereq_,module,exports){ +},{"ieee754":144}],182:[function(_dereq_,module,exports){ (function (global){ 'use strict'; @@ -22789,34 +22784,41 @@ process.chdir = function (dir) { /*! * strip-comments * - * Copyright (c) 2014-2015 Jon Schlinkert. + * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ -'use strict'; +'use stric'; -var reBlock = /\/\*(?!\/)(.|[\r\n]|\n)+?\*\/\n?\n?/gm; -var reBlockIgnore = /\/\*(?!(\*?\/|\*?\!))(.|[\r\n]|\n)+?\*\/\n?\n?/gm; +var reBlock = '\\/\\*'; +var reBlockIgnore = '\\/\\*(?!\\*?\\!)'; +var reBlockEnd = '(.|[\\r\\n]|\\n)*?\\*\\/\\n?\\n?'; var reLine = /(^|[^\S\n])(?:\/\/)([\s\S]+?)$/gm; var reLineIgnore = /(^|[^\S\n])(?:\/\/[^!])([\s\S]+?)$/gm; + /** * Strip all comments * + * {%= docs("strip") %} + * * @param {String} `str` file contents or string to strip. * @param {Object} `opts` options are passed to `.block`, and `.line` * @return {String} String without comments. * @api public */ -function strip(str, opts) { +var strip = module.exports = function(str, opts) { return str ? strip.block(strip.line(str, opts), opts) : ''; -} +}; + /** * Strip only block comments, optionally leaving protected comments * (e.g. `/*!`) intact. * + * {%= docs("block") %} + * * @param {String} `str` file content or string to strip to * @param {Object} `opts` if `safe:true`, strip only comments that do not start with `/*!` or `/**!` * @return {String} String without block comments. @@ -22825,9 +22827,9 @@ function strip(str, opts) { strip.block = function(str, opts) { opts = opts || {}; - var re = reBlock; //new RegExp(reBlock + reBlockEnd, 'gm'); + var re = new RegExp(reBlock + reBlockEnd, 'gm'); if(opts.safe) { - re = reBlockIgnore; //new RegExp(reBlockIgnore + reBlockEnd, 'gm'); + re = new RegExp(reBlockIgnore + reBlockEnd, 'gm'); } return str ? str.replace(re, '') : ''; }; @@ -22836,6 +22838,8 @@ strip.block = function(str, opts) { /** * Strip only line comments * + * {%= docs("line") %} + * * @param {String} `str` file content or string to strip to * @param {Object} `opts` if `safe:true`, strip all that not starts with `//!` * @return {String} String without line comments. @@ -22851,11 +22855,6 @@ strip.line = function(str, opts) { return str ? str.replace(re, '') : ''; }; -/** - * Expose `strip` - */ - -module.exports = strip; },{}],186:[function(_dereq_,module,exports){ !function() { var topojson = { @@ -24214,7 +24213,7 @@ var FlatCamera = (function (_IsometricCamera) { module.exports = exports['default']; -},{"./geo":193,"./gl/shader_program":199,"./utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":143}],193:[function(_dereq_,module,exports){ +},{"./geo":193,"./gl/shader_program":199,"./utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":142}],193:[function(_dereq_,module,exports){ // Miscellaneous geo functions 'use strict'; @@ -25235,11 +25234,17 @@ var ShaderProgram = (function () { // This is done *after* code injection so that we can add defines for which code points were injected var info = this.name ? this.name + ' / id ' + this.id : 'id ' + this.id; var header = '// Program: ' + info + '\n'; - var precision = '#ifdef GL_ES\nprecision highp float;\n#endif\n\n'; + var precision = ''; + var high = this.gl.getShaderPrecisionFormat(this.gl.FRAGMENT_SHADER, this.gl.HIGH_FLOAT); + if (high && high.precision > 0) { + precision = 'precision highp float;\n'; + } else { + precision = 'precision mediump float;\n'; + } defines['TANGRAM_VERTEX_SHADER'] = true; defines['TANGRAM_FRAGMENT_SHADER'] = false; - this.computed_vertex_source = header + ShaderProgram.buildDefineString(defines) + this.computed_vertex_source; + this.computed_vertex_source = header + precision + ShaderProgram.buildDefineString(defines) + this.computed_vertex_source; // Precision qualifier only valid in fragment shader // NB: '#extension' statements added to fragment shader only, as IE11 throws error when they appear in @@ -25875,7 +25880,7 @@ ShaderProgram.createShader = function (gl, source, stype) { }; module.exports = exports['default']; -},{"./extensions":196,"./glsl":197,"./texture":201,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25,"gl-shader-errors":144,"loglevel":179,"strip-comments":185}],200:[function(_dereq_,module,exports){ +},{"./extensions":196,"./glsl":197,"./texture":201,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25,"gl-shader-errors":143,"loglevel":179,"strip-comments":185}],200:[function(_dereq_,module,exports){ // Generated from GLSL files, don't edit! "use strict"; @@ -28768,7 +28773,7 @@ _loglevel2['default'].methodFactory = function (methodName, logLevel) { }; }; -},{"../src/scene_worker":217,"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/texture":201,"./gl/vertex_data":204,"./labels/collision":206,"./leaflet_layer":211,"./light":212,"./material":213,"./selection":218,"./sources/data_source":219,"./sources/geojson":220,"./sources/mvt":221,"./sources/topojson":222,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile_manager":236,"./utils/utils":241,"./utils/version":242,"./utils/worker_broker":243,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":143,"js-yaml":149,"loglevel":179}],215:[function(_dereq_,module,exports){ +},{"../src/scene_worker":217,"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/texture":201,"./gl/vertex_data":204,"./labels/collision":206,"./leaflet_layer":211,"./light":212,"./material":213,"./selection":218,"./sources/data_source":219,"./sources/geojson":220,"./sources/mvt":221,"./sources/topojson":222,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile_manager":236,"./utils/utils":241,"./utils/version":242,"./utils/worker_broker":243,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":142,"js-yaml":148,"loglevel":179}],215:[function(_dereq_,module,exports){ 'use strict'; var _createClass = _dereq_('babel-runtime/helpers/create-class')['default']; @@ -30546,7 +30551,7 @@ Scene.create = function (config) { }; module.exports = exports['default']; -},{"./camera":192,"./geo":193,"./gl/context":195,"./gl/render_state":198,"./gl/texture":201,"./gl/vao":202,"./light":212,"./scene_loader":216,"./selection":218,"./sources/data_source":219,"./styles/lines/lines":224,"./styles/points/points":226,"./styles/polygons/polygons":227,"./styles/style":229,"./styles/style_manager":230,"./styles/style_parser":231,"./styles/text/text":233,"./tile_manager":236,"./utils/subscribe":240,"./utils/utils":241,"./utils/worker_broker":243,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24,"babel-runtime/helpers/to-consumable-array":25,"gl-matrix":143,"loglevel":179}],216:[function(_dereq_,module,exports){ +},{"./camera":192,"./geo":193,"./gl/context":195,"./gl/render_state":198,"./gl/texture":201,"./gl/vao":202,"./light":212,"./scene_loader":216,"./selection":218,"./sources/data_source":219,"./styles/lines/lines":224,"./styles/points/points":226,"./styles/polygons/polygons":227,"./styles/style":229,"./styles/style_manager":230,"./styles/style_parser":231,"./styles/text/text":233,"./tile_manager":236,"./utils/subscribe":240,"./utils/utils":241,"./utils/worker_broker":243,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24,"babel-runtime/helpers/to-consumable-array":25,"gl-matrix":142,"loglevel":179}],216:[function(_dereq_,module,exports){ 'use strict'; var _slicedToArray = _dereq_('babel-runtime/helpers/sliced-to-array')['default']; @@ -31525,7 +31530,7 @@ var DataSource = (function () { this.name = source.name; this.url = source.url; this.pad_scale = source.pad_scale || 0.0005; // scale tile up by small factor to cover seams - this.enforce_winding = source.enforce_winding || false; // whether to enforce winding order + this.default_winding = null; // Optional function to transform source data this.transform = source.transform; @@ -31582,13 +31587,13 @@ var DataSource = (function () { } }); - // Optionally enforce winding order since not all data sources guarantee it - if (_this.enforce_winding) { - _geo2['default'].enforceWinding(feature.geometry, 'CCW'); - } + // Use first encountered polygon winding order as default for data source + _this.updateDefaultWinding(feature.geometry); }); } } + + dest.default_winding = _this.default_winding || 'CCW'; }); } @@ -31599,6 +31604,20 @@ var DataSource = (function () { throw new _utilsErrors.MethodNotImplemented('_load'); } + // Infer winding for data source from first ring of provided geometry + }, { + key: 'updateDefaultWinding', + value: function updateDefaultWinding(geom) { + if (this.default_winding == null) { + if (geom.type === 'Polygon') { + this.default_winding = _geo2['default'].ringWinding(geom.coordinates[0]); + } else if (geom.type === 'MultiPolygon') { + this.default_winding = _geo2['default'].ringWinding(geom.coordinates[0][0]); + } + } + return this.default_winding; + } + // Register a new data source type, under a type name }], [{ key: 'create', @@ -31847,7 +31866,6 @@ var GeoJSONSource = (function (_NetworkSource) { this.tile_indexes = {}; // geojson-vt tile indices, by layer name this.max_zoom = Math.max(this.max_zoom || 0, 15); // TODO: max zoom < 15 causes artifacts/no-draw at 20, investigate this.pad_scale = 0; // we don't want padding on auto-tiled sources - this.enforce_winding = source.enforce_winding === false ? false : true; // default on, can be forced off } /** @@ -32041,7 +32059,7 @@ exports.GeoJSONTileSource = GeoJSONTileSource; _data_source2['default'].register(GeoJSONTileSource, 'GeoJSON'); // prefered shorter name _data_source2['default'].register(GeoJSONTileSource, 'GeoJSONTiles'); // for backwards-compatibility -},{"../geo":193,"./data_source":219,"./mvt":221,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"geojson-vt":139}],221:[function(_dereq_,module,exports){ +},{"../geo":193,"./data_source":219,"./mvt":221,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"geojson-vt":138}],221:[function(_dereq_,module,exports){ 'use strict'; var _get = _dereq_('babel-runtime/helpers/get')['default']; @@ -32153,13 +32171,14 @@ var MVTSource = (function (_NetworkTileSource) { } // Decode multipolygons, which are encoded as a single set of rings - // Outer rings are wound CW, inner are CCW - // A CW ring indicates the start of a new polygon + // Winding order of first ring is assumed to indicate exterior ring, + // the opposite winding order indicates the start of a new polygon. }], [{ key: 'decodeMultiPolygon', value: function decodeMultiPolygon(geom) { var polys = []; var poly = []; + var outer_winding = undefined; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; @@ -32169,7 +32188,9 @@ var MVTSource = (function (_NetworkTileSource) { var ring = _step.value; var winding = _geo2['default'].ringWinding(ring); - if (winding === 'CW' && poly.length > 0) { + outer_winding = outer_winding || winding; // assume first ring indicates outer ring winding + + if (winding === outer_winding && poly.length > 0) { polys.push(poly); poly = []; } @@ -32436,6 +32457,7 @@ Builders.buildExtrudedPolygons = function (polygons, z, height, min_height, vert var texcoord_index = _ref3.texcoord_index; var texcoord_scale = _ref3.texcoord_scale; var texcoord_normalize = _ref3.texcoord_normalize; + var winding = _ref3.winding; // Top var min_z = z + (min_height || 0); @@ -32468,19 +32490,31 @@ Builders.buildExtrudedPolygons = function (polygons, z, height, min_height, vert var contour = polygon[q]; for (var w = 0; w < contour.length - 1; w++) { - if (remove_tile_edges && Builders.isOnTileEdge(contour[w], contour[w + 1], tile_edge_tolerance)) { + if (remove_tile_edges && Builders.outsideTile(contour[w], contour[w + 1], tile_edge_tolerance)) { continue; // don't extrude tile edges } + // Wall order is dependent on winding order, so that normals face outward + var w0 = undefined, + w1 = undefined; + if (winding === 'CCW') { + w0 = w; + w1 = w + 1; + } else { + w0 = w + 1; + w1 = w; + } + // Two triangles for the quad formed by each vertex pair, going from bottom to top height var wall_vertices = [ // Triangle - [contour[w + 1][0], contour[w + 1][1], max_z], [contour[w + 1][0], contour[w + 1][1], min_z], [contour[w][0], contour[w][1], min_z], + [contour[w1][0], contour[w1][1], max_z], [contour[w1][0], contour[w1][1], min_z], [contour[w0][0], contour[w0][1], min_z], // Triangle - [contour[w][0], contour[w][1], min_z], [contour[w][0], contour[w][1], max_z], [contour[w + 1][0], contour[w + 1][1], max_z]]; + [contour[w0][0], contour[w0][1], min_z], [contour[w0][0], contour[w0][1], max_z], [contour[w1][0], contour[w1][1], max_z]]; // Calc the normal of the wall from up vector and one segment of the wall triangles - var normal = _vector2['default'].cross([0, 0, 1], _vector2['default'].normalize([contour[w + 1][0] - contour[w][0], contour[w + 1][1] - contour[w][1], 0])); + var wall_vec = _vector2['default'].normalize([contour[w1][0] - contour[w0][0], contour[w1][1] - contour[w0][1], 0]); + var normal = _vector2['default'].cross([0, 0, 1], wall_vec); // Update vertex template with current surface normal vertex_template[normal_index + 0] = normal[0] * normal_normalize; @@ -32612,7 +32646,7 @@ Builders.buildPolylines = function (lines, width, vertex_data, vertex_template, var needToClose = true; if (remove_tile_edges) { - if (Builders.isOnTileEdge(line[i], line[lineSize - 2], tile_edge_tolerance)) { + if (Builders.outsideTile(line[i], line[lineSize - 2], tile_edge_tolerance)) { needToClose = false; } } @@ -32640,7 +32674,7 @@ Builders.buildPolylines = function (lines, width, vertex_data, vertex_template, normNext = _vector2['default'].normalize(_vector2['default'].perp(coordCurr, coordNext)); if (remove_tile_edges) { - if (Builders.isOnTileEdge(coordCurr, coordNext, tile_edge_tolerance)) { + if (Builders.outsideTile(coordCurr, coordNext, tile_edge_tolerance)) { normCurr = _vector2['default'].normalize(_vector2['default'].perp(coordPrev, coordCurr)); if (isPrev) { addVertexPair(coordCurr, normCurr, i / lineSize, constants); @@ -33033,36 +33067,18 @@ Builders.triangulatePolygon = function (contours) { return (0, _earcut2['default'])(contours); }; -// Tests if a line segment (from point A to B) is nearly coincident with the edge of a tile -// Note: mod operation filters out *any* tile edge, not just the edges of the "local" tile, -// this is useful for cases where geometry is clipped to some other tile multiple, e.g. 3-tile bbox -Builders.isOnTileEdge = function (pa, pb, tolerance) { - var tolerance_function = Builders.valuesWithinTolerance; +// Tests if a line segment (from point A to B) is outside the tile bounds +// (within a certain tolerance to account for geometry nearly on tile edges) +Builders.outsideTile = function (_a, _b, tolerance) { var tile_min = Builders.tile_bounds[0]; var tile_max = Builders.tile_bounds[1]; - // Left - if (tolerance_function(pa[0] % _geo2['default'].tile_scale, tile_min.x, tolerance) && tolerance_function(pb[0] % _geo2['default'].tile_scale, tile_min.x, tolerance)) { + // TODO: fix flipped Y coords here, confusing with 'max' reference + if (_a[0] <= tile_min.x + tolerance && _b[0] <= tile_min.x + tolerance || _a[0] >= tile_max.x - tolerance && _b[0] >= tile_max.x - tolerance || _a[1] >= tile_min.y - tolerance && _b[1] >= tile_min.y - tolerance || _a[1] <= tile_max.y + tolerance && _b[1] <= tile_max.y + tolerance) { return true; } - // Right - else if (tolerance_function(pa[0] % _geo2['default'].tile_scale, tile_max.x, tolerance) && tolerance_function(pb[0] % _geo2['default'].tile_scale, tile_max.x, tolerance)) { - return true; - } - // Top - else if (tolerance_function(pa[1] % _geo2['default'].tile_scale, tile_min.y, tolerance) && tolerance_function(pb[1] % _geo2['default'].tile_scale, tile_min.y, tolerance)) { - return true; - } - // Bottom - else if (tolerance_function(pa[1] % _geo2['default'].tile_scale, tile_max.y, tolerance) && tolerance_function(pb[1] % _geo2['default'].tile_scale, tile_max.y, tolerance)) { - return true; - } - return false; -}; -Builders.valuesWithinTolerance = function (a, b, tolerance) { - tolerance = tolerance || 1; - return Math.abs(a - b) < tolerance; + return false; }; module.exports = exports['default']; @@ -33143,6 +33159,12 @@ _Object$assign(Lines, { } this.vertex_layout = new _glVertex_layout2['default'](attribs); + + // Additional single-allocated object used for holding outline style as it is processed + // Separate from this.feature_style so that outline properties do not overwrite calculated + // inline properties (outline call is made *within* the inline call) + this.outline_feature_style = {}; + this.inline_feature_style = this.feature_style; // save reference to main computed style object }, // Calculate width at zoom given in `context` @@ -33317,9 +33339,18 @@ _Object$assign(Lines, { }, buildLines: function buildLines(lines, style, vertex_data, context, options) { - var vertex_template = this.makeVertexTemplate(style); + // Outline (build first so that blended geometry without a depth test is drawn first/under the inner line) + this.feature_style = this.outline_feature_style; // swap in outline-specific style holder + if (style.outline && style.outline.color != null && style.outline.width.value != null) { + var outline_style = _style_manager.StyleManager.styles[style.outline.style]; + if (outline_style) { + outline_style.addFeature(context.feature, style.outline, context); + } + } // Main line + this.feature_style = this.inline_feature_style; // restore calculated style for inline + var vertex_template = this.makeVertexTemplate(style); _builders2['default'].buildPolylines(lines, style.width, vertex_data, vertex_template, { cap: style.cap, join: style.join, @@ -33333,14 +33364,6 @@ _Object$assign(Lines, { remove_tile_edges: !style.tile_edges && options && options.remove_tile_edges, tile_edge_tolerance: _geo2['default'].tile_scale * context.tile.pad_scale * 4 }); - - // Outline - if (style.outline && style.outline.color != null && style.outline.width.value != null) { - var outline_style = _style_manager.StyleManager.styles[style.outline.style]; - if (outline_style) { - outline_style.addFeature(context.feature, style.outline, context); - } - } }, buildPolygons: function buildPolygons(polygons, style, vertex_data, context) { @@ -34008,7 +34031,8 @@ _Object$assign(Polygons, { texcoord_scale: this.texcoord_scale, texcoord_normalize: 65535, // scale UVs to unsigned shorts remove_tile_edges: !style.tile_edges, - tile_edge_tolerance: _geo2['default'].tile_scale * context.tile.pad_scale * 4 + tile_edge_tolerance: _geo2['default'].tile_scale * context.tile.pad_scale * 4, + winding: context.winding }; // Extruded polygons (e.g. 3D buildings) @@ -37551,6 +37575,7 @@ var Tile = (function () { } var context = _stylesStyle_parser.StyleParser.getFeatureParseContext(feature, tile); + context.winding = tile.default_winding; context.layer = source_layer.layer; // add data source layer name // Get draw groups for this feature @@ -39211,7 +39236,7 @@ Utils.debounce = function (func, wait, immediate) { }; module.exports = exports['default']; -},{"../geo":193,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/math/log2":5,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/regenerator":26,"js-yaml":149,"loglevel":179}],242:[function(_dereq_,module,exports){ +},{"../geo":193,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/math/log2":5,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/regenerator":26,"js-yaml":148,"loglevel":179}],242:[function(_dereq_,module,exports){ "use strict"; var _Object$defineProperties = _dereq_("babel-runtime/core-js/object/define-properties")["default"]; @@ -39223,7 +39248,7 @@ var version; exports["default"] = version = _Object$defineProperties({ major: 0, minor: 5, - patch: 0, + patch: 1, pre: false }, { string: { @@ -39942,4 +39967,4 @@ Vector.lineIntersection = function (p1, p2, p3, p4, parallel_tolerance) { module.exports = exports['default']; },{"babel-runtime/helpers/sliced-to-array":24}]},{},[214]) -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2FycmF5L2Zyb20uanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2dldC1pdGVyYXRvci5qcyIsIm5vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvaXMtaXRlcmFibGUuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL21hcC5qcyIsIm5vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvbWF0aC9sb2cyLmpzIiwibm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvYXNzaWduLmpzIiwibm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvY3JlYXRlLmpzIiwibm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnRpZXMuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9mcmVlemUuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL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CJdO1xuICAgICAgICAgICAgaWYgKHJldHVybk1ldGhvZCkge1xuICAgICAgICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2gocmV0dXJuTWV0aG9kLCBkZWxlZ2F0ZS5pdGVyYXRvciwgYXJnKTtcbiAgICAgICAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgcmV0dXJuIG1ldGhvZCB0aHJldyBhbiBleGNlcHRpb24sIGxldCB0aGF0XG4gICAgICAgICAgICAgICAgLy8gZXhjZXB0aW9uIHByZXZhaWwgb3ZlciB0aGUgb3JpZ2luYWwgcmV0dXJuIG9yIHRocm93LlxuICAgICAgICAgICAgICAgIG1ldGhvZCA9IFwidGhyb3dcIjtcbiAgICAgICAgICAgICAgICBhcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChtZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICAgICAgLy8gQ29udGludWUgd2l0aCB0aGUgb3V0ZXIgcmV0dXJuLCBub3cgdGhhdCB0aGUgZGVsZWdhdGVcbiAgICAgICAgICAgICAgLy8gaXRlcmF0b3IgaGFzIGJlZW4gdGVybWluYXRlZC5cbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGRlbGVnYXRlLml0ZXJhdG9yW21ldGhvZF0sIGRlbGVnYXRlLml0ZXJhdG9yLCBhcmcpO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIGNvbnRleHQuZGVsZWdhdGUgPSBudWxsO1xuXG4gICAgICAgICAgICAvLyBMaWtlIHJldHVybmluZyBnZW5lcmF0b3IudGhyb3codW5jYXVnaHQpLCBidXQgd2l0aG91dCB0aGVcbiAgICAgICAgICAgIC8vIG92ZXJoZWFkIG9mIGFuIGV4dHJhIGZ1bmN0aW9uIGNhbGwuXG4gICAgICAgICAgICBtZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgICAgICBhcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gRGVsZWdhdGUgZ2VuZXJhdG9yIHJhbiBhbmQgaGFuZGxlZCBpdHMgb3duIGV4Y2VwdGlvbnMgc29cbiAgICAgICAgICAvLyByZWdhcmRsZXNzIG9mIHdoYXQgdGhlIG1ldGhvZCB3YXMsIHdlIGNvbnRpbnVlIGFzIGlmIGl0IGlzXG4gICAgICAgICAgLy8gXCJuZXh0XCIgd2l0aCBhbiB1bmRlZmluZWQgYXJnLlxuICAgICAgICAgIG1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICAgIGFyZyA9IHVuZGVmaW5lZDtcblxuICAgICAgICAgIHZhciBpbmZvID0gcmVjb3JkLmFyZztcbiAgICAgICAgICBpZiAoaW5mby5kb25lKSB7XG4gICAgICAgICAgICBjb250ZXh0W2RlbGVnYXRlLnJlc3VsdE5hbWVdID0gaW5mby52YWx1ZTtcbiAgICAgICAgICAgIGNvbnRleHQubmV4dCA9IGRlbGVnYXRlLm5leHRMb2M7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcbiAgICAgICAgICAgIHJldHVybiBpbmZvO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGVsZWdhdGUgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1ldGhvZCA9PT0gXCJuZXh0XCIpIHtcbiAgICAgICAgICBpZiAoc3RhdGUgPT09IEdlblN0YXRlU3VzcGVuZGVkWWllbGQpIHtcbiAgICAgICAgICAgIGNvbnRleHQuc2VudCA9IGFyZztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29udGV4dC5zZW50ID0gdW5kZWZpbmVkO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChtZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihhcmcpKSB7XG4gICAgICAgICAgICAvLyBJZiB0aGUgZGlzcGF0Y2hlZCBleGNlcHRpb24gd2FzIGNhdWdodCBieSBhIGNhdGNoIGJsb2NrLFxuICAgICAgICAgICAgLy8gdGhlbiBsZXQgdGhhdCBjYXRjaCBibG9jayBoYW5kbGUgdGhlIGV4Y2VwdGlvbiBub3JtYWxseS5cbiAgICAgICAgICAgIG1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICAgICAgYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChtZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBhcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSB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uICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW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ybWFsXCIgJiYgYWZ0ZXJMb2MpIHtcbiAgICAgICAgdGhpcy5uZXh0ID0gYWZ0ZXJMb2M7XG4gICAgICB9XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24gZmluaXNoKGZpbmFsbHlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkuZmluYWxseUxvYyA9PT0gZmluYWxseUxvYykge1xuICAgICAgICAgIHRoaXMuY29tcGxldGUoZW50cnkuY29tcGxldGlvbiwgZW50cnkuYWZ0ZXJMb2MpO1xuICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIFwiY2F0Y2hcIjogZnVuY3Rpb24gX2NhdGNoKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhyb3duO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIFRoZSBjb250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9uIGdlbmVyYXRlQnJ1dGVGb3JjZShyZWRNYWpvciwgZmxpcCwgZnVsbCkge1xuICB2YXIgZnVuY05hbWUgPSAnYnJ1dGVGb3JjZScgKyBcbiAgICAocmVkTWFqb3IgPyAnUmVkJyA6ICdCbHVlJykgKyBcbiAgICAoZmxpcCA/ICdGbGlwJyA6ICcnKSArXG4gICAgKGZ1bGwgPyAnRnVsbCcgOiAnJylcblxuICB2YXIgY29kZSA9IFsnZnVuY3Rpb24gJywgZnVuY05hbWUsICcoJywgQVJHUy5qb2luKCksICcpeycsXG4gICAgJ3ZhciAnLCBFTEVNX1NJWkUsICc9MionLCBESU1FTlNJT04sICc7J11cblxuICB2YXIgcmVkTG9vcCA9IFxuICAgICdmb3IodmFyIGk9JyArIFJFRF9TVEFSVCArICcsJyArIFJFRF9QVFIgKyAnPScgKyBFTEVNX1NJWkUgKyAnKicgKyBSRURfU1RBUlQgKyAnOycgK1xuICAgICAgICAnaTwnICsgUkVEX0VORCArJzsnICtcbiAgICAgICAgJysraSwnICsgUkVEX1BUUiArICcrPScgKyBFTEVNX1NJWkUgKyAnKXsnICtcbiAgICAgICAgJ3ZhciB4MD0nICsgUkVEX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIFJFRF9QVFIgKyAnXSwnICtcbiAgICAgICAgICAgICd4MT0nICsgUkVEX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIFJFRF9QVFIgKyAnKycgKyBESU1FTlNJT04gKyAnXSwnICtcbiAgICAgICAgICAgICd4aT0nICsgUkVEX0lOREVYICsgJ1tpXTsnXG5cbiAgdmFyIGJsdWVMb29wID0gXG4gICAgJ2Zvcih2YXIgaj0nICsgQkxVRV9TVEFSVCArICcsJyArIEJMVUVfUFRSICsgJz0nICsgRUxFTV9TSVpFICsgJyonICsgQkxVRV9TVEFSVCArICc7JyArXG4gICAgICAgICdqPCcgKyBCTFVFX0VORCArICc7JyArXG4gICAgICAgICcrK2osJyArIEJMVUVfUFRSICsgJys9JyArIEVMRU1fU0laRSArICcpeycgK1xuICAgICAgICAndmFyIHkwPScgKyBCTFVFX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIEJMVUVfUFRSICsgJ10sJyArXG4gICAgICAgICAgICAoZnVsbCA/ICd5MT0nICsgQkxVRV9CT1hFUyArICdbJyArIEFYSVMgKyAnKycgKyBCTFVFX1BUUiArICcrJyArIERJTUVOU0lPTiArICddLCcgOiAnJykgK1xuICAgICAgICAgICAgJ3lpPScgKyBCTFVFX0lOREVYICsgJ1tqXTsnXG5cbiAgaWYocmVkTWFqb3IpIHtcbiAgICBjb2RlLnB1c2gocmVkTG9vcCwgSU5ORVJfTEFCRUwsICc6JywgYmx1ZUxvb3ApXG4gIH0gZWxzZSB7XG4gICAgY29kZS5wdXNoKGJsdWVMb29wLCBJTk5FUl9MQUJFTCwgJzonLCByZWRMb29wKVxuICB9XG5cbiAgaWYoZnVsbCkge1xuICAgIGNvZGUucHVzaCgnaWYoeTE8eDB8fHgxPHkwKWNvbnRpbnVlOycpXG4gIH0gZWxzZSBpZihmbGlwKSB7XG4gICAgY29kZS5wdXNoKCdpZih5MDw9eDB8fHgxPHkwKWNvbnRpbnVlOycpXG4gIH0gZWxzZSB7XG4gICAgY29kZS5wdXNoKCdpZih5MDx4MHx8eDE8eTApY29udGludWU7JylcbiAgfVxuXG4gIGNvZGUucHVzaCgnZm9yKHZhciBrPScrQVhJUysnKzE7azwnK0RJTUVOU0lPTisnOysrayl7JytcbiAgICAndmFyIHIwPScrUkVEX0JPWEVTKydbaysnK1JFRF9QVFIrJ10sJytcbiAgICAgICAgJ3IxPScrUkVEX0JPWEVTKydbaysnK0RJTUVOU0lPTisnKycrUkVEX1BUUisnXSwnK1xuICAgICAgICAnYjA9JytCTFVFX0JPWEVTKydbaysnK0JMVUVfUFRSKyddLCcrXG4gICAgICAgICdiMT0nK0JMVUVfQk9YRVMrJ1trKycrRElNRU5TSU9OKycrJytCTFVFX1BUUisnXTsnK1xuICAgICAgJ2lmK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dGUgaW5mb1xuICAgIHZhciBmbGlwICAgICAgPSAoc3RhdGUgJiAxKVxuICAgIHZhciBmdWxsICAgICAgPSAhIShzdGF0ZSAmIDE2KVxuXG4gICAgLy9VbnBhY2sgaW5kaWNlc1xuICAgIHZhciByZWQgICAgICAgPSB4Qm94ZXNcbiAgICB2YXIgcmVkSW5kZXggID0geEluZGV4XG4gICAgdmFyIGJsdWUgICAgICA9IHlCb3hlc1xuICAgIHZhciBibHVlSW5kZXggPSB5SW5kZXhcbiAgICBpZihmbGlwKSB7XG4gICAgICByZWQgICAgICAgICA9IHlCb3hlc1xuICAgICAgcmVkSW5kZXggICAgPSB5SW5kZXhcbiAgICAgIGJsdWUgICAgICAgID0geEJveGVzXG4gICAgICBibHVlSW5kZXggICA9IHhJbmRleFxuICAgIH1cblxuICAgIGlmKHN0YXRlICYgMikge1xuICAgICAgcmVkRW5kID0gcGFydGl0aW9uU3RhcnRMZXNzVGhhbihcbiAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgcmVkU3RhcnQsIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgaGkpXG4gICAgICBpZihyZWRTdGFydCA+PSByZWRFbmQpIHtcbiAgICAgICAgY29udGludWVcbiAgICAgIH1cbiAgICB9XG4gICAgaWYoc3RhdGUgJiA0KSB7XG4gICAgICByZWRTdGFydCA9IHBhcnRpdGlvbkVuZExlc3NUaGFuRXF1YWwoXG4gICAgICAgIGQsIGF4aXMsXG4gICAgICAgIHJlZFN0YXJ0LCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgIGxvKVxuICAgICAgaWYocmVkU3RhcnQgPj0gcmVkRW5kKSB7XG4gICAgICAgIGNvbnRpbnVlXG4gICAgICB9XG4gICAgfVxuICAgIFxuICAgIHZhciByZWRDb3VudCAgPSByZWRFbmQgIC0gcmVkU3RhcnRcbiAgICB2YXIgYmx1ZUNvdW50ID0gYmx1ZUVuZCAtIGJsdWVTdGFydFxuXG4gICAga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7XG4gICAgICAgICAgcmV0dXJuIHJldHZhbFxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYoYXhpcyA9PT0gZC0yKSB7XG4gICAgICAgIGlmKGZsaXApIHtcbiAgICAgICAgICByZXR2YWwgPSBzd2VlcC5zd2VlcEJpcGFydGl0ZShcbiAgICAgICAgICAgIGQsIHZpc2l0LFxuICAgICAgICAgICAgYmx1ZVN0YXJ0LCBibHVlRW5kLCBibHVlLCBibHVlSW5kZXgsXG4gICAgICAgICAgICByZWRTdGFydCwgcmVkMCwgcmVkLCByZWRJbmRleClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR2YWwgPSBzd2VlcC5zd2VlcEJpcGFydGl0ZShcbiAgICAgICAgICAgIGQsIHZpc2l0LFxuICAgICAgICAgICAgcmVkU3RhcnQsIHJlZDAsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICBibHVlU3RhcnQsIGJsdWVFbmQsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgfVxuICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgIHJldHVybiByZXR2YWxcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaXRlclB1c2godG9wKyssXG4gICAgICAgICAgYXhpcysxLFxuICAgICAgICAgIHJlZFN0YXJ0LCByZWQwLFxuICAgICAgICAgIGJsdWVTdGFydCwgYmx1ZUVuZCxcbiAgICAgICAgICBmbGlwLFxuICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICAgIGl0ZXJQdXNoKHRvcCsrLFxuICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICBibHVlU3RhcnQsIGJsdWVFbmQsXG4gICAgICAgICAgcmVkU3RhcnQsIHJlZDAsXG4gICAgICAgICAgZmxpcF4xLFxuICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICB9XG4gICAgfVxuXG4gICAgLy9EaXZpZGU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DE2IDogMCksXG4gICAgICAgICAgbG8sIG1pZClcbiAgICAgIH1cblxuICAgICAgLy9DZW50ZXIgY2FzZSAodGhlIGhhcmQgcGFydClcbiAgICAgIGlmKGJsdWUwICsgMSA9PT0gYmx1ZTEpIHtcbiAgICAgICAgLy9PcHRpbWl6YXRpb246IFJhbmdlIHdpdGggZXhhY3RseSAxIHBvaW50LCB1c2UgYSBicnV0ZSBmb3JjZSBzY2FuXG4gICAgICAgIGlmKGZ1bGwpIHtcbiAgICAgICAgICByZXR2YWwgPSBvbmVQb2ludEZ1bGwoXG4gICAgICAgICAgICBkLCBheGlzLCB2aXNpdCxcbiAgICAgICAgICAgIHJlZDAsIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgIGJsdWUwLCBibHVlLCBibHVlSW5kZXhbYmx1ZTBdKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHZhbCA9IG9uZVBvaW50UGFydGlhbChcbiAgICAgICAgICAgIGQsIGF4aXMsIHZpc2l0LCBmbGlwLFxuICAgICAgICAgICAgcmVkMCwgcmVkRW5kLCByZWQsIHJlZEluZGV4LFxuICAgICAgICAgICAgYmx1ZTAsIGJsdWUsIGJsdWVJbmRleFtibHVlMF0pXG4gICAgICAgIH1cbiAgICAgICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgICAgICByZXR1cm4gcmV0dmFsXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZihibHVlMCA8IGJsdWUxKSB7XG4gICAgICAgIHZhciByZWQxXG4gICAgICAgIGlmKGZ1bGwpIHtcbiAgICAgICAgICAvL0lmIGZ1bGwgaW50ZXJzZWN0aW9uLCBuZWVkIHRvIGhhbmRsZSBzcGVjaWFsIGNhc2VcbiAgICAgICAgICByZWQxID0gcGFydGl0aW9uQ29udGFpbnNQb2ludChcbiAgICAgICAgICAgIGQsIGF4aXMsXG4gICAgICAgICAgICByZWQwLCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICBtaWQpXG4gICAgICAgICAgaWYocmVkMCA8IHJlZDEpIHtcbiAgICAgICAgICAgIHZhciByZWRYID0gcGFydGl0aW9uU3RhcnRFcXVhbChcbiAgICAgICAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgICAgbWlkKVxuICAgICAgICAgICAgaWYoYXhpcyA9PT0gZC0yKSB7XG4gICAgICAgICAgICAgIC8vRGVnZW5lcmF0ZSBzd2VlcCBpbnRlcnNlY3Rpb246XG4gICAgICAgICAgICAgIC8vICBbcmVkMCwgcmVkWF0gd2l0aCBbYmx1ZTAsIGJsdWUxXVxuICAgICAgICAgICAgICBpZihyZWQwIDwgcmVkWCkge1xuICAgICAgICAgICAgICAgIHJldHZhbCA9IHN3ZWVwLnN3ZWVwQ29tcGxldGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIHJlZDAsIHJlZFgsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHZhbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vTm9ybWFsIHN3ZWVwIGludGVyc2VjdGlvbjpcbiAgICAgICAgICAgICAgLy8gIFtyZWRYLCByZWQxXSB3aXRoIFtibHVlMCwgYmx1ZTFdXG4gICAgICAgICAgICAgIGlmKHJlZFggPCByZWQxKSB7XG4gICAgICAgICAgICAgICAgcmV0dmFsID0gc3dlZXAuc3dlZXBCaXBhcnRpdGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHZhbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYocmVkMCA8IHJlZFgpIHtcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIHJlZDAsIHJlZFgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsXG4gICAgICAgICAgICAgICAgICAxNixcbiAgICAgICAgICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYocmVkWCA8IHJlZDEpIHtcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsXG4gICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgLUluZmluaXR5LCBJbmZpbml0eSlcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsXG4gICAgICAgICAgICAgICAgICAxLFxuICAgICAgICAgICAgICAgICAgLUluZmluaXR5LCBJbmZpbml0eSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZihmbGlwKSB7XG4gICAgICAgICAgICByZWQxID0gcGFydGl0aW9uQ29udGFpbnNQb2ludFByb3BlcihcbiAgICAgICAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgICAgICAgcmVkMCwgcmVkRW5kLCByZWQsIHJlZEluZGV4LFxuICAgICAgICAgICAgICBtaWQpXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlZDEgPSBwYXJ0aXRpb25Db250YWluc1BvaW50KFxuICAgICAgICAgICAgICBkLCBheGlzLFxuICAgICAgICAgICAgICByZWQwLCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgIG1pZClcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYocmVkMCA8IHJlZDEpIHtcbiAgICAgICAgICAgIGlmKGF4aXMgPT09IGQtMikge1xuICAgICAgICAgICAgICBpZihmbGlwKSB7XG4gICAgICAgICAgICAgICAgcmV0dmFsID0gc3dlZXAuc3dlZXBCaXBhcnRpdGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSwgYmx1ZSwgYmx1ZUluZGV4LFxuICAgICAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleClcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR2YWwgPSBzd2VlcC5zd2VlcEJpcGFydGl0ZShcbiAgICAgICAgICAgICAgICAgIGQsIHZpc2l0LFxuICAgICAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSwgYmx1ZSwgYmx1ZUluZGV4KVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICBheG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aXZlICAgPSAwXG4gIHZhciBjb21tb25BY3RpdmUgPSAwXG4gIGZvcih2YXIgaT0wOyBpPG47ICsraSkge1xuICAgIHZhciBlICAgICA9IFNXRUVQX0VWRU5UU1syKmkrMV18MFxuICAgIHZhciBjb2xvciA9IGUmMVxuICAgIGlmKGkgPCBuLTEgJiYgKGU+PjEpID09PSAoU1dFRVBfRVZFTlRTWzIqaSszXT4+MSkpIHtcbiAgICAgIGNvbG9yID0gMlxuICAgICAgaSArPSAxXG4gICAgfVxuICAgIFxuICAgIGlmKGUgPCAwKSB7XG4gICAgICAvL0NyZWF0ZSBldmVudFxuICAgICAgdmFyIGlkID0gLShlPj4xKSAtIDFcblxuICAgICAgLy9JbnRlcnNlY3Qgd2l0aCBjb21tb25cbiAgICAgIGZvcih2YXIgaj0wOyBqPGNvbW1vbkFjdGl2ZTsgKytqKSB7XG4gICAgICAgIHZhciByZXR2YWwgPSB2aXNpdChDT01NT05fU1dFRVBfUVVFVUVbal0sIGlkKVxuICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgIHJldHVybiByZXR2YWxcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZihjb2xvciAhPT0gMCkge1xuICAgICAgICAvL0ludGVyc2VjdCB3aXRoIHJlZFxuICAgICAgICBmb3IodmFyIGo9MDsgajxyZWRBY3RpdmU7ICsraikge1xuICAgICAgICAgIHZhciByZXR2YWwgPSB2aXNpdChSRURfU1dFRVBfUVVFVUVbal0sIGlkKVxuICAgICAgICAgIGlmKHJldHZhbCAhPT0gdm9pZCAwKSB7XG4gICAgICAgICAgICByZXR1cm4gcmV0dmFsXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmKGNvbG9yICE9PSAxKSB7XG4gICAgICAgIC8vSW50ZXJzZWN0IHdpdGggYmx1ZVxuICAgICAgICBmb3IodmFyIGo9MDsgajxibHVlQWN0aXZlOyArK2opIHtcbiAgICAgICAgICB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hpcysxXVxuICAgICAgICB2YXIgYjEgPSBibHVlW2JsdWVQdHIrYXhpcysxK2RdXG5cbnJlZF9sb29wOlxuICAgICAgICBmb3IodmFyIGo9MDsgajxyZWRBY3RpdmU7ICsraikge1xuICAgICAgICAgIHZhciBvaWR4ICAgPSBSRURfU1dFRVBfUVVFVUVbal1cbiAgICAgICAgICB2YXIgcmVkUHRyID0gZWxlbVNpemUgKiBvaWR4XG5cbiAgICAgICAgICBpZihiMSA8IHJlZFtyZWRQdHIrYXhpcysxXSB8fCBcbiAgICAgICAgICAgICByZWRbcmVkUHRyK2F4aXMrMStkXSA8IGIwKSB7XG4gICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvcih2YXIgaz1heGlzKzI7IGs8ZDsgKytrKSB7XG4gICAgICAgICAgICBpZihibHVlW2JsdWVQdHIgKyBrICsgZF0gPCByZWRbcmVkUHRyICsga10gfHwgXG4gICAgICAgICAgICAgICByZWRbcmVkUHRyICsgayArIGRdIDwgYmx1ZVtibHVlUHRyICsga10pIHtcbiAgICAgICAgICAgICAgY29udGludWUgcmVkX2xvb3BcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgcmVkSWQgID0gcmVkSW5kZXhbb2lkeF1cbiAgICAgICAgICB2YXIgcmV0dmFsXG4gICAgICAgICAgaWYoZmxpcCkge1xuICAgICAgICAgICAgcmV0dmFsID0gdmlzaXQoYmx1ZUlkLCByZWRJZClcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dmFsID0gdmlzaXQocmVkSWQsIGJsdWVJZClcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgICAgICAgIHJldHVybiByZXR2YWwgXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHNxUG9wKFJFRF9TV0VFUF9RVUVVRSw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iAgICAgIC8vIDIzLjEuMy43IE1hcC5wcm90b3R5cGUuaGFzKGtleSlcbiAgICAgIC8vIDIzLjIuMy43IFNldC5wcm90b3R5cGUuaGFzKHZhbHVlKVxuICAgICAgaGFzOiBmdW5jdGlvbiBoYXMoa2V5KXtcbiAgICAgICAgcmV0dXJuICEhZ2V0RW50cnkodGhpcywga2V5KTtcbiAgICAgIH1cbiAgICB9KTtcbiAgICBpZihERVNDUklQVE9SUykkLnNldERlc2MoQy5wcm90b3R5cGUsICdzaXplJywge1xuICAgICAgZ2V0OiBmdW5jdGlvbigpe1xuICAgICAgICByZXR1cm4gZGVmaW5lZCh0aGlzW1NJWkVdKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgICByZXR1cm4gQztcbiAgfSxcbiAgZGVmOiBmdW5jdGlvbih0aGF0LCBrZXksIHZhbHVlKXtcbiAgICB2YXIgZW50cnkgPSBnZXRFbnRyeSh0aGF0LCBrZXkpXG4gICAgICAsIHByZXYsIGluZGV4O1xuICAgIC8vIGNoYW5nZSBleGlzdGluZyBlbnRyeVxuICAgIGlmKGVudHJ5KXtcbiAgICAgIGVudHJ5LnYgPSB2YWx1ZTtcbiAgICAvLyBjcmVhdGUgbmV3IGVudHJ5XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoYXQuX2wgPSBlbnRyeSA9IHtcbiAgICAgICAgaTogaW5kZXggPSBmYXN0S2V5KGtleSwgdHJ1ZSksIC8vIDwtIGluZGV4XG4gICAgICAgIGs6IGtleSwgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBrZXlcbiAgICAgICAgdjogdmFsdWUsICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHZhbHVlXG4gICAgICAgIHA6IHByZXYgPSB0aGF0Ll9sLCAgICAgICAgICAgICAvLyA8LSBwcmV2aW91cyBlbnRyeVxuICAgICAgICBuOiB1bmRlZmluZWQsICAgICAgICAgICAgICAgICAgLy8gPC0gbmV4dCBlbnRyeVxuICAgICAgICByOiBmYWxz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My4xIFByb21pc2UoZXhlY3V0b3IpXG4gIFAgPSBmdW5jdGlvbiBQcm9taXNlKGV4ZWN1dG9yKXtcbiAgICBhRnVuY3Rpb24oZXhlY3V0b3IpO1xuICAgIHZhciByZWNvcmQgPSB0aGlzLl9kID0ge1xuICAgICAgcDogc3RyaWN0TmV3KHRoaXMsIFAsIFBST01JU0UpLCAgICAgICAgIC8vIDwtIHByb21pc2VcbiAgICAgIGM6IFtdLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBhd2FpdGluZyByZWFjdGlvbnNcbiAgICAgIGE6IHVuZGVmaW5lZCwgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBjaGVja2VkIGluIGlzVW5oYW5kbGVkIHJlYWN0aW9uc1xuICAgICAgczogMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHN0YXRlXG4gICAgICBkOiBmYWxzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gPC0gZG9uZVxuICAgICAgdjogdW5kZWZpbmVkLCAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHZhbHVlXG4gICAgICBoOiBmYWxzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gPC0gaGFuZGxlZCByZWplY3Rpb25cbiAgICAgIG46IGZhbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBub3RpZnlcbiAgICB9O1xuICAgIHRyeSB7XG4gICAgICBleGVjdXRvcihjdHgoJHJlc29sdmUsIHJlY29yZCwgMSksIGN0eCgkcmVqZWN0LCByZWNvcmQsIDEpKTtcbiAgICB9IGNhdGNoKGVycil7XG4gICAgICAkcmVqZWN0LmNhbGwocmVjb3JkLCBlcnIpO1xuICAgIH1cbiAgfTtcbiAgcmVxdWlyZSgnLi8kLnJlZGVmaW5lLWFsbCcpKFAucHJvdG90eXBlLCB7XG4gICAgLy8gMjUuNC41LjMgUHJvbWlzZS5wc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ID0gZWFyLnByZXY7XG4gICAgICAgIG5leHQgPSBlYXIubmV4dDtcblxuICAgICAgICBpZiAoaXNFYXIoZWFyLCBtaW5YLCBtaW5ZLCBzaXplKSkge1xuICAgICAgICAgICAgdHJpYW5nbGVzLnB1c2gocHJldi5wLCBlYXIucCwgbmV4dC5wKTtcblxuICAgICAgICAgICAgbmV4dC5wcmV2ID0gcHJldjtcbiAgICAgICAgICAgIHByZXYubmV4dCA9IG5leHQ7XG5cbiAgICAgICAgICAgIGlmIChlYXIucHJldlopIGVhci5wcmV2Wi5uZXh0WiA9IGVhci5uZXh0WjtcbiAgICAgICAgICAgIGlmIChlYXIubmV4dFopIGVhci5uZXh0Wi5wcmV2WiA9IGVhci5wcmV2WjtcblxuICAgICAgICAgICAgZWFyID0gbmV4dC5uZXh0O1xuICAgICAgICAgICAgc3RvcCA9IG5leHQubmV4dDtcblxuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICBlYXIgPSBuZXh0O1xuXG4gICAgICAgIGlmIChlYXIgPT09IHN0b3ApIHtcbiAgICAgICAgICAgIC8vIGlmIHdlIGNhbid0IGZpbmQgYW55IG1vcmUgZWFycywgdHJ5IGZpbHRlcmluZyBwb2ludHMgYW5kIGN1dHRpbmcgYWdhaW5cbiAgICAgICAgICAgIGlmICghc2Vjb25kUGFzcykgZWFyY3V0TGlua2VkKGVhciwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplLCB0cnVlKTtcbiAgICAgICAgICAgIC8vIGlmIHRoaXMgZGlkbid0IHdvcmssIHRyeSBzcGxpdHRpbmcgdGhlIHJlbWFpbmluZyBwb2x5Z29uIGludG8gdHdvXG4gICAgICAgICAgICBlbHNlIHNwbGl0RWFyY3V0KGVhciwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpc0VhcihlYXIs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AgICAgICAgICAgbWluVFkgPSBheSA8IGJ5ID8gKGF5IDwgY3kgPyBheSA6IGN5KSA6IChieSA8IGN5ID8gYnkgOiBjeSksXG4gICAgICAgICAgICBtYXhUWCA9IGF4ID4gYnggPyAoYXggPiBjeCA/IGF4IDogY3gpIDogKGJ4ID4gY3ggPyBieCA6IGN4KSxcbiAgICAgICAgICAgIG1heFRZID0gYXkgPiBieSA/IChheSA+IGN5ID8gYXkgOiBjeSkgOiAoYnkgPiBjeSA/IGJ5IDogY3kpLFxuXG4gICAgICAgICAgICAvLyB6LW9yZGVyIHJhbmdlIGZvciB0aGUgY3VycmVudCB0cmlhbmdsZSBiYm94O1xuICAgICAgICAgICAgbWluWiA9IHpPcmRlcihtaW5UWCwgbWluVFksIG1pblgsIG1pblksIHNpemUpLFxuICAgICAgICAgICAgbWF4WiA9IHpPcmRlcihtYXhUWCwgbWF4VFksIG1pblgsIG1pblksIHNpemUpO1xuXG4gICAgICAgIC8vIGZpcnN0IGxvb2sgZm9yIHBvaW50cyBpbnNpZGUgdGhlIHRyaWFuZ2xlIGluIGluY3JlYXNpbmcgei1vcmRlclxuICAgICAgICBub2RlID0gZWFyLm5leHRaO1xuXG4gICAgICAgIHdoaWxlIChub2RlICYmIG5vZGUueiA8PSBtYXhaKSB7XG4gICAgICAgICAgICBwID0gbm9kZS5wO1xuICAgICAgICAgICAgbm9kZSA9IG5vZGUubmV4dFo7XG4gICAgICAgICAgICBpZiAocCA9PT0gYSB8fCBwID09PSBjKSBjb250aW51ZTtcblxuICAgICAgICAgICAgcHggPSBwWzBdO1xuICAgICAgICAgICAgcHkgPSBwWzFdO1xuXG4gICAgICAgICAgICBzID0gY2F5ICogcHggKyBhY3ggKiBweSAtIGFjZDtcbiAgICAgICAgICAgIGlmIChzID49IDApIHtcbiAgICAgICAgICAgICAgICB0ID0gYWJ5ICogcHggKyBiYXggKiBweSArIGFiZDtcbiAgICAgICAgICAgICAgICBpZiAodCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGsgPSBBIC0gcyAtIHQ7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoayA+PSAwKSAmJiAoKHMgJiYgdCkgfHwgKHMgJiYgaykgfHwgKHQgJiYgaykpKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gdGhlbiBsb29rIGZvciBwb2ludHMgaW4gZGVjcmVhc2luZyB6LW9yZGVyXG4gICAgICAgIG5vZGUgPSBlYXIucHJldlo7XG5cbiAgICAgICAgd2hpbGUgKG5vZGUgJiYgbm9kZS56ID49IG1pblopIHtcbiAgICAgICAgICAgIHAgPSBub2RlLnA7XG4gICAgICAgICAgICBub2RlID0gbm9kZS5wcmV2WjtcbiAgICAgICAgICAgIGlmIChwID09PSBhIHx8IHAgPT09IGMpIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBweCA9IHBbMF07XG4gICAgICAgICAgICBweSA9IHBbMV07XG5cbiAgICAgICAgICAgIHMgPSBjYXkgKiBweCArIGFjeCAqIHB5IC0gYWNkO1xuICAgICAgICAgICAgaWYgKHMgPj0gMCkge1xuICAgICAgICAgICAgICAgIHQgPSBhYnkgKiBweCArIGJheCAqIHB5ICsgYWJkO1xuICAgICAgICAgICAgICAgIGlmICh0ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgayA9IEEgLSBzIC0gdDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChrID49IDApICYmICgocyAmJiB0KSB8fCAocyAmJiBrKSB8fCAodCAmJiBrKSkpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgIC8vIGlmIHdlIGRvbid0IHVzZSB6LW9yZGVyIGN1cnZlIGhhc2gsIHNpbXBseSBpdGVyYXRlIHRocm91Z2ggYWxsIG90aGVyIHBvaW50c1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG5vZGUgPSBlYXIubmV4dC5uZXh0O1xuXG4gICAgICAgIHdoaWxlIChub2RlICE9PSBlYXIucHJldikge1xuICAgICAgICAgICAgcCA9IG5vZGUucDtcbiAgICAgICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG5cbiAgICAgICAgICAgIHB4ID0gcFswXTtcbiAgICAgICAgICAgIHB5ID0gcFsxXTtcblxuICAgICAgICAgICAgcyA9IGNheSAqIHB4ICsgYWN4ICogcHkgLSBhY2Q7XG4gICAgICAgICAgICBpZiAocyA+PSAwKSB7XG4gICAgICAgICAgICAgICAgdCA9IGFieSAqIHB4ICsgYmF4ICogcHkgKyBhYmQ7XG4gICAgICAgICAgICAgICAgaWYgKHQgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICBrID0gQSAtIHMgLSB0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGsgPj0gMCkgJiYgKChzICYmIHQpIHx8IChzICYmIGspIHx8ICh0ICYmIGspKSkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xufVxuXG5mdW5jdGlvbiBzcGxpdEVhcmN1dChzdGFydCwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplKSB7XG4gICAgLy8gZmluZCBhIHZhbGlkIGRpYWdvbmFsIHRoYXQgZGl2aWRlcyB0aGUgcG9seWdvbiBpbnRvIHR3b1xuICAgIHZhciBhID0gc3RhcnQ7XG4gICAgZG8ge1xuICAgICAgICB2YXIgYiA9IGEubmV4dC5uZXh0O1xuICAgICAgICB3aGlsZSAoYiAhPT0gYS5wcmV2KSB7XG4gICAgICAgICAgICBpZiAoaXNWYWxpZERpYWdvbmFsKGEsIGIpKSB7XG4gICAgICAgICAgICAgICAgLy8gc3BsaXQgdGhlIHBvbHlnb24gaW4gdHdvIGJ5IHRoZSBkaWFnb25hbFxuICAgICAgICAgICAgICAgIHZhciBjID0g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bjtcblxuICAgIG5vZGUgPSBtTm9kZS5uZXh0O1xuXG4gICAgd2hpbGUgKG5vZGUgIT09IHN0b3ApIHtcblxuICAgICAgICBteCA9IG5vZGUucFswXTtcbiAgICAgICAgbXkgPSBub2RlLnBbMV07XG4gICAgICAgIGFteCA9IHB4IC0gbXg7XG5cbiAgICAgICAgaWYgKGFteCA+PSAwICYmIG14ID49IGJ4KSB7XG4gICAgICAgICAgICBzID0gKGNweSAqIG14ICsgcGN4ICogbXkgLSBwY2QpICogc2lnbjtcbiAgICAgICAgICAgIGlmIChzID49IDApIHtcbiAgICAgICAgICAgICAgICB0ID0gKHBieSAqIG14ICsgYnB4ICogbXkgKyBwYmQpICogc2lnbjtcblxuICAgICAgICAgICAgICAgIGlmICh0ID49IDAgJiYgQSAqIHNpZ24gLSBzIC0gdCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRhbiA9IE1hdGguYWJzKHB5IC0gbXkpIC8gYW14OyAvLyB0YW5nZW50aWFsXG4gICAgICAgICAgICAgICAgICAgIGlmICh0YW4gPCB0YW5NaW4gJiYgbG9jYWxseUluc2lkZShub2RlLCBob2xlTm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1Ob2RlID0gbm9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhbk1pbiA9IHRhbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1Ob2RlO1xufVxuXG5mdW5jdGlvbiBpbmRleEN1cnZlKHN0YXJ0LCBtaW5YLCBtaW5ZLCBzaXplKSB7XG4gICAgdmFyIG5vZGUgPSBzdGFydDtcblxuICAgIGRvIHtcbiAgICAgICAgbm9kZS56ID0gbm9kZS56IHx8IHpPcmRlcihub2RlLnBbMF0sIG5vZGUucFsxXSwgbWluWC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AgICAgICB3aGlsZSAocFNpemUgPiAwIHx8IChxU2l6ZSA+IDAgJiYgcSkpIHtcblxuICAgICAgICAgICAgICAgIGlmIChwU2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBlID0gcTtcbiAgICAgICAgICAgICAgICAgICAgcSA9IHEubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHFTaXplLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChxU2l6ZSA9PT0gMCB8fCAhcSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gcDtcbiAgICAgICAgICAgICAgICAgICAgcCA9IHAubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHBTaXplLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwLnogPD0gcS56KSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSBwO1xuICAgICAgICAgICAgICAgICAgICBwID0gcC5uZXh0WjtcbiAgICAgICAgICAgICAgICAgICAgcFNpemUtLTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlID0gcTtcbiAgICAgICAgICAgICAgICAgICAgcSA9IHEubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHFTaXplLS07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRhaWwpIHRhaWwubmV4dFogPSBlO1xuICAgICAgICAgICAgICAgIGVsc2UgbGlzdCA9IGU7XG5cbiAgICAgICAgICAgICAgICBlLnByZXZaID0gdGFpbDtcbiAgICAgICAgICAgICAgICB0YWlsID0gZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcCA9IHE7XG4gICAgICAgIH1cblxuICAgICAgICB0YWlsLm5leHRaID0gbnVsbDtcblxuICAgICAgICBpZiAobnVtTWVyZ2VzIDw9IDEpIHJldHVybiBsaXN0O1xuXG4gICAgICAgIGluU2l6ZSAqPSAyO1xuICAgIH1cbn1cblxuLy8gei1vcmRlciBvZiBh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gIFRva2VuTmFtZVtUb2tlbi5QdW5jdHVhdG9yXSA9ICdQdW5jdHVhdG9yJztcbiAgICBUb2tlbk5hbWVbVG9rZW4uU3RyaW5nTGl0ZXJhbF0gPSAnU3RyaW5nJztcbiAgICBUb2tlbk5hbWVbVG9rZW4uUmVndWxhckV4cHJlc3Npb25dID0gJ1JlZ3VsYXJFeHByZXNzaW9uJztcbiAgICBUb2tlbk5hbWVbVG9rZW4uVGVtcGxhdGVdID0gJ1RlbXBsYXRlJztcblxuICAgIC8vIEEgZnVuY3Rpb24gZm9sbG93aW5nIG9uZSBvZiB0aG9zZSB0b2tlbnMgaXMgYW4gZXhwcmVzc2lvbi5cbiAgICBGbkV4cHJUb2tlbnMgPSBbJygnLCAneycsICdbJywgJ2luJywgJ3R5cGVvZicsICdpbnN0YW5jZW9mJywgJ25ldycsXG4gICAgICAgICAgICAgICAgICAgICdyZXR1cm4nLCAnY2FzZScsICdkZWxldGUnLCAndGhyb3cnLCAndm9pZCcsXG4gICAgICAgICAgICAgICAgICAgIC8vIGFzc2lnbm1lbnQgb3BlcmF0b3JzXG4gICAgICAgICAgICAgICAgICAgICc9JywgJys9JywgJy09JywgJyo9JywgJy89JywgJyU9JywgJzw8PScsICc+Pj0nLCAnPj4+PScsXG4gICAgICAgICAgICAgICAgICAgICcmPScsICd8PScsICdePScsICcsJyxcbiAgICAgICAgICAgICAgICAgICAgLy8gYmluYXJ5L3VuYXJ5IG9wZXJhdG9yc1xuICAgICAgICAgICAgICAgICAgICAnKycsICctJywgJyonLCAnLycsICclJywgJysrJywgJy0tJywgJzw8JywgJz4+JywgJz4+PicsICcmJyxcbiAgICAgICAgICAgICAgICAgICAgJ3wnLCAnXicsICchJywgJ34nLCAnJiYnLCAnfHwnLCAnPycsICc6JywgJz09PScsICc9PScsICc+PScsXG4gICAgICAgICAgICAgICAgICAgICc8PScsICc8JywgJz4nLCAnIT0nLCAnIT09J107XG5cbiAgICBTeW50YXggPSB7XG4gICAgICAgIEFzc2ln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XHVERjlGXXxcXHVEODJDW1xcdURDMDBcXHVEQzAxXXxcXHVEODJGW1xcdURDMDAtXFx1REM2QVxcdURDNzAtXFx1REM3Q1xcdURDODAtXFx1REM4OFxcdURDOTAtXFx1REM5OV18XFx1RDgzNVtcXHVEQzAwLVxcdURDNTRcXHVEQzU2LVxcdURDOUNcXHVEQzlFXFx1REM5RlxcdURDQTJcXHVEQ0E1XFx1RENBNlxcdURDQTktXFx1RENBQ1xcdURDQUUtXFx1RENCOVxcdURDQkJcXHVEQ0JELVxcdURDQzNcXHVEQ0M1LVxcdUREMDVcXHVERDA3LVxcdUREMEFcXHVERDBELVxcdUREMTRcXHVERDE2LVxcdUREMUNcXHVERDFFLVxcdUREMzlcXHVERDNCLVxcdUREM0VcXHVERDQwLVxcdURENDRcXHVERDQ2XFx1REQ0QS1cXHVERDUwXFx1REQ1Mi1cXHVERUE1XFx1REVBOC1cXHVERUMwXFx1REVDMi1cXHVERURBXFx1REVEQy1cXHVERUZBXFx1REVGQy1cXHVERjE0XFx1REYxNi1cXHVERjM0XFx1REYzNi1cXHVERjRFXFx1REY1MC1cXHVERjZFXFx1REY3MC1cXHVERjg4XFx1REY4QS1cXHVERkE4XFx1REZBQS1cXHVERkMyXFx1REZDNC1cXHVERkNCXXxcXHVEODNBW1xcdURDMDAtXFx1RENDNF18XFx1RDgzQltcXHVERTAwLVxcdURFMDNcXHVERTA1LVxcdURFMUZcXHVERTIxXFx1REUyMlxcdURFMjRcXHVERTI3XFx1REUyOS1cXHVERTMyXFx1REUzNC1cXHVERTM3XFx1REUzOVxcdURFM0JcXHVERTQyXFx1REU0N1xcdURFNDlcXHVERTRCXFx1REU0RC1cXHVERTRGXFx1REU1MVxcdURFNTJcXHVERTU0XFx1REU1N1xcdURFNTlcXHVERTVCXFx1REU1RFxcdURFNUZcXHVERTYxXFx1REU2MlxcdURFNjRcXHVERTY3LVxcdURFNkFcXHVERTZDLVxcdURFNzJcXHVERTc0LVxcdURFNzdcXHVERTc5LVxc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REMDAtXFx1REQzNFxcdUREMzYtXFx1REQzRlxcdURENTAtXFx1REQ3M1xcdURENzZcXHVERDgwLVxcdUREQzRcXHVEREQwLVxcdUREREFcXHVERTAwLVxcdURFMTFcXHVERTEzLVxcdURFMzdcXHVERUIwLVxcdURFRUFcXHVERUYwLVxcdURFRjlcXHVERjAxLVxcdURGMDNcXHVERjA1LVxcdURGMENcXHVERjBGXFx1REYxMFxcdURGMTMtXFx1REYyOFxcdURGMkEtXFx1REYzMFxcdURGMzJcXHVERjMzXFx1REYzNS1cXHVERjM5XFx1REYzQy1cXHVERjQ0XFx1REY0N1xcdURGNDhcXHVERjRCLVxcdURGNERcXHVERjU3XFx1REY1RC1cXHVERjYzXFx1REY2Ni1cXHVERjZDXFx1REY3MC1cXHVERjc0XXxcXHVEODA1W1xcdURDODAtXFx1RENDNVxcdURDQzdcXHVEQ0QwLVxcdURDRDlcXHVERDgwLVxcdUREQjVcXHVEREI4LVxcdUREQzBcXHVERTAwLVxcdURFNDBcXHVERTQ0XFx1REU1MC1cXHVERTU5XFx1REU4MC1cXHVERUI3XFx1REVDMC1cXHVERUM5XXxcXHVEODA2W1xcdURDQTAtXFx1RENFOVxcdURDRkZcXHVERUMwLVxcdURFRjhdfFxcdUQ4MDhbXFx1REMwMC1cXHVERjk4XXxcXHVEODA5W1xcdURDMDAtXFx1REM2RV18W1xcdUQ4MENcXHVEODQwLVxcdUQ4NjhcXHVEODZBLVxcdUQ4NkNdW1xcdURDMDAtXFx1REZGRl18XFx1RDgwRFtcXHVEQzAwLVxcdURDMkVdfFxcdUQ4MUFbXFx1REMwMC1cXHVERTM4XFx1REU0MC1cXHVERTVFXFx1REU2MC1cXHVERTY5XFx1REVEMC1cXHVERUVEXFx1REVGMC1cXHVERUY0XFx1REYwMC1cXHVERjM2XFx1REY0MC1cXHVERjQzXFx1REY1MC1cXHVERjU5XFx1REY2My1cXHVERjc3XFx1REY3RC1cXHVERjhGXXxcXHVEODFCW1xcdURGMDAtXFx1REY0N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aWVyc1xuXG4gICAgZnVuY3Rpb24gZnJvbUNvZGVQb2ludChjcCkge1xuICAgICAgICByZXR1cm4gKGNwIDwgMHgxMDAwMCkgPyBTdHJpbmcuZnJvbUNoYXJDb2RlKGNwKSA6XG4gICAgICAgICAgICBTdHJpbmcuZnJvbUNoYXJDb2RlKDB4RDgwMCArICgoY3AgLSAweDEwMDAwKSA+PiAxMCkpICtcbiAgICAgICAgICAgIFN0cmluZy5mcm9tQ2hhckNvZGUoMHhEQzAwICsgKChjcCAtIDB4MTAwMDApICYgMTAyMykpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGlzSWRlbnRpZmllclN0YXJ0KGNoKSB7XG4gICAgICAgIHJldHVybiAoY2ggPT09IDB4MjQpIHx8IChjaCA9PT0gMHg1RikgfHwgIC8vICQgKGRvbGxhcikgYW5kIF8gKHVuZGVyc2NvcmUpXG4gICAgICAgICAgICAoY2ggPj0gMHg0MSAmJiBjaCA8PSAweDVBKSB8fCAgICAgICAgIC8vIEEuLlpcbiAgICAgICAgICAgIChjaCA+PSAweDYxICYmIGNoIDw9IDB4N0EpIHx8ICAgICAgICAgLy8gYS4uelxuICAgICAgICAgICAgKGNoID09PSAweDVDKSB8fCAgICAgICAgICAgICAgICAgICAgICAvLyBcXCAoYmFja3NsYXNoKVxuICAgICAgICAgICAgKChjaCA+PSAweDgwKSAmJiBSZWdleC5Ob25Bc2NpaUlkZW50aWZpZXJTdGFydC50ZXN0KGZyb21Db2RlUG9pbnQoY2gpKSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaXNJZGVudGlmaWVyUGFydChjaCkge1xuICAgICAgICByZXR1cm4gKGNoID09PSAweDI0KSB8fCAoY2ggPT09IDB4NUYpIHx8ICAvLyAkIChkb2xsYXIpIGFuZCBfICh1bmRlcnNjb3JlKVxuICAgICAgICAgICAgKGNoID49IDB4NDEgJiYgY2ggPD0gMHg1QSkgfHwgICAgICAgICAvLyBBLi5aXG4gICAgICAgICAgICAoY2ggPj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2NvbnN0JykgfHwgKGlkID09PSAneWllbGQnKSB8fFxuICAgICAgICAgICAgICAgIChpZCA9PT0gJ2NsYXNzJykgfHwgKGlkID09PSAnc3VwZXInKTtcbiAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ3JldHVybicpIHx8IChpZCA9PT0gJ3R5cGVvZicpIHx8IChpZCA9PT0gJ2RlbGV0ZScpIHx8XG4gICAgICAgICAgICAgICAgKGlkID09PSAnc3dpdGNoJykgfHwgKGlkID09PSAnZXhwb3J0JykgfHwgKGlkID09PSAnaW1wb3J0Jyk7XG4gICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgIHJldHVybiAoaWQgPT09ICdkZWZhdWx0JykgfHwgKGlkID09PSAnZmluYWxseScpIHx8IChpZCA9PT0gJ2V4dGVuZHMnKTtcbiAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ2Z1bmN0aW9uJykgfHwgKGlkID09PSAnY29udGludWUnKSB8fCAoaWQgPT09ICdkZWJ1Z2dlcicpO1xuICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ2luc3RhbmNlb2YnKTtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjQgQ29tbWVudHNcblxuICAgIGZ1bmN0aW9uIGFkZENvbW1lbnQodHlwZSwgdmFsdWUsIHN0YXJ0LCBlbmQsIGxvYykge1xuICAgICAgICB2YXIgY29tbWVudDtcblxuICAgICAgICBhc3NlcnQodHlwZW9mIHN0YXJ0ID09PSAnbnVtYmVyJywgJ0NvbW1lbnQgbXVzdCBoYXZlIHZhbGlkIHBvc2l0aW9uJyk7XG5cbiAgICAgICAgc3RhdGUubGFzdENvbW1lbnRTdGFydCA9IHN0YXJ0O1xuXG4gICAgICAgIGNvbW1lbnQgPSB7XG4gICAgICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICAgICAgdmFsdWU6IHZhbHVlXG4gICAgICAgIH07XG4gICAgICAgIGlmIChleHRyYS5yYW5nZSkge1xuICAgICAgICAgICAgY29tbWVudC5yYW5nZSA9IFtzdGFydCwgZW5kXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZXh0cmEubG9jKSB7XG4gICAgICAgICAgICBjb21tZW50LmxvYyA9IGxvYztcbiAgICAgICAgfVxuICAgICAgICBleHRyYS5jb21tZW50cy5wdXNoKGNvbW1lbnQpO1xuICAgICAgICBpZiAoZXh0cmEuYXR0YWNoQ29tbWVudCkge1xuICAgICAgICAgICAgZXh0cmEubGVhZGluZ0NvbW1lbnRzLnB1c2goY29tbWVudCk7XG4gICAgICAgICAgICBleHRyYS50cmFpbGluZ0NvbW1lbnRzLnB1c2goY29tbWVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICBjb21tZW50LnR5cGUgPSBjb21tZW50LnR5cGUgKyAnQ29tbWVudCc7XG4gICAgICAgICAgICBpZiAoZXh0cmEuZGVsZWdhdGUpIHtcbiAgICAgICAgICAgICAgICBjb21tZW50ID0gZXh0cmEuZGVsZWdhdGUoY29tbWVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHRyYS50b2tlbnMucHVzaChjb21tZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNraXBTaW5nbGVMaW5lQ29tbWVudChvZmZzZXQpIHtcbiAgICAgICAgdmFyIHN0YXJ0LCBsb2MsIGNoLCBjb21tZW50O1xuXG4gICAgICAgIHN0YXJ0ID0gaW5kZXggLSBvZmZzZXQ7XG4gICAgICAgIGxvYyA9IHtcbiAgICAgICAgICAgIHN0YXJ0OiB7XG4gICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0IC0gb2Zmc2V0XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBpZiAoaXNMaW5lVGVybWluYXRvcihjaCkpIHtcbiAgICAgICAgICAgICAgICBoYXNMaW5lVGVybWluYXRvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBzb3VyY2Uuc2xpY2Uoc3RhcnQgKyBvZmZzZXQsIGluZGV4IC0gMSk7XG4gICAgICAgICAgICAgICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydCAtIDFcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgYWRkQ29tbWVudCgnTGluZScsIGNvbW1lbnQsIHN0YXJ0LCBpbmRleCAtIDEsIGxvYyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gMTMgJiYgc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7XG4gICAgICAgICAgICBjb21tZW50ID0gc291cmNlLnNsaWNlKHN0YXJ0ICsgb2Zmc2V0LCBpbmRleCk7XG4gICAgICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGFkZENvbW1lbnQoJ0xpbmUnLCBjb21tZW50LCBzdGFydCwgaW5kZXgsIGxvYyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBza2lwTXVsdGlMaW5lQ29tbWVudCgpIHtcbiAgICAgICAgdmFyIHN0YXJ0LCBsb2MsIGNoLCBjb21tZW50O1xuXG4gICAgICAgIGlmIChleHRyYS5jb21tZW50cykge1xuICAgICAgICAgICAgc3RhcnQgPSBpbmRleCAtIDI7XG4gICAgICAgICAgICBsb2MgPSB7XG4gICAgICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydCAtIDJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcbiAgICAgICAgICAgIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoKSkge1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gMHgwRCAmJiBzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDEpID09PSAweDBBKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09IDB4MkEpIHtcbiAgICAgICAgICAgICAgICAvLyBCbG9jayBjb21tZW50IGVuZHMgd2l0aCAnKi8nLlxuICAgICAgICAgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDEpID09PSAweDJGKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleHRyYS5jb21tZW50cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IHNvdXJjZS5zbGljZShzdGFydCArIDIsIGluZGV4IC0gMik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZENvbW1lbnQoJ0Jsb2NrJywgY29tbWVudCwgc3RhcnQsIGluZGV4LCBsb2MpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFJhbiBvZmYgdGhlIGVuZCBvZiB0aGUgZmlsZSAtIHRoZSB3aG9sZSB0aGluZyBpcyBhIGNvbW1lbnRcbiAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7XG4gICAgICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNvbW1lbnQgPSBzb3VyY2Uuc2xpY2Uoc3RhcnQgKyAyLCBpbmRleCk7XG4gICAgICAgICAgICBhZGRDb21tZW50KCdCbG9jaycsIGNvbW1lbnQsIHN0YXJ0LCBpbmRleCwgbG9jKTtcbiAgICAgICAgfVxuICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbigpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNraXBDb21tZW50KCkge1xuICAgICAgICB2YXIgY2gsIHN0YXJ0O1xuICAgICAgICBoYXNMaW5lVGVybWluYXRvciA9IGZhbHNlO1xuXG4gICAgICAgIHN0YXJ0ID0gKGluZGV4ID09PSAwKTtcbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcblxuICAgICAgICAgICAgaWYgKGlzV2hpdGVTcGFjZShjaCkpIHtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoKSkge1xuICAgICAgICAgICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gMHgwRCAmJiBzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgPT09IDB4MEEpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIHN0YXJ0ID0gdHJ1ZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09IDB4MkYpIHsgLy8gVSswMDJGIGlzICcvJ1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKTtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09IDB4MkYpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgc2tpcFNpbmdsZUxpbmVDb21tZW50KDIpO1xuICAgICAgICAgICAgICAgICAgICBzdGFydCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgyQSkgeyAgLy8gVSswMDJBIGlzICcqJ1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICBza2lwTXVsdGlMaW5lQ29tbWVudCgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnQgJiYgY2ggPT09IDB4MkQpIHsgLy8gVSswMDJEIGlzICctJ1xuICAgICAgICAgICAgICAgIC8vIFUrMDAzRSBpcyAnPidcbiAgICAgICAgICAgICAgICBpZiAoKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkgPT09IDB4MkQpICYmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDIpID09PSAweDNFKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyAnLS0+JyBpcyBhIHNpbmdsZS1saW5lIGNvbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggKz0gMztcbiAgICAgICAgICAgICAgICAgICAgc2tpcFNpbmdsZUxpbmVDb21tZW50KDMpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09IDB4M0MpIHsgLy8gVSswMDNDIGlzICc8J1xuICAgICAgICAgICAgICAgIGlmIChzb3VyY2Uuc2xpY2UoaW5kZXggKyAxLCBpbmRleCArIDQpID09PSAnIS0tJykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4OyAvLyBgPGBcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDsgLy8gYCFgXG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGAtYFxuICAgICAgICAgICAgICAgICAgICArK2luZGV4OyAvLyBgLWBcbiAgICAgICAgICAgICAgICAgICAgc2tpcFNpbmdsZUxpbmVDb21tZW50KDQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuSGV4RXNjYXBlKHByZWZpeCkge1xuICAgICAgICB2YXIgaSwgbGVuLCBjaCwgY29kZSA9IDA7XG5cbiAgICAgICAgbGVuID0gKHByZWZpeCA9PT0gJ3UnKSA/IDQgOiAyO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyArK2kpIHtcbiAgICAgICAgICAgIGlmIChpbmRleCA8IGxlbmd0aCAmJiBpc0hleERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICAgICAgY29kZSA9IGNvZGUgKiAxNiArICcwMTIzNDU2Nzg5YWJjZGVmJy5pbmRleE9mKGNoLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUoY29kZSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhblVuaWNvZGVDb2RlUG9pbnRFc2NhcGUoKSB7XG4gICAgICAgIHZhciBjaCwgY29kZTtcblxuICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIGNvZGUgPSAwO1xuXG4gICAgICAgIC8vIEF0IGxlYXN0LCBvbmUgaGV4IGRpZ2l0IGlzIHJlcXVpcmVkLlxuICAgICAgICBpZiAoY2ggPT09ICd9Jykge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICBpZiAoIWlzSGV4RGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb2RlID0gY29kZSAqIDE2ICsgJzAxMjM0NTY3ODlhYmNkZWYnLmluZGV4T2YoY2gudG9Mb3dlckNhc2UoKSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY29kZSA+IDB4MTBGRkZGIHx8IGNoICE9PSAnfScpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZnJvbUNvZGVQb2ludChjb2RlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjb2RlUG9pbnRBdChpKSB7XG4gICAgICAgIHZhciBjcCwgZmlyc3QsIHNlY29uZDtcblxuICAgICAgICBjcCA9IHNvdXJjZS5jaGFyQ29kZUF0KGkpO1xuICAgICAgICBpZiAoY3AgPj0gMHhEODAwICYmIGNwIDw9IDB4REJGRikge1xuICAgICAgICAgICAgc2Vjb25kID0gc291cmNlLmNoYXJDb2RlQXQoaSArIDEpO1xuICAgICAgICAgICAgaWYgKHNlY29uZCA+PSAweERDMDAgJiYgc2Vjb25kIDw9IDB4REZGRikge1xuICAgICAgICAgICAgICAgIGZpcnN0ID0gY3A7XG4gICAgICAgICAgICAgICAgY3AgPSAoZmlyc3QgLSAweEQ4MDApICogMHg0MDAgKyBzZWNvbmQgLSAweERDMDAgKyAweDEwMDAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNwO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGdldENvbXBsZXhJZGVudGlmaWVyKCkge1xuICAgICAgICB2YXIgY3AsIGNoLCBpZDtcblxuICAgICAgICBjcCA9IGNvZGVQb2ludEF0KGluZGV4KTtcbiAgICAgICAgaWQgPSBmcm9tQ29kZVBvaW50KGNwKTtcbiAgICAgICAgaW5kZXggKz0gaWQubGVuZ3RoO1xuXG4gICAgICAgIC8vICdcXHUnIChVKzAwNUMsIFUrMDA3NSkgZGVub3RlcyBhbiBlc2NhcGVkIGNoYXJhY3Rlci5cbiAgICAgICAgaWYgKGNwID09PSAweDVDKSB7XG4gICAgICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpICE9PSAweDc1KSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICBjaCA9IHNjYW5Vbmljb2RlQ29kZVBvaW50RXNjYXBlKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNoID0gc2NhbkhleEVzY2FwZSgndScpO1xuICAgICAgICAgICAgICAgIGNwID0gY2guY2hhckNvZGVBdCgwKTtcbiAgICAgICAgICAgICAgICBpZiAoIWNoIHx8IGNoID09PSAnXFxcXCcgfHwgIWlzSWRlbnRpZmllclN0YXJ0KGNwKSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlkID0gY2g7XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNwID0gY29kZVBvaW50QXQoaW5kZXgpO1xuICAgICAgICAgICAgaWYgKCFpc0lkZW50aWZpZXJQYXJ0KGNwKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2ggPSBmcm9tQ29kZVBvaW50KGNwKTtcbiAgICAgICAgICAgIGlkICs9IGNoO1xuICAgICAgICAgICAgaW5kZXggKz0gY2gubGVuZ3RoO1xuXG4gICAgICAgICAgICAvLyAnXFx1JyAoVSswMDVDLCBVKzAwNzUpIGRlbm90ZXMgYW4gZXNjYXBlZCBjaGFyYWN0ZXIuXG4gICAgICAgICAgICBpZiAoY3AgPT09IDB4NUMpIHtcbiAgICAgICAgICAgICAgICBpZCA9IGlkLnN1YnN0cigwLCBpZC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpICE9PSAweDc1KSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICBjaCA9IHNjYW5Vbmljb2RlQ29kZVBvaW50RXNjYXBlKCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY2ggPSBzY2FuSGV4RXNjYXBlKCd1Jyk7XG4gICAgICAgICAgICAgICAgICAgIGNwID0gY2guY2hhckNvZGVBdCgwKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjaCB8fCBjaCA9PT0gJ1xcXFwnIHx8ICFpc0lkZW50aWZpZXJQYXJ0KGNwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZCArPSBjaDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpZDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBnZXRJZGVudGlmaWVyKCkge1xuICAgICAgICB2YXIgc3RhcnQsIGNoO1xuXG4gICAgICAgIHN0YXJ0ID0gaW5kZXgrKztcbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gMHg1Qykge1xuICAgICAgICAgICAgICAgIC8vIEJsYWNrc2xhc2ggKFUrMDA1QykgbWFya3MgVW5pY29kZSBlc2NhcGUgc2VxdWVuY2UuXG4gICAgICAgICAgICAgICAgaW5kZXggPSBzdGFydDtcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q29tcGxleElkZW50aWZpZXIoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPj0gMHhEODAwICYmIGNoIDwgMHhERkZGKSB7XG4gICAgICAgICAgICAgICAgLy8gTmVlZCB0byBoYW5kbGUgc3Vycm9nYXRlIHBhaXJzLlxuICAgICAgICAgICAgICAgIGluZGV4ID0gc3RhcnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldENvbXBsZXhJZGVudGlmaWVyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaXNJZGVudGlmaWVyUGFydChjaCkpIHtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzb3VyY2Uuc2xpY2Uoc3RhcnQsIGluZGV4KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuSWRlbnRpZmllcigpIHtcbiAgICAgICAgdmFyIHN0YXJ0LCBpZCwgdHlwZTtcblxuICAgICAgICBzdGFydCA9IGluZGV4O1xuXG4gICAgICAgIC8vIEJhY2tzbGFzaCAoVSswMDVDKSBzdGFydHMgYW4gZXNjYXBlZCBjaGFyYWN0ZXIuXG4gICAgICAgIGlkID0gKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSA9PT0gMHg1QykgPyBnZXRDb21wbGV4SWRlbnRpZmllcigpIDogZ2V0SWRlbnRpZmllcigpO1xuXG4gICAgICAgIC8vIFRoZXJlIGlzIG5vIGtleXdvcmQgb3IgbGl0ZXJhbCB3aXRoIG9ubHkgb25lIGNoYXJhY3Rlci5cbiAgICAgICAgLy8gVGh1cywgaXQgbXVzdCBiZSBhbiBpZGVudGlmaWVyLlxuICAgICAgICBpZiAoaWQubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICB0eXBlID0gVG9rZW4uSWRlbnRpZmllcjtcbiAgICAgICAgfSBlbHNlIGlmIChpc0tleXdvcmQoaWQpKSB7XG4gICAgICAgICAgICB0eXBlID0gVG9rZW4uS2V5d29yZDtcbiAgICAgICAgfSBlbHNlIGlmIChpZCA9PT0gJ251bGwnKSB7XG4gICAgICAgICAgICB0eXBlID0gVG9rZW4uTnVsbExpdGVyYWw7XG4gICAgICAgIH0gZWxzZSBpZiAoaWQgPT09ICd0cnVlJyB8fCBpZCA9PT0gJ2ZhbHNlJykge1xuICAgICAgICAgICAgdHlwZSA9IFRva2VuLkJvb2xlYW5MaXRlcmFsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdHlwZSA9IFRva2VuLklkZW50aWZpZXI7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgIHZhbHVlOiBpZCxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cblxuICAgIC8vIEVDTUEtMjYyIDExLjcgUHVuY3R1YXRvcnNcblxuICAgIGZ1bmN0aW9uIHNjYW5QdW5jdHVhdG9yKCkge1xuICAgICAgICB2YXIgdG9rZW4sIHN0cjtcblxuICAgICAgICB0b2tlbiA9IHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLlB1bmN0dWF0b3IsXG4gICAgICAgICAgICB2YWx1ZTogJycsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogaW5kZXgsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gQ2hlY2sgZm9yIG1vc3QgY29tbW9uIHNpbmdsZS1jaGFyYWN0ZXIgcHVuY3R1YXRvcnMuXG4gICAgICAgIHN0ciA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIHN3aXRjaCAoc3RyKSB7XG5cbiAgICAgICAgY2FzZSAnKCc6XG4gICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5vcGVuUGFyZW5Ub2tlbiA9IGV4dHJhLnRva2VuVmFsdWVzLmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICd7JzpcbiAgICAgICAgICAgIGlmIChleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgICAgIGV4dHJhLm9wZW5DdXJseVRva2VuID0gZXh0cmEudG9rZW5WYWx1ZXMubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RhdGUuY3VybHlTdGFjay5wdXNoKCd7Jyk7XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnLic6XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICcuJyAmJiBzb3VyY2VbaW5kZXggKyAxXSA9PT0gJy4nKSB7XG4gICAgICAgICAgICAgICAgLy8gU3ByZWFkIG9wZXJhdG9yOiAuLi5cbiAgICAgICAgICAgICAgICBpbmRleCArPSAyO1xuICAgICAgICAgICAgICAgIHN0ciA9ICcuLi4nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnfSc6XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgc3RhdGUuY3VybHlTdGFjay5wb3AoKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICcpJzpcbiAgICAgICAgY2FzZSAnOyc6XG4gICAgICAgIGNhc2UgJywnOlxuICAgICAgICBjYXNlICdbJzpcbiAgICAgICAgY2FzZSAnXSc6XG4gICAgICAgIGNhc2UgJzonOlxuICAgICAgICBjYXNlICc/JzpcbiAgICAgICAgY2FzZSAnfic6XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIC8vIDQtY2hhcmFjdGVyIHB1bmN0dWF0b3IuXG4gICAgICAgICAgICBzdHIgPSBzb3VyY2Uuc3Vic3RyKGluZGV4LCA0KTtcbiAgICAgICAgICAgIGlmIChzdHIgPT09ICc+Pj49Jykge1xuICAgICAgICAgICAgICAgIGluZGV4ICs9IDQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgLy8gMy1jaGFyYWN0ZXIgcHVuY3R1YXRvcnMuXG4gICAgICAgICAgICAgICAgc3RyID0gc3RyLnN1YnN0cigwLCAzKTtcbiAgICAgICAgICAgICAgICBpZiAoc3RyID09PSAnPT09JyB8fCBzdHIgPT09ICchPT0nIHx8IHN0ciA9PT0gJz4+PicgfHxcbiAgICAgICAgICAgICAgICAgICAgc3RyID09PSAnPDw9JyB8fCBzdHIgPT09ICc+Pj0nKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ICs9IDM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgICAgICAvLyAyLWNoYXJhY3RlciBwdW5jdHVhdG9ycy5cbiAgICAgICAgICAgICAgICAgICAgc3RyID0gc3RyLnN1YnN0cigwLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0ciA9PT0gJyYmJyB8fCBzdHIgPT09ICd8fCcgfHwgc3RyID09PSAnPT0nIHx8IHN0ciA9PT0gJyE9JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyID09PSAnKz0nIHx8IHN0ciA9PT0gJy09JyB8fCBzdHIgPT09ICcqPScgfHwgc3RyID09PSAnLz0nIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgPT09ICcrKycgfHwgc3RyID09PSAnLS0nIHx8IHN0ciA9PT0gJzw8JyB8fCBzdHIgPT09ICc+PicgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9PT0gJyY9JyB8fCBzdHIgPT09ICd8PScgfHwgc3RyID09PSAnXj0nIHx8IHN0ciA9PT0gJyU9JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyID09PSAnPD0nIHx8IHN0ciA9PT0gJz49JyB8fCBzdHIgPT09ICc9PicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ICs9IDI7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIDEtY2hhcmFjdGVyIHB1bmN0dWF0b3JzLlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgnPD49ISstKiUmfF4vJy5pbmRleE9mKHN0cikgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaW5kZXggPT09IHRva2VuLnN0YXJ0KSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgdG9rZW4uZW5kID0gaW5kZXg7XG4gICAgICAgIHRva2VuLnZhbHVlID0gc3RyO1xuICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuOC4zIE51bWVyaWMgTGl0ZXJhbHNcblxuICAgIGZ1bmN0aW9uIHNjYW5IZXhMaXRlcmFsKHN0YXJ0KSB7XG4gICAgICAgIHZhciBudW1iZXIgPSAnJztcblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmICghaXNIZXhEaWdpdChzb3VyY2VbaW5kZXhdKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChudW1iZXIubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uTnVtZXJpY0xpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogcGFyc2VJbnQoJzB4JyArIG51bWJlciwgMTYpLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5CaW5hcnlMaXRlcmFsKHN0YXJ0KSB7XG4gICAgICAgIHZhciBjaCwgbnVtYmVyO1xuXG4gICAgICAgIG51bWJlciA9ICcnO1xuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICAgICAgaWYgKGNoICE9PSAnMCcgJiYgY2ggIT09ICcxJykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChudW1iZXIubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAvLyBvbmx5IDBiIG9yIDBCXG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoY2gpIHx8IGlzRGVjaW1hbERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uTnVtZXJpY0xpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogcGFyc2VJbnQobnVtYmVyLCAyKSxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuT2N0YWxMaXRlcmFsKHByZWZpeCwgc3RhcnQpIHtcbiAgICAgICAgdmFyIG51bWJlciwgb2N0YWw7XG5cbiAgICAgICAgaWYgKGlzT2N0YWxEaWdpdChwcmVmaXgpKSB7XG4gICAgICAgICAgICBvY3RhbCA9IHRydWU7XG4gICAgICAgICAgICBudW1iZXIgPSAnMCcgKyBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvY3RhbCA9IGZhbHNlO1xuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIG51bWJlciA9ICcnO1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoIWlzT2N0YWxEaWdpdChzb3VyY2VbaW5kZXhdKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghb2N0YWwgJiYgbnVtYmVyLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgLy8gb25seSAwbyBvciAwT1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0lkZW50aWZpZXJTdGFydChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpIHx8IGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uTnVtZXJpY0xpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogcGFyc2VJbnQobnVtYmVyLCA4KSxcbiAgICAgICAgICAgIG9jdGFsOiBvY3RhbCxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc0ltcGxpY2l0T2N0YWxMaXRlcmFsKCkge1xuICAgICAgICB2YXIgaSwgY2g7XG5cbiAgICAgICAgLy8gSW1wbGljaXQgb2N0YWwsIHVubGVzcyB0aGVyZSBpcyBhIG5vbi1vY3RhbCBkaWdpdC5cbiAgICAgICAgLy8gKEFubmV4IEIuMS4xIG9uIE51bWVyaWMgTGl0ZXJhbHMpXG4gICAgICAgIGZvciAoaSA9IGluZGV4ICsgMTsgaSA8IGxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpXTtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJzgnIHx8IGNoID09PSAnOScpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWlzT2N0YWxEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5OdW1lcmljTGl0ZXJhbCgpIHtcbiAgICAgICAgdmFyIG51bWJlciwgc3RhcnQsIGNoO1xuXG4gICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgYXNzZXJ0KGlzRGVjaW1hbERpZ2l0KGNoLmNoYXJDb2RlQXQoMCkpIHx8IChjaCA9PT0gJy4nKSxcbiAgICAgICAgICAgICdOdW1lcmljIGxpdGVyYWwgbXVzdCBzdGFydCB3aXRoIGEgZGVjaW1hbCBkaWdpdCBvciBhIGRlY2ltYWwgcG9pbnQnKTtcblxuICAgICAgICBzdGFydCA9IGluZGV4O1xuICAgICAgICBudW1iZXIgPSAnJztcbiAgICAgICAgaWYgKGNoICE9PSAnLicpIHtcbiAgICAgICAgICAgIG51bWJlciA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcblxuICAgICAgICAgICAgLy8gSGV4IG51bWJlciBzdGFydHMgd2l0aCAnMHgnLlxuICAgICAgICAgICAgLy8gT2N0YWwgbnVtYmVyIHN0YXJ0cyB3aXRoICcwJy5cbiAgICAgICAgICAgIC8vIE9jdGFsIG51bWJlciBpbiBFUzYgc3RhcnRzIHdpdGggJzBvJy5cbiAgICAgICAgICAgIC8vIEJpbmFyeSBudW1iZXIgaW4gRVM2IHN0YXJ0cyB3aXRoICcwYicuXG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAnMCcpIHtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd4JyB8fCBjaCA9PT0gJ1gnKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FuSGV4TGl0ZXJhbChzdGFydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ2InIHx8IGNoID09PSAnQicpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5CaW5hcnlMaXRlcmFsKHN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAnbycgfHwgY2ggPT09ICdPJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2Nhbk9jdGFsTGl0ZXJhbChjaCwgc3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpc09jdGFsRGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0ltcGxpY2l0T2N0YWxMaXRlcmFsKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FuT2N0YWxMaXRlcmFsKGNoLCBzdGFydCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHdoaWxlIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjaCA9PT0gJy4nKSB7XG4gICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgd2hpbGUgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNoID09PSAnZScgfHwgY2ggPT09ICdFJykge1xuICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcblxuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICAgICAgaWYgKGNoID09PSAnKycgfHwgY2ggPT09ICctJykge1xuICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgICAgIHdoaWxlIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uTnVtZXJpY0xpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogcGFyc2VGbG9hdChudW1iZXIpLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjguNCBTdHJpbmcgTGl0ZXJhbHNcblxuICAgIGZ1bmN0aW9uIHNjYW5TdHJpbmdMaXRlcmFsKCkge1xuICAgICAgICB2YXIgc3RyID0gJycsIHF1b3RlLCBzdGFydCwgY2gsIHVuZXNjYXBlZCwgb2N0VG9EZWMsIG9jdGFsID0gZmFsc2U7XG5cbiAgICAgICAgcXVvdGUgPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICBhc3NlcnQoKHF1b3RlID09PSAnXFwnJyB8fCBxdW90ZSA9PT0gJ1wiJyksXG4gICAgICAgICAgICAnU3RyaW5nIGxpdGVyYWwgbXVzdCBzdGFydHMgd2l0aCBhIHF1b3RlJyk7XG5cbiAgICAgICAgc3RhcnQgPSBpbmRleDtcbiAgICAgICAgKytpbmRleDtcblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuXG4gICAgICAgICAgICBpZiAoY2ggPT09IHF1b3RlKSB7XG4gICAgICAgICAgICAgICAgcXVvdGUgPSAnJztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgICAgIGlmICghY2ggfHwgIWlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjaCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd1JzpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAneCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gc2NhblVuaWNvZGVDb2RlUG9pbnRFc2NhcGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5lc2NhcGVkID0gc2NhbkhleEVzY2FwZShjaCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF1bmVzY2FwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IHVuZXNjYXBlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICduJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdyJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxyJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd0JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFx0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdiJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxiJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdmJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxmJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFx4MEInO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJzgnOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2N0YWxEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvY3RUb0RlYyA9IG9jdGFsVG9EZWNpbWFsKGNoKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9jdGFsID0gb2N0VG9EZWMub2N0YWwgfHwgb2N0YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUob2N0VG9EZWMuY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICdcXHInICYmIHNvdXJjZVtpbmRleF0gPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocXVvdGUgIT09ICcnKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLlN0cmluZ0xpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogc3RyLFxuICAgICAgICAgICAgb2N0YWw6IG9jdGFsLFxuICAgICAgICAgICAgbGluZU51bWJlcjogc3RhcnRMaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBzdGFydExpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMS44LjYgVGVtcGxhdGUgTGl0ZXJhbCBMZXhpY2FsIENvbXBvbmVudHNcblxuICAgIGZ1bmN0aW9uIHNjYW5UZW1wbGF0ZSgpIHtcbiAgICAgICAgdmFyIGNvb2tlZCA9ICcnLCBjaCwgc3RhcnQsIHJhd09mZnNldCwgdGVybWluYXRlZCwgaGVhZCwgdGFpbCwgcmVzdG9yZSwgdW5lc2NhcGVkO1xuXG4gICAgICAgIHRlcm1pbmF0ZWQgPSBmYWxzZTtcbiAgICAgICAgdGFpbCA9IGZhbHNlO1xuICAgICAgICBzdGFydCA9IGluZGV4O1xuICAgICAgICBoZWFkID0gKHNvdXJjZVtpbmRleF0gPT09ICdgJyk7XG4gICAgICAgIHJhd09mZnNldCA9IDI7XG5cbiAgICAgICAgKytpbmRleDtcblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgaWYgKGNoID09PSAnYCcpIHtcbiAgICAgICAgICAgICAgICByYXdPZmZzZXQgPSAxO1xuICAgICAgICAgICAgICAgIHRhaWwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRlcm1pbmF0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJyQnKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICBzdGF0ZS5jdXJseVN0YWNrLnB1c2goJyR7Jyk7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHRlcm1pbmF0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29va2VkICs9IGNoO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICAgICAgaWYgKCFpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY2gpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbic6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcbic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAncic6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xccic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcdCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndSc6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3gnOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9IHNjYW5Vbmljb2RlQ29kZVBvaW50RXNjYXBlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3RvcmUgPSBpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmVzY2FwZWQgPSBzY2FuSGV4RXNjYXBlKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodW5lc2NhcGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSB1bmVzY2FwZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXggPSByZXN0b3JlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2InOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXGInO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2YnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXGYnO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3YnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXHYnO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJzAnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWxsZWdhbDogXFwwMSBcXDAyIGFuZCBzbyBvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLlRlbXBsYXRlT2N0YWxMaXRlcmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXDAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc09jdGFsRGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWxsZWdhbDogXFwxIFxcMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuVGVtcGxhdGVPY3RhbExpdGVyYWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAnXFxyJyAmJiBzb3VyY2VbaW5kZXhdID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAnXFxyJyAmJiBzb3VyY2VbaW5kZXhdID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcbic7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvb2tlZCArPSBjaDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGVybWluYXRlZCkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghaGVhZCkge1xuICAgICAgICAgICAgc3RhdGUuY3VybHlTdGFjay5wb3AoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5UZW1wbGF0ZSxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgICAgY29va2VkOiBjb29rZWQsXG4gICAgICAgICAgICAgICAgcmF3OiBzb3VyY2Uuc2xpY2Uoc3RhcnQgKyAxLCBpbmRleCAtIHJhd09mZnNldClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWFkOiBoZWFkLFxuICAgICAgICAgICAgdGFpbDogdGFpbCxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMS44LjUgUmVndWxhciBFeHByZXNzaW9uIExpdGVyYWxzXG5cbiAgICBmdW5jdGlvbiB0ZXN0UmVnRXhwKHBhdHRlcm4sIGZsYWdzKSB7XG4gICAgICAgIC8vIFRoZSBCTVAgY2hhcmFjdGVyIHRvIHVzZSBhcyBhIHJlcGxhY2VtZW50IGZvciBhc3RyYWwgc3ltYm9scyB3aGVuXG4gICAgICAgIC8vIHRyYW5zbGF0aW5nIGFuIEVTNiBcInVcIi1mbGFnZ2VkIHBhdHRlcm4gdG8gYW4gRVM1LWNvbXB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xIHx8ICQyLCAxNik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlUG9pbnQgPiAweDEwRkZGRikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obnVsbCwgTWVzc2FnZXMuSW52YWxpZFJlZ0V4cCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGVQb2ludCA8PSAweEZGRkYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKGNvZGVQb2ludCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFzdHJhbFN1YnN0aXR1dGU7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAvLyBSZXBsYWNlIGVhY2ggcGFpcmVkIHN1cnJvZ2F0ZSB3aXRoIGEgc2luZ2xlIEFTQ0lJIHN5bWJvbCB0b1xuICAgICAgICAgICAgICAgIC8vIGF2b2lkIHRocm93aW5nIG9uIHJlZ3VsYXIgZXhwcmVzc2lvbnMgdGhhdCBhcmUgb25seSB2YWxpZCBpblxuICAgICAgICAgICAgICAgIC8vIGNvbWJpbmF0aW9uIHdpdGggdGhlIFwidVwiIGZsYWcuXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoXG4gICAgICAgICAgICAgICAgICAgIC9bXFx1RDgwMC1cXHVEQkZGXVtcXHVEQzAwLVxcdURGRkZdL2csXG4gICAgICAgICAgICAgICAgICAgIGFzdHJhbFN1YnN0aXR1dGVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRmlyc3QsIGRldGVjdCBpbnZhbGlkIHJlZ3VsYXIgZXhwcmVzc2lvbnMuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBSZWdFeHAodG1wKTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICA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VtpbmRleCsrXTtcbiAgICAgICAgICAgICAgICAvLyBFQ01BLTI2MiA3LjguNVxuICAgICAgICAgICAgICAgIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKG51bGwsIE1lc3NhZ2VzLlVudGVybWluYXRlZFJlZ0V4cCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKG51bGwsIE1lc3NhZ2VzLlVudGVybWluYXRlZFJlZ0V4cCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNsYXNzTWFya2VyKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAnXScpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NNYXJrZXIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJy8nKSB7XG4gICAgICAgICAgICAgICAgICAgIHRlcm1pbmF0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnWycpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NNYXJrZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGVybWluYXRlZCkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obnVsbCwgTWVzc2FnZXMuVW50ZXJtaW5hdGVkUmVnRXhwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEV4Y2x1ZGUgbGVhZGluZyBhbmQgdHJhaWxpbmcgc2xhc2guXG4gICAgICAgIGJvZHkgPSBzdHIuc3Vic3RyKDEsIHN0ci5sZW5ndGggLSAyKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiBib2R5LFxuICAgICAgICAgICAgbGl0ZXJhbDogc3RyXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhblJlZ0V4cEZsYWdzKCkge1xuICAgICAgICB2YXIgY2gsIHN0ciwgZmxhZ3MsIHJlc3RvcmU7XG5cbiAgICAgICAgc3RyID0gJyc7XG4gICAgICAgIGZsYWdzID0gJyc7XG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICAgICAgaWYgKCFpc0lkZW50aWZpZXJQYXJ0KGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBpZiAoY2ggPT09ICdcXFxcJyAmJiBpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd1Jykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICByZXN0b3JlID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGNoID0gc2NhbkhleEVzY2FwZSgndScpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2gpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChzdHIgKz0gJ1xcXFx1JzsgcmVzdG9yZSA8IGluZGV4OyArK3Jlc3RvcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gc291cmNlW3Jlc3RvcmVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXggPSByZXN0b3JlO1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MgKz0gJ3UnO1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXFxcdSc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcXFwnO1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmxhZ3MgKz0gY2g7XG4gICAgICAgICAgICAgICAgc3RyICs9IGNoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiBmbGFncyxcbiAgICAgICAgICAgIGxpdGVyYWw6IHN0clxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5SZWdFeHAoKSB7XG4gICAgICAgIHZhciBzdGFydCwgYm9keSwgZmxhZ3MsIHZhbHVlO1xuICAgICAgICBzY2FubmluZyA9IHRydWU7XG5cbiAgICAgICAgbG9va2FoZWFkID0gbnVsbDtcbiAgICAgICAgc2tpcENvbW1lbnQoKTtcbiAgICAgICAgc3RhcnQgPSBpbmRleDtcblxuICAgICAgICBib2R5ID0gc2NhblJlZ0V4cEJvZHkoKTtcbiAgICAgICAgZmxhZ3MgPSBzY2FuUmVnRXhwRmxhZ3MoKTtcbiAgICAgICAgdmFsdWUgPSB0ZXN0UmVnRXhwKGJvZHkudmFsdWUsIGZsYWdzLnZhbHVlKTtcbiAgICAgICAgc2Nhbm5pbmcgPSBmYWxzZTtcbiAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFRva2VuLlJlZ3VsYXJFeHByZXNzaW9uLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgICAgICByZWdleDoge1xuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBib2R5LnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICBmbGFnczogZmxhZ3MudmFsdWVcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgbGl0ZXJhbDogYm9keS5saXRlcmFsICsgZmxhZ3MubGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgIHJlZ2V4OiB7XG4gICAgICAgICAgICAgICAgcGF0dGVybjogYm9keS52YWx1ZSxcbiAgICAgICAgICAgICAgICBmbGFnczogZmxhZ3MudmFsdWVcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY29sbGVjdFJlZ2V4KCkge1xuICAgICAgICB2YXIgcG9zLCBsb2MsIHJlZ2V4LCB0b2tlbjtcblxuICAgICAgICBza2lwQ29tbWVudCgpO1xuXG4gICAgICAgIHBvcyA9IGluZGV4O1xuICAgICAgICBsb2MgPSB7XG4gICAgICAgICAgICBzdGFydDoge1xuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHJlZ2V4ID0gc2NhblJlZ0V4cCgpO1xuXG4gICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICB9O1xuXG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmICghZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgIC8vIFBvcCB0aGUgcHJldmlvdXMgdG9rZW4sIHdoaWNoIGlzIGxpa2VseSAnLycgb3IgJy89J1xuICAgICAgICAgICAgaWYgKGV4dHJhLnRva2Vucy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBleHRyYS50b2tlbnNbZXh0cmEudG9rZW5zLmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgICAgIGlmICh0b2tlbi5yYW5nZVswXSA9PT0gcG9zICYmIHRva2VuLnR5cGUgPT09ICdQdW5jdHVhdG9yJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09ICcvJyB8fCB0b2tlbi52YWx1ZSA9PT0gJy89Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEudG9rZW5zLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleHRyYS50b2tlbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgdHlwZT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ZXl3b3JkKGV4dHJhLnRva2VuVmFsdWVzW2V4dHJhLm9wZW5DdXJseVRva2VuIC0gNF0pKSB7XG4gICAgICAgICAgICAgICAgLy8gTmFtZWQgZnVuY3Rpb24sIGUuZy4gZnVuY3Rpb24gZigpe30gLzQyL1xuICAgICAgICAgICAgICAgIGNoZWNrID0gZXh0cmEudG9rZW5WYWx1ZXNbZXh0cmEub3BlbkN1cmx5VG9rZW4gLSA1XTtcbiAgICAgICAgICAgICAgICByZWdleCA9IGNoZWNrID8gKEZuRXhwclRva2Vucy5pbmRleE9mKGNoZWNrKSA8IDApIDogdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZWdleCA/IGNvbGxlY3RSZWdleCgpIDogc2NhblB1bmN0dWF0b3IoKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBhZHZhbmNlKCkge1xuICAgICAgICB2YXIgY3AsIHRva2VuO1xuXG4gICAgICAgIGlmIChpbmRleCA+PSBsZW5ndGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgdHlwZTogVG9rZW4uRU9GLFxuICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICAgICAgc3RhcnQ6IGluZGV4LFxuICAgICAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBjcCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KTtcblxuICAgICAgICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoY3ApKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHNjYW5JZGVudGlmaWVyKCk7XG4gICAgICAgICAgICBpZiAoc3RyaWN0ICYmIGlzU3RyaWN0TW9kZVJlc2VydmVkV29yZCh0b2tlbi52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICB0b2tlbi50eXBlID0gVG9rZW4uS2V5d29yZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFZlcnkgY29tbW9uOiAoIGFuZCApIGFuZCA7XG4gICAgICAgIGlmIChjcCA9PT0gMHgyOCB8fCBjcCA9PT0gMHgyOSB8fCBjcCA9PT0gMHgzQikge1xuICAgICAgICAgICAgcmV0dXJuIHNjYW5QdW5jdHVhdG9yKCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTdHJpbmcgbGl0ZXJhbCBzdGFydHMgd2l0aCBzaW5nbGUgcXVvdGUgKFUrMDAyNykgb3IgZG91YmxlIHF1b3RlIChVKzAwMjIpLlxuICAgICAgICBpZiAoY3AgPT09IDB4MjcgfHwgY3AgPT09IDB4MjIpIHtcbiAgICAgICAgICAgIHJldHVybiBzY2FuU3RyaW5nTGl0ZXJhbCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRG90ICguKSBVKzAwMkUgY2FuIGFsc28gc3RhcnQgYSBmbG9hdGluZy1wb2ludCBudW1iZXIsIGhlbmNlIHRoZSBuZWVkXG4gICAgICAgIC8vIHRvIGNoZWNrIHRoZSBuZXh0IGNoYXJhY3Rlci5cbiAgICAgICAgaWYgKGNwID09PSAweDJFKSB7XG4gICAgICAgICAgICBpZiAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2Nhbk51bWVyaWNMaXRlcmFsKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc2NhblB1bmN0dWF0b3IoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0RlY2ltYWxEaWdpdChjcCkpIHtcbiAgICAgICAgICAgIHJldHVybiBzY2FuTnVtZXJpY0xpdGVyYWwoKTtcbiAgICAgICA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1xuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHRva2VuID0gYWR2YW5jZSgpO1xuICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAodG9rZW4udHlwZSAhPT0gVG9rZW4uRU9GKSB7XG4gICAgICAgICAgICB2YWx1ZSA9IHNvdXJjZS5zbGljZSh0b2tlbi5zdGFydCwgdG9rZW4uZW5kKTtcbiAgICAgICAgICAgIGVudHJ5ID0ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFRva2VuTmFtZVt0b2tlbi50eXBlXSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWUsXG4gICAgICAgICAgICAgICAgcmFuZ2U6IFt0b2tlbi5zdGFydCwgdG9rZW4uZW5kXSxcbiAgICAgICAgICAgICAgICBsb2M6IGxvY1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmICh0b2tlbi5yZWdleCkge1xuICAgICAgICAgICAgICAgIGVudHJ5LnJlZ2V4ID0ge1xuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiB0b2tlbi5yZWdleC5wYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBmbGFnczogdG9rZW4ucmVnZXguZmxhZ3NcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLnRva2VuVmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEudG9rZW5WYWx1ZXMucHVzaCgoZW50cnkudHlwZSA9PT0gJ1B1bmN0dWF0b3InIHx8IGVudHJ5LnR5cGUgPT09ICdLZXl3b3JkJykgPyBlbnRyeS52YWx1ZSA6IG51bGwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFleHRyYS5yYW5nZSkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgZW50cnkucmFuZ2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghZXh0cmEubG9jKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBlbnRyeS5sb2M7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChleHRyYS5kZWxlZ2F0ZSkge1xuICAgICAgICAgICAgICAgICAgICBlbnRyeSA9IGV4dHJhLmRlbGVnYXRlKGVudHJ5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHRyYS50b2tlbnMucHVzaChlbnRyeSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbGV4KCkge1xuICAgICAgICB2YXIgdG9rZW47XG4gICAgICAgIHNjYW5uaW5nID0gdHJ1ZTtcblxuICAgICAgICBsYXN0SW5kZXggPSBpbmRleDtcbiAgICAgICAgbGFzdExpbmVOdW1iZXIgPSBsaW5lTnVtYmVyO1xuICAgICAgICBsYXN0TGluZVN0YXJ0ID0gbGluZVN0YXJ0O1xuXG4gICAgICAgIHNraXBDb21tZW50KCk7XG5cbiAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG5cbiAgICAgICAgc3RhcnRJbmRleCA9IGluZGV4O1xuICAgICAgICBzdGFydExpbmVOdW1iZXIgPSBsaW5lTnVtYmVyO1xuICAgICAgICBzdGFydExpbmVTdGFydCA9IGxpbmVTdGFydDtcblxuICAgICAgICBsb29rYWhlYWQgPSAodHlwZW9mIGV4dHJhLnRva2VucyAhPT0gJ3VuZGVmaW5lZCcpID8gY29sbG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ZW4ubGluZU51bWJlcixcbiAgICAgICAgICAgIGNvbHVtbjogc3RhcnRUb2tlbi5zdGFydCAtIHN0YXJ0VG9rZW4ubGluZVN0YXJ0XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuZW5kID0gbnVsbDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBOb2RlKCkge1xuICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgIHRoaXMucmFuZ2UgPSBbc3RhcnRJbmRleCwgMF07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV4dHJhLmxvYykge1xuICAgICAgICAgICAgdGhpcy5sb2MgPSBuZXcgU291cmNlTG9jYXRpb24oKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIFdyYXBwaW5nTm9kZShzdGFydFRva2VuKSB7XG4gICAgICAgIGlmIChleHRyYS5yYW5nZSkge1xuICAgICAgICAgICAgdGhpcy5yYW5nZSA9IFtzdGFydFRva2VuLnN0YXJ0LCAwXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZXh0cmEubG9jKSB7XG4gICAgICAgICAgICB0aGlzLmxvYyA9IG5ldyBXcmFwcGluZ1NvdXJjZUxvY2F0aW9uKHN0YXJ0VG9rZW4pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgV3JhcHBpbmdOb2RlLnByb3RvdHlwZSA9IE5vZGUucHJvdG90eXBlID0ge1xuXG4gICAgICAgIHByb2Nlc3NDb21tZW50OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgbGFzdENoaWxkLFxuICAgICAgICAgICAgICAgIGlubmVyQ29tbWVudHMsXG4gICAgICAgICAgICAgICAgbGVhZGluZ0NvbW1lbnRzLFxuICAgICAgICAgICAgICAgIHRyYWlsaW5nQ29tbWVudHMsXG4gICAgICAgICAgICAgICAgYm90dG9tUmlnaHQgPSBleHRyYS5ib3R0b21SaWdodFN0YWNrLFxuICAgICAgICAgICAgICAgIGksXG4gICAgICAgICAgICAgICAgY29tbWVudCxcbiAgICAgICAgICAgICAgICBsYXN0ID0gYm90dG9tUmlnaHRbYm90dG9tUmlnaHQubGVuZ3RoIC0gMV07XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnR5cGUgPT09IFN5bnRheC5Qcm9ncmFtKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuYm9keS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIHBhdGNoIGlubm5lckNvbW1lbnRzIGZvciBwcm9wZXJ0aWVzIGVtcHR5IGJsb2NrXG4gICAgICAgICAgICAgKiBgZnVuY3Rpb24gYSgpIHsvKiogY29tbWVudHMgKipcXC99YFxuICAgICAgICAgICAgICovXG5cbiAgICAgICAgICAgIGlmICh0aGlzLnR5cGUgPT09IFN5bnRheC5CbG9ja1N0YXRlbWVudCAmJiB0aGlzLmJvZHkubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgaW5uZXJDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IGV4dHJhLmxlYWRpbmdDb21tZW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gZXh0cmEubGVhZGluZ0NvbW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5yYW5nZVsxXSA+PSBjb21tZW50LnJhbmdlWzFdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbm5lckNvbW1lbnRzLnVuc2hpZnQoY29tbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYS5sZWFkaW5nQ29tbWVudHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlubmVyQ29tbWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5uZXJDb21tZW50cyA9IGlubmVyQ29tbWVudHM7XG4gICAgICAgICAgICAgICAgICAgIC8vYm90dG9tUmlnaHQucHVzaCh0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGV4dHJhLnRyYWlsaW5nQ29tbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHRyYWlsaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBleHRyYS50cmFpbGluZ0NvbW1lbnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBleHRyYS50cmFpbGluZ0NvbW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5yYW5nZVswXSA+PSB0aGlzLnJhbmdlWzFdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFpbGluZ0NvbW1lbnRzLnVuc2hpZnQoY29tbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYS50cmFpbGluZ0NvbW1lbnRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBleHRyYS50cmFpbGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChsYXN0ICYmIGxhc3QudHJhaWxpbmdDb21tZW50cyAmJiBsYXN0LnRyYWlsaW5nQ29tbWVudHNbMF0ucmFuZ2VbMF0gPj0gdGhpcy5yYW5nZVsxXSkge1xuICAgICAgICAgICAgICAgICAgICB0cmFpbGluZ0NvbW1lbnRzID0gbGFzdC50cmFpbGluZ0NvbW1lbnRzO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgbGFzdC50cmFpbGluZ0NvbW1lbnRzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRWF0aW5nIHRoZSBzdGFjay5cbiAgICAgICAgICAgIHdoaWxlIChsYXN0ICYmIGxhc3QucmFuZ2VbMF0gPj0gdGhpcy5yYW5nZVswXSkge1xuICAgICAgICAgICAgICAgIGxhc3RDaGlsZCA9IGJvdHRvbVJpZ2h0LnBvcCgpO1xuICAgICAgICAgICAgICAgIGxhc3QgPSBib3R0b21SaWdodFtib3R0b21SaWdodC5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGxhc3RDaGlsZCkge1xuICAgICAgICAgICAgICAgIGlmIChsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlYWRpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSBsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gbGFzdENoaWxkLmxlYWRpbmdDb21tZW50c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50LnJhbmdlWzFdIDw9IHRoaXMucmFuZ2VbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWFkaW5nQ29tbWVudHMudW5zaGlmdChjb21tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICghbGFzdENoaWxkLmxlYWRpbmdDb21tZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHMgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGV4dHJhLmxlYWRpbmdDb21tZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgbGVhZGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChpID0gZXh0cmEubGVhZGluZ0NvbW1lbnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBleHRyYS5sZWFkaW5nQ29tbWVudHNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50LnJhbmdlWzFdIDw9IHRoaXMucmFuZ2VbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlYWRpbmdDb21tZW50cy51bnNoaWZ0KGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEubGVhZGluZ0NvbW1lbnRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICBpZiAobGVhZGluZ0NvbW1lbnRzICYmIGxlYWRpbmdDb21tZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sZWFkaW5nQ29tbWVudHMgPSBsZWFkaW5nQ29tbWVudHM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHJhaWxpbmdDb21tZW50cyAmJiB0cmFpbGluZ0NvbW1lbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRyYWlsaW5nQ29tbWVudHMgPSB0cmFpbGluZ0NvbW1lbnRzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBib3R0b21SaWdodC5wdXNoKHRoaXMpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yYW5nZVsxXSA9IGxhc3RJbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS5sb2MpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxvYy5lbmQgPSB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmU6IGxhc3RMaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGxhc3RJbmRleCAtIGxhc3RMaW5lU3RhcnRcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChleHRyYS5zb3VyY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2Muc291cmNlID0gZXh0cmEuc291cmNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGV4dHJhLmF0dGFjaENvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnByb2Nlc3NDb21tZW50KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQXJyYXlFeHByZXNzaW9uOiBmdW5jdGlvbiAoZWxlbWVudHMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5BcnJheUV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmVsZW1lbnRzID0gZWxlbWVudHM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQXJyYXlQYXR0ZXJuOiBmdW5jdGlvbiAoZWxlbWVudHMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5BcnJheVBhdHRlcm47XG4gICAgICAgICAgICB0aGlzLmVsZW1lbnRzID0gZWxlbWVudHM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQXJyb3dGdW5jdGlvbkV4cHJlc3Npb246IGZ1bmN0aW9uIChwYXJhbXMsIGRlZmF1bHRzLCBib2R5LCBleHByZXNzaW9uKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQXJyb3dGdW5jdGlvbkV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmlkID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMucGFyYW1zID0gcGFyYW1zO1xuICAgICAgICAgICAgdGhpcy5kZWZhdWx0cyA9IGRlZmF1bHRzO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZ2VuZXJhdG9yID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLmV4cHJlc3Npb24gPSBleHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEFzc2lnbm1lbnRFeHByZXNzaW9uOiBmdW5jdGlvbiAob3BlcmF0b3IsIGxlZnQsIHJpZ2h0KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQXNzaWdubWVudEV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLm9wZXJhdG9yID0gb3BlcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmxlZnQgPSBsZWZ0O1xuICAgICAgICAgICAgdGhpcy5yaWdodCA9IHJpZ2h0O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEFzc2lnbm1lbnRQYXR0ZXJuOiBmdW5jdGlvbiAobGVmdCwgcmlnaHQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Bc3NpZ25tZW50UGF0dGVybjtcbiAgICAgICAgICAgIHRoaXMubGVmdCA9IGxlZnQ7XG4gICAgICAgICAgICB0aGlzLnJpZ2h0ID0gcmlnaHQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQmluYXJ5RXhwcmVzc2lvbjogZnVuY3Rpb24gKG9wZXJhdG9yLCBsZWZ0LCByaWdodCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gKG9wZXJhdG9yID09PSAnfHwnIHx8IG9wZXJhdG9yID09PSAnJiYnKSA/IFN5bnRheC5Mb2dpY2FsRXhwcmVzc2lvbiA6IFN5bnRheC5CaW5hcnlFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5vcGVyYXRvciA9IG9wZXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5sZWZ0ID0gbGVmdDtcbiAgICAgICAgICAgIHRoaXMucmlnaHQgPSByaWdodDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hCbG9ja1N0YXRlbWVudDogZnVuY3Rpb24gKGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5CbG9ja1N0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQnJlYWtTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkJyZWFrU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5sYWJlbCA9IGxhYmVsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENhbGxFeHByZXNzaW9uOiBmdW5jdGlvbiAoY2FsbGVlLCBhcmdzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ2FsbEV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmNhbGxlZSA9IGNhbGxlZTtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnRzID0gYXJncztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDYXRjaENsYXVzZTogZnVuY3Rpb24gKHBhcmFtLCBib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ2F0Y2hDbGF1c2U7XG4gICAgICAgICAgICB0aGlzLnBhcmFtID0gcGFyYW07XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENsYXNzQm9keTogZnVuY3Rpb24gKGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5DbGFzc0JvZHk7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENsYXNzRGVjbGFyYXRpb246IGZ1bmN0aW9uIChpZCwgc3VwZXJDbGFzcywgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNsYXNzRGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmlkID0gaWQ7XG4gICAgICAgICAgICB0aGlzLnN1cGVyQ2xhc3MgPSBzdXBlckNsYXNzO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDbGFzc0V4cHJlc3Npb246IGZ1bmN0aW9uIChpZCwgc3VwZXJDbGFzcywgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNsYXNzRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuaWQgPSBpZDtcbiAgICAgICAgICAgIHRoaXMuc3VwZXJDbGFzcyA9IHN1cGVyQ2xhc3M7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENvbmRpdGlvbmFsRXhwcmVzc2lvbjogZnVuY3Rpb24gKHRlc3QsIGNvbnNlcXVlbnQsIGFsdGVybmF0ZSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNvbmRpdGlvbmFsRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLmNvbnNlcXVlbnQgPSBjb25zZXF1ZW50O1xuICAgICAgICAgICAgdGhpcy5hbHRlcm5hdGUgPSBhbHRlcm5hdGU7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ29udGludWVTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNvbnRpbnVlU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5sYWJlbCA9IGxhYmVsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaERlYnVnZ2VyU3RhdGVtZW50OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRGVidWdnZXJTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRG9XaGlsZVN0YXRlbWVudDogZnVuY3Rpb24gKGJvZHksIHRlc3QpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Eb1doaWxlU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRW1wdHlTdGF0ZW1lbnQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5FbXB0eVN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hFeHByZXNzaW9uU3RhdGVtZW50OiBmdW5jdGlvbiAoZXhwcmVzc2lvbikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkV4cHJlc3Npb25TdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmV4cHJlc3Npb24gPSBleHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEZvclN0YXRlbWVudDogZnVuY3Rpb24gKGluaXQsIHRlc3QsIHVwZGF0ZSwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkZvclN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuaW5pdCA9IGluaXQ7XG4gICAgICAgICAgICB0aGlzLnRlc3QgPSB0ZXN0O1xuICAgICAgICAgICAgdGhpcy51cGRhdGUgPSB1cGRhdGU7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEZvck9mU3RhdGVtZW50OiBmdW5jdGlvbiAobGVmdCwgcmlnaHQsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Gb3JPZlN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMubGVmdCA9IGxlZnQ7XG4gICAgICAgICAgICB0aGlzLnJpZ2h0ID0gcmlnaHQ7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEZvckluU3RhdGVtZW50OiBmdW5jdGlvbiAobGVmdCwgcmlnaHQsIGJ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ICAgdGhpcy5wYXJhbXMgPSBwYXJhbXM7XG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRzID0gZGVmYXVsdHM7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5nZW5lcmF0b3IgPSBnZW5lcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmV4cHJlc3Npb24gPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hJZGVudGlmaWVyOiBmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LklkZW50aWZpZXI7XG4gICAgICAgICAgICB0aGlzLm5hbWUgPSBuYW1lO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaElmU3RhdGVtZW50OiBmdW5jdGlvbiAodGVzdCwgY29uc2VxdWVudCwgYWx0ZXJuYXRlKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguSWZTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLnRlc3QgPSB0ZXN0O1xuICAgICAgICAgICAgdGhpcy5jb25zZXF1ZW50ID0gY29uc2VxdWVudDtcbiAgICAgICAgICAgIHRoaXMuYWx0ZXJuYXRlID0gYWx0ZXJuYXRlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaExhYmVsZWRTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkxhYmVsZWRTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmxhYmVsID0gbGFiZWw7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaExpdGVyYWw6IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkxpdGVyYWw7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB0aGlzLnJhdyA9IHNvdXJjZS5zbGljZSh0b2tlbi5zdGFydCwgdG9rZW4uZW5kKTtcbiAgICAgICAgICAgIGlmICh0b2tlbi5yZWdleCkge1xuICAgICAgICAgICAgICAgIHRoaXMucmVnZXggPSB0b2tlbi5yZWdleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hNZW1iZXJFeHByZXNzaW9uOiBmdW5jdGlvbiAoYWNjZXNzb3IsIG9iamVjdCwgcHJvcGVydHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5NZW1iZXJFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5jb21wdXRlZCA9IGFjY2Vzc29yID09PSAnWyc7XG4gICAgICAgICAgICB0aGlzLm9iamVjdCA9IG9iamVjdDtcbiAgICAgICAgICAgIHRoaXMucHJvcGVydHkgPSBwcm9wZXJ0eTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hNZXRhUHJvcGVydHk6IGZ1bmN0aW9uIChtZXRhLCBwcm9wZXJ0eSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4Lk1ldGFQcm9wZXJ0eTtcbiAgICAgICAgICAgIHRoaXMubWV0YSA9IG1ldGE7XG4gICAgICAgICAgICB0aGlzLnByb3BlcnR5ID0gcHJvcGVydHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTmV3RXhwcmVzc2lvbjogZnVuY3Rpb24gKGNhbGxlZSwgYXJncykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4Lk5ld0V4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmNhbGxlZSA9IGNhbGxlZTtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnRzID0gYXJncztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hPYmplY3RFeHByZXNzaW9uOiBmdW5jdGlvbiAocHJvcGVydGllcykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4Lk9iamVjdEV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLnByb3BlcnRpZXMgPSBwcm9wZXJ0aWVzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaE9iamVjdFBhdHRlcm46IGZ1bmN0aW9uIChwcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguT2JqZWN0UGF0dGVybjtcbiAgICAgICAgICAgIHRoaXMucHJvcGVydGllcyA9IHByb3BlcnRpZXM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoUG9zdGZpeEV4cHJlc3Npb246IGZ1bmN0aW9uIChvcGVyYXRvciwgYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5VcGRhdGVFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5vcGVyYXRvciA9IG9wZXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5wcmVmaXggPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hQcm9ncmFtOiBmdW5jdGlvbiAoYm9keSwgc291cmNlVHlwZSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlByb2dyYW07XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5zb3VyY2VUeXBlID0gc291cmNlVHlwZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hQcm9wZXJ0eTogZnVuY3Rpb24gKGtpbmQsIGtleSwgY29tcHV0ZWQsIHZhbHVlLCBtZXRob2QsIHNob3J0aGFuZCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlByb3BlcnR5O1xuICAgICAgICAgICAgdGhpcy5rZXkgPSBrZXk7XG4gICAgICAgICAgICB0aGlzLmNvbXB1dGVkID0gY29tcHV0ZWQ7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLmtpbmQgPSBraW5kO1xuICAgICAgICAgICAgdGhpcy5tZXRob2QgPSBtZXRob2Q7XG4gICAgICAgICAgICB0aGlzLnNob3J0aGFuZCA9IHNob3J0aGFuZDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZ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1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hTd2l0Y2hDYXNlOiBmdW5jdGlvbiAodGVzdCwgY29uc2VxdWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlN3aXRjaENhc2U7XG4gICAgICAgICAgICB0aGlzLnRlc3QgPSB0ZXN0O1xuICAgICAgICAgICAgdGhpcy5jb25zZXF1ZW50ID0gY29uc2VxdWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hTdXBlcjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlN1cGVyO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFN3aXRjaFN0YXRlbWVudDogZnVuY3Rpb24gKGRpc2NyaW1pbmFudCwgY2FzZXMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Td2l0Y2hTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmRpc2NyaW1pbmFudCA9IGRpc2NyaW1pbmFudDtcbiAgICAgICAgICAgIHRoaXMuY2FzZXMgPSBjYXNlcztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUYWdnZWRUZW1wbGF0ZUV4cHJlc3Npb246IGZ1bmN0aW9uICh0YWcsIHF1YXNpKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVGFnZ2VkVGVtcGxhdGVFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy50YWcgPSB0YWc7XG4gICAgICAgICAgICB0aGlzLnF1YXNpID0gcXVhc2k7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVGVtcGxhdGVFbGVtZW50OiBmdW5jdGlvbiAodmFsdWUsIHRhaWwpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UZW1wbGF0ZUVsZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLnRhaWwgPSB0YWlsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRlbXBsYXRlTGl0ZXJhbDogZnVuY3Rpb24gKHF1YXNpcywgZXhwcmVzc2lvbnMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UZW1wbGF0ZUxpdGVyYWw7XG4gICAgICAgICAgICB0aGlzLnF1YXNpcyA9IHF1YXNpcztcbiAgICAgICAgICAgIHRoaXMuZXhwcmVzc2lvbnMgPSBleHByZXNzaW9ucztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUaGlzRXhwcmVzc2lvbjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRoaXNFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRocm93U3RhdGVtZW50OiBmdW5jdGlvbiAoYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UaHJvd1N0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnQgPSBhcmd1bWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUcnlTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChibG9jaywgaGFuZGxlciwgZmluYWxpemVyKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVHJ5U3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5ibG9jayA9IGJsb2NrO1xuICAgICAgICAgICAgdGhpcy5ndWFyZGVkSGFuZGxlcnMgPSBbXTtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlcnMgPSBoYW5kbGVyID8gW2hhbmRsZXJdIDogW107XG4gICAgICAgICAgICB0aGlzLmhhbmRsZXIgPSBoYW5kbGVyO1xuICAgICAgICAgICAgdGhpcy5maW5hbGl6ZXIgPSBmaW5hbGl6ZXI7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVW5hcnlFeHByZXNzaW9uOiBmdW5jdGlvbiAob3BlcmF0b3IsIGFyZ3VtZW50KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSAob3BlcmF0b3IgPT09ICcrKycgfHwgb3BlcmF0b3IgPT09ICctLScpID8gU3ludGF4LlVwZGF0ZUV4cHJlc3Npb24gOiBTeW50YXguVW5hcnlFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5vcGVyYXRvciA9IG9wZXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5wcmVmaXggPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFZhcmlhYmxlRGVjbGFyYXRpb246IGZ1bmN0aW9uIChkZWNsYXJhdGlvbnMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5WYXJpYWJsZURlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5kZWNsYXJhdGlvbnMgPSBkZWNsYXJhdGlvbnM7XG4gICAgICAgICAgICB0aGlzLmtpbmQgPSAndmFyJztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hMZXhpY2FsRGVjbGFyYXRpb246IGZ1bmN0aW9uIChkZWNsYXJhdGlvbnMsIGtpbmQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5WYXJpYWJsZURlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5kZWNsYXJhdGlvbnMgPSBkZWNsYXJhdGlvbnM7XG4gICAgICAgICAgICB0aGlzLmtpbmQgPSBraW5kO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFZhcmlhYmxlRGVjbGFyYXRvcjogZnVuY3Rpb24gKGlkLCBpbml0KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVmFyaWFibGVEZWNsYXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5pZCA9IGlkO1xuICAgICAgICAgICAgdGhpcy5pbml0ID0gaW5pdDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hXaGlsZVN0YXRlbWVudDogZnVuY3Rpb24gKHRlc3QsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5XaGlsZVN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFdpdGhTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChvYmplY3QsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5XaXRoU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5vYmplY3QgPSBvYmplY3Q7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEV4cG9ydFNwZWNpZmllcjogZnVuY3Rpb24gKGxvY2FsLCBleHBvcnRlZCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkV4cG9ydFNwZWNpZmllcjtcbiAgICAgICAgICAgIHRoaXMuZXhwb3J0ZWQgPSBleHBvcnRlZCB8fCBsb2NhbDtcbiAgICAgICAgICAgIHRoaXMubG9jYWwgPSBsb2NhbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hJbXBvcnREZWZhdWx0U3BlY2lmaWVyOiBmdW5jdGlvbiAobG9jYWwpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5JbXBvcnREZWZhdWx0U3BlY2lmaWVyO1xuICAgICAgICAgICAgdGhpcy5sb2NhbCA9IGxvY2FsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEltcG9ydE5hbWVzcGFjZVNwZWNpZmllcjogZnVuY3Rpb24gKGxvY2FsKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyO1xuICAgICAgICAgICAgdGhpcy5sb2NhbCA9IGxvY2FsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEV4cG9ydE5hbWVkRGVjbGFyYXRpb246IGZ1bmN0aW9uIChkZWNsYXJhdGlvbiwgc3BlY2lmaWVycywgc3JjKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRXhwb3J0TmFtZWREZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuZGVjbGFyYXRpb24gPSBkZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuc3BlY2lmaWVycyA9IHNwZWNpZmllcnM7XG4gICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNyYztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hFeHBvcnREZWZhdWx0RGVjbGFyYXRpb246IGZ1bmN0aW9uIChkZWNsYXJhdGlvbikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkV4cG9ydERlZmF1bHREZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuZGVjbGFyYXRpb24gPSBkZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hFeHBvcnRBbGxEZWNsYXJhdGlvbjogZnVuY3Rpb24gKHNyYykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkV4cG9ydEFsbERlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5zb3VyY2UgPSBzcmM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoSW1wb3J0U3BlY2lmaWVyOiBmdW5jdGlvbiAobG9jYWwsIGltcG9ydGVkKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguSW1wb3J0U3BlY2lmaWVyO1xuICAgICAgICAgICAgdGhpcy5sb2NhbCA9IGxvY2FsIHx8IGltcG9ydGVkO1xuICAgICAgICAgICAgdGhpcy5pbXBvcnRlZCA9IGltcG9ydGVkO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEltcG9ydERlY2xhcmF0aW9uOiBmdW5jdGlvbiAoc3BlY2lmaWVycywgc3JjKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguSW1wb3J0RGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLnNwZWNpZmllcnMgPSBzcGVjaWZpZXJzO1xuICAgICAgICAgICAgdGhpcy5zb3VyY2UgPSBzcmM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoWWllbGRFeHByZXNzaW9uOiBmdW5jdGlvbiAoYXJndW1lbnQsIGRlbGVnYXRlKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguWWllbGRFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZSA9IGRlbGVnYXRlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgfTtcblxuXG4gICAgZnVuY3Rpb24gcmVjb3JkRXJyb3IoZXJyb3IpIHtcbiAgICAgICAgdmFyIGUsIGV4aXN0aW5nO1xuXG4gICAgICAgIGZvciAoZSA9IDA7IGUgPCBleHRyYS5lcnJvcnMubGVuZ3RoOyBlKyspIHtcbiAgICAgICAgICAgIGV4aXN0aW5nID0gZXh0cmEuZXJyb3JzW2VdO1xuICAgICAgICAgICAgLy8gUHJldmVudCBkdXBsaWNhdGVkIGVycm9yLlxuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmIChleGlzdGluZy5pbmRleCA9PT0gZXJyb3IuaW5kZXggJiYgZXhpc3RpbmcubWVzc2FnZSA9PT0gZXJyb3IubWVzc2FnZSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4dHJhLmVycm9ycy5wdXNoKGVycm9yKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjb25zdHJ1Y3RFcnJvcihtc2csIGNvbHVtbikge1xuICAgICAgICB2YXIgZXJyb3IgPSBuZXcgRXJyb3IobXNnKTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9IGNhdGNoIChiYXNlKSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICAgICAgaWYgKE9iamVjdC5jcmVhdGUgJiYgT2JqZWN0LmRlZmluZVByb3BlcnR5KSB7XG4gICAgICAgICAgICAgICAgZXJyb3IgPSBPYmplY3QuY3JlYXRlKGJhc2UpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlcnJvciwgJ2NvbHVtbicsIHsgdmFsdWU6IGNvbHVtbiB9KTt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rZW47XG5cbiAgICAgICAgaWYgKHRva2VuKSB7XG4gICAgICAgICAgICBpZiAoIW1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICBtc2cgPSAodG9rZW4udHlwZSA9PT0gVG9rZW4uRU9GKSA/IE1lc3NhZ2VzLlVuZXhwZWN0ZWRFT1MgOlxuICAgICAgICAgICAgICAgICAgICAodG9rZW4udHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikgPyBNZXNzYWdlcy5VbmV4cGVjdGVkSWRlbnRpZmllciA6XG4gICAgICAgICAgICAgICAgICAgICh0b2tlbi50eXBlID09PSBUb2tlbi5OdW1lcmljTGl0ZXJhbCkgPyBNZXNzYWdlcy5VbmV4cGVjdGVkTnVtYmVyIDpcbiAgICAgICAgICAgICAgICAgICAgKHRva2VuLnR5cGUgPT09IFRva2VuLlN0cmluZ0xpdGVyYWwpID8gTWVzc2FnZXMuVW5leHBlY3RlZFN0cmluZyA6XG4gICAgICAgICAgICAgICAgICAgICh0b2tlbi50eXBlID09PSBUb2tlbi5UZW1wbGF0ZSkgPyBNZXNzYWdlcy5VbmV4cGVjdGVkVGVtcGxhdGUgOlxuICAgICAgICAgICAgICAgICAgICBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW47XG5cbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uS2V5d29yZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNGdXR1cmVSZXNlcnZlZFdvcmQodG9rZW4udmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtc2cgPSBNZXNzYWdlcy5VbmV4cGVjdGVkUmVzZXJ2ZWQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RyaWN0ICYmIGlzU3RyaWN0TW9kZVJlc2VydmVkV29yZCh0b2tlbi52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZyA9IE1lc3NhZ2VzLlN0cmljdFJlc2Vydm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ChrZXl3b3JkKSB7XG4gICAgICAgIHJldHVybiBsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uS2V5d29yZCAmJiBsb29rYWhlYWQudmFsdWUgPT09IGtleXdvcmQ7XG4gICAgfVxuXG4gICAgLy8gUmV0dXJuIHRydWUgaWYgdGhlIG5leHQgdG9rZW4gbWF0Y2hlcyB0aGUgc3BlY2lmaWVkIGNvbnRleHR1YWwga2V5d29yZFxuICAgIC8vICh3aGVyZSBhbiBpZGVudGlmaWVyIGlzIHNvbWV0aW1lcyBhIGtleXdvcmQgZGVwZW5kaW5nIG9uIHRoZSBjb250ZXh0KVxuXG4gICAgZnVuY3Rpb24gbWF0Y2hDb250ZXh0dWFsS2V5d29yZChrZXl3b3JkKSB7XG4gICAgICAgIHJldHVybiBsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllciAmJiBsb29rYWhlYWQudmFsdWUgPT09IGtleXdvcmQ7XG4gICAgfVxuXG4gICAgLy8gUmV0dXJuIHRydWUgaWYgdGhlIG5leHQgdG9rZW4gaXMgYW4gYXNzaWdubWVudCBvcGVyYXRvclxuXG4gICAgZnVuY3Rpb24gbWF0Y2hBc3NpZ24oKSB7XG4gICAgICAgIHZhciBvcDtcblxuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLlB1bmN0dWF0b3IpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBvcCA9IGxvb2thaGVhZC52YWx1ZTtcbiAgICAgICAgcmV0dXJuIG9wID09PSAnPScgfHxcbiAgICAgICAgICAgIG9wID09PSAnKj0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJy89JyB8fFxuICAgICAgICAgICAgb3AgPT09ICclPScgfHxcbiAgICAgICAgICAgIG9wID09PSAnKz0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJy09JyB8fFxuICAgICAgICAgICAgb3AgPT09ICc8PD0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJz4+PScgfHxcbiAgICAgICAgICAgIG9wID09PSAnPj4+PScgfHxcbiAgICAgICAgICAgIG9wID09PSAnJj0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJ149JyB8fFxuICAgICAgICAgICAgb3AgPT09ICd8PSc7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY29uc3VtZVNlbWljb2xvbigpIHtcbiAgICAgICAgLy8gQ2F0Y2ggdGhlIHZlcnkgY29tbW9uIGNhc2UgZmlyc3Q6IGltbWVkaWF0ZWx5IGEgc2VtaWNvbG9uIChVKzAwM0IpLlxuICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoc3RhcnRJbmRleCkgPT09IDB4M0IgfHwgbWF0Y2goJzsnKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzTGluZVRlcm1pbmF0b3IpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FKGlrYXJpZW5hdG9yKTogdGhpcyBpcyBzZWVtaW5nbHkgYW4gaXNzdWUgaW4gdGhlIHByZXZpb3VzIGxvY2F0aW9uIGluZm8gY29udmVudGlvbi5cbiAgICAgICAgbGFzdEluZGV4ID0gc3RhcnRJbmRleDtcbiAgICAgICAgbGFzdExpbmVOdW1iZXIgPSBzdGFydExpbmVOdW1iZXI7XG4gICAgICAgIGxhc3RMaW5lU3RhcnQgPSBzdGFydExpbmVTdGFydDtcblxuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLkVPRiAmJiAhbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIENvdmVyIGdyYW1tYXIgc3VwcG9ydC5cbiAgICAvL1xuICAgIC8vIFdoZW4gYW4g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gcmVzdWx0O1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEzLjMuMyBEZXN0cnVjdHVyaW5nIEJpbmRpbmcgUGF0dGVybnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlQXJyYXlQYXR0ZXJuKHBhcmFtcywga2luZCkge1xuICAgICAgICB2YXIgbm9kZSA9IG5ldyBOb2RlKCksIGVsZW1lbnRzID0gW10sIHJlc3QsIHJlc3ROb2RlO1xuICAgICAgICBleHBlY3QoJ1snKTtcblxuICAgICAgICB3aGlsZSAoIW1hdGNoKCddJykpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChudWxsKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcuLi4nKSkge1xuICAgICAgICAgICAgICAgICAgICByZXN0Tm9kZSA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMucHVzaChsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgICAgICByZXN0ID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoa2luZCk7XG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRzLnB1c2gocmVzdE5vZGUuZmluaXNoUmVzdEVsZW1lbnQocmVzdCkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKHBhcnNlUGF0dGVybldpdGhEZWZhdWx0KHBhcmFtcywga2luZCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCddJykpIHtcbiAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJ10nKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hBcnJheVBhdHRlcm4oZWxlbWVudHMpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlUHJvcGVydHlQYXR0ZXJuKHBhcmFtcywga2luZCkge1xuICAgICAgICB2YXIgbm9kZSA9IG5ldyBOb2RlKCksIGtleSwga2V5VG9rZW4sIGNvbXB1dGVkID0gbWF0Y2goJ1snKSwgaW5pdDtcbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICBrZXlUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgIGtleSA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7XG4gICAgICAgICAgICBpZiAobWF0Y2goJz0nKSkge1xuICAgICAgICAgICAgICAgIHBhcmFtcy5wdXNoKGtleVRva2VuKTtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICBpbml0ID0gcGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcGVydHkoXG4gICAgICAgICAgICAgICAgICAgICdpbml0Jywga2V5LCBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgbmV3IFdyYXBwaW5nTm9kZShrZXlUb2tlbikuZmluaXNoQXNzaWdubWVudFBhdHRlcm4oa2V5LCBpbml0KSwgZmFsc2UsIGZhbHNlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIW1hdGNoKCc6JykpIHtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaChrZXlUb2tlbik7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcGVydHkoJ2luaXQnLCBrZXksIGZhbHNlLCBrZXksIGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgfVxuICAgICAgICBleHBlY3QoJzonKTtcbiAgICAgICAgaW5pdCA9IHBhcnNlUGF0dGVybldpdGhEZWZhdWx0KHBhcmFtcywga2luZCk7XG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdpbml0Jywga2V5LCBjb21wdXRlZCwgaW5pdCwgZmFsc2UsIGZhbHNlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZU9iamVjdFBhdHRlcm4ocGFyYW1zLCBraW5kKSB7XG4gICAgICAgIHZhciBub2RlID0gbmV3IE5vZGUoKSwgcHJvcGVydGllcyA9IFtdO1xuXG4gICAgICAgIGV4cGVjdCgneycpO1xuXG4gICAgICAgIHdoaWxlICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgcHJvcGVydGllcy5wdXNoKHBhcnNlUHJvcGVydHlQYXR0ZXJuKHBhcmFtcywga2luZCkpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZXgoKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hPYmplY3RQYXR0ZXJuKHByb3BlcnRpZXMpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlUGF0dGVybihwYXJhbXMsIGtpbmQpIHtcbiAgICAgICAgaWYgKG1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgIHJldHVybiBwYXJzZUFycmF5UGF0dGVybihwYXJhbXMsIGtpbmQpO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCd7JykpIHtcbiAgICAgICAgICAgIHJldHVybiBwYXJzZU9iamVjdFBhdHRlcm4ocG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Z2h0KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGF0dGVybjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4yLjUgQXJyYXkgSW5pdGlhbGl6ZXJcblxuICAgIGZ1bmN0aW9uIHBhcnNlQXJyYXlJbml0aWFsaXplcigpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRzID0gW10sIG5vZGUgPSBuZXcgTm9kZSgpLCByZXN0U3ByZWFkO1xuXG4gICAgICAgIGV4cGVjdCgnWycpO1xuXG4gICAgICAgIHdoaWxlICghbWF0Y2goJ10nKSkge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKG51bGwpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnLi4uJykpIHtcbiAgICAgICAgICAgICAgICByZXN0U3ByZWFkID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICByZXN0U3ByZWFkLmZpbmlzaFNwcmVhZEVsZW1lbnQoaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCddJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChyZXN0U3ByZWFkKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcblxuICAgIC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pb25zLlxuICAgIGZ1bmN0aW9uIHRyeVBhcnNlTWV0aG9kRGVmaW5pdGlvbih0b2tlbiwga2V5LCBjb21wdXRlZCwgbm9kZSkge1xuICAgICAgICB2YXIgdmFsdWUsIG9wdGlvbnMsIG1ldGhvZE5vZGUsIHBhcmFtcyxcbiAgICAgICAgICAgIHByZXZpb3VzQWxsb3dZaWVsZCA9IHN0YXRlLmFsbG93WWllbGQ7XG5cbiAgICAgICAgaWYgKHRva2VuLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIC8vIGNoZWNrIGZvciBgZ2V0YCBhbmQgYHNldGA7XG5cbiAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PT0gJ2dldCcgJiYgbG9va2FoZWFkUHJvcGVydHlOYW1lKCkpIHtcbiAgICAgICAgICAgICAgICBjb21wdXRlZCA9IG1hdGNoKCdbJyk7XG4gICAgICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtleSgpO1xuICAgICAgICAgICAgICAgIG1ldGhvZE5vZGUgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnKCcpO1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFyc2VQcm9wZXJ0eUZ1bmN0aW9uKG1ldGhvZE5vZGUsIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBzdHJpY3RlZDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBudWxsXG4gICAgICAgICAgICAgICAgfSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBwcmV2aW91c0FsbG93WWllbGQ7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnZ2V0Jywga2V5LCBjb21wdXRlZCwgdmFsdWUsIGZhbHNlLCBmYWxzZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRva2VuLnZhbHVlID09PSAnc2V0JyAmJiBsb29rYWhlYWRQcm9wZXJ0eU5hbWUoKSkge1xuICAgICAgICAgICAgICAgIGNvbXB1dGVkID0gbWF0Y2goJ1snKTtcbiAgICAgICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3BlcnR5S2V5KCk7XG4gICAgICAgICAgICAgICAgbWV0aG9kTm9kZSA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcoJyk7XG5cbiAgICAgICAgICAgICAgICBvcHRpb25zID0ge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0Q291bnQ6IDAsXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICBwYXJhbVNldDoge31cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnKScpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBwYXJzZVBhcmFtKG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5kZWZhdWx0Q291bnQgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZGVmYXVsdHMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHBhcnNlUHJvcGVydHlGdW5jdGlvbihtZXRob2ROb2RlLCBvcHRpb25zLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHByZXZpb3VzQWxsb3dZaWVsZDtcblxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdzZXQnLCBrZXksIGNvbXB1dGVkLCB2YWx1ZSwgZmFsc2UsIGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0b2tlbi50eXBlID09PSBUb2tlbi5QdW5jdHVhdG9yICYmIHRva2VuLnZhbHVlID09PSAnKicgJiYgbG9va2FoZWFkUHJvcGVydHlOYW1lKCkpIHtcbiAgICAgICAgICAgIGNvbXB1dGVkID0gbWF0Y2goJ1snKTtcbiAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgICAgIG1ldGhvZE5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gdHJ1ZTtcbiAgICAgICAgICAgIHBhcmFtcyA9IHBhcnNlUGFyYW1zKCk7XG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuXG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lp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CBrZXksIGNvbXB1dGVkLCBub2RlKTtcbiAgICAgICAgaWYgKG1heWJlTWV0aG9kKSB7XG4gICAgICAgICAgICByZXR1cm4gbWF5YmVNZXRob2Q7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWtleSkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENoZWNrIGZvciBkdXBsaWNhdGVkIF9fcHJvdG9fX1xuICAgICAgICBpZiAoIWNvbXB1dGVkKSB7XG4gICAgICAgICAgICBwcm90byA9IChrZXkudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIgJiYga2V5Lm5hbWUgPT09ICdfX3Byb3RvX18nKSB8fFxuICAgICAgICAgICAgICAgIChrZXkudHlwZSA9PT0gU3ludGF4LkxpdGVyYWwgJiYga2V5LnZhbHVlID09PSAnX19wcm90b19fJyk7XG4gICAgICAgICAgICBpZiAoaGFzUHJvdG8udmFsdWUgJiYgcHJvdG8pIHtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLkR1cGxpY2F0ZVByb3RvUHJvcGVydHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFzUHJvdG8udmFsdWUgfD0gcHJvdG87XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWF0Y2goJzonKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICB2YWx1ZSA9IGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnaW5pdCcsIGtleSwgY29tcHV0ZWQsIHZhbHVlLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRva2VuLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnPScpKSB7XG4gICAgICAgICAgICAgICAgZmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnaW5pdCcsIGtleSwgY29tcHV0ZWQsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBXcmFwcGluZ05vZGUodG9rZW4pLmZpbmlzaEFzc2lnbm1lbnRQYXR0ZXJuKGtleSwgdmFsdWUpLCBmYWxzZSwgdHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnaW5pdCcsIGtleSwgY29tcHV0ZWQsIGtleSwgZmFsc2UsIHRydWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZU9iamVjdEluaXRpYWxpemVyKCkge1xuICAgICAgICB2YXIgcHJvcGVydGllcyA9IFtdLCBoYXNQcm90byA9IHt2YWx1ZTogZmFsc2V9LCBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBleHBlY3QoJ3snKTtcblxuICAgICAgICB3aGlsZSAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgIHByb3BlcnRpZXMucHVzaChwYXJzZU9iamVjdFByb3BlcnR5KGhhc1Byb3RvKSk7XG5cbiAgICAgICAgICAgIGlmICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgIGV4cGVjdENvbW1hU2VwYXJhdG9yKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJ30nKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hPYmplY3RFeHByZXNzaW9uKHByb3BlcnRpZXMpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByKSB7XG4gICAgICAgIHZhciBpO1xuICAgICAgICBzd2l0Y2ggKGV4cHIudHlwZSkge1xuICAgICAgICBjYXNlIFN5bnRheC5JZGVudGlmaWVyOlxuICAgICAgICBjYXNlIFN5bnRheC5NZW1iZXJFeHByZXNzaW9uOlxuICAgICAgICBjYXNlIFN5bnRheC5SZXN0RWxlbWVudDpcbiAgICAgICAgY2FzZSBTeW50YXguQXNzaWdubWVudFBhdHRlcm46XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguU3ByZWFkRWxlbWVudDpcbiAgICAgICAgICAgIGV4cHIudHlwZSA9IFN5bnRheC5SZXN0RWxlbWVudDtcbiAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByLmFyZ3VtZW50KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5BcnJheUV4cHJlc3Npb246XG4gICAgICAgICAgICBleHByLnR5cGUgPSBTeW50YXguQXJyYXlQYXR0ZXJuO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGV4cHIuZWxlbWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhwci5lbGVtZW50c1tpXSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwci5lbGVtZW50c1tpXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4Lk9iamVjdEV4cHJlc3Npb246XG4gICAgICAgICAgIC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4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyLFxuICAgICAgICAgICAgICAgIHBhcmFtczogW10sXG4gICAgICAgICAgICAgICAgcmF3UGFyYW1zOiBbXVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgIGlmIChtYXRjaCgnLi4uJykpIHtcbiAgICAgICAgICAgIGV4cHIgPSBwYXJzZVJlc3RFbGVtZW50KHBhcmFtcyk7XG4gICAgICAgICAgICBleHBlY3QoJyknKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2goJz0+JykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3QoJz0+Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyLFxuICAgICAgICAgICAgICAgIHBhcmFtczogW2V4cHJdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IHRydWU7XG4gICAgICAgIGV4cHIgPSBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuXG4gICAgICAgIGlmIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBmYWxzZTtcbiAgICAgICAgICAgIGV4cHJlc3Npb25zID0gW2V4cHJdO1xuXG4gICAgICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmICghbWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV4KCk7XG5cbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJy4uLicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNCaW5kaW5nRWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKHBhcnNlUmVzdEVsZW1lbnQocGFyYW1zKSk7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnKScpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCc9PicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHBlY3QoJz0+Jyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZXhwcmVzc2lvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByZXNzaW9uc1tpXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiBleHByZXNzaW9uc1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25zLnB1c2goaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV4cHIgPSBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pLmZpbmlzaFNlcXVlbmNlRXhwcmVzc2lvbihleHByZXNzaW9ucyk7XG4gICAgICAgIH1cblxuXG4gICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgIGlmIChtYXRjaCgnPT4nKSkge1xuICAgICAgICAgICAgaWYgKGV4cHIudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIgJiYgZXhwci5uYW1lID09PSAneWllbGQnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXIsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtczogW2V4cHJdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFpc0JpbmRpbmdFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGV4cHIudHlwZSA9PT0gU3ludGF4LlNlcXVlbmNlRXhwcmVzc2lvbikge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBleHByLmV4cHJlc3Npb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByLmV4cHJlc3Npb25zW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXhwciA9IHtcbiAgICAgICAgICAgICAgICB0eXBlOiBQbGF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bW9kdWxlJyAmJiBsb29rYWhlYWQudmFsdWUgPT09ICdhd2FpdCcpIHtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwciA9IG5vZGUuZmluaXNoSWRlbnRpZmllcihsZXgoKS52YWx1ZSk7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gVG9rZW4uU3RyaW5nTGl0ZXJhbCB8fCB0eXBlID09PSBUb2tlbi5OdW1lcmljTGl0ZXJhbCkge1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBsb29rYWhlYWQub2N0YWwpIHtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQsIE1lc3NhZ2VzLlN0cmljdE9jdGFsTGl0ZXJhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHByID0gbm9kZS5maW5pc2hMaXRlcmFsKGxleCgpKTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICBpZiAoIXN0cmljdCAmJiBzdGF0ZS5hbGxvd1lpZWxkICYmIG1hdGNoS2V5d29yZCgneWllbGQnKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghc3RyaWN0ICYmIG1hdGNoS2V5d29yZCgnbGV0JykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hJZGVudGlmaWVyKGxleCgpLnZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2Z1bmN0aW9uJykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGdW5jdGlvbkV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ3RoaXMnKSkge1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFRoaXNFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdjbGFzcycpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlQ2xhc3NFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsZXgoKSk7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gVG9rZW4uQm9vbGVhbkxpdGVyYWwpIHtcbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICB0b2tlbi52YWx1ZSA9ICh0b2tlbi52YWx1ZSA9PT0gJ3RydWUnKTtcbiAgICAgICAgICAgIGV4cHIgPSBub2RlLmZpbmlzaExpdGVyYWwodG9rZW4pO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFRva2VuLk51bGxMaXRlcmFsKSB7XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgdG9rZW4udmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgZXhwciA9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tYXRjaCgnLi4uJykpIHtcbiAgICAgICAgICAgICAgICAgICAgZXhwciA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBleHByLmZpbmlzaFNwcmVhZEVsZW1lbnQoaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXhwciA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFyZ3MucHVzaChleHByKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJyknKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZXhwZWN0Q29tbWFTZXBhcmF0b3IoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgIHJldHVybiBhcmdzO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlTm9uQ29tcHV0ZWRQcm9wZXJ0eSgpIHtcbiAgICAgICAgdmFyIHRva2VuLCBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICB0b2tlbiA9IGxleCgpO1xuXG4gICAgICAgIGlmICghaXNJZGVudGlmaWVyTmFtZSh0b2tlbikpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKHRva2VuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaElkZW50aWZpZXIodG9rZW4udmFsdWUpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlTm9uQ29tcHV0ZWRNZW1iZXIoKSB7XG4gICAgICAgIGV4cGVjdCgnLicpO1xuXG4gICAgICAgIHJldHVybiBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUNvbXB1dGVkTWVtYmVyKCkge1xuICAgICAgICB2YXIgZXhwcjtcblxuICAgICAgICBleHBlY3QoJ1snKTtcblxuICAgICAgICBleHByID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUV4cHJlc3Npb24pO1xuXG4gICAgICAgIGV4cGVjdCgnXScpO1xuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEyLjMuMyBUaGUgbmV3IE9wZXJhdG9yXG5cbiAgICBmdW5jdGlvbiBwYXJzZU5ld0V4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciBjYWxsZWUsIGFyZ3MsIG5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ25ldycpO1xuXG4gICAgICAgIGlmIChtYXRjaCgnLicpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllciAmJiBsb29rYWhlYWQudmFsdWUgPT09ICd0YXJnZXQnKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXRlLmluRnVuY3Rpb25Cb2R5KSB7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hNZXRhUHJvcGVydHkoJ25ldycsICd0YXJnZXQnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICB9XG5cbiAgICAgICAgY2FsbGVlID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUxlZnRIYW5kU2lkZUV4cHJlc3Npb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ByZXNzaW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnLicpKSB7XG4gICAgICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcHJvcGVydHkgPSBwYXJzZU5vbkNvbXB1dGVkTWVtYmVyKCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoTWVtYmVyRXhwcmVzc2lvbignLicsIGV4cHIsIHByb3BlcnR5KTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJygnKSkge1xuICAgICAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBhcmdzID0gcGFyc2VBcmd1bWVudHMoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hDYWxsRXhwcmVzc2lvbihleHByLCBhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJ1snKSkge1xuICAgICAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gcGFyc2VDb21wdXRlZE1lbWJlcigpO1xuICAgICAgICAgICAgICAgIGV4cHIgPSBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pLmZpbmlzaE1lbWJlckV4cHJlc3Npb24oJ1snLCBleHByLCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5UZW1wbGF0ZSAmJiBsb29rYWhlYWQuaGVhZCkge1xuICAgICAgICAgICAgICAgIHF1YXNpID0gcGFyc2VUZW1wbGF0ZUxpdGVyYWwoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hUYWdnZWRUZW1wbGF0ZUV4cHJlc3Npb24oZXhwciwgcXVhc2kpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdGF0ZS5hbGxvd0luID0gcHJldmlvdXNBbGxvd0luO1xuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEyLjMgTGVmdC1IYW5kLVNpZGUgRXhwcmVzc2lvbnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlTGVmdEhhbmRTaWRlRXhwcmVzc2lvbigpIHtcbiAgICAgICAgdmFyIHF1YXNpLCBleHByLCBwcm9wZXJ0eSwgc3RhcnRUb2tlbjtcbiAgICAgICAgYXNzZXJ0KHN0YXRlLmFsbG93SW4sICdjYWxsZWUgb2YgbmV3IGV4cHJlc3Npb24gYWx3YXlzIGFsbG93IGluIGtleXdvcmQuJyk7XG5cbiAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcblxuICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdzdXBlcicpICYmIHN0YXRlLmluRnVuY3Rpb25Cb2R5KSB7XG4gICAgICAgICAgICBleHByID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgZXhwciA9IGV4cHIuZmluaXNoU3VwZXIoKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2goJ1snKSAmJiAhbWF0Y2goJy4nKSkge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBleHByID0gaW5oZXJpdENvdmVyR3JhbW1hcihtYXRjaEtleXdvcmQoJ25ldycpID8gcGFyc2VOZXdFeHByZXNzaW9uIDogcGFyc2VQcmltYXJ5RXhwcmVzc2lvbik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKDs7KSB7XG4gICAgICAgICAgICBpZiAobWF0Y2goJ1snKSkge1xuICAgICAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gcGFyc2VDb21wdXRlZE1lbWJlcigpO1xuICAgICAgICAgICAgICAgIGV4cHIgPSBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pLmZpbmlzaE1lbWJlckV4cHJlc3Npb24oJ1snLCBleHByLCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcuJykpIHtcbiAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eSA9IHBhcnNlTm9uQ29tcHV0ZWRNZW1iZXIoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hNZW1iZXJFeHByZXNzaW9uKCcuJywgZXhwciwgcHJvcGVydHkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uVGVtcGxhdGUgJiYgbG9va2FoZWFkLmhlYWQpIHtcbiAgICAgICAgICAgICAgICBxdWFz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gICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLkludmFsaWRMSFNJbkFzc2lnbm1lbnQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoUG9zdGZpeEV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGV4cHI7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTIuNSBVbmFyeSBPcGVyYXRvcnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlVW5hcnlFeHByZXNzaW9uKCkge1xuICAgICAgICB2YXIgdG9rZW4sIGV4cHIsIHN0YXJ0VG9rZW47XG5cbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5QdW5jdHVhdG9yICYmIGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICBleHByID0gcGFyc2VQb3N0Zml4RXhwcmVzc2lvbigpO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcrKycpIHx8IG1hdGNoKCctLScpKSB7XG4gICAgICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTtcbiAgICAgICAgICAgIGV4cHIgPSBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlVW5hcnlFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIC8vIEVDTUEtMjYyIDExLjQuNCwgMTEuNC41XG4gICAgICAgICAgICBpZiAoc3RyaWN0ICYmIGV4cHIudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIgJiYgaXNSZXN0cmljdGVkV29yZChleHByLm5hbWUpKSB7XG4gICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5TdHJpY3RMSFNQcmVmaXgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWlzQXNzaWdubWVudFRhcmdldCkge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSW52YWxpZExIU0luQXNzaWdubWVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hVbmFyeUV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIpO1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcrJykgfHwgbWF0Y2goJy0nKSB8fCBtYXRjaCgnficpIHx8IG1hdGNoKCchJykpIHtcbiAgICAgICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgZXhwciA9IGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VVbmFyeUV4cHJlc3Npb24pO1xuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoVW5hcnlFeHByZXNzaW9uKHRva2VuLnZhbHVlLCBleHByKTtcbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChtYXRjaEtleXdvcmQoJ2RlbGV0ZScpIHx8IG1hdGNoS2V5d29yZCgndm9pZCcpIHx8IG1hdGNoS2V5d29yZCgndHlwZW9mJykpIHtcbiAgICAgICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgZXhwciA9IGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VVbmFyeUV4cHJlc3Npb24pO1xuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoVW5hcnlFeHByZXNzaW9uKHRva2VuLnZhbHVlLCBleHByKTtcbiAgICAgICAgICAgIGlmIChzdHJpY3QgJiYgZXhwci5vcGVyYXRvciA9PT0gJ2RlbGV0ZScgJiYgZXhwci5hcmd1bWVudC50eXBlID09PSBTeW50YXguSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuU3RyaWN0RGVsZXRlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGV4cHIgPSBwYXJzZVBvc3RmaXhFeHByZXNzaW9uKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBiaW5hcnlQcmVjZWRlbmNlKHRva2VuLCBhbGxvd0luKSB7XG4gICAgICAgIHZhciBwcmVjID0gMDtcblxuICAgICAgICBpZiAodG9rZW4udHlwZSAhPT0gVG9rZW4uUHVuY3R1YXRvciAmJiB0b2tlbi50eXBlICE9PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHN3aXRjaCAodG9rZW4udmFsdWUpIHtcbiAgICAgICAgY2FzZSAnfHwnOlxuICAgICAgICAgICAgcHJlYyA9IDE7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICcmJic6XG4gICAgICAgICAgICBwcmVjID0gMjtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ3wnOlxuICAgICAgICAgICAgcHJlYyA9IDM7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICdeJzpcbiAgICAgICAgICAgIHByZWMgPSA0O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnJic6XG4gICAgICAgICAgICBwcmVjID0gNTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJz09JzpcbiAgICAgICAgY2FzZSAnIT0nOlxuICAgICAgICBjYXNlICc9PT0nOlxuICAgICAgICBjYXNlICchPT0nOlxuICAgICAgICAgICAgcHJlYyA9IDY7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICc8JzpcbiAgICAgICAgY2FzZSAnPic6XG4gICAgICAgIGNhc2UgJzw9JzpcbiAgICAgICAgY2FzZSAnPj0nOlxuICAgICAgICBjYXNlICdpbnN0YW5jZW9mJzpcbiAgICAgICAgICAgIHByZWMgPSA3O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnaW4nOlxuICAgICAgICAgICAgcHJlYyA9IGFsbG93SW4gPyA3IDogMDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJzw8JzpcbiAgICAgICAgY2FzZSAnPj4nOlxuICAgICAgICBjYXNlICc+Pj4nOlxuICAgICAgICAgICAgcHJlYyA9IDg7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICcrJzpcbiAgICAgICAgY2FzZSAnLSc6XG4gICAgICAgICAgICBwcmVjID0gOTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJyonOlxuICAgICAgICBjYXNlICcvJzpcbiAgICAgICAgY2FzZSAnJSc6XG4gICAgICAgICAgICBwcmVjID0gMTE7XG4gICAgICAgIC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xzZTtcbiAgICAgICAgdG9rZW4ucHJlYyA9IHByZWM7XG4gICAgICAgIGxleCgpO1xuXG4gICAgICAgIG1hcmtlcnMgPSBbbWFya2VyLCBsb29rYWhlYWRdO1xuICAgICAgICByaWdodCA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VVbmFyeUV4cHJlc3Npb24pO1xuXG4gICAgICAgIHN0YWNrID0gW2xlZnQsIHRva2VuLCByaWdodF07XG5cbiAgICAgICAgd2hpbGUgKChwcmVjID0gYmluYXJ5UHJlY2VkZW5jZShsb29rYWhlYWQsIHN0YXRlLmFsbG93SW4pKSA+IDApIHtcblxuICAgICAgICAgICAgLy8gUmVkdWNlOiBtYWtlIGEgYmluYXJ5IGV4cHJlc3Npb24gZnJvbSB0aGUgdGhyZWUgdG9wbW9zdCBlbnRyaWVzLlxuICAgICAgICAgICAgd2hpbGUgKChzdGFjay5sZW5ndGggPiAyKSAmJiAocHJlYyA8PSBzdGFja1tzdGFjay5sZW5ndGggLSAyXS5wcmVjKSkge1xuICAgICAgICAgICAgICAgIHJpZ2h0ID0gc3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgb3BlcmF0b3IgPSBzdGFjay5wb3AoKS52YWx1ZTtcbiAgICAgICAgICAgICAgICBsZWZ0ID0gc3RhY2sucG9wKCk7XG4gICAgICAgICAgICAgICAgbWFya2Vycy5wb3AoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShtYXJrZXJzW21hcmtlcnMubGVuZ3RoIC0gMV0pLmZpbmlzaEJpbmFyeUV4cHJlc3Npb24ob3BlcmF0b3IsIGxlZnQsIHJpZ2h0KTtcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKGV4cHIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBTaGlmdC5cbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICB0b2tlbi5wcmVjID0gcHJlYztcbiAgICAgICA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AgIGNhc2UgU3ludGF4LklkZW50aWZpZXI6XG4gICAgICAgICAgICB2YWxpZGF0ZVBhcmFtKG9wdGlvbnMsIHBhcmFtLCBwYXJhbS5uYW1lKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5SZXN0RWxlbWVudDpcbiAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtLmFyZ3VtZW50KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5Bc3NpZ25tZW50UGF0dGVybjpcbiAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtLmxlZnQpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4LkFycmF5UGF0dGVybjpcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBwYXJhbS5lbGVtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5lbGVtZW50c1tpXSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBjaGVja1BhdHRlcm5QYXJhbShvcHRpb25zLCBwYXJhbS5lbGVtZW50c1tpXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4LllpZWxkRXhwcmVzc2lvbjpcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgYXNzZXJ0KHBhcmFtLnR5cGUgPT09IFN5bnRheC5PYmplY3RQYXR0ZXJuLCAnSW52YWxpZCB0eXBlJyk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyYW0ucHJvcGVydGllcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtLnByb3BlcnRpZXNbaV0udmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcmVpbnRlcnByZXRBc0NvdmVyRm9ybWFsc0xpc3QoZXhwcikge1xuICAgICAgICB2YXIgaSwgbGVuLCBwYXJhbSwgcGFyYW1zLCBkZWZhdWx0cywgZGVmYXVsdENvdW50LCBvcHRpb25zLCB0b2tlbjtcblxuICAgICAgICBkZWZhdWx0cyA9IFtdO1xuICAgICAgICBkZWZhdWx0Q291bnQgPSAwO1xuICAgICAgICBwYXJhbXMgPSBbZXhwcl07XG5cbiAgICAgICAgc3dpdGNoIChleHByLnR5cGUpIHtcbiAgICAgICAgY2FzZSBTeW50YXguSWRlbnRpZmllcjpcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyOlxuICAgICAgICAgICAgcGFyYW1zID0gZXhwci5wYXJhbXM7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgIHBhcmFtU2V0OiB7fVxuICAgICAgICB9O1xuXG4gICAgICAgIGZvciAoaSA9IDAsIGxlbiA9IHBhcmFtcy5sZW5ndGg7IGkgPCBsZW47IGkgKz0gMSkge1xuICAgICAgICAgICAgcGFyYW0gPSBwYXJhbXNbaV07XG4gICAgICAgICAgICBzd2l0Y2ggKHBhcmFtLnR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgU3ludGF4LkFzc2lnbm1lbnRQYXR0ZXJuOlxuICAgICAgICAgICAgICAgIHBhcmFtc1tpXSA9IHBhcmFtLmxlZnQ7XG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtLnJpZ2h0LnR5cGUgPT09IFN5bnRheC5ZaWVsZEV4cHJlc3Npb24pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtLnJpZ2h0LmFyZ3VtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtLnJpZ2h0LnR5cGUgPSBTeW50YXguSWRlbnRpZmllcjtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW0ucmlnaHQubmFtZSA9ICd5aWVsZCc7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBwYXJhbS5yaWdodC5hcmd1bWVudDtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHBhcmFtLnJpZ2h0LmRlbGVnYXRlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkZWZhdWx0cy5wdXNoKHBhcmFtLnJpZ2h0KTtcbiAgICAgICAgICAgICAgICArK2RlZmF1bHRDb3VudDtcbiAgICAgICAgICAgICAgICBjaGVja1BhdHRlcm5QYXJhbShvcHRpb25zLCBwYXJhbS5sZWZ0KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgY2hlY2tQYXR0ZXJuUGFyYW0ob3B0aW9ucywgcGFyYW0pO1xuICAgICAgICAgICAgICAgIHBhcmFtc1tpXSA9IHBhcmFtO1xuICAgICAgICAgICAgICAgIGRlZmF1bHRzLnB1c2gobnVsbCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3RyaWN0IHx8ICFzdGF0ZS5hbGxvd1lpZWxkKSB7XG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsZW4gPSBwYXJhbXMubGVuZ3RoOyBpIDwgbGVuOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICBwYXJhbSA9IHBhcmFtc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0udHlwZSA9PT0gU3ludGF4LllpZWxkRXhwcmVzc2lvbikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLm1lc3NhZ2UgPT09IE1lc3NhZ2VzLlN0cmljdFBhcmFtRHVwZSkge1xuICAgICAgICAgICAgdG9rZW4gPSBzdHJpY3QgPyBvcHRpb25zLnN0cmljdGVkIDogb3B0aW9ucy5maXJzdFJlc3RyaWN0ZWQ7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbiwgb3B0aW9ucy5tZXNzYWdlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkZWZhdWx0Q291bnQgPT09IDApIHtcbiAgICAgICAgICAgIGRlZmF1bHRzID0gW107XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcGFyYW1zOiBwYXJhbXMsXG4gICAgICAgICAgICBkZWZhdWx0czogZGVmYXVsdHMsXG4gICAgICAgICAgICBzdHJpY3RlZDogb3B0aW9ucy5zdHJpY3RlZCxcbiAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZDogb3B0aW9ucy5maXJzdFJlc3RyaWN0ZWQsXG4gICAgICAgICAgICBtZXNzYWdlOiBvcHRpb25zLm1lc3NhZ2VcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUFycm93RnVuY3Rpb25FeHByZXNzaW9uKG9wdGlvbnMsIG5vZGUpIHtcbiAgICAgICAgdmFyIHByZXZpb3VzU3RyaWN0LCBwcmV2aW91c0FsbG93WWllbGQsIGJvZHk7XG5cbiAgICAgICAgaWYgKGhh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SB7XG4gICAgICAgIHZhciBhcmd1bWVudCwgZXhwciwgZGVsZWdhdGUsIHByZXZpb3VzQWxsb3dZaWVsZDtcblxuICAgICAgICBhcmd1bWVudCA9IG51bGw7XG4gICAgICAgIGV4cHIgPSBuZXcgTm9kZSgpO1xuICAgICAgICBkZWxlZ2F0ZSA9IGZhbHNlO1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ3lpZWxkJyk7XG5cbiAgICAgICAgaWYgKCFoYXNMaW5lVGVybWluYXRvcikge1xuICAgICAgICAgICAgcHJldmlvdXNBbGxvd1lpZWxkID0gc3RhdGUuYWxsb3dZaWVsZDtcbiAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBmYWxzZTtcbiAgICAgICAgICAgIGRlbGVnYXRlID0gbWF0Y2goJyonKTtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZSkge1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIGFyZ3VtZW50ID0gcGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCc7JykgJiYgIW1hdGNoKCd9JykgJiYgIW1hdGNoKCcpJykgJiYgbG9va2FoZWFkLnR5cGUgIT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgICAgICAgICBhcmd1bWVudCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGV4cHIuZmluaXNoWWllbGRFeHByZXNzaW9uKGFyZ3VtZW50LCBkZWxlZ2F0ZSk7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTIuMTQgQXNzaWdubWVudCBPcGVyYXRvcnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciB0b2tlbiwgZXhwciwgcmlnaHQsIGxpc3QsIHN0YXJ0VG9rZW47XG5cbiAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG5cbiAgICAgICAgaWYgKCFzdGF0ZS5hbGxvd1lpZWxkICYmIG1hdGNoS2V5d29yZCgneWllbGQnKSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlWWllbGRFeHByZXNzaW9uKCk7XG4gICAgICAgIH1cblxuICAgICAgICBleHByID0gcGFyc2VDb25kaXRpb25hbEV4cHJlc3Npb24oKTtcblxuICAgICAgICBpZiAoZXhwci50eXBlID09PSBQbGFjZUhvbGRlcnMuQXJyb3dQYXJhbWV0ZXJQbGFjZUhvbGRlciB8fCBtYXRjaCgnPT4nKSkge1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgbGlzdCA9IHJlaW50ZXJwcmV0QXNDb3ZlckZvcm1hbHNMaXN0KGV4cHIpO1xuXG4gICAgICAgICAgICBpZiAobGlzdCkge1xuICAgICAgICAgICAgICAgIGZpcnN0Q292ZXJJbml0aWFsaXplZE5hbWVFcnJvciA9IG51bGw7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlQXJyb3dGdW5jdGlvbkV4cHJlc3Npb24obGlzdCwgbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleHByO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hdGNoQXNzaWduKCkpIHtcbiAgICAgICAgICAgIGlmICghaXNBc3NpZ25tZW50VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5JbnZhbGlkTEhTSW5Bc3NpZ25tZW50KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRUNNQS0yNjIgMTIuMS4xXG4gICAgICAgICAgICBpZiAoc3RyaWN0ICYmIGV4cHIudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZChleHByLm5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5TdHJpY3RMSFNBc3NpZ25tZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzU3RyaWN0TW9kZVJlc2VydmVkV29yZChleHByLm5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5TdHJpY3RSZXNlcnZlZFdvcmQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFtYXRjaCgnPScpKSB7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICByaWdodCA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hBc3NpZ25tZW50RXhwcmVzc2lvbih0b2tlbi52YWx1ZSwgZXhwciwgcmlnaHQpO1xuICAgICAgICAgICAgZmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEyLjE1IENvbW1hIE9wZXJhdG9yXG5cbiAgICBmdW5jdGlvbiBwYXJzZUV4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciBleHByLCBzdGFydFRva2VuID0gbG9va2FoZWFkLCBleHByZXNzaW9ucztcblxuICAgICAgICBleHByID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcblxuICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgZXhwcmVzc2lvbnMgPSBbZXhwcl07XG5cbiAgICAgICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hTZXF1ZW5jZUV4cHJlc3Npb24oZXhwcmVzc2lvbnMpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGV4cHI7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTMuMiBCbG9ja1xuXG4gICAgZnVuY3Rpb24gcGFyc2VTdGF0ZW1lbnRMaXN0SXRlbSgpIHtcbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZC52YWx1ZSkge1xuICAgICAgICAgICAgY2FzZSAnZXhwb3J0JzpcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUuc291cmNlVHlwZSAhPT0gJ21vZHVsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkLCBNZXNzYWdlcy5JbGxlZ2FsRXhwb3J0RGVjbGFyYXRpb24pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VFeHBvcnREZWNsYXJhdGlvbigpO1xuICAgICAgICAgICAgY2FzZSAnaW1wb3J0JzpcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUuc291cmNlVHlwZSAhPT0gJ21vZHVsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkLCBNZXNzYWdlcy5JbGxlZ2FsSW1wb3J0RGVjbGFyYXRpb24pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VJbXBvcnREZWNsYXJhdGlvbigpO1xuICAgICAgICAgICAgY2FzZSAnY29uc3QnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUxleGljYWxEZWNsYXJhdGlvbih7aW5Gb3I6IGZhbHNlfSk7XG4gICAgICAgICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRnVuY3Rpb25EZWNsYXJhdGlvbihuZXcgTm9kZSgpKTtcbiAgICAgICAgICAgIGNhc2UgJ2NsYXNzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VDbGFzc0RlY2xhcmF0aW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWF0Y2hLZXl3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KCFtYXRjaEtleXdvcmQoJ2luJykgJiYgIW1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ29mJykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3QoJz0nKTtcbiAgICAgICAgICAgICAgICBpbml0ID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICgoIW9wdGlvbnMuaW5Gb3IgJiYgaWQudHlwZSAhPT0gU3ludGF4LklkZW50aWZpZXIpIHx8IG1hdGNoKCc9JykpIHtcbiAgICAgICAgICAgIGV4cGVjdCgnPScpO1xuICAgICAgICAgICAgaW5pdCA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hWYXJpYWJsZURlY2xhcmF0b3IoaWQsIGluaXQpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlQmluZGluZ0xpc3Qoa2luZCwgb3B0aW9ucykge1xuICAgICAgICB2YXIgbGlzdCA9IFtwYXJzZUxleGljYWxCaW5kaW5nKGtpbmQsIG9wdGlvbnMpXTtcblxuICAgICAgICB3aGlsZSAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBsaXN0LnB1c2gocGFyc2VMZXhpY2FsQmluZGluZyhraW5kLCBvcHRpb25zKSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGlzdDtcbiAgICB9XG5cblxuICAgIGZ1bmN0aW9uIHRva2VuaXplclN0YXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICA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ydExpbmVTdGFydDtcbiAgICAgICAgbG9va2FoZWFkID0gdHMubG9va2FoZWFkO1xuICAgICAgICBpZiAoZXh0cmEudG9rZW5zKSB7XG4gICAgICAgICAgICBleHRyYS50b2tlbnMuc3BsaWNlKHRzLnRva2VuQ291bnQsIGV4dHJhLnRva2Vucy5sZW5ndGgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaXNMZXhpY2FsRGVjbGFyYXRpb24oKSB7XG4gICAgICAgIHZhciBsZXhpY2FsLCB0cztcblxuICAgICAgICB0cyA9IHRva2VuaXplclN0YXRlKCk7XG5cbiAgICAgICAgbGV4KCk7XG4gICAgICAgIGxleGljYWwgPSAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpIHx8IG1hdGNoKCdbJykgfHwgbWF0Y2goJ3snKSB8fFxuICAgICAgICAgICAgbWF0Y2hLZXl3b3JkKCdsZXQnKSB8fCBtYXRjaEtleXdvcmQoJ3lpZWxkJyk7XG5cbiAgICAgICAgcmVzZXRUb2tlbml6ZXJTdGF0ZSh0cyk7XG5cbiAgICAgICAgcmV0dXJuIGxleGljYWw7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VMZXhpY2FsRGVjbGFyYXRpb24ob3B0aW9ucykge1xuICAgICAgICB2YXIga2luZCwgZGVjbGFyYXRpb25zLCBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBraW5kID0gbGV4KCkudmFsdWU7XG4gICAgICAgIGFzc2VydChraW5kID09PSAnbGV0JyB8fCBraW5kID09PSAnY29uc3QnLCAnTGV4aWNhbCBkZWNsYXJhdGlvbiBtdXN0IGJlIGVpdGhlciBsZXQgb3IgY29uc3QnKTtcblxuICAgICAgICBkZWNsYXJhdGlvbnMgPSBwYXJzZUJpbmRpbmdMaXN0KGtpbmQsIG9wdGlvbnMpO1xuXG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcblxuICAgICAgICByZXR1cm4gb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GVtZW50KHRlc3QsIGJvZHkpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlRm9yU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgdmFyIGluaXQsIGZvckluLCBpbml0U2VxLCBpbml0U3RhcnRUb2tlbiwgdGVzdCwgdXBkYXRlLCBsZWZ0LCByaWdodCwga2luZCwgZGVjbGFyYXRpb25zLFxuICAgICAgICAgICAgYm9keSwgb2xkSW5JdGVyYXRpb24sIHByZXZpb3VzQWxsb3dJbiA9IHN0YXRlLmFsbG93SW47XG5cbiAgICAgICAgaW5pdCA9IHRlc3QgPSB1cGRhdGUgPSBudWxsO1xuICAgICAgICBmb3JJbiA9IHRydWU7XG5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnZm9yJyk7XG5cbiAgICAgICAgZXhwZWN0KCcoJyk7XG5cbiAgICAgICAgaWYgKG1hdGNoKCc7JykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29yZCgndmFyJykpIHtcbiAgICAgICAgICAgICAgICBpbml0ID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICBsZXgoKTtcblxuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnMgPSBwYXJzZVZhcmlhYmxlRGVjbGFyYXRpb25MaXN0KHsgaW5Gb3I6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IHByZXZpb3VzQWxsb3dJbjtcblxuICAgICAgICAgICAgICAgIGlmIChkZWNsYXJhdGlvbnMubGVuZ3RoID09PSAxICYmIG1hdGNoS2V5d29yZCgnaW4nKSkge1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hWYXJpYWJsZURlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChkZWNsYXJhdGlvbnMubGVuZ3RoID09PSAxICYmIGRlY2xhcmF0aW9uc1swXS5pbml0ID09PSBudWxsICYmIG1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ29mJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoVmFyaWFibGVEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgZm9ySW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hWYXJpYWJsZURlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnOycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hLZXl3b3JkKCdjb25zdCcpIHx8IG1hdGNoS2V5d29yZCgnbGV0JykpIHtcbiAgICAgICAgICAgICAgICBpbml0ID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICBraW5kID0gbGV4KCkudmFsdWU7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXN0cmljdCAmJiBsb29rYWhlYWQudmFsdWUgPT09ICdpbicpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoSWRlbnRpZmllcihraW5kKTtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9ucyA9IHBhcnNlQmluZGluZ0xpc3Qoa2luZCwge2luRm9yOiB0cnVlfSk7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBwcmV2aW91c0FsbG93SW47XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9ucy5sZW5ndGggPT09IDEgJiYgZGVjbGFyYXRpb25zWzBdLmluaXQgPT09IG51bGwgJiYgbWF0Y2hLZXl3b3JkKCdpbicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hMZXhpY2FsRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zLCBraW5kKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVjbGFyYXRpb25zLmxlbmd0aCA9PT0gMSAmJiBkZWNsYXJhdGlvbnNbMF0uaW5pdCA9PT0gbnVsbCAmJiBtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdvZicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hMZXhpY2FsRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zLCBraW5kKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9ySW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaExleGljYWxEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMsIGtpbmQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpbml0U3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaW5pdCA9IGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IHByZXZpb3VzQWxsb3dJbjtcblxuICAgICAgICAgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2luJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0Fzc2lnbm1lbnRUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSW52YWxpZExIU0luRm9ySW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihpbml0KTtcbiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hDb250ZXh0dWFsS2V5d29yZCgnb2YnKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzQXNzaWdubWVudFRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5JbnZhbGlkTEhTSW5Gb3JMb29wKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oaW5pdCk7XG4gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGZvckluID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXRTZXEgPSBbaW5pdF07XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRTZXEucHVzaChpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBuZXcgV3JhcHBpbmdOb2RlKGluaXRTdGFydFRva2VuKS5maW5pc2hTZXF1ZW5jZUV4cHJlc3Npb24oaW5pdFNlcSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCc7Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGVvZiBsZWZ0ID09PSAndW5kZWZpbmVkJykge1xuXG4gICAgICAgICAgICBpZiAoIW1hdGNoKCc7JykpIHtcbiAgICAgICAgICAgICAgICB0ZXN0ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHBlY3QoJzsnKTtcblxuICAgICAgICAgICAgaWYgKCFtYXRjaCgnKScpKSB7XG4gICAgICAgICAgICAgICAgdXBkYXRlID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICBvbGRJbkl0ZXJhdGlvbiA9IHN0YXRlLmluSXRlcmF0aW9uO1xuICAgICAgICBzdGF0ZS5pbkl0ZXJhdGlvbiA9IHRydWU7XG5cbiAgICAgICAgYm9keSA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VTdGF0ZW1lbnQpO1xuXG4gICAgICAgIHN0YXRlLmluSXRlcmF0aW9uID0gb2xkSW5JdGVyYXRpb247XG5cbiAgICAgICAgcmV0dXJuICh0eXBlb2YgbGVmdCA9PT0gJ3VuZGVmaW5lZCcpID9cbiAgICAgICAgICAgICAgICBub2RlLmZpbmlzaEZvclN0YXRlbWVudChpbml0LCB0ZXN0LCB1cGRhdGUsIGJvZHkpIDpcbiAgICAgICAgICAgICAgICBmb3JJbiA/IG5vZGUuZmluaXNoRm9ySW5TdGF0ZW1lbnQobGVmdCwgcmlnaHQsIGJvZHkpIDpcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5maW5pc2hGb3JPZlN0YXRlbWVudChsZWZ0LCByaWdodCwgYm9keSk7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTMuOCBUaGUgY29udGludWUgc3RhdGVtZW50XG5cbiAgICBmdW5jdGlvbiBwYXJzZUNvbnRpbnVlU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgdmFyIGxhYmVsID0gbnVsbCwga2V5O1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ2NvbnRpbnVlJyk7XG5cbiAgICAgICAgLy8gT3B0aW1pemUgdGhlIG1vc3QgY29tbW9uIGZvcm06ICdjb250aW51ZTsnLlxuICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoc3RhcnRJbmRleCkgPT09IDB4M0IpIHtcbiAgICAgICAgICAgIGxleCgpO1xuXG4gICAgICAgICAgICBpZiAoIXN0YXRlLmluSXRlcmF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5JbGxlZ2FsQ29udGludWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hDb250aW51ZVN0YXRlbWVudChudWxsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChoYXNMaW5lVGVybWluYXRvcikge1xuICAgICAgICAgICAgaWYgKCFzdGF0ZS5pbkl0ZXJhdGlvbikge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbENvbnRpbnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoQ29udGludWVTdGF0ZW1lbnQobnVsbCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIGxhYmVsID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTtcblxuICAgICAgICAgICAga2V5ID0gJyQnICsgbGFiZWwubmFtZTtcbiAgICAgICAgICAgIGlmICghT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHN0YXRlLmxhYmVsU2V0LCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5Vbmtub3duTGFiZWwsIGxhYmVsLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuXG4gICAgICAgIGlmIChsYWJlbCA9PT0gbnVsbCAmJiAhc3RhdGUuaW5JdGVyYXRpb24pIHtcbiAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbENvbnRpbnVlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaENvbnRpbnVlU3RhdGVtZW50KGxhYmVsKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy45IFRoZSBicmVhayBzdGF0ZW1lbnRcblxuICAgIGZ1bmN0aW9uIHBhcnNlQnJlYWtTdGF0ZW1lbnQobm9kZSkge1xuICAgICAgICB2YXIgbGFiZWwgPSBudWxsLCBrZXk7XG5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnYnJlYWsnKTtcblxuICAgICAgICAvLyBDYXRjaCB0aGUgdmVyeSBjb21tb24gY2FzZSBmaXJzdDogaW1tZWRpYXRlbHkgYSBzZW1pY29sb24gKFUrMDAzQikuXG4gICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChsYXN0SW5kZXgpID09PSAweDNCKSB7XG4gICAgICAgICAgICBsZXgoKTtcblxuICAgICAgICAgICAgaWYgKCEoc3RhdGUuaW5JdGVyYXRpb24gfHwgc3RhdGUuaW5Td2l0Y2gpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5JbGxlZ2FsQnJlYWspO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hCcmVha1N0YXRlbWVudChudWxsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChoYXNMaW5lVGVybWluYXRvcikge1xuICAgICAgICAgICAgaWYgKCEoc3RhdGUuaW5JdGVyYXRpb24gfHwgc3RhdGUuaW5Td2l0Y2gpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5JbGxlZ2FsQnJlYWspO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICBsYWJlbCA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7XG5cbiAgICAgICAgICAgIGtleSA9ICckJyArIGxhYmVsLm5hbWU7XG4gICAgICAgICAgICBpZiAoIU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzdGF0ZS5sYWJlbFNldCwga2V5KSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuVW5rbm93bkxhYmVsLCBsYWJlbC5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcblxuICAgICAgICBpZiAobGFiZWwgPT09IG51bGwgJiYgIShzdGF0ZS5pbkl0ZXJhdGlvbiB8fCBzdGF0ZS5pblN3aXRjaCkpIHtcbiAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbEJyZWFrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEJyZWFrU3RhdGVtZW50KGxhYmVsKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy4xMCBUaGUgcmV0dXJuIHN0YXRlbWVudFxuXG4gICAgZnVuY3Rpb24gcGFyc2VSZXR1cm5TdGF0ZW1lbnQobm9kZSkge1xuICAgICAgICB2YXIgYXJndW1lbnQgPSBudWxsO1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ3JldHVybicpO1xuXG4gICAgICAgIGlmICghc3RhdGUuaW5GdW5jdGlvbkJvZHkpIHtcbiAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSWxsZWdhbFJldHVybik7XG4gICAgICAgIH1cblxuICAgICAgICAvLyAncmV0dXJuJyBmb2xsb3dlZCBieSBhIHNwYWNlIGFuZCBhbiBpZGVudGlmaWVyIGlzIHZlcnkgY29tbW9uLlxuICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQobGFzdEluZGV4KSA9PT0gMHgyMCkge1xuICAgICAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGxhc3RJbmRleCArIDEpKSkge1xuICAgICAgICAgICAgICAgIGFyZ3VtZW50ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFJldHVyblN0YXRlbWVudChhcmd1bWVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzTGluZVRlcm1pbmF0b3IpIHtcbiAgICAgICAgICAgIC8vIEhBQ0tcbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFJldHVyblN0YXRlbWVudChudWxsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghbWF0Y2goJzsnKSkge1xuICAgICAgICAgICAgaWYgKCFtYXRjaCg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AgICAgY2FzZSAnOyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRW1wdHlTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICcoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VFeHByZXNzaW9uU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZC52YWx1ZSkge1xuICAgICAgICAgICAgY2FzZSAnYnJlYWsnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUJyZWFrU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnY29udGludWUnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUNvbnRpbnVlU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnZGVidWdnZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZURlYnVnZ2VyU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnZG8nOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZURvV2hpbGVTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdmb3InOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUZvclN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2Z1bmN0aW9uJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGdW5jdGlvbkRlY2xhcmF0aW9uKG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnaWYnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUlmU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAncmV0dXJuJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VSZXR1cm5TdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdzd2l0Y2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVN3aXRjaFN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3Rocm93JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VUaHJvd1N0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3RyeSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVHJ5U3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAndmFyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VWYXJpYWJsZVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3doaWxlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VXaGlsZVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3dpdGgnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVdpdGhTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXhwciA9IHBhcnNlRXhwcmVzc2lvbigpO1xuXG4gICAgICAgIC8vIEVDTUEtMjYyIDEyLjEyIExhYmVsbGVkIFN0YXRlbWVudHNcbiAgICAgICAgaWYgKChleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSAmJiBtYXRjaCgnOicpKSB7XG4gICAgICAgICAgICBsZXgoKTtcblxuICAgICAgICAgICAga2V5ID0gJyQnICsgZXhwci5uYW1lO1xuICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzdGF0ZS5sYWJlbFNldCwga2V5KSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuUmVkZWNsYXJhdGlvbiwgJ0xhYmVsJywgZXhwci5uYW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3RhdGUubGFiZWxTZXRba2V5XSA9IHRydWU7XG4gICAgICAgICAgICBsYWJlbGVkQm9keSA9IHBhcnNlU3RhdGVtZW50KCk7XG4gICAgICAgICAgICBkZWxldGUgc3RhdGUubGFiZWxTZXRba2V5XTtcbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaExhYmVsZWRTdGF0ZW1lbnQoZXhwciwgbGFiZWxlZEJvZHkpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEV4cHJlc3Npb25TdGF0ZW1lbnQoZXhwcik7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTQuMSBGdW5jdGlvbiBEZWZpbml0aW9uXG5cbiAgICBmdW5jdGlvbiBwYXJzZUZ1bmN0aW9uU291cmNlRWxlbWVudHMoKSB7XG4gICAgICAgIHZhciBzdGF0ZW1lbnQsIGJvZHkgPSBbXSwgdG9rZW4sIGRpcmVjdGl2ZSwgZmlyc3RSZXN0cmljdGVkLFxuICAgICAgICAgICAgb2xkTGFiZWxTZXQsIG9sZEluSXRlcmF0aW9uLCBvbGRJblN3aXRjaCwgb2xkSW5GdW5jdGlvbkJvZHksIG9sZFBhcmVudGhlc2lzQ291bnQsXG4gICAgICAgICAgICBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBleHBlY3QoJ3snKTtcblxuICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5TdHJpbmdMaXRlcmFsKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0b2tlbiA9IGxvb2thaGVhZDtcblxuICAgICAgICAgICAgc3RhdGVtZW50ID0gcGFyc2VTdGF0ZW1lbnRMaXN0SXRlbSgpO1xuICAgICAgICAgICAgYm9keS5wdXNoKHN0YXRlbWVudCk7XG4gICAgICAgICAgICBpZiAoc3RhdGVtZW50LmV4cHJlc3Npb24udHlwZSAhPT0gU3ludGF4LkxpdGVyYWwpIHtcbiAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIG5vdCBkaXJlY3RpdmVcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcmVjdGl2ZSA9IHNvdXJjZS5zbGljZSh0b2tlbi5zdGFydCArIDEsIHRva2VuLmVuZCAtIDEpO1xuICAgICAgICAgICAgaWYgKGRpcmVjdGl2ZSA9PT0gJ3VzZSBzdHJpY3QnKSB7XG4gICAgICAgICAgICAgICAgc3RyaWN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpZiAoZmlyc3RSZXN0cmljdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKGZpcnN0UmVzdHJpY3RlZCwgTWVzc2FnZXMuU3RyaWN0T2N0YWxMaXRlcmFsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghZmlyc3RSZXN0cmljdGVkICYmIHRva2VuLm9jdGFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZCA9IHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIG9sZExhYmVsU2V0ID0gc3RhdGUubGFiZWxTZXQ7XG4gICAgICAgIG9sZEluSXRlcmF0aW9uID0gc3RhdGUuaW5JdGVyYXRpb247XG4gICAgICAgIG9sZEluU3dpdGNoID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W9ucywgcGFyYW0sIG5hbWUpIHtcbiAgICAgICAgdmFyIGtleSA9ICckJyArIG5hbWU7XG4gICAgICAgIGlmIChzdHJpY3QpIHtcbiAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKG5hbWUpKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5zdHJpY3RlZCA9IHBhcmFtO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMubWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdFBhcmFtTmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwob3B0aW9ucy5wYXJhbVNldCwga2V5KSkge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuc3RyaWN0ZWQgPSBwYXJhbTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLm1lc3NhZ2UgPSBNZXNzYWdlcy5TdHJpY3RQYXJhbUR1cGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoIW9wdGlvbnMuZmlyc3RSZXN0cmljdGVkKSB7XG4gICAgICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZChuYW1lKSkge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZmlyc3RSZXN0cmljdGVkID0gcGFyYW07XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5tZXNzYWdlID0gTWVzc2FnZXMuU3RyaWN0UGFyYW1OYW1lO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQobmFtZSkpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmZpcnN0UmVzdHJpY3RlZCA9IHBhcmFtO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMubWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdFJlc2VydmVkV29yZDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoT2JqZWN0LnByb3Rv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lbnRQYXR0ZXJuKSB7XG4gICAgICAgICAgICBkZWYgPSBwYXJhbS5yaWdodDtcbiAgICAgICAgICAgIHBhcmFtID0gcGFyYW0ubGVmdDtcbiAgICAgICAgICAgICsrb3B0aW9ucy5kZWZhdWx0Q291bnQ7XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLnBhcmFtcy5wdXNoKHBhcmFtKTtcbiAgICAgICAgb3B0aW9ucy5kZWZhdWx0cy5wdXNoKGRlZik7XG5cbiAgICAgICAgcmV0dXJuICFtYXRjaCgnKScpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlUGFyYW1zKGZpcnN0UmVzdHJpY3RlZCkge1xuICAgICAgICB2YXIgb3B0aW9ucztcblxuICAgICAgICBvcHRpb25zID0ge1xuICAgICAgICAgICAgcGFyYW1zOiBbXSxcbiAgICAgICAgICAgIGRlZmF1bHRDb3VudDogMCxcbiAgICAgICAgICAgIGRlZmF1bHRzOiBbXSxcbiAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZDogZmlyc3RSZXN0cmljdGVkXG4gICAgICAgIH07XG5cbiAgICAgICAgZXhwZWN0KCcoJyk7XG5cbiAgICAgICAgaWYgKCFtYXRjaCgnKScpKSB7XG4gICAgICAgICAgICBvcHRpb25zLnBhcmFtU2V0ID0ge307XG4gICAgICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmICghcGFyc2VQYXJhbShvcHRpb25zKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICBpZiAob3B0aW9ucy5kZWZhdWx0Q291bnQgPT09IDApIHtcbiAgICAgICAgICAgIG9wdGlvbnMuZGVmYXVsdHMgPSBbXTtcbiAgICAgIC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xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDE0LjUgQ2xhc3MgRGVmaW5pdGlvbnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlQ2xhc3NCb2R5KCkge1xuICAgICAgICB2YXIgY2xhc3NCb2R5LCB0b2tlbiwgaXNTdGF0aWMsIGhhc0NvbnN0cnVjdG9yID0gZmFsc2UsIGJvZHksIG1ldGhvZCwgY29tcHV0ZWQsIGtleTtcblxuICAgICAgICBjbGFzc0JvZHkgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGV4cGVjdCgneycpO1xuICAgICAgICBib2R5ID0gW107XG4gICAgICAgIHdoaWxlICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCc7JykpIHtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbWV0aG9kID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgICAgICBpc1N0YXRpYyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGNvbXB1dGVkID0gbWF0Y2goJ1snKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3BlcnR5S2V5KCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChrZXkubmFtZSA9PT0gJ3N0YXRpYycgJiYgKGxvb2thaGVhZFByb3BlcnR5TmFtZSgpIHx8IG1hdGNoKCcqJykpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzU3RhdGljID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVkID0gbWF0Y2goJ1snKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnKicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBtZXRob2QgPSB0cnlQYXJzZU1ldGhvZERlZmluaXRpb24odG9rZW4sIGtleSwgY29tcHV0ZWQsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGhvZCkge1xuICAgICAgICAgICAgICAgICAgICBtZXRob2RbJ3N0YXRpYyddID0gaXNTdGF0aWM7IC8vIGpzY3M6aWdub3JlIHJlcXVpcmVEb3ROb3RhdGlvblxuICAgICAgICAgICAgICAgICAgICBpZiAobWV0aG9kLmtpbmQgPT09ICdpbml0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kLmtpbmQgPSAnbWV0aG9kJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzU3RhdGljKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW1ldGhvZC5jb21wdXRlZCAmJiAobWV0aG9kLmtleS5uYW1lIHx8IG1ldGhvZC5rZXkudmFsdWUudG9TdHJpbmcoKSkgPT09ICdjb25zdHJ1Y3RvcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobWV0aG9kLmtpbmQgIT09ICdtZXRob2QnIHx8ICFtZXRob2QubWV0aG9kIHx8IG1ldGhvZC52YWx1ZS5nZW5lcmF0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLkNvbnN0cnVjdG9yU3BlY2lhbE1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoYXNDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuRHVwbGljYXRlQ29uc3RydWN0b3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0NvbnN0cnVjdG9yID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kLmtpbmQgPSAnY29uc3RydWN0b3InO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFtZXRob2QuY29tcHV0ZWQgJiYgKG1ldGhvZC5rZXkubmFtZSB8fCBtZXRob2Qua2V5LnZhbHVlLnRvU3RyaW5nKCkpID09PSAncHJvdG90eXBlJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5TdGF0aWNQcm90b3R5cGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZC50eXBlID0gU3ludGF4Lk1ldGhvZERlZmluaXRpb247XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBtZXRob2QubWV0aG9kO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgbWV0aG9kLnNob3J0aGFuZDtcbiAgICAgICAgICAgICAgICAgICAg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ydEZyb21JZGVudGlmaWVyLFxuICAgICAgICAgICAgc3JjID0gbnVsbCwgc3BlY2lmaWVycyA9IFtdO1xuXG4gICAgICAgIC8vIG5vbi1kZWZhdWx0IGV4cG9ydFxuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgIC8vIGNvdmVyczpcbiAgICAgICAgICAgIC8vIGV4cG9ydCB2YXIgZiA9IDE7XG4gICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZC52YWx1ZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ2xldCc6XG4gICAgICAgICAgICAgICAgY2FzZSAnY29uc3QnOlxuICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbiA9IHBhcnNlTGV4aWNhbERlY2xhcmF0aW9uKHtpbkZvcjogZmFsc2V9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoRXhwb3J0TmFtZWREZWNsYXJhdGlvbihkZWNsYXJhdGlvbiwgc3BlY2lmaWVycywgbnVsbCk7XG4gICAgICAgICAgICAgICAgY2FzZSAndmFyJzpcbiAgICAgICAgICAgICAgICBjYXNlICdjbGFzcyc6XG4gICAgICAgICAgICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbiA9IHBhcnNlU3RhdGVtZW50TGlzdEl0ZW0oKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoRXhwb3J0TmFtZWREZWNsYXJhdGlvbihkZWNsYXJhdGlvbiwgc3BlY2lmaWVycywgbnVsbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJ3snKTtcbiAgICAgICAgd2hpbGUgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICBpc0V4cG9ydEZyb21JZGVudGlmaWVyID0gaXNFeHBvcnRGcm9tSWRlbnRpZmllciB8fCBtYXRjaEtleXdvcmQoJ2RlZmF1bHQnKTtcbiAgICAgICAgICAgIHNwZWNpZmllcnMucHVzaChwYXJzZUV4cG9ydFNwZWNpZmllcigpKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBleHBlY3QoJ30nKTtcblxuICAgICAgICBpZiAobWF0Y2hDb250ZXh0dWFsS2V5d29yZCgnZnJvbScpKSB7XG4gICAgICAgICAgICAvLyBjb3ZlcmluZzpcbiAgICAgICAgICAgIC8vIGV4cG9ydCB7ZGVmYXVsdH0gZnJvbSAnZm9vJztcbiAgICAgICAgICAgIC8vIGV4cG9ydCB7Zm9vfSBmcm9tICdmb28nO1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBzcmMgPSBwYXJzZU1vZHVsZVNwZWNpZmllcigpO1xuICAgICAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICB9IGVsc2UgaWYgKGlzRXhwb3J0RnJvbUlkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIC8vIGNvdmVyaW5nOlxuICAgICAgICAgICAgLy8gZXhwb3J0IHtkZWZhdWx0fTsgLy8gbWlzc2luZyBmcm9tQ2xhdXNlXG4gICAgICAgICAgICB0aHJvd0Vycm9yKGxvb2thaGVhZC52YWx1ZSA/XG4gICAgICAgICAgICAgICAgICAgIE1lc3NhZ2VzLlVuZXhwZWN0ZWRUb2tlbiA6IE1lc3NhZ2VzLk1pc3NpbmdGcm9tQ2xhdXNlLCBsb29rYWhlYWQudmFsdWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gY292ZXJcbiAgICAgICAgICAgIC8v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IGFzIGJhcj59IC4uLjtcbiAgICAgICAgdmFyIGxvY2FsLCBpbXBvcnRlZCwgbm9kZSA9IG5ldyBOb2RlKCk7XG5cbiAgICAgICAgaW1wb3J0ZWQgPSBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKTtcbiAgICAgICAgaWYgKG1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ2FzJykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgbG9jYWwgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoSW1wb3J0U3BlY2lmaWVyKGxvY2FsLCBpbXBvcnRlZCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VOYW1lZEltcG9ydHMoKSB7XG4gICAgICAgIHZhciBzcGVjaWZpZXJzID0gW107XG4gICAgICAgIC8vIHtmb28sIGJhciBhcyBiYXN9XG4gICAgICAgIGV4cGVjdCgneycpO1xuICAgICAgICB3aGlsZSAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgIHNwZWNpZmllcnMucHVzaChwYXJzZUltcG9ydFNwZWNpZmllcigpKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBleHBlY3QoJ30nKTtcbiAgICAgICAgcmV0dXJuIHNwZWNpZmllcnM7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VJbXBvcnREZWZhdWx0U3BlY2lmaWVyKCkge1xuICAgICAgICAvLyBpbXBvcnQgPGZvbz4gLi4uO1xuICAgICAgICB2YXIgbG9jYWwsIG5vZGUgPSBuZX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ICAvLyBpbXBvcnQgJ2Zvbyc7XG4gICAgICAgICAgICBzcmMgPSBwYXJzZU1vZHVsZVNwZWNpZmllcigpO1xuICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICBpZiAobWF0Y2goJ3snKSkge1xuICAgICAgICAgICAgICAgIC8vIGltcG9ydCB7YmFyfVxuICAgICAgICAgICAgICAgIHNwZWNpZmllcnMgPSBzcGVjaWZpZXJzLmNvbmNhdChwYXJzZU5hbWVkSW1wb3J0cygpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgICAgIC8vIGltcG9ydCAqIGFzIGZvb1xuICAgICAgICAgICAgICAgIHNwZWNpZmllcnMucHVzaChwYXJzZUltcG9ydE5hbWVzcGFjZVNwZWNpZmllcigpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNJZGVudGlmaWVyTmFtZShsb29rYWhlYWQpICYmICFtYXRjaEtleXdvcmQoJ2RlZmF1bHQnKSkge1xuICAgICAgICAgICAgICAgIC8vIGltcG9ydCBmb29cbiAgICAgICAgICAgICAgICBzcGVjaWZpZXJzLnB1c2gocGFyc2VJbXBvcnREZWZhdWx0U3BlY2lmaWVyKCkpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW1wb3J0IGZvbywgKiBhcyBmb29cbiAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllcnMucHVzaChwYXJzZUltcG9ydE5hbWVzcGFjZVNwZWNpZmllcigpKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgneycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbXBvcnQgZm9vLCB7YmFyfVxuICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWVycyA9IHNwZWNpZmllcnMuY29uY2F0KHBhcnNlTmFtZWRJbXBvcnRzKCkpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obGV4KCkpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIW1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ2Zyb20nKSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IobG9va2FoZWFkLnZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgIE1lc3NhZ2VzLlVuZXhwZWN0ZWRUb2tlbiA6IE1lc3NhZ2VzLk1pc3NpbmdGcm9tQ2xhdXNlLCBsb29rYWhlYWQudmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBzcmMgPSBwYXJzZU1vZHVsZVNwZWNpZmllcigpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hJbXBvcnREZWNsYXJhdGlvbihzcGVjaWZpZXJzLCBzcmMpO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDE1LjEgU2NyaXB0c1xuXG4gICAgZnVuY3Rpb24gcGFyc2VTY3JpcHRCb2R5KCkge1xuICAgICAgICB2YXIgc3RhdGVtZW50LCBib2R5ID0gW10sIHRva2VuLCBkaXJlY3RpdmUsIGZpcnN0UmVzdHJpY3RlZDtcblxuICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICBpZiAodG9rZW4udHlwZSAhPT0gVG9rZW4uU3RyaW5nTGl0ZXJhbCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzdGF0ZW1lbnQgPSBwYXJzZVN0YXRlbWVudExpc3RJdGVtKCk7XG4gICAgICAgICAgICBib2R5LnB1c2goc3RhdGVtZW50KTtcbiAgICAgICAgICAgIGlmIChzdGF0ZW1lbnQuZXhwcmVzc2lvbi50eXBlICE9PSBTeW50YXguTGl0ZXJhbCkge1xuICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgbm90IGRpcmVjdGl2ZVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlyZWN0aXZlID0gc291cmNlLnNsaWNlKHRva2VuLnN0YXJ0ICsgMSwgdG9rZW4uZW5kIC0gMSk7XG4gICAgICAgICAgICBpZiAoZGlyZWN0aXZlID09PSAndXNlIHN0cmljdCcpIHtcbiAgICAgICAgICAgICAgICBzdHJpY3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmIChmaXJzdFJlc3RyaWN0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4oZmlyc3RSZXN0cmljdGVkLCBNZXNzYWdlcy5TdHJpY3RPY3RhbExpdGVyYWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKCFmaXJzdFJlc3RyaWN0ZWQgJiYgdG9rZW4ub2N0YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkID0gdG9rZW47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKHN0YXJ0SW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIHN0YXRlbWVudCA9IHBhcnNlU3RhdGVtZW50TGlzdEl0ZW0oKTtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBzdGF0ZW1lbnQgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBib2R5LnB1c2goc3RhdGVtZW50KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYm9keTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZVByb2dyYW0oKSB7XG4gICAgICAgIHZhciBib2R5LCBub2RlO1xuXG4gICAgICAgIHBlZWsoKTtcbiAgICAgICAgbm9kZSA9IG5ldyBOb2RlKCk7XG5cbiAgICAgICAgYm9keSA9IHBhcnNlU2NyaXB0Qm9keSgpO1xuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9ncmFtKGJvZHksIHN0YXRlLnNvdXJjZVR5cGUpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGZpbHRlclRva2VuTG9jYXRpb24oKSB7XG4gICAgICAgIHZhciBpLCBlbnRyeSwgdG9rZW4sIHRva2VucyA9IFtdO1xuXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBleHRyYS50b2tlbnMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGVudHJ5ID0gZXh0cmEudG9rZW5zW2ldO1xuICAgICAgICAgICAgdG9rZW4gPSB7XG4gICAgICAgICAgICAgICAgdHlwZTogZW50cnkudHlwZSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZW50cnkudmFsdWVcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAoZW50cnkucmVnZXgpIHtcbiAgICAgICAgICAgICAgICB0b2tlbi5yZWdleCA9IHtcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogZW50cnkucmVnZXgucGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3M6IGVudHJ5LnJlZ2V4LmZsYWdzXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS5yYW5nZSkge1xuICAgICAgICAgICAgICAgIHRva2VuLnJhbmdlID0gZW50cnkucmFuZ2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEubG9jKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4ubG9jID0gZW50cnkubG9jO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICB9XG5cbiAgICAgICAgZXh0cmEudG9rZW5zID0gdG9rZW5zO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHRva2VuaXplKGNvZGUsIG9wdGlvbnMsIGRlbGVnYXRlKSB7XG4gICAgICAgIHZhciB0b1N0cmluZyxcbiAgICAgICAgICAgIHRva2VucztcblxuICAgICAgICB0b1N0cmluZyA9IFN0cmluZztcbiAgICAgICAgaWYgKHR5cGVvZiBjb2RlICE9PSAnc3RyaW5nJyAmJiAhKGNvZGUgaW5zdGFuY2VvZiBTdHJpbmcpKSB7XG4gICAgICAgICAgICBjb2RlID0gdG9TdHJpbmcoY29kZSk7XG4gICAgICAgIH1cblxuICAgICAgICBzb3VyY2UgPSBjb2RlO1xuICAgICAgICBpbmRleCA9IDA7XG4gICAgICAgIGxpbmVOdW1iZXIgPSAoc291cmNlLmxlbmd0aCA+IDApID8gMSA6IDA7XG4gICAgICAgIGxpbmVTdGFydCA9IDA7XG4gICAgICAgIHN0YXJ0SW5kZXggPSBpbmRleDtcbiAgICAgICAgc3RhcnRMaW5lTnVtYmVyID0gbGluZU51bWJlcjtcbiAgICAgICAgc3RhcnRMaW5lU3RhcnQgPSBsaW5lU3RhcnQ7XG4gICAgICAgIGxlbmd0aCA9IHNvdXJjZS5sZW5ndGg7XG4gICAgICAgIGxvb2th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RyYS5sb2MgPSAodHlwZW9mIG9wdGlvbnMubG9jID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMubG9jO1xuXG4gICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5jb21tZW50ID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy5jb21tZW50KSB7XG4gICAgICAgICAgICBleHRyYS5jb21tZW50cyA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy50b2xlcmFudCA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMudG9sZXJhbnQpIHtcbiAgICAgICAgICAgIGV4dHJhLmVycm9ycyA9IFtdO1xuICAgICAgICB9XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHBlZWsoKTtcbiAgICAgICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uRU9GKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGV4dHJhLnRva2VucztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICB3aGlsZSAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGxleEVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleHRyYS5lcnJvcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZEVycm9yKGxleEVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGhhdmUgdG8gYnJlYWsgb24gdGhlIGZpcnN0IGVycm9yXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0byBhdm9pZCBpbmZpbml0ZSBsb29wcy5cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbGV4RXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRva2VucyA9IGV4dHJhLnRva2VucztcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEuZXJyb3JzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIHRva2Vucy5lcnJvcnMgPSBleHRyYS5lcnJvcnM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICBleHRyYSA9IHt9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b2tlbnM7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2UoY29kZSwgb3B0aW9ucykge1xuICAgICAgICB2YXIgcHJvZ3JhbSwgdG9TdHJpbmc7XG5cbiAgICAgICAgdG9TdHJpbmcgPSBTdHJpbmc7XG4gICAgICAgIGlmICh0eXBlb2YgY29kZSAhPT0gJ3N0cmluZycgJiYgIShjb2RlIGluc3RhbmNlb2YgU3RyaW5nKSkge1xuICAgICAgICAgICAgY29kZSA9IHRvU3RyaW5nKGNvZGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgc291cmNlID0gY29kZTtcbiAgICAgICAgaW5kZXggPSAwO1xuICAgICAgICBsaW5lTnVtYmVyID0gKHNvdXJjZS5sZW5ndGggPiAwKSA/IDEgOiAwO1xuICAgICAgICBsaW5lU3RhcnQgPSAwO1xuICAgICAgICBzdGFydEluZGV4ID0gaW5kZXg7XG4gICAgICAgIHN0YXJ0TGluZU51bWJlciA9IGxpbmVOdW1iZXI7XG4gICAgICAgIHN0YXJ0TGluZVN0YXJ0ID0gbGluZVN0YXJ0O1xuICAgICAgICBsZW5ndGggPSBzb3VyY2UubGVuZ3RoO1xuICAgICAgICBsb29rYWhlYWQgPSBudWxsO1xuICAgICAgICBzdGF0ZSA9IHtcbiAgICAgICAgICAgIGFsbG93SW46IHRydWUsXG4gICAgICAgICAgICBhbGxvd1lpZWxkOiB0cnVlLFxuICAgICAgICAgICAgbGFiZWxTZXQ6IHt9LFxuICAgICAgICAgICAgaW5GdW5jdGlvbkJvZHk6IGZhbHNlLFxuICAgICAgICAgICAgaW5JdGVyYXRpb246IGZhbHNlLFxuICAgICAgICAgICAgaW5Td2l0Y2g6IGZhbHNlLFxuICAgICAgICAgICAgbGFzdENvbW1lbnRTdGFydDogLTEsXG4gICAgICAgICAgICBjdXJseVN0YWNrOiBbXSxcbiAgICAgICAgICAgIHNvdXJjZVR5cGU6ICdzY3JpcHQnXG4gICAgICAgIH07XG4gICAgICAgIHN0cmljdCA9IGZhbHNlO1xuXG4gICAgICAgIGV4dHJhID0ge307XG4gICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGV4dHJhLnJhbmdlID0gKHR5cGVvZiBvcHRpb25zLnJhbmdlID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMucmFuZ2U7XG4gICAgICAgICAgICBleHRyYS5sb2MgPSAodHlwZW9mIG9wdGlvbnMubG9jID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMubG9jO1xuICAgICAgICAgICAgZXh0cmEuYXR0YWNoQ29tbWVudCA9ICh0eXBlb2Ygb3B0aW9ucy5hdHRhY2hDb21tZW50ID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMuYXR0YWNoQ29tbWVudDtcblxuICAgICAgICAgICAgaWYgKGV4dHJhLmxvYyAmJiBvcHRpb25zLnNvdXJjZSAhPT0gbnVsbCAmJiBvcHRpb25zLnNvdXJjZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEuc291cmNlID0gdG9TdHJpbmcob3B0aW9ucy5zb3VyY2UpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMudG9rZW5zID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy50b2tlbnMpIHtcbiAgICAgICAgICAgICAgICBleHRyYS50b2tlbnMgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5jb21tZW50ID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy5jb21tZW50KSB7XG4gICAgICAgICAgICAgICAgZXh0cmEuY29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy50b2xlcmFudCA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMudG9sZXJhbnQpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5lcnJvcnMgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS5hdHRhY2hDb21tZW50KSB7XG4gICAgICAgICAgICAgICAgZXh0cmEucmFuZ2UgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGV4dHJhLmNvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZXh0cmEuYm90dG9tUmlnaHRTdGFjayA9IFtdO1xuICAgICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICBleHRyYS5sZWFkaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChvcHRpb25zLnNvdXJjZVR5cGUgPT09ICdtb2R1bGUnKSB7XG4gICAgICAgICAgICAgICAgLy8gdmVyeSByZXN0cmljdGl2ZSBjb25kaXRpb24gZm9yIG5vd1xuICAgICAgICAgICAgICAgIHN0YXRlLnNvdXJjZVR5cGUgPSBvcHRpb25zLnNvdXJjZVR5cGU7XG4gICAgICAgICAgICAgICAgc3RyaWN0ID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBwcm9ncmFtID0gcGFyc2VQcm9ncmFtKCk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLmNvbW1lbnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIHByb2dyYW0uY29tbWVudHMgPSBleHRyYS5jb21tZW50cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEudG9rZW5zICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIGZpbHRlclRva2VuTG9jYXRpb24oKTtcbiAgICAgICAgICAgICAgICBwcm9ncmFtLnRva2VucyA9IGV4dHJhLnRva2VucztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEuZXJyb3JzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIHByb2dyYW0uZXJyb3JzID0gZXh0cmEuZXJyb3JzO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgZXh0cmEgPSB7fTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwcm9ncmFtO1xuICAgIH1cblxuICAgIC8vIFN5bmMgd2l0aCAqLmpzb24gbWFuaWZlc3RzLlxuICAgIGV4cG9ydHMudmVyc2lvbiA9ICcyLjcuMSc7XG5cbiAgICBleHBvcnRzLnRva2VuaXplID0gdG9rZW5pemU7XG5cbiAgICBleHBvcnRzLnBhcnNlID0gcGFyc2U7XG5cbiAgICAvLyBEZWVwIGNvcHkuXG4gICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICBleHBvcnRzLlN5bnRheCA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBuYW1lLCB0eXBlcyA9I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AgICAgICAgICAgLy8gc28gdGhlcmUncyBubyBuZWVkIHRvIHJlY2FsY3VsYXRlIGJib3hlc1xuICAgICAgICAgICAgY2xpcHBlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeTogc2xpY2VzLFxuICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgICAgdGFnczogZmVhdHVyZXNbaV0udGFncyB8fCBudWxsLFxuICAgICAgICAgICAgICAgIG1pbjogZmVhdHVyZS5taW4sXG4gICAgICAgICAgICAgICAgbWF4OiBmZWF0dXJlLm1heFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gY2xpcHBlZC5sZW5ndGggPyBjbGlwcGVkIDogbnVsbDtcbn1cblxuZnVuY3Rpb24gY2xpcFBvaW50cyhnZW9tZXRyeSwgazEsIGsyLCBheGlzKSB7XG4gICAgdmFyIHNsaWNlID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGdlb21ldHJ5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBhID0gZ2VvbWV0cnlbaV0sXG4gICAgICAgICAgICBhayA9IGFbYXhpc107XG5cbiAgICAgICAgaWYgKGFrID49IGsxICYmIGFrIDw9IGsyKSBzbGljZS5wdXNoKGEpO1xuICAgIH1cbiAgICByZXR1cm4gc2xpY2U7XG59XG5cbmZ1bmN0aW9uIGNsaXBHZW9tZXRyeShnZW9tZXRyeSwgazEsIGsyLCBheGlzLCBpbnRlcnNlY3QsIGNsb3NlZCkge1xuXG4gICAgdmFyIHNsaWNlcyA9IFtdO1xuXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBnZW9tZXRyeS5sZW5ndGg7IGkrKykge1xuXG4gICAgICAgIHZhciBhayA9IDAsXG4gICAgICAgICAgICBiayA9IDAsXG4gICAgICAgICAgICBiID0gbnVsbCxcbiAgICAgICAgICAgIHBvaW50cyA9IGdlb21ldHJ5W2ldLFxuICAgICAgICAgICAgYXJlYSA9IHBvaW50cy5hcmVhLFxuICAgICAgICAgICAgZGlzdCA9IHBvaW50cy5kaXN0LFxuICAgICAgICAgICAgbGVuID0gcG9pbnRzLmxlbmd0aCxcbiAgICAgICAgICAgIGEsIGosIGxhc3Q7XG5cbiAgICAgICAgdmFyIHNsaWNlID0gW107XG5cbiAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbiAtIDE7IGorKykge1xuICAgICAgICAgICAgYSA9IGIgfHwgcG9pbnRzW2pdO1xuICAgICAgICAgICAgYiA9IHBvaW50c1tqICsgMV07XG4gICAgICAgICAgICBhayA9IGJrIHx8IGFbYXhpc107XG4gICAgICAgICAgICBiayA9IGJbYXhpc107XG5cbiAgICAgICAgICAgIGlmIChhayA8IGsxKSB7XG5cbiAgICAgICAgICAgICAgICBpZiAoKGJrID4gazIpKSB7IC8vIC0tLXwtLS0tLXwtLT5cbiAgICAgICAgICAgICAgICAgICAgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazEpLCBpbnRlcnNlY3QoYSwgYiwgazIpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjbG9zZWQpIHNsaWNlID0gbmV3U2xpY2Uoc2xpY2VzLCBzbGljZSwgYXJlYSwgZGlzdCk7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJrID49IGsxKSBzbGljZS5wdXNoKGludGVyc2VjdChhLCBiLCBrMSkpOyAvLyAtLS18LS0+ICB8XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYWsgPiBrMikge1xuXG4gICAgICAgICAgICAgICAgaWYgKChiayA8IGsxKSkgeyAvLyA8LS18LS0tLS18LS0tXG4gICAgICAgICAgICAgICAgICAgIHNsaWNlLnB1c2goaW50ZXJzZWN0KGEsIGIsIGsyKSwgaW50ZXJzZWN0KGEsIGIsIGsxKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2xvc2VkKSBzbGljZSA9IG5ld1NsaWNlKHNsaWNlcywgc2xpY2UsIGFyZWEsIGRpc3QpO1xuXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChiayA8PSBrMikgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazIpKTsgLy8gfCAgPC0tfC0tLVxuXG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2xpY2UucHVzaChhKTtcblxuICAgICAgICAgICAgICAgIGlmIChiayA8IGsxKSB7IC8vIDwtLXwtLS0gIHxcbiAgICAgICAgICAgICAgICAgICAgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazEpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjbG9zZWQpIHNsaWNlID0gbmV3U2xpY2Uoc2xpY2VzLCBzbGljZSwgYXJlYSwgZGlzdCk7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJrID4gazIpIHsgLy8gfCAgLS0tfC0tPlxuICAgICAgICAgICAgICAgICAgICBzbGljZS5wdXNoKGludGVyc2VjdChhLCBiLCBrMikpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNsb3NlZCkgc2xpY2UgPSBuZXdTbGljZShzbGljZXMsIHNsaWNlLCBhcmVhLCBkaXN0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gfCAtLT4gfFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYWRkIHRoZSBsYXN0IHBvaW50XG4gICAgICAgIGEgPSBwb2ludHNbbGVuIC0gMV07XG4gICAgICAgIGFrID0gYVtheGlzXTtcbiAgICAgICAgaWYgKGFrID49IGsxICYmIGFrIDw9IGsyKSBzbGljZS5wdXNoKGEpO1xuXG4gICAgICAgIC8vIGNsb3NlIHRoZSBwb2x5Z29uIGlmIGl0cyBlbmRwb2ludHMgYXJlIG5vdCB0aGUgc2FtZSBhZnRlciBjbGlwcGluZ1xuXG4gICAgICAgIGxhc3QgPSBzbGljZ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ICAgICB0aWxlID0gdGhpcy50aWxlc1tpZF0sXG4gICAgICAgICAgICB0aWxlVG9sZXJhbmNlID0geiA9PT0gb3B0aW9ucy5tYXhab29tID8gMCA6IG9wdGlvbnMudG9sZXJhbmNlIC8gKHoyICogb3B0aW9ucy5leHRlbnQpO1xuXG4gICAgICAgIGlmICghdGlsZSkge1xuICAgICAgICAgICAgaWYgKGRlYnVnID4gMSkgY29uc29sZS50aW1lKCdjcmVhdGlvbicpO1xuXG4gICAgICAgICAgICB0aWxlID0gdGhpcy50aWxlc1tpZF0gPSBjcmVhdGVUaWxlKGZlYXR1cmVzLCB6MiwgeCwgeSwgdGlsZVRvbGVyYW5jZSwgeiA9PT0gb3B0aW9ucy5tYXhab29tKTtcbiAgICAgICAgICAgIHRoaXMudGlsZUNvb3Jkcy5wdXNoKHt6OiB6LCB4OiB4LCB5OiB5fSk7XG5cbiAgICAgICAgICAgIGlmIChkZWJ1Zykge1xuICAgICAgICAgICAgICAgIGlmIChkZWJ1ZyA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ3RpbGUgeiVkLSVkLSVkIChmZWF0dXJlczogJWQsIHBvaW50czogJWQsIHNpbXBsaWZpZWQ6ICVkKScsXG4gICAgICAgICAgICAgICAgICAgICAgICB6LCB4LCB5LCB0aWxlLm51bUZlYXR1cmVzLCB0aWxlLm51bVBvaW50cywgdGlsZS5udW1TaW1wbGlmaWVkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS50aW1lRW5kKCdjcmVhdGlvbicpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIga2V5ID0gJ3onICsgejtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXRzW2tleV0gPSAodGhpcy5zdGF0c1trZXldIHx8IDApICsgMTtcbiAgICAgICAgICAgICAgICB0aGlzLnRvdGFsKys7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzYXZlIHJlZmV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G4gICAgICAgIHR5cGUgPSBmZWF0dXJlLnR5cGUsXG4gICAgICAgIHNpbXBsaWZpZWQgPSBbXSxcbiAgICAgICAgc3FUb2xlcmFuY2UgPSB0b2xlcmFuY2UgKiB0b2xlcmFuY2UsXG4gICAgICAgIGksIGosIHJpbmcsIHA7XG5cbiAgICBpZiAodHlwZSA9PT0gMSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZ2VvbS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgc2ltcGxpZmllZC5wdXNoKGdlb21baV0pO1xuICAgICAgICAgICAgdGlsZS5udW1Qb2ludHMrKztcbiAgICAgICAgICAgIHRpbGUubnVtU2ltcGxpZmllZCsrO1xuICAgICAgICB9XG5cbiAgICB9IGVsc2Uge1xuXG4gICAgICAgIC8vIHNpbXBsaWZ5IGFuZCB0cmFuc2Zvcm0gcHJvamVjdGVkIGNvb3JkaW5hdGVzIGZvciB0aWxlIGdlb21ldHJ5XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBnZW9tLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICByaW5nID0gZ2VvbVtpXTtcblxuICAgICAgICAgICAgLy8gZmlsdGVyIG91dCB0aW55IHBvbHlsaW5lcyAmIHBvbHlnb25zXG4gICAgICAgICAgICBpZiAoIW5vU2ltcGxpZnkgJiYgKCh0eXBlID09PSAyICYmIHJpbmcuZGlzdCA8IHRvbGVyYW5jZSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHR5cGUgPT09IDMgJiYgcmluZy5hcmVhIDwgc3FUb2xlcmFuY2UpKSkge1xuICAgICAgICAgICAgICAgIHRpbGUubnVtUG9pbnRzICs9IHJpbmcubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc2ltcGxpZmllZFJpbmcgPSBbXTtcblxuICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IH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gICAgYTEwLCBhMTEsIGExMiwgYTEzLFxuICAgICAgICBhMjAsIGEyMSwgYTIyLCBhMjM7XG5cbiAgICBpZiAoYSA9PT0gb3V0KSB7XG4gICAgICAgIG91dFsxMl0gPSBhWzBdICogeCArIGFbNF0gKiB5ICsgYVs4XSAqIHogKyBhWzEyXTtcbiAgICAgICAgb3V0WzEzXSA9IGFbMV0gKiB4ICsgYVs1XSAqIHkgKyBhWzldICogeiArIGFbMTNdO1xuICAgICAgICBvdXRbMTRdID0gYVsyXSAqIHggKyBhWzZdICogeSArIGFbMTBdICogeiArIGFbMTRdO1xuICAgICAgICBvdXRbMTVdID0gYVszXSAqIHggKyBhWzddICogeSArIGFbMTFdICogeiArIGFbMTVdO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGEwMCA9IGFbMF07IGEwMSA9IGFbMV07IGEwMiA9IGFbMl07IGEwMyA9IGFbM107XG4gICAgICAgIGExMCA9IGFbNF07IGExMSA9IGFbNV07IGExMiA9IGFbNl07IGExMyA9IGFbN107XG4gICAgICAgIGEyMCA9IGFbOF07IGEyMSA9IGFbOV07IGEyMiA9IGFbMTBdOyBhMjMgPSBhWzExXTtcblxuICAgICAgICBvdXRbMF0gPSBhMDA7IG91dFsxXSA9IGEwMTsgb3V0WzJdID0gYTAyOyBvdXRbM10gPSBhMDM7XG4gICAgICAgIG91dFs0XSA9IGExMDsgb3V0WzVdID0gYTExOyBvdXRbNl0gPSBhMTI7IG91dFs3XSA9IGExMztcbiAgICAgICAgb3V0WzhdID0gYTIwOyBvdXRbOV0gPSBhMjE7IG91dFsxMF0gPSBhMjI7IG91dFsxMV0gPSBhMjM7XG5cbiAgICAgICAgb3V0WzEyXSA9IGEwMCAqIHggKyBhMTAgKiB5ICsgYTIwICogeiArIGFbMTJdO1xuICAgICAgICBvdXRbMTNdID0gYTAxICogeCArIGExMSAqIHkgKyBhMjEgKiB6ICsgYVsxM107XG4gICAgICAgIG91dFsxNF0gPSBhMDIgKiB4ICsgYTEyICog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4gICAgICAgIGExMiA9IGFbNl0sXG4gICAgICAgIGExMyA9IGFbN10sXG4gICAgICAgIGEyMCA9IGFbOF0sXG4gICAgICAgIGEyMSA9IGFbOV0sXG4gICAgICAgIGEyMiA9IGFbMTBdLFxuICAgICAgICBhMjMgPSBhWzExXTtcblxuICAgIGlmIChhICE9PSBvdXQpIHsgLy8gSWYgdGhlIHNvdXJjZSBhbmQgZGVzdGluYXRpb24gZGlmZmVyLCBjb3B5IHRoZSB1bmNoYW5nZWQgcm93c1xuICAgICAgICBvdXRbMF0gID0gYVswXTtcbiAgICAgICAgb3V0WzFdICA9IGFbMV07XG4gICAgICAgIG91dFsyXSAgPSBhWzJdO1xuICAgICAgICBvdXRbM10gID0gYVszXTtcbiAgICAgICAgb3V0WzEyXSA9IGFbMTJdO1xuICAgICAgICBvdXRbMTNdID0gYVsxM107XG4gICAgICAgIG91dFsxNF0gPSBhWzE0XTtcbiAgICAgICAgb3V0WzE1XSA9IGFbMTVdO1xuICAgIH1cblxuICAgIC8vIFBlcmZvcm0gYXhpcy1zcGVjaWZpYyBtYXRyaXggbXVsdGlwbGljYXRpb25cbiAgICBvdXRbNF0gPSBhMTAgKiBjICsgYTIwICogcztcbiAgICBvdXRbNV0gPSBhMTEgKiBjICsgYTIxICogcztcbiAgICBvdXRbNl0gPSBhMTIgKiBjICsgYTIyICogcztcbiAgICBvdXRbN10gPSBhMTMgKiBjICsgYTIzICogcztcbiAgICBvdXRbOF0gPSBhMjAgKiBjIC0gYTEwICogcztcbiAgICBvdXRbOV0gPSBhMjEgKiBjIC0gYTExICogcztcbiAgICBvdXRbMTBdID0gYTIyICogYyAtIGExMiAqIHM7XG4gICAgb3V0WzExXSA9IGEyMyAqIGMgLSBhMTMgKiBzO1xuICAgIHJldHVybiBvdXQ7XG59O1xuXG4vKipcbiAqIFJvdGF0ZXMgYSBtYXRyaXggYnkgdGhlIGdpdmVuIGFuZ2xlIGFyb3VuZCB0aGUgWSBheGlzXG4gKlxuICogQHBhcm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sxMF0gPSAxIC0gKHh4ICsgeXkpO1xuICAgIG91dFsxMV0gPSAwO1xuICAgIG91dFsxMl0gPSB2WzBdO1xuICAgIG91dFsxM10gPSB2WzFdO1xuICAgIG91dFsxNF0gPSB2WzJdO1xuICAgIG91dFsxNV0gPSAxO1xuICAgIFxuICAgIHJldHVybiBvdXQ7XG59O1xuXG5tYXQ0LmZyb21RdWF0ID0gZnVuY3Rpb24gKG91dCwgcSkge1xuICAgIHZhciB4ID0gcVswXSwgeSA9IHFbMV0sIHogPSBxWzJdLCB3ID0gcVszXSxcbiAgICAgICAgeDIgPSB4ICsgeCxcbiAgICAgICAgeTIgPSB5ICsgeSxcbiAgICAgICAgejIgPSB6ICsgeixcblxuICAgICAgICB4eCA9IHggKiB4MixcbiAgICAgICAgeXggPSB5ICogeDIsXG4gICAgICAgIHl5ID0geSAqIHkyLFxuICAgICAgICB6eCA9IHogKiB4MixcbiAgICAgICAgenkgPSB6ICogeTIsXG4gICAgICAgIHp6ID0geiAqIHoyLFxuICAgICAgICB3eCA9IHcgKiB4MixcbiAgICAgICAgd3kgPSB3ICogeTIsXG4gICAgICAgIHd6ID0gdyAqIHoyO1xuXG4gICAgb3V0WzBdID0gMSAtIHl5IC0geno7XG4gICAgb3V0WzFdID0geXggKyB3ejtcbiAgICBvdXRbMl0gPSB6eCAtIHd5O1xuICAgIG91dFszXSA9IDA7XG5cbiAgICBvdXRbNF0gPSB5eCAtIHd6O1xuICAgIG91dFs1XSA9IDEgLSB4eCAtIHp6O1xuICAgIG91dFs2XSA9IHp5ICsgd3g7XG4gICAgb3V0WzddID0gMDtcblxuICAgIG91dFs4XSA9IHp4ICsgd3k7XG4gICAgb3V0WzldID0genkgLSB3eDtcbiAgICBvdXRbMTBdID0gMSAtIHh4IC0geXk7XG4gICAgb3V0WzExXSA9IDA7XG5cbiAgICBvdXRbMTJdID0gMDtcbiAgICBvdXRbMTNdID0gMDtcbiAgICBvdXRbMTRdID0gMDtcbiAgICBvdXRbMTVdID0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KHowICogZXlleCArIHoxICogZXlleSArIHoyICogZXlleik7XG4gICAgb3V0WzE1XSA9IDE7XG5cbiAgICByZXR1cm4gb3V0O1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIGEgbWF0NFxuICpcbiAqIEBwYXJhbSB7bWF0NH0gbWF0IG1hdHJpeCB0byByZXByZXNlbnQgYXMgYSBzdHJpbmdcbiAqIEByZXR1cm5zIHtTdHJpbmd9IHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGUgbWF0cml4XG4gKi9cbm1hdDQuc3RyID0gZnVuY3Rpb24gKGEpIHtcbiAgICByZXR1cm4gJ21hdDQoJyArIGFbMF0gKyAnLCAnICsgYVsxXSArICcsICcgKyBhWzJdICsgJywgJyArIGFbM10gKyAnLCAnICtcbiAgICAgICAgICAgICAgICAgICAgYVs0XSArICcsICcgKyBhWzVdICsgJywgJyArIGFbNl0gKyAnLCAnICsgYVs3XSArICcsICcgK1xuICAgICAgICAgICAgICAgICAgICBhWzhdICsgJywgJyArIGFbOV0gKyAnLCAnICsgYVsxMF0gKyAnLCAnICsgYVsxMV0gKyAnLCAnICsgXG4gICAgICAgICAgICAgICAgICAgIGFbMTJdICsgJywgJyArIGFbMTNdICsgJywgJyArIGFbMTRdICsgJywgJyArIGFbMTVdICsgJyknO1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIEZyb2Jlbml1cyBub3JtIG9mIGEgbWF0NFxuICpcbiAqIEBwYXJhbSB7bWF0NH0gYSB0aGUgbWF0cml4IHRvIGNhbGN1bGF0ZSBGcm9iZW5pdXMgbm9ybSBvZlxuICogQHJldHVybnMge051bWJlcn0gRnJvYmVuaXVzIG5vcm1cbiAqL1xubWF0NC5mcm9iID0gZnVuY3Rpb24gKGEpIHtcbiAgICByZXR1cm4oTWF0aC5zcXJ0KE1hdGgucG93KGFbMF0sIDIpICsgTWF0aC5wb3coYVsxXSwgMikgKyBNYXRoLnBvdy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mUm9vdDtcbiAgICAgICAgZlJvb3QgPSAwLjUvZlJvb3Q7ICAvLyAxLyg0dylcbiAgICAgICAgb3V0WzBdID0gKG1bN10tbVs1XSkqZlJvb3Q7XG4gICAgICAgIG91dFsxXSA9IChtWzJdLW1bNl0pKmZSb290O1xuICAgICAgICBvdXRbMl0gPSAobVszXS1tWzFdKSpmUm9vdDtcbiAgICB9IGVsc2Uge1xuICAgICAgICAvLyB8d3wgPD0gMS8yXG4gICAgICAgIHZhciBpID0gMDtcbiAgICAgICAgaWYgKCBtWzRdID4gbVswXSApXG4gICAgICAgICAgaSA9IDE7XG4gICAgICAgIGlmICggbVs4XSA+IG1baSozK2ldIClcbiAgICAgICAgICBpID0gMjtcbiAgICAgICAgdmFyIGogPSAoaSsxKSUzO1xuICAgICAgICB2YXIgayA9IChpKzIpJTM7XG4gICAgICAgIFxuICAgICAgICBmUm9vdCA9IE1hdGguc3FydChtW2kqMytpXS1tW2oqMytqXS1tW2sqMytrXSArIDEuMCk7XG4gICAgICAgIG91dFtpXSA9IDAuNSAqIGZSb290O1xuICAgICAgICBmUm9vdCA9IDAuNSAvIGZSb290O1xuICAgICAgICBvdXRbM10gPSAobVtrKjMral0gLSBtW2oqMytrXSkgKiBmUm9vdDtcbiAgICAgICAgb3V0W2pdID0gKG1baiozK2ldICsgbVtpKjMral0pICogZlJvb3Q7XG4gICAgICAgIG91dFtrXSA9IChtW2sqMytpXSArIG1baSozK2tdKSAqIGZSb290O1xuICAgIH1cbiAgICBcbiAgICByZXR1cm4gb3V0O1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIGEgcXVhdGVuaW9uXG4gKlxuICogQHBhcmFtIHtxdWF0fSB2ZWMgdmVjdG9yIHRvIHJlcHJlc2VudCBhcyBhIHN0cmluZ1xuICogQHJldHVybnMge1N0cmluZ30gc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIHRoZSB2ZWN0b3JcbiAqL1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uID0gYWRkTGlzdC5sZW5ndGgsXG4gICAgICAgIG5hbWUsIHByb3A7XG4gICAgd2hpbGUoaiA8IGxlbikge1xuICAgICAgICBpZigobmFtZSA9IGFkZExpc3RbaisrXSkgPT09ICdfX3NlbGYnKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBwcm9wID0gYWRkW25hbWVdO1xuICAgICAgICBpZihpc0Z1bmN0aW9uKHByb3ApICYmXG4gICAgICAgICAgICAgICAgKCFoYXNJbnRyb3NwZWN0aW9uIHx8IHByb3AudG9TdHJpbmcoKS5pbmRleE9mKCcuX19iYXNlJykgPiAtMSkpIHtcbiAgICAgICAgICAgIHJlc1tuYW1lXSA9IChmdW5jdGlvbihuYW1lLCBwcm9wKSB7XG4gICAgICAgICAgICAgICAgdmFyIGJhc2VNZXRob2QgPSBiYXNlW25hbWVdP1xuICAgICAgICAgICAgICAgICAgICAgICAgYmFzZVtuYW1lXSA6XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID09PSAnX19jb25zdHJ1Y3Rvcic/IC8vIGNhc2Ugb2YgaW5oZXJpdGFuY2UgZnJvbSBwbGFuZSBmdW5jdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5fX3NlbGYuX19wYXJlbnQgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vT3A7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYmFzZVNhdmVkID0gdGhpcy5fX2Jhc2U7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX19iYXNlID0gYmFzZU1ldGhvZDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IHByb3AuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2Jhc2UgPSBiYXNlU2F2ZWQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pKG5hbWUsIHByb3ApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzW25hbWVdID0gcHJvcDtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZnVuY3Rpb24gYXBwbHlNaXhpbnMobWl4aW5zLCByZXMpIHtcbiAgICB2YXIgaSA9IDEsIG1peGluO1xuICAgIHdoaWxlKG1peGluID0gbWl4aW5zW2krK10pIHtcbiAgICAgICAgcmVzP1xuICAgICAgICAgICAgaXNGdW5jdGlvbihtaXhpbik/XG4gICAgICAgICAgICAgICAgaW5oZXJpdC5zZWxmKHJlcywgbWl4aW4ucHJvdG90eXBlLCBtaXhpbikgOlxuICAgICAgICAgICAgICAgIGluaGVyaXQuc2VsZihyZXMsIG1peGluKSA6XG4gICAgICAgICAgICByZXMgPSBpc0Z1bmN0aW9uKG1peGluKT9cbiAgICAgICAgICAgICAgICBpbmhlcml0KG1peGluc1swXSwgbWl4aW4ucHJvdG90eXBlLCBtaXhpbikgOlxuICAgICAgICAgICAgICAgIGluaGVyaXQobWl4aW5zWzBdLCBtaXhpbik7XG4gICAgfVxuICAgIHJldHVybiByZXMgfHwgbWl4aW5zWzBdO1xufVxuXG4vKipcbiogQ3JlYXRlcyBjbGFzc1xuKiBAZXhwb3J0c1xuKiBAcGFyYW0ge0Z1bmN0aW9ufEFycmF5fSBbYmFzZUNsYXNzfGJhc2VDbGFzc0FuZE1peGluc10gY2xhc3MgKG9yIGNsYXNzIGFuZCBtaXhpbnMpIHRvIGluaGVyaXQgZnJvbVxuKiBAcGFyYW0ge09iamVjdH0gcHJvdG90eXBlRmllbGRzXG4qIEBwYXJhbSB7T2JqZWN0fSBbc3RhdGljRmllbGRzXVxuKiBAcmV0dXJucyB7RnVuY3Rpb259IGNsYXNzXG4qL1xuZnVuY3Rpb24gaW5oZXJpdCgpIHtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cyxcb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9TQ0hFTUEgPSByZXF1aXJlKCcuL3NjaGVtYS9kZWZhdWx0X2Z1bGwnKTtcbnZhciBERUZBVUxUX1NBRkVfU0NIRU1BID0gcmVxdWlyZSgnLi9zY2hlbWEvZGVmYXVsdF9zYWZlJyk7XG5cbnZhciBfdG9TdHJpbmcgICAgICAgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nO1xudmFyIF9oYXNPd25Qcm9wZXJ0eSA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG5cbnZhciBDSEFSX1RBQiAgICAgICAgICAgICAgICAgID0gMHgwOTsgLyogVGFiICovXG52YXIgQ0hBUl9MSU5FX0ZFRUQgICAgICAgICAgICA9IDB4MEE7IC8qIExGICovXG52YXIgQ0hBUl9DQVJSSUFHRV9SRVRVUk4gICAgICA9IDB4MEQ7IC8qIENSICovXG52YXIgQ0hBUl9TUEFDRSAgICAgICAgICAgICAgICA9IDB4MjA7IC8qIFNwYWNlICovXG52YXIgQ0hBUl9FWENMQU1BVElPTiAgICAgICAgICA9IDB4MjE7IC8qICEgKi9cbnZhciBDSEFSX0RPVUJMRV9RVU9URSAgICAgICAgID0gMHgyMjsgLyogXCIgKi9cbnZhciBDSEFSX1NIQVJQICAgICAgICAgICAgICAgID0gMHgyMzsgLyogIyAqL1xudmFyIENIQVJfUEVSQ0VOVCAgICAgICAgICAgICAgPSAweDI1OyAvKiAlICovXG52YXIgQ0hBUl9BTVBFUlNBTkQgICAgICAgICAgICA9IDB4MjY7IC8qICYgKi9cbnZhciBDSEFSX1NJTkdMRV9RVU9URSAgICAgICAgID0gMHgyNzsgLyogJyAqL1xudmFyIENIQVJfQVNURVJJU0sgICAgICAgICAgICAgPSAweDJBOyAvKiAqICovXG52YXIgQ0hBUl9DT01NQSAgICAgICAgICAgICAgICA9IDB4MkM7IC8qICwgKi9cbnZhciBDSEFSX01JTlVTICAgICAgICAgICAgICAgID0gMHgyRDsgLyogLSAqL1xudmFyIENIQVJfQ09M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G5cbmZ1bmN0aW9uIHdyaXRlRm9sZGVkTGluZXMoc3RhdGUsIGNvdW50KSB7XG4gIGlmICgxID09PSBjb3VudCkge1xuICAgIHN0YXRlLnJlc3VsdCArPSAnICc7XG4gIH0gZWxzZSBpZiAoY291bnQgPiAxKSB7XG4gICAgc3RhdGUucmVzdWx0ICs9IGNvbW1vbi5yZXBlYXQoJ1xcbicsIGNvdW50IC0gMSk7XG4gIH1cbn1cblxuXG5mdW5jdGlvbiByZWFkUGxhaW5TY2FsYXIoc3RhdGUsIG5vZGVJbmRlbnQsIHdpdGhpbkZsb3dDb2xsZWN0aW9uKSB7XG4gIHZhciBwcmVjZWRpbmcsXG4gICAgICBmb2xsb3dpbmcsXG4gICAgICBjYXB0dXJlU3RhcnQsXG4gICAgICBjYXB0dXJlRW5kLFxuICAgICAgaGFzUGVuZGluZ0NvbnRlbnQsXG4gICAgICBfbGluZSxcbiAgICAgIF9saW5lU3RhcnQsXG4gICAgICBfbGluZUluZGVudCxcbiAgICAgIF9raW5kID0gc3RhdGUua2luZCxcbiAgICAgIF9yZXN1bHQgPSBzdGF0ZS5yZXN1bHQsXG4gICAgICBjaDtcblxuICBjaCA9IHN0YXRlLmlucHV0LmNoYXJDb2RlQXQoc3RhdGUucG9zaXRpb24pO1xuXG4gIGlmIChpc19XU19PUl9FT0woY2gpICAgICAgICAgICAgIHx8XG4gICAgICBpc19GTE9XX0lORElDQVRPUihjaCkgICAgICAgIHx8XG4gICAgICAweDIzLyogIyAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDI2LyogJiAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDJBLyogKiAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDIxLyogISAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDdDLyogfCAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDNFLyogPiAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDI3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IHtcbiAga2luZDogJ3NjYWxhcicsXG4gIGNvbnN0cnVjdDogZnVuY3Rpb24gKGRhdGEpIHsgcmV0dXJuIG51bGwgIT09IGRhdGEgPyBkYXRhIDogJyc7IH1cbn0pO1xuIiwiJ3VzZSBzdHJpY3QnO1xuXG52YXIgVHlwZSA9IHJlcXVpcmUoJy4uL3R5cGUnKTtcblxudmFyIFlBTUxfVElNRVNUQU1QX1JFR0VYUCA9IG5ldyBSZWdFeHAoXG4gICdeKFswLTldWzAtOV1bMC05XVswLTldKScgICAgICAgICAgKyAvLyBbMV0geWVhclxuICAnLShbMC05XVswLTldPyknICAgICAgICAgICAgICAgICAgICsgLy8gWzJdIG1vbnRoXG4gICctKFswLTldWzAtOV0/KScgICAgICAgICAgICAgICAgICAgKyAvLyBbM10gZGF5XG4gICcoPzooPzpbVHRdfFsgXFxcXHRdKyknICAgICAgICAgICAgICArIC8vIC4uLlxuICAnKFswLTldWzAtOV0/KScgICAgICAgICAgICAgICAgICAgICsgLy8gWzRdIGhvdXJcbiAgJzooWzAtOV1bMC05XSknICAgICAgICAgICAgICAgICAgICArIC8vIFs1XSBtaW51dGVcbiAgJzooWzAtOV1bMC05XSknICAgICAgICAgICAgICAgICAgICArIC8vIFs2XSBzZWNvbmRcbiAgJyg/OlxcXFwuKFswLTldKikpPycgICAgICAgICAgICAgICAgICsgLy8gWzddIGZyYWN0aW9uXG4gICcoPzpbIFxcXFx0XSooWnwoWy0rXSkoWzAtOV1bMC05XT8pJyArIC8vIFs4XSB0eiBbOV0gdHpfc2lnbiBbMTBdIHR6X2hvdXJcbiAgJyg/OjooWzAtOV1bMC05XSkpPykpPyk/JCcpOyAgICAgICAgIC8vIFsxMV0gdHpfbWludXRlXG5cbmZ1bmN0aW9uIHJlc29sdmVZYW1sVGltZXN0YW1wKGRhdGEpIHtcbiAgaWYgKG51bGwgPT09IGRhdGEpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBpZiAoWUFNTF9USU1FU1RB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IGEgY29uc29sZSB0byBsb2cgdG9cclxuICAgICAgICB9IGVsc2UgaWYgKGNvbnNvbGVbbWV0aG9kTmFtZV0gIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gYmluZE1ldGhvZChjb25zb2xlLCBtZXRob2ROYW1lKTtcclxuICAgICAgICB9IGVsc2UgaWYgKGNvbnNvbGUubG9nICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuIGJpbmRNZXRob2QoY29uc29sZSwgJ2xvZycpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBub29wO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBiaW5kTWV0aG9kKG9iaiwgbWV0aG9kTmFtZSkge1xyXG4gICAgICAgIHZhciBtZXRob2QgPSBvYmpbbWV0aG9kTmFtZV07XHJcbiAgICAgICAgaWYgKHR5cGVvZiBtZXRob2QuYmluZCA9PT0gJ2Z1bmN0aW9uJykge1xyXG4gICAgICAgICAgICByZXR1cm4gbWV0aG9kLmJpbmQob2JqKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBNaXNzaW5nIGJpbmQgc2hpbSBvciBJRTggKyBNb2Rlcm5penIsIGZhbGxiYWNrIHRvIHdyYXBwaW5nXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5hcHBseS5hcHBseShtZXRob2QsIFtvYmosIGFyZ3VtZW50c10pO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBlbmFibGVMb2dnaW5nV2hlbkNvbnNvbGVBcnJpdmVzKG1ldGhvZE5hbWUsIGxldmVsKSB7XHJcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBjb25zb2xlICE9PSB1bmRlZmluZWRUeXBlKSB7XHJcbiAgICAgICAgICAgICAgICByZXBsYWNlTG9nZ2luZ01ldGhvZHMobGV2ZWwpO1xyXG4gICAgICAgICAgICAgICAgc2VsZlttZXRob2ROYW1lXS5hcHBseShzZWxmLCBhcmd1bWVudHMpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICB2YXIgbG9nTWV0aG9kcyA9IFtcclxuICAgICAgICBcInRyYWNlXCIsXHJcbiAgICAgICAgXCJkZWJ1Z1wiLFxyXG4gICAgICAgIFwiaW5mb1wiLFxyXG4gICAgICAgIFwid2FyblwiLFxyXG4gICAgICAgIFwiZXJyb3JcIlxyXG4gICAgXTtcclxuXHJcbiAgICBmdW5jdGlvbiByZXBsYWNlTG9nZ2luZ01ldGhvZHMobGV2ZWwpIHtcclxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxvZ01ldGhvZHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgdmFyIG1ldGhvZE5hbWUgPSBsb2dNZXRob2RzW2ldO1xyXG4gICAgICAgICAgICBzZWxmW21ldGhvZE5hbWVdID0gKGkgPCBsZXZlbCkgPyBub29wIDogc2VsZi5tZXRob2RGYWN0b3J5KG1ldGhvZE5hbWUsIGxldmVsKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcGVyc2lzdExldmVsSWZQb3NzaWJsZShsZXZlbE51bSkge1xyXG4gICAgICAgIHZhciBsZXZlbE5hb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gICAgICAgICAgICByZXR1cm4gJyB0cnVlICc7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiBwcm9wZXJ0eUVxdWFsKGtleSwgdmFsdWUpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0eXBlOiAncHJvcGVydHlFcXVhbCcsXG4gICAgICAgIG9wdDogJz09PScgLFxuICAgICAgICBrZXk6IGtleSxcbiAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICB0b1N0cmluZzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHdyYXAobWF5YmVRdW90ZSh0aGlzLnZhbHVlKSArICcgJyArIHRoaXMub3B0ICsgJyAnICsgbG9va1VwKGtleSkpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gcHJvcGVydHlPcihrZXksIHZhbHVlcykge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6ICdwcm9wZXJ0eU9yJyxcbiAgICAgICAga2V5OiBrZXksXG4gICAgICAgIHZhbHVlczogdmFsdWVzLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4gcHJvcGVydHlFcXVhbChrZXksIHgpOyB9KSxcbiAgICAgICAgdG9TdHJpbmc6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB3cmFwKHRoaXMudmFsdWVzLm1hcCh0b1N0cmluZykuam9pbignIHx8ICcpKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbmZ1bmN0aW9uIG5vdChrZXksIHZhbHVlKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ25vdFByb3BlcnR5JyxcbiAgICAgICAga2V5OiBrZXksXG4gICAgICAgIHZhbHVlOiBwYXJzZUZpbHRlcih2YWx1ZSksXG4gICAgICAgIHRvU3RyaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJyEnICsgd3JhcCh0aGlzLnZhbHVlLnRvU3RyaW5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xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gcHJvcGVydHlNYXRjaGVzQm9vbGVhbihrZXksIHZhbHVlKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ3Byb3BlcnR5TWF0Y2hlc0Jvb2xlYW4nLFxuICAgICAgICBrZXk6IGtleSxcbiAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICB0b1N0cmluZzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHdyYXAobG9va1VwKHRoaXMua2V5KSArICh0aGlzLnZhbHVlID8gJyAhPSAnIDogJyA9PSAnKSAgKyAnbnVsbCcpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gcmFuZ2VNYXRjaChrZXksIHZhbHVlcykge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6ICdyYW5nZU1hdGNoJyxcbiAgICAgICAga2V5OiBrZXksXG4gICAgICAgIHZhbHVlczogdmFsdWVzLFxuICAgICAgICB0b1N0cmluZzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGV4cHJlc3Npb25zID0gW107XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnZhbHVlcy5tYXgpIHtcbiAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKCcnICsgbG9va1VwKGtleSkgKyAnIDwgJyArIHRoaXMudmFsdWVzLm1heCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnZhbHVlcy5taW4pIHtcbiAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKCcnICsgbG9va1VwKGtleSkgKyAnID49ICcgKyB0aGlzLnZhbHVlcy5taW4pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gd3JhcChleHByZXNzaW9ucy5qb2luKCcgJiYgJykpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gcGFyc2V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aChudWxsVmFsdWUoa2V5LCB2YWx1ZSkpO1xuICAgICAgICB9IGVsc2UgaWYgKHdoaXRlTGlzdC5pbmRleE9mKGtleSkgPj0gMCkge1xuICAgICAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICAgIGNhc2UgJ25vdCc6XG4gICAgICAgICAgICAgICAgZmlsdGVyQVNULnB1c2gobm90KGtleSwgdmFsdWUpKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ2FueSc6XG4gICAgICAgICAgICAgICAgZmlsdGVyQVNULnB1c2goYW55KGtleSwgdmFsdWUpKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ2FsbCc6XG4gICAgICAgICAgICAgICAgZmlsdGVyQVNULnB1c2goYWxsKGtleSwgdmFsdWUpKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIGZpbHRlckFTVC5wdXNoKG5vbmUoa2V5LCB2YWx1ZSkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuaGFuZGxlZCBXaGl0ZUxpc3RlZCBwcm9wZXJ0eTogJyArIGtleSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgICAgICAgIGZpbHRlckFTVC5wdXNoKHByb3BlcnR5T3Ioa2V5LCB2YWx1ZSkpO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09ICdvYmplY3QnICYmIHZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5tYXggfHwgdmFsdWUubWluKSB7XG4gICAgICAgICAgICAgICAgZmlsdGVyQVNULnB1c2gocmFuZ2VNYXRjaCh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KTsgLy8gY29kZSBwb2ludFxuXG4gICAgICAgIGlmIChjID4gMHhEN0ZGICYmIGMgPCAweEUwMDApIHtcblxuICAgICAgICAgICAgaWYgKGxlYWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoYyA8IDB4REMwMCkge1xuICAgICAgICAgICAgICAgICAgICBieXRlcy5wdXNoKDB4RUYsIDB4QkYsIDB4QkQpO1xuICAgICAgICAgICAgICAgICAgICBsZWFkID0gYztcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjID0gbGVhZCAtIDB4RDgwMCA8PCAxMCB8IGMgLSAweERDMDAgfCAweDEwMDAwO1xuICAgICAgICAgICAgICAgICAgICBsZWFkID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGMgPiAweERCRkYgfHwgKGkgKyAxID09PSBsZW5ndGgpKSBieXRlcy5wdXNoKDB4RUYsIDB4QkYsIDB4QkQpO1xuICAgICAgICAgICAgICAgIGVsc2UgbGVhZCA9IGM7XG5cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICB9IGVsc2UgaWYgKGxlYWQpIHtcbiAgICAgICAgICAgIGJ5dGVzLnB1c2goMHhFRiwgMHhCRiwgMHhCRCk7XG4gICAgICAgICAgICBsZWFkID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjIDwgMHg4MCkgYnl0ZXMucHVzaChjKTtcbiAgICAgICAgZWxzZSBpZiAoYyA8IDB4ODAwKSBieXRlcy5wdXNoKGMgPj4gMHg2IHwgMHhDMCwgYyAmIDB4M0YgfCAweDgwKTtcbiAgICAgICAgZWxzZSBpZiAoYyA8IDB4MTAwMDApIGJ5dGVzLnB1c2goYyA+PiAweEMgfCAweEUwLCBjID4+IDB4NiAmIDB4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UX0xFRlRfMzIsXG4gICAgUE9XXzJfNjMgPSBNYXRoLnBvdygyLCA2Myk7XG5cblBiZi5wcm90b3R5cGUgPSB7XG5cbiAgICBkZXN0cm95OiBmdW5jdGlvbigpIHtcbiAgICAgICAgdGhpcy5idWYgPSBudWxsO1xuICAgIH0sXG5cbiAgICAvLyA9PT0gUkVBRElORyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG4gICAgcmVhZEZpZWxkczogZnVuY3Rpb24ocmVhZEZpZWxkLCByZXN1bHQsIGVuZCkge1xuICAgICAgICBlbmQgPSBlbmQgfHwgdGhpcy5sZW5ndGg7XG5cbiAgICAgICAgd2hpbGUgKHRoaXMucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICB2YXIgdmFsID0gdGhpcy5yZWFkVmFyaW50KCksXG4gICAgICAgICAgICAgICAgdGFnID0gdmFsID4+IDMsXG4gICAgICAgICAgICAgICAgc3RhcnRQb3MgPSB0aGlzLnBvcztcblxuICAgICAgICAgICAgcmVhZEZpZWxkKHRhZywgcmVzdWx0LCB0aGlzKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMucG9zID09PSBzdGFydFBvcykgdGhpcy5za2lwKHZhbCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9LFxuXG4gICAgcmVhZE1lc3NhZ2U6IGZ1bmN0aW9uKHJlYWRGaWVsZCwgcmVzdWx0KSB7XG4gICAgICAgIHJldHVybiB0aGlzLnJlYWRGaWVsZHMocmVhZEZpZWxkLCByZXN1bHQsIHRoaXMucmVhZFZhcmludCgpICsgdGhpcy5wb3MpO1xuICAgIH0sXG5cbiAgICByZWFkRml4ZWQzMjogZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciB2YWwgPSB0aGlzLmJ1Zi5yZWFkVUludDMyTEUodGhpcy5wb3MpO1xuICAgICAgICB0aGlzLnBvcyArPSA0O1xuIC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gc2tpcDogZnVuY3Rpb24odmFsKSB7XG4gICAgICAgIHZhciB0eXBlID0gdmFsICYgMHg3O1xuICAgICAgICBpZiAodHlwZSA9PT0gUGJmLlZhcmludCkgd2hpbGUgKHRoaXMuYnVmW3RoaXMucG9zKytdID4gMHg3Zikge31cbiAgICAgICAgZWxzZSBpZiAodHlwZSA9PT0gUGJmLkJ5dGVzKSB0aGlzLnBvcyA9IHRoaXMucmVhZFZhcmludCgpICsgdGhpcy5wb3M7XG4gICAgICAgIGVsc2UgaWYgKHR5cGUgPT09IFBiZi5GaXhlZDMyKSB0aGlzLnBvcyArPSA0O1xuICAgICAgICBlbHNlIGlmICh0eXBlID09PSBQYmYuRml4ZWQ2NCkgdGhpcy5wb3MgKz0gODtcbiAgICAgICAgZWxzZSB0aHJvdyBuZXcgRXJyb3IoJ1VuaW1wbGVtZW50ZWQgdHlwZTogJyArIHR5cGUpO1xuICAgIH0sXG5cbiAgICAvLyA9PT0gV1JJVElORyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG4gICAgd3JpdGVUYWc6IGZ1bmN0aW9uKHRhZywgdHlwZSkge1xuICAgICAgICB0aGlzLndyaXRlVmFyaW50KCh0YWcgPDwgMykgfCB0eXBlKTtcbiAgICB9LFxuXG4gICAgcmVhbGxvYzogZnVuY3Rpb24obWluKSB7XG4gICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmxlbmd0aCB8fCAxNjtcblxuICAgICAgICB3aGlsZSAobGVuZ3RoIDwgdGhpcy5wb3MgKyBtaW4pIGxlbmd0aCAqPSAyO1xuXG4gICAgICAgIGlmIChsZW5ndGggIT09IHRoaXMubGVuZ3RoKSB7XG4gICAgICAgICAgICB2YXIgYnVmID0gbmV3IEJ1ZmZlcihsZW5ndGgpO1xuICAgICAgICAgICAgdGhpcy5idWYuY29weShidWYpO1xuICAgICAgICAgICAgdGhpcy5idWYgPSBidWY7XG4gICAgICAg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4ODA7XG4gICAgICAgICAgICB0aGlzLmJ1Zlt0aGlzLnBvcysrXSA9ICgodmFsID4+PiA3KSAmIDB4N2YpIHwgMHg4MDtcbiAgICAgICAgICAgIHRoaXMuYnVmW3RoaXMucG9zKytdID0gKCh2YWwgPj4+IDE0KSAmIDB4N2YpIHwgMHg4MDtcbiAgICAgICAgICAgIHRoaXMuYnVmW3RoaXMucG9zKytdID0gKCh2YWwgPj4+IDIxKSAmIDB4N2YpO1xuXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgcG9zID0gdGhpcy5wb3M7XG4gICAgICAgICAgICB3aGlsZSAodmFsID49IDB4ODApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJlYWxsb2MoMSk7XG4gICAgICAgICAgICAgICAgdGhpcy5idWZbdGhpcy5wb3MrK10gPSAodmFsICYgMHhmZikgfCAweDgwO1xuICAgICAgICAgICAgICAgIHZhbCAvPSAweDgwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5yZWFsbG9jKDEpO1xuICAgICAgICAgICAgdGhpcy5idWZbdGhpcy5wb3MrK10gPSB2YWwgfCAwO1xuICAgICAgICAgICAgaWYgKHRoaXMucG9zIC0gcG9zID4gMTApIHRocm93IG5ldyBFcnJvcignR2l2ZW4gdmFyaW50IGRvZXNuXFwndCBmaXQgaW50byAxMCBieXRlcycpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHdyaXRlU1ZhcmludDogZnVuY3Rpb24odmFsKSB7XG4gICAgICAgIHRoaXMud3JpdGVWYXJpbnQodmFsIDwgMCA/IC12YWwgKiAyIC0gMSA6IHZhbCAqIDIpO1xuICAgIH0sXG5cbiAgICB3cml0ZUJvb2xlYW46IGZ1bmN0aW9uKHZhbCkge1xuICAgICAgICB0aGlzLndyaXRlVmFyaW50KEJvb2xlYW4odmFsKSk7XG4gICAgfSxcblxuICAgIHdyaXRlU3RyaW5nOiBmdW5jdGlvbihzdHIpIHtcbiAgICAgICAg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5tYWcoKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH0sXG5cbiAgICBfcGVycDogZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciB5ID0gdGhpcy55O1xuICAgICAgICB0aGlzLnkgPSB0aGlzLng7XG4gICAgICAgIHRoaXMueCA9IC15O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX3JvdGF0ZTogZnVuY3Rpb24oYW5nbGUpIHtcbiAgICAgICAgdmFyIGNvcyA9IE1hdGguY29zKGFuZ2xlKSxcbiAgICAgICAgICAgIHNpbiA9IE1hdGguc2luKGFuZ2xlKSxcbiAgICAgICAgICAgIHggPSBjb3MgKiB0aGlzLnggLSBzaW4gKiB0aGlzLnksXG4gICAgICAgICAgICB5ID0gc2luICogdGhpcy54ICsgY29zICogdGhpcy55O1xuICAgICAgICB0aGlzLnggPSB4O1xuICAgICAgICB0aGlzLnkgPSB5O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX3JvdW5kOiBmdW5jdGlvbigpIHtcbiAgICAgICAgdGhpcy54ID0gTWF0aC5yb3VuZCh0aGlzLngpO1xuICAgICAgICB0aGlzLnkgPSBNYXRoLnJvdW5kKHRoaXMueSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cbn07XG5cbi8vIGNvbnN0cnVjdHMgUG9pbnQgZnJvbSBhbiBhcnJheSBpZiBuZWNlc3NhcnlcblBvaW50LmNvbnZlcnQgPSBmdW5jdGlvbiAoYSkge1xuICAgIGlmIChhIGluc3RhbmNlb2YgUG9pbnQpIHtcbiAgICAgICAgcmV0dXJuIGE7XG4gICAgfVxuICAgIGlmIChBcnJheS5pc0FycmF5KGEpKSB7XG4gICAgICAgIHJldHVybiBuZXcgUG9pbnQoYVswXSwgYVsxXSk7XG4gICAgfVxuICAgIHJldHVybiBhO1xufTtcbiIsIi8vIHNoaW0gZm9yIHVzaW5nIHByb2Nlc3MgaW4gYnJvd3N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5cbiAgICAgICAgb2JzZXJ2ZXIub2JzZXJ2ZShoaWRkZW5EaXYsIHsgYXR0cmlidXRlczogdHJ1ZSB9KTtcblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gbmV4dFRpY2soZm4pIHtcbiAgICAgICAgICAgIGlmICghcXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaGlkZGVuRGl2LnNldEF0dHJpYnV0ZSgneWVzJywgJ25vJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBxdWV1ZS5wdXNoKGZuKTtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBpZiAoY2FuUG9zdCkge1xuICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgdmFyIHNvdXJjZSA9IGV2LnNvdXJjZTtcbiAgICAgICAgICAgIGlmICgoc291cmNlID09PSB3aW5kb3cgfHwgc291cmNlID09PSBudWxsKSAmJiBldi5kYXRhID09PSAncHJvY2Vzcy10aWNrJykge1xuICAgICAgICAgICAgICAgIGV2LnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgIGlmIChxdWV1ZS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmbiA9IHF1ZXVlLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIGZuKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LCB0cnVlKTtcblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gbmV4dFRpY2soZm4pIHtcbiAgICAgICAgICAgIHF1ZXVlLnB1c2goZm4pO1xuICAgICAgICAgICAgd2luZG93LnBvc3RNZXNzYWdlKCdwcm9jZXNzLXRpY2snLCAnKicpO1xuICAgICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBmdW5jdGlvbiBuZXh0VGljayhmbikge1xuICAgICAgICBzZXRUaW1l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5fKSB7XG4gICAgICAgIHZhciBjb21wb25lbnQgPSBbXSxcbiAgICAgICAgICAgIG5laWdoYm9ycyA9IFtwb2x5Z29uXTtcbiAgICAgICAgcG9seWdvbi5fID0gMTtcbiAgICAgICAgY29tcG9uZW50cy5wdXNoKGNvbXBvbmVudCk7XG4gICAgICAgIHdoaWxlIChwb2x5Z29uID0gbmVpZ2hib3JzLnBvcCgpKSB7XG4gICAgICAgICAgY29tcG9uZW50LnB1c2gocG9seWdvbik7XG4gICAgICAgICAgcG9seWdvbi5mb3JFYWNoKGZ1bmN0aW9uKHJpbmcpIHtcbiAgICAgICAgICAgIHJpbmcuZm9yRWFjaChmdW5jdGlvbihhcmMpIHtcbiAgICAgICAgICAgICAgcG9seWdvbnNCeUFyY1thcmMgPCAwID8gfmFyYyA6IGFyY10uZm9yRWFjaChmdW5jdGlvbihwb2x5Z29uKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFwb2x5Z29uLl8pIHtcbiAgICAgICAgICAgICAgICAgIHBvbHlnb24uXyA9IDE7XG4gICAgICAgICAgICAgICAgICBuZWlnaGJvcnMucHVzaChwb2x5Z29uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KTtcblxuICAgIHBvbHlnb25zLmZvckVhY2goZnVuY3Rpb24ocG9seWdvbikge1xuICAgICAgZGVsZXRlIHBvbHlnb24uXztcbiAgICB9KTtcblxuICAgIHJldHVybiB7XG4gICAgICB0eXBlOiBcIk11bHRpUG9seWdvblwiLFxuICAgICAgYXJjczogY29tcG9uZW50cy5tYXAoZnVuY3Rpb24ocG9seWdvbnMpIHtcbiAgICAgICAgdmFyIGFyY3MgPSBbXTtcblxuICAgICAgICAvLyBFeHRyYWN0IHRoZSBleHRlcmlvciAodW5pcXVlKSBhcmNzLlxuICAgICAgICBwb2x5Z29ucy5mb3JFYWNoKGZ1bmN0aW9uKHBvbHlnb24pIHtcbiAgICAgICAgICBwb2x5Z29uLmZvckVhY2goZnVuY3Rpb24ocmluZykge1xuICAgICAgICAgICAgcmluZy5mb3JFYWNoKGZ1bmN0aW9uKGFyYykge1xuICAgICAgICAgICAgICBpZiAocG9seWdvbnNCeUFyY1thcmMgPCAwID8gfmFyYyA6IGFyY10ubGVuZ3RoIDwgMikge1xuICAgICAgICAgICAgICAgIGFyY3MucHVzaChhcmMpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gU3RpdGNoIHRoZSBhcmNzIGludG8gb25lIG9yIG1vcmUgcmluZ3MuXG4gICAgICAgIGFyY3MgPSBzdGl0Y2hBcmNzKHRvcG9sb2d5LCBhcmNzKTtcblxuICAgICAgICAvLyBJZiBtb3JlIHRoYW4gb25lIHJpbmcgaXMgcmV0dXJuZWQsXG4gICAgICAgIC8vIGF0IG1vc3Qgb25lIG9mIHRoZXNlIHJpbmdzIGNhbiBiZSB0aGUgZXh0ZXJpb3I7XG4gICAgICAgIC8vIHRoaXMgZXh0ZXJpb3IgcmluZyBoYXMgdGhlIHNhbWUgd2luZGluZyBvcmRlclxuICAgICAgICAvLyBhcyBhbnkgZXh0ZXJpb3IgcmluZyBpbiB0aGUgb3JpZ2luYWwgcG9seWdvbnMuXG4gICAgICAgIGlmICgobiA9IGFyY3MubGVuZ3RoKSA+IDEpIHtcbiAgICAgICAgICB2YXIgc2duID0gZXh0ZXJpb3IocG9seWdvbnNbMF1bMF0pO1xuICAgICAgICAgIGZvciAodmFyIGkgPSAwLCB0OyBpIDwgbjsgKytpKSB7XG4gICAgICAgICAgICBpZiAoc2duID09PSBleHRlcmlvcihhcmNzW2ldKSkge1xuICAgICAgICAgICAgICB0ID0gYXJjc1swXSwgYXJjc1swXSA9IGFyY3NbaV0sIGFyY3NbaV0gPSB0O1xuICAgICAgICAgICAgICBicmVh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AgICAgICAgeCA9IDAsXG4gICAgICAgIHkgPSAwLFxuICAgICAgICBsaW5lcyA9IFtdLFxuICAgICAgICBsaW5lO1xuXG4gICAgd2hpbGUgKHBiZi5wb3MgPCBlbmQpIHtcbiAgICAgICAgaWYgKCFsZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBjbWRMZW4gPSBwYmYucmVhZFZhcmludCgpO1xuICAgICAgICAgICAgY21kID0gY21kTGVuICYgMHg3O1xuICAgICAgICAgICAgbGVuZ3RoID0gY21kTGVuID4+IDM7XG4gICAgICAgIH1cblxuICAgICAgICBsZW5ndGgtLTtcblxuICAgICAgICBpZiAoY21kID09PSAxIHx8IGNtZCA9PT0gMikge1xuICAgICAgICAgICAgeCArPSBwYmYucmVhZFNWYXJpbnQoKTtcbiAgICAgICAgICAgIHkgKz0gcGJmLnJlYWRTVmFyaW50KCk7XG5cbiAgICAgICAgICAgIGlmIChjbWQgPT09IDEpIHsgLy8gbW92ZVRvXG4gICAgICAgICAgICAgICAgaWYgKGxpbmUpIGxpbmVzLnB1c2gobGluZSk7XG4gICAgICAgICAgICAgICAgbGluZSA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsaW5lLnB1c2gobmV3IFBvaW50KHgsIHkpKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNtZCA9PT0gNykge1xuICAgICAgICAgICAgbGluZS5wdXNoKGxpbmVbMF0uY2xvbmUoKSk7IC8vIGNsb3NlUG9seWdvblxuXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3Vua25vd24gY29tbWFuZCAnICsgY21kKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChsaW5lKSBsaW5lcy5wdXNoKGxpbmUpO1xuXG4gICAgcmV0dXJuIGxpbmVzO1xufTtcblxuVmVjdG9yVGlsZUZlYXR1cmUucHJvdG90eXBlLmJib3ggPSBmdW5jdGlvbigpIHtcbiAgICB2YXIgcGJmID0gdGhpcy5fcGJmO1xuICAgIHBiZi5wb3MgPSB0aGlzLl9nZW9tZXRyeTtcblxuICAgIHZhciBlbmQgPSBwYmYucmVhZFZhcmludCgpICsgcGJmLnBvcyxcbiAgICAgICAgY21kID0gMSxcbiAgICAgICAgbGVuZ3RoID0gMCxcbiAgICAgICAgeCA9IDAsXG4gICAgICAgIHkgPSAwLFxuICAgICAgICB4MSA9IEluZmluaXR5LFxuICAgICAgICB4MiA9IC1JbmZpbml0eSxcbiAgICAgICAgeTEgPSBJbmZpbml0eSxcbiAgICAgICAgeTIgPSAtSW5maW5pdHk7XG5cbiAgICB3aGlsZSAocGJmLnBvcyA8IGVuZCkge1xuICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGNtZExlbiA9IHBiZi5yZWFkVmFyaW50KCk7XG4gICAgICAgICAgICBjbWQgPSBjbWRMZW4gJiAweDc7XG4gICAgICAgICAgICBsZW5ndGggPSBjbWRMZW4gPj4gMztcbiAgICAgICAgfVxuXG4gICAgICAgIGxlbmd0aC0tO1xuXG4gICAgICAgIGlmIChjbWQgPT09IDEgfHwgY21kID09PSAyKSB7XG4gICAgICAgICAgICB4ICs9IHBiZi5yZWFkU1ZhcmludCgpO1xuICAgICAgICAgICAgeSArPSBwYmYucmVhZFNWYXJpbnQoKTtcbiAgICAgICAgICAgIGlmICh4IDwgeDEpIHgxID0geDtcbiAgICAgICAgICAgIGlmICh4ID4geDIpIHgyID0geDtcbiAgICAgICAgICAgIGlmICh5IDwgeTEpIHkxID0geTtcbiAgICAgICAgICAgIGlmICh5ID4geTIpIHkyID0geTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNtZCAhPT0gNykge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmtub3duIGNvbW1hbmQgJyArIGNtZCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gW3gxLCB5MSwgeDIsIHkyXTtcbn07XG5cblZlY3RvclRpbG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gbWluX3kpIHtcbiAgICAgICAgICAgIG1pbl95ID0gY29vcmRbMV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvb3JkWzBdID4gbWF4X3gpIHtcbiAgICAgICAgICAgIG1heF94ID0gY29vcmRbMF07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvb3JkWzFdID4gbWF4X3kpIHtcbiAgICAgICAgICAgIG1heF95ID0gY29vcmRbMV07XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gW21pbl94LCBtaW5feSwgbWF4X3gsIG1heF95XTtcbn07XG5cbi8vIENvbnZlcnQgZ2VvbWV0cnkgdHlwZSB0byBvbmUgb2Y6ICdwb2ludCcsICdsaW5lJywgJ3BvbHlnb24nXG5HZW8uZ2VvbWV0cnlUeXBlID0gZnVuY3Rpb24odHlwZSkge1xuICAgIGlmICh0eXBlID09PSAnUG9seWdvbicgfHwgdHlwZSA9PT0gJ011bHRpUG9seWdvbicpIHtcbiAgICAgICAgcmV0dXJuICdwb2x5Z29uJztcbiAgICB9XG4gICAgZWxzZSBpZiAodHlwZSA9PT0gJ0xpbmVTdHJpbmcnIHx8IHR5cGUgPT09ICdNdWx0aUxpbmVTdHJpbmcnKSB7XG4gICAgICAgIHJldHVybiAnbGluZSc7XG4gICAgfVxuICAgIGlmICh0eXBlID09PSAnUG9pbnQnIHx8IHR5cGUgPT09ICdNdWx0aVBvaW50Jykge1xuICAgICAgICByZXR1cm4gJ3BvaW50JztcbiAgICB9XG59O1xuXG5HZW8uY2VudHJvaWQgPSBmdW5jdGlvbiAocG9seWdvbikge1xuICAgIGxldCBuID0gcG9seWdvbi5sZW5ndGg7XG4gICAgbGV0IGNlbnRyb2lkID0gWzAsIDBdO1xuXG4gICAgZm9yIChsZXQgcD0wOyBwIDwgcG9seWdvbi5sZW5ndGg7IHArKykge1xuICAgICAgICBjZW50cm9pZFswXSArPSBwb2x5Z29uW3BdWzBdO1xuICAgICAgICBjZW50cm9pZFsxXSArPSBwb2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VvbTtcbiAgICB9XG5cbiAgICBmb3IgKGxldCBwPTA7IHAgPCBwb2x5cy5sZW5ndGg7IHArKykge1xuICAgICAgICBsZXQgcG9seSA9IHBvbHlzW3BdO1xuXG4gICAgICAgIC8vIElmIGZpcnN0IHJpbmcgd2luZGluZyBkb2Vzbid0IG1hdGNoLCByZXZlcnNlIGFsbCByaW5nc1xuICAgICAgICAvLyBOT1RFOiBhc3N1bWVzIHJpbmcgd2luZGluZyBvcmRlcnMgYWxyZWFkeSBhbHRlcm5hdGUgYXMgZXhwZWN0ZWRcbiAgICAgICAgaWYgKEdlby5yaW5nV2luZGluZyhwb2x5WzBdKSAhPT0gd2luZGluZykge1xuICAgICAgICAgICAgZm9yIChsZXQgcmluZyBvZiBwb2x5KSB7XG4gICAgICAgICAgICAgICAgcmluZy5yZXZlcnNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGdlb207XG59O1xuIiwiLy8gV2ViR0wgY29uc3RhbnRzIC0gbmVlZCB0byBpbXBvcnQgdGhlc2Ugc2VwYXJhdGVseSB0byBtYWtlIHRoZW0gYXZhaWxhYmxlIGluIHRoZSB3ZWIgd29ya2VyXG5cbnZhciBnbDtcbmV4cG9ydCBkZWZhdWx0IGdsID0ge307XG5cbi8qIERhdGFUeXBlICovXG5nbC5CWVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgPSAweDE0MDA7XG5nbC5VTlNJR05FRF9CWVRFICAgICAgICAgICAgICAgICAgPSAweDE0MDE7XG5nbC5TSE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgPSAweDE0MDI7XG5nbC5VTlNJR05FRF9TSE9SVCAgICAgICAgICAgICAgICAgPSAweDE0MDM7XG5nbC5JTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgPSAweDE0MDQ7XG5nbC5VTlNJR05FRF9JTlQgICAgICAgICAgICAgICAgICAgPSAweDE0MDU7XG5nbC5GTE9BVCAgICAgICAgICAgICAgIC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gICAgIGlmIChwcmVmaXgpIHtcbiAgICAgICAgICAgIG5hbWUgPSBwcmVmaXggKyAnLicgKyBuYW1lO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2luZ2xlIGZsb2F0XG4gICAgICAgIGlmICh0eXBlb2YgdW5pZm9ybSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIHBhcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnZmxvYXQnLFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJzFmJyxcbiAgICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB1bmlmb3JtLFxuICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICB1bmlmb3Jtc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gQXJyYXk6IHZlY3RvciwgYXJyYXkgb2YgZmxvYXRzLCBhcnJheSBvZiB0ZXh0dXJlcywgb3IgYXJyYXkgb2Ygc3RydWN0c1xuICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHVuaWZvcm0pKSB7XG4gICAgICAgICAgICAvLyBOdW1lcmljIHZhbHVlc1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB1bmlmb3JtWzBdID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIC8vIGZsb2F0IHZlY3RvcnMgKHZlYzIsIHZlYzMsIHZlYzQpXG4gICAgICAgICAgICAgICAgaWYgKHVuaWZvcm0ubGVuZ3RoID49IDIgJiYgdW5pZm9ybS5sZW5ndGggPD0gNCkge1xuICAgICAgICAgICAgICAgICAgICBwYXJzZWQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAndmVjJyArIHVuaWZvcm0ubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiB1bmlmb3JtLmxlbmd0aCArICdmdicsXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHVuaWZvcm0sXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgICAgICB1bmlmb3Jtc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZmxvYXQgYXJyYXlcbiAgICAgICAgICAgICAgICBlbHNlIGlmICh1bmlmb3JtLmxlbmd0aCA+IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2Zsb2F0W10nLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnMWZ2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUgKyAnWzBdJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB1bmlmb3JtLFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgICAgICAgICAgdW5pZm9ybXNcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IGFzc3VtZSBtYXRyaXggZm9yICh0eXBlb2YgPT0gRmxvYXQzMkFycmF5ICYmIGxlbmd0aCA9PSAxNik/XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBBcnJheSBvZiB0ZXh0dXJlc1xuICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHVuaWZvcm1bMF0gPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgZm9yICh1PTA7IHUgPCB1bmlmb3JtLmxlbmd0aDsgdSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdzYW1wbGVyMkQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnMWknLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSArICdbJyArIHUgKyAnXScsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdW5pZm9ybVt1XSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogdSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuaWZvcm1zOiB1bmlmb3JtXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEFycmF5IG9mIGFycmF5cyAtIGJ1dCBvbmx5IGFycmF5cyBvZiB2ZWN0b3JzIGFyZSBhbGxvd2VkIGluIHRoaXMgY2FzZVxuICAgICAgICAgICAgZWxzZSBpZiAoQXJyYXkuaXNBcnJheSh1bmlmb3JtWzBdKSAmJiB0eXBlb2YgdW5pZm9ybVswXVswXSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAvLyBmbG9hdCB2ZWN0b3JzICh2ZWMyLCB2ZWMzLCB2ZWM0KVxuICAgICAgICAgICAgICAgIGlmICh1bmlmb3JtWzBdLmxlbmd0aCA+PSAyICYmIHVuaWZvcm1bMF0ubGVuZ3RoIDw9IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gU2V0IGVhY2ggdmVjdG9yIGluIHRoZSBhcnJheVxuICAgICAgICAgICAgICAgICAgICBmb3IgKHU9MDsgdSA8IHVuaWZvcm0ubGVuZ3RoOyB1KyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAndmVjJyArIHVuaWZvcm1bMF0ubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogdW5pZm9ybVt1XS5sZW5ndGggKyAnZnYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUgKyAnWycgKyB1ICsgJ10nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB1bmlmb3JtW3VdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogdSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlmb3JtczogdW5pZm9ybVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZWxzZSBlcnJvcj9cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEFycmF5IG9mIHN0cnVjdHVyZXNcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiB1bmlmb3JtWzBdID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgIGZvciAodT0wOyB1IDwgdW5pZm9ybS5sZW5ndGg7IHUrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBTZXQgZWFjaCBzdHJ1Y3QgaW4gdGhlIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZC5wdXNoKC4uLkdMU0wucGFyc2VVbmlmb3Jtcyh1bmlmb3JtW3VdLCBuYW1lICsgJ1snICsgdSArICddJykpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBCb29sZWFuXG4gICAgICAgIGVsc2UgaWYgKHR5cGVvZiB1bmlmb3JtID09PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICAgIHBhcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnYm9vbCcsXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnMWknLFxuICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHVuaWZvcm0sXG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgIHVuaWZvcm1zXG4gICAgICAgICAgICB9KT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GVkX2ZyYWdtZW50X3NvdXJjZSA9XG4gICAgICAgICAgICBTaGFkZXJQcm9ncmFtLmJ1aWxkRXh0ZW5zaW9uU3RyaW5nKGV4dGVuc2lvbnMpICtcbiAgICAgICAgICAgIGhlYWRlciArXG4gICAgICAgICAgICBwcmVjaXNpb24gK1xuICAgICAgICAgICAgU2hhZGVyUHJvZ3JhbS5idWlsZERlZmluZVN0cmluZyhkZWZpbmVzKSArXG4gICAgICAgICAgICB0aGlzLmNvbXB1dGVkX2ZyYWdtZW50X3NvdXJjZTtcblxuICAgICAgICAvLyBDb21waWxlICYgc2V0IHVuaWZvcm1zIHRvIGNhY2hlZCB2YWx1ZXNcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRoaXMucHJvZ3JhbSA9IFNoYWRlclByb2dyYW0udXBkYXRlUHJvZ3JhbSh0aGlzLmdsLCB0aGlzLnByb2dyYW0sIHRoaXMuY29tcHV0ZWRfdmVydGV4X3NvdXJjZSwgdGhpcy5jb21wdXRlZF9mcmFnbWVudF9zb3VyY2UpO1xuICAgICAgICAgICAgdGhpcy5jb21waWxlZCA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLmNvbXBpbGluZyA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLnByb2dyYW0gPSBudWxsO1xuICAgICAgICAgICAgdGhpcy5jb21waWxlZCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5jb21waWxpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZXJyb3IgPSBlcnJvcjtcblxuICAgICAgICAgICAgLy8gc2hhZGVyIGVycm9yIGluZm9cbiAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSAndmVydGV4JyB8fCBlcnJvci50eXBlID09PSAnZnJhZ21lbnQnKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zaGFkZXJfZXJyb3JzID0gZXJyb3IuZXJyb3JzO1xu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kU2hhZGVyQmxvY2tMaXN0KCkge1xuICAgICAgICBsZXQga2V5LCBibG9ja3MgPSB7fTtcblxuICAgICAgICAvLyBHbG9iYWwgYmxvY2tzXG4gICAgICAgIGZvciAoa2V5IGluIFNoYWRlclByb2dyYW0uYmxvY2tzKSB7XG4gICAgICAgICAgICBibG9ja3Nba2V5XSA9IFtdO1xuXG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShTaGFkZXJQcm9ncmFtLmJsb2Nrc1trZXldKSkge1xuICAgICAgICAgICAgICAgIGJsb2Nrc1trZXldLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIC4uLlNoYWRlclByb2dyYW0uYmxvY2tzW2tleV0ubWFwKChzb3VyY2UsIG51bSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsga2V5LCBzb3VyY2UsIG51bSwgc2NvcGU6ICdTaGFkZXJQcm9ncmFtJyB9O1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBibG9ja3Nba2V5XSA9IFt7IGtleSwgc291cmNlOiBTaGFkZXJQcm9ncmFtLmJsb2Nrc1trZXldLCBudW06IDAsIHNjb3BlOiAnU2hhZGVyUHJvZ3JhbScgfV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBQcm9ncmFtLXNwZWNpZmljIGJsb2Nrc1xuICAgICAgICBmb3IgKGtleSBpbiB0aGlzLmJsb2Nrcykge1xuICAgICAgICAgICAgYmxvY2tzW2tleV0gPSBibG9ja3Nba2V5XSB8fCBbXTtcblxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5ibG9ja3Nba2V5XSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgc2NvcGVzID0gKHRoaXMuYmxvY2tfc2NvcGVzICYmIHRoaXMuYmxvY2tfc2NvcGVzW2tleV0pIHx8IFtdO1xuICAgICAgICAgICAgICAgIGxldCBjdXJfc2NvcGUgPSBudWxsLCBudW0gPSAwO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgYj0wOyBiIDwgdGhpcy5ibG9ja3Nba2V5XS5sZW5ndGg7IGIrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBDb3VudCBibG9ja3MgcmVsYXRpdmUgdG8gY3VycmVudCBzY29wZVxuICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGVzW2JdICE9PSBjdXJfc2NvcGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cl9zY29wZSA9IHNjb3Blc1tiXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBibG9ja3Nba2V5XS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogdGhpcy5ibG9ja3Nba2V5XVtiXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlOiBjdXJfc2NvcGUgfHwgdGhpcy5uYW1lXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIG51bSsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IGFkZHJlc3MgZGlzY3JlcGFuY3kgaW4gYXJyYXkgdnMuIHNpbmdsZS12YWx1ZSBibG9ja3NcbiAgICAgICAgICAgICAgICAvLyBzdHlsZXMgYXNzdW1lIGFycmF5IHdoZW4gdHJhY2tpbmcgYmxvY2sgc2NvcGVzXG4gICAgICAgICAgICAgICAgYmxvY2tzW2tleV0ucHVzaCh7IGtleSwgc291cmNlOiB0aGlzLmJsb2Nrc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ZX0gbm90IGRlZmluZWQgaW4gdmVydGV4IHNoYWRlciwgaW5qZWN0aW5nOiAnJHtpbmplY3R9J2ApO1xuICAgICAgICAgICAgICAgIHZzX2luamVjdGlvbnMucHVzaChpbmplY3QpO1xuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBDaGVjayBmcmFnbWVudCBzaGFkZXJcbiAgICAgICAgICAgIGlmICghR0xTTC5pc1VuaWZvcm1EZWZpbmVkKG5hbWUsIGZzKSAmJiBHTFNMLmlzU3ltYm9sUmVmZXJlbmNlZChuYW1lLCBmcykpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWluamVjdCkge1xuICAgICAgICAgICAgICAgICAgICBpbmplY3QgPSBHTFNMLmRlZmluZVVuaWZvcm0obmFtZSwgdW5pZm9ybXNbbmFtZV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2cudHJhY2UoYFByb2dyYW0gJHt0aGlzLm5hbWV9OiAke25hbWV9IG5vdCBkZWZpbmVkIGluIGZyYWdtZW50IHNoYWRlciwgaW5qZWN0aW5nOiAnJHtpbmplY3R9J2ApO1xuICAgICAgICAgICAgICAgIGZzX2luamVjdGlvbnMucHVzaChpbmplY3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gSW5qZWN0IG1pc3NpbmcgdW5pZm9ybXNcbiAgICAgICAgLy8gTk9URTogdGhlc2UgYXJlIGluamVjdGVkIGF0IHRoZSB2ZXJ5IHRvcCBvZiB0aGUgc2hhZGVycywgZXZlbiBiZWZvcmUgYW55ICNkZWZpbmVzIG9yICNwcmFnbWFzIGFyZSBhZGRlZFxuICAgICAgICAvLyB0aGlzIGNvdWxkIGNhdXNlIHNvbWUgaXNzdWVzIHdpdGggY2VydGFpbiAjcHJhZ21hcywgb3Igb3RoZXIgZnVuY3Rpb25zIHRoYXQgbWlnaHQgZXhwZWN0ICNkZWZpbmVzXG4gICAgICAgIGlmICh2c19pbmplY3Rpb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ZXIgYmxvY2tzIGFzIHRoZXkgYXJlIGluc2VydGVkLCBidXQgYXMgdGhpcyBjb2RlIGlzIG9ubHkgdXNlZCBmb3JcbiAgICAvLyBlcnJvciBoYW5kbGluZyBvbiBjb21waWxhdGlvbiBmYWlsdXJlLCBpdCB3YXMgc2ltcGxlciB0byBrZWVwIGl0IHNlcGFyYXRlIHRoYW4gdG8gYnVyZGVuIHRoZSBjb3JlXG4gICAgLy8gY29tcGlsYXRpb24gcGF0aC5cbiAgICBibG9jayh0eXBlLCBudW0pIHtcbiAgICAgICAgbGV0IGxpbmVzID0gdGhpcy5saW5lcyh0eXBlKTtcbiAgICAgICAgbGV0IGJsb2NrO1xuICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBudW0gJiYgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBsZXQgbGluZSA9IGxpbmVzW2ldO1xuICAgICAgICAgICAgbGV0IG1hdGNoID0gbGluZS5tYXRjaCgvXFwvXFwvIHRhbmdyYW0tYmxvY2stc3RhcnQ6IChbQS1aYS16MC05Xy1dKyksIChbQS1aYS16MC05Xy1dKyksIChcXGQrKS8pO1xuICAgICAgICAgICAgaWYgKG1hdGNoICYmIG1hdGNoLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBtYXJrIGN1cnJlbnQgYmxvY2tcbiAgICAgICAgICAgICAgICBibG9jayA9IHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGU6IG1hdGNoWzFdLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBtYXRjaFsyXSxcbiAgICAgICAgICAgICAgICAgICAgbnVtOiBtYXRjaFszXVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBtYXRjaCA9IGxpbmUubWF0Y2goL1xcL1xcLyB0YW5ncmFtLWJsb2NrLWVuZDogKFtBLVphLXowLTlfLV0rKSwgKFtBLVphLXowLTlfLV0rKSwgKFxcZCspLyk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoICYmIG1hdGNoLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYmxvY2sgPSBudWxsOyAvLyBjbGVhciBjdXJyZW50IGJsb2NrXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyB1cGRhdGUgbGluZSAjIGFuZCBjb250ZW50XG4gICAgICAgICAgICBpZiAoYmxvY2spIHtcbiAgICAgICAgICAgICAgICAvLyBpbml0IHRvIC0xIHNvIHRoYXQgbGluZSAwIGlzIGZpcnN0IGFjdHVhbCBsaW5lIG9mIGJsb2NrIGNvZGUsIGFmdGVyIGNvbW1lbnQgbWFya2VyXG4gICAgICAgICAgICAgICAgYmxvY2subGluZSA9IChibG9jay5saW5lID09IG51bGwpID8gLTEgOiBibG9jay5saW5lICsgMTtcbiAgICAgICAgICAgICAgICBibG9jay5zb3VyY2UgPSBsaW5lO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBibG9jaztcbiAgICB9XG5cbiAgICAvLyBSZXR1cm5zIGxpc3Qgb2YgYXZhaWxhYmxlIGV4dGVuc2lvbnMgZnJvbSB0aG9zZSByZXF1ZXN0ZWRcbiAgICAvLyBTZXRzIGludGVybmFsICNkZWZpbmVzIGluZGljYXRpbmcgYXZhaWxhYmlsaXR5IG9mIGVhY2ggcmVxdWVzdGVkIGV4dGVuc2lvblxuICAgIGNoZWNrRXh0ZW5zaW9ucygpIHtcbiAgICAgICAgbGV0IGV4dHMgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgbmFtZSBvZiB0aGlzLmV4dGVuc2lvbnMpIHtcbiAgICAgICAgICAgIGxldCBleHQgPSBnZXRFeHRlbnNpb24odGhpcy5nbCwgbmFtZSk7XG4gICAgICAgICAgICBsZXQgZGVmID0gYFRBTkdSQU1fRVhURU5TSU9OXyR7bmFtZX1g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ZWxzZVxcblwiICtcblwiICAgICAgICAgICAgICAgIC8vIElmIG5vIG91dGVyIGlzIHByb3ZpZGUgYmVoYXZlcyBsaWtlOlxcblwiICtcblwiICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vaW1kb2luZ2l0d3Jvbmcud29yZHByZXNzLmNvbS8yMDExLzAxLzMxL2xpZ2h0LWF0dGVudWF0aW9uL1xcblwiICtcblwiICAgICAgICAgICAgICAgIGZsb2F0IGQgPSBtYXgoMC4wLGRpc3QtUmluKS9SaW4rMS4wO1xcblwiICtcblwiICAgICAgICAgICAgICAgIGF0dGVudWF0aW9uID0gY2xhbXAoMS4wL2QsIDAuMCwgMS4wKTtcXG5cIiArXG5cIiAgICAgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICAgICAjZWxzZVxcblwiICtcblwiICAgICAgICAgICAgI2lmZGVmIFRBTkdSQU1fUE9JTlRMSUdIVF9BVFRFTlVBVElPTl9PVVRFUl9SQURJVVNcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBmbG9hdCBkID0gY2xhbXAoZGlzdC9fbGlnaHQub3V0ZXJSYWRpdXMsIDAuMCwgMS4wKTtcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBhdHRlbnVhdGlvbiA9IDEuMC1kKmQ7XFxuXCIgK1xuXCIgICAgICAgICAgICAjZWxzZVxcblwiICtcblwiICAgICAgICAgICAgICAgIGF0dGVudWF0aW9uID0gMS4wO1xcblwiICtcblwiICAgICAgICAgICAgI2VuZGlmXFxuXCIgK1xuXCIgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICNlbmRpZlxcblwiICtcblwiXFxuXCIgK1xuXCIgICAgLy8gQ29tcHV0ZXIgYWNjdW11bGF0b3JzXFxuXCIgK1xuXCIgICAgbGlnaHRfYWNjdW11bGF0b3JfYW1iaWVudCArPSBfbGlnaHQuYW1iaWVudCAqIGF0dGVudWF0aW9uO1xcblwiICtcblwiXFxuXCIgK1xuXCIgICAgI2lmZGVmIFRBTkd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KTtcXG5cIiArXG5cIiAgICAgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICAgICAjZWxzZVxcblwiICtcblwiICAgICAgICAgICAgI2lmZGVmIFRBTkdSQU1fUE9JTlRMSUdIVF9BVFRFTlVBVElPTl9PVVRFUl9SQURJVVNcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBmbG9hdCBkID0gY2xhbXAoZGlzdC9fbGlnaHQub3V0ZXJSYWRpdXMsIDAuMCwgMS4wKTtcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBhdHRlbnVhdGlvbiA9IDEuMC1kKmQ7XFxuXCIgK1xuXCIgICAgICAgICAgICAjZWxzZVxcblwiICtcblwiICAgICAgICAgICAgICAgIGF0dGVudWF0aW9uID0gMS4wO1xcblwiICtcblwiICAgICAgICAgICAgI2VuZGlmXFxuXCIgK1xuXCIgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICNlbmRpZlxcblwiICtcblwiXFxuXCIgK1xuXCIgICAgLy8gc3BvdGxpZ2h0IGF0dGVudWF0aW9uIGZhY3RvclxcblwiICtcblwiICAgIGZsb2F0IHNwb3RBdHRlbnVhdGlvbiA9IDAuMDtcXG5cIiArXG5cIlxcblwiICtcblwiICAgIC8vIFNlZSBpZiBwb2ludCBvbiBzdXJmYWNlIGlzIGluc2lkZSBjb25lIG9mIGlsbHVtaW5hdGlvblxcblwiICtcblwiICAgIGZsb2F0IHNwb3REb3QgPSBjbGFtcChkb3QoLVZQLCBub3JtYWxpemUoX2xpZ2h0LmRpcmVjdGlvbikpLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCJcXG5cIiArXG5cIiAgICBpZiAoc3BvdERvdCA+PSBfbGlnaHQuc3BvdENvc0N1dG9mZikge1xcblwiICtcblwiICAgICAgICBzcG90QXR0ZW51YXRpb24gPSBwb3coc3BvdERvdCwgX2xpZ2h0LnNwb3RFeHBvbmVudCk7XFxuXCIgK1xuXCIgICAgfVxcblwiICtcblwiXFxuXCIgK1xuXCIgICAgbGlnaHRfYWNjdW11bGF0b3JfYW1iaWVudCArPSBfbGlnaHQuYW1iaWVudCAqIGF0dGVudWF0aW9uICogc3BvdEF0dGVudWF0aW9uO1xcblwiICtcblwiXFxuXCIgK1xuXCIgICAgI2lmZGVmIFRBTkdSQU1fTUFURVJJQUxfRElGRlVTRVxcblwiICtcblwiICAgICAgICBsaWdodF9hY2N1bXVsYXRvcl9kaWZmdXNlICs9IF9saWdodC5kaWZmdXNlICogbkRvdFZQICogYXR0ZW51YXRpb24gKiBzcG90QXR0ZW51YXRpb247XFxuXCIgK1xuXCIgICAgI2VuZGlmXFxuXCIgK1xuXCJcXG5cIiArXG5cIiAgICAjaWZkZWYgVEFOR1JBTV9NQVRFUklBTF9TUEVDVUxBUlxcblwiICtcblwiICAgICAgICAvLyBQb3dlciBmYWN0b3IgZm9yIHNoaW55IHNwZWN1bGFyc1xcblwiICtcblwiICAgICAgICBmbG9hdCBwZiA9IDAuMDtcXG5cIiArXG5cIiAgICAgICAgaWYgKG5Eb3RWUCA+IDAuMCkge1xcblwiICtcblwiICAgICAgICAgICAgdmVjMyByZWZsZWN0VmVjdG9yID0gcmVmbGVjdCgtVlAsIF9ub3JtYWwpO1xcblwiICtcblwiICAgICAgICAgICAgZmxvYXQgZXllRG90UiA9IG1heChkb3QoLW5vcm1hbGl6ZShfZXllVG9Qb2ludCksIHJlZmxlY3RWZWN0b3IpLCAwLjApO1xcblwiICtcblwiICAgICAgICAgICAgcGYgPSBwb3coZXllRG90UiwgbWF0ZXJpYWwuc2hpbmluZXNzKTtcXG5cIiArXG5cIiAgICAgICAgfVxcblwiICtcblwiICAgICAgICBsaWdodF9hY2N1bXVsYXRvcl9zcGVjdWxhciArPSBfbGlnaHQuc3BlY3VsYXIgKiBwZiAqIGF0dGVudWF0aW9uICogc3BvdEF0dGVudWF0aW9uO1xcblwiICtcblwiICAgICNlbmRpZlxcblwiICtcblwifVxcblwiICtcblwiXCI7XG5cbnNoYWRlclNvdXJjZXNbJ2dsL3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pO1xuICAgICAgICAgICAgaW1hZ2Uub25sb2FkID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0RWxlbWVudChpbWFnZSwgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy53YXJuKGBUZXh0dXJlICcke3RoaXMubmFtZX0nOiBmYWlsZWQgdG8gbG9hZCB1cmw6ICcke3RoaXMuc291cmNlfSdgLCBlLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgVGV4dHVyZS50cmlnZ2VyKCd3YXJuaW5nJywgeyBtZXNzYWdlOiBgRmFpbGVkIHRvIGxvYWQgdGV4dHVyZSBmcm9tICR7dGhpcy5zb3VyY2V9YCwgZXJyb3I6IGUsIHRleHR1cmU6IG9wdGlvbnMgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh0aGlzKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpbWFnZS5vbmVycm9yID0gZSA9PiB7XG4gICAgICAgICAgICAgICAgLy8gV2FybiBhbmQgcmVzb2x2ZSBvbiBlcnJvclxuICAgICAgICAgICAgICAgIGxvZy53YXJuKGBUZXh0dXJlICcke3RoaXMubmFtZX0nOiBmYWlsZWQgdG8gbG9hZCB1cmw6ICcke3RoaXMuc291cmNlfSdgLCBlLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICBUZXh0dXJlLnRyaWdnZXIoJ3dhcm5pbmcnLCB7IG1lc3NhZ2U6IGBGYWlsZWQgdG8gbG9hZCB0ZXh0dXJlIGZyb20gJHt0aGlzLnNvdXJjZX1gLCBlcnJvcjogZSwgdGV4dHVyZTogb3B0aW9ucyB9KTtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHRoaXMpO1xuICAgICAgICAgICAgfTtcbiAgICAgIC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gICAgICAgZm9yICh2YXIgYXR0cmliIG9mIHRoaXMuYXR0cmlicykge1xuICAgICAgICAgICAgYXR0cmliLm9mZnNldCA9IHRoaXMuc3RyaWRlO1xuICAgICAgICAgICAgYXR0cmliLmJ5dGVfc2l6ZSA9IGF0dHJpYi5zaXplO1xuICAgICAgICAgICAgdmFyIHNoaWZ0ID0gMDtcblxuICAgICAgICAgICAgc3dpdGNoIChhdHRyaWIudHlwZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgZ2wuRkxPQVQ6XG4gICAgICAgICAgICAgICAgY2FzZSBnbC5JTlQ6XG4gICAgICAgICAgICAgICAgY2FzZSBnbC5VTlNJR05FRF9JTlQ6XG4gICAgICAgICAgICAgICAgICAgIGF0dHJpYi5ieXRlX3NpemUgKj0gNDtcbiAgICAgICAgICAgICAgICAgICAgc2hpZnQgPSAyO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIGdsLlNIT1JUOlxuICAgICAgICAgICAgICAgIGNhc2UgZ2wuVU5TSUdORURfU0hPUlQ6XG4gICAgICAgICAgICAgICAgICAgIGF0dHJpYi5ieXRlX3NpemUgKj0gMjtcbiAgICAgICAgICAgICAgICAgICAgc2hpZnQgPSAxO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRm9yY2UgNC1ieXRlIGFsaWdubWVudCBvbiBhdHRyaWJ1dGVzXG4gICAgICAgICAgICB0aGlzLnN0cmlkZSArPSBhdHRyaWIuYnl0ZV9zaXplO1xuICAgICAgICAgICAgaWYgKHRoaXMuc3RyaWRlICYgMykgeyAvLyBwYWQgdG8gbXVsdGlwbGUgb2YgNCBieXRlc1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyaWRlICs9IDQgLSAodGhpcy5zdHJpZGUgJiAzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQWRkIGluZm8gdG8gbGlzdCBvZi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gICAgICAgICAgICAga2VlcFtzdHlsZV0gPSBrZWVwW3N0eWxlXSB8fCBbXTtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb2JqZWN0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgeyBsYWJlbCwgbGF5b3V0IH0gPSBvYmplY3RzW2ldOyAvLyBUT0RPOiBgbGFiZWxgIHNob3VsZCBiZSBnZW5lcmljXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gdGVzdCB0aGUgbGFiZWwgZm9yIGludGVyc2VjdGlvbnMgd2l0aCBvdGhlciBsYWJlbHMgaW4gdGhlIHRpbGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsYXlvdXQuY29sbGlkZSB8fCAhbGFiZWwuZGlzY2FyZChiYm94ZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBmb3IgcmVwZWF0c1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNoZWNrID0gUmVwZWF0R3JvdXAuY2hlY2sobGFiZWwsIGxheW91dCwgdGlsZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hlY2spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cudHJhY2UoYGRpc2NhcmQgbGFiZWwgJyR7bGFiZWwudGV4dH0nLCAob25lX3Blcl9ncm91cDogJHtjaGVjay5vbmVfcGVyX2dyb3VwfSksIGRpc3QgJHtNYXRoLnNxcnQoY2hlY2suZGlzdF9zcSkvbGF5b3V0LnVuaXRzX3Blcl9waXhlbH0gPCAke01hdGguc3FydChjaGVjay5yZXBlYXRfZGlzdF9zcSkvbGF5b3V0LnVuaXRzX3Blcl9waXhlbH1gKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlZ2lzdGVyIGFzIHBsYWNlZCBmb3IgZnV0dXJlIHJlcGVhdCBjdWxsaW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBSZXBlYXRHcm91cC5hZGQobGFiZWwsIGxheW91dCwgdGlsZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsLmFkZChiYm94ZXMpOyAvLyBhZGQgbGFiZWwgdG8gY3VycmVudGx5IHZpc2libGUgc2V0XG4gICAgICAgICAgICAgICAgICAgICAgICBrZWVwW3N0eWxlXS5wdXNoKG9iamVjdHNbaV0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGxheW91dC5jb2xsaWRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2cudHJhY2UoYGRpc2NhcmQgbGFiZWwgJyR7bGFiZWwudGV4dH0nIGR1ZSB0byBjb2xsaXNpb25gKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGRlbGV0ZSB0aGlzLnRpbGVzW3RpbGVdO1xuICAgICAgICBzdGF0ZS5yZXNvbHZlKCk7XG4gICAgfVxuXG59O1xuIiwiaW1wb3J0IGJveEludGVyc2VjdCBmcm9tICdib3gtaW50ZXJzZWN0JzsgLy8gaHR0cHM6Ly9naXRodWIuY29tL21pa29sYWx5c2Vua28vYm94LWludGVyc2VjdFxuaW1wb3J0IFV0aWxzIGZyb20gJy4uL3V0aWxzL3V0aWxzJztcbmltcG9ydCBPQkIgZnJvbSAnLi4vdXRpbHMvb2JiJztcblxuaW1wb3J0IGxvZyBmcm9tICdsb2dsZXZlbCc7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIExhYmVsIHtcblxuICAgIGNvbnN0cnVjdG9yIChzaXplLCBvcHRpb25zID0ge30pIHtcbiAgICAgICAgdGhpcy5zaXplID0gc2l6ZTtcbiAgICAgICAgdGhpcy5vcHRpb25zID0gb3B0aW9ucztcbiAgICAgICAgdGhpcy5wb3NpdGlvbiA9IG51bGw7XG4gICAgICAgIHRoaXMuYWFiYiA9IG51bGw7XG4gICAgICAgIHRoaXMub2JiID0gbnVsbDtcbiAgICB9XG5cbiAgICAvLyBjaGVjayBmb3Igb3ZlcmxhcHMgd2l0aCBvdGhlciBsYWJlbHMgaW4gdGhlIHRpbGVcbiAgICBvY2NsdWRlZCAoYmJveGVzKSB7XG4gICAgICAgIGxldCBpbnRlcnNlY3QgPSBmYWxzZTtcbiAgICAgICAgbGV0IGFhYmJzID0gYmJveGVzLmFhYmI7XG4gICAgICAgIGxldCBvYmJzID0gYmJveGVzLm9iYjtcblxuICAgICAgICAvLyBCcm9hZCBwaGFzZVxuICAgICAgICBpZiAoYWFiYnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgYm94SW50ZXJzZWN0KFt0aGlzLmFhYmJdLCBhYWJicywgKGksIGopID0+IHtcbiAgICAgICAgICAgICAgICBsb2cudHJhY2UoJ2NvbGxpc2lvbjogYnJvYWQgcGhhc2UgY29sbGlkZScsIHRoaXMub3B0aW9ucy5pZCwgdGhpcywgdGhpcy5hYWJiLCBhYWJic1tqXSk7XG5cbiAgICAgICAgICAgICAgICAvLyBTa2lwIG5hcnJvdyBwaGFzZSBjb2xsaXNpb24gaWYgbm8gcm90YXRpb25cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vYmIuYW5nbGUgPT09IDAgJiYgb2Jic1tqXS5hbmdsZSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBsb2cudHJhY2UoJ2NvbGxpc2lvbjogc2tpcCBuYXJyb3cgcGhhc2UgY29sbGlkZSBiZWNhdXNlIG5laXRoZXIgaXMgcm90YXRlZCcsIHRoaXMub3B0aW9ucy5pZCwgdGhpcywgdGhpcy5vYmIsIG9iYnNbal0pO1xuICAgICAgICAgICAgICAgICAgICBpbnRlcnNlY3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBOYXJyb3cgcGhhc2VcbiAgICAgICAgICAgICAgICBpZiAoT0JCLmludGVyc2VjdCh0aGlzLm9iYiwgb2Jic1tqXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLnRyYWNlKCdjb2xsaXNpb246IG5hcnJvdyBwaGFzZSBjb2xsaWRlJywgdGhpcy5vcHRpb25zLmlkLCB0aGlzLCB0aGlzLm9iYiwgb2Jic1tqXSk7XG4gICAgICAgICAgICAgICAgICAgIGludGVyc2VjdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpbnRlcnNlY3Q7XG4gICAgfVxuXG4gICAgLy8gQWRkIHRoaXMgbGFiZWwncyBib3VuZGluZyBib3ggdG8gdGhlIHByb3ZpZGVkIHNldFxuICAgIGFkZCAoYmJveGVzKSB7XG4gICAgICAgIGJib3hlcy5hYWJiLnB1c2godGhpcy5hYWJiKTtcbiAgICAgICAgYmJveGVzLm9iYi5wdXNoKHRoaXMub2JiKTtcbiAgICB9XG5cbiAgICAvLyBjaGVja3Mgd2hldGhlciB0aGUgbGFiZWwgaXMgd2l0aGluIHRoZSB0aWxlIGJvdW5kYXJpZXNcbiAgICBpblRpbGVCb3VuZHMgKCkge1xuICAgICAgICBsZXQgbWluID0gWyB0aGlzLmFhYmJbMF0sIHRoaXMuYWFiYlsxXSBdO1xuICAgICAgICBsZXQgbWF4ID0gWyB0aGlzLmFhYmJbMl0sIHRoaXMuYWFiYlszXSBdO1xuXG4gICAgICAgIGlmICghVXRpbHMucG9pbnRJblRpbGUobWluKSB8fCAhVXRpbHMucG9pbnRJblRpbGUobWF4KSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgcm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gICAgICAgYnJlYWs7IC8vIHdlIGNhbid0IG1vdmUgZnVydGhlciBpbiB0aGlzIGxpbmVcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaW5fdGlsZSA9IHRoaXMuaW5UaWxlQm91bmRzKCk7XG4gICAgICAgICAgICBmaXRzX3RvX3NlZ21lbnQgPSB0aGlzLmZpdFRvU2VnbWVudCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluX3RpbGUgJiYgZml0c190b19zZWdtZW50O1xuICAgIH1cblxuICAgIGRpc2NhcmQgKGJib3hlcykge1xuICAgICAgICAvLyBGaXJzdCBmaW5kIGEgbGluZSBzZWdtZW50IHRoYXQgZml0cyB0aGUgbGFiZWxcbiAgICAgICAgaWYgKHRoaXMubGluZXMgJiYgIXRoaXMuZml0VG9TZWdtZW50KCkpIHtcbiAgICAgICAgICAgIHdoaWxlICghdGhpcy5maXRUb1NlZ21lbnQoKSkge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5tb3ZlTmV4dFNlZ21lbnQoKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBJZiBsYWJlbCBmaXRzIGluIGxpbmUsIHJ1biBzdGFuZGFyZCBkaXNjYXJkIHRlc3RzXG4gICAgICAgIHJldHVybiBzdXBlci5kaXNjYXJkKGJib3hlcyk7XG4gICAgfVxuXG59XG4iLCJpbXBvcnQgTGFiZWwgZnJvbSAnLi9sYWJlbCc7XG5pbXBvcnQgR2VvIGZyb20gJy4uL2dlbyc7XG5pbXBvcnQgT0JCIGZyb20gJy4uL3V0aWxzL29iYic7XG5pbXBvcnQgUG9pbnRBbmNob3IgZnJvbSAnLi4vc3R5bGVzL3BvaW50cy9wb2ludF9hbmNob3InO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBMYWJlbFBvaW50IGV4dGVuZHMgTG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ICAgICAgICAgICAvLyBEZWZhdWx0c1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuc2hvd0RlYnVnID0gKCFvcHRpb25zLnNob3dEZWJ1ZyA/IGZhbHNlIDogdHJ1ZSk7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy53aGVlbERlYm91bmNlVGltZSA9IG9wdGlvbnMud2hlZWxEZWJvdW5jZVRpbWUgfHwgNDA7XG5cbiAgICAgICAgICAgICAgICBMLnNldE9wdGlvbnModGhpcywgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVTY2VuZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMuaG9va3MgPSB7fTtcbiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAvLyBGb3JjZSBsZWFmbGV0IHpvb20gYW5pbWF0aW9ucyBvZmZcbiAgICAgICAgICAgICAgICB0aGlzLl96b29tQW5pbWF0ZWQgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgIHRoaXMuZGVib3VuY2VWaWV3UmVzZXQgPSBVdGlscy5kZWJvdW5jZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX21hcC5maXJlKCd6b29tZW5kJyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX21hcC5maXJlKCdtb3ZlZW5kJyk7XG4gICAgICAgICAgICAgICAgfSwgdGhpcy5vcHRpb25zLndoZWVsRGVib3VuY2VUaW1lKTtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGNyZWF0ZVNjZW5lOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zY2VuZSA9IFNjZW5lLmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLnNjZW5lLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBudW1Xb3JrZXJzOiB0aGlzLm9wdGlvbnMubnVtV29ya2VycyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZVVwZGF0ZTogdGhpcy5vcHRpb25zLnByZVVwZGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvc3RVcGRhdGU6IHRoaXMub3B0aW9ucy5wb3N0VXBkYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludW91c1pvb206IChMZWFmbGV0TGF5ZXIubGVhZmxldFZlcnNpb24gPT09ICcxLngnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2hEZW5zaXR5RGlzcGxheTogdGhpcy5vcHRpb25zLmhpZ2hEZW5zaXR5RGlzcGxheSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ0xldmVsOiB0aGlzLm9wdGlvbnMubG9nTGV2ZWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhZHZhbmNlZCBvcHRpb24sIGFwcCB3aWxsIGhhdmUgdG8gbWFudWFsbHkgY2FsbGVkIHNjZW5lLnVwZGF0ZSgpIHBlciBmcmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZVJlbmRlckxvb3A6IHRoaXMub3B0aW9ucy5kaXNhYmxlUmVuZGVyTG9vcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFkdmFuY2VkIG9wdGlvbiwgd2lsbCByZXF1aXJlIGxpYnJhcnkgdG8gYmUgc2VydmVkIGFzIHNhbWUgaG9zdCBhcyBwYWdlXG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxvd0Nyb3NzRG9tYWluV29ya2VyczogdGhpcy5vcHRpb25zLmFsbG93Q3Jvc3NEb21haW5Xb3JrZXJzXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgLy8gRmluaXNoIGluaXRpYWxpemluZyBzY2VuZSBhbmQgc2V0dXAgZXZlbnRzIHdoZW4gbGF5ZXIgaXMgYWRkZWQgdG8gbWFwXG4gICAgICAgICAgICBvbkFkZDogZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5zY2VuZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZVNjZW5lKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGF5ZXJCYXNlQ2xhc3MucHJvdG90eXBlLm9uQWRkLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmhvb2tzLnJlc2l6ZSA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlU2l6ZSgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBtYXAub24oJ3Jlc2l6ZScsIHRoaXMuaG9va3MucmVzaXplKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuaG9va3MubW92ZSA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmlldyA9IG1hcC5nZXRDZW50ZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgdmlldy56b29tID0gTWF0aC5taW4obWFwLmdldFpvb20oKSwgbWFwLmdldE1heFpvb20oKSB8fCBHZW8uZGVmYXVsdF9tYXhfem9vbSk7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5zZXRWaWV3KHZpZXcpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLmltbWVkaWF0ZVJlZHJhdygpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJldmVyc2VUcmFuc2Zvcm0oKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbWFwLm9uKCdtb3ZlJywgdGhpcy5ob29rcy5tb3ZlKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuaG9va3Muem9vbXN0YXJ0ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuc3RhcnRab29tKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG1hcC5vbignem9vbXN0YXJ0JywgdGhpcy5ob29rcy56b29tc3RhcnQpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5ob29rcy5kcmFnc3RhcnQgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUucGFubmluZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBtYXAub24oJ2RyYWdzdGFydCcsIHRoaXMuaG9va3MuZHJhZ3N0YXJ0KTtcblxuICAgICAgICAgICAgICAgIHRoaXMuaG9va3MuZHJhZ2VuZCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5wYW5uaW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBtYXAub24oJ2RyYWdlbmQnLCB0aGlzLmhvb2tzLmRyYWdlbmQpO1xuXG4gICAgICAgICAgICAgICAgLy8gRm9yY2UgbGVhZmxldCB6b29tIGFuaW1hdGlvbnMgb2ZmXG4gICAgICAgICAgICAgICAgbWFwLl96b29tQW5pbWF0ZWQgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgIC8vIE1vZGlmeSBkZWZhdWx0IGxlYWZsZXQgc2Nyb2xsIHdoZWVsIGJlaGF2aW9yXG4gICAgICAgICAgICAgICAgdGhpcy5tb2RpZnlTY3JvbGxXaGVlbEJlaGF2aW9yKG1hcCk7XG5cbiAgICAgICAgICAgICAgICAvLyBBZGQgR0wgY2FudmFzIHRvIGxheWVyIGNvbnRhaW5lclxuICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuY29udGFpbmVyID0gdGhpcy5nZXRDb250YWluZXIoKTtcblxuICAgICAgICAgICAgICAgIC8vIEluaXRpYWwgdmlld1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlVmlldygpO1xuXG4gICAgICAgICAgICAgICAgLy8gU3Vic2NyaWJlIHRvIHRhbmdyYW0gZXZlbnRzXG4gICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5zdWJzY3JpYmUoe1xuICAgICAgICAgICAgICAgICAgICBtb3ZlOiB0aGlzLm9uVGFuZ3JhbVZpZXdVcGRhdGUuYmluZCh0aGlzKVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gVXNlIGxlYWZsZXQncyBleGlzdGluZyBldmVudCBzeXN0ZW0gYXMgdGhlIGNhbGxiYWNrIG1lY2hhbmlzbVxuICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUubG9hZCgpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVNpemUoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVWaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmV2ZXJzZVRyYW5zZm9ybSgpO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZpcmUoJ2luaXQnKTtcbiAgICAgICAgICAgICAgICB9KS5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZmlyZSgnZXJyb3InLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBvblJlbW92ZTogZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICAgICAgICAgIGxheWVyQmFzZUNsYXNzLnByb3RvdHlwZS5vblJlbW92ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuXG4gICAgICAgICAgICAgICAgbWFwLm9mZigncmVzaXplJywgdGhpcy5ob29rcy5yZXNpemUpO1xuICAgICAgICAgICAgICAgIG1hcC5vZmYoJ21vdmUnLCB0aGlzLmhvb2tzLm1vdmUpO1xuICAgICAgICAgICAgICAgIG1hcC5vZmYoJ3pvb21zdGFydCcsIHRoaXMuaG9va3Muem9vbXN0YXJ0KTtcbiAgICAgICAgICAgICAgICBtYXAub2ZmKCdkcmFnc3RhcnQnLCB0aGlzLmhvb2tzLmRyYWdzdGFydCk7XG4gICAgICAgICAgICAgICAgbWFwLm9mZignZHJhZ2VuZCcsIHRoaXMuaG9va3MuZHJhZ2VuZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5ob29rcyA9IHt9O1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2NlbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5kZXN0cm95KCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGNyZWF0ZVRpbGU6IGZ1bmN0aW9uIChjb29yZHMpIHtcbiAgICAgICAgICAgICAgICB2YXIga2V5ID0gY29vcmRzLnggKyAnLycgKyBjb29yZHMueSArICcvJyArIGNvb3Jkcy56O1xuICAgICAgICAgICAgICAgIHZhciBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICBkaXYuc2V0QXR0cmlidXRlKCdkYXRhLXRpbGUta2V5Jywga2V5KTtcbiAgICAgICAgICAgICAgICBkaXYuc3R5bGUud2lkdGggPSAnMjU2cHgnO1xuICAgICAgICAgICAgICAgIGRpdi5zdHlsZS5oZWlnaHQgPSAnMjU2cHgnO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5zaG93RGVidWcpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlYnVnX292ZXJsYXkgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICAgICAgZGVidWdfb3ZlcmxheS50ZXh0Q29udGVudCA9IGtleTtcbiAgICAgICAgICAgICAgICAgICAgZGVidWdfb3ZlcmxheS5zdHlsZS5wb3NpdGlvbiA9ICdhYnNvbHV0ZSc7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkuc3R5bGUubGVmdCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkuc3R5bGUudG9wID0gMDtcbiAgICAgICAgICAgICAgICAgICAgZGVidWdfb3ZlcmxheS5zdHlsZS5jb2xvciA9ICd3aGl0ZSc7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkuc3R5bGUuZm9udFNpemUgPSAn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V2hlZWwgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBsYXllciA9IHRoaXM7XG4gICAgICAgICAgICAgICAgICAgIGxldCBlbmFibGVkID0gbWFwLnNjcm9sbFdoZWVsWm9vbS5lbmFibGVkKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbmFibGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXAuc2Nyb2xsV2hlZWxab29tLmRpc2FibGUoKTsgLy8gZGlzYWJsZSBiZWZvcmUgbW9kaWZ5aW5nXG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBtb2RpZnkgcHJvdG90eXBlIGFuZCBjdXJyZW50IGluc3RhbmNlLCBzbyBhZGQvcmVtb3ZlIGhvb2tzIHdvcmsgb24gZXhpc3RpbmcgcmVmZXJlbmNlc1xuICAgICAgICAgICAgICAgICAgICBMLk1hcC5TY3JvbGxXaGVlbFpvb20uX29uV2hlZWxTY3JvbGwgPSBtYXAuc2Nyb2xsV2hlZWxab29tLl9vbldoZWVsU2Nyb2xsID0gZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbW9kaWZ5IHRvIHNraXAgZGVib3VuY2UsIGFzIGl0IHNlZW1zIHRvIGNhdXNlIGFuaW1hdGlvbi1zeW5jIGlzc3VlcyBpbiBDaHJvbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdpdGggVGFuZ3JhbSBjb250aW51b3VzIHJlbmRlcmluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGVsdGEgKz0gTC5Eb21FdmVudC5nZXRXaGVlbERlbHRhKGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGFzdE1vdXNlUG9zID0gdGhpcy5fbWFwLm1vdXNlRXZlbnRUb0NvbnRhaW5lclBvaW50KGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGVyZm9ybVpvb20oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIEwuRG9tRXZlbnQuc3RvcChlKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICBMLk1hcC5TY3JvbGxXaGVlbFpvb20uX3BlcmZvcm1ab29tID0gbWFwLnNjcm9sbFdoZWVsWm9vbS5fcGVyZm9ybVpvb20gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhID0gdGhpcy5fZGVsdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbSA9IG1hcC5nZXRab29tKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcC5zdG9wKCk7IC8vIHN0b3AgcGFubmluZyBhbmQgZmx5IGFuaW1hdGlvbnMgaWYgYW55XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5PVEU6IHRoaXMgaXMgdGhlIG9ubHkgcmVhbCBtb2RpZmljYXRpb24gdG8gZGVmYXVsdCBsZWFmbGV0IGJlaGF2aW9yXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSAvPSA0MDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsdGEgPSBNYXRoLm1heChNYXRoLm1pbihkZWx0YSwgNCksIC00KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhID0gbWFwLl9saW1pdFpvb20oem9vbSArIGRlbHRhKSAtIHpvb207XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RlbHRhID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3N0YXJ0VGltZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZGVsdGEpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXAub3B0aW9ucy5zY3JvbGxXaGVlbFpvb20gPT09ICdjZW50ZXInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwLnNldFpvb20oem9vbSArIGRlbHRhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwLnNldFpvb21Bcm91bmQodGhpcy5fbGFzdE1vdXNlUG9zLCB6b29tICsgZGVsdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXllci5kZWJvdW5jZVZpZXdSZXNldCgpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbmFibGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXAuc2Nyb2xsV2hlZWxab29tLmVuYWJsZSgpOyAvLyByZS1lbmFibGUgYWZ0ZXIgbW9kaWZ5aW5nXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICB1cGRhdGVWaWV3OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHZpZXcgPSB0aGlzLl9tYXAuZ2V0Q2VudGVyKCk7XG4gICAgICAgICAgICAgICAgdmlldy56b29tID0gTWF0aC5taW4odGhpcy5fbWFwLmdldFpvb20oKSwgdGhpcy5fbWFwLmdldE1heFpvb20oKSB8fCBHZW8uZGVmYXVsdF9tYXhfem9vbSk7XG4gICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5zZXRWaWV3KHZpZXcpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdXBkYXRlU2l6ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBzaXplID0gdGhpcy5fbWFwLmdldFNpemUoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLnJlc2l6ZU1hcChzaXplLngsIHNpemUueSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBvblRhbmdyYW1WaWV3VXBkYXRlOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9tYXAgfHwgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMuX21hcC5zZXRWaWV3KFt0aGlzLnNjZW5lLmNlbnRlci5sYXQsIHRoaXMuc2NlbmUuY2VudGVyLmxuZ10sIHRoaXMuc2NlbmUuem9vbSwgeyBhbmltYXRlOiBmYWxzZSB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLnJldmVyc2VUcmFuc2Zvcm0oKTtcbiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gZmFsc2U7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICByZW5kZXI6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuc2NlbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgLy8gUmV2ZXJzZSB0aGUgQ1NTIHBvc2l0aW9uaW5nIExlYWZsZXQgYXBwbGllcyB0byB0aGUgbGF5ZXIsIHNpbmNlIFRhbmdyYW0ncyBXZWJHTCBjYW52YXNcbiAgICAgICAgICAgIC8vIGlzIGV4cGVjdGVkIHRvIGJlICdhYnNvbHV0ZWx5JyBwb3NpdGlvbmVkLlxuICAgICAgICAgICAgcmV2ZXJzZVRyYW5zZm9ybTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbWFwIHx8ICF0aGlzLnNjZW5lIHx8ICF0aGlzLnNjZW5lLmNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdmFyIHRvcF9sZWZ0ID0gdGhpcy5fbWFwLmNvbnRhaW5lclBvaW50VG9MYXllclBvaW50KFswLCAwXSk7XG4gICAgICAgICAgICAgICAgTC5Eb21VdGlsLnNldFBvc2l0aW9uKHRoaXMuc2NlbmUuY29udGFpbmVyLCB0b3BfbGVmdCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gQ3JlYXRlIHRoZSBsYXllciBjbGFzc1xuICAgICAgICBMZWFmbGV0TGF5ZXIgPSBsYXllckJhc2VDbGFzcy5leHRlbmQobGF5ZXJDbGFzc0NvbmZpZyk7XG5cbiAgICAgICAgLy8gUG9seWZpbGwgc29tZSAxLjAgbWV0aG9kc1xuICAgICAgICBpZiAodHlwZW9mIExlYWZsZXRMYXllci5yZW1vdmUgIT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIExlYWZsZXRMYXllci5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX21hcCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9tYXAucmVtb3ZlTGF5ZXIodGhpcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuZmlyZSgncmVtb3ZlJyk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgTGVhZmxldExheWVyLmxheWVyQmFzZUNsYXNzID0gbGF5ZXJCYXNlQ2xhc3M7XG4gICAgICAgIExlYWZsZXRMYXllci5sZWFmbGV0VmVyc2lvbiA9IGxlYWZsZXRWZXJzaW9uO1xuXG4gICAgICAgIHJldHVybiB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kdSQU1fTUFURVJJQUxfRU1JU1NJT05cbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBtYXRlcmlhbC5lbWlzc2lvbjtcbiAgICAgICAgICAgICAgICAjZW5kaWZcblxuICAgICAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX0FNQklFTlRcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgKz0gbGlnaHRfYWNjdW11bGF0b3JfYW1iaWVudCAqIF9jb2xvciAqIG1hdGVyaWFsLmFtYmllbnQ7XG4gICAgICAgICAgICAgICAgI2Vsc2VcbiAgICAgICAgICAgICAgICAgICAgI2lmZGVmIFRBTkdSQU1fTUFURVJJQUxfRElGRlVTRVxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgKz0gbGlnaHRfYWNjdW11bGF0b3JfYW1iaWVudCAqIF9jb2xvciAqIG1hdGVyaWFsLmRpZmZ1c2U7XG4gICAgICAgICAgICAgICAgICAgICNlbmRpZlxuICAgICAgICAgICAgICAgICNlbmRpZlxuXG4gICAgICAgICAgICAgICAgI2lmZGVmIFRBTkdSQU1fTUFURVJJQUxfRElGRlVTRVxuICAgICAgICAgICAgICAgICAgICBjb2xvciArPSBsaWdodF9hY2N1bXVsYXRvcl9kaWZmdXNlICogX2NvbG9yICogbWF0ZXJpYWwuZGlmZnVzZTtcbiAgICAgICAgICAgICAgICAjZW5kaWZcblxuICAgICAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX1NQRUNVTEFSXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yICs9IGxpZ2h0X2FjY3VtdWxhdG9yX3NwZWN1bGFyICogbWF0ZXJpYWwuc3BlY3VsYXI7XG4gICAgICAgICAgICAgICAgI2VuZGlmXG5cbiAgICAgICAgICAgICAgICAvLyBDbGFtcCBmaW5hbCBjb2xvclxuICAgICAgICAgICAgICAgIGNvbG9yID0gY2xhbXAoY29sb3IsIDAuMCwgMS4wKTtcblxuICAgICAgICAgICAgIC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jZXMnOyAvLyBidWlsdC1pbiBzaGFkZXJzXG5pbXBvcnQgR0xTTCBmcm9tICcuL2dsL2dsc2wnO1xuaW1wb3J0IHtTdHlsZVBhcnNlcn0gZnJvbSAnLi9zdHlsZXMvc3R5bGVfcGFyc2VyJztcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTWF0ZXJpYWwge1xuICAgIGNvbnN0cnVjdG9yIChjb25maWcpIHtcblxuICAgICAgICBjb25maWcgPSBjb25maWcgfHwge307XG5cbiAgICAgICAgLy8gVGhlc2UgcHJvcGVydGllcyBhbGwgaGF2ZSB0aGUgc2FtZSBkZWZhdWx0cywgc28gdGhleSBjYW4gYmUgc2V0IGluIGJ1bGtcbiAgICAgICAgZm9yIChsZXQgcHJvcCBvZiBbJ2VtaXNzaW9uJywgJ2FtYmllbnQnLCAnZGlmZnVzZScsICdzcGVjdWxhciddKSB7XG4gICAgICAgICAgICBpZiAoY29uZmlnW3Byb3BdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnW3Byb3BdLnRleHR1cmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc1twcm9wXSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHR1cmU6IGNvbmZpZ1twcm9wXS50ZXh0dXJlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZzogY29uZmlnW3Byb3BdLm1hcHBpbmcgfHwgJ3NwaGVyZW1hcCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBzY2FsZTogR0xTTC5leHBhbmRWZWMzKGNvbmZpZ1twcm9wXS5zY2FsZSAhPSBudWxsID8gY29uZmlnW3Byb3BdLnNjYWxlIDogMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBhbW91bnQ6IEdMU0wuZXhwYW5kVmVjNChjb25maWdbcHJvcF0uYW1vdW50ICE9IG51bGwgPyBjb25maWdbcHJvcF0uYW1vdW50IDogMSlcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIGNvbmZpZ1twcm9wXSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc1twcm9wXSA9IHsgYW1vdW50OiBHTFNMLmV4cGFuZFZlYzQoY29uZmlnW3Byb3BdKSB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgY29uZmlnW3Byb3BdID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzW3Byb3BdID0geyBhbW91bnQ6IFN0eWxlUGFyc2VyLnBhcnNlQ29sb3IoY29uZmlnW3Byb3BdKSB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc1twcm9wXSA9IGNvbmZpZ1twcm9wXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBFeHRyYSBzcGVjdWxhciBwcm9wc1xuICAgICAgICBpZiAodGhpcy5zcGVjdWxhcikge1xuICAgICAgICAgICAgdGhpcy5zcGVjdWxhci5zaGluaW5lc3MgPSBjb25maWcuc2hpbmluZXNzID8gcGFyc2VGbG9hdChjb25maWcuc2hpbmluZXNzKSA6IDAuMjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIE5vcm1hbCBtYXBwaW5nXG4gICAgICAgIGlmIChjb25maWcubm9ybWFsICE9IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMubm9ybWFsID0ge1xuICAgICAgICAgICAgICAgIHRleHR1cmU6IGNvbmZpZy5ub3JtYWwudGV4dHVyZSxcbiAgICAgICAgICAgICAgICBtYXBwaW5nOiBjb25maWcubm9ybWFsLm1hcHBpbmcgfHwgJ3RyaXBsYW5hcicsXG4gICAgICAgICAgICAgICAgc2NhbGU6IEdMU0wuZXhwYW5kVm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ByZXR1cm4gdGhpcy5sb2FkU2NlbmUoY29uZmlnX3NvdXJjZSwgY29uZmlnX3BhdGgpXG4gICAgICAgICAgICAudGhlbigoKSA9PiB0aGlzLmNyZWF0ZVdvcmtlcnMoKSlcbiAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUNhbnZhcygpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVzZXRGZWF0dXJlU2VsZWN0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMudGV4dHVyZV9saXN0ZW5lcikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmVfbGlzdGVuZXIgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGU6ICgpID0+IHRoaXMuZGlydHkgPSB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgd2FybmluZzogKGRhdGEpID0+IHRoaXMudHJpZ2dlcignd2FybmluZycsIE9iamVjdC5hc3NpZ24oeyB0eXBlOiAndGV4dHVyZXMnIH0sIGRhdGEpKVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBUZXh0dXJlLnN1YnNjcmliZSh0aGlzLnRleHR1cmVfbGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aWxlcyBiZWZvcmUgcmVidWlsZGluZ1xuICAgICAgICAgICAgICAgIHRoaXMudGlsZV9tYW5hZ2VyLnJlbW92ZVRpbGVzKHRpbGUgPT4gIXRpbGUudmlzaWJsZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlQ29uZmlnKHsgcmVidWlsZDogdHJ1ZSB9KTtcbiAgICAgICAgICAgIH0pLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRpbmctLTtcbiAgICAgICAgICAgICAgICB0aGlzLmluaXRpYWxpemluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRoaXMuaW5pdGlhbGl6ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMubGFzdF92YWxpZF9jb25maWdfc291cmNlID0gdGhpcy5jb25maWdfc291cmNlO1xuICAgICAgICAgICAgICAgIHRoaXMubGFzdF92YWxpZF9jb25maWdfcGF0aCA9IHRoaXMuY29uZmlnX3BhdGg7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5yZW5kZXJfbG9vcCAhPT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXR1cFJlbmRlckxvb3AoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5yZXF1ZXN0UmVkcmF3KCk7XG4gICAgICAgIH0pLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgIHRoaXMuaW5pdGlhbGl6aW5nID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnVwZGF0aW5nID0gMDtcblxuICAgICAgICAgICAgLy8gUmVwb3J0IGFuZCByZXZlcnQgdG8gbGFzdCB2YWxpZCBjb25maWcgaWYgYXZhaWxhYmxlXG4gICAgICAgICAgICBsZXQgdHlwZSwgbWVzc2FnZTtcbiAgICAgICAgICAgIGlmIChlcnJvci5uYW1lID09PSAnWUFNTEV4Y2VwdGlvbicpIHtcbiAgICAgICAgICAgICAgICB0eXBlID0gJ3lhbWwnO1xuICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSAnRXJyb3IgcGFyc2luZyBzY2VuZSBZQU1MJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IG1vcmUgZXJyb3IgdHlwZXNcbiAgICAgICAgICAgICAgICBtZXNzYWdlID0gJ0Vycm9yIGluaXRpYWxpemluZyBzY2VuZSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnRyaWdnZXIoJ2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yBjbGVhciBhbGwgZXZlbnQgbGlzdGVuZXJzXG5cbiAgICAgICAgVGV4dHVyZS51bnN1YnNjcmliZSh0aGlzLnRleHR1cmVfbGlzdGVuZXIpO1xuICAgICAgICB0aGlzLnRleHR1cmVfbGlzdGVuZXIgPSBudWxsO1xuXG4gICAgICAgIGlmICh0aGlzLmNhbnZhcyAmJiB0aGlzLmNhbnZhcy5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICB0aGlzLmNhbnZhcy5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRoaXMuY2FudmFzKTtcbiAgICAgICAgICAgIHRoaXMuY2FudmFzID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmNvbnRhaW5lciA9IG51bGw7XG5cbiAgICAgICAgaWYgKHRoaXMuc2VsZWN0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5kZXN0cm95KCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5nbCkge1xuICAgICAgICAgICAgVGV4dHVyZS5kZXN0cm95KHRoaXMuZ2wpO1xuICAgICAgICAgICAgU3R5bGVNYW5hZ2VyLmRlc3Ryb3kodGhpcy5nbCk7XG4gICAgICAgICAgICB0aGlzLnN0eWxlcyA9IHt9O1xuXG4gICAgICAgICAgICB0aGlzLmdsID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc291cmNlcyA9IHt9O1xuXG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRoaXMud29ya2VycykpIHtcbiAgICAgICAgICAgIHRoaXMud29ya2Vycy5mb3JFYWNoKCh3b3JrZXIpID0+IHtcbiAgICAgICAgICAgICAgICB3b3JrZXIudGVybWluYXRlKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRoaXMud29ya2VycyA9IG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnRpbGVfbWFuYWdlci5kZXN0cm95KCk7XG4gICAgfVxuXG4gICAgY3JlYXRlQ2FudmFzKCkge1xuICAgICAgICBpZiAodGhpcy5jYW52YXMpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY29udGFpbmVyID0gdGhpcy5jb250YWluZXIgfHwgZG9jdW1lbnQuYm9keTtcbiAgICAgICAgdGhpcy5jYW52YXMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdjYW52YXMnKTtcbiAgICAgICAgdGhpcy5jYW52YXMuc3R5bGUucG9zaXRpb24gPSAnYWJzb2x1dGUnO1xuICAgICAgICB0aGlzLmNhbnZhcy5zdHlsZS50b3AgPSAwO1xuICAgICAgICB0aGlzLmNhbnZhcy5zdHlsZS5sZWZ0ID0gMDtcblxuICAgICAgICAvLyBGb3JjZSB0YW5ncmFtIGNhbnZhcyB1bmRlcm5lYXRoIGFsbCBsZWFmbGV0IGxheWVycywgYW5kIHNldCBiYWNrZ3JvdW5kIHRvIHRyYW5zcGFyZW50XG4gICAgICAgIHRoaXMuY29udGFpbmVyLnN0eWxlLmJhY2tncm91bmRDb2xvciA9ICd0cmFuc3BhcmVudCc7XG4gICAgICAgIHRoaXMuY29udGFpbmVyLmFwcGVuZENoaWxkKHRoaXMuY2FudmFzKTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5nbCA9IENvbnRleHQuZ2V0Q29udGV4dCh0aGlzLmNhbnZhcywge1xuICAgICAgICAgICAgICAgIGFscGhhOiB0cnVlLCBwcmVtdWx0aXBsaWVkQWxwaGE6IHRydWUsIC8vIFRPRE86IHZhcnkgdy9zY2VuZSBhbHBoYVxuICAgICAgICAgICAgICAgIGRldmljZV9waXhlbF9yYXRpbzogVXRpbHMuZGV2aWNlX3BpeGVsX3JhdGlvXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBjYXRjaChlKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgXCJDb3VsZG4ndCBjcmVhdGUgV2ViR0wgY29udGV4dC4gXCIgK1xuICAgICAgICAgICAgICAgIFwiWW91ciBicm93c2VyIG1heSBub3Qgc3VwcG9ydCBXZWJHTCwgb3IgaXQncyB0dXJuZWQgb2ZmPyBcIiArXG4gICAgICAgICAgICAgICAgXCJWaXNpdCBodHRwOi8vd2ViZ2xyZXBvcnQuY29tLyBmb3IgbW9yZSBpbmZvLlwiXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5yZXNpemVNYXAodGhpcy5jb250YWluZXIuY2xpZW50V2lkdGgsIHRoaXMuY29udGFpbmVyLmNsaWVudEhlaWdodCk7XG4gICAgICAgIFZlcnRleEFycmF5T2JqZWN0LmluaXQodGhpcy5nbCk7XG4gICAgICAgIFJlbmRlclN0YXRlLmluaXRpYWxpemUodGhpcy5nbCk7XG4gICAgfVxuXG4gICAgLy8gR2V0IHRoZSBVUkwgdG8gbG9hZCB0aGUgd2ViIHdvcmtlciBmcm9tXG4gICAgZ2V0V29ya2VyVXJsKCkge1xuICAgICAgICBsZXQgd29ya2VyX3VybCA9IHRoaXMud29ya2VyX3VybCB8fCBVdGlscy5maW5kQ3VycmVudFVSTCgndGFuZ3JhbS5kZWJ1Zy5qcycsICd0YW5ncmFtLm1pbi5qcycpO1xuXG4gICAgICAgIGlmICghd29ya2VyX3VybCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiQ2FuJ3QgbG9hZCB3b3JrZXIgYmVjYXVzZSBjb3VsZG4ndCBmaW5kIGJhc2UgVVJMIHRoYXQgbGlicmFyeSB3YXMgbG9hZGVkIGZyb21cIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5hbGxvd19jcm9zc19kb21haW5fd29ya2Vycykge1xuICAgICAgICAgICAgbGV0IGJvZHkgPSBgaW1wb3J0U2NyaXB0cygnJHt3b3JrZXJfdXJsfScpO2A7XG4gICAgICAgICAgICByZXR1cm4gVX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GlhbGl6aW5nIHdvcmtlciAke2lkfWApO1xuICAgICAgICAgICAgbGV0IF9pZCA9IGlkO1xuICAgICAgICAgICAgcXVldWUucHVzaChXb3JrZXJCcm9rZXIucG9zdE1lc3NhZ2Uod29ya2VyLCAnc2VsZi5pbml0JywgaWQsIHRoaXMubnVtX3dvcmtlcnMsIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbykudGhlbihcbiAgICAgICAgICAgICAgICAoaWQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLmRlYnVnKGBTY2VuZS5tYWtlV29ya2VyczogaW5pdGlhbGl6ZWQgd29ya2VyICR7aWR9YCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpZDtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsb2cuZXJyb3IoYFNjZW5lLm1ha2VXb3JrZXJzOiBmYWlsZWQgdG8gaW5pdGlhbGl6ZSB3b3JrZXIgJHtfaWR9OmAsIGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubmV4dF93b3JrZXIgPSAwO1xuICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwocXVldWUpO1xuICAgIH1cblxuICAgIC8vIFJvdW5kIHJvYmluIHNlbGVjdGlvbiBvZiBuZXh0IHdvcmtlclxuICAgIG5leHRXb3JrZXIoKSB7XG4gICAgICAgIHZhciB3b3JrZXIgPSB0aGlzLndvcmtlcnNbdGhpcy5uZXh0X3dvcmtlcl07XG4gICAgICAgIHRoaXMubmV4dF93b3JrZXIgPSAodGhpcy5uZXh0X3dvcmtlciArIDEpICUgdGhpcy53b3JrZXJzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHdvcmtlcjtcbiAgICB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1xuICAgICAgICAgICAgICAgIGlmICh0aWxlLmxvYWRpbmcgJiYgdGhpcy50aWxlWm9vbSh0aWxlLmNvb3Jkcy56KSAhPT0gdGlsZV96b29tKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy50cmFjZShgcmVtb3ZlZCAke3RpbGUua2V5fSAod2FzIGxvYWRpbmcsIGJ1dCBvdXRzaWRlIGN1cnJlbnQgem9vbSlgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmxhc3Rfem9vbSA9IHRoaXMuem9vbTtcbiAgICAgICAgdGhpcy56b29tID0gem9vbTtcbiAgICAgICAgdGhpcy50aWxlX3pvb20gPSB0aWxlX3pvb207XG5cbiAgICAgICAgdGhpcy51cGRhdGVCb3VuZHMoKTtcblxuICAgICAgICB0aGlzLmRpcnR5ID0gdHJ1ZTtcbiAgICB9XG5cbiAgICB2aWV3UmVhZHkoKSB7XG4gICAgICAgIGlmICh0aGlzLmNzc19zaXplID09IG51bGwgfHwgdGhpcy5jZW50ZXIgPT0gbnVsbCB8fCB0aGlzLnpvb20gPT0gbnVsbCB8fCBPYmplY3Qua2V5cyh0aGlzLnNvdXJjZXMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICAvLyBDYWxjdWxhdGUgdmlld3BvcnQgYm91bmRzIGJhc2VkIG9uIGN1cnJlbnQgY2VudGVyIGFuZCB6b29tXG4gICAgdXBkYXRlQm91bmRzKCkge1xuICAgICAgICAvLyBUT0RPOiBiZXR0ZXIgY29uY2VwdCBvZiBcInJlYWRpbmVzc1wiIHN0YXRlP1xuICAgICAgICBpZiAoIXRoaXMudmlld1JlYWR5KCkpIHtcbiAgICAgICAgICAgIHJldHVybj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xuICAgICAgICAgICAgbGV0IHpkaWZmID0gdGlsZS5jb29yZHMueiAtIHN0eWxlX3pvb207XG4gICAgICAgICAgICBpZiAoTWF0aC5hYnMoemRpZmYpID4gdGhpcy5wcmVzZXJ2ZV90aWxlc193aXRoaW5fem9vbSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBIYW5kbGUgdGlsZXMgYXQgZGlmZmVyZW50IHpvb21zXG4gICAgICAgICAgICBsZXQgenRyYW5zID0gTWF0aC5wb3coMiwgemRpZmYpO1xuICAgICAgICAgICAgbGV0IGNvb3JkcyA9IHtcbiAgICAgICAgICAgICAgICB4OiBNYXRoLmZsb29yKHRpbGUuY29vcmRzLnggLyB6dHJhbnMpLFxuICAgICAgICAgICAgICAgIHk6IE1hdGguZmxvb3IodGlsZS5jb29yZHMueSAvIHp0cmFucylcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIC8vIERpc2NhcmQgdGlsZXMgb3V0c2lkZSBhbiBhcmVhIHN1cnJvdW5kaW5nIHRoZSB2aWV3cG9ydFxuICAgICAgICAgICAgaWYgKE1hdGguYWJzKGNvb3Jkcy54IC0gdGhpcy5jZW50ZXJfdGlsZS54KSAtIGJvcmRlcl90aWxlc1swXSA+IGJvcmRlcl9idWZmZXIpIHtcbiAgICAgICAgICAgICAgICBsb2cudHJhY2UoYFNjZW5lOiByZW1vdmUgdGlsZSAke3RpbGUua2V5fSAoYXMgJHtjb29yZHMueH0vJHtjb29yZHMueX0vJHtzdHlsZV96b29tfSkgZm9yIGJlaW5nIHRvbyBmYXIgb3V0IG9mIHZpc2libGUgYXJlYSAqKipgKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKE1hdGguYWJzKGNvb3Jkcy55IC0gdGhpcy5jZW50ZXJfdGlsZS55KSAtIGJvcmRlcl90aWxl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XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS51bmlmb3JtKCcyZicsICd1X3Jlc29sdXRpb24nLCB0aGlzLmRldmljZV9zaXplLndpZHRoLCB0aGlzLmRldmljZV9zaXplLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS51bmlmb3JtKCcxZicsICd1X3RpbWUnLCB0aGlzLmFuaW1hdGVkID8gKCgoK25ldyBEYXRlKCkpIC0gdGhpcy5zdGFydF90aW1lKSAvIDEwMDApIDogMCk7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS51bmlmb3JtKCczZicsICd1X21hcF9wb3NpdGlvbicsIHRoaXMuY2VudGVyX21ldGVycy54LCB0aGlzLmNlbnRlcl9tZXRlcnMueSwgdGhpcy56b29tKTtcbiAgICAgICAgICAgICAgICBwcm9ncmFtLnVuaWZvcm0oJzFmJywgJ3VfbWV0ZXJzX3Blcl9waXhlbCcsIHRoaXMubWV0ZXJzX3Blcl9waXhlbCk7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS51bmlmb3JtKCcxZicsICd1X2RldmljZV9waXhlbF9yYXRpbycsIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbyk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYS5zZXR1cFByb2dyYW0ocHJvZ3JhbSk7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiB0aGlzLmxpZ2h0cykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpZ2h0c1tpXS5zZXR1cFByb2dyYW0ocHJvZ3JhbSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBUaWxlLXNwZWNpZmljIHN0YXRlXG4gICAgICAgICAgICAvLyBUT0RPOiBjYWxjIHRoZXNlIG9uY2UgcGVyIHRpbGUgKGN1cnJlbnRseSBiZWluZyBuZWVkbGVzc2x5IHJlLWNhbGN1bGF0ZWQgcGVyLXRpbGUtcGVyLXN0eWx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SyB9KTtcblxuICAgICAgICAvLyBCbGVuZGluZyBvZiBhbHBoYSBjaGFubmVsIGlzIG1vZGlmaWVkIHRvIGFjY291bnQgZm9yIFdlYkdMIGFscGhhIGJlaGF2aW9yLCBzZWU6XG4gICAgICAgIC8vIGh0dHA6Ly93ZWJnbGZ1bmRhbWVudGFscy5vcmcvd2ViZ2wvbGVzc29ucy93ZWJnbC1hbmQtYWxwaGEuaHRtbFxuICAgICAgICAvLyBodHRwOi8vc3RhY2tvdmVyZmxvdy5jb20vYS8xMTUzMzQxNlxuICAgICAgICBpZiAoYmxlbmQpIHtcbiAgICAgICAgICAgIC8vIE9wYXF1ZTogYWxsIHNvdXJjZSwgbm8gZGVzdGluYXRpb25cbiAgICAgICAgICAgIGlmIChibGVuZCA9PT0gJ29wYXF1ZScpIHtcbiAgICAgICAgICAgICAgICBSZW5kZXJTdGF0ZS5ibGVuZGluZy5zZXQoe1xuICAgICAgICAgICAgICAgICAgICBibGVuZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3JjOiBnbC5TUkNfQUxQSEEsIGRzdDogZ2wuWkVST1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVHJhZGl0aW9uYWwgYWxwaGEgYmxlbmRpbmdcbiAgICAgICAgICAgIGVsc2UgaWYgKGJsZW5kID09PSAnb3ZlcmxheScgfHwgYmxlbmQgPT09ICdpbmxheScpIHtcbiAgICAgICAgICAgICAgICBSZW5kZXJTdGF0ZS5ibGVuZGluZy5zZXQoe1xuICAgICAgICAgICAgICAgICAgICBibGVuZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3JjOiBnbC5TUkNfQUxQSEEsIGRzdDogZ2wuT05FX01JTlVTX1NSQ19BTFBIQSxcbiAgICAgICAgICAgICAgICAgICAgc3JjX2FscGhhOiBnbC5PTkUsIGRzdF9hbHBoYTogZ2wuT05FX01JTlVTX1NSQ19BTFBIQVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQWRkaXRpdmUgYmxlbmRpbmdcbiAgICAgICAgICAgIGVsc2UgaWYgKGJsZW5kID09PSAnYWRkJykge1xuICAgICAgICAgICAgICAgIFJlbmRlclN0YXRlLmJsZW5kaW5nLnNldCh7XG4gICAgICAgICAgICAgICAgICAgIGJsZW5kOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBzcmM6IGdsLk9ORSwgZHN0OiBnbC5PTkUsXG4gICAgICAgICAgICAgICAgICAgIHNyY19hbHBoYTogZ2wuT05FLCBkc3RfYWxwaGE6IGdsLk9ORV9NSU5VU19TUkNfQUxQSEFcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIE11bHRpcGxpY2F0aXZlIGJsZW5kaW5nXG4gICAgICAgICAgICBlbHNlIGlmIChibGVuZCA9PT0gJ211bHRpcGx5Jykge1xuICAgICAgICAgICAgICAgIFJlbmRlclN0YXRlLmJsZW5kaW5nLnNldCh7XG4gICAgICAgICAgICAgICAgICAgIGJsZW5kOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBzcmM6IGdsLlpFUk8sIGRzdDogZ2wuU1JDX0NPTE9SLFxuICAgICAgICAgICAgICAgICAgICBzcmNfYWxwaGE6IGdsLk9ORSwgZHN0X2FscGhhOiBnbC5PTkVfTUlOVVNfU1JDX0FMUEhBXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBSZW5kZXJTdGF0ZS5ibGVuZGluZy5zZXQoeyBibGVuZDogZmFsc2UgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBSZXF1ZXN0IGZlYXR1cmUgc2VsZWN0aW9uIGF0IGdpdmVuIHBpeGVsLiBSdW5zIGFzeW5jIGFuZCByZXR1cm5zIHJlc3VsdHMgdmlhIGEgcHJ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uICAgICAgICAgICAgICAgIGlmICh0aWxlLnZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgYnVpbGQucHVzaCh0aWxlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGlsZV9tYW5hZ2VyLnJlbW92ZVRpbGUodGlsZS5rZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhpcy50aWxlX21hbmFnZXIuYnVpbGRUaWxlcyhidWlsZCk7XG4gICAgICAgIH0pLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgLy8gUHJvZmlsaW5nXG4gICAgICAgICAgICBpZiAodGhpcy5kZWJ1Zy5wcm9maWxlLmdlb21ldHJ5X2J1aWxkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcHJvZmlsZUVuZCgncmVidWlsZEdlb21ldHJ5Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8vIFRpbGUgbWFuYWdlciBmaW5pc2hlZCBidWlsZGluZyB0aWxlc1xuICAgIHRpbGVNYW5hZ2VyQnVpbGREb25lKCkge1xuICAgICAgICBpZiAodGhpcy5idWlsZGluZykge1xuICAgICAgICAgICAgbG9nLmluZm8oYFNjZW5lOiBidWlsZCBnZW9tZXRyeSBmaW5pc2hlZGApO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVpbGRpbmcucmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuYnVpbGRpbmcucmVzb2x2ZSh0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQW5vdGhlciByZWJ1aWxkIHF1ZXVlZD9cbiAgICAgICAgICAgIHZhciBxdWV1ZWQgPSB0aGlzLmJ1aWxkaW5nLnF1ZXVlZDtcbiAgICAgICAgICAgIHRoaXMuYnVpbGRpbmcgPSBudWxsO1xuICAg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W5hbWUgfHwgIWNvbmZpZyB8fCAhY29uZmlnLnR5cGUgfHwgKCFjb25maWcudXJsICYmICFjb25maWcuZGF0YSkpIHtcbiAgICAgICAgICAgIGxvZy5lcnJvcihcIk5vIG5hbWUgcHJvdmlkZWQgb3Igbm90IGEgdmFsaWQgY29uZmlnOlwiLCBuYW1lLCBjb25maWcpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGxvYWQgPSAodGhpcy5jb25maWcuc291cmNlc1tuYW1lXSA9PSBudWxsKTtcbiAgICAgICAgbGV0IHNvdXJjZSA9IHRoaXMuY29uZmlnLnNvdXJjZXNbbmFtZV0gPSBPYmplY3QuYXNzaWduKHt9LCBjb25maWcpO1xuXG4gICAgICAgIGlmIChzb3VyY2UuZGF0YSAmJiB0eXBlb2Ygc291cmNlLmRhdGEgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBzb3VyY2UudXJsID0gVXRpbHMuY3JlYXRlT2JqZWN0VVJMKG5ldyBCbG9iKFtKU09OLnN0cmluZ2lmeShzb3VyY2UuZGF0YSldKSk7XG4gICAgICAgICAgICBkZWxldGUgc291cmNlLmRhdGE7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobG9hZCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVDb25maWcoeyByZWJ1aWxkOiB0cnVlIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5yZWJ1aWxkKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBsb2FkRGF0YVNvdXJjZXMoKSB7XG4gICAgICAgIGZvciAodmFyIG5hbWUgaW4gdGhpcy5jb25maWcuc291cmNlcykge1xuICAgICAgICAgICAgbGV0IHNvdXJjZSA9IHRoaXMuY29uZmlnLnNvdXJjZXNbbmFtZV07XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zb3VyY2VzW25hbWVdID0gRGF0YVNvdXJjZS5jcmVhdGUoT2JqZWN0LmFzc2lnbih7fSwgc291cmNlLCB7bmFtZX0pKTtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuc291cmNlc1tuYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyB7fTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaChlKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuc291cmNlc1tuYW1lXTtcbiAgICAgICAgICAgICAgICBsZXQgbWVzc2FnZSA9IGBDb3VsZCBub3QgY3JlYXRlIGRhdGEgc291cmNlOiAke2UubWVzc2FnZX1gO1xuICAgICAgICAgICAgICAgIGxvZy53YXJuKGBTY2VuZTogJHttZXNzYWdlfWAsIHNvdXJjZSk7XG4gICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyKCd3YXJuaW5nJywgeyB0eXBlOiAnc291cmNlcycsIHNvdXJjZSwgbWVzc2FnZSB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIExvYWQgYWxsIHRleHR1cmVzIGluIHRoZSBzY2VuZSBkZWZpbml0aW9uXG4gICAgbG9hZFRleHR1cmVzKCkge1xuICAgICAgICByZXR1cm4gVGV4dHVyZS5jcmVhdGVGcm9tT2JqZWN0KHRoaXMuZ2wsIHRoaXMuY29uZmlnLnRleHR1cmVzKTtcbiAgICB9XG5cbiAgICAvLyBDYWxsZWQgKGN1cnJlbnRseSBtYW51YWxseSkgYWZ0ZXIgc3R5bGVzIGFyZSB1cGRhdGVkIGluIHN0eWxlc2hlZXRcbiAgICB1cGRhdGVTdHlsZXMoKSB7XG4gICAgICAgIGlmICghdGhpcy5pbml0aWFsaXplZCAmJiAhdGhpcy5pbml0aWFsaXppbmcpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignU2NlbmUudXBkYXRlU3R5bGVzKCkgY2FsbGVkIGJlZm9yZSBzY2V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gfHwge30pO1xuICAgICAgICB0aGlzLmFjdGl2ZV9zdHlsZXMgPSB7fTtcbiAgICAgICAgdmFyIGFuaW1hdGVkID0gZmFsc2U7IC8vIGlzIGFueSBhY3RpdmUgc3R5bGUgYW5pbWF0ZWQ/XG4gICAgICAgIGZvciAodmFyIHJ1bGUgb2YgVXRpbHMucmVjdXJzZVZhbHVlcyh0aGlzLmNvbmZpZy5sYXllcnMpKSB7XG4gICAgICAgICAgICBpZiAocnVsZSAmJiBydWxlLmRyYXcpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBbbmFtZSwgZ3JvdXBdIG9mIFV0aWxzLmVudHJpZXMocnVsZS5kcmF3KSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiB3YXJuIG9uIG5vbi1vYmplY3QgZHJhdyBncm91cFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ3JvdXAgIT0gbnVsbCAmJiB0eXBlb2YgZ3JvdXAgPT09ICdvYmplY3QnICYmIGdyb3VwLnZpc2libGUgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGVfbmFtZSA9IGdyb3VwLnN0eWxlIHx8IG5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGVzID0gW3N0eWxlX25hbWVdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvcHRpb25hbCBhZGRpdGlvbmFsIG91dGxpbmUgc3R5bGVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChncm91cC5vdXRsaW5lICYmIGdyb3VwLm91dGxpbmUuc3R5bGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZXMucHVzaChncm91cC5vdXRsaW5lLnN0eWxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVzID0gc3R5bGVzLmZpbHRlcih4ID0+IHRoaXMuc3R5bGVzW3hdKS5mb3JFYWNoKHN0eWxlX25hbWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdHlsZSA9IHRoaXMuc3R5bGVzW3N0eWxlX25hbWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHlsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFjdGl2ZV9zdHlsZXNbc3R5bGVfbmFtZV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3R5bGUuYW5pbWF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gVXNlIGV4cGxpY2l0bHkgc2V0IHNjZW5lIGFuaW1hdGlvbiBmbGFnIGlmIGRlZmluZWQsIG90aGVyd2lzZSB0dXJuIG9uIGFuaW1hdGlvblxuICAgICAgICAvLyBpZiB0aGVyZSBhcmUgYW55IGFuaW1hdGVkIHN0eWxlc1xuICAgICAgICB0aGlzLmFuaW1hdGVkID0gdGhpcy5jb25maWcuc2NlbmUuYW5pbWF0ZWQgIT09IHVuZGVmaW5lZCA/IHRoaXMuY29uZmlnLnNjZW5lLmFuaW1hdGVkIDogYW5pbWF0ZWQ7XG5cbiAgICAgICAgLy8gQ29tcGlsZSBuZXdseSBhY3RpdmUgc3R5bGVzXG4gICAgICAgIHJldHVybiBPYmplY3Qua2V5cyh0aGlzLmFjdGl2ZV9zdHlsZXMpLmZpbHRlcihzID0+IHByZXZfc3R5bGVzLmluZGV4T2YocykgPT09IC0xKTtcbiAgICB9XG5cbiAg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mFtZSBpbiB0aGlzLmNvbmZpZy5jYW1lcmFzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29uZmlnLmNhbWVyYXNbbmFtZV0uYWN0aXZlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuYW1lO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHNldCBfYWN0aXZlX2NhbWVyYShuYW1lKSB7XG4gICAgICAgIHZhciBwcmV2ID0gdGhpcy5fYWN0aXZlX2NhbWVyYTtcblxuICAgICAgICAvLyBTZXQgbmV3IGFjdGl2ZSBjYW1lcmFcbiAgICAgICAgaWYgKHRoaXMuY29uZmlnLmNhbWVyYXNbbmFtZV0pIHtcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLmNhbWVyYXNbbmFtZV0uYWN0aXZlID0gdHJ1ZTtcblxuICAgICAgICAgICAgLy8gQ2xlYXIgcHJldmlvdXNseSBhY3RpdmUgY2FtZXJhXG4gICAgICAgICAgICBpZiAocHJldiAmJiBwcmV2ICE9PSBuYW1lICYmIHRoaXMuY29uZmlnLmNhbWVyYXNbcHJldl0pIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5jb25maWcuY2FtZXJhc1twcmV2XS5hY3RpdmU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBDcmVhdGUgbGlnaHRpbmdcbiAgICBjcmVhdGVMaWdodHMoKSB7XG4gICAgICAgIHRoaXMubGlnaHRzID0ge307XG4gICAgICAgIGZvciAobGV0IGkgaW4gdGhpcy5jb25maWcubGlnaHRzKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY29uZmlnLmxpZ2h0c1tpXSB8fCB0eXBlb2YgdGhpcy5jb25maWcubGlnaHRzW2ldICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgIC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biAgICAgICAgICAgICAgICBsZXQgdGltZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBsZXQgY3ljbGUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBzdGFydCA9ICtuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICBzY2VuZS5yZWJ1aWxkKG9wdGlvbnMpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltZXMucHVzaCgrbmV3IERhdGUoKSAtIHN0YXJ0KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRpbWVzLmxlbmd0aCA8IG51bSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN5Y2xlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXZnID0gfn4odGltZXMucmVkdWNlKChhLCBiKSA9PiBhICsgYikgLyB0aW1lcy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZy5pbmZvKGBQcm9maWxlZCByZWJ1aWxkICR7bnVtfSB0aW1lczogJHthdmd9IGF2ZyAoJHtNYXRoLm1pbiguLi50aW1lcyl9IG1pbiwgJHtNYXRoLm1heCguLi50aW1lcyl9IG1heClgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBjeWNsZSgpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgLy8gUmV0dXJuIGdlb21ldHJ5IGNvdW50cyBvZiB2aXNpYmxlIHRpbGVzLCBncm91cGVkIGJ5IHN0eWxlIG5hbWVcbiAgICAgICAgICAgIGdlb21ldHJ5Q291bnRCeVN0eWxlICgpIHtcbiAgICAgICAgICAgICAgICBsZXQgY291bnRzID0ge307XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgdGlsZSBvZiBzY2VuZS50aWxlX21hbmFnZXIuZ2V0UmVuZGVyYWJsZVRpbGVzKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gdGlsZS5tZXNoZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50c1tzdHlsZV0gPSBjb3VudHNbc3R5bGVdIHx8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbc3R5bGVdICs9IHRpbGUubWVzaGVzW3N0eWxlXS5nZW9tZXRyeV9jb3VudDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgZ2VvbWV0cnlDb3VudEJ5QmFzZVN0eWxlICgpIHtcbiAgICAgICAgICAgICAgICBsZXQgc3R5bGVfY291bnRzID0gc2NlbmUuZGVidWcuZ2VvbWV0cnlDb3VudEJ5U3R5bGUoKTtcbiAgICAgICAgICAgICAgICBsZXQgY291bnRzID0ge307XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gc3R5bGVfY291bnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBiYXNlID0gc2NlbmUuc3R5bGVzW3N0eWxlXS5idWlsdF9pbiA/IHN0eWxlIDogc2NlbmUuc3R5bGVzW3N0eWxlXS5iYXNlO1xuICAgICAgICAgICAgICAgICAgICBjb3VudHNbYmFzZV0gPSBjb3VudHNbYmFzZV0gfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY291bnRzW2Jhc2VdICs9IHN0eWxlX2NvdW50c1tzdHlsZV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudHM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuXG59XG5cbi8vIFN0YXRpYyBtZXRob2R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c2NlbmUgc2hvdWxkIHN0aWxsIHJlZmVyIHRvIG9yaWdpbmFsIHJlc291cmNlIFVSTHMpXG4gICAgbG9hZFNjZW5lUmVjdXJzaXZlKHVybCwgcGF0aCA9IG51bGwpIHtcbiAgICAgICAgaWYgKCF1cmwpIHtcbiAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoe30pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGVvZiB1cmwgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBwYXRoID0gcGF0aCB8fCBVdGlscy5wYXRoRm9yVVJMKHVybCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gVXRpbHMubG9hZFJlc291cmNlKHVybCkudGhlbihjb25maWcgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIFN0eWxlTWFuYWdlci5sb2FkUmVtb3RlU3R5bGVzKGNvbmZpZy5zdHlsZXMsIHBhdGgpLlxuICAgICAgICAgICAgICAgIHRoZW4oc3R5bGVzID0+IFN0eWxlTWFuYWdlci5sb2FkU2hhZGVyQmxvY2tzKHN0eWxlcywgcGF0aCkpLiAvLyBUT0RPOiBkZXByZWNhdGUgcmVtb3RlIHNoYWRlciBibG9ja3M/XG4gICAgICAgICAgICAgICAgdGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGFjY2VwdCBzaW5nbGUtc3RyaW5nIG9yIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmICh0eXBlb2YgY29uZmlnLmluY2x1ZGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vICAgICBjb25maWcuaW5jbHVkZSA9IFtjb25maWcuaW5jbHVkZV07XG4gICAgICAgICAgICAgICAgICAgIC8vIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBpZiAoIUFycmF5LmlzQXJyYXkoY29uZmlnLmluY2x1ZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBTY2VuZUxvYWRlci5ub3JtYWxpemUoY29uZmlnLCBwYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWc7XG4gICAgICAgICAgICAgICAgICAgIC8vIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBDb2xsZWN0IFVSTHMgb2Ygc2NlbmVzIHRvIGluY2x1ZGVcbiAgICAgICAgICAgICAgICAgICAgLy8gbGV0IGluY2x1ZGVzID0gW107XG4gICAgICAgICAgICAgICAgICAgIC8vIGZvciAobGV0IHVybCBvZiBjb25maWcuaW5jbHVkZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyAgICAgaW5jbHVkZXMucHVzaChVdGlscy5hZGRCYXNlVVJMKHVybCwgcGF0aCkpO1xuICAgICAgICAgICAgICAgICAgICAvLyB9XG4gICAgICAgICAgICAgICAgICAgIC8vIGRlbGV0ZSBjb25maWcuaW5jbHVkZTsgLy8gZG9uJ3Qgd2FudCB0byBtZXJnZSB0aGlzIHByb3BlcnR5XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIFByb21pc2UuXG4gICAgICAgICAgICAgICAgICAgIC8vICAgICBhbGwoaW5jbHVkZXMubWFwKHVybCA9PiBTY2VuZUxvYWRlci5sb2FkU2NlbmVSZWN1cnNpdmUodXJsKSkpLlxuICAgICAgICAgICAgICAgICAgICAvLyAgICAgdGhlbihjb25maWdzID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICBjb25maWcgPSBtZXJnZU9iamVjdHMoe30sIC4uLmNvbmZpZ3MsIGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgU2NlbmVMb2FkZXIubm9ybWFsaXplKGNvbmZpZywgcGF0aCk7XG4gICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgcmV0dXJuIGNvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgLy8gICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB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zKGNvbmZpZy5zdHlsZXMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN0eWxlLnRleHR1cmUpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRleCA9IHN0eWxlLnRleHR1cmU7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gVGV4dHVyZSBieSBVUkwsIGV4cGFuZCByZWxhdGl2ZSB0byBzY2VuZSBmaWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGV4ID09PSAnc3RyaW5nJyAmJiAhY29uZmlnLnRleHR1cmVzW3RleF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlX25hbWUgPSAnX18nICsgc3R5bGVfbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy50ZXh0dXJlc1t0ZXh0dXJlX25hbWVdID0geyB1cmw6IHRleCB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUudGV4dHVyZSA9IHRleHR1cmVfbmFtZTsgLy8gcG9pbnQgc3R5bGUgdG8gbG9jYXRpb24gb2YgdGV4dHVyZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFRleHR1cmUgYnkgb2JqZWN0LCBtb3ZlIGl0IHRvIHRoZSBnbG9iYWwgc2NlbmUgdGV4dHVyZSBzZXQgYW5kIGdpdmUgaXQgYSBkZWZhdWx0IG5hbWVcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHRleCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlX25hbWUgPSAnX18nICsgc3R5bGVfbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy50ZXh0dXJlc1t0ZXh0dXJlX25hbWVdID0gdGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUudGV4dHVyZSA9IHRleHR1cmVfbmFtZTsgLy8gcG9pbnQgc3R5bGUgdG8gbG9jYXRpb24gb2YgdGV4dHVyZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gSWYgc3R5bGUgaGFzIHRleHR1cmUgdW5pZm9ybXMsIGV4cGFuZCB0ZXh0dXJlIFVSTHMgcmVsYXRpdmUgdG8gc2NlbmUgZmlsZVxuICAgICAgICAgICAgICAgIGlmIChzdHlsZS5zaGFkZXJzICYmIHN0eWxlLnNoYWRlcnMudW5pZm9ybXMpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQge3R5cGUsIHZhbHVlLCBrZXksIHVuaWZvcm1zfSBvZiBHTFNMLnBhcnNlVW5pZm9ybXMoc3R5bGUuc2hhZGVycy51bmlmb3JtcykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSAnc2FtcGxlcjJEJyAmJiB0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmICFjb25maWcudGV4dHVyZXNbdmFsdWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHR1cmVfbmFtZSA9ICdfXycgKyBzdHlsZV9uYW1lICsgJ191bmlmb3JtXycgKyBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLnRleHR1cmVzW3RleHR1cmVfbmFtZV0gPSB7IHVybDogdmFsdWUgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlmb3Jtc1trZXldID0gdGV4dHVyZV9uYW1lOyAvLyBwb2ludCBzdHlsZSB0byBsb2NhdGlvbiBvZiB0ZXh0dXJlXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIElmIHN0eWxlIGhhcyBtYXRlcmlhbCwgZXhwYW5kIHRleHR1cmUgVVJMcyByZWxhdGl2ZSB0byBzY2VuZSBmaWxlXG4gICAgICAgICAgICAgICAgaWYgKHN0eWxlLm1hdGVyaWFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IHByb3Agb2YgWydlbWlzc2lvbicsICdhbWJpZW50JywgJ2RpZmZ1c2UnLCAnc3BlY3VsYXInLCAnbm9ybWFsJ10pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1hdGVyaWFsIHByb3BlcnR5IGhhcyBhIHRleHR1cmVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHlsZS5tYXRlcmlhbFtwcm9wXSAhPSBudWxsICYmIHN0eWxlLm1hdGVyaWFsW3Byb3BdLnRleHR1cmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4ID0gc3R5bGUubWF0ZXJpYWxbcHJvcF0udGV4dHVyZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRleHR1cmUgYnkgVVJMLCBleHBhbmQgcmVsYXRpdmUgdG8gc2NlbmUgZmlsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGV4ID09PSAnc3RyaW5nJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhY29uZmlnLnRleHR1cmVzW3RleF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHR1cmVfbmFtZSA9ICdfXycgKyBzdHlsZV9uYW1lICsgJ19tYXRlcmlhbF8nICsgcHJvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLnRleHR1cmVzW3RleHR1cmVfbmFtZV0gPSB7IHVybDogdGV4IH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLm1hdGVyaWFsW3Byb3BdLnRleHR1cmUgPSB0ZXh0dXJlX25hbWU7IC8vIHBvaW50IHN0eWxlIHRvIGxvY2F0aW9uIG9mIHRleHR1cmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGV4dHVyZSBieSBvYmplY3QsIG1vdmUgaXQgdG8gdGhlIGdsb2JhbCBzY2VuZSB0ZXh0dXJlIHNldCBhbmQgZ2l2ZSBpdCBhIGRlZmF1bHQgbmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiB0ZXggPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlX25hbWUgPSAnX18nICsgc3R5bGVfbmFtZSArICdfbWF0ZXJpYWxfJyArIHByb3A7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy50ZXh0dXJlc1t0ZXh0dXJlX25hbWVdID0gdGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5tYXRlcmlhbFtwcm9wXS50ZXh0dXJlID0gdGV4dHVyZV9uYW1lOyAvLyBwb2ludCBzdHlsZSB0byBsb2NhdGlvbiBvZiB0ZXh0dXJlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gQWRkIHBhdGggdG8gdGV4dHVyZXNcbiAgICAgICAgaWYgKGNvbmZpZy50ZXh0dXJlcykge1xuICAgICAgICAgICAgZm9yIChsZXQgdGV4dHVyZSBvZiBVdGlscy52YWx1ZXMoY29uZmlnLnRleHR1cmVzKSkge1xuICAgICAgICAgICAgICAgIGlmICh0ZXh0dXJlLnVybCkge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlLnVybCA9IFV0aWxzLmFkZEJhc2VVUkwodGV4dHVyZS51cmwsIHBhdGgpO1xuICAgICAgICAgICAgICAgIH1cbi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ICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgc291cmNlID0gRGF0YVNvdXJjZS5jcmVhdGUoT2JqZWN0LmFzc2lnbih7fSwgY29uZmlnLnNvdXJjZXNbbmFtZV0sIHtuYW1lfSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2goZSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXNvdXJjZSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc291cmNlLnRpbGVkKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5zb3VyY2VzLnRpbGVzW25hbWVdID0gc291cmNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gRGlzdHJpYnV0ZSBvYmplY3Qgc291cmNlcyBhY3Jvc3Mgd29ya2Vyc1xuICAgICAgICAgICAgICAgIGlmIChzb3VyY2UuaWQgJSBzZWxmLm51bV93b3JrZXJzID09PSBzZWxmLl93b3JrZXJfaWQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTG9hZCBzb3VyY2UgaWYgbm90IGNhY2hlZFxuICAgICAgICAgICAgICAgICAgICBzZWxmLnNvdXJjZXMub2JqZWN0c1tuYW1lXSA9IHNvdXJjZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzZWxmLm9iamVjdHNbc291cmNlLm5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm9iamVjdHNbc291cmNlLm5hbWVdID0ge307XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2UubG9hZChzZWxmLm9iamVjdHNbc291cmNlLm5hbWVdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAg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hdGUgY29uZmlnIChzdHlsZXMsIGV0Yy4pLCB0aGVuIGJ1aWxkIHRpbGVcbiAgICAgICAgcmV0dXJuIHNlbGYuYXdhaXRDb25maWd1cmF0aW9uKCkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAvLyBGaXJzdCB0aW1lIGJ1aWxkaW5nIHRoZSB0aWxlXG4gICAgICAgICAgICBpZiAodGlsZS5sb2FkZWQgIT09IHRydWUpIHtcblxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG5cbiAgICAgICAgICAgICAgICAgICAgdGlsZS5sb2FkaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgdGlsZS5sb2FkZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgdGlsZS5lcnJvciA9IG51bGw7XG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2FkVGlsZVNvdXJjZURhdGEodGlsZSkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBXYXJuIGFuZCBjb250aW51ZSBvbiBkYXRhIHNvdXJjZSBlcnJvclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRpbGUuc291cmNlX2RhdGEuZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBVdGlscy5sb2coJ3dhcm4nLCBgdGlsZSBsb2FkIGVycm9yKHMpIGZvciAke3RpbGUua2V5fTogJHt0aWxlLnNvdXJjZV9kYXRhLmVycm9yfWApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aWxlLmxvYWRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbGUubG9hZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFRpbGUuYnVpbGRHZW9tZXRyeSh0aWxlLCBzZWxmLmxheWVycywgc2VsZi5ydWxlcywgc2VsZi5zdHlsZXMpLnRoZW4oa2V5cyA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHRpbGU6IFRpbGUuc2xpY2UodGlsZSwga2V5cykgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWxlLmxvYWRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbGUubG9hZGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWxlLmVycm9yID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFV0aWxzLmxvZygnZXJyb3InLCBgdGlsZSBsb2FkIGVycm9yIGZvciAke3RpbGUua2V5fTogJHt0aWxlLmVycm9yfSBhdDogJHtlcnJvci5zdGFja31gKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHRpbGU6IFRpbGUuc2xpY2UodGlsZSkgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVGlsZSBhbHJlYWR5IGxvYWRlZCwganVzdCByZWJ1aWxkXG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBVdGlscy5sb2coJ3RyYWNlJywgYHVzZWQgd29ya2VyIGNhY2hlIGZvciB0aWxlICR7dGlsZS5rZXl9YCk7XG5cbiAgICAgICAgICAgICAgICAvLyBCdWlsZCBnZW9tZXRyeVxuICAgICAgICAgICAgICAgIHJldHVybiBUaWxlLmJ1aWxkR2VvbWV0cnkodGlsZSwgc2VsZi5sYXllcnMsIHNlbGYucnVsZXMsIHNlbGYuc3R5bGVzKS50aGVuKGtleXMgPT4ge1xuICAgICAgICAgICAgICAgICA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V90aW1lcik7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5yZWFkX2RlbGF5X3RpbWVyID0gc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICB2YXIgZ2wgPSB0aGlzLmdsO1xuXG4gICAgICAgICAgICBnbC5iaW5kRnJhbWVidWZmZXIoZ2wuRlJBTUVCVUZGRVIsIHRoaXMuZmJvKTtcblxuICAgICAgICAgICAgZm9yICh2YXIgciBpbiB0aGlzLnJlcXVlc3RzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSB0aGlzLnJlcXVlc3RzW3JdO1xuXG4gICAgICAgICAgICAgICAgLy8gVGhpcyByZXF1ZXN0IHdhcyBhbHJlYWR5IHNlbnQgdG8gdGhlIHdvcmtlciwgd2UncmUganVzdCBhd2FpdGluZyBpdHMgcmVwbHlcbiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdC5zZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFRPRE86IHN1cHBvcnQgb3RoZXIgc2VsZWN0aW9uIHR5cGVzLCBzdWNoIGFzIGZlYXR1cmVzIHdpdGhpbiBhIGJveFxuICAgICAgICAgICAgICAgIGlmIChyZXF1ZXN0LnR5cGUgIT09ICdwb2ludCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgc2VsZWN0aW9uIG1hcCBhZ2FpbnN0IEZCT1xuICAgICAgICAgICAgICAgIGdsLnJlYWRQaXhlbHMoXG4gICAgICAgICAgICAgICAgICAgIE1hdGguZmxvb3IocmVxdWVzdC5wb2ludC54ICogdGhpcy5mYm9fc2l6ZS53aWR0aCksXG4gICAgICAgICAgICAgICAgICAgIE1hdGguZmxvb3IoKDEgLSByZXF1ZXN0LnBvaW50LnkpICogdGhpcy5mYm9fc2l6ZS5oZWlnaHQpLFxuICAgICAgICAgICAgICAgICAgICAxLCAxLCBnbC5SR0JBLCBnbC5VTlNJR05FRF9CWVRFLCB0aGlzLnBpeGVsKTtcbiAgICAgICAgICAgICAgICB2YXIgZmVhdHVyZV9rZXkgPSAodGhpcy5waXhlbFswXSArICh0aGlzLnBpeGVsWzFdIDw8IDgpICsgKHRoaXMucGl4ZWxbMl0gPDwgMTYpICsgKHRoaXMucGl4ZWxbM10gPDwgMjQpKSA+Pj4gMDtcblxuICAgICAgICAgICAgICAgIC8vIElmIGZlYXR1cmUgZm91bmQsIGFzayBhcHByb3ByaWF0ZSB3ZWIgd29ya2VyIHRvIGxvb2t1cCBmZWF0dXJlXG4gICAgICAgICAgICAgICAgdmFyIHdvcmtlcl9pZCA9IHRoaXMucGl4ZWxbM107XG4gICAgICAgICAgICAgICAgaWYgKHdvcmtlcl9pZCAhPT0gMjU1KSB7IC8vIDI1NSBpbmRpY2F0ZXMgYW4gZW1wdHkgc2VsZWN0aW9uIGJ1ZmZlciBwaXhlbFxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy53b3JrZXJzW3dvcmtlcl9pZF0gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgV29ya2VyQnJva2VyLnBvc3RNZXNzYWdlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMud29ya2Vyc1t3b3JrZXJfaWRdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzZWxmLmdldEZlYXR1cmVTZWxlY3Rpb24nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgaWQ6IHJlcXVlc3QuaWQsIGtleTogZmVhdHVyZV9rZXkgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKG1lc3NhZ2UgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZmluaXNoUmVhZChtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAg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aWxlc1t0aWxlLmtleV0ucHVzaChrZXkpO1xuXG4gICAgICAgIHJldHVybiB0aGlzLm1hcFtrZXldO1xuICAgIH1cblxuICAgIHN0YXRpYyBtYWtlQ29sb3IoZmVhdHVyZSwgdGlsZSkge1xuICAgICAgICB2YXIgc2VsZWN0b3IgPSB0aGlzLm1ha2VFbnRyeSh0aWxlKTtcbiAgICAgICAgc2VsZWN0b3IuZmVhdHVyZSA9IHtcbiAgICAgICAgICAgIGlkOiBmZWF0dXJlLmlkLFxuICAgICAgICAgICAgcHJvcGVydGllczogZmVhdHVyZS5wcm9wZXJ0aWVzLFxuICAgICAgICAgICAgdGlsZTogdGlsZS5rZXlcbiAgICAgICAgfTtcblxuICAgICAgICByZXR1cm4gc2VsZWN0b3IuY29sb3I7XG4gICAgfVxuXG4gICAgc3RhdGljIHJlc2V0KCkge1xuICAgICAgICB0aGlzLnRpbGVzID0ge307XG4gICAgICAgIHRoaXMubWFwID0ge307XG4gICAgICAgIHRoaXMubWFwX3NpemUgPSAwO1xuICAgICAgICB0aGlzLm1hcF9lbnRyeSA9IDA7XG4gICAgfVxuXG4gICAgc3RhdGljIGNsZWFyVGlsZShrZXkpIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy50aWxlc1trZXldKSkge1xuICAgICAgICAgICAgdGhpcy50aWxlc1trZXldLmZvckVhY2goayA9PiBkZWxldGUgdGhpcy5tYXBba10pO1xuICAgICAgICAgICAgdGhpcy5tYXBfc2l6ZSAtPSB0aGlzLnRpbGVzW2tleV0ubGVuZ3RoO1xuICAgICAgICAgICAgZGVsZXRlIHRoaXMudGlsZXNba2V5XTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHN0YXRpYyBnZXRNYXBTaXplKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5tYXBfc2l6ZTtcbiAgICB9XG5cbiAgICBzdGF0aWMgc2V0UHJlZml4KHByZWZpeCkge1xuICAgICAgICB0aGlzLm1hcF9wcmVmaXggPSB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XJlLmdlb21ldHJ5LCBjb29yZCA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBbeCwgeV0gPSBHZW8ubGF0TG5nVG9NZXRlcnMoY29vcmQpO1xuICAgICAgICAgICAgICAgICAgICBjb29yZFswXSA9IHg7XG4gICAgICAgICAgICAgICAgICAgIGNvb3JkWzFdID0geTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzb3VyY2UuZGVidWcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgc291cmNlLmRlYnVnLnByb2plY3Rpb24gPSArbmV3IERhdGUoKSAtIHRpbWVyO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgIFJlLXNjYWxlIGdlb21ldHJpZXMgd2l0aGluIGVhY2ggc291cmNlIHRvIGludGVybmFsIHRpbGUgdW5pdHNcbiAgICAqL1xuICAgIHN0YXRpYyBzY2FsZURhdGEgKHNvdXJjZSwge2Nvb3Jkczoge3p9LCBtaW4sIG1heH0pIHtcbiAgICAgICAgbGV0IHVuaXRzX3Blcl9tZXRlciA9IEdlby51bml0c1Blck1ldGVyKHopO1xuICAgICAgICBmb3IgKHZhciB0IGluIHNvdXJjZS5sYXllcnMpIHtcbiAgICAgICAgICAgIHZhciBudW1fZmVhdHVyZXMgPSBzb3VyY2UubGF5ZXJzW3RdLmZlYXR1cmVzLmxlbmd0aDtcbiAgICAgICAgICAgIGZvciAodmFyIGY9MDsgZiA8IG51bV9mZWF0dXJlczsgZisrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZlYXR1cmUgPSBzb3VyY2UubGF5ZXJzW3RdLmZlYXR1cmVzW2ZdO1xuICAgICAgICAgICAgICAgIEdlby50cmFuc2Zvcm1HZW9tZXRyeShmZWF0dXJlLmdlb21ldHJ5LCBjb29yZCA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvb3JkWzBdID0gKGNvb3JkWzBdIC0gbWluLngpICogdW5pdHNfcGVyX21ldGVyO1xuICAgICAgICAgICAgICAgICAgICBjb29yZFsxXSA9IChjb29yZFsxXSAtIG1pbi55KSAqIHVuaXRzX3Blcl9tZXRlciAqIC0xOyAvLyBmbGlwIGNvb3JkcyBwb3NpdGl2ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgbG9hZChkZXN0KSB7XG4gICAgICAgIGRlc3Quc291cmNlX2RhdGEgPSB7fTtcbiAgICAgICAgZGVzdC5zb3VyY2VfZGF0YS5sYXllcnMgPSB7fTtcbiAgICAgICAgZGVzdC5wYWRfc2NhbGUgPSB0aGlzLnBhZF9zY2FsZTtcblxuICAgICAgICByZXR1cm4gdGhpcy5fbG9hZChkZXN0KS50aGVuKChkZXN0KSA9PiB7XG4gICAgICAgICAgICAvLyBQb3N0LXByb2Nlc3NpbmdcbiAgICAgICAgICAgIGZvciAobGV0IGxheWVyIGluIGRlc3Quc291cmNlX2RhdGEubGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBkZXN0LnNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl07XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5mZWF0dXJlcykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmZlYXR1cmVzLmZvckVhY2goZmVhdHVyZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBHZW8udHJhbnNmb3JtR2VvbWV0cnkoZmVhdHVyZS5nZW9tZXRyeSwgY29vcmQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZsaXAgWSBjb29yZHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZFsxXSA9IC1jb29yZFsxXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNsaWdodGx5IHNjYWxlIHVwIHRpbGUgdG8gY292ZXIgc2VhbXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wYWRfc2NhbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29vcmRbMF0gPSBNYXRoLnJvdW5kKGNvb3JkWzBdICogKDEgKyB0aGlzLnBhZF9zY2FsZSkgLSAoR2VvLnRpbGVfc2NhbGUgKiB0aGlzLnBhZF9zY2FsZS8yKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkWzFdID0gTWF0aC5yb3VuZChjb29yZFsxXSAqICgxICsgdGhpcy5wYWRfc2NhbGUpIC0gKEdlby50aWxlX3NjYWxlICogdGhpcy5wYWRfc2NhbGUvMikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPcHRpb25hbGx5IGVuZm9yY2Ugd2luZGluZyBvcmRlciBzaW5jZSBub3QgYWxsIGRhdGEgc291cmNlcyBndWFyYW50ZWUgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmVuZm9yY2Vfd2luZGluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdlby5lbmZvcmNlV2luZGluZyhmZWF0dXJlLmdlb21ldHJ5LCAnQ0NXJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLy8gU3ViLWNsYXNzZXMgbXVzdCBpbXBsZW1lbnRcbiAgICBfbG9hZChkZXN0KSB7XG4gICAgICAgIHRocm93IG5ldyBNZXRob2ROb3RJbXBsZW1lbnRlZCgnX2xvYWQnKTtcbiAgICB9XG5cbiAgICAvLyBSZWdpc3RlciBhIG5ldyBkYXRhIHNvdXJjZSB0eXBlLCB1bmRlciBhIHR5cGUgbm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XRpbGVkIHNvdXJjZXNcbiAgICAgICAgdGhpcy5lbmZvcmNlX3dpbmRpbmcgPSAoc291cmNlLmVuZm9yY2Vfd2luZGluZyA9PT0gZmFsc2UpID8gZmFsc2UgOiB0cnVlOyAvLyBkZWZhdWx0IG9uLCBjYW4gYmUgZm9yY2VkIG9mZlxuICAgIH1cblxuICAgIF9sb2FkKGRlc3QpIHtcbiAgICAgICAgaWYgKCF0aGlzLmxvYWRfZGF0YSkge1xuICAgICAgICAgICAgdGhpcy5sb2FkX2RhdGEgPSBzdXBlci5fbG9hZCh7IHNvdXJjZV9kYXRhOiB7IGxheWVyczoge30gfSB9KS50aGVuKGRhdGEgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBsYXllcnMgPSBkYXRhLnNvdXJjZV9kYXRhLmxheWVycztcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBsYXllcl9uYW1lIGluIGxheWVycykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRpbGVfaW5kZXhlc1tsYXllcl9uYW1lXSA9IGdlb2pzb252dChsYXllcnNbbGF5ZXJfbmFtZV0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heFpvb206IHRoaXMubWF4X3pvb20sICAvLyBtYXggem9vbSB0byBwcmVzZXJ2ZSBkZXRhaWwgb25cbiAgICAgICAgICAgICAgICAgICAgICAgIHRvbGVyYW5jZTogMywgLy8gc2ltcGxpZmljYXRpb24gdG9sZXJhbmNlIChoaWdoZXIgbWVhbnMgc2ltcGxlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVudDogR2VvLnRpbGVfc2NhbGUsIC8vIHRpbGUgZXh0ZW50IChib3RoIHdpZHRoIGFuZCBoZWlnaHQpXG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXI6IDAgICAgIC8vIHRpbGUgYnVmZmVyIG9uIGVhY2ggc2lkZVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRhdGE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmxvYWRfZGF0YS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgIGZvciAobGV0IGxheWVyX25hbWUgaW4gdGhpcy50aWxlX2luZGV4ZXMpIHtcbiAgICAgICAgICAgICAgICBkZXN0LnNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl9uYW1lXSA9IHRoaXMuZ2V0VGlsZUZlYXR1cmVzKGRlc3QsIGxheWVyX25hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlc3Q7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGdldFRpbGVGZWF0dXJlcyh0aWxlLCBsYXllcl9uYW1lKSB7XG4gICAgICAgIGxldCBjb29yZHMgPSBHZW8ud3JhcFRpbGUodGlsZS5jb29yZHMsIHsgeDogdHJ1ZSB9KTtcblxuICAgICAgICAvLyByZXF1ZXN0IGEgcGFydGljdWxhciB0aWxlXG4gICAgICAgIGxldCB0ID0gdGhpcy50aWxlX2luZGV4ZXNbbGF5ZXJfbmFtZV0uZ2V0VGlsZShjb29yZHMueiwgY29vcmRzLngsIGNvb3Jkcy55KTtcblxuICAgICAgICAvLyBDb252ZXJ0IGZyb20gTVZULXN0eWxlIEpTT04gc3RydWN0IHRvIEdlb0pTT05cbiAgICAgICAgbGV0IGNvbGxlY3Rpb247XG4gICAgICAgIGlmICh0ICYmIHQuZmVhdHVyZXMpIHtcbiAgICAgICAgICAgIGNvbGxlY3Rpb24gPSB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ0ZlYXR1cmVDb2xsZWN0aW9uJyxcbiAgICAgICAgICAgICAgICBmZWF0dXJlczogW11cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGZvciAobGV0IGZlYXR1cmUgb2YgdC5mZWF0dXJlcykge1xuICAgICAgICAgICAgICAgIC8vIEdlb0pTT04gZmVhdHVyZVxuICAgICAgICAgICAgICAgIGxldCBmID0ge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsXG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7fSxcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllczogZmVhdHVyZS50YWdzXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnR5cGUgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZi5nZW9tZXRyeS5jb29yZGluYXRlcyA9IGZlYXR1cmUuZ2VvbWV0cnkubWFwKGNvb3JkID0+IFtjb29yZFswXSwgY29vcmRbMV1dKTtcbiAgICAgICAgICAgICAgICAgICAgZi5nZW9tZXRyeS50eXBlID0gJ011bHRpUG9pbnQnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChmZWF0dXJlLnR5cGUgPT09IDIgfHwgZmVhdHVyZS50eXBlID09PSAzKSB7XG4gICAgICAgICAgICAgICAgICAgIGYuZ2VvbWV0cnkuY29vcmRpbmF0ZXMgPSBmZWF0dXJlLmdlb21ldHJ5Lm1hcChyaW5nID0+XG4gICAgICAgICAgICAgICAgICAgICAgICByaW5nLm1hcChjb29yZCA9PiBbY29vcmRbMF0sIGNvb3JkWzFdXSlcbiAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS50eXBlID09PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmLmdlb21ldHJ5LnR5cGUgPSAnTXVsdGlMaW5lU3RyaW5nJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmLmdlb21ldHJ5ID0gTVZUU291cmNlLmRlY29kZU11bHRpUG9seWdvbihmLmdlb21ldHJ5KTsgLy8gdW4tZmxhdHRlbiByaW5nc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb2xsZWN0aW9uLmZlYXR1cmVzLnB1c2goZik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY29sbGVjdGlvbjtcbiAgICB9XG5cbiAgICBmb3JtYXRVcmwgKGRlc3QpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudXJsO1xuICAgIH1cblxuICAgIHBhcnNlU291cmNlRGF0YSAodGlsZSwgc291cmNlLCByZXNwb25zZSkge1xuICAgICAgICBzb3VyY2UubGF5ZXJzID0gdGhpcy5nZXRMYXllcnMoSlNPTi5wYXJzZShyZXNwb25zZSkpO1xuICAgIH1cblxuICAgIC8vIERldGVjdCBzaW5nbGUgb3IgbXVsdGlwbGUgbGF5ZXJzIGluIHJldHVybmVkIGRhdGFcbiAgICBnZXRMYXllcnMgKGRhdGEpIHtcbiAgICAgICAgaWYgKGRhdGEudHlwZSA9PT0gJ0ZlYXR1cmUnIHx8IGRhdGEudHlwZSA9PT0gJ0ZlYXR1cmVDb2xsZWN0aW9uJykge1xuICAgICAgICAgICAgcmV0dXJuIHsgX2RlZmF1bHQ6IGRhdGEgfTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBkYXRhO1xuICAgICAgICB9XG4gICAgfVxuXG59XG5cbi8qKlxuIE1hcHplbi9PU00uVVMtc3R5bGUgR2VvSlNPTiB2ZWN0b3IgdGlsZXNcbiBAY2xhc3MgR2VvSlNPTlRpbGVTb3VyY2VcbiovXG5leHBvcnQgY2xhc3MgR2VvSlNPTlRpbGVTb3VyY2UgZXh0ZW5kcyBOZXR3b3JrVG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1xuICAgIC8vIFJldHVybnMgYW4gb2JqZWN0IHdpdGgga2V5cyBmb3IgZWFjaCBsYXllciwgZS5nLiB7IGxheWVyOiBnZW9qc29uIH1cbiAgICB0b0dlb0pTT04gKHRpbGUpIHtcbiAgICAgICAgdmFyIGxheWVycyA9IHt9O1xuICAgICAgICBmb3IgKHZhciBsIGluIHRpbGUubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXIgPSB0aWxlLmxheWVyc1tsXTtcbiAgICAgICAgICAgIHZhciBsYXllcl9nZW9qc29uID0ge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdGZWF0dXJlQ29sbGVjdGlvbicsXG4gICAgICAgICAgICAgICAgZmVhdHVyZXM6IFtdXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBmb3IgKHZhciBmPTA7IGYgPCBsYXllci5sZW5ndGg7IGYrKykge1xuICAgICAgICAgICAgICAgIHZhciBmZWF0dXJlID0gbGF5ZXIuZmVhdHVyZShmKTtcbiAgICAgICAgICAgICAgICB2YXIgZmVhdHVyZV9nZW9qc29uID0ge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsXG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7fSxcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllczogZmVhdHVyZS5wcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHZhciBnZW9tZXRyeSA9IGZlYXR1cmVfZ2VvanNvbi5nZW9tZXRyeTtcbiAgICAgICAgICAgICAgICB2YXIgY29vcmRpbmF0ZXMgPSBmZWF0dXJlLmxvYWRHZW9tZXRyeSgpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHI9MDsgciA8IGNvb3JkaW5hdGVzLmxlbmd0aDsgcisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByaW5nID0gY29vcmRpbmF0ZXNbcl07XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGM9MDsgYyA8IHJpbmcubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJpbmdbY10gPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmluZ1tjXS54LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJpbmdbY10ueVxuICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5jb29yZGluYXRlcyA9IGNvb3JkaW5hdGVzO1xuXG4gICAgICAgICAgICAgICAgaWYgKFZlY3RvclRpbGVGZWF0dXJlLnR5cGVzW2ZlYXR1cmUudHlwZV0gPT09ICdQb2ludCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkudHlwZSA9ICdQb2ludCc7XG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5LmNvb3JkaW5hdGVzID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXNbMF1bMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZlY3RvclRpbGVGZWF0dXJlLnR5cGVzW2ZlYXR1cmUudHlwZV0gPT09ICdMaW5lU3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29vcmRpbmF0ZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeS50eXBlID0gJ0xpbmVTdHJpbmcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkuY29vcmRpbmF0ZXMgPSBnZW9tZXRyeS5jb29yZGluYXRlc1swXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5LnR5cGUgPSAnTXVsdGlMaW5lU3RyaW5nJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChWZWN0b3JUaWxlRmVhdHVyZS50eXBlc1tmZWF0dXJlLnR5cGVdID09PSAnUG9seWdvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkgPSBNVlRTb3VyY2UuZGVjb2RlTXVsdGlQb2x5Z29uKGdlb21ldHJ5KTsgLy8gdW4tZmxhdHRlbiByaW5nc1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxheWVyX2dlb2pzb24uZmVhdHVyZXMucHVzaChmZWF0dXJlX2dlb2pzb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGF5ZXJzW2xdID0gbGF5ZXJfZ2VvanNvbjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbGF5ZXJzO1xuICAgIH1cblxuICAgIC8vIERlY29kZSBtdWx0aXBvbHlnb25zLCB3aGljaCBhcmUgZW5jb2RlZCBhcyBhIHNpbmdsZSBzZXQgb2YgcmluZ3NcbiAgICAvLyBPdXRlciByaW5ncyBhcmUgd291bmQgQ1csIGlubmVyIGFyZSBDQ1dcbiAgICAvLyBBIENXIHJpbmcgaW5kaWNhdGVzIHRoZSBzdGFydCBvZiBhIG5ldyBwb2x5Z29uXG4gICAgc3RhdGljIGRlY29kZU11bHRpUG9seWdvbiAoZ2VvbSkge1xuICAgICAgICBsZXQgcG9seXMgPSBbXTtcbiAgICAgICAgbGV0IHBvbHkgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgcmluZyBvZiBnZW9tLmNvb3JkaW5hdGVzKSB7XG4gICAgICAgICAgICBsZXQgd2luZGluZyA9IEdlby5yaW5nV2luZGluZyhyaW5nKTtcbiAgICAgICAgICAgIGlmICh3aW5kaW5nID09PSAnQ1cnICYmIHBvbHkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHBvbHlzLnB1c2gocG9seSk7XG4gICAgICAg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1xuICAgICAgICAgICAgW21pbl91LCBtYXhfdl0sXG4gICAgICAgICAgICBbbWluX3UsIG1pbl92XSxcbiAgICAgICAgICAgIFttYXhfdSwgbWluX3ZdLFxuXG4gICAgICAgICAgICBbbWF4X3UsIG1pbl92XSxcbiAgICAgICAgICAgIFttYXhfdSwgbWF4X3ZdLFxuICAgICAgICAgICAgW21pbl91LCBtYXhfdl1cbiAgICAgICAgXTtcbiAgICB9XG5cbiAgICB2YXIgbnVtX3BvbHlnb25zID0gcG9seWdvbnMubGVuZ3RoO1xuICAgIGZvciAodmFyIHA9MDsgcCA8IG51bV9wb2x5Z29uczsgcCsrKSB7XG4gICAgICAgIHZhciBwb2x5Z29uID0gcG9seWdvbnNbcF07XG5cbiAgICAgICAgZm9yICh2YXIgcT0wOyBxIDwgcG9seWdvbi5sZW5ndGg7IHErKykge1xuICAgICAgICAgICAgdmFyIGNvbnRvdXIgPSBwb2x5Z29uW3FdO1xuXG4gICAgICAgICAgICBmb3IgKHZhciB3PTA7IHcgPCBjb250b3VyLmxlbmd0aCAtIDE7IHcrKykge1xuICAgICAgICAgICAgICAgIGlmIChyZW1vdmVfdGlsZV9lZGdlcyAmJiBCdWlsZGVycy5pc09uVGlsZUVkZ2UoY29udG91clt3XSwgY29udG91clt3KzFdLCB0aWxlX2VkZ2VfdG9sZXJhbmNlKSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gZG9uJ3QgZXh0cnVkZSB0aWxlIGVkZ2VzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gVHdvIHRyaWFuZ2xlcyBmb3IgdGhlIHF1YWQgZm9ybWVkIGJ5IGVhY2ggdmVydGV4IHBhaXIsIGdvaW5nIGZyb20gYm90dG9tIHRvIHRvcCBoZWlnaHRcbiAgICAgICAgICAgICAgICB2YXIgd2FsbF92ZXJ0aWNlcyA9IFtcbiAgICAgICAgICAgICAgICAgICAgLy8gVHJpYW5nbGVcbiAgICAgICAgICAgICAgICAgICAgW2NvbnRvdXJbdysxXVswXSwgY29udG91clt3KzFdWzFdLCBtYXhfel0sXG4gICAgICAgICAgICAgICAgICAgIFtjb250b3VyW3crMV1bMF0sIGNvbnRvdXJbdysxXVsxXSwgbWluX3pdLFxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3XVswXSwgY29udG91clt3XVsxXSwgbWluX3pdLFxuICAgICAgICAgICAgICAgICAgICAvLyBUcmlhbmdsZVxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3XVswXSwgY29udG91clt3XVsxXSwgbWluX3pdLFxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3XVswXSwgY29udG91clt3XVsxXSwgbWF4X3pdLFxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3KzFdWzBdLCBjb250b3VyW3crMV1bMV0sIG1heF96XVxuICAgICAgICAgICAgICAgIF07XG5cbiAgICAgICAgICAgICAgICAvLyBDYWxjIHRoZSBub3JtYWwgb2YgdGhlIHdhbGwgZnJvbSB1cCB2ZWN0b3IgYW5kIG9uZSBzZWdtZW50IG9mIHRoZSB3YWxsIHRyaWFuZ2xlc1xuICAgICAgICAgICAgICAgIHZhciBub3JtYWwgPSBWZWN0b3IuY3Jvc3MoXG4gICAgICAgICAgICAgICAgICAgIFswLCAwLCAxXSxcbiAgICAgICAgICAgICAgICAgICAgVmVjdG9yLm5vcm1hbGl6ZShbY29udG91clt3KzFdWzBdIC0gY29udG91clt3XVswXSwgY29udG91clt3KzFdWzFdIC0gY29udG91clt3XVsxXSwgMF0pXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB2ZXJ0ZXggdGVtcGxhdGUgd2l0aCBjdXJyZW50IHN1cmZhY2Ugbm9ybWFsXG4gICAgICAgICAgICAgICAgdmVydGV4X3RlbXBsYXRlW25vcm1hbF9pbmRleCArIDBdID0gbm9ybWFsWzBdICogbm9ybWFsX25vcm1hbGl6ZTtcbiAgICAgICAgICAgICAg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yIChsZXQgaSA9IDA7IGkgPCBsaW5lU2l6ZSA7IGkrKykge1xuXG4gICAgICAgICAgICAvLyBUaGVyZSBpcyBhIG5leHQgb25lP1xuICAgICAgICAgICAgaXNOZXh0ID0gaSsxIDwgbGluZVNpemU7XG5cbiAgICAgICAgICAgIGlmIChpc1ByZXYpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGVyZSBpcyBhIHByZXZpb3VzIG9uZSwgY29weSB0aGUgY3VycmVudCAocHJldmlvdXMpIHZhbHVlcyBvbiAqUHJldlxuICAgICAgICAgICAgICAgIGNvb3JkUHJldiA9IGNvb3JkQ3VycjtcbiAgICAgICAgICAgICAgICBub3JtUHJldiA9IFZlY3Rvci5ub3JtYWxpemUoVmVjdG9yLnBlcnAoY29vcmRQcmV2LCBsaW5lW2ldKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGkgPT09IDAgJiYgY2xvc2VkX3BvbHlnb24gPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBpdCdzIHRoZSBmaXJzdCBwb2ludCBhbmQgaXMgYSBjbG9zZWQgcG9seWdvblxuXG4gICAgICAgICAgICAgICAgdmFyIG5lZWRUb0Nsb3NlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpZiAocmVtb3ZlX3RpbGVfZWRnZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYoQnVpbGRlcnMuaXNPblRpbGVFZGdlKGxpbmVbaV0sIGxpbmVbbGluZVNpemUtMl0sIHRpbGVfZWRnZV90b2xlcmFuY2UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZWVkVG9DbG9zZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG5lZWRUb0Nsb3NlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvb3JkUHJldiA9IGxpbmVbbGluZVNpemUtMl07XG4gICAgICAgICAgICAgICAgICAgIG5vcm1QcmV2ID0gVmVjdG9yLm5vcm1hbGl6ZShWZWN0b3IucGVycChjb29yZFByZXYsIGxpbmVbaV0pKTtcbiAgICAgICAgICAgICAgICAgICAgaXNQcmV2ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEFzc2lnbiBjdXJyZW50IGNvb3JkaW5hdGVcbiAgICAgICAgICAgIGNvb3JkQ3VyciA9IGxpbmVbaV07XG5cbiAgICAgICAgICAgIGlmIChpc05leHQpIHtcbiAgICAgICAgICAgICAgICBjb29yZE5leHQgPSBsaW5lW2krMV07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNsb3NlZF9wb2x5Z29uID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgaXQncyB0aGUgbGFzdCBwb2ludCBpbiBhIGNsb3NlZCBwb2x5Z29uXG4gICAgICAgICAgICAgICAgY29vcmROZXh0ID0gbGluZVsxXTtcbiAgICAgICAgICAgICAgICBpc05leHQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaXNOZXh0KSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgaXQncyBub3QgdGhlIGxhc3Qgb25lIGdldCBuZXh0IGNvb3JkaW5hdGVzIGFuZCBjYWxjdWxhdGUgdGhlIHJpZ2h0IG5vcm1hbFxuXG4gICAgICAgICAgICAgICAgbm9ybU5leHQgPSBWZWN0b3Iubm9ybWFsaXplKFZlY3Rvci5wZXJwKGNvb3JkQ3VyciwgY29vcmROZXh0KSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlbW92ZV90aWxlX2VkZ2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChCdWlsZGVycy5pc09uVGlsZUVkZ2UoY29vcmRDdXJyLCBjb29yZE5leHQsIHRpbGVfZWRnZV90b2xlcmFuY2UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBub3JtQ3VyciA9IFZlY3Rvci5ub3JtYWxpemUoVmVjdG9yLnBlcnAoY29vcmRQcmV2LCBjb29yZEN1cnIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1ByZXYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRWZXJ0ZXhQYWlyKGNvb3JkQ3Vyciwgbm9ybUN1cnIsIGkvbGluZVNpemUsIGNvbnN0YW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RhbnRzLm5QYWlycysrO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHZlcnRpY2VzIHRvIGJ1ZmZlciBhY29yZGluZyB0aGVpciBpbmRleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4UGFpcnMoY29uc3RhbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlzUHJldiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vICBDb21wdXRlIGN1cnJlbnQgbm9ybWFsXG4gICAgICAgICAgICBpZiAoaXNQcmV2KSB7XG4gICAgICAgICAgICAgICAgLy8gIElmIHRoZXJlIGlzIGEgUFJFVklPVVMgLi4uXG4gICAgICAgICAgICAgICAgaWYgKGlzTmV4dCkge1xuICAgICAgICAgICAgICAgICAgICAvLyAuLi4gYW5kIGEgTkVYVCBPTkUsIGNvbXB1dGUgcHJldmlvdXMgYW5kIG5leHQgbm9ybWFscyAoc2NhbGVkIGJ5IHRoZSBhbmdsZSB3aXRoIHRoZSBsYXN0IHByZXYpXG4gICAgICAgICAgICAgICAgICAgIG5vcm1DdXJyID0gVmVjdG9yLm5vcm1hbGl6ZShWZWN0b3IuYWRkKG5vcm1QcmV2LCBub3JtTmV4dCkpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2NhbGUgPSAyIC8gKDEgKyBNYXRoLmFicyhWZWN0b3IuZG90KG5vcm1QcmV2LCBub3JtQ3VycikpKTtcbiAgICAgICAgICAgICAgICAgICAgbm9ybUN1cnIgPSBWZWN0b3IubXVsdChub3JtQ3VycixzY2FsZSpzY2FsZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gLi4uIGFuZCB0aGVyZSBpcyBOT1QgYSBORVhUIE9ORSwgY29weSB0aGUgcHJldmlvdXMgbmV4dCBvbmUgKHdoaWNoIGlzIHRoZSBjdXJyZW50IG9uZSlcbiAgICAgICAgICAgICAgICAgICAgbm9ybUN1cnIgPSBWZWN0b3Iubm9ybWFsaXplKFZlY3Rvci5wZXJwKGNvb3JkUHJldiwgY29vcmRDdXJyKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGVyZSBpcyBOTyBQUkVWSU9VUyAuLi5cbiAgICAgICAgICAgICAgICBpZiAoaXNOZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIC4uLiBhbmQgYSBORVhUIE9ORSxcbiAgICAgICAgICAgICAgICAgICAgbm9ybU5leHQgPSBWZWN0b3Iubm9ybWFsaXplKFZlY3Rvci5wZXJwKGNvb3JkQ3VyciwgY29vcmROZXh0KSk7XG4gICAgICAgICAgICAgICAgICAgIG5vcm1DdXJyID0gbm9ybU5leHQ7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gLi4uIGFuZCBOTyBORVhUIE9ORSwgbm90aGluZyB0byBkbyAod2l0aG91dCBwcmV2IG9yIG5leHQgb25lIHRoaXMgaXMganVzdCBhIHBvaW50KVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpc1ByZXYgfHwgaXNOZXh0KSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgaXQncyB0aGUgQkVHSU5OSU5HIG9mIGEgTElORVxuICAgICAgICAgICAgICAgIGlmIChpID09PSAwICYmICFpc1ByZXYgJiYgIWNsb3NlZF9wb2x5Z29uKSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZENhcChjb29yZEN1cnIsIG5vcm1DdXJyLCBjb3JuZXJzT25DYXAsIHRydWUsIGNvbnN0YW50cyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gIE1pdGVyIGxpbWl0OiBpZiBtaXRlciBqb2luIGlzIHRvbyBzaGFycCwgY29udmVydCB0byBiZXZlbCBpbnN0ZWFkXG4gICAgICAgICAgICAgICAgaWYgKHRyaWFuZ2xlc09uSm9pbiA9PT0gMCAmJiBWZWN0b3IubGVuZ3RoU3Eobm9ybUN1cnIpID4gbWl0ZXJfbGVuX3NxKSB7XG4gICAgICAgICAgICAgICAgICAgIHRyaWFuZ2xlc09uSm9pbiA9IHRyaWFuZ2xlc0ZvckpvaW5bJ2JldmVsJ107IC8vIHN3aXRjaCB0byBiZXZlbFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIElmIGl0J3MgYSBKT0lOXG4gICAgICAgICAgICAgICAgaWYgKHRyaWFuZ2xlc09uSm9pbiAhPT0gMCAmJiBpc1ByZXYgJiYgaXNOZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZEpvaW4oW2Nvb3JkUHJldiwgY29vcmRDdXJyLCBjb29yZE5leHRdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtub3JtUHJldixub3JtQ3Vyciwgbm9ybU5leHRdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkvbGluZVNpemUsIHRyaWFuZ2xlc09uSm9pbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdGFudHMp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cy5taW5fdSwgKDEtdl9wY3QpKmNvbnN0YW50cy5taW5fdiArIHZfcGN0KmNvbnN0YW50cy5tYXhfdl0sXG4gICAgICAgICAgICB1QiA9IFtjb25zdGFudHMubWF4X3UsICgxLXZfcGN0KSpjb25zdGFudHMubWluX3YgKyB2X3BjdCpjb25zdGFudHMubWF4X3ZdO1xuICAgIH1cblxuICAgIGlmIChzaWduZWQpIHtcbiAgICAgICAgYWRkVmVydGV4KGNvb3Jkc1sxXSwgbkEsIHVBLCBjb25zdGFudHMpO1xuICAgICAgICBhZGRWZXJ0ZXgoY29vcmRzWzFdLCBuQywgdUMsIGNvbnN0YW50cyk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgbkEgPSBWZWN0b3IubmVnKFRbMF0pO1xuICAgICAgICBuQyA9IFRbMV07XG4gICAgICAgIG5CID0gVmVjdG9yLm5lZyhUWzJdKTtcblxuICAgICAgICBpZiAoY29uc3RhbnRzLnRleGNvb3Jkcykge1xuICAgICAgICAgICAgdUEgPSBbY29uc3RhbnRzLm1pbl91LCAoMS12X3BjdCkqY29uc3RhbnRzLm1pbl92ICsgdl9wY3QqY29uc3RhbnRzLm1heF92XTtcbiAgICAgICAgICAgIHVDID0gW2NvbnN0YW50cy5tYXhfdSwgKDEtdl9wY3QpKmNvbnN0YW50cy5taW5fdiArIHZfcGN0KmNvbnN0YW50cy5tYXhfdl07XG4gICAgICAgICAgICB1QiA9IFtjb25zdGFudHMubWluX3UsICgxLXZfcGN0KSpjb25zdGFudHMubWluX3YgKyB2X3BjdCpjb25zdGFudHMubWF4X3ZdO1xuICAgICAgICB9XG4gICAgICAgIGFkZFZlcnRleChjb29yZHNbMV0sIG5DLCB1QywgY29uc3RhbnRzKTtcbiAgICAgICAgYWRkVmVydGV4KGNvb3Jkc1sxXSwgbkEsIHVBLCBjb25zdGFudHMpO1xuICAgIH1cblxuICAgIGFkZEZhbihjb29yZHNbMV0sIG5BLCBuQywgbkIsIHVBLCB1QywgdUIsIHNpZ25l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zXG4gICAgICAgICAgICB1dkIgPSBbY29uc3RhbnRzLm1heF91LGNvbnN0YW50cy5taW5fdl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEVuZGluZyBhbmdsZSBVVnNcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHV2QSA9IFtjb25zdGFudHMubWluX3UsY29uc3RhbnRzLm1heF92XTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmVnaW5pbmcgYW5nbGUgVVZzXG4gICAgICAgICAgICB1dkMgPSBbY29uc3RhbnRzLm1pbl91Kyhjb25zdGFudHMubWF4X3UtY29uc3RhbnRzLm1pbl91KS8yLCBjb25zdGFudHMubWF4X3ZdOyAgIC8vIENlbnRlciBwb2ludCBVVnNcbiAgICAgICAgICAgIHV2QiA9IFtjb25zdGFudHMubWF4X3UsY29uc3RhbnRzLm1heF92XTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRW5kaW5nIGFuZ2xlIFVWc1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYWRkRmFuKGNvb3JkLFxuICAgICAgICAgICBWZWN0b3IubmVnKG5vcm1hbCksIFswLCAwXSwgbm9ybWFsLFxuICAgICAgICAgICB1dkEsIHV2QywgdXZCLFxuICAgICAgICAgICBpc0JlZ2lubmluZywgbnVtQ29ybmVycyoyLCBjb25zdGFudHMpO1xufVxuXG4vLyBBZGQgYSB2ZXJ0ZXggYmFzZWQgb24gdGhlIGluZGV4IHBvc2l0aW9uIGludG8gdGhlIFZCTyAoaW50ZXJuYWwgbWV0aG9kIGZvciBwb2x5bGluZSBidWlsZGVyKVxuZnVuY3Rpb24gYWRkSW5kZXggKGluZGV4LCB7IHZlcnRleF9kYXRhLCB2ZXJ0ZXhfdGVtcGxhdGUsIGhhbGZXaWR0aCwgdmVydGljZXMsIHNjYWxpbmdfaW5kZXgsIHNjYWxpbmdfbm9ybWFs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1pbl92LCBtYXhfdSwgbWF4X3ZdID0gdGV4Y29vcmRfc2NhbGUgfHwgQnVpbGRlcnMuZGVmYXVsdFVWcztcbiAgICAgICAgdGV4Y29vcmRzID0gW1xuICAgICAgICAgICAgW21pbl91LCBtaW5fdl0sXG4gICAgICAgICAgICBbbWF4X3UsIG1pbl92XSxcbiAgICAgICAgICAgIFttYXhfdSwgbWF4X3ZdLFxuXG4gICAgICAgICAgICBbbWluX3UsIG1pbl92XSxcbiAgICAgICAgICAgIFttYXhfdSwgbWF4X3ZdLFxuICAgICAgICAgICAgW21pbl91LCBtYXhfdl1cbiAgICAgICAgXTtcbiAgICB9XG5cbiAgICBsZXQgbnVtX3BvaW50cyA9IHBvaW50cy5sZW5ndGg7XG4gICAgZm9yIChsZXQgcD0wOyBwIDwgbnVtX3BvaW50czsgcCsrKSB7XG4gICAgICAgIGxldCBwb2ludCA9IHBvaW50c1twXTtcblxuICAgICAgICBmb3IgKGxldCBwb3M9MDsgcG9zIDwgNjsgcG9zKyspIHtcbiAgICAgICAgICAgIC8vIEFkZCB0ZXhjb29yZHNcbiAgICAgICAgICAgIGlmICh0ZXhjb29yZF9pbmRleCkge1xuICAgICAgICAgICAgICAgIHZlcnRleF90ZW1wbGF0ZVt0ZXhjb29yZF9pbmRleCArIDBdID0gdGV4Y29vcmRzW3Bvc11bMF0gKiB0ZXhjb29yZF9ub3JtYWxpemU7XG4gICAgICAgICAgICAgICAgdmVydGV4X3RlbXBsYXRlW3RleGNvb3JkX2luZGV4ICsgMV0gPSB0ZXhjb29yZHNbcG9zXVsxXSAqIHRleGNvb3JkX25vcm1hbGl6ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmVydGV4X3RlbXBsYXRlW3Bvc2l0aW9uX2luZGV4ICsgMF0gPSBwb2ludFswXTtcbiAgICAgICAgICAgIHZlcnRleF90ZW1wbGF0ZVtwb3NpdGlvbl9pbmRleCArIDFdID0gcG9pbnRbMV07XG5cbiAgICAgICAgICAgIH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tpcCBsaW5lcyB0aGF0IGRvbid0IGludGVycG9sYXRlIGJldHdlZW4gemVybyBvciBncmVhdGVyIHdpZHRoXG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS53aWR0aC52YWx1ZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5uZXh0X3dpZHRoLnZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLmNvbG9yID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIE1haW50YWluIGNvbnNpc3RlbnQgb3V0bGluZSB3aWR0aCBhcm91bmQgdGhlIGxpbmUgZmlsbFxuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUud2lkdGgudmFsdWUgPSBvdXRsaW5lX3dpZHRoICsgd2lkdGg7XG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5uZXh0X3dpZHRoLnZhbHVlID0gb3V0bGluZV9uZXh0X3dpZHRoICsgbmV4dF93aWR0aDtcblxuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUuY29sb3IgPSBydWxlX3N0eWxlLm91dGxpbmUuY29sb3I7XG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5jYXAgPSBydWxlX3N0eWxlLm91dGxpbmUuY2FwIHx8IHJ1bGVfc3R5bGUuY2FwO1xuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUuam9pbiA9IHJ1bGVfc3R5bGUub3V0bGluZS5qb2luIHx8IHJ1bGVfc3R5bGUuam9pbjtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm1pdGVyX2xpbWl0ID0gcnVsZV9zdHlsZS5vdXRsaW5lLm1pdGVyX2xpbWl0IHx8IHJ1bGVfc3R5bGUubWl0ZXJfbGltaXQ7XG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5zdHlsZSA9IHJ1bGVfc3R5bGUub3V0bGluZS5zdHlsZSB8fCB0aGlzLm5hbWU7XG5cbiAgICAgICAgICAgICAgICAvLyBFeHBsaWNpdGx5IGRlZmluZWQgb3V0bGluZSBvcmRlciwgb3IgaW5oZXJpdGVkIGZyb20gaW5uZXIgbGluZVxuICAgICAgICAgICAgICAgIGlmIChydWxlX3N0eWxlLm91dGxpbmUub3JkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5vcmRlciA9IHRoaXMucGFyc2VPcmRlcihydWxlX3N0eWxlLm91dGxpbmUub3JkZXIsIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5vcmRlciA9IHN0eWxlLm9yZGVyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIERvbid0IGxldCBvdXRsaW5lIGJlIGFib3ZlIGlubmVyIGxpbmVcbiAgICAgICAgICAgICAgICBpZiAoc3R5bGUub3V0bGluZS5vcmRlciA+IHN0eWxlLm9yZGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUub3JkZXIgPSBzdHlsZS5vcmRlcjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBPdXRsaW5lcyBhcmUgYWx3YXlzIGF0IGhhbGYtbGF5ZXIgaW50ZXJ2YWxzIHRvIGF2b2lkIGNvbmZsaWN0aW5nIHdpdGggaW5uZXIgbGluZXNcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm9yZGVyIC09IDAuNTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHN0eWxlLm91dGxpbmUud2lkdGgudmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgc3R5bGUub3V0bGluZS5uZXh0X3dpZHRoLnZhbHVlID0g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AgICAgICAgICB0ZXhjb29yZF9ub3JtYWxpemU6IDY1NTM1LCAvLyBzY2FsZSBVVnMgdG8gdW5zaWduZWQgc2hvcnRzXG4gICAgICAgICAgICAgICAgY2xvc2VkX3BvbHlnb246IG9wdGlvbnMgJiYgb3B0aW9ucy5jbG9zZWRfcG9seWdvbixcbiAgICAgICAgICAgICAgICByZW1vdmVfdGlsZV9lZGdlczogIXN0eWxlLnRpbGVfZWRnZXMgJiYgb3B0aW9ucyAmJiBvcHRpb25zLnJlbW92ZV90aWxlX2VkZ2VzLFxuICAgICAgICAgICAgICAgIHRpbGVfZWRnZV90b2xlcmFuY2U6IEdlby50aWxlX3NjYWxlICogY29udGV4dC50aWxlLnBhZF9zY2FsZSAqIDRcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICAvLyBPdXRsaW5lXG4gICAgICAgICBpZiAoc3R5bGUub3V0bGluZSAmJiBzdHlsZS5vdXRsaW5lLmNvbG9yICE9IG51bGwgJiYgc3R5bGUub3V0bGluZS53aWR0aC52YWx1ZSAhPSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgb3V0bGluZV9zdHlsZSA9IFN0eWxlTWFuYWdlci5zdHlsZXNbc3R5bGUub3V0bGluZS5zdHlsZV07XG4gICAgICAgICAgICBpZiAob3V0bGluZV9zdHlsZSkge1xuICAgICAgICAgICAgICAgIG91dGxpbmVfc3R5bGUuYWRkRmVhdHVyZShjb250ZXh0LmZlYXR1cmUsIHN0eWxlLm91dGxpbmUsIGNvbnRleHQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIGJ1aWxkUG9seWdvbnMocG9seWdvbnMsIHN0eWxlLCB2ZXJ0ZXhfZGF0YSwgY29udGV4dCkge1xuICAgICAgICAvLyBSZW5kZXIgcG9seWdvbnMgYXMgaW5kaXZpZHVhbCBsaW5lc1xuICAgICAgICBmb3IgKGxldCBwPTA7IHAgPCBwb2x5Z29ucy5sZW5ndGg7IHArK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S5zcHJpdGVzW3Nwcml0ZV0pIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBzcHJpdGUgbm90IGZvdW5kLCBjaGVjayBmb3IgZGVmYXVsdCBzcHJpdGVcbiAgICAgICAgICAgICAgICBpZiAoc3R5bGUuc3ByaXRlX2RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgc3ByaXRlID0gc3R5bGUuc3ByaXRlX2RlZmF1bHQ7XG4gICAgICAgICAgICAgICAgICAgIGlmICghVGV4dHVyZS50ZXh0dXJlc1t0aGlzLnRleHR1cmVdLnNwcml0ZXNbc3ByaXRlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nLndhcm4oYFN0eWxlOiBpbiBzdHlsZSAnJHt0aGlzLm5hbWV9JywgY291bGQgbm90IGZpbmQgZGVmYXVsdCBzcHJpdGUgJyR7c3ByaXRlfScgZm9yIHRleHR1cmUgJyR7dGhpcy50ZXh0dXJlfSdgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLndhcm4oYFN0eWxlOiBpbiBzdHlsZSAnJHt0aGlzLm5hbWV9JywgY291bGQgbm90IGZpbmQgc3ByaXRlICcke3Nwcml0ZX0nIGZvciB0ZXh0dXJlICcke3RoaXMudGV4dHVyZX0nYCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoc3ByaXRlKSB7XG4gICAgICAgICAgICBsb2cud2FybihgU3R5bGU6IGluIHN0eWxlICcke3RoaXMubmFtZX0nLCBzcHJpdGUgJyR7c3ByaXRlfScgd2FzIHNwZWNpZmllZCwgYnV0IHRleHR1cmUgJyR7dGhpcy50ZXh0dXJlfScgaGFzIG5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IGkgPCBmZWF0dXJlX2xhYmVscy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCBsYWJlbCA9IGZlYXR1cmVfbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGJveGVzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBmZWF0dXJlLFxuICAgICAgICAgICAgICAgICAgICBkcmF3OiBxLmRyYXcsXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQ6IHEuY29udGV4dCxcbiAgICAgICAgICAgICAgICAgICAgc3R5bGUsXG4gICAgICAgICAgICAgICAgICAgIGxheW91dDogc3R5bGUsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIFN1Ym1pdCBwb2ludCBsYWJlbHMgZm9yIGNvbGxpc2lvbiwgdGhlbiBidWlsZCBnZW9tZXRyeSBmb3IgcmVtYWluaW5nIG9uZXNcbiAgICAgICAgcmV0dXJuIENvbGxpc2lvbi5jb2xsaWRlKGJveGVzLCB0aGlzLm5hbWUsIHRpbGUpLnRoZW4oYm94ZXMgPT4ge1xuICAgICAgICAgICAgYm94ZXMuZm9yRWFjaChxID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmZlYXR1cmVfc3R5bGUgPSBxLnN0eWxlO1xuICAgICAgICAgICAgICAgIHRoaXMuZmVhdHVyZV9zdHlsZS5sYWJlbCA9IHEubGFiZWw7XG5cbiAgICAgICAgICAgICAgICBTdHlsZS5hZGRGZWF0dXJlLmNhbGwodGhpcywgcS5mZWF0dXJlLCBxLmRyYXcsIHEuY29udGV4dCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgcmV0dXJuIFN0eWxlLmVuZERhdGEuY2FsbCh0aGlzLCB0aWxlKTtcbiAgICAgICAgfSk7XG4gICAgfSxcblxuICAgIF9wcmVwcm9jZXNzIChkcmF3KSB7XG4gICAgIC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vcml0eSAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHByaW9yaXR5ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgcHJpb3JpdHkgPSBwcmlvcml0eShjb250ZXh0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHByaW9yaXR5ID0gLTEgPj4+IDA7IC8vIGRlZmF1bHQgdG8gbWF4IHByaW9yaXR5IHZhbHVlIGlmIG5vbmUgc2V0XG4gICAgICAgIH1cbiAgICAgICAgbGF5b3V0LnByaW9yaXR5ID0gcHJpb3JpdHk7XG5cbiAgICAgICAgcmV0dXJuIGxheW91dDtcbiAgICB9LFxuXG4gICAgLy8gQnVpbGRzIG9uZSBvciBtb3JlIHBvaW50IGxhYmVscyBmb3IgYSBnZW9tZXRyeVxuICAgIGJ1aWxkTGFiZWxzRnJvbUdlb21ldHJ5IChzaXplLCBnZW9tZXRyeSwgb3B0aW9ucykge1xuICAgICAgICBsZXQgbGFiZWxzID0gW107XG5cbiAgICAgICAgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiUG9pbnRcIikge1xuICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsUG9pbnQoZ2VvbWV0cnkuY29vcmRpbmF0ZXMsIHNpemUsIG9wdGlvbnMpKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChnZW9tZXRyeS50eXBlID09PSBcIk11bHRpUG9pbnRcIikge1xuICAgICAgICAgICAgbGV0IHBvaW50cyA9IGdlb21ldHJ5LmNvb3JkaW5hdGVzO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICBsZXQgcG9pbnQgPSBwb2ludHNbaV07XG4gICAgICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsUG9pbnQocG9pbnQsIHNpemUsIG9wdGlvbnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChnZW9tZXRyeS50eXBlID09PSBcIkxpbmVTdHJpbmdcIikge1xuICAgICAgICAgICAgLy8gUG9pbnQgYXQgZWFjaCBsaW5lIHZlcnRleFxuICAgICAgICAgICAgbGV0IHBvaW50cyA9IGdlb21ldHJ5LmNvb3JkaW5hdGVzO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICBsYWJlbHMucHVzaChuZXcgTGFiZWxQb2ludChwb2ludHNbaV0sIHNpemUsIG9wdGlvbnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChnZW9tZXRyeS50eXBlID09PSBcIk11bHRpTGluZVN0cmluZ1wiKSB7XG4gICAgICAgICAgICAvLyBQb2ludCBhdCBlYWNoIGxpbmUgdmVydGV4XG4gICAgICAgICAgICBsZXQgbGluZXMgPSBnZW9tZXRyeS5jb29yZGluYXRlcztcbiAgICAgICAgICAgIGZvciAobGV0IGxuID0gMDsgbG4gPCBsaW5lcy5sZW5ndGg7IGxuKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgcG9pbnRzID0gbGluZXNbbG5dO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcG9pbnRzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVscy5wdXNoKG5ldyBMYWJlbFBvaW50KHBvaW50c1tpXSwgc2l6ZSwgb3B0aW9ucykpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChnZW9tZXRyeS50eXBlID09PSBcIlBvbHlnb25cIikge1xuICAgICAgICAgICAgLy8gUG9pbnQgYXQgcG9seWdvbiBjZW50cm9pZCAob2Ygb3V0ZXIgcmluZylcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmNlbnRyb2lkKSB7XG4gICAgICAgICAgICAgICAgbGV0IGNlbnRyb2lkID0gR2VvLmNlbnRyb2lkKGdlb21ldHJ5LmNvb3JkaW5hdGVzWzBdKTtcbiAgICAgICAgICAgICAgICBsYWJlbHMucHVzaChuZXcgTGFiZWxQb2ludChjZW50cm9pZCwgc2l6ZSwgb3B0aW9ucykpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gUG9pbnQgYXQgZWFjaCBwb2x5Z29uIHZlcnRleCAoYWxsIHJpbmdzKVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IHJpbmdzID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbG4gPSAwOyBsbiA8IHJpbmdzLmxlbmd0aDsgbG4rKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcG9pbnRzID0gcmluZ3NbbG5dO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBvaW50cy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsUG9pbnQocG9pbnRzW2ldLCBzaXplLCBvcHRpb25zKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoZ2VvbWV0cnkudHlwZSA9PT0gXCJNdWx0aVBvbHlnb25cIikge1xuICAgICAgICAgICAgbGV0IGNlbnRyb2lkID0gR2VvLm11bHRpQ2VudHJvaWQoZ2VvbWV0cnkuY29vcmRpbmF0ZXMpO1xuICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsUG9pbnQoY2VudHJvaWQsIHNpemUsIG9wdGlvbnMpKTtcbiAgICAgICAgfVxuXG4gICAgICA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gICAgIHRleGNvb3JkX25vcm1hbGl6ZTogNjU1MzUsIC8vIHNjYWxlIFVWcyB0byB1bnNpZ25lZCBzaG9ydHNcbiAgICAgICAgICAgIHJlbW92ZV90aWxlX2VkZ2VzOiAhc3R5bGUudGlsZV9lZGdlcyxcbiAgICAgICAgICAgIHRpbGVfZWRnZV90b2xlcmFuY2U6IEdlby50aWxlX3NjYWxlICogY29udGV4dC50aWxlLnBhZF9zY2FsZSAqIDRcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBFeHRydWRlZCBwb2x5Z29ucyAoZS5nLiAzRCBidWlsZGluZ3MpXG4gICAgICAgIGlmIChzdHlsZS5leHRydWRlICYmIHN0eWxlLmhlaWdodCkge1xuICAgICAgICAgICAgQnVpbGRlcnMuYnVpbGRFeHRydWRlZFBvbHlnb25zKFxuICAgICAgICAgICAgICAgIHBvbHlnb25zLFxuICAgICAgICAgICAgICAgIHN0eWxlLnosIHN0eWxlLmhlaWdodCwgc3R5bGUubWluX2hlaWdodCxcbiAgICAgICAgICAgICAgICB2ZXJ0ZXhfZGF0YSwgdmVydGV4X3RlbXBsYXRlLFxuICAgICAgICAgICAgICAgIHRoaXMudmVydGV4X2xheW91dC5pbmRleC5hX25vcm1hbCxcbiAgICAgICAgICAgICAgICAxMjcsIC8vIHNjYWxlIG5vcm1hbHMgdG8gc2lnbmVkIGJ5dGVzXG4gICAgICAgICAgICAgICAgb3B0aW9uc1xuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBSZWd1bGFyIHBvbHlnb25zXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgQnVpbGRlcnMuYnVpbGRQb2x5Z29ucyhcbiAgICAgICAgICAgICAgICBwb2x5Z29ucyxcbiAgICAgICAgICAgICAgICB2ZXJ0ZXhfZGF0YSwgdmVydGV4X3RlbXBsYXRlLFxuICAgICAgICAgICAgICAgIG9wdGlvbnNcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5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BlICE9PSAnZnVuY3Rpb24nKSB7IC8vIGRvbid0IGFjY2VsZXJhdGUgZnVuY3Rpb24tYmFzZWQgZmlsdGVyc1xuICAgICAgICAgICAgdGhpcy56b29tcyA9IHt9O1xuXG4gICAgICAgICAgICBpZiAoenR5cGUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgdGhpcy56b29tc1t6b29tXSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHpvb20pKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgej0wOyB6IDwgem9vbS5sZW5ndGg7IHorKykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnpvb21zW3pvb21bel1dID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh6dHlwZSA9PT0gJ29iamVjdCcgJiYgKHpvb20ubWluICE9IG51bGwgfHwgem9vbS5tYXggIT0gbnVsbCkpIHtcbiAgICAgICAgICAgICAgICBsZXQgem1pbiA9IHpvb20ubWluIHx8IDA7XG4gICAgICAgICAgICAgICAgbGV0IHptYXggPSB6b29tLm1heCB8fCAyNTsgLy8gVE9ETzogcmVwbGFjZSBjb25zdGFudCBmb3IgbWF4IHBvc3NpYmxlIHpvb21cbiAgICAgICAgICAgICAgICBmb3IgKGxldCB6PXptaW47IHogPCB6bWF4OyB6KyspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy56b29tc1t6XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkZWxldGUgdGhpcy5maWx0ZXIuJHpvb207IC8vIGRvbid0IHByb2Nlc3Mgem9vbSB0aHJvdWdoIHVzdWFsIGdlbmVyaWMgZmlsdGVyIGxvZ2ljXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB0b0pTT04oKSB7XG4gICAgICAgIHJldHVybiB7X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Vfa2V5ID0gY2FjaGVLZXkocnVsZV9pZHMpO1xuXG4gICAgICAgICAgICAvLyBPbmx5IGV2YWx1YXRlIGVhY2ggcnVsZSBjb21iaW5hdGlvbiBvbmNlICh1bmRlZmluZWQgbWVhbnMgbm90IHlldCBldmFsdWF0ZWQsXG4gICAgICAgICAgICAvLyBudWxsIG1lYW5zIGV2YWx1YXRlZCB3aXRoIG5vIGRyYXcgb2JqZWN0KVxuICAgICAgICAgICAgaWYgKHJ1bGVDYWNoZVtjYWNoZV9rZXldID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAvLyBGaW5kIGFsbCB0aGUgdW5pcXVlIHZpc2libGUgZHJhdyBibG9ja3MgZm9yIHRoaXMgcnVsZSB0cmVlXG4gICAgICAgICAgICAgICAgbGV0IGRyYXdfcnVsZXMgPSBydWxlcy5tYXAoeCA9PiB4ICYmIHgudmlzaWJsZSAhPT0gZmFsc2UgJiYgeC5jYWxjdWxhdGVkRHJhdyk7XG4gICAgICAgICAgICAgICAgbGV0IGRyYXdfa2V5cyA9IHt9O1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcj0wOyByIDwgZHJhd19ydWxlcy5sZW5ndGg7IHIrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZSA9IGRyYXdfcnVsZXNbcl07XG4gICAgICAgICAgICAgICAgICAgIGlmICghcnVsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgZz0wOyBnIDwgcnVsZS5sZW5ndGg7IGcrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGdyb3VwID0gcnVsZVtnXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGtleSBpbiBncm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfa2V5c1trZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIENhbGN1bGF0ZSBlYWNoIGRyYXcgZ3JvdXBcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBkcmF3X2tleSBpbiBkcmF3X2tleXMpIHtcbiAgICAgICAgICAgICAgICAgICAgcnVsZUNhY2hlW2NhY2hlX2tleV0gPSBydWxlQ2FjaGVbY2FjaGVfa2V5XSB8fCB7fTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZUNhY2hlW2NhY2hlX2tleV1bZHJhd19rZXldID0gbWVyZ2VUcmVlcyhkcmF3X3J1bGVzLCBkcmF3X2tleSk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gT25seSBzYXZlIHRoZSBvbmVzIHRoYXQgd2VyZW4ndCBudWxsXG4gICAgICAgICAgICAgICAgICAgIGlmICghcnVsZUNhY2hlW2NhY2hlX2tleV1bZHJhd19rZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZUNhY2hlW2NhY2hlX2tleV1bZHJhd19rZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZUNhY2hlW2NhY2hlX2tleV1bZHJhd19rZXldLmtleSA9IGNhY2hlX2tleSArICcvJyArIGRyYXdfa2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZUNhY2hlW2NhY2hlX2tleV1bZHJhd19rZXldLmxheWVycyA9IHJ1bGVzLm1hcCh4ID0+IHggJiYgeC5mdWxsX25hbWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gTm8gcnVsZXMgZXZhbHVhdGVkXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGVDYWNoZVtjYWNoZV9rZXldICYmIE9i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XB0eSkge1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gbm9uV2hpdGVMaXN0ZWQpIHtcbiAgICAgICAgICAgIGxldCBwcm9wZXJ0eSA9IG5vbldoaXRlTGlzdGVkW2tleV07XG4gICAgICAgICAgICBpZiAodHlwZW9mIHByb3BlcnR5ID09PSAnb2JqZWN0JyAmJiAhQXJyYXkuaXNBcnJheShwcm9wZXJ0eSkpIHtcbiAgICAgICAgICAgICAgICBwYXJzZVJ1bGVUcmVlKGtleSwgcHJvcGVydHksIHIpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBJbnZhbGlkIGxheWVyXG4gICAgICAgICAgICAgICAgbGV0IG1zZyA9IGBMYXllciB2YWx1ZSBtdXN0IGJlIGFuIG9iamVjdDogY2FuJ3QgY3JlYXRlIGxheWVyICcke2tleX06ICR7SlNPTi5zdHJpbmdpZnkocHJvcGVydHkpfSdgO1xuICAgICAgICAgICAgICAgIG1zZyArPSBgLCB1bmRlciBwYXJlbnQgbGF5ZXIgJyR7ci5mdWxsX25hbWV9Jy5gO1xuXG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlIHBhcmVudCBpcyBhIHN0eWxlIG5hbWUsIHRoaXMgbWF5IGJlIGFuIGluY29ycmVjdGx5IG5lc3RlZCBsYXllclxuICAgICAgICAgICAgICAgIGlmIChTdHlsZXNbci5uYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICBtc2cgKz0gYCBUaGUgcGFyZW50ICcke3IubmFtZX0nIGlzIGFsc28gdGhlIG5hbWUgb2YgYSBzdHlsZSwgZGlkIHlvdSBtZWFuIHRvIGNyZWF0ZSBhICdkcmF3JyBncm91cGA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZyArPSBgIHVuZGVyICcke3BhcmVudC5uYW1lfSdgO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIC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5cbiAgICBpZiAocnVsZXMubGVuZ3RoID09PSAwKSB7IHJldHVybjsgfVxuXG4gICAgZm9yIChsZXQgcj0wOyByIDwgcnVsZXMubGVuZ3RoOyByKyspIHtcbiAgICAgICAgbGV0IGN1cnJlbnQgPSBydWxlc1tyXTtcbiAgICAgICAgY29udGV4dC5wcm9wZXJ0aWVzID0gY3VycmVudC5wcm9wZXJ0aWVzO1xuXG4gICAgICAgIGlmIChjdXJyZW50IGluc3RhbmNlb2YgUnVsZUxlYWYpIHtcblxuICAgICAgICAgICAgaWYgKGRvZXNNYXRjaChjdXJyZW50LCBjb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGNvbGxlY3RlZFJ1bGVzLnB1c2goY3VycmVudCk7XG4gICAgICAgICAgICAgICAgY29sbGVjdGVkUnVsZXNJZHMucHVzaChjdXJyZW50LmlkKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnQgaW5zdGFuY2VvZiBSdWxlVHJlZSkge1xuICAgICAgICAgICAgaWYgKGRvZXNNYXRjaChjdXJyZW50LCBjb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgY2hpbGRNYXRjaGVkID0gbWF0Y2hGZWF0dXJlKFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LnJ1bGVzLFxuICAgICAgICAgICAgICAgICAgICBjb2xsZWN0ZWRSdWxlcyxcbiAgICAgICAgICAgICAgICAgICAgY29sbGVjdGVkUnVsZXNJZHNcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFjaGlsZE1hdGNoZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29sbGVjdGVkUnVsZXMucHVzaChjdXJyZW50KTtcbiAgICAgICAgICAgICAgICAg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V4dGVuc2lvbnMgPSAodGhpcy5zaGFkZXJzICYmIHRoaXMuc2hhZGVycy5leHRlbnNpb25zKTtcbiAgICAgICAgaWYgKHR5cGVvZiBleHRlbnNpb25zID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZXh0ZW5zaW9ucyA9IFtleHRlbnNpb25zXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENyZWF0ZSBzaGFkZXJzXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aGlzLnByb2dyYW0gPSBuZXcgU2hhZGVyUHJvZ3JhbShcbiAgICAgICAgICAgICAgICB0aGlzLmdsLFxuICAgICAgICAgICAgICAgIHNoYWRlclNvdXJjZXNbdGhpcy52ZXJ0ZXhfc2hhZGVyX2tleV0sXG4gICAgICAgICAgICAgICAgc2hhZGVyU291cmNlc1t0aGlzLmZyYWdtZW50X3NoYWRlcl9rZXldLFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lLFxuICAgICAgICAgICAgICAgICAgICBkZWZpbmVzLFxuICAgICAgICAgICAgICAgICAgICB1bmlmb3JtcyxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICBibG9ja19zY29wZXMsXG4gICAgICAgICAgICAgICAgICAgIGV4dGVuc2lvbnNcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgdGhpcy5wcm9ncmFtLmNvbXBpbGUoKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuc2VsZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb25fcHJvZ3JhbSA9IG5ldyBTaGFkZXJQcm9ncmFtKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmdsLFxuICAgICAgICAgICAgICAgICAgICBzaGFkZXJTb3VyY2VzW3RoaXMudmVydGV4X3NoYWRlcl9rZXldLFxuICAgICAgICAgICAgICAgICAgICBzaGFkZXJTb3VyY2VzWydnbC9zaGFkZXJzL3NlbGVjdGlvbl9mcmFnbWVudCddLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiAodGhpcy5uYW1lICsgJyAoc2VsZWN0aW9uKScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lczogc2VsZWN0aW9uX2RlZmluZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICB1bmlmb3JtcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrX3Njb3BlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVuc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb25fcHJvZ3JhbS5jb21waWxlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbl9wcm9ncmFtID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjYXRjaChlcnJvcikge1xuICAgICAgICAgICAgdGhpcy5jb21waWxpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuY29tcGlsZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHRocm93KG5ldyBFcnJvcihgc3R5bGUuY29tcGlsZSgpOiBzdHlsZSAke3RoaXMubmFtZX0gZXJyb3I6YCwgZXJyb3IpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY29tcGlsaW5nID0gZmFsc2U7XG4gICAgICAgIHRoaXMuY29tcGlsZWQgPSB0cnVlO1xuICAgIH0sXG5cbiAgICAvLyBBZGQgYSBzaGFkZXIgYmxvY2tcbiAgICBhZGRTaGFkZXJCbG9jayAoa2V5LCBibG9jaywgc2NvcGUgPSB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cmxzKS5tYXAodXJsID0+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIFV0aWxzLmxvYWRSZXNvdXJjZSh1cmwpLnRoZW4oKGRhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAvLyBNaXhpbiByZW1vdGUgc3R5bGVzLCB3aXRoaW4gZWFjaCByZW1vdGUgZmlsZVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IG1heSBub3QgaGFuZGxlIG11bHRpcGxlIGxldmVscyBvZiBtaXhpbnMsIGFuZCB3aWxsIG5vdCBoYW5kbGUgbmVzdGVkIHJlbW90ZSBmaWxlc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHNvdXJjZV9uYW1lIGluIGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNvdXJjZV9pbXBvcnQgPSB1cmxzW3VybF0gJiYgdXJsc1t1cmxdLmZpbHRlcihzID0+IHMuc291cmNlX25hbWUgPT09IHNvdXJjZV9uYW1lKTtcbiAgICAgICAgICAgICAgICAgICAgc291cmNlX2ltcG9ydCA9IHNvdXJjZV9pbXBvcnQgJiYgc291cmNlX2ltcG9ydFswXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoc291cmNlX2ltcG9ydCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXNlIGltcG9ydGVkIG5hbWUgaWYgZGlmZmVyZW50IGZyb20gbmFtZSBpbiBzb3VyY2UgZmlsZVxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVtzb3VyY2VfbmFtZV0ubmFtZSA9IHNvdXJjZV9pbXBvcnQudGFyZ2V0X25hbWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhW3NvdXJjZV9uYW1lXS5uYW1lID0gc291cmNlX25hbWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBkYXRhW3NvdXJjZV9uYW1lXSA9IFN0eWxlTWFuYWdlci5taXgoZGF0YVtzb3VyY2VfbmFtZV0sIGRhdGEpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFkZCByZW1vdGUgc3R5bGVzIHRvIGxvY2FsIHN0eWxlc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHRhcmdldCBvZiB1cmxzW3VybF0pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YVt0YXJnZXQuc291cmNlX25hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZXNbdGFyZ2V0LnRhcmdldF9uYW1lXSA9IGRhdGFbdGFyZ2V0LnNvdXJjZV9uYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzdHlsZXNbdGFyZ2V0LnRhcmdldF9uYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZWplY3QobmV3IEVycm9yKGBTdHlsZU1hbmFnZXIubG9hZFJlbW90ZVN0eWxlczogZXJyb3IgaW1wb3J0aW5nIHN0eWxlICR7dGFyZ2V0LnRhcmdldF9uYW1lfSwgY291bGQgbm90IGZpbmQgc291cmNlIHN0eWxlICR7dGFyZ2V0LnNvdXJjZV9uYW1lfSBpbiAke3VybH1gKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24gPSBmYWxzZTtcbiAgICAgICAgICAgIH0pLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGxvZy5lcnJvcihgU3R5bGVNYW5hZ2VyLmxvYWRSZW1vdGVTdHlsZXM6IGVycm9yIGltcG9ydGluZyBzdHlsZShzKSAke0pTT04uc3RyaW5naWZ5KHVybHNbdXJsXSl9IGZyb20gJHt1cmx9YCwgZXJyb3IpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH0pKS50aGVuKCgpID0+IFByb21pc2UucmVzb2x2ZShzdHlsZXMpKTtcbn07XG5cbi8vIFByZWxvYWQgc2hhZGVyIGJsb2NrcyBmcm9tIGV4dGVybmFsIFVSTHNcblN0eWxlTWFuYWdlci5sb2FkU2hhZGVyQmxvY2tzID0gZnVuY3Rpb24gKHN0eWxlcywgYmFzZSkge1xuICAgIGlmICghc3R5bGVzKSB7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoe30pO1xuICAgIH1cbiAgICB2YXIgcXVldWUgPSBbXTtcbiAgICBmb3IgKHZhciBzdHlsZSBvZiBVdGlscy52YWx1ZXMoc3R5bGVzKSkge1xuICAgICAgICBpZiAoc3R5bGUuc2hhZGVycyAmJiBzdHlsZS5zaGFkZXJzLmJsb2Nrcykge1xuICAgICAgICAgICAgbGV0IF9ibG9ja3MgPSBzdHlsZS5zaGFkZXJzLmJsb2NrcztcblxuICAgICAgICAgICAgZm9yIChsZXQgW2tleSwgYmxvY2tdIG9mIFV0aWxzLmVudHJpZXMoc3R5bGUuc2hhZGVycy5ibG9ja3MpKSB7XG4gICAgICAgICAgICAgICAgbGV0IF9rZXkgPSBrZXk7XG5cbiAgICAgICAgICAgICAgICAvLyBBcnJheSBvZiBibG9ja3NcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShibG9jaykpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgYj0wOyBiIDwgYmxvY2subGVuZ3RoOyBiKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYmxvY2tbYl0gPT09ICdvYmplY3QnICYmIGJsb2NrW2JdLnVybCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBfaW5kZXggPSBiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBibG9ja1tiXS51cmw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJhc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gVXRpbHMuYWRkQmFzZVVSTCh1cmwsIGJhc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXVlLnB1c2goVXRpbHMuaW8oVXRpbHMuY2FjaGVCdXN0ZXJGb3JVcmwodXJsKSkudGhlbigoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYmxvY2tzW19rZXldW19pbmRleF0gPSBkYXRhO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cuZXJyb3IoYFN0eWxlTWFuYWdlci5sb2FkU2hhZGVyQmxvY2tzOiBlcnJvciBsb2FkaW5nIHNoYWRlciBibG9ja2AsIF9ibG9ja3MsIF9rZXksIF9pbmRleCwgZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBTaW5nbGUgYmxvY2tcbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgYmxvY2sgPT09ICdvYmplY3QnICYmIGJsb2NrLnVybCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gYmxvY2sudXJsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYmFzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gVXRpbHMuYWRkQmFzZVVSTCh1cmwsIGJhc2UpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcXVldWUucHVzaChVdGlscy5pbyhVdGlscy5jYWNoZUJ1c3RlckZvclVybCh1cmwpKS50aGVuKChkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfYmxvY2tzW19rZXldID0gZGF0YTtcbiAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2cuZXJyb3IoYFN0eWxlTWFuYWdlci5sb2FkU2hhZGVyQmxvY2tzOiBlcnJvciBsb2FkaW5nIHNoYWRlciBibG9ja2AsIF9ibG9ja3MsIF9rZXksIGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gUHJvbWlzZS5hbGwocXVldWUpLnRoZW4oKCkgPT4gUHJvbWlzZS5yZXNvbHZlKHN0eWxlcykpOyAvLyBUT0RPOiBhZGQgZXJyb3Jcbn07XG5cblN0eWxlTWFuYWdlci5taXggPSBmdW5jdGlvbiAoc3R5bGUsIHN0eWxlcykge1xuICAgIC8vIEV4aXQgZWFybHkgaWYgd2UgaGF2ZSBhbHJlYWR5IGFwcGxpZWQgbWl4aW5zIHRvIHRoaXMgc3R5bGVcbiAgICBpZiAoc3R5bGUubWl4ZWQpIHtcbiAgICAgICAgcmV0dXJuIHN0eWxlO1xuICAgIH1cbiAgICBzdHlsZS5taXhlZCA9IHt9O1xuXG4gICAgLy8gTWl4aW4gc291cmNlcywgaW4gb3JkZXJcbiAgICBsZXQgc291cmNlcyA9IFtdO1xuICAgIGlmIChzdHlsZS5taXgpIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoc3R5bGUubWl4KSkge1xuICAgICAgICAgICAgc291cmNlcy5wdXNoKC4uLnN0eWxlL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GxpY2l0bHkgZGVmaW5lZCBvbiB0aGlzIHN0eWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2hhZGVycy5fdW5pZm9ybXNbdV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzaGFkZXJzLl91bmlmb3Jtc1t1XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVuaWZvcm0gd2FzIG1peGVkIGZyb20gYW5vdGhlciBzdHlsZSwgZm9yd2FyZCByZXF1ZXN0IHRoZXJlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZGVudGlmeSBjaGVjayBpcyBuZWVkZWQgdG8gcHJldmVudCBpbmZpbml0ZSByZWN1cnNpb24gaWYgYSBwcmV2aW91c2x5IGRlZmluZWQgdW5pZm9ybVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXMgc2V0IHRvIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoc3R5bGVzW3NoYWRlcnMuX3VuaWZvcm1fc2NvcGVzW3VdXS5zaGFkZXJzLnVuaWZvcm1zICE9PSBzaGFkZXJzLnVuaWZvcm1zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0eWxlc1tzaGFkZXJzLl91bmlmb3JtX3Njb3Blc1t1XV0uc2hhZGVycy51bmlmb3Jtc1t1XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgc2V0OiBmdW5jdGlvbiAodikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2hhZGVycy5fdW5pZm9ybXNbdV0gPSB2O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgLy8gRXh0ZW5zaW9uczogYnVpbGQgYSBsaXN0IG9mIHVuaXF1ZSBleHRlbnNpb25zXG4gICAgc2hhZGVycy5leHRlbnNpb25zID0gT2JqZWN0LmtleXMoc2hhZGVyX21lcmdlc1xuICAgICAgICAubWFwKHggPT4geC5leHRlbnNpb25zKVxuICAgICAgICAuZmlsdGVyKHggPT4geClcbiAgICAgICAgLnJlZHVjZSgocHJldiwgY3VyKSA9PiB7XG4gICAgICAgICAgICAvLyBzaW5nbGUgZXh0ZW5zaW9uXG4gICAgICAgICAgICBpZiAodHlwZW9mIGN1ciA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICBwcmV2W2N1cl0gPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gYXJyYXkgb2YgZXh0ZW5zaW9uc1xuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY3VyLmZvckVhY2goeCA9PiBwcmV2W3hdID0gdHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcHJldjtcbiAgICAgICAgfSwge30pIHx8IHt9XG4gICAgKTtcblxuICAgIC8vIFNoYWRlciBibG9ja3NcbiAgICAvLyBNYXJrIGFsbCBzaGFkZXIgYmxvY2tzIGZvciB0aGUgdGFyZ2V0IHN0eWxlIGFzIG9yaWdpbmF0aW5nIHdpdGggaXRzIG93biBuYW1lXG4gICAgaWYgKHN0eWxlLnNoYWRlcnMgJiYgc3R5bGUuc2hhZGVycy5ibG9ja3MpIHtcbiAgICAgICAgc3R5bGUuc2hhZGVycy5ibG9ja19zY29wZXMgPSBzdHlsZS5zaGFkZXJzLmJsb2NrX3Njb3BlcyB8fCB7fTtcbiAgICAgICAgZm9yIChsZXQgW2ssIGJsb2NrXSBvZiBVdGlscy5lbnRyaWVzKHN0eWxlLnNoYWRlcnMuYmxvY2tzKSkge1xuICAgICAgICAgICAgc3R5bGUuc2hhZGVycy5ibG9ja19zY29wZXNba10gPSBzdHlsZS5zaGFk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c2hhZGVycy5ibG9ja3NbdF0gPSBzaGFkZXJzLmJsb2Nrc1t0XSB8fCBbXTtcbiAgICAgICAgICAgIHNoYWRlcnMuYmxvY2tfc2NvcGVzW3RdID0gc2hhZGVycy5ibG9ja19zY29wZXNbdF0gfHwgW107XG5cbiAgICAgICAgICAgIC8vIHN0YW5kYXJkaXplIG9uIGFycmF5cyAoYmxvY2sgY2FuIGJlIHNpbmdsZSBvciBtdWx0aS12YWx1ZSlcbiAgICAgICAgICAgIGJsb2NrID0gQXJyYXkuaXNBcnJheShibG9jaykgPyBibG9jayA6IFtibG9ja107XG4gICAgICAgICAgICBibG9ja19zY29wZSA9IEFycmF5LmlzQXJyYXkoYmxvY2tfc2NvcGUpID8gYmxvY2tfc2NvcGUgOiBbYmxvY2tfc2NvcGVdO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBiPTA7IGIgPCBibG9jay5sZW5ndGg7IGIrKykge1xuICAgICAgICAgICAgICAgIC8vIFNraXAgYmxvY2tzIHdlJ3ZlIGFscmVhZHkgbWl4ZWQgaW4gZnJvbSB0aGUgc2FtZSBzY29wZVxuICAgICAgICAgICAgICAgIC8vIFJlcGVhdGluZyBzY29wZSBpbmRpY2F0ZXMgYSBkaWFtb25kIHBhdHRlcm4gd2hlcmUgYSBzdHlsZSBpcyBiZWluZyBtaXhlZCBtdWx0aXBsZSB0aW1lc1xuICAgICAgICAgICAgICAgIGlmIChtaXhlZFtibG9ja19zY29wZVtiXV0pIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG1peGVkX3NvdXJjZVtibG9ja19zY29wZVtiXV0gPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgc2hhZGVycy5ibG9ja3NbdF0ucHVzaChibG9ja1tiXSk7XG4gICAgICAgICAgICAgICAgc2hhZGVycy5ibG9ja19zY29wZXNbdF0ucHVzaChibG9ja19zY29wZVtiXSk7XG4gICAgICAgICAgICB9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c3RcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRGVwZW5kZW5jeSBjaGFpbiBlbmRzIHdoZW4gdGhpcyBzdHlsZSBpc24ndCBtaXhpbmcgaW4gYW55IG90aGVyc1xuICAgICAgICBpZiAoIXN0eWxlLm1peCkge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBUcmF2ZXJzZSBuZXh0IHBhcmVudCBzdHlsZVxuICAgICAgICBwYXJlbnRzKys7XG5cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoc3R5bGUubWl4KSkge1xuICAgICAgICAgICAgLy8gSWYgbXVsdGlwbGUgbWl4aW5zLCBmaW5kIHRoZSBkZWVwZXN0IG9uZVxuICAgICAgICAgICAgcGFyZW50cyArPSBNYXRoLm1heCguLi5zdHlsZS5taXgubWFwKHMgPT4ge1xuICAgICAgICAgICAgICAgIC8vIFRyeWluZyB0byBtaXggaW50byBpdHNlbGYhXG4gICAgICAgICAgICAgICAgaWYgKGtleSA9PT0gcykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIFN0eWxlTWFuYWdlci5pbmhlcml0YW5jZURlcHRoKHMsIHN0eWxlcyk7XG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIC8vIFRyeWluZyB0byBtaXggaW50byBpdHNlbGYhXG4gICAgICAgICAgICBpZiAoa2V5ID09PSBzdHlsZS5taXgpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gSWYgc2luZ2xlIG1peGluLCBjb250aW51ZSBsb29wIHVwIHRoZSB0cmVlXG4gICAgICAgICAgICBrZXkgPSBzdHlsZS5taXg7XG4gICAgICAgIH1cbiAgIC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JzZXIud3JhcEZ1bmN0aW9uID0gZnVuY3Rpb24gKGZ1bmMpIHtcbiAgICB2YXIgZiA9IGBmdW5jdGlvbihjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIGZlYXR1cmUgPSBjb250ZXh0LmZlYXR1cmUucHJvcGVydGllcztcbiAgICAgICAgICAgICAgICB2YXIgJHpvb20gPSBjb250ZXh0Lnpvb207XG4gICAgICAgICAgICAgICAgdmFyICRsYXllciA9IGNvbnRleHQubGF5ZXI7XG4gICAgICAgICAgICAgICAgdmFyICRnZW9tZXRyeSA9IGNvbnRleHQuZ2VvbWV0cnk7XG4gICAgICAgICAgICAgICAgdmFyICRtZXRlcnNfcGVyX3BpeGVsID0gY29udGV4dC5tZXRlcnNfcGVyX3BpeGVsO1xuICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0aWVzID0gY29udGV4dC5wcm9wZXJ0aWVzO1xuXG4gICAgICAgICAgICAgICAgdmFyIHZhbCA9ICgke2Z1bmN9KCkpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWwgPT09ICdudW1iZXInICYmIGlzTmFOKHZhbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsID0gbnVsbDsgLy8gY29udmVydCBOYU5zIHRvIG51bGxzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgICAgIH1gO1xuICAgIHJldHVybiBmO1xufTtcblxuXG4vLyBTdHlsZSBwYXJzaW5nXG5cblN0eWxlUGFyc2VyLnplcm9QYWlyID0gT2JqZWN0LmZyZWV6ZShbMCwgMF0pOyAvLyBzaW5nbGUgYWxsb2NhdGlvbiBmb3IgemVybyB2YWx1ZXMgdGhhdCB3b24ndCBiZSBtb2RpZmllZFxuXG4vLyBTdHlsZSBkZWZhdWx0c1xuU3R5bGVQYXJzZXIuZGVmYXVsdHMgPSB7XG4gICAgY29sb3I6IFsxLCAxLCAxLCAxXSxcb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b29tW2NvbnRleHQuem9vbV07XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICAvLyBEeW5hbWljIGZ1bmN0aW9uLWJhc2VkXG4gICAgICAgIGlmICh0eXBlb2YgdmFsLnZhbHVlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB2YWwuZHluYW1pYyA9IHZhbC52YWx1ZTtcbiAgICAgICAgICAgIGxldCB2ID0gdmFsLmR5bmFtaWMoY29udGV4dCk7XG4gICAgICAgICAgICByZXR1cm4gdjtcbiAgICAgICAgfVxuICAgICAgICAvLyBBcnJheSBvZiB6b29tLWludGVycG9sYXRlZCBzdG9wcywgZS5nLiBbem9vbSwgdmFsdWVdIHBhaXJzXG4gICAgICAgIGVsc2UgaWYgKHZhbC56b29tKSB7XG4gICAgICAgICAgICAvLyBDYWxjdWxhdGUgdmFsdWUgZm9yIGN1cnJlbnQgem9vbVxuICAgICAgICAgICAgLy8gRG8gZmluYWwgdW5pdCBjb252ZXJzaW9uIGFzIGxhdGUgYXMgcG9zc2libGUsIHdoZW4gaW50ZXJwb2xhdGlvbiB2YWx1ZXMgaGF2ZSBiZWVuIGRldGVybWluZWRcbiAgICAgICAgICAgIHZhbC56b29tW2NvbnRleHQuem9vbV0gPSBVdGlscy5pbnRlcnBvbGF0ZShjb250ZXh0Lnpvb20sIHZhbC52YWx1ZSxcbiAgICAgICAgICAgICAgICB2ID0+IFN0eWxlUGFyc2VyLmNvbnZlcnRVbml0cyh2LCBjb250ZXh0KSk7XG5cbiAgICAgICAgICAgIHJldHVybiB2YWwuem9vbVtjb250ZXh0Lnpvb21dO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIFN0eWxlUGFyc2VyLmNvbnZlcnRVbml0cyh2YWwudmFsdWUsIGNvbnRleHQpO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuLy8gQ2FjaGUgcHJldmlvdXNseSBwYXJzZWQgY29sb3Igc3RyaW5nc1xuU3R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ZHluYW1pYykge1xuICAgICAgICBsZXQgdiA9IHZhbC5keW5hbWljKGNvbnRleHQpO1xuICAgICAgICBpZiAodiAmJiB2WzNdID09IG51bGwpIHtcbiAgICAgICAgICAgIHZbM10gPSAxOyAvLyBkZWZhdWx0IGFscGhhXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHY7XG4gICAgfVxuICAgIGVsc2UgaWYgKHZhbC5zdGF0aWMpIHtcbiAgICAgICAgcmV0dXJuIHZhbC5zdGF0aWM7XG4gICAgfVxuICAgIGVsc2UgaWYgKHZhbC56b29tICYmIHZhbC56b29tW2NvbnRleHQuem9vbV0pIHtcbiAgICAgICAgcmV0dXJuIHZhbC56b29tW2NvbnRleHQuem9vbV07XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICAvLyBEeW5hbWljIGZ1bmN0aW9uLWJhc2VkIGNvbG9yXG4gICAgICAgIGlmICh0eXBlb2YgdmFsLnZhbHVlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB2YWwuZHluYW1pYyA9IHZhbC52YWx1ZTtcbiAgICAgICAgICAgIGxldCB2ID0gdmFsLmR5bmFtaWMoY29udGV4dCk7XG4gICAgICAgICAgICBpZiAodiAmJiB2WzNdID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2WzNdID0gMTsgLy8gZGVmYXVsdCBhbHBoYVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHY7XG4gICAgICAgIH1cbiAgICAgICAgLy8gU2luZ2xlIHN0cmluZyBjb2xvclxuICAgICAgICBlbHNlIGlmICh0eXBlb2YgdmFsLnZhbHVlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgdmFsLnN0YXRpYyA9IFN0eWxlUGFyc2VyLmNvbG9yRm9yU3RyaW5nKHZhbC52YWx1ZSk7XG4gICAgICAgICAgICByZXR1cm4gdmFsLnN0YXRpYztcbiAgICAgICAgfVxuICAgICAgICAvLyBBcnJheSBvZiB6b29tLWludGVycG9sYXRlZCBzdG9wcywgZS5nLiBbem9vbSwgY29sb3JdIHBhaXJzXG4gICAgICAgIGVsc2UgaWYgKHZhbC56b29tKSB7XG4gICAgICAgICAgICAvLyBQYXJzZSBhbnkgc3RyaW5nIGNvbG9ycyBpbnNpZGUgc3RvcHMsIHRoZSBmaXJzdCB0aW1lIHdlIGVuY291bnRlciB0aGlzIHByb3BlcnR5XG4gICAgICAgICAgICBpZiAoIXZhbC56b29tX3ByZXByb2Nlc3NlZCkge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGk9MDsgaSA8IHZhbC52YWx1ZS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdiA9IHZhbC52YWx1ZVtpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgJiYgdHlwZW9mIHZbMV0gPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2WzFdID0gU3R5bGVQYXJzZXIuY29sb3JGb3JTdHJpbmcodlsxXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsLnpvb21fcHJlcHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQ2FsY3VsYXRlIGNvbG9yIGZvciBjdXJyZW50IHpvb21cbiAgICAgICAgICAgIHZhbC56b29tW2NvbnRleHQuem9vbV0gPSBVdGlscy5pbnRlcnBvbGF0ZShjb250ZXh0Lnpvb20sIHZhbC52YWx1ZSk7XG4gICAgICAgICAgICB2YWwuem9vbVtjb250ZXh0Lnpvb21dWzNdID0gdmFsLnpvb21bY29udGV4dC56b29tXVszXSB8fCAxOyAvLyBkZWZhdWx0IGFscGhhXG4gICAgICAgICAgICByZXR1cm4gdmFsLnpvb21bY29udGV4dC56b29tXTtcbiAgICAgICAgfVxuICAgICAgICAvLyBTaW5nbGUgYXJyYXkgY29sb3JcbiAgICAgICAgZWxz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pbmcnKSB7XG4gICAgICAgICAgICAgICAgdlsxXSA9IFN0eWxlUGFyc2VyLmNvbG9yRm9yU3RyaW5nKHZbMV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQuem9vbSkge1xuICAgICAgICAgICAgdmFsID0gVXRpbHMuaW50ZXJwb2xhdGUoY29udGV4dC56b29tLCB2YWwpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gRGVmYXVsdHNcbiAgICBpZiAodmFsKSB7XG4gICAgICAgIC8vIGFscGhhXG4gICAgICAgIGlmICh2YWxbM10gPT0gbnVsbCkge1xuICAgICAgICAgICAgdmFsWzNdID0gMTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgICAgdmFsID0gWzAsIDAsIDAsIDFdO1xuICAgIH1cblxuICAgIHJldHVybiB2YWw7XG59O1xuXG5TdHlsZVBhcnNlci5jYWxjdWxhdGVPcmRlciA9IGZ1bmN0aW9uKG9yZGVyLCBjb250ZXh0KSB7XG4gICAgLy8gQ29tcHV0ZWQgb3JkZXJcbiAgICBpZiAodHlwZW9mIG9yZGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIG9yZGVyID0gb3JkZXIoY29udGV4dCk7XG4gICAgfVxuICAgIGVsc2UgaWYgKHR5cGVvZiBvcmRlciA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgLy8gT3JkZXIgdGllZCB0byBmZWF0dXJlIHByb3BlcnR5XG4gICAgICAgIGlmIChjb250ZXh0LmZlYXR1cmUucHJvcGVydGllc1tvcmRlcl0pIHtcbiAgICAgICAgICAgIG9yZGVyID0gY29udGV4dC5mZWF0dXJlLnByb3BlcnRpZXNbb3JkZXJdO1xuICAgICAgICB9XG4gICAgICAgIC8vIEV4cGxpY2l0IG9yZGVyIHZhbHVlXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgb3JkZXIgPSBwYXJzZUZsb2F0KG9yZGV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W5ncyk7IC8vIFRPRE86IG9ubHkgc2V0IG9uY2UgYWJvdmVcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKFxuICAgICAgICAgICAgICAgICAgICB0ZXh0X2luZm9zW3RleHRdLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHRTaXplKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X3NldHRpbmdzLnRyYW5zZm9ybSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfc2V0dGluZ3MudGV4dF93cmFwXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRleHRzO1xuICAgIH1cblxuICAgIC8vIENvbXB1dGVzIHdpZHRoIGFuZCBoZWlnaHQgb2YgdGV4dCBiYXNlZCBvbiBjdXJyZW50IGZvbnQgc3R5bGVcbiAgICAvLyBJbmNsdWRlcyB3b3JkIHdyYXBwaW5nLCByZXR1cm5zIHNpemUgaW5mbyBmb3Igd2hvbGUgdGV4dCBibG9jayBhbmQgaW5kaXZpZHVhbCBsaW5lc1xuICAgIHRleHRTaXplICh0ZXh0LCB0aWxlLCB0cmFuc2Zvcm0sIHRleHRfd3JhcCkge1xuICAgICAgICBsZXQgc3RyID0gdGhpcy5hcHBseVRleHRUcmFuc2Zvcm0odGV4dCwgdHJhbnNmb3JtKTtcbiAgICAgICAgbGV0IGN0eCA9IHRoaXMuY29udGV4dDtcbiAgICAgICAgbGV0IGJ1ZmZlciA9IHRoaXMudGV4dF9idWZmZXIgKiBVdGlscy5kZXZpY2VfcGl4ZWxfcmF0aW87XG4gICAgICAgIGxldCBsZWFkaW5nID0gMiAqIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbzsgLy8gbWFrZSBjb25maWd1cmFibGUgYW5k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ZHRoID0gMDsgLy8gbWF4IHdpZHRoIHRvIGZpdCBhbGwgbGluZXNcblxuICAgICAgICAvLyBhZGQgY3VycmVudCBsaW5lIGJ1ZmZlciB0byBjb21wbGV0ZWQgbGluZXMsIG9wdGlvbmFsbHkgc3RhcnQgbmV3IGxpbmVcbiAgICAgICAgZnVuY3Rpb24gYWRkTGluZSAobmV3X2xpbmUpIHtcbiAgICAgICAgICAgIGxpbmUudGV4dCA9IGxpbmUudGV4dC50cmltKCk7XG4gICAgICAgICAgICBpZiAobGluZS50ZXh0Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBsaW5lLndpZHRoID0gY3R4Lm1lYXN1cmVUZXh0KGxpbmUudGV4dCkud2lkdGg7XG4gICAgICAgICAgICAgICAgbWF4X3dpZHRoID0gTWF0aC5tYXgobWF4X3dpZHRoLCBNYXRoLmNlaWwobGluZS53aWR0aCkpO1xuICAgICAgICAgICAgICAgIGxpbmVzLnB1c2gobGluZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobmV3X2xpbmUpIHtcbiAgICAgICAgICAgICAgICBsaW5lID0gT2JqZWN0LmFzc2lnbih7fSwgbmV3X2xpbmVfdGVtcGxhdGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gRmlyc3QgaXRlcmF0ZSBvbiBzcGFjZS1icmVhayBncm91cHMgKHdpbGwgYmUgb25lIGlmIG1heCBsaW5lIGxlbmd0aCBvZmYpLCB0aGVuIGl0ZXJhdGUgb24gbGluZS1icmVhayBncm91cHNcbiAgICAgICAgZm9yIChsZXQgdz0wOyB3IDwgd29yZHMubGVuZ3RoOyB3KyspIHtcbiAgICAgICAgICAgIGxldCBicmVha3MgPSB3b3Jkc1t3XS5zcGxpdCgnXFxuJyk7IC8vIHNwbGl0IG9uIGxpbmUgYnJlYWtzXG5cbiAgICAgICAgICAgIGZvciAobGV0IG49MDsgbiA8IGJyZWFrcy5sZW5ndGg7IG4rKykge1xuICAgICAgICAgICAgICAgIGxldCB3b3JkID0gYnJlYWtzW25dO1xuXG4gICAgICAgICAgICAgICAgLy8gaWYgYWRkaW5nIGN1cnJlbnQgd29yZCB3b3VsZCBvdmVyZmxvdywgYWRkIGEgbmV3IGxpbmUgaW5zdGVhZFxuICAgICAgICAgICAgICAgIGlmIChsaW5lLmNoYXJzICsgd29yZC5sZW5ndGggPiB0ZXh0X3dyYXAgJiYgbGluZS5jaGFycyA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkTGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBhZGQgY3VycmVudCB3b3JkIChwbHVzIHNwYWNlKVxuICAgICAgICAgICAgICAgIGxpbmUuY2hhcnMgKz0gd29yZC5sZW5ndGggKyAxO1xuICAgICAgICAgICAgICAgIGxpbmUudGV4dCArPSB3b3JkICsgJyAnO1xuXG4gICAgICAgICAgICAgICAgLy8gaWYgbGluZSBicmVha3MgcHJlc2VudCwgYWRkIG5ldyBsaW5lICh1bmxlc3Mgb24gbGFzdCBsaW5lKVxuICAgICAgICAgICAgICAgIGlmIChicmVha3MubGVuZ3RoID4gMSAmJiBuIDwgYnJlYWtzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkTGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgYWRkTGluZShmYWxzZSk7XG5cbiAgICAgICAgLy8gRmluYWwgZGltZW5zaW9ucyBvZiB0ZXh0XG4gICAgICAgIGxldCBoZWlnaHQgPSBsaW5lcy5sZW5ndGggKiBsaW5lX2hlaWdodDtcblxuICAgICAgICBsZXQgY29sbGlzaW9uX3NpemUgPSBbXG4gICAgICAgICAgICBtYXhfd2lkdGggLyBVdGlscy5kZXZpY2VfcGl4ZWxfcmF0aW8sXG4gICAgICAgICAgICBoZWlnaHQgLyBVdGlscy5kZXZpY2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mFuc2Zvcm0pO1xuICAgICAgICAgICAgbGV0IGJ1ZmZlciA9IHRoaXMudGV4dF9idWZmZXIgKiBVdGlscy5kZXZpY2VfcGl4ZWxfcmF0aW87XG4gICAgICAgICAgICBsZXQgdGV4dHVyZV9zaXplID0gc2l6ZS50ZXh0dXJlX3NpemU7XG4gICAgICAgICAgICBsZXQgbGluZV9oZWlnaHQgPSBzaXplLmxpbmVfaGVpZ2h0O1xuXG4gICAgICAgICAgICAvLyBUZXh0IGFsaWdubWVudFxuICAgICAgICAgICAgbGV0IHR4O1xuICAgICAgICAgICAgaWYgKGFsaWduID09PSAnbGVmdCcpIHtcbiAgICAgICAgICAgICAgICB0eCA9IHggKyBidWZmZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChhbGlnbiA9PT0gJ2NlbnRlcicpIHtcbiAgICAgICAgICAgICAgICB0eCA9IHggKyB0ZXh0dXJlX3NpemVbMF0vMiAtIGxpbmUud2lkdGgvMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGFsaWduID09PSAncmlnaHQnKSB7XG4gICAgICAgICAgICAgICAgdHggPSB4ICsgdGV4dHVyZV9zaXplWzBdIC0gbGluZS53aWR0aCAtIGJ1ZmZlcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gSW4gdGhlIGFic2VuY2Ugb2YgYmV0dGVyIENhbnZhcyBUZXh0TWV0cmljcyAobm90IHN1cHBvcnRlZCBieSBicm93c2VycyB5ZXQpLFxuICAgICAgICAgICAgLy8gMC43NSBidWZmZXIgcHJvZHVjZXMgYSBiZXR0ZXIgYXBwcm94aW1hdGUgdmVydGljYWwgY2VudGVyaW5nIG9mIHRleHRcbiAgICAgICAgICAgIGxldCB0eSA9IHkgKyBidWZmZXIgKiAwLjc1ICsgKGxpbmVfbnVtICsgMSkgKiBsaW5lX2hlaWdodDtcblxuICAgICAgICAgICAgaWYgKHN0cm9rZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGV4dC5zdHJva2VUZXh0KHN0ciwgdHgsIHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY29udGV4dC5maWxsVGV4dChzdHIsIHR4LCB0eSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByYXN0ZXJpemUgKHRpbGUsIHRleHRzLCB0ZXh0dXJlX3NpemUpIHtcbiAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gdGV4dHMpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0X2luZm9zID0gdGV4dHNbc3R5bGVdO1xuXG4gICAgICAgICAgICBmb3IgKGxldCB0ZXh0IGluIHRleHRfaW5mb3MpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5mbyA9IHRleHRfaW5mb3NbdGV4dF07XG5cbiAgICAgICAgICAgICAgICB0aGlzLnNldEZvbnQodGlsZSwgaW5mby50ZXh0X3NldHRpbmdzKTsgLy8gVE9ETzogb25seSBzZXQgb25jZSBhYm92ZVxuICAgICAgICAgICAgICAgIHRoaXMuZHJhd1RleHQoaW5mby5saW5lcywgaW5mby5wb3NpdGlvbiwgaW5mby5zaXplLCB0aWxlLCB7XG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZTogaW5mby50ZXh0X3NldHRpbmdzLnN0cm9rZSxcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtOiBpbmZvLnRleHRfc2V0dGluZ3MudHJhbnNmb3JtLFxuICAgICAgICAgICAgICAgICAgICBhbGlnbjogaW5mby50ZXh0X3NldHRpbmdzLmFsaWduXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpbmZvLnRleGNvb3JkcyA9IEJ1aWxkZXJzLmdldFRleGNvb3Jkc0ZvclNwcml0ZShcbiAgICAgICAgICAgICAgICAgICAgaW5mby5wb3NpdGlvbixcbiAgICAgICAgICAgICAgICAgICAgaW5mby5zaXplLnRleHR1cmVfc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgdGV4dHVyZV9zaXplXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIFBsYWNlIHRleHQgbGFiZWxzIHdpdGhpbiBhbiBhdGxhcyBvZiB0aGUgZ2l2ZW4gbWF4IHNpemVcbiAgICBzZXRUZXh0dXJlVGV4dFBvc2l0aW9ucyAodGV4dHMsIG1heF90ZXh0dXJlX3NpemUpIHtcbiAgICAgICAgLy8gRmluZCB3aWRlc3QgbGFiZWxcbiAgICAgICAgbGV0IHdpZGVzdCA9IDA7XG4gICAgICAgIGZvciAobGV0IHN0eWxlIGluIHRleHRzKSB7XG4gICAgICAgICAgICBsZXQgdGV4dF9pbmZvcyA9IHRleHRzW3N0eWxlXTtcbiAgICAgICAgICAgIGZvciAobGV0IHRleHQgaW4gdGV4dF9pbmZvcykge1xuICAgICAgICAgICAgICAgIGxldCBzaXplID0gdGV4dF9pbmZvc1t0ZXh0XS5zaXplLnRleHR1cmVfc2l6ZTtcbiAgICAgICAgICAgICAgICBpZiAoc2l6ZVswXSA+IHdpZGVzdCkge1xuICAgICAgICAgICAgICAgICAgICB3aWRlc3QgPSBzaXplWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIExheW91dCBsYWJlbHMsIHN0YWNrZWQgaW4gY29sdW1uc1xuICAgICAgICBsZXQgY3ggPSAwLCBjeSA9IDA7IC8vIGN1cnJlbnQgeC95IHBvc2l0aW9uIGluIGF0bGFzXG4gICAgICAgIGxldCBoZWlnaHQgPSAwOyAgICAgLy8gb3ZlcmFsbCBhdGxhcyBoZWlnaHRcbiAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gdGV4dHMpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0X2luZm9zID0gdGV4dHNbc3R5bGVdO1xuICAgICAgICAgICAgZm9yIChsZXQgdGV4dCBpbiB0ZXh0X2luZm9zKSB7XG4gICAgICAgICAgICAgICAgbGV0IHRleHRfaW5mbyA9IHRleHRfaW5mb3NbdGV4dF07XG4gICAgICAgICAgICAgICAgbGV0IHNpemUgPSB0ZXh0X2luZm8uc2l6ZS50ZXh0dXJlX3NpemU7XG4gICAgICAgICAgICAgICAgaWYgKGN5ICsgc2l6ZVsxXSA8IG1heF90ZXh0dXJlX3NpemUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dF9pbmZvLnBvc2l0aW9uID0gW2N4LCBjeV07IC8vIGFkZCBsYWJlbCB0byBjdXJyZW50IGNvbHVtblxuICAgICAgICAgICAgICAgICAgICBjeSArPSBzaXplWzFdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY3kgPiBoZWlnaHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodCA9IGN5O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgeyAvLyBzdGFydCBuZXcgY29sdW1uIGlmIHRhbGxlciB0aGFuIHRleHR1cmVcbiAgICAgICAgICAgICAgICAgICAgY3ggKz0gd2lkZXN0O1xuICAgICAgICAgICAgICAgICAgICBjeSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHRleHRfaW5mby5wb3NpdGlvbiA9IFtjeCwgY3ldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbY3ggKyB3aWRlc3QsIGhlaWdodF07IC8vIG92ZXJhbGwgYXRsYXMgc2l6ZVxuICAgIH1cblxuICAgIC8vIENhbGxlZCBiZWZvcmUgcmFzdGVyaXphdGlvblxuICAgIGFwcGx5VGV4dFRyYW5zZm9ybSAodGV4dCwgdHJhbnNmb3JtKSB7XG4gICAgICAgIGlmICh0cmFuc2Zvcm0gPT09ICdjYXBpdGFsaXplJykge1xuICAgICAgICAgICAgcmV0dXJuIHRleHQucmVwbGFjZ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V4dFNpemVzJywgdGlsZSwgdGhpcy50ZXh0c1t0aWxlXSkudGhlbih0ZXh0cyA9PiB7XG4gICAgICAgICAgICBpZiAoIXRleHRzKSB7XG4gICAgICAgICAgICAgICAgQ29sbGlzaW9uLmNvbGxpZGUoe30sIHRoaXMubmFtZSwgdGlsZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmluaXNoVGlsZSh0aWxlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMudGV4dHNbdGlsZV0gPSB0ZXh0cztcblxuICAgICAgICAgICAgbGV0IGxhYmVscyA9IHRoaXMuY3JlYXRlTGFiZWxzKHRpbGUsIHF1ZXVlKTtcblxuICAgICAgICAgICAgcmV0dXJuIENvbGxpc2lvbi5jb2xsaWRlKGxhYmVscywgdGhpcy5uYW1lLCB0aWxlKS50aGVuKGxhYmVscyA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGxhYmVscy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmluaXNoVGlsZSh0aWxlKTsgLy8gbm8gbGFiZWxzIHZpc2libGUgZm9yIHRoaXMgdGlsZVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuY3VsbFRleHRTdHlsZXModGV4dHMsIGxhYmVscyk7XG5cbiAgICAgICAgICAgICAgICAvLyBzZWNvbmQgY2FsbCB0byBtYWluIHRocmVhZCwgZm9yIHJhc3Rlcml6aW5nIHRoZSBzZXQgb2YgdGV4dHNcbiAgICAgICAgICAgICAgICByZXR1cm4gV29ya2VyQnJva2VyLnBvc3RNZXNzYWdlKHRoaXMubWFpbl90aHJlYWRfdGFyZ2V0KycucmFzdGVyaXplVGV4dHMnLCB0aWxlLCB0ZXh0cykudGhlbigoeyB0ZXh0cywgdGV4dHVyZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0ZXh0cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50ZXh0c1t0aWxlXSA9IHRleHRzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBCdWlsZCBxdWV1ZWQgZmVhdHVyZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVscy5mb3JFYWNoKHEgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0X3NldHRpbmdzX2tleSA9IHEudGV4dF9zZXR0aW5nc19rZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHRfaW5mbyA9IHRoaXMudGV4dHNbdGlsZV0gJiYgdGhpcy50ZXh0c1t0aWxlXVt0ZXh0X3NldHRpbmdzX2tleV0gJiYgdGhpcy50ZXh0c1t0aWxlXVt0ZXh0X3NldHRpbmdzX2tleV1bcS50ZXh0XTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNldHVwIHN0eWxpbmcgb2JqZWN0IGV4cGVjdGVkIGJ5IFN0eWxlIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0eWxlID0gdGhpcy5mZWF0dXJlX3N0eWxlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLmxhYmVsID0gcS5sYWJlbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5zaXplID0gdGV4dF9pbmZvLnNpemUubG9naWNhbF9zaXplO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLmFuZ2xlID0gVXRpbHMucmFkVG9EZWcocS5sYWJlbC5hbmdsZSkgfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS50ZXhjb29yZHMgPSB0ZXh0X2luZm8udGV4Y29vcmRzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU3R5bGUuYWRkRmVhdHVyZS5jYWxsKHRoaXMsIHEuZmVhdHVyZSwgcS5kcmF3LCBxLmNvbnRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5maW5pc2hUaWxlKHRpbGUpLnRoZW4odGlsZV9kYXRhID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEF0dGFjaCB0aWxlLXNwZWNpZmljIGxhYmVsIGF0bGFzIHRvIG1lc2ggYXMgYSB0ZXh0dXJlIHVuaWZvcm1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ZXh0dXJlICYmIHRpbGVfZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbGVfZGF0YS51bmlmb3JtcyA9IHsgdV90ZXh0dXJlOiB0ZXh0dXJlIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlsZV9kYXRhLnRleHR1cmVzID0gW3RleHR1cmVdOyAvLyBhc3NpZ24gdGV4dHVyZSBvd25lcnNoaXAgdG8gdGlsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aWxlX2RhdGE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH0sXG5cbiAgICBjcmVhdGVMYWJlbHMgKHRpbGUsIGZlYXR1cmVfcXVldWUpIHtcbiAgICAgICAgbGV0IGxhYmVscyA9IFtdO1xuXG4gICAgICAgIGZvciAobGV0IGY9MDsgZiA8IGZlYXR1cmVfcXVldWUubGVuZ3RoOyBmKyspIHtcbiAgICAgICAgICAgIGxldCB7IGZlYXR1cmUsIGRyYXcsIGNvbnRleHQsIHRleHQsIHRleHRfc2V0dGluZ3Nfa2V5LCBsYXlvdXQgfSA9IGZlYXR1cmVfcXVldWVbZl07XG4gICAgICAgICAgICBsZXQgdGV4dF9pbmZvID0gdGhpcy50ZXh0c1t0aWxlXVt0ZXh0X3NldHRpbmdzX2tleV1bdGV4dF07XG5cbiAgICAgICAgICAgIGxldCBmZWF0dXJlX2xhYmVscyA9IHRoaXMuYnVpbGRMYWJlbHNGcm9tR2VvbWV0cnkodGV4dF9pbmZvLnNpemUuY29sbGlzaW9uX3NpemUsIGZlYXR1cmUuZ2VvbWV0cnksIGxheW91dCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZlYXR1cmVfbGFiZWxzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IGxhYmVsID0gZmVhdHVyZV9sYWJlbHNbaV07XG4gICAgICAgICAgICAgICAgbGFiZWxzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBmZWF0dXJlLCBkcmF3LCBjb250ZXh0LFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LCB0ZXh0X3NldHRpbmdzX2tleSwgbGF5b3V0LCBsYWJlbFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGxhYmVscztcbiAgICB9LFxuXG4gICAgLy8gUmVtb3ZlIHVudXNlZCB0ZXh0L3N0eWxlIGNvbWJpbmF0aW9ucyB0byBhdm9pZCB1bm5lY2Vzc2FyeSByYXN0ZXJpemF0aW9uXG4gICAgY3VsbFRleHRTdHlsZXModGV4dHMsIGxhYmVscykge1xuICAgICAgICAvLyBDb3VudCBob3cgbWFueSB0aW1lcyBlYWNoIHRleHQvc3R5bGUgY29tYmluYXRpb24gaXMgdXNlZFxuICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBsYWJlbHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHRleHRzW2xhYmVsc1tpXS50ZXh0X3NldHRpbmdzX2tleV1bbGFiZWxzW2ldLnRleHRdLnJlZisrO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gUmVtb3ZlIHRleHQvc3R5bGUgY29tYmluYXRpb25zIHRo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oQXJyYXkuaXNBcnJheShzb3VyY2UpKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBzPTA7IHMgPCBzb3VyY2UubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNvdXJjZVtzXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dCA9IGZlYXR1cmUucHJvcGVydGllc1tzb3VyY2Vbc11dO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHNvdXJjZVtzXSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0ID0gc291cmNlW3NdKGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0ZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAvLyBzdG9wIGlmIHdlIGZvdW5kIGEgdGV4dCBwcm9wZXJ0eVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0eXBlb2Ygc291cmNlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgdGV4dCA9IGZlYXR1cmUucHJvcGVydGllc1tzb3VyY2VdO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBzb3VyY2UgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRleHQgPSBzb3VyY2UoY29udGV4dCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRleHQ7XG4gICAgfSxcblxuICAgIC8vIEFkZGl0aW9uYWwgdGV4dC1zcGVjaWZpYyBsYXlvdXQgc2V0dGluZ3NcbiAgICBjb21wdXRlTGF5b3V0ICh0YXJnZXQsIGZlYXR1cmUsIGRyYXcsIGNvbnRleHQsIHRpbGUsIHRleHQpIHtcbiAgICAgICAgbGV0IGxheW91dCA9IHRhcmdldCB8fCB7fTtcblxuICAgICAgICA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ldyBMYWJlbExpbmUoc2l6ZSwgbGluZXMsIG9wdGlvbnMpKTtcbiAgICAgICAgfSBlbHNlIGlmIChnZW9tZXRyeS50eXBlID09PSBcIk11bHRpTGluZVN0cmluZ1wiKSB7XG4gICAgICAgICAgICBsZXQgbGluZXMgPSBnZW9tZXRyeS5jb29yZGluYXRlcztcblxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaW5lcy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgIGxldCBsaW5lID0gbGluZXNbaV07XG4gICAgICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsTGluZShzaXplLCBsaW5lLCBvcHRpb25zKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZ2VvbWV0cnkudHlwZSA9PT0gXCJQb2ludFwiKSB7XG4gICAgICAgICAgICBsYWJlbHMucHVzaChuZXcgTGFiZWxQb2ludChnZW9tZXRyeS5jb29yZGluYXRlcywgc2l6ZSwgb3B0aW9ucykpO1xuICAgICAgICB9IGVsc2UgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiTXVsdGlQb2ludFwiKSB7XG4gICAgICAgICAgICBsZXQgcG9pbnRzID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG5cbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcG9pbnRzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICAgICAgbGV0IHBvaW50ID0gcG9pbnRzW2ldO1xuICAgICAgICAgICAgICAgIGxhYmVscy5wdXNoKG5ldyBMYWJlbFBvaW50KHBvaW50LCBzaXplLCBvcHRpb25zKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZ2VvbWV0cnkudHlwZSA9PT0gXCJQb2x5Z29uXCIpIHtcbiAgICAgICAgICAgIGxldCBjZW50cm9pZCA9IEdlby5jZW50cm9pZChnZW9tZXRyeS5jb29yZGluYXRlc1swXS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EBjb25zdHJ1Y3RvclxuICAgICAgICBSZXF1aXJlZCBwcm9wZXJ0aWVzOlxuICAgICAgICBjb29yZHM6IG9iamVjdCB3aXRoIHt4LCB5LCB6fSBwcm9wZXJ0aWVzIGlkZW50aWZ5aW5nIHRpbGUgY29vcmRpbmF0ZSBsb2NhdGlvblxuICAgICAgICB3b3JrZXI6IHdlYiB3b3JrZXIgdG8gaGFuZGxlIHRpbGUgY29uc3RydWN0aW9uXG4gICAgKi9cbiAgICBjb25zdHJ1Y3Rvcih7IGNvb3Jkcywgc291cmNlLCB3b3JrZXIsIHN0eWxlX3pvb20gfSkge1xuICAgICAgICBPYmplY3QuYXNzaWduKHRoaXMsIHtcbiAgICAgICAgICAgIGNvb3Jkczoge1xuICAgICAgICAgICAgICAgIHg6IG51bGwsXG4gICAgICAgICAgICAgICAgeTogbnVsbCxcbiAgICAgICAgICAgICAgICB6OiBudWxsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGVidWc6IHt9LFxuICAgICAgICAgICAgbG9hZGluZzogZmFsc2UsXG4gICAgICAgICAgICBsb2FkZWQ6IGZhbHNlLFxuICAgICAgICAgICAgZXJyb3I6IG51bGwsXG4gICAgICAgICAgICB3b3JrZXI6IG51bGwsXG4gICAgICAgICAgICBnZW5lcmF0aW9uOiBudWxsLFxuICAgICAgICAgICAgdmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICBjZW50ZXJfZGlzdDogMFxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLndvcmtlciA9IHdvcmtlcjtcbiAgICAgICAgdGhpcy5zb3VyY2UgPSBzb3VyY2U7XG4gICAgICAgIHRoaXMuc3R5bGVfem9vbSA9IHN0eWxlX3pvb207IC8vIHpvb20gbGV2ZWwgdG8gYmUgdXNlZCBmb3Igc3R5bGluZ1xuXG4gICAgICAgIHRoaXMuY29vcmRzID0gY29vcmRzO1xuICAgICAgICB0aGlzLmNvb3JkcyA9IFRpbGUub3Zlclpvb21lZENvb3JkaW5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opO1xuICAgICAgICB0aGlzLnVuaXRzX3Blcl9tZXRlciA9IEdlby51bml0c1Blck1ldGVyKHRoaXMuY29vcmRzLnopO1xuXG4gICAgICAgIHRoaXMubWVzaGVzID0ge307IC8vIHJlbmRlcmFibGUgVkJPIG1lc2hlcyBrZXllZCBieSBzdHlsZVxuICAgICAgICB0aGlzLnRleHR1cmVzID0gW107IC8vIHRleHR1cmVzIHRoYXQgdGhlIHRpbGUgb3ducyAobGFiZWxzLCBldGMuKVxuICAgIH1cblxuICAgIHN0YXRpYyBjcmVhdGUoc3BlYykge1xuICAgICAgICByZXR1cm4gbmV3IFRpbGUoc3BlYyk7XG4gICAgfVxuXG4gICAgc3RhdGljIGNvb3JkS2V5KHt4LCB5LCB6fSkge1xuICAgICAgICByZXR1cm4gW3gsIHksIHpdLmpvaW4oJy8nKTtcbiAgICB9XG5cbiAgICBzdGF0aWMga2V5IChjb29yZHMsIHNvdXJjZSwgc3R5bGVfem9vbSkge1xuICAgICAgICBjb29yZHMgPSBUaWxlLm92ZXJab29tZWRDb29yZGluYXRlKGNvb3Jkcywgc291cmNlLm1heF96b29tKTtcbiAgICAgICAgaWYgKGNvb3Jkcy55IDwgMCB8fCBjb29yZHMueSA+PSAoMSA8PCBjb29yZHMueikgfHwgY29vcmRzLnogPCAwKSB7XG4gICAgICAgICAgICByZXR1cm47IC8vIGN1bGwgdGlsZXMgb3V0IG9mIHJhbmdlICh4IHdpbGwgd3JhcClcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW3NvdXJjZS5uYW1lLCBzdHlsZV96b29tLCBjb29yZHMueCwgY29vcmRzLnksIGNvb3Jkcy56XS5qb2luKCcvJyk7XG4gICAgfVxuXG4gICAgc3RhdGljIGNvb3JkaW5hdGVBdFpvb20oe3gsIHksIHp9LCB6b29tKSB7XG4gICAgICAgIGlmICh6ICE9PSB6b29tKSB7XG4gICAgICAgICAgICBsZXQgenNjYWxlID0gTWF0aC5wb3coMiwgeiAtIHpvb20pO1xuICAg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uIChiZCA+IGFkID8gLTEgOiAoYmQgPT09IGFkID8gMCA6IDEpKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnJlZVJlc291cmNlcygpIHtcbiAgICAgICAgaWYgKHRoaXMubWVzaGVzKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBtIGluIHRoaXMubWVzaGVzKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5tZXNoZXNbbV0uZGVzdHJveSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMudGV4dHVyZXMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IHQgb2YgdGhpcy50ZXh0dXJlcykge1xuICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlID0gVGV4dHVyZS50ZXh0dXJlc1t0XTtcbiAgICAgICAgICAgICAgICBpZiAodGV4dHVyZSkge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlLmRlc3Ryb3koKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm1lc2hlcyA9IHt9O1xuICAgICAgICB0aGlzLnRleHR1cmVzID0gW107XG4gICAgfVxuXG4gICAgZGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy53b3JrZXJNZXNzYWdlKCdzZWxmLnJlbW92ZVRpbGUnLCB0aGlzLmtleSk7XG4gICAgICAgIHRoaXMuZnJlZVJlc291cmNlcygpO1xuICAgICAgICB0aGlzLndvcmtlciA9IG51bGw7XG4gICAgfVxuXG4gICAgYnVpbGRBc01lc3NhZ2UoKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBrZXk6IHRoaXMua2V5LFxuICAgICAgICAgICAgY29vcmRfa2V5OiB0aGlzLmNvb3JkX2tleSxcbiAgICAgICAgICAgIHNvdXJjZTogdGhpcy5zb3VyY2UubmFtZSxcbiAgICAgICAgICAgIGNvb3JkczogdGhpcy5jb29yZHMsXG4gICA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ZSBtYWluIHRocmVhZCAoc28gdGhhdCB3ZSBjYW4gbWluaW1pemUgZGF0YSBleGNoYW5nZSBiZXR3ZWVuIHdvcmtlciBhbmQgbWFpbiB0aHJlYWQpXG4gICAgc3RhdGljIGJ1aWxkR2VvbWV0cnkgKHRpbGUsIGxheWVycywgcnVsZXMsIHN0eWxlcykge1xuICAgICAgICB0aWxlLmRlYnVnLnJlbmRlcmluZyA9ICtuZXcgRGF0ZSgpO1xuICAgICAgICB0aWxlLmRlYnVnLmZlYXR1cmVzID0gMDtcblxuICAgICAgICBsZXQgZGF0YSA9IHRpbGUuc291cmNlX2RhdGE7XG5cbiAgICAgICAgQ29sbGlzaW9uLnN0YXJ0VGlsZSh0aWxlLmtleSk7XG5cbiAgICAgICAgLy8gVHJlYXQgdG9wLWxldmVsIHN0eWxlIHJ1bGVzIGFzICdsYXllcnMnXG4gICAgICAgIGZvciAobGV0IGxheWVyX25hbWUgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICBsZXQgbGF5ZXIgPSBsYXllcnNbbGF5ZXJfbmFtZV07XG4gICAgICAgICAgICAvLyBTa2lwIGxheWVycyB3aXRoIG5vIGRhdGEgc291cmNlIGRlZmluZWRcbiAgICAgICAgICAgIGlmICghbGF5ZXIgfHwgIWxheWVyLmRhdGEpIHtcbiAgICAgICAgICAgICAgICBsb2cud2FybihgTGF5ZXIgJHtsYXllcn0gd2FzIGRlZmluZWQgd2l0aG91dCBhIGdlb21ldHJ5IGRhdGEgc291cmNlIGFuZCB3aWxsIG5vdCBiZSByZW5kZXJlZC5gKTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gU291cmNlIG5hbWVzIGRvbid0IG1hdGNoXG4gICAgICAgICAgICBpZiAobGF5ZXIuZGF0YS5zb3VyY2UgIT09IHRpbGUuc291cmNlKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEdldCBkYXRhIGZvciBvbmUgb3IgbW9yZSBsYXllcnMgZnJvbSBzb3VyY2VcbiAgICAgICAgICAgIGxldCBzb3VyY2VfbGF5ZXJzID0gVGlsZS5nZXREYXRhRm9yU291cmNlKGRhdGEsIGxheWVyLmRhdGEsIGxheWVyX25hbWUpO1xuXG4gICAgICAgICAgICAvLyBSZW5kZXIgZmVhdHVyZXMgaW4gbGF5ZXJcbiAgICAgICAgICAgIGZvciAobGV0IHM9MDsgcyA8IHNvdXJjZV9sYXllcnMubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgc291cmNlX2xheWVyID0gc291cmNlX2xheWVyc1tzXTtcbiAgICAgICAgICAgICAgICBsZXQgZ2VvbSA9IHNvdXJjZV9sYXllci5nZW9tO1xuICAgICAgICAgICAgICAgIGlmICghZ2VvbSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmb3IgKGxldCBmID0gMDsgZiA8IGdlb20uZmVhdHVyZXMubGVuZ3RoOyBmKyspIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZlYXR1cmUgPSBnZW9tLmZlYXR1cmVzW2ZdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS5nZW9tZXRyeSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gc2tpcCBmZWF0dXJlcyB3L28gZ2VvbWV0cnkgKHZhbGlkIEdlb0pTT04pXG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBsZXQgY29udGV4dCA9IFN0eWxlUGFyc2VyLmdldEZlYXR1cmVQYXJzZUNvbnRleHQoZmVhdHVyZSwgdGlsZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQubGF5ZXIgPSBzb3VyY2VfbGF5ZXIubGF5ZXI7IC8vIGFkZCBkYXRhIHNvdXJjZSBsYXllciBuYW1lXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gR2V0IGRyYXcgZ3JvdXBzIGZvciB0aGlzIGZlYXR1cmVcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxheWVyX3J1bGVzID0gcnVsZXNbbGF5ZXJfbmFtZV07XG4gICAgICAgICAgICAgICAgICAgIGxldCBkcmF3X2dyb3VwcyA9IGxheWVyX3J1bGVzLmJ1aWxkRHJhd0dyb3Vwcyhjb250ZXh0LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFkcmF3X2dyb3Vwcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBSZW5kZXIgZHJhdyBncm91cHNcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgZ3JvdXBfbmFtZSBpbiBkcmF3X2dyb3Vwcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGdyb3VwID0gZHJhd19ncm91cHNbZ3JvdXBfbmFtZV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWdyb3VwLnZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHRvIHN0eWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGVfbmFtZSA9IGdyb3VwLnN0eWxlIHx8IGdyb3VwX25hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNbc3R5bGVfbmFtZV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3R5bGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cud2FybihgU3R5bGUgJyR7c3R5bGVfbmFtZX0nIG5vdCBmb3VuZCBmb3IgcnVsZSBpbiBsYXllciAnJHtsYXllcl9uYW1lfSc6YCwgZ3JvdXAsIGZlYXR1cmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LnByb3BlcnRpZXMgPSBncm91cC5wcm9wZXJ0aWVzOyAvLyBhZGQgcnVsZS1zcGVjaWZpYyBwcm9wZXJ0aWVzIHRvIGNvbnRleHRcblxuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuYWRkRmVhdHVyZShmZWF0dXJlLCBncm91cCwgY29udGV4dCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQucHJvcGVydGllcyA9IG51bGw7IC8vIGNsZWFyIGdyb3VwLXNwZWNpZmljIHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRpbGUuZGVidWcuZmVhdHVyZXMrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGlsZS5kZWJ1Zy5yZW5kZXJpbmcgPSArbmV3IERhdGUoKSAtIHRpbGUuZGVidWcucmVuZGVyaW5nO1xuXG4gICAgICAgIC8vIEZpbmFsaXplIGFycmF5IGJ1ZmZlciBmb3IgZWFjaCByZW5kZXIgc3R5bGVcbiAgICAgICAgbGV0IHRpbGVfc3R5bGVzID0gU3R5bGVNYW5hZ2VyLnN0eWxlc0ZvclRpbGUodGlsZS5rZXkpO1xuICAgICAgICB0aWxlLm1lc2hfZGF0YSA9IHt9O1xuICAgICAgICBsZXQgcXVldWUgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgcz0wOyBzIDwgdGlsZV9zdHlsZXMubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgIGxldCBzdHlsZV9uYW1lID0gdGlsZV9zdHlsZXNbc107XG4gICAgICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNbc3R5bGVfbmFtZV07XG4gICAgICAgICAgICBxdWV1ZS5wdXNoKHN0eWxlLmVuZERhdGEodGlsZS5rZXkpLnRoZW4oKHN0eWxlX2RhdGEpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoc3R5bGVfZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICB0aWxlLm1lc2hfZGF0YVtzdHlsZV9uYW1lXSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRleF9kYXRhOiBzdHlsZV9kYXRhLnZlcnRleF9kYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgdW5pZm9ybXM6IHN0eWxlX2RhdGEudW5pZm9ybXMsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlczogc3R5bGVfZGF0YS50ZXh0dXJlc1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBQcm9taXNlLmFsbChxdWV1ZSkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICBDb2xsaXNpb24ucmVzZXRUaWxlKHRpbGUua2V5KTtcblxuICAgICAgICAgICAgLy8gUmV0dXJuIGtleXMgdG8gYmUgdHJhbnNmZXJlZCB0byBtYWluIHRocmVhZFxuICAgICAgICAgICAgcmV0dXJuIFsnbWVzaF9kYXRhJ107XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAgICBSZXRyaWV2ZXMgZ2VvbWV0cnkgZnJvbSBhIHRpbGUgYWNjb3JkaW5nIHRvIGEgZGF0YSBzb3VyY2UgZGVmaW5pdGlvblxuICAgICAgICBSZXR1cm5zIGFuIGFycmF5IG9mIG9iamVjdHMgd2l0aDpcbiAgICAgICAgICAgIGxheWVyOiBzb3VyY2UgbGF5ZXIgbmFtZVxuICAgICAgICAgICAgZ2VvbTogR2VvSlNPTiBGZWF0dXJlQ29sbGVjdGlvblxuICAgICovXG4gICAgc3RhdGljIGdldERhdGFGb3JTb3VyY2UgKHNvdXJjZV9kYXRhLCBzb3VyY2VfY29uZmlnLCBkZWZhdWx0X2xheWVyID0gbnVsbCkge1xuICAgICAgICB2YXIgbGF5ZXJzID0gW107XG5cbiAgICAgICAgaWYgKHNvdXJjZV9jb25maWcgIT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gSWYgbm8gbGF5ZXIgc3BlY2lmaWVkLCBhbmQgYSBkZWZhdWx0IHNvdXJjZSBsYXllciBleGlzdHNcbiAgICAgICAgICAgIGlmICghc291cmNlX2NvbmZpZy5sYXllciAmJiBzb3VyY2VfZGF0YS5sYXllcnMuX2RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICBsYXllcnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGxheWVyOiAnX2RlZmF1bHQnLFxuICAgICAgICAgICAgICAgICAgICBnZW9tOiBzb3VyY2VfZGF0YS5sYXllcnMuX2RlZmF1bHRcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIElmIG5vIGxheWVyIHNwZWNpZmllZCwgYW5kIGEgZGVmYXVsdCByZXF1ZXN0ZWQgbGF5ZXIgZXhpc3RzXG4gICAgICAgICAgICBlbHNlIGlmICghc291cmNlX2NvbmZpZy5sYXllciAmJiBkZWZhdWx0X2xheWVyKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBsYXllcjogZGVmYXVsdF9sYXllcixcbiAgICAgICAgICAgICAgICAgICAgZ2VvbTogc291cmNlX2RhdGEubGF5ZXJzW2RlZmF1bHRfbGF5ZXJdXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBJZiBhIGxheWVyIGlzIHNwZWNpZmllZCBieSBuYW1lLCB1c2UgaXRcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBzb3VyY2VfY29uZmlnLmxheWVyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGxheWVycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXI6IHNvdXJjZV9jb25maWcubGF5ZXIsXG4gICAgICAgICAgICAgICAgICAgIGdlb206IHNvdXJjZV9kYXRhLmxheWVyc1tzb3VyY2VfY29uZmlnLmxheWVyXVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gSWYgbXVsdGlwbGUgbGF5ZXJzIGFyZSBzcGVjaWZpZWQgYnkgbmFtZSwgY29tYmluZSB0aGVtXG4gICAgICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHNvdXJjZV9jb25maWcubGF5ZXIpKSB7XG4gICAgICAgICAgICAgICAgc291cmNlX2NvbmZpZy5sYXllci5mb3JFYWNoKGxheWVyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl0gJiYgc291cmNlX2RhdGEubGF5ZXJzW2xheWVyXS5mZWF0dXJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdlb206IHNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBBc3NlbWJsZSBhIGN1c3RvbSBsYXllciB2aWEgYSBmdW5jdGlvbiwgd2hpY2ggaXMgY2FsbGVkIHdpdGggYWxsIHNvdXJjZSBsYXllcnNcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBzb3VyY2VfY29uZmlnLmxheWVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBnZW9tOiBzb3VyY2VfY29uZmlnLmxheWVyKHNvdXJjZV9kYXRhLmxheWVycylcbiAgICAgICAgICAgICAgICAgICAgLy8gY3VzdG9tIGxheWVyIGhhcyBubyBuYW1lXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGF5ZXJzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAgIENhbGxlZCBvbiBtYWluIHRocmVhZCB3aGVuIGEgd2ViIHdvcmtlciBjb21wbGV0ZXMgcHJvY2Vzc2luZ1xuICAgICAgIGZvciBhIHNpbmdsZSB0aWxlLlxuICAgICovXG4gICAgYnVpbGRNZXNoZXMoc3R5bGVzKSB7XG4gICAgICAgIGlmICh0aGlzLmVycm9yKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDbGVhbnVwIGV4aXN0aW5nIFZCT3NcbiAgICAgICAgdGhpcy5mcmVlUmVzb3VyY2VzKCk7XG5cbiAgICAgICAgLy8gRGVidWdcbiAgICAgICAgdGhpcy5kZWJ1Zy5nZW9tZXRyaWVzID0gMDtcbiAgICAgICAgdGhpcy5kZWJ1Zy5idWZmZXJfc2l6ZSA9IDA7XG5cbiAgICAgICAgLy8gQ3JlYXRlIFZCT3NcbiAgICAgICAgbGV0IG1lc2hfZGF0YSA9IHRoaXMubWVzaF9kYXRhO1xuICAgICAgICBpZiAobWVzaF9kYXRhKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBzIGluIG1lc2hfZGF0YSkge1xuICAgICAgICAgICAgICAgIGlmIChtZXNoX2RhdGFbc10udmVydGV4X2RhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWJ1Zy5idWZmZXJfc2l6ZSArPSBtZXNoX2RhdGFbc10udmVydGV4X2RhdGEuYnl0ZUxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdHlsZXNbc10pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZy53YXJuKGBDb3VsZCBub3QgY3JlYXRlIG1lc2ggYmVjYXVzZSBzdHlsZSAnJHtzfScgbm90IGZvdW5kLCBmb3IgdGlsZSAke3RoaXMua2V5fSwgYWJvcnRpbmcgdGlsZWApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tZXNoZXMgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWVzaGVzW3NdID0gc3R5bGVzW3NdLm1ha2VNZXNoKG1lc2hfZGF0YVtzXS52ZXJ0ZXhfZGF0YSwgbWVzaF9kYXRhW3NdKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWJ1Zy5nZW9tZXRyaWVzICs9IHRoaXMubWVzaGVzW3NdLmdlb21ldHJ5X2NvdW50O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiBvd25lcnNoaXAgdG8gdGV4dHVyZXMgaWYgbmVlZGVkXG4gICAgICAgICAgICAgICAgaWYgKG1lc2hfZGF0YVtzXS50ZXh0dXJlcykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmVzLnB1c2goLi4ubWVzaF9kYXRhW3NdLnRleHR1cmVzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmRlYnVnLmdlb21fcmF0aW8gPSAodGhpcy5kZWJ1Zy5nZW9tZXRyaWVzIC8gdGhpcy5kZWJ1Zy5mZWF0dXJlcykudG9GaXhlZCgxKTtcbiAgICAgICAgdGhpcy5tZXNoX2RhdGEgPSBudWxsOyAvLyBUT0RPOiBtaWdodCB3YW50IHRvIHByZX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xlLnNvdXJjZV9kYXRhICYmIHRpbGUuc291cmNlX2RhdGEucmVxdWVzdCkge1xuICAgICAgICAgICAgICAgIHRpbGUuc291cmNlX2RhdGEucmVxdWVzdC5hYm9ydCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgVGlsZS5hYm9ydEJ1aWxkKHRpbGUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbWVyZ2Uob3RoZXIpIHtcbiAgICAgICAgZm9yICh2YXIga2V5IGluIG90aGVyKSB7XG4gICAgICAgICAgICBpZiAoa2V5ICE9PSAna2V5Jykge1xuICAgICAgICAgICAgICAgIHRoaXNba2V5XSA9IG90aGVyW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG59XG4iLCJpbXBvcnQgVGlsZSBmcm9tICcuL3RpbGUnO1xuaW1wb3J0IFV0aWxzIGZyb20gJy4vdXRpbHMvdXRpbHMnO1xuXG5pbXBvcnQgbG9nIGZyb20gJ2xvZ2xldmVsJztcblxudmFyIFRpbGVNYW5hZ2VyO1xuXG5leHBvcnQgZGVmYXVsdCBUaWxlTWFuYWdlciA9IHtcblxuICAgIGluaXQoc2NlbmUpIHtcbiAgICAgICAgdGhpcy5zY2VuZSA9IHNjZW5lO1xuICAgICAgICB0aGlzLnRpbGVzID0ge307XG4gICAgICAgIHRoaXMudmlzaWJsZV9jb29yZHMgPSB7fTtcbiAgICAgICAgdGhpcy5xdWV1ZWRfY29vcmRzID0gW107XG4gICAgICAgIHRoaXMuYnVpbGRpbmdfdGlsZXMgPSBudWxsO1xuICAgIH0sXG5cbiAgICBkZXN0cm95KCkge1xuICAgICAgICB0aGlzLmZvckVhY2hUaWxlKHRpbGUgPT4gdGlsZS5kZXN0cm95KCkpO1xuICAgICAgICB0aGlzLnRpbGVzID0ge307XG4gICAgICAgIHRoaXMudmlzaWJsZV9jb29yZHMgPSB7fTtcbiAgICAgICAgdGhpcy5xdWV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Vtb3ZlX3RpbGVzID0gW107XG4gICAgICAgIGZvciAobGV0IHQgaW4gdGhpcy50aWxlcykge1xuICAgICAgICAgICAgbGV0IHRpbGUgPSB0aGlzLnRpbGVzW3RdO1xuICAgICAgICAgICAgaWYgKGZpbHRlcih0aWxlKSkge1xuICAgICAgICAgICAgICAgIHJlbW92ZV90aWxlcy5wdXNoKHQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZvciAobGV0IHI9MDsgciA8IHJlbW92ZV90aWxlcy5sZW5ndGg7IHIrKykge1xuICAgICAgICAgICAgbGV0IGtleSA9IHJlbW92ZV90aWxlc1tyXTtcbiAgICAgICAgICAgIHRoaXMucmVtb3ZlVGlsZShrZXkpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHVwZGF0ZVRpbGVzRm9yVmlldygpIHtcbiAgICAgICAgLy8gRmluZCB2aXNpYmxlIHRpbGVzIGFuZCBsb2FkIG5ldyBvbmVzXG4gICAgICAgIHRoaXMudmlzaWJsZV9jb29yZHMgPSB7fTtcbiAgICAgICAgbGV0IHRpbGVfY29vcmRzID0gdGhpcy5zY2VuZS5maW5kVmlzaWJsZVRpbGVDb29yZGluYXRlcygpO1xuICAgICAgICBmb3IgKGxldCBjb29yZHMgb2YgdGlsZV9jb29yZHMpIHtcbiAgICAgICAgICAgIHRoaXMucXVldWVDb29yZGluYXRlKGNvb3Jkcyk7XG4gICAgICAgICAgICB0aGlzLnZpc2libGVfY29vcmRzW1RpbGUuY29vcmRLZXkoY29vcmRzKV0gPSBjb29yZHM7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBSZW1vdmUgdGlsZXMgdG9vIGZhciBvdXRzaWRlIG9mIHZpZXdcbiAgICAgICAgdGhpcy5zY2VuZS5wcnVuZVRpbGVDb29yZGluYXRlc0ZvclZpZXcoKTsgLy8gVE9ETzogcmV0dXJuIGxpc3QgdG8gcHJ1bmU/XG5cbiAgICAgICAgdGhpcy5mb3JFYWNoVGlsZSh0aWxlID0+IHtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlVmlzaWJpbGl0eSh0aWxlKTtcbiAgICAgICAgICAgIHRpbGUudXBkYXRlKHRoaXMuc2NlbmUpO1xuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgdXBkYXRlVmlzaWJpbGl0eSh0aWxlKSB7XG4gICAgICAgIGlmICh0aWxlLnN0eWxlX3pvb20gIT09IHRoaXMuc2NlbmUudGlsZV96b29tKSB7XG4gICAgICAgICAgICB0aWxlLnZpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnZpc2libGVfY29vcmRzW3RpbGUuY29vcmRfa2V5XSkge1xuICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIC8vIGJydXRlIGZvcmNlXG4gICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gdGhpcy52aXNpYmxlX2Nvb3Jkcykge1xuICAgICAgICAgICAgICAgIGlmIChUaWxlLmlzQ2hpbGQodGlsZS5jb29yZHMsIHRoaXMudmlzaWJsZV9jb29yZHNba2V5XSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgZ2V0UmVuZGVyYWJsZVRpbGVzKCkge1xuICAgICAgICBsZXQgdGlsZXMgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgdCBpbiB0aGlzLnRpbGVzKSB7XG4gICAgICAgICAgICBsZXQgdGlsZSA9IHRoaXMudGlsZXNbdF07XG4gICAgICAgICAgICBpZiAodGlsZS52aXNpYmxlICY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ICAgICAgICAgICByZXR1cm4gKGJkID4gYWQgPyAtMSA6IChiZCA9PT0gYWQgPyAwIDogMSkpO1xuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5xdWV1ZWRfY29vcmRzLmZvckVhY2goY29vcmRzID0+IHRoaXMubG9hZENvb3JkaW5hdGUoY29vcmRzKSk7XG4gICAgICAgIHRoaXMucXVldWVkX2Nvb3JkcyA9IFtdO1xuICAgIH0sXG5cbiAgICAvLyBMb2FkIGFsbCB0aWxlcyB0byBjb3ZlciBhIGdpdmVuIGxvZ2ljYWwgdGlsZSBjb29yZGluYXRlXG4gICAgbG9hZENvb3JkaW5hdGUoY29vcmRzKSB7XG4gICAgICAgIC8vIFNraXAgaWYgbm90IGF0IGN1cnJlbnQgc2NlbmUgem9vbVxuICAgICAgICBpZiAoY29vcmRzLnogIT09IHRoaXMuc2NlbmUuY2VudGVyX3RpbGUueikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRGV0ZXJtaW5lIG5lY2Vzc2FyeSB0aWxlcyBmb3IgZWFjaCBzb3VyY2VcbiAgICAgICAgZm9yIChsZXQgc291cmNlIG9mIFV0aWxzLnZhbHVlcyh0aGlzLnNjZW5lLnNvdXJjZXMpKSB7XG4gICAgICAgICAgICBpZiAoIXNvdXJjZS50aWxlZCkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQga2V5ID0gVGlsZS5rZXkoY29vcmRzLCBzb3VyY2UsIHRoaXMuc2NlbmUudGlsZV96b29tKTtcbiAgICAgICAgICAgIGlmIChrZXkgJiYgIXRoaXMuaGFzVGlsZShrZXkpKSB7XG4gICAgICAgICAgICAgICAgbGV0IHRpbGUgPSBUaWxlLmNyZWF0ZSh7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgY29vcmRzLFxuICAgICAgICAgICAgICAgICAgIC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gIHZhciByZWxhdGl2ZSA9ICh1cmxbMF0gIT09ICcvJyk7XG4gICAgICAgIHZhciBiYXNlX2luZm87XG4gICAgICAgIGlmIChiYXNlKSB7XG4gICAgICAgICAgICBiYXNlX2luZm8gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7IC8vIHVzZSBhIHRlbXBvcmFyeSBlbGVtZW50IHRvIHBhcnNlIFVSTFxuICAgICAgICAgICAgYmFzZV9pbmZvLmhyZWYgPSBiYXNlO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgYmFzZV9pbmZvID0gd2luZG93LmxvY2F0aW9uO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHJlbGF0aXZlKSB7XG4gICAgICAgICAgICBsZXQgcGF0aCA9IGJhc2VfaW5mby5ocmVmLm1hdGNoKC8oW15cXCNdKykvKTsgLy8gc3RyaXAgaGFzaFxuICAgICAgICAgICAgcGF0aCA9IChwYXRoICYmIHBhdGgubGVuZ3RoID4gMSkgPyBwYXRoWzBdIDogJyc7XG4gICAgICAgICAgICB1cmwgPSBwYXRoICsgdXJsO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gRWFzeSB3YXlcbiAgICAgICAgICAgIGlmIChiYXNlX2luZm8ub3JpZ2luKSB7XG4gICAgICAgICAgICAgICAgdXJsID0gYmFzZV9pbmZvLm9yaWdpbiArICcvJyArIHVybDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEhhcmQgd2F5IChJRTExKVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG9yaWdpbiA9IHVybC5tYXRjaCgvXigoaHR0cHxodHRwc3xkYXRhfGJsb2IpOlxcL1xcL1teXFwvXSpcXC8pLyk7XG4gICAgICAgICAgICAgICAgb3JpZ2luID0gKG9yaWdpbiAmJiBvcmlnaW4ubGVuZ3RoID4gMSkgPyBvcmlnaW5bMF0gOiAnJ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F1ZXN0LnN0YXR1cyA9PT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgaWYgKFsndGV4dCcsICdqc29uJ10uaW5kZXhPZihyZXF1ZXN0LnJlc3BvbnNlVHlwZSkgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcXVlc3QucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVxdWVzdC5yZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWplY3QoRXJyb3IoJ1JlcXVlc3QgZXJyb3Igd2l0aCBhIHN0YXR1cyBvZiAnICsgcmVxdWVzdC5zdGF0dXNUZXh0KSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHJlcXVlc3Qub25lcnJvciA9IChldnQpID0+IHtcbiAgICAgICAgICAgIHJlamVjdChFcnJvcignVGhlcmUgd2FzIGEgbmV0d29yayBlcnJvcicgKyBldnQudG9TdHJpbmcoKSkpO1xuICAgICAgICB9O1xuICAgICAgICByZXF1ZXN0Lm9udGltZW91dCA9IChldnQpID0+IHtcbiAgICAgICAgICAgIHJlamVjdChFcnJvcigndGltZW91dCAnKyBldnQudG9TdHJpbmcoKSkpO1xuICAgICAgICB9O1xuICAgICAgICByZXF1ZXN0LnNlbmQoKTtcbiAgICB9KTtcblxuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShwcm9taXNlLCAncmVxdWVzdCcsIHtcbiAgICAgICAgdmFsdWU6IHJlcXVlc3RcbiAgICB9KTtcblxuICAgIHJldHVybiBwcm9taXNlO1xufTtcblxuVXRpbHMucGFyc2VSZXNvdXJjZSA9IGZ1bmN0aW9uIChib2R5KSB7XG4gICAgdmFyIGRhdGE7XG4gICAgdHJ5IHtcbiAgICAgICAgZGF0YSA9IHlhb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9sIHBvaW50cyB4IGlzIGJldHdlZW5cbiAgICBlbHNlIHtcbiAgICAgICAgZm9yICh2YXIgaT0wOyBpIDwgcG9pbnRzLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICAgICAgaWYgKHggPj0gcG9pbnRzW2ldWzBdICYmIHggPCBwb2ludHNbaSsxXVswXSkge1xuICAgICAgICAgICAgICAgIC8vIExpbmVhciBpbnRlcnBvbGF0aW9uXG4gICAgICAgICAgICAgICAgeDEgPSBwb2ludHNbaV1bMF07XG4gICAgICAgICAgICAgICAgeDIgPSBwb2ludHNbaSsxXVswXTtcblxuICAgICAgICAgICAgICAgIC8vIE11bHRpcGxlIHZhbHVlc1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHBvaW50c1tpXVsxXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgeSA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBjPTA7IGMgPCBwb2ludHNbaV1bMV0ubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeTEgPSB0cmFuc2Zvcm0ocG9pbnRzW2ldWzFdW2NdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5MiA9IHRyYW5zZm9ybShwb2ludHNbaSsxXVsxXVtjXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHkyIC0geTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeVtjXSA9IGQgKiAoeCAtIHgxKSAvICh4MiAtIHgxKSArIHkxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBvaW50c1tpKzFdWzFdW2NdIC0gcG9pbnRzW2ldWzFdW2NdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlbY10gPSBkICogKHggLSB4MSkgLyAoeDIgLSB4MSkgKyBwb2ludHNbaV1bMV1bY107XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gU2luZ2xlIHZhbHVlXG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB5MSA9IHRyYW5zZm9ybShwb2ludHNbaV1bMV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgeTIgPSB0cmFuc2Zvcm0ocG9pbnRzW2krMV1bMV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHkyIC0geTE7XG4gICAgICAgICAgICAgICAgICAgICAgICB5ID0gZCAqICh4IC0geDEpIC8gKHgyIC0geDEpICsgeTE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gcG9pbnRzW2krMV1bMV0gLSBwb2ludHNbaV1bMV07XG4gICAgICAgICAgICAgICAgICAgICAgICB5ID0gZCAqICh4IC0geDEpIC8gKHgyIC0geDEpICsgcG9pbnRzW2ldWzFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB5O1xufTtcblxuLy8gSXRlcmF0b3JzIChFUzYgZ2VuZXJhdG9ycylcblxuLy8gSXRlcmF0b3IgZm9yIGtleS92YWx1ZSBwYWlycyBvZiBhbiBvYmplY3RcblV0aWxzLmVudHJpZXMgPSBmdW5jdGlvbiogKG9iaikge1xuICAgIGZvciAodmFyIGtleSBvZiBPYmplY3Qua2V5cyhvYmopKSB7XG4gICAgICAgIHlpZWxkIFtrZXksIG9ialtrZXldXTtcbiAgICB9XG59O1xuXG4vLyBJdGVyYXRvciBmb3IgdmFsdWVzIG9mIGFuIG9iamVjdFxuVXRpbHMudmFsdWVzID0gZnVuY3Rpb24qIChvYmopIHtcbiAgICBmb3IgKHZhciBrZXkgb2YgT2JqZWN0LmtleXMob2JqKSkge1xuICAgICAgICB5aWVsZCBvYmpba2V5XTtcbiAgICB9XG59O1xuXG4vLyBSZWN1cnNpdmUgaXRlcmF0b3JzIGZvciBhbGwgcHJvcGVydGllcyBvZiBhbiBvYmplY3QsIG5vIG1hdHRlciBob3cgZGVlcGx5IG5lc3RlZFxuLy8gVE9ETzogZml4IGZvciBjaXJjdWxhciBzdHJ1Y3R1cmVzXG5VdGlscy5yZWN1cnNlRW50cmllcyA9IGZ1bmN0aW9uKiAob2JqKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBmb3IgKHZhciBrZXkgb2YgT2JqZWN0LmtleXMob2JqKSkge1xuICAgICAgICBpZiAob2JqW2tleV0pIHtcbiAgICAgICAgICAgIHlpZWxkIFtrZXksIG9ialtrZXldLCBvYmpdO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvYmpba2V5XSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCogVXRpbHMucmVjdXJzZUVudHJpZXMob2JqW2tleV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufTtcblxuVXRpbHMucmVjdXJzZVZhbHVlcyA9IGZ1bmN0aW9uKiAob2JqKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBmb3IgKHZhciBrZXkgb2YgT2JqZWN0LmtleXMob2JqKSkge1xuICAgICAgICBpZiAob2JqW2tleV0pIHtcbiAgICAgICAgICAg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AgICB3b3JrZXIuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgaWYgKGV2ZW50LmRhdGEudHlwZSAhPT0gJ3dvcmtlcl9yZXBseScpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIFBhc3MgdGhlIHJlc3VsdCB0byB0aGUgcHJvbWlzZVxuICAgICAgICAgICAgdmFyIGlkID0gZXZlbnQuZGF0YS5tZXNzYWdlX2lkO1xuICAgICAgICAgICAgaWYgKG1lc3NhZ2VzW2lkXSkge1xuICAgICAgICAgICAgICAgIGlmIChldmVudC5kYXRhLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VzW2lkXS5yZWplY3QoZXZlbnQuZGF0YS5lcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlc1tpZF0ucmVzb2x2ZShldmVudC5kYXRhLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkZWxldGUgbWVzc2FnZXNbaWRdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBMaXN0ZW4gZm9yIG1lc3NhZ2VzIGluaXRpYXRpbmcgYSBjYWxsIGZyb20gdGhlIHdvcmtlciwgZGlzcGF0Y2ggdGhlbSxcbiAgICAgICAgLy8gYW5kIHNlbmQgYW55IHJldHVybiB2YWx1ZSBiYWNrIHRvIHRoZSB3b3JrZXJcbiAgICAgICAgd29ya2VyLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgIC8vIFVuaXF1ZSBpZCBmb3IgdGhpcyBtZXNzYWdlICYgcmV0dXJuIGNhbGwgdG8gbWFpbiB0aHJlYWRcbiAgICAgICAgICA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VjYXVzZSBvYmplY3QgaGFzIG5vIG1ldGhvZCB3aXRoIHRoYXQgbmFtZWApO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgcmVzdWx0LCBlcnJvcjtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gbWV0aG9kLmFwcGx5KHRhcmdldCwgZXZlbnQuZGF0YS5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoKGUpIHtcbiAgICAgICAgICAgICAgICAvLyBUaHJvd24gZXJyb3JzIHdpbGwgYmUgcGFzc2VkIGJhY2sgKGluIHN0cmluZyBmb3JtKSB0byB3b3JrZXJcbiAgICAgICAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIFNlbmQgcmV0dXJuIHZhbHVlIHRvIHdvcmtlclxuICAgICAgICAgICAgbGV0IHRyYW5zZmVyYWJsZXM7XG4gICAgICAgICAgICAvLyBBc3luYyByZXN1bHRcbiAgICAgICAgICAgIGlmIChyZXN1bHQgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnRoZW4oKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZmVyYWJsZXMgPSBmaW5kVHJhbnNmZXJhYmxlcyh2YWx1ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdtYWluX3JlcGx5JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VfaWQ6IGlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgfSwgdHJhbnNmZXJhYmxlcy5tYXAodCA9PiB0Lm9iamVjdCkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGZyZWVUcmFuc2ZlcmFibGVzKHRyYW5zZmVyYWJsZXMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNmZXJhYmxlcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBVdGlscy5sb2coJ3RyYWNlJywgYCcke21ldGhvZF9uYW1lfScgdHJhbnNmZXJyZWQgJHt0cmFuc2ZlcmFibGVzLmxlbmd0aH0gb2JqZWN0cyB0byB3b3JrZXIgdGhyZWFkYCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIH0sIChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB3b3JrZXIucG9zdE1lc3NhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ21haW5fcmVwbHknLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZV9pZDogaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcjogKGVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyBgJHtlcnJvci5tZXNzYWdlfTogJHtlcnJvci5zdGFja31gIDogZXJyb3IpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gSW1tZWRpYXRlIHJlc3VsdFxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdHJhbnNmZXJhYmxlcyA9IGZpbmRUcmFuc2ZlcmFibGVzKHJlc3VsdCk7XG5cbiAgICAgICAgICAgICAgICB3b3JrZXIucG9zdE1lc3NhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnbWFpbl9yZXBseScsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VfaWQ6IGlkLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHQsXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOiAoZXJyb3IgaW5zdGFuY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mFtZV0gPT09ICdmdW5jdGlvbicpICYmIHRhcmdldFttZXRob2RfbmFtZV07XG5cbiAgICAgICAgaWYgKCFtZXRob2QpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBXb3JrZXIgYnJva2VyIGNvdWxkIG5vdCBkaXNwYXRjaCBtZXNzYWdlIHR5cGUgJHtldmVudC5kYXRhLm1ldGhvZH0gYmVjYXVzZSB3b3JrZXIgaGFzIG5vIG1ldGhvZCB3aXRoIHRoYXQgbmFtZWApO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlc3VsdCwgZXJyb3I7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXN1bHQgPSBtZXRob2QuYXBwbHkodGFyZ2V0LCBldmVudC5kYXRhLm1lc3NhZ2UpO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoKGUpIHtcbiAgICAgICAgICAgIC8vIFRocm93biBlcnJvcnMgd2lsbCBiZSBwYXNzZWQgYmFjayAoaW4gc3RyaW5nIGZvcm0pIHRvIG1haW4gdGhyZWFkXG4gICAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTZW5kIHJldHVybiB2YWx1ZSB0byBtYWluIHRocmVhZFxuICAgICAgICBsZXQgdHJhbnNmZXJhYmxlcztcbiAgICAgICAgLy8gQXN5bmMgcmVzdWx0XG4gICAgICAgIGlmIChyZXN1bHQgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICByZXN1bHQudGhlbigodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICB0cmFuc2ZlcmFibGVzID0gZmluZFRyYW5zZmVyYWJsZXModmFsdWUpO1xuXG4gICAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd3b3JrZXJfcmVwbHknLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlX2lkOiBpZCxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogdmFsdWVcbiAgICAgICAgICAgICAgICB9LCB0cmFuc2ZlcmFibGVzLm1hcCh0ID0+IHQub2JqZWN0KSk7XG5cbiAgICAgICAgICAgICAgICBmcmVlVHJhbnNmZXJhYmxlcyh0cmFuc2ZlcmFibGVzKTtcbiAgICAgICAgICAgICAgICBpZiAodHJhbnNmZXJhYmxlcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIFV0aWxzLmxvZygndHJhY2UnLCBgJyR7bWV0aG9kX25hbWV9JyB0cmFuc2ZlcnJlZCAke3RyYW5zZmVyYWJsZXMubGVuZ3RofSBvYmplY3RzIHRvIG1haW4gdGhyZWFkYCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd3b3JrZXJfcmVwbHknLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlX2lkOiBpZCxcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6IChlcnJvciBpbnN0YW5jZW9mIEVycm9yID8gYCR7ZXJyb3IubWVzc2FnZX06ICR7ZXJyb3Iuc3RhY2t9YCA6IGVycm9yKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gSW1tZWRpYXRlIHJlc3VsdFxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRyYW5zZmVyYWJsZXMgPSBmaW5kVHJhbnNmZXJhYmxlcyhyZXN1bHQpO1xuXG4gICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnd29ya2VyX3JlcGx5JyxcbiAgICAgICAgICAgICAgICBtZXNzYWdlX2lkOiBpZCxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHQsXG4gICA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gYzEgPSAocDFbMF0gKiBwMlsxXSkgLSAocDFbMV0gKiBwMlswXSk7IC8vIHgxKnkyIC0geTEqeDJcbiAgICB2YXIgYzIgPSAocDNbMF0gKiBwNFsxXSkgLSAocDNbMV0gKiBwNFswXSk7IC8vIHgzKnk0IC0geTMqeDRcbiAgICB2YXIgZGVub20gPSAoYjEgKiBhMikgLSAoYTEgKiBiMik7XG5cbiAgICBpZiAoTWF0aC5hYnMoZGVub20pID4gcGFyYWxsZWxfdG9sZXJhbmNlKSB7XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAoKGMxICogYjIpIC0gKGIxICogYzIpKSAvIGRlbm9tLFxuICAgICAgICAgICAgKChjMSAqIGEyKSAtIChhMSAqIGMyKSkgLyBkZW5vbVxuICAgICAgICBdO1xuICAgIH1cbiAgICByZXR1cm4gbnVsbDsgLy8gcmV0dXJuIG51bGwgaWYgbGluZXMgYXJlIChjbG9zZSB0bykgcGFyYWxsZWxcbn07XG4iXX0= +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2FycmF5L2Zyb20uanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2dldC1pdGVyYXRvci5qcyIsIm5vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvaXMtaXRlcmFibGUuanMiLCJub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL21hcC5qcyIsIm5vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvbWF0aC9sb2cyLmpzIiwibm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvYXNzaWduLmpzIiwibm9kZV9tb2R1bGVzL2JhYmVsLXJ1b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cIikge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSByZXR1cm4gbWV0aG9kIHRocmV3IGFuIGV4Y2VwdGlvbiwgbGV0IHRoYXRcbiAgICAgICAgICAgICAgICAvLyBleGNlcHRpb24gcHJldmFpbCBvdmVyIHRoZSBvcmlnaW5hbCByZXR1cm4gb3IgdGhyb3cuXG4gICAgICAgICAgICAgICAgbWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgICAgICAgIGFyZyA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKG1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgICAgICAvLyBDb250aW51ZSB3aXRoIHRoZSBvdXRlciByZXR1cm4sIG5vdyB0aGF0IHRoZSBkZWxlZ2F0ZVxuICAgICAgICAgICAgICAvLyBpdGVyYXRvciBoYXMgYmVlbiB0ZXJtaW5hdGVkLlxuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goZGVsZWdhdGUuaXRlcmF0b3JbbWV0aG9kXSwgZGVsZWdhdGUuaXRlcmF0b3IsIGFyZyk7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgY29udGV4dC5kZWxlZ2F0ZSA9IG51bGw7XG5cbiAgICAgICAgICAgIC8vIExpa2UgcmV0dXJuaW5nIGdlbmVyYXRvci50aHJvdyh1bmNhdWdodCksIGJ1dCB3aXRob3V0IHRoZVxuICAgICAgICAgICAgLy8gb3ZlcmhlYWQgb2YgYW4gZXh0cmEgZnVuY3Rpb24gY2FsbC5cbiAgICAgICAgICAgIG1ldGhvZCA9IFwidGhyb3dcIjtcbiAgICAgICAgICAgIGFyZyA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBEZWxlZ2F0ZSBnZW5lcmF0b3IgcmFuIGFuZCBoYW5kbGVkIGl0cyBvd24gZXhjZXB0aW9ucyBzb1xuICAgICAgICAgIC8vIHJlZ2FyZGxlc3Mgb2Ygd2hhdCB0aGUgbWV0aG9kIHdhcywgd2UgY29udGludWUgYXMgaWYgaXQgaXNcbiAgICAgICAgICAvLyBcIm5leHRcIiB3aXRoIGFuIHVuZGVmaW5lZCBhcmcuXG4gICAgICAgICAgbWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgYXJnID0gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgdmFyIGluZm8gPSByZWNvcmQuYXJnO1xuICAgICAgICAgIGlmIChpbmZvLmRvbmUpIHtcbiAgICAgICAgICAgIGNvbnRleHRbZGVsZWdhdGUucmVzdWx0TmFtZV0gPSBpbmZvLnZhbHVlO1xuICAgICAgICAgICAgY29udGV4dC5uZXh0ID0gZGVsZWdhdGUubmV4dExvYztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuICAgICAgICAgICAgcmV0dXJuIGluZm87XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kZWxlZ2F0ZSA9IG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRZaWVsZCkge1xuICAgICAgICAgICAgY29udGV4dC5zZW50ID0gYXJnO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb250ZXh0LnNlbnQgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG1ldGhvZCA9PT0gXCJ0aHJvd1wi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kZWZpbmVkO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBzdG9wOiBmdW5jdGlvbiBzdG9wKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbiBkaXNwYXRjaEV4Y2VwdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcbiAgICAgICAgcmV0dXJuICEhY2F1Z2h0O1xuICAgICAgfVxuXG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA9PT0gXCJyb290XCIpIHtcbiAgICAgICAgICAvLyBFeG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Gx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24gY29tcGxldGUocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHwgcmVjb3JkLnR5cGUgPT09IFwiY29udGludWVcIikge1xuICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICB0aGlzLnJ2YWwgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbiBmaW5pc2goZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5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QVJHUy5qb2luKCksICcpeycsXG4gICAgJ3ZhciAnLCBFTEVNX1NJWkUsICc9MionLCBESU1FTlNJT04sICc7J11cblxuICB2YXIgcmVkTG9vcCA9IFxuICAgICdmb3IodmFyIGk9JyArIFJFRF9TVEFSVCArICcsJyArIFJFRF9QVFIgKyAnPScgKyBFTEVNX1NJWkUgKyAnKicgKyBSRURfU1RBUlQgKyAnOycgK1xuICAgICAgICAnaTwnICsgUkVEX0VORCArJzsnICtcbiAgICAgICAgJysraSwnICsgUkVEX1BUUiArICcrPScgKyBFTEVNX1NJWkUgKyAnKXsnICtcbiAgICAgICAgJ3ZhciB4MD0nICsgUkVEX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIFJFRF9QVFIgKyAnXSwnICtcbiAgICAgICAgICAgICd4MT0nICsgUkVEX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIFJFRF9QVFIgKyAnKycgKyBESU1FTlNJT04gKyAnXSwnICtcbiAgICAgICAgICAgICd4aT0nICsgUkVEX0lOREVYICsgJ1tpXTsnXG5cbiAgdmFyIGJsdWVMb29wID0gXG4gICAgJ2Zvcih2YXIgaj0nICsgQkxVRV9TVEFSVCArICcsJyArIEJMVUVfUFRSICsgJz0nICsgRUxFTV9TSVpFICsgJyonICsgQkxVRV9TVEFSVCArICc7JyArXG4gICAgICAgICdqPCcgKyBCTFVFX0VORCArICc7JyArXG4gICAgICAgICcrK2osJyArIEJMVUVfUFRSICsgJys9JyArIEVMRU1fU0laRSArICcpeycgK1xuICAgICAgICAndmFyIHkwPScgKyBCTFVFX0JPWEVTICsgJ1snICsgQVhJUyArICcrJyArIEJMVUVfUFRSICsgJ10sJyArXG4gICAgICAgICAgICAoZnVsbCA/ICd5MT0nICsgQkxVRV9CT1hFUyArICdbJyArIEFYSVMgKyAnKycgKyBCTFVFX1BUUiArICcrJyArIERJTUVOU0lPTiArICddLCcgOiAnJykgK1xuICAgICAgICAgICAgJ3lpPScgKyBCTFVFX0lOREVYICsgJ1t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ZUlkKSB7XG4gICAgICBjb250aW51ZVxuICAgIH1cbiAgICB2YXIgcjAgPSByZWRbcmVkUHRyK2F4aXNdXG4gICAgdmFyIHIxID0gcmVkW3JlZFB0citheGlzK2RdXG4gICAgaWYoYmx1ZVggPCByMCB8fCByMSA8IGJsdWVYKSB7XG4gICAgICBjb250aW51ZVxuICAgIH1cbiAgICBmb3IodmFyIGo9YXhpcysxOyBqPGQ7ICsraikge1xuICAgICAgdmFyIHIwID0gcmVkW3JlZFB0citqXVxuICAgICAgdmFyIHIxID0gcmVkW3JlZFB0citqK2RdXG4gICAgICB2YXIgYjAgPSBibHVlW2JsdWVQdHIral1cbiAgICAgIHZhciBiMSA9IGJsdWVbYmx1ZVB0citqK2RdXG4gICAgICBpZihyMSA8IGIwIHx8IGIxIDwgcjApIHtcbiAgICAgICAgY29udGludWUgcmVkX2xvb3BcbiAgICAgIH1cbiAgICB9XG4gICAgdmFyIHJldHZhbCA9IHZpc2l0KHJlZElkLCBibHVlSWQpXG4gICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgIHJldHVybiByZXR2YWxcbiAgICB9XG4gIH1cbn1cblxuLy9UaGUgbWFpbiBib3ggaW50ZXJzZWN0aW9uIHJvdXRpbmVcbmZ1bmN0aW9uIGJveEludGVyc2VjdEl0ZXIoXG4gIGQsIHZpc2l0LCBpbml0RnVsbCxcbiAgeFNpemUsIHhCb3hlcywgeEluZGV4LFxuICB5U2l6ZSwgeUJveGVzLCB5SW5kZXgpIHtcblxuICAvL1Jlc2VydmUgbWVtb3J5IGZvciBzdGFja1xuICBpdGVySW5pdChkLCB4U2l6ZSArIHlTaXplKVxuXG4gIHZhciB0b3AgID0gMFxuICB2YXIgZWxlbVNpemUgPSAyICogZFxuICB2YXIgcmV0dmFsXG5cbiAgaXRlclB1c2godG9wKyssXG4gICAgICAwLFxuICAgICAgMCwgeFNpemUsXG4gICAgICAwLCB5U2l6ZSxcbiAgICAgIGluaXRGdWxsID8gMTYgOiAw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bGlwKSB7XG4gICAgICByZWQgICAgICAgICA9IHlCb3hlc1xuICAgICAgcmVkSW5kZXggICAgPSB5SW5kZXhcbiAgICAgIGJsdWUgICAgICAgID0geEJveGVzXG4gICAgICBibHVlSW5kZXggICA9IHhJbmRleFxuICAgIH1cblxuICAgIGlmKHN0YXRlICYgMikge1xuICAgICAgcmVkRW5kID0gcGFydGl0aW9uU3RhcnRMZXNzVGhhbihcbiAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgcmVkU3RhcnQsIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgaGkpXG4gICAgICBpZihyZWRTdGFydCA+PSByZWRFbmQpIHtcbiAgICAgICAgY29udGludWVcbiAgICAgIH1cbiAgICB9XG4gICAgaWYoc3RhdGUgJiA0KSB7XG4gICAgICByZWRTdGFydCA9IHBhcnRpdGlvbkVuZExlc3NUaGFuRXF1YWwoXG4gICAgICAgIGQsIGF4aXMsXG4gICAgICAgIHJlZFN0YXJ0LCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgIGxvKVxuICAgICAgaWYocmVkU3RhcnQgPj0gcmVkRW5kKSB7XG4gICAgICAgIGNvbnRpbnVlXG4gICAgICB9XG4gICAgfVxuICAgIFxuICAgIHZhciByZWRDb3VudCAgPSByZWRFbmQgIC0gcmVkU3RhcnRcbiAgICB2YXIgYmx1ZUNvdW50ID0gYmx1ZUVuZCAtIGJsdWVTdGFydFxuXG4gICAgaWYoZnVsbCkge1xuICAgICAgaWYoZCAqIHJlZENvdW50ICogKHJlZENvdW50ICsgYmx1ZUNvdW50KSA8IFNDQU5fQ09NUExFVEVfQ1VUT0ZGKSB7XG4gICAgICAgIHJldHZhbCA9IHN3ZWVwLnNjYW5Db21wbGV0ZShcbiAgICAgICAgICBkLCBheGlzLCB2aXNpdCwgXG4gICAgICAgICAgcmVkU3RhcnQsIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICBibHVlU3RhcnQsIGJsd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FydCwgcmVkMCwgcmVkLCByZWRJbmRleClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR2YWwgPSBzd2VlcC5zd2VlcEJpcGFydGl0ZShcbiAgICAgICAgICAgIGQsIHZpc2l0LFxuICAgICAgICAgICAgcmVkU3RhcnQsIHJlZDAsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICBibHVlU3RhcnQsIGJsdWVFbmQsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgfVxuICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgIHJldHVybiByZXR2YWxcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaXRlclB1c2godG9wKyssXG4gICAgICAgICAgYXhpcysxLFxuICAgICAgICAgIHJlZFN0YXJ0LCByZWQwLFxuICAgICAgICAgIGJsdWVTdGFydCwgYmx1ZUVuZCxcbiAgICAgICAgICBmbGlwLFxuICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICAgIGl0ZXJQdXNoKHRvcCsrLFxuICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICBibHVlU3RhcnQsIGJsdWVFbmQsXG4gICAgICAgICAgcmVkU3RhcnQsIHJlZDAsXG4gICAgICAgICAgZmxpcF4xLFxuICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICB9XG4gICAgfVxuXG4gICAgLy9EaXZpZGUgYW5kIGNvbnF1ZXIgcGhhc2VcbiAgICBpZihyZWQwIDwgcmVkRW5kKSB7XG5cbiAgICAgIC8vQ3V0IGJsdWUgaW50byAzIHBhcnRzOlxuICAgICAgLy9cbiAgICAgIC8vICBQb2ludHMgPCBtaWQgcG9pbnRcbiAgICAgIC8vICBQb2ludHMgPSBtaWQgcG9pbnRcbiAgICAgIC8vICBQb2ludHMgPiBtaWQgcG9pbnRcbiAgICAgIC8vXG4gICAgICB2YXIgYmx1ZTAgPSBmaW5kTWVk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YWwgPSBvbmVQb2ludEZ1bGwoXG4gICAgICAgICAgICBkLCBheGlzLCB2aXNpdCxcbiAgICAgICAgICAgIHJlZDAsIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgIGJsdWUwLCBibHVlLCBibHVlSW5kZXhbYmx1ZTBdKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHZhbCA9IG9uZVBvaW50UGFydGlhbChcbiAgICAgICAgICAgIGQsIGF4aXMsIHZpc2l0LCBmbGlwLFxuICAgICAgICAgICAgcmVkMCwgcmVkRW5kLCByZWQsIHJlZEluZGV4LFxuICAgICAgICAgICAgYmx1ZTAsIGJsdWUsIGJsdWVJbmRleFtibHVlMF0pXG4gICAgICAgIH1cbiAgICAgICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgICAgICByZXR1cm4gcmV0dmFsXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZihibHVlMCA8IGJsdWUxKSB7XG4gICAgICAgIHZhciByZWQxXG4gICAgICAgIGlmKGZ1bGwpIHtcbiAgICAgICAgICAvL0lmIGZ1bGwgaW50ZXJzZWN0aW9uLCBuZWVkIHRvIGhhbmRsZSBzcGVjaWFsIGNhc2VcbiAgICAgICAgICByZWQxID0gcGFydGl0aW9uQ29udGFpbnNQb2ludChcbiAgICAgICAgICAgIGQsIGF4aXMsXG4gICAgICAgICAgICByZWQwLCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICBtaWQpXG4gICAgICAgICAgaWYocmVkMCA8IHJlZDEpIHtcbiAgICAgICAgICAgIHZhciByZWRYID0gcGFydGl0aW9uU3RhcnRFcXVhbChcbiAgICAgICAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgICAgbWlkKVxuICAgICAgICAgICAgaWYoYXhpcyA9PT0gZC0yKSB7XG4gICAgICAgICAgICAgIC8vRGVnZW5lcmF0ZSBzd2VlcCBpbnRlcnNlY3Rpb246XG4gICAgICAgICAgICAgIC8vICBbcmVkMCwgcmVkWF0gd2l0aCBbYmx1ZTAsIGJsdWUxXVxuICAgICAgICAgICAgICBpZihyZWQwIDwgcmVkWCkge1xuICAgICAgICAgICAgICAgIHJldHZhbCA9IHN3ZWVwLnN3ZWVwQ29tcGxldGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIHJlZDAsIHJlZFgsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHZhbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vTm9ybWFsIHN3ZWVwIGludGVyc2VjdGlvbjpcbiAgICAgICAgICAgICAgLy8gIFtyZWRYLCByZWQxXSB3aXRoIFtibHVlMCwgYmx1ZTFdXG4gICAgICAgICAgICAgIGlmKHJlZFggPCByZWQxKSB7XG4gICAgICAgICAgICAgICAgcmV0dmFsID0gc3dlZXAuc3dlZXBCaXBhcnRpdGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsIGJsdWUsIGJsdWVJbmRleClcbiAgICAgICAgICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHZhbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYocmVkMCA8IHJlZFgpIHtcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIHJlZDAsIHJlZFgsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsXG4gICAgICAgICAgICAgICAgICAxNixcbiAgICAgICAgICAgICAgICAgIC1JbmZpbml0eSwgSW5maW5pdHkpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYocmVkWCA8IHJlZDEpIHtcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsXG4gICAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsXG4gICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgLUluZmluaXR5LCBJbmZpbml0eSlcbiAgICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICAgIGF4aXMrMSxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSxcbiAgICAgICAgICAgICAgICAgIHJlZFgsIHJlZDEsXG4gICAgICAgICAgICAgICAgICAxLFxuICAgICAgICAgICAgICAgICAgLUluZmluaXR5LCBJbmZpbml0eSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZihmbGlwKSB7XG4gICAgICAgICAgICByZWQxID0gcGFydGl0aW9uQ29udGFpbnNQb2ludFByb3BlcihcbiAgICAgICAgICAgICAgZCwgYXhpcyxcbiAgICAgICAgICAgICAgcmVkMCwgcmVkRW5kLCByZWQsIHJlZEluZGV4LFxuICAgICAgICAgICAgICBtaWQpXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlZDEgPSBwYXJ0aXRpb25Db250YWluc1BvaW50KFxuICAgICAgICAgICAgICBkLCBheGlzLFxuICAgICAgICAgICAgICByZWQwLCByZWRFbmQsIHJlZCwgcmVkSW5kZXgsXG4gICAgICAgICAgICAgIG1pZClcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYocmVkMCA8IHJlZDEpIHtcbiAgICAgICAgICAgIGlmKGF4aXMgPT09IGQtMikge1xuICAgICAgICAgICAgICBpZihmbGlwKSB7XG4gICAgICAgICAgICAgICAgcmV0dmFsID0gc3dlZXAuc3dlZXBCaXBhcnRpdGUoXG4gICAgICAgICAgICAgICAgICBkLCB2aXNpdCxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSwgYmx1ZSwgYmx1ZUluZGV4LFxuICAgICAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleClcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR2YWwgPSBzd2VlcC5zd2VlcEJpcGFydGl0ZShcbiAgICAgICAgICAgICAgICAgIGQsIHZpc2l0LFxuICAgICAgICAgICAgICAgICAgcmVkMCwgcmVkMSwgcmVkLCByZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgIGJsdWUwLCBibHVlMSwgYmx1ZSwgYmx1ZUluZGV4KVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICBheGlzKzEsXG4gICAgICAgICAgICAgICAgcmVkMCwgcmVkMSxcbiAgICAgICAgICAgICAgICBibHVlMCwgYmx1ZTEsXG4gICAgICAgICAgICAgICAgZmxpcCxcbiAgICAgICAgICAgICAgICAtSW5maW5pdHksIEluZmluaXR5KVxuICAgICAgICAgICAgICBpdGVyUHVzaCh0b3ArKyxcbiAgICAgICAgICAgICAgICBheGlzKzEsXG4gICAgICAgICAgICAgICAgYmx1ZTAsIGJsdWUxLFxuICAgICAgICAgICAgICAgIHJlZDA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FxuICAgIGlmKGUgPCAwKSB7XG4gICAgICAvL0NyZWF0ZSBldmVudFxuICAgICAgdmFyIGlkID0gLShlPj4xKSAtIDFcblxuICAgICAgLy9JbnRlcnNlY3Qgd2l0aCBjb21tb25cbiAgICAgIGZvcih2YXIgaj0wOyBqPGNvbW1vbkFjdGl2ZTsgKytqKSB7XG4gICAgICAgIHZhciByZXR2YWwgPSB2aXNpdChDT01NT05fU1dFRVBfUVVFVUVbal0sIGlkKVxuICAgICAgICBpZihyZXR2YWwgIT09IHZvaWQgMCkge1xuICAgICAgICAgIHJldHVybiByZXR2YWxcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZihjb2xvciAhPT0gMCkge1xuICAgICAgICAvL0ludGVyc2VjdCB3aXRoIHJlZFxuICAgICAgICBmb3IodmFyIGo9MDsgajxyZWRBY3RpdmU7ICsraikge1xuICAgICAgICAgIHZhciByZXR2YWwgPSB2aXNpdChSRURfU1dFRVBfUVVFVUVbal0sIGlkKVxuICAgICAgICAgIGlmKHJldHZhbCAhPT0gdm9pZCAwKSB7XG4gICAgICAgICAgICByZXR1cm4gcmV0dmFsXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmKGNvbG9yICE9PSAxKSB7XG4gICAgICAgIC8vSW50ZXJzZWN0IHdpdGggYmx1ZVxuICAgICAgICBmb3IodmFyIGo9MDsgajxibHVlQWN0aXZlOyArK2opIHtcbiAgICAgICAgICB2YXIgcmV0dmFsID0gdmlzaXQoQkxVRV9TV0VFUF9RVUVVRVtqXSwgaWQpXG4gICAgICAgICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgICAgICAgIHJldHVybiByZXR2YWxcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYoY29sb3IgPT09IDApIHtcbiAgICAgICAgLy9SZWRcbiAgICAgICAgc3FQdXNoKFJFRF9TV0VFUF9RVUVVRSwgUkVEX1NXRUVQX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B8fCBcbiAgICAgICAgICAgICByZWRbcmVkUHRyK2F4aXMrMStkXSA8IGIwKSB7XG4gICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvcih2YXIgaz1heGlzKzI7IGs8ZDsgKytrKSB7XG4gICAgICAgICAgICBpZihibHVlW2JsdWVQdHIgKyBrICsgZF0gPCByZWRbcmVkUHRyICsga10gfHwgXG4gICAgICAgICAgICAgICByZWRbcmVkUHRyICsgayArIGRdIDwgYmx1ZVtibHVlUHRyICsga10pIHtcbiAgICAgICAgICAgICAgY29udGludWUgcmVkX2xvb3BcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgcmVkSWQgID0gcmVkSW5kZXhbb2lkeF1cbiAgICAgICAgICB2YXIgcmV0dmFsXG4gICAgICAgICAgaWYoZmxpcCkge1xuICAgICAgICAgICAgcmV0dmFsID0gdmlzaXQoYmx1ZUlkLCByZWRJZClcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dmFsID0gdmlzaXQocmVkSWQsIGJsdWVJZClcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYocmV0dmFsICE9PSB2b2lkIDApIHtcbiAgICAgICAgICAgIHJldHVybiByZXR2YWwgXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHNxUG9wKFJFRF9TV0VFUF9RVUVVRSwgUkVEX1NXRUVQX0lOREVYLCByZWRBY3RpdmUtLSwgZSAtIHJlZFNoaWZ0KVxuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBzY2FuQ29tcGxldGUoXG4gIGQsIGF4aXMsIHZpc2l0LFxuICByZWRTdGFydCwgIHJlZEVuZCwgcmVkLCByZWRJbmRleCxcbiAgYmx1ZVN0YXJ0LCBibHVlRW5kLCBibHVlLCBibHVlSW5kZXgpIHtcblxuICB2YXIgcHRyICAgICAgPSAwXG4gIHZhciB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VfRkxBR1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWR4IC09IDFcbiAgICAgICAgdmFyIGJsdWVJZCAgPSBibHVlSW5kZXhbaWR4XVxuICAgICAgICB2YXIgYmx1ZVB0ciA9IGVsZW1TaXplICogaWR4XG5cbiAgICAgICAgdmFyIGIwID0gYmx1ZVtibHVlUHRyK2F4aXMrMV1cbiAgICAgICAgdmFyIGIxID0gYmx1ZVtibHVlUHRyK2F4aXMrMStkXVxuXG5yZWRfbG9vcDpcbiAgICAgICAgZm9yKHZhciBqPTA7IGo8cmVkQWN0aXZlOyArK2opIHtcbiAgICAgICAgICB2YXIgb2lkeCAgID0gUkVEX1NXRUVQX1FVRVVFW2pdXG4gICAgICAgICAgdmFyIHJlZElkICA9IHJlZEluZGV4W29pZHhdXG5cbiAgICAgICAgICBpZihyZWRJZCA9PT0gYmx1ZUlkKSB7XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciByZWRQdHIgPSBlbGVtU2l6ZSAqIG9pZHhcbiAgICAgICAgICBpZihiMSA8IHJlZFtyZWRQdHIrYXhpcysxXSB8fCBcbiAgICAgICAgICAgIHJlZFtyZWRQdHIrYXhpcysxK2RdIDwgYjApIHtcbiAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgfVxuICAgICAgICAgIGZvcih2YXIgaz1heGlzKzI7IGs8ZDsgKytrKSB7XG4gICAgICAgICAgICBpZihibHVlW2JsdWVQdHIgKyBrICsgZF0gPCByZWRbcmVkUHRyICsga10gfHwgXG4gICAgICAgICAgICAgICByZWRbcmVkUHRyICsgayArIGRdICAgPCBibHVlW2JsdWVQdHIgKyBrXSkge1xuICAgICAgICAgICAgICBjb250aW51ZSByZWRfbG9vcFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciByZXR2YWwgPSB2aXNpdChyZWRJZCwgYmx1ZUlkKVxuICAgICAgICAgIGlmKHJldHZhbCAhPT0g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CAgICAgICAgIC8vIDwtIHByb21pc2VcbiAgICAgIGM6IFtdLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBhd2FpdGluZyByZWFjdGlvbnNcbiAgICAgIGE6IHVuZGVmaW5lZCwgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBjaGVja2VkIGluIGlzVW5oYW5kbGVkIHJlYWN0aW9uc1xuICAgICAgczogMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHN0YXRlXG4gICAgICBkOiBmYWxzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gPC0gZG9uZVxuICAgICAgdjogdW5kZWZpbmVkLCAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHZhbHVlXG4gICAgICBoOiBmYWxzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gPC0gaGFuZGxlZCByZWplY3Rpb25cbiAgICAgIG46IGZhbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA8LSBub3RpZnlcbiAgICB9O1xuICAgIHRyeSB7XG4gICAgICBleGVjdXRvcihjdHgoJHJlc29sdmUsIHJlY29yZCwgMSksIGN0eCgkcmVqZWN0LCByZWNvcmQsIDEpKTtcbiAgICB9IGNhdGNoKGVycil7XG4gICAgICAkcmVqZWN0LmNhbGwocmVjb3JkLCBlcnIpO1xuICAgIH1cbiAgfTtcbiAgcmVxdWlyZSgnLi8kLnJlZGVmaW5lLWFsbCcpKFAucHJvdG90eXBlLCB7XG4gICAgLy8gMjUuNC41LjMgUHJvbWlzZS5wcm90b3R5cGUudGhlbihvbkZ1bGZpbGxlZCwgb25SZWplY3RlZClcbiAgICB0aGVuOiBmdW5jdGlvbiB0aGVuKG9uRnVsZmlsbGVkLCBvblJlamVjdGVkKXtcbiAgICAgIHZhciByZWFjdGlvbiA9IG5ldyBQcm9taXNlQ2FwYWJpbGl0eShzcGVjaWVzQ29uc3RydWN0b3I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wcmV2ID0gcHJldjtcbiAgICAgICAgICAgIHByZXYubmV4dCA9IG5leHQ7XG5cbiAgICAgICAgICAgIGlmIChlYXIucHJldlopIGVhci5wcmV2Wi5uZXh0WiA9IGVhci5uZXh0WjtcbiAgICAgICAgICAgIGlmIChlYXIubmV4dFopIGVhci5uZXh0Wi5wcmV2WiA9IGVhci5wcmV2WjtcblxuICAgICAgICAgICAgZWFyID0gbmV4dC5uZXh0O1xuICAgICAgICAgICAgc3RvcCA9IG5leHQubmV4dDtcblxuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICBlYXIgPSBuZXh0O1xuXG4gICAgICAgIGlmIChlYXIgPT09IHN0b3ApIHtcbiAgICAgICAgICAgIC8vIGlmIHdlIGNhbid0IGZpbmQgYW55IG1vcmUgZWFycywgdHJ5IGZpbHRlcmluZyBwb2ludHMgYW5kIGN1dHRpbmcgYWdhaW5cbiAgICAgICAgICAgIGlmICghc2Vjb25kUGFzcykgZWFyY3V0TGlua2VkKGVhciwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplLCB0cnVlKTtcbiAgICAgICAgICAgIC8vIGlmIHRoaXMgZGlkbid0IHdvcmssIHRyeSBzcGxpdHRpbmcgdGhlIHJlbWFpbmluZyBwb2x5Z29uIGludG8gdHdvXG4gICAgICAgICAgICBlbHNlIHNwbGl0RWFyY3V0KGVhciwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpc0VhcihlYXIsIG1pblgsIG1pblksIHNpemUpIHtcblxuICAgIHZhciBhID0gZWFyLnByZXYucCxcbiAgICAgICAgYiA9IGVhci5wLFxuICAgICAgICBjID0gZWFyLm5leHQucCxcblxuICAgICAgICBheCA9IGFbMF0sIGJ4ID0gYlswXSwgY3ggPSBjWzBdLFxuICAgICAgICBheSA9IGFbMV0sIGJ5ID0g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AgIG1heFRZID0gYXkgPiBieSA/IChheSA+IGN5ID8gYXkgOiBjeSkgOiAoYnkgPiBjeSA/IGJ5IDogY3kpLFxuXG4gICAgICAgICAgICAvLyB6LW9yZGVyIHJhbmdlIGZvciB0aGUgY3VycmVudCB0cmlhbmdsZSBiYm94O1xuICAgICAgICAgICAgbWluWiA9IHpPcmRlcihtaW5UWCwgbWluVFksIG1pblgsIG1pblksIHNpemUpLFxuICAgICAgICAgICAgbWF4WiA9IHpPcmRlcihtYXhUWCwgbWF4VFksIG1pblgsIG1pblksIHNpemUpO1xuXG4gICAgICAgIC8vIGZpcnN0IGxvb2sgZm9yIHBvaW50cyBpbnNpZGUgdGhlIHRyaWFuZ2xlIGluIGluY3JlYXNpbmcgei1vcmRlclxuICAgICAgICBub2RlID0gZWFyLm5leHRaO1xuXG4gICAgICAgIHdoaWxlIChub2RlICYmIG5vZGUueiA8PSBtYXhaKSB7XG4gICAgICAgICAgICBwID0gbm9kZS5wO1xuICAgICAgICAgICAgbm9kZSA9IG5vZGUubmV4dFo7XG4gICAgICAgICAgICBpZiAocCA9PT0gYSB8fCBwID09PSBjKSBjb250aW51ZTtcblxuICAgICAgICAgICAgcHggPSBwWzBdO1xuICAgICAgICAgICAgcHkgPSBwWzFdO1xuXG4gICAgICAgICAgICBzID0gY2F5ICogcHggKyBhY3ggKiBweSAtIGFjZDtcbiAgICAgICAgICAgIGlmIChzID49IDApIHtcbiAgICAgICAgICAgICAgICB0ID0gYWJ5ICogcHggKyBiYXggKiBweSArIGFiZDtcbiAgICAgICAgICAgICAgICBpZiAodCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGsgPSBBIC0gcyAtIHQ7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoayA+PSAwKSAmJiAoKHMgJiYgdCkgfHwgKHMgJiYgaykgfHwgKHQgJiYgaykpKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gdGhlbiBsb29rIGZvciBwb2ludHMgaW4gZGVjcmVhc2luZyB6LW9yZGVyXG4gICAgICAgIG5vZGUgPSBlYXIucHJldlo7XG5cbiAgICAgICAgd2hpbGUgKG5vZGUgJiYgbm9kZS56ID49IG1pblopIHtcbiAgICAgICAgICAgIHAgPSBub2RlLnA7XG4gICAgICAgICAgICBub2RlID0gbm9kZS5wcmV2WjtcbiAgICAgICAgICAgIGlmIChwID09PSBhIHx8IHAgPT09IGMpIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBweCA9IHBbMF07XG4gICAgICAgICAgICBweSA9IHBbMV07XG5cbiAgICAgICAgICAgIHMgPSBjYXkgKiBweCArIGFjeCAqIHB5IC0gYWNkO1xuICAgICAgICAgICAgaWYgKHMgPj0gMCkge1xuICAgICAgICAgICAgICAgIHQgPSBhYnkgKiBweCArIGJheCAqIHB5ICsgYWJkO1xuICAgICAgICAgICAgICAgIGlmICh0ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgayA9IEEgLSBzIC0gdDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChrID49IDApICYmICgocyAmJiB0KSB8fCAocyAmJiBrKSB8fCAodCAmJiBrKSkpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgIC8vIGlmIHdlIGRvbid0IHVzZSB6LW9yZGVyIGN1cnZlIGhhc2gsIHNpbXBseSBpdGVyYXRlIHRocm91Z2ggYWxsIG90aGVyIHBvaW50c1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG5vZGUgPSBlYXIubmV4dC5uZXh0O1xuXG4gICAgICAgIHdoaWxlIChub2RlICE9PSBlYXIucHJldikge1xuICAgICAgICAgICAgcCA9IG5vZGUucDtcbiAgICAgICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG5cbiAgICAgICAgICAgIHB4ID0gcFswXTtcbiAgICAgICAgICAgIHB5ID0gcFsxXTtcblxuICAgICAgICAgICAgcyA9IGNheSAqIHB4ICsgYWN4ICogcHkgLSBhY2Q7XG4gICAgICAgICAgICBpZiAocyA+PSAwKSB7XG4gICAgICAgICAgICAgICAgdCA9IGFieSAqIHB4ICsgYmF4ICogcHkgKyBhYmQ7XG4gICAgICAgICAgICAgICAgaWYgKHQgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICBrID0gQSAtIHMgLSB0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGsgPj0gMCkgJiYgKChzICYmIHQpIHx8IChzICYmIGspIHx8ICh0ICYmIGspKSkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xufVxuXG5mdW5jdGlvbiBzcGxpdEVhcmN1dChzdGFydCwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplKSB7XG4gICAgLy8gZmluZCBhIHZhbGlkIGRpYWdvbmFsIHRoYXQgZGl2aWRlcyB0aGUgcG9seWdvbiBpbnRvIHR3b1xuICAgIHZhciBhID0gc3RhcnQ7XG4gICAgZG8ge1xuICAgICAgICB2YXIgYiA9IGEubmV4dC5uZXh0O1xuICAgICAgICB3aGlsZSAoYiAhPT0gYS5wcmV2KSB7XG4gICAgICAgICAgICBpZiAoaXNWYWxpZERpYWdvbmFsKGEsIGIpKSB7XG4gICAgICAgICAgICAgICAgLy8gc3BsaXQgdGhlIHBvbHlnb24gaW4gdHdvIGJ5IHRoZSBkaWFnb25hbFxuICAgICAgICAgICAgICAgIHZhciBjID0gc3BsaXRQb2x5Z29uKGEsIGIpO1xuXG4gICAgICAgICAgICAgICAgLy8gcnVuIGVhcmN1dCBvbiBlYWNoIGhhbGZcbiAgICAgICAgICAgICAgICBlYXJjdXRMaW5rZWQoYSwgdHJpYW5nbGVzLCBtaW5YLCBtaW5ZLCBzaXplKTtcbiAgICAgICAgICAgICAgICBlYXJjdXRM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AwICYmIG14ID49IGJ4KSB7XG4gICAgICAgICAgICBzID0gKGNweSAqIG14ICsgcGN4ICogbXkgLSBwY2QpICogc2lnbjtcbiAgICAgICAgICAgIGlmIChzID49IDApIHtcbiAgICAgICAgICAgICAgICB0ID0gKHBieSAqIG14ICsgYnB4ICogbXkgKyBwYmQpICogc2lnbjtcblxuICAgICAgICAgICAgICAgIGlmICh0ID49IDAgJiYgQSAqIHNpZ24gLSBzIC0gdCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRhbiA9IE1hdGguYWJzKHB5IC0gbXkpIC8gYW14OyAvLyB0YW5nZW50aWFsXG4gICAgICAgICAgICAgICAgICAgIGlmICh0YW4gPCB0YW5NaW4gJiYgbG9jYWxseUluc2lkZShub2RlLCBob2xlTm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1Ob2RlID0gbm9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhbk1pbiA9IHRhbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1Ob2RlO1xufVxuXG5mdW5jdGlvbiBpbmRleEN1cnZlKHN0YXJ0LCBtaW5YLCBtaW5ZLCBzaXplKSB7XG4gICAgdmFyIG5vZGUgPSBzdGFydDtcblxuICAgIGRvIHtcbiAgICAgICAgbm9kZS56ID0gbm9kZS56IHx8IHpPcmRlcihub2RlLnBbMF0sIG5vZGUucFsxXSwgbWluWCwgbWluWSwgc2l6ZSk7XG4gICAgICAgIG5vZGUucHJldlogPSBub2RlLnByZXY7XG4gICAgICAgIG5vZGUubmV4dFogPSBub2RlLm5leHQ7XG4gICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG4gICAgfSB3aGlsZSAobm9kZSAhPT0gc3RhcnQpO1xuXG4gICAgbm9kZS5wcmV2Wi5uZXh0WiA9IG51bGw7XG4gICAgbm9kZS5wcmV2WiA9IG51bGw7XG5cbiAgICBzb3J0TGlua2VkKG5vZGUpO1xufVxuXG4vLyBTaW1vbiBUYXRoYW0ncyBsaW5rZWQgbGlzdCBtZXJnZSBzb3J0IGFsZ29yaXRobVxuLy8gaHR0cDovL3d3dy5jaGlhcmsuZ3JlZW5lbmQub3JnLnVrL35zZ3RhdGhhbS9hbGdvcml0aG1zL2xpc3Rzb3J0Lmh0bWxcbmZ1bmN0aW9uIHNvcnRMaW5rZWQobGlzdCkge1xuICAgIHZhciBpLCBwLCBxLCBlLCB0YWlsLCBudW1NZXJnZXMsIHBTaXplLCBxU2l6ZSxcbiAgICAgICAgaW5TaXplID0gMTtcblxuICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgIHAgPSBsaXN0O1xuICAgICAgICBsaXN0ID0gbnVsbDtcbiAgICAgICAgdGFpbCA9IG51bGw7XG4gICAgICAgIG51bU1lcmdlcyA9IDA7XG5cbiAgICAgICAgd2hpbGUgKHApIHtcbiAgICAgICAgICAgIG51bU1lcmdlcysrO1xuICAgICAgICAgICAgcSA9IHA7XG4gICAgICAgICAgICBwU2l6ZSA9IDA7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgaW5TaXplOyBpKyspIHtcbiAgICAgICAgICAgICAgICBwU2l6ZSsrO1xuICAgICAgICAgICAgICAgIHEgPSBxLm5leHRaO1xuICAgICAgICAgICAgICAgIGlmICghcSkgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHFTaXplID0gaW5TaXplO1xuXG4gICAgICAgICAgICB3aGlsZSAocFNpemUgPiAwIHx8IChxU2l6ZSA+IDAgJiYgcSkpIHtcblxuICAgICAgICAgICAgICAgIGlmIChwU2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBlID0gcTtcbiAgICAgICAgICAgICAgICAgICAgcSA9IHEubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHFTaXplLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChxU2l6ZSA9PT0gMCB8fCAhcSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gcDtcbiAgICAgICAgICAgICAgICAgICAgcCA9IHAubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHBTaXplLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwLnogPD0gcS56KSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSBwO1xuICAgICAgICAgICAgICAgICAgICBwID0gcC5uZXh0WjtcbiAgICAgICAgICAgICAgICAgICAgcFNpemUtLTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlID0gcTtcbiAgICAgICAgICAgICAgICAgICAgcSA9IHEubmV4dFo7XG4gICAgICAgICAgICAgICAgICAgIHFTaXplLS07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRhaWwpIHRhaWwubmV4dFogPSBlO1xuICAgICAgICAgICAgICAgIGVsc2UgbGlzdCA9IGU7XG5cbiAgICAgICAgICAgICAgICBlLnByZXZaID0gdGFpbDtcbiAgICAgICAgICAgICAgICB0YWlsID0gZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcCA9IHE7XG4gICAgICAgIH1cblxuICAgICAgICB0YWlsLm5leHRaID0gbnVsbDtcblxuICAgICAgICBpZiAobnVtTWVyZ2VzIDw9IDEpIHJldHVybiBsaXN0O1xuXG4gICAgICAgIGluU2l6ZSAqPSAyO1xuICAgIH1cbn1cblxuLy8gei1vcmRlciBvZiBhIHBvaW50IGdpdmVuIGNvb3JkcyBhbmQgYmJveFxuZnVuY3Rpb24gek9yZGVyKHgsIHksIG1pblgsIG1pblksIHNpemUpIHtcbiAgICAvLyBjb29yZHMgYXJlIHRyYW5zZm9ybWVkIGludG8gKDAuLjEwMDApIGludGVnZXIgcmFuZ2VcbiAgICB4ID0gMTAwMCAqICh4IC0gb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ICAgICAgbWF4ID0gZmVhdHVyZS5tYXhbYXhpc107XG5cbiAgICAgICAgaWYgKG1pbiA+PSBrMSAmJiBtYXggPD0gazIpIHsgLy8gdHJpdmlhbCBhY2NlcHRcbiAgICAgICAgICAgIGNsaXBwZWQucHVzaChmZWF0dXJlKTtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9IGVsc2UgaWYgKG1pbiA+IGsyIHx8IG1heCA8IGsxKSBjb250aW51ZTsgLy8gdHJpdmlhbCByZWplY3RcblxuICAgICAgICB2YXIgc2xpY2VzID0gdHlwZSA9PT0gMSA/XG4gICAgICAgICAgICAgICAgY2xpcFBvaW50cyhnZW9tZXRyeSwgazEsIGsyLCBheGlzKSA6XG4gICAgICAgICAgICAgICAgY2xpcEdlb21ldHJ5KGdlb21ldHJ5LCBrMSwgazIsIGF4aXMsIGludGVyc2VjdCwgdHlwZSA9PT0gMyk7XG5cbiAgICAgICAgaWYgKHNsaWNlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgIC8vIGlmIGEgZmVhdHVyZSBnb3QgY2xpcHBlZCwgaXQgd2lsbCBsaWtlbHkgZ2V0IGNsaXBwZWQgb24gdGhlIG5leHQgem9vbSBsZXZlbCBhcyB3ZWxsLFxuICAgICAgICAgICAgLy8gc28gdGhlcmUncyBubyBuZWVkIHRvIHJlY2FsY3VsYXRlIGJib3hlc1xuICAgICAgICAgICAgY2xpcHBlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeTogc2xpY2VzLFxuICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgICAgdGFnczogZmVhdHVyZXNbaV0udGFncyB8fCBudWxsLFxuICAgICAgICAgICAgICAgIG1pbjogZmVhdHVyZS5taW4sXG4gICAgICAgICAgICAgICAgbWF4OiBmZWF0dXJlLm1heFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gY2xpcHBlZC5sZW5ndGggPyBjbGlwcGVkIDogbnVsbDtcbn1cblxuZnVuY3Rpb24gY2xpcFBvaW50cyhnZW9tZXRyeSwgazEsIGsyLCBheGlzKSB7XG4gICAgdmFyIHNsaWNlID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGdlb21ldHJ5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBhID0gZ2VvbWV0cnlbaV0sXG4gICAgICAgICAgICBhayA9IGFbYXhpc107XG5cbiAgICAgICAgaWYgKGFrID49IGsxICYmIGFrIDw9IGsyKSBzbGljZS5wdXNoKGEpO1xuICAgIH1cbiAgICByZXR1cm4gc2xpY2U7XG59XG5cbmZ1bmN0aW9uIGNsaXBHZW9tZXRyeShnZW9tZXRyeSwgazEsIGsyLCBheGlzLCBpbnRlcnNlY3QsIGNsb3NlZCkge1xuXG4gICAgdmFyIHNsaWNlcyA9IFtdO1xuXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBnZW9tZXRyeS5sZW5ndGg7IGkrKykge1xuXG4gICAgICAgIHZhciBhayA9IDAsXG4gICAgICAgICAgICBiayA9IDAsXG4gICAgICAgICAgICBiID0gbnVsbCxcbiAgICAgICAgICAgIHBvaW50cyA9IGdlb21ldHJ5W2ldLFxuICAgICAgICAgICAgYXJlYSA9IHBvaW50cy5hcmVhLFxuICAgICAgICAgICAgZGlzdCA9IHBvaW50cy5kaXN0LFxuICAgICAgICAgICAgbGVuID0gcG9pbnRzLmxlbmd0aCxcbiAgICAgICAgICAgIGEsIGosIGxhc3Q7XG5cbiAgICAgICAgdmFyIHNsaWNlID0gW107XG5cbiAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbiAtIDE7IGorKykge1xuICAgICAgICAgICAgYSA9IGIgfHwgcG9pbnRzW2pdO1xuICAgICAgICAgICAgYiA9IHBvaW50c1tqICsgMV07XG4gICAgICAgICAgICBhayA9IGJrIHx8IGFbYXhpc107XG4gICAgICAgICAgICBiayA9IGJbYXhpc107XG5cbiAgICAgICAgICAgIGlmIChhayA8IGsxKSB7XG5cbiAgICAgICAgICAgICAgICBpZiAoKGJrID4gazIpKSB7IC8vIC0tLXwtLS0tLXwtLT5cbiAgICAgICAgICAgICAgICAgICAgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazEpLCBpbnRlcnNlY3QoYSwgYiwgazIpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjbG9zZWQpIHNsaWNlID0gbmV3U2xpY2Uoc2xpY2VzLCBzbGljZSwgYXJlYSwgZGlzdCk7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJrID49IGsxKSBzbGljZS5wdXNoKGludGVyc2VjdChhLCBiLCBrMSkpOyAvLyAtLS18LS0+ICB8XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYWsgPiBrMikge1xuXG4gICAgICAgICAgICAgICAgaWYgKChiayA8IGsxKSkgeyAvLyA8LS18LS0tLS18LS0tXG4gICAgICAgICAgICAgICAgICAgIHNsaWNlLnB1c2goaW50ZXJzZWN0KGEsIGIsIGsyKSwgaW50ZXJzZWN0KGEsIGIsIGsxKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2xvc2VkKSBzbGljZSA9IG5ld1NsaWNlKHNsaWNlcywgc2xpY2UsIGFyZWEsIGRpc3QpO1xuXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChiayA8PSBrMikgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazIpKTsgLy8gfCAgPC0tfC0tLVxuXG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2xpY2UucHVzaChhKTtcblxuICAgICAgICAgICAgICAgIGlmIChiayA8IGsxKSB7IC8vIDwtLXwtLS0gIHxcbiAgICAgICAgICAgICAgICAgICAgc2xpY2UucHVzaChpbnRlcnNlY3QoYSwgYiwgazEpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjbG9zZWQpIHNsaWNlID0gb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vbHlnb24nKSB7XG4gICAgICAgIHJpbmdzID0gW107XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb29yZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHJpbmdzLnB1c2gocHJvamVjdChjb29yZHNbaV0sIHRvbGVyYW5jZSkpO1xuICAgICAgICB9XG4gICAgICAgIGZlYXR1cmVzLnB1c2goY3JlYXRlKHRhZ3MsIHR5cGUgPT09ICdQb2x5Z29uJyA/IDMgOiAyLCByaW5ncykpO1xuXG4gICAgfSBlbHNlIGlmICh0eXBlID09PSAnTXVsdGlQb2x5Z29uJykge1xuICAgICAgICByaW5ncyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29vcmRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgY29vcmRzW2ldLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgcmluZ3MucHVzaChwcm9qZWN0KGNvb3Jkc1tpXVtqXSwgdG9sZXJhbmNlKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZmVhdHVyZXMucHVzaChjcmVhdGUodGFncywgMywgcmluZ3MpKTtcblxuICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ0dlb21ldHJ5Q29sbGVjdGlvbicpIHtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGdlb20uZ2VvbWV0cmllcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgY29udmVydEZlYXR1cmUoZmVhdHVyZXMsIHtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeTogZ2VvbS5nZW9tZXRyaWVzW2ldLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHRhZ3NcbiAgICAgICAgICAgIH0sIHRvbGVyYW5jZSk7XG4gICAgICAgIH1cblxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignSW5wdXQgZGF0YSBpcyBub3Q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TtcbiAgICAgICAgICAgIHRoaXMudGlsZUNvb3Jkcy5wdXNoKHt6OiB6LCB4OiB4LCB5OiB5fSk7XG5cbiAgICAgICAgICAgIGlmIChkZWJ1Zykge1xuICAgICAgICAgICAgICAgIGlmIChkZWJ1ZyA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ3RpbGUgeiVkLSVkLSVkIChmZWF0dXJlczogJWQsIHBvaW50czogJWQsIHNpbXBsaWZpZWQ6ICVkKScsXG4gICAgICAgICAgICAgICAgICAgICAgICB6LCB4LCB5LCB0aWxlLm51bUZlYXR1cmVzLCB0aWxlLm51bVBvaW50cywgdGlsZS5udW1TaW1wbGlmaWVkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS50aW1lRW5kKCdjcmVhdGlvbicpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIga2V5ID0gJ3onICsgejtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXRzW2tleV0gPSAodGhpcy5zdGF0c1trZXldIHx8IDApICsgMTtcbiAgICAgICAgICAgICAgICB0aGlzLnRvdGFsKys7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzYXZlIHJlZmVyZW5jZSB0byBvcmlnaW5hbCBnZW9tZXRyeSBpbiB0aWxlIHNvIHRoYXQgd2UgY2FuIGRyaWxsIGRvd24gbGF0ZXIgaWYgd2Ugc3RvcCBub3dcbiAgICAgICAgdGlsZS5zb3VyY2UgPSBmZWF0dXJlcztcblxuICAgICAgICAvLyBzdG9wIHRpbGluZyBpZiB0aGUgdGlsZSBpcyBzb2xpZCBjbGlwcGVkIHNxdWFyZVxuICAgICAgICBpZiAoIW9wdGlvbnMuc29saWRDaGlsZHJlbiAmJiBpc0NsaXBwZWRTcXVhcmUodGlsZSwgb3B0aW9ucy5leHRlbnQsIG9wdGlvbnMuYnVmZmVyKSkgY29udGludWU7XG5cbiAgICAgICAgLy8gaWYgaXQ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G5cbiAgICB9IGVsc2Uge1xuXG4gICAgICAgIC8vIHNpbXBsaWZ5IGFuZCB0cmFuc2Zvcm0gcHJvamVjdGVkIGNvb3JkaW5hdGVzIGZvciB0aWxlIGdlb21ldHJ5XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBnZW9tLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICByaW5nID0gZ2VvbVtpXTtcblxuICAgICAgICAgICAgLy8gZmlsdGVyIG91dCB0aW55IHBvbHlsaW5lcyAmIHBvbHlnb25zXG4gICAgICAgICAgICBpZiAoIW5vU2ltcGxpZnkgJiYgKCh0eXBlID09PSAyICYmIHJpbmcuZGlzdCA8IHRvbGVyYW5jZSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHR5cGUgPT09IDMgJiYgcmluZy5hcmVhIDwgc3FUb2xlcmFuY2UpKSkge1xuICAgICAgICAgICAgICAgIHRpbGUubnVtUG9pbnRzICs9IHJpbmcubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc2ltcGxpZmllZFJpbmcgPSBbXTtcblxuICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHJpbmcubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBwID0gcmluZ1tqXTtcbiAgICAgICAgICAgICAgICAvLyBrZWVwIHBvaW50cyB3aXRoIGltcG9ydGFuY2UgPiB0b2xlcmFuY2VcbiAgICAgICAgICAgICAgICBpZiAobm9TaW1wbGlmeSB8fCBwWzJdID4gc3FUb2xlcmFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgc2ltcGxpZmllZFJpbmcucHVzaChwKTtcbiAgICAgICAgICAgICAgICAgICAgdGlsZS5udW1TaW1wbGlmaWVkKys7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRpbGUubnVtUG9pbnRzKys7XG4gICAgICAgICAgICB9XG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dLCBhMDMgPSBhWzNdLFxuICAgICAgICAgICAgYTEyID0gYVs2XSwgYTEzID0gYVs3XSxcbiAgICAgICAgICAgIGEyMyA9IGFbMTFdO1xuXG4gICAgICAgIG91dFsxXSA9IGFbNF07XG4gICAgICAgIG91dFsyXSA9IGFbOF07XG4gICAgICAgIG91dFszXSA9IGFbMTJdO1xuICAgICAgICBvdXRbNF0gPSBhMDE7XG4gICAgICAgIG91dFs2XSA9IGFbOV07XG4gICAgICAgIG91dFs3XSA9IGFbMTNdO1xuICAgICAgICBvdXRbOF0gPSBhMDI7XG4gICAgICAgIG91dFs5XSA9IGExMjtcbiAgICAgICAgb3V0WzExXSA9IGFbMTRdO1xuICAgICAgICBvdXRbMTJdID0gYTAzO1xuICAgICAgICBvdXRbMTNdID0gYTEzO1xuICAgICAgICBvdXRbMTRdID0gYTIzO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG91dFswXSA9IGFbMF07XG4gICAgICAgIG91dFsxXSA9IGFbNF07XG4gICAgICAgIG91dFsyXSA9IGFbOF07XG4gICAgICAgIG91dFszXSA9IGFbMTJdO1xuICAgICAgICBvdXRbNF0gPSBhWzFdO1xuICAgICAgICBvdXRbNV0gPSBhWzVdO1xuICAgICAgICBvdXRbNl0gPSBhWzldO1xuICAgICAgICBvdXRbN10gPSBhWzEzXTtcbiAgICAgICAgb3V0WzhdID0gYVsyXTtcbiAgICAgICAgb3V0WzldID0gYVs2XTtcbiAgICAgICAgb3V0WzEwXSA9IGFbMTBdO1xuICAgICAgICBvdXRbMTFdID0gYVsxNF07XG4gICAgICAgIG91dFsxMl0gPSBhWzNdO1xuICAgICAgICBvdXRbMTNdID0gYVs3XTtcbiAgICAgICAgb3V0WzE0XSA9IGFbMTFdO1xuICAgICAgICBvdXRbMTVdID0gYVsxNV07XG4gICAgfVxuICAgIFxuICAgIHJldHVybiBvdXQ7XG59O1xuXG4vKipcbiAqIEludmVydHMgYSBtYXQ0XG4gKlxuICogQHBhcmFtIHttYXQ0fS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y8gQ2FsY3VsYXRlIHRoZSBkZXRlcm1pbmFudFxuICAgICAgICBkZXQgPSBiMDAgKiBiMTEgLSBiMDEgKiBiMTAgKyBiMDIgKiBiMDkgKyBiMDMgKiBiMDggLSBiMDQgKiBiMDcgKyBiMDUgKiBiMDY7XG5cbiAgICBpZiAoIWRldCkgeyBcbiAgICAgICAgcmV0dXJuIG51bGw7IFxuICAgIH1cbiAgICBkZXQgPSAxLjAgLyBkZXQ7XG5cbiAgICBvdXRbMF0gPSAoYTExICogYjExIC0gYTEyICogYjEwICsgYTEzICogYjA5KSAqIGRldDtcbiAgICBvdXRbMV0gPSAoYTAyICogYjEwIC0gYTAxICogYjExIC0gYTAzICogYjA5KSAqIGRldDtcbiAgICBvdXRbMl0gPSAoYTMxICogYjA1IC0gYTMyICogYjA0ICsgYTMzICogYjAzKSAqIGRldDtcbiAgICBvdXRbM10gPSAoYTIyICogYjA0IC0gYTIxICogYjA1IC0gYTIzICogYjAzKSAqIGRldDtcbiAgICBvdXRbNF0gPSAoYTEyICogYjA4IC0gYTEwICogYjExIC0gYTEzICogYjA3KSAqIGRldDtcbiAgICBvdXRbNV0gPSAoYTAwICogYjExIC0gYTAyICogYjA4ICsgYTAzICogYjA3KSAqIGRldDtcbiAgICBvdXRbNl0gPSAoYTMyICogYjAyIC0gYTMwICogYjA1IC0gYTMzICogYjAxKSAqIGRldDtcbiAgICBvdXRbN10gPSAoYTIwICogYjA1IC0gYTIyICogYjAyICsgYTIzICogYjAxKSAqIGRldDtcbiAgICBvdXRbOF0gPSAoYTEwICogYjEwIC0gYTExICogYjA4ICsgYTEzICogYjA2KSAqIGRldDtcbiAgICBvdXRbOV0gPSAoYTAxICogYjA4IC0gYTAwICogYjEwIC0gYTAzICogYjA2KSAqIGRldDtcbiAgICBvdXRbMTBdID0gKGEzMCAqIGIwNCAtIGEzMSAqIGIwMiArIGEzMyAqIGIwMCkgKiBkZXQ7XG4gICAgb3V0WzExXSA9IChhMjEgKiBiMDIgLSBhMj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SBxWzBdLCB5ID0gcVsxXSwgeiA9IHFbMl0sIHcgPSBxWzNdLFxuICAgICAgICB4MiA9IHggKyB4LFxuICAgICAgICB5MiA9IHkgKyB5LFxuICAgICAgICB6MiA9IHogKyB6LFxuXG4gICAgICAgIHh4ID0geCAqIHgyLFxuICAgICAgICB4eSA9IHggKiB5MixcbiAgICAgICAgeHogPSB4ICogejIsXG4gICAgICAgIHl5ID0geSAqIHkyLFxuICAgICAgICB5eiA9IHkgKiB6MixcbiAgICAgICAgenogPSB6ICogejIsXG4gICAgICAgIHd4ID0gdyAqIHgyLFxuICAgICAgICB3eSA9IHcgKiB5MixcbiAgICAgICAgd3ogPSB3ICogejI7XG5cbiAgICBvdXRbMF0gPSAxIC0gKHl5ICsgenopO1xuICAgIG91dFsxXSA9IHh5ICsgd3o7XG4gICAgb3V0WzJdID0geHogLSB3eTtcbiAgICBvdXRbM10gPSAwO1xuICAgIG91dFs0XSA9IHh5IC0gd3o7XG4gICAgb3V0WzVdID0gMSAtICh4eCArIHp6KTtcbiAgICBvdXRbNl0gPSB5eiArIHd4O1xuICAgIG91dFs3XSA9IDA7XG4gICAgb3V0WzhdID0geHogKyB3eTtcbiAgICBvdXRbOV0gPSB5eiAtIHd4O1xuICAgIG91dFsxMF0gPSAxIC0gKHh4ICsgeXkpO1xuICAgIG91dFsxMV0gPSAwO1xuICAgIG91dFsxMl0gPSB2WzBdO1xuICAgIG91dFsxM10gPSB2WzFdO1xuICAgIG91dFsxNF0gPSB2WzJdO1xuICAgIG91dFsxNV0gPSAxO1xuICAgIFxuICAgIHJldHVybiBvdXQ7XG59O1xuXG5tYXQ0LmZyb21RdWF0ID0gZnVuY3Rpb24gKG91dCwgcSkge1xuICAgIHZhciB4ID0gcVswXSwgeSA9IHFbMV0sIHogPSBxWzJdLCB3ID0gcVszXSxcbiAgICAgICAgeDIgPSB4ICsgeCxcbiAgICAgICAgeTIgPSB5ICsgeSxcbiAgICAgICAgejIgPSB6ICsgeixcblxuICAgICAgIC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eiA9IGNlbnRlclsyXTtcblxuICAgIGlmIChNYXRoLmFicyhleWV4IC0gY2VudGVyeCkgPCBHTE1BVF9FUFNJTE9OICYmXG4gICAgICAgIE1hdGguYWJzKGV5ZXkgLSBjZW50ZXJ5KSA8IEdMTUFUX0VQU0lMT04gJiZcbiAgICAgICAgTWF0aC5hYnMoZXlleiAtIGNlbnRlcnopIDwgR0xNQVRfRVBTSUxPTikge1xuICAgICAgICByZXR1cm4gbWF0NC5pZGVudGl0eShvdXQpO1xuICAgIH1cblxuICAgIHowID0gZXlleCAtIGNlbnRlcng7XG4gICAgejEgPSBleWV5IC0gY2VudGVyeTtcbiAgICB6MiA9IGV5ZXogLSBjZW50ZXJ6O1xuXG4gICAgbGVuID0gMSAvIE1hdGguc3FydCh6MCAqIHowICsgejEgKiB6MSArIHoyICogejIpO1xuICAgIHowICo9IGxlbjtcbiAgICB6MSAqPSBsZW47XG4gICAgejIgKj0gbGVuO1xuXG4gICAgeDAgPSB1cHkgKiB6MiAtIHVweiAqIHoxO1xuICAgIHgxID0gdXB6ICogejAgLSB1cHggKiB6MjtcbiAgICB4MiA9IHVweCAqIHoxIC0gdXB5ICogejA7XG4gICAgbGVuID0gTWF0aC5zcXJ0KHgwICogeDAgKyB4MSAqIHgxICsgeDIgKiB4Mik7XG4gICAgaWYgKCFsZW4pIHtcbiAgICAgICAgeDAgPSAwO1xuICAgICAgICB4MSA9IDA7XG4gICAgICAgIHgyID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBsZW4gPSAxIC8gbGVuO1xuICAgICAgICB4MCAqPSBsZW47XG4gICAgICAgIHgxICo9IGxlbjtcbiAgICAgICAgeDIgKj0gbGVuO1xuICAgIH1cblxuICAgIHkwID0gejEgKiB4MiAtIHoyICogeDE7XG4gICAgeTEgPSB6MiAqIHgwIC0gejAgKiB4MjtcbiAgICB5MiA9IHowICogeDEgLSB6MSAqIHgwO1xuXG4gICAgbGVuID0gTWF0aC5zcXJ0KHkwICogeTAgKyB5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AgdmFyIGogPSAoaSsxKSUzO1xuICAgICAgICB2YXIgayA9IChpKzIpJTM7XG4gICAgICAgIFxuICAgICAgICBmUm9vdCA9IE1hdGguc3FydChtW2kqMytpXS1tW2oqMytqXS1tW2sqMytrXSArIDEuMCk7XG4gICAgICAgIG91dFtpXSA9IDAuNSAqIGZSb290O1xuICAgICAgICBmUm9vdCA9IDAuNSAvIGZSb290O1xuICAgICAgICBvdXRbM10gPSAobVtrKjMral0gLSBtW2oqMytrXSkgKiBmUm9vdDtcbiAgICAgICAgb3V0W2pdID0gKG1baiozK2ldICsgbVtpKjMral0pICogZlJvb3Q7XG4gICAgICAgIG91dFtrXSA9IChtW2sqMytpXSArIG1baSozK2tdKSAqIGZSb290O1xuICAgIH1cbiAgICBcbiAgICByZXR1cm4gb3V0O1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIGEgcXVhdGVuaW9uXG4gKlxuICogQHBhcmFtIHtxdWF0fSB2ZWMgdmVjdG9yIHRvIHJlcHJlc2VudCBhcyBhIHN0cmluZ1xuICogQHJldHVybnMge1N0cmluZ30gc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIHRoZSB2ZWN0b3JcbiAqL1xucXVhdC5zdHIgPSBmdW5jdGlvbiAoYSkge1xuICAgIHJldHVybiAncXVhdCgnICsgYVswXSArICcsICcgKyBhWzFdICsgJywgJyArIGFbMl0gKyAnLCAnICsgYVszXSArICcpJztcbn07XG5cbmlmKHR5cGVvZihleHBvcnRzKSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICBleHBvcnRzLnF1YXQgPSBxdWF0O1xufVxuO1xuXG5cblxuXG5cblxuXG5cblxuXG5cblxuXG4gIH0pKHNoaW0uZXhwb3J0cyk7XG59KSh0aGlzKTtcbiIsIm1vZHVsZS5leHBvcnRzID0gcGFyc2VFcnJvcnNcblxuZnVuY3Rpb24gcGFyc2VFcnJvcnMobG9nKSB7XG4gIGxvZ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dGlvbihuYW1lLCBwcm9wKSB7XG4gICAgICAgICAgICAgICAgdmFyIGJhc2VNZXRob2QgPSBiYXNlW25hbWVdP1xuICAgICAgICAgICAgICAgICAgICAgICAgYmFzZVtuYW1lXSA6XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID09PSAnX19jb25zdHJ1Y3Rvcic/IC8vIGNhc2Ugb2YgaW5oZXJpdGFuY2UgZnJvbSBwbGFpbiBmdW5jdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5fX3NlbGYuX19wYXJlbnQgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vT3AsXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGJhc2VTYXZlZCA9IHRoaXMuX19iYXNlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9fYmFzZSA9IHJlc3VsdC5fX2Jhc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gcHJvcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2Jhc2UgPSBiYXNlU2F2ZWQ7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmVzdWx0Ll9fYmFzZSA9IGJhc2VNZXRob2Q7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgfSkobmFtZSwgcHJvcCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXNbbmFtZV0gPSBwcm9wO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5mdW5jdGlvbiBhcHBseU1peGlucyhtaXhpbnMsIHJlcykge1xuICAgIHZhciBpID0gMSwgbWl4aW47XG4gICAgd2hpbGUobWl4aW4gPS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ZS5oYXNPd25Qcm9wZXJ0eTtcblxudmFyIENIQVJfVEFCICAgICAgICAgICAgICAgICAgPSAweDA5OyAvKiBUYWIgKi9cbnZhciBDSEFSX0xJTkVfRkVFRCAgICAgICAgICAgID0gMHgwQTsgLyogTEYgKi9cbnZhciBDSEFSX0NBUlJJQUdFX1JFVFVSTiAgICAgID0gMHgwRDsgLyogQ1IgKi9cbnZhciBDSEFSX1NQQUNFICAgICAgICAgICAgICAgID0gMHgyMDsgLyogU3BhY2UgKi9cbnZhciBDSEFSX0VYQ0xBTUFUSU9OICAgICAgICAgID0gMHgyMTsgLyogISAqL1xudmFyIENIQVJfRE9VQkxFX1FVT1RFICAgICAgICAgPSAweDIyOyAvKiBcIiAqL1xudmFyIENIQVJfU0hBUlAgICAgICAgICAgICAgICAgPSAweDIzOyAvKiAjICovXG52YXIgQ0hBUl9QRVJDRU5UICAgICAgICAgICAgICA9IDB4MjU7IC8qICUgKi9cbnZhciBDSEFSX0FNUEVSU0FORCAgICAgICAgICAgID0gMHgyNjsgLyogJiAqL1xudmFyIENIQVJfU0lOR0xFX1FVT1RFICAgICAgICAgPSAweDI3OyAvKiAnICovXG52YXIgQ0hBUl9BU1RFUklTSyAgICAgICAgICAgICA9IDB4MkE7IC8qICogKi9cbnZhciBDSEFSX0NPTU1BICAgICAgICAgICAgICAgID0gMHgyQzsgLyogLCAqL1xudmFyIENIQVJfTUlOVVMgICAgICAgICAgICAgICAgPSAweDJEOyAvKiAtICovXG52YXIgQ0hBUl9DT0xPTiAgICAgICAgICAgICAgICA9IDB4M0E7IC8qIDogKi9cbnZhciBDSEFSX0dSRUFURVJfVEhBTiAgICAgICAgID0gMHgzRTsgLyogPiAqL1xudmFyIENIQVJfUVVFU1RJT04gICAgICAgICAgICAgPSAweDNGOyAvKiA/ICovXG52YXIgQ0hBUl9DT01NRVJDSUFMX0FUICAgICAgICA9IDB4NDA7IC8qIEAgKi9cbnZhciBDSEFSX0xFRlRfU1FVQVJFX0JSQUNLRVQg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AgICAgICAoYyA9PT0gMHg2Mi8qIGIgKi8pID8gJ1xceDA4JyA6XG4gICAgICAgIChjID09PSAweDc0LyogdCAqLykgPyAnXFx4MDknIDpcbiAgICAgICAgKGMgPT09IDB4MDkvKiBUYWIgKi8pID8gJ1xceDA5JyA6XG4gICAgICAgIChjID09PSAweDZFLyogbiAqLykgPyAnXFx4MEEnIDpcbiAgICAgICAgKGMgPT09IDB4NzYvKiB2ICovKSA/ICdcXHgwQicgOlxuICAgICAgICAoYyA9PT0gMHg2Ni8qIGYgKi8pID8gJ1xceDBDJyA6XG4gICAgICAgIChjID09PSAweDcyLyogciAqLykgPyAnXFx4MEQnIDpcbiAgICAgICAgKGMgPT09IDB4NjUvKiBlICovKSA/ICdcXHgxQicgOlxuICAgICAgICAoYyA9PT0gMHgyMC8qIFNwYWNlICovKSA/ICcgJyA6XG4gICAgICAgIChjID09PSAweDIyLyogXCIgKi8pID8gJ1xceDIyJyA6XG4gICAgICAgIChjID09PSAweDJGLyogLyAqLykgPyAnLycgOlxuICAgICAgICAoYyA9PT0gMHg1Qy8qIFxcICovKSA/ICdcXHg1QycgOlxuICAgICAgICAoYyA9PT0gMHg0RS8qIE4gKi8pID8gJ1xceDg1JyA6XG4gICAgICAgIChjID09PSAweDVGLyogXyAqLykgPyAnXFx4QTAnIDpcbiAgICAgICAgKGMgPT09IDB4NEMvKiBMICovKSA/ICdcXHUyMDI4JyA6XG4gICAgICAgIChjID09PSAweDUwLyogUCAqLykgPyAnXFx1MjAyOScgOiAnJztcbn1cblxuZnVuY3Rpb24gY2hhckZyb21Db2RlcG9pbnQoYykge1xuICBpZiAoYyA8PSAweEZGRkYpIHtcbiAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFyQ29kZShjKTtcbiAgfVxuICAvLyBFbmNvZGUgVVRGLTE2IHN1cnJvZ2F0ZSBwYWlyXG4gIC8vIGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL1VURi0xNiNDb2RlX3BvaW50c19VL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iAgICAgIGNhcHR1cmVFbmQsXG4gICAgICBoYXNQZW5kaW5nQ29udGVudCxcbiAgICAgIF9saW5lLFxuICAgICAgX2xpbmVTdGFydCxcbiAgICAgIF9saW5lSW5kZW50LFxuICAgICAgX2tpbmQgPSBzdGF0ZS5raW5kLFxuICAgICAgX3Jlc3VsdCA9IHN0YXRlLnJlc3VsdCxcbiAgICAgIGNoO1xuXG4gIGNoID0gc3RhdGUuaW5wdXQuY2hhckNvZGVBdChzdGF0ZS5wb3NpdGlvbik7XG5cbiAgaWYgKGlzX1dTX09SX0VPTChjaCkgICAgICAgICAgICAgfHxcbiAgICAgIGlzX0ZMT1dfSU5ESUNBVE9SKGNoKSAgICAgICAgfHxcbiAgICAgIDB4MjMvKiAjICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MjYvKiAmICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MkEvKiAqICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MjEvKiAhICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4N0MvKiB8ICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4M0UvKiA+ICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MjcvKiAnICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MjIvKiBcIiAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDI1LyogJSAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDQwLyogQCAqLyAgICAgICAgICAgPT09IGNoIHx8XG4gICAgICAweDYwLyogYCAqLyAgICAgICAgICAgPT09IGNoKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgaWYgKDB4M0YvKiA/ICovID09PSBjaCB8fCAweDJELyogLSAqLyA9PT0gY2gpIHtcbiAgICBmb2xsb3dpbmcgPSBzdGF0ZS5pbnB1dC5jaGFyQ29kZUF0KHN0YXRlLnBvc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09PSBkYXRhKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgdmFyIG1heCA9IGRhdGEubGVuZ3RoLFxuICAgICAgaW5kZXggPSAwLFxuICAgICAgaGFzRGlnaXRzID0gZmFsc2UsXG4gICAgICBjaDtcblxuICBpZiAoIW1heCkgeyByZXR1cm4gZmFsc2U7IH1cblxuICBjaCA9IGRhdGFbaW5kZXhdO1xuXG4gIC8vIHNpZ25cbiAgaWYgKGNoID09PSAnLScgfHwgY2ggPT09ICcrJykge1xuICAgIGNoID0gZGF0YVsrK2luZGV4XTtcbiAgfVxuXG4gIGlmIChjaCA9PT0gJzAnKSB7XG4gICAgLy8gMFxuICAgIGlmIChpbmRleCArIDEgPT09IG1heCkgeyByZXR1cm4gdHJ1ZTsgfVxuICAgIGNoID0gZGF0YVsrK2luZGV4XTtcblxuICAgIC8vIGJhc2UgMiwgYmFzZSA4LCBiYXNlIDE2XG5cbiAgICBpZiAoY2ggPT09ICdiJykge1xuICAgICAgLy8gYmFzZSAyXG4gICAgICBpbmRleCsrO1xuXG4gICAgICBmb3IgKDsgaW5kZXggPCBtYXg7IGluZGV4KyspIHtcbiAgICAgICAgY2ggPSBkYXRhW2luZGV4XTtcbiAgICAgICAgaWYgKGNoID09PSAnXycpIHsgY29udGludWU7IH1cbiAgICAgICAgaWYgKGNoICE9PSAnMCcgJiYgY2ggIT09ICcxJykge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBoYXNEaWdpdHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGhhc0RpZ2l0cztcbiAgICB9XG5cblxuICAgIGlmIChjaCA9PT0gJ3gnKSB7XG4gICAgICAvLyBiYXNlIDE2XG4gICAgICBpbmRleCsrO1xuXG4gICAgICBmb3IgKDsgaW5kZXggPCBtYXg7IGluZGV4KyspIHtcbiAgICAgICAgY2ggPSBkYXRhW2luZGV4XTtcbiAgICAgICAgaWYgKGNoID09PSAnXycpIHsgY29udGludWU7IH1cbiAgICAgICAgaWYgKCFpc0hleENvZGUoZGF0YS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgaGFzRGlnaXRzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBoYXNEaWdpdHM7XG4gICAgfVxuXG4gICAgLy8gYmFzZSA4XG4gICAgZm9yICg7IGluZGV4IDwgbWF4OyBpbmRleCsrKSB7XG4gICAgICBjaCA9IGRhdGFbaW5kZXhdO1xuICAgICAgaWYgKGNoID09PSAnXycpIHsgY29udGludWU7IH1cbiAgICAgIGlmICghaXNPY3RDb2RlKGRhdGEuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cbiAgICAgIGhhc0RpZ2l0cyA9IHRydWU7XG4gICAgfVxuICAgIHJldHVybiBoYXNEaWdpdHM7XG4gIH1cblxuICAvLyBiYXNlIDEwIChleGNlcHQgMCkgb3IgYmFzZSA2MFxuXG4gIGZvciAoOyBpbmRleCA8IG1heDsgaW5kZXgrKykge1xuICAgIGNoID0gZGF0YVtpbmRleF07XG4gICAgaWYgKGNoID09PSAnXycpIHsgY29udGludWU7IH1cbiAgICBpZiAoY2ggPT09ICc6JykgeyBicmVhazsgfVxuICAgIGlmICghaXNEZWNDb2RlKGRhdGEuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIGhhc0RpZ2l0cyA9IHRydWU7XG4gIH1cblxuICBpZiAoIWhhc0RpZ2l0cykgeyByZXR1cm4gZmFsc2U7IH1cblxuICAvLyBpZiAhYmFzZTYwIC0gZG9uZTtcbiAgaWYgKGNoICE9PSAnOicpIHsgcmV0dXJuIHRydWU7IH1cblxuICAvLyBiYXNlNjAgYWxtb3N0IG5vdCB1c2VkLCBubyBuZWVkcyB0byBvcH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XSB5ZWFyXG4gICctKFswLTldWzAtOV0/KScgICAgICAgICAgICAgICAgICAgKyAvLyBbMl0gbW9udGhcbiAgJy0oWzAtOV1bMC05XT8pJyAgICAgICAgICAgICAgICAgICArIC8vIFszXSBkYXlcbiAgJyg/Oig/OltUdF18WyBcXFxcdF0rKScgICAgICAgICAgICAgICsgLy8gLi4uXG4gICcoWzAtOV1bMC05XT8pJyAgICAgICAgICAgICAgICAgICAgKyAvLyBbNF0gaG91clxuICAnOihbMC05XVswLTldKScgICAgICAgICAgICAgICAgICAgICsgLy8gWzVdIG1pbnV0ZVxuICAnOihbMC05XVswLTldKScgICAgICAgICAgICAgICAgICAgICsgLy8gWzZdIHNlY29uZFxuICAnKD86XFxcXC4oWzAtOV0qKSk/JyAgICAgICAgICAgICAgICAgKyAvLyBbN10gZnJhY3Rpb25cbiAgJyg/OlsgXFxcXHRdKihafChbLStdKShbMC05XVswLTldPyknICsgLy8gWzhdIHR6IFs5XSB0el9zaWduIFsxMF0gdHpfaG91clxuICAnKD86OihbMC05XVswLTldKSk/KSk/KT8kJyk7ICAgICAgICAgLy8gWzExXSB0el9taW51dGVcblxuZnVuY3Rpb24gcmVzb2x2ZVlhbWxUaW1lc3RhbXAoZGF0YSkge1xuICBpZiAobnVsbCA9PT0gZGF0YSkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChZQU1MX1RJTUVTVEFNUF9SRUdFWFAuZXhlYyhkYXRhKSA9PT0gbnVsbCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG5mdW5jdGlvbiBjb25zdHJ1Y3RZYW1sVGltZXN0YW1wKGRhdGEpIHtcbiAgdmFyIG1hdGNoLCB5ZWFyLCBtb250aCwgZGF5LCBob3VyLCBtaW51dGUsIHNlY29uZCwgZnJhY3Rpb24gPSAwLFxuICAgICAgZGVsdGEgPSBudWxsLCB0el9ob3VyLCB0el9taW51dGUsIGRhdGU7XG5c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ICAgICAgICAgICAgICAgJz0nLCAnKz0nLCAnLT0nLCAnKj0nLCAnLz0nLCAnJT0nLCAnPDw9JywgJz4+PScsICc+Pj49JyxcbiAgICAgICAgICAgICAgICAgICAgJyY9JywgJ3w9JywgJ149JywgJywnLFxuICAgICAgICAgICAgICAgICAgICAvLyBiaW5hcnkvdW5hcnkgb3BlcmF0b3JzXG4gICAgICAgICAgICAgICAgICAgICcrJywgJy0nLCAnKicsICcvJywgJyUnLCAnKysnLCAnLS0nLCAnPDwnLCAnPj4nLCAnPj4+JywgJyYnLFxuICAgICAgICAgICAgICAgICAgICAnfCcsICdeJywgJyEnLCAnficsICcmJicsICd8fCcsICc/JywgJzonLCAnPT09JywgJz09JywgJz49JyxcbiAgICAgICAgICAgICAgICAgICAgJzw9JywgJzwnLCAnPicsICchPScsICchPT0nXTtcblxuICAgIFN5bnRheCA9IHtcbiAgICAgICAgQXNzaWdubWVudEV4cHJlc3Npb246ICdBc3NpZ25tZW50RXhwcmVzc2lvbicsXG4gICAgICAgIEFzc2lnbm1lbnRQYXR0ZXJuOiAnQXNzaWdubWVudFBhdHRlcm4nLFxuICAgICAgICBBcnJheUV4cHJlc3Npb246ICdBcnJheUV4cHJlc3Npb24nLFxuICAgICAgICBBcnJheVBhdHRlcm46ICdBcnJheVBhdHRlcm4nLFxuICAgICAgICBBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjogJ0Fycm93RnVuY3Rpb25FeHByZXNzaW9uJyxcbiAgICAgICAgQmxvY2tTdGF0ZW1lbnQ6ICdCbG9ja1N0YXRlbWVudCcsXG4gICAgICAgIEJpbmFyeUV4cHJlc3Npb246ICdCaW5hcnlFeHByZXNzaW9uJyxcbiAgICAgICAgQnJlYWtTdGF0ZW1lbnQ6ICdCcmVha1N0YXRlbWVudCcsXG4gICAgICAgIENhbGxFeHByZXNzaW9uOiAnQ2FsbEV4cHJlc3Npb24nLFxuICAgICAgICBDYXRjaENsYXVzZTogJ0NhdGNoQ2xhdXNlJyxc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DM1xcdURGQzgtXFx1REZDRlxcdURGRDEtXFx1REZENV18XFx1RDgwMVtcXHVEQzAwLVxcdURDOURcXHVERDAwLVxcdUREMjdcXHVERDMwLVxcdURENjNcXHVERTAwLVxcdURGMzZcXHVERjQwLVxcdURGNTVcXHVERjYwLVxcdURGNjddfFxcdUQ4MDJbXFx1REMwMC1cXHVEQzA1XFx1REMwOFxcdURDMEEtXFx1REMzNVxcdURDMzdcXHVEQzM4XFx1REMzQ1xcdURDM0YtXFx1REM1NVxcdURDNjAtXFx1REM3NlxcdURDODAtXFx1REM5RVxcdUREMDAtXFx1REQxNVxcdUREMjAtXFx1REQzOVxcdUREODAtXFx1RERCN1xcdUREQkVcXHVEREJGXFx1REUwMFxcdURFMTAtXFx1REUxM1xcdURFMTUtXFx1REUxN1xcdURFMTktXFx1REUzM1xcdURFNjAtXFx1REU3Q1xcdURFODAtXFx1REU5Q1xcdURFQzAtXFx1REVDN1xcdURFQzktXFx1REVFNFxcdURGMDAtXFx1REYzNVxcdURGNDAtXFx1REY1NVxcdURGNjAtXFx1REY3MlxcdURGODAtXFx1REY5MV18XFx1RDgwM1tcXHVEQzAwLVxcdURDNDhdfFxcdUQ4MDRbXFx1REMwMy1cXHVEQzM3XFx1REM4My1cXHVEQ0FGXFx1RENEMC1cXHVEQ0U4XFx1REQwMy1cXHVERDI2XFx1REQ1MC1cXHVERDcyXFx1REQ3NlxcdUREODMtXFx1RERCMlxcdUREQzEtXFx1RERDNFxcdUREREFcXHVERTAwLVxcdURFMTFcXHVERTEzLVxcdURFMkJcXHVERUIwLVxcdURFREVcXHVERjA1LVxcdURGMENcXHVERjBGXFx1REYxMFxcdURGMTMtXFx1REYyOFxcdURGMkEtXFx1REYzMFxcdURGMzJcXHVERjMzXFx1REYzNS1cXHVERjM5XFx1REYzRFxcdURGNUQtXFx1REY2MV18XFx1RDgwNVtcXHVEQzgwLVxcdURDQUZcXHVEQ0M0XFx1RENDNVxcdURDQzdcXHVERDgwLVxcdUREQUVcX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FFLVxcdUREMzlcXHVERDNCLVxcdUREM0VcXHVERDQwLVxcdURENDRcXHVERDQ2XFx1REQ0QS1cXHVERDUwXFx1REQ1Mi1cXHVERUE1XFx1REVBOC1cXHVERUMwXFx1REVDMi1cXHVERURBXFx1REVEQy1cXHVERUZBXFx1REVGQy1cXHVERjE0XFx1REYxNi1cXHVERjM0XFx1REYzNi1cXHVERjRFXFx1REY1MC1cXHVERjZFXFx1REY3MC1cXHVERjg4XFx1REY4QS1cXHVERkE4XFx1REZBQS1cXHVERkMyXFx1REZDNC1cXHVERkNCXFx1REZDRS1cXHVERkZGXXxcXHVEODNBW1xcdURDMDAtXFx1RENDNFxcdURDRDAtXFx1RENENl18XFx1RDgzQltcXHVERTAwLVxcdURFMDNcXHVERTA1LVxcdURFMUZcXHVERTIxXFx1REUyMlxcdURFMjRcXHVERTI3XFx1REUyOS1cXHVERTMyXFx1REUzNC1cXHVERTM3XFx1REUzOVxcdURFM0JcXHVERTQyXFx1REU0N1xcdURFNDlcXHVERTRCXFx1REU0RC1cXHVERTRGXFx1REU1MVxcdURFNTJcXHVERTU0XFx1REU1N1xcdURFNTlcXHVERTVCXFx1REU1RFxcdURFNUZcXHVERTYxXFx1REU2MlxcdURFNjRcXHVERTY3LVxcdURFNkFcXHVERTZDLVxcdURFNzJcXHVERTc0LVxcdURFNzdcXHVERTc5LVxcdURFN0NcXHVERTdFXFx1REU4MC1cXHVERTg5XFx1REU4Qi1cXHVERTlCXFx1REVBMS1cXHVERUEzXFx1REVBNS1cXHVERUE5XFx1REVBQi1cXHVERUJCXXxcXHVEODY5W1xcdURDMDAtXFx1REVENlxcdURGMDAtXFx1REZGRl18XFx1RDg2RFtcXHVEQzAwLVxcdURGMzRcXHVERjQwLVxcdURGRkZdfFxcdUQ4NkVbXFx1REMwMC1cXHVEQzFEXXxcXHVEODdFW1xcdURDMDAtXFx1REUxRF18XFx1REI0MFtcXHVERDAwLVxcdURERUZdL1xuICAgIH07XG5cbiAgICAvLyBFbnN1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GVzY2FwZSBzZXF1ZW5jZVxuICAgICAgICB2YXIgb2N0YWwgPSAoY2ggIT09ICcwJyksIGNvZGUgPSAnMDEyMzQ1NjcnLmluZGV4T2YoY2gpO1xuXG4gICAgICAgIGlmIChpbmRleCA8IGxlbmd0aCAmJiBpc09jdGFsRGlnaXQoc291cmNlW2luZGV4XSkpIHtcbiAgICAgICAgICAgIG9jdGFsID0gdHJ1ZTtcbiAgICAgICAgICAgIGNvZGUgPSBjb2RlICogOCArICcwMTIzNDU2NycuaW5kZXhPZihzb3VyY2VbaW5kZXgrK10pO1xuXG4gICAgICAgICAgICAvLyAzIGRpZ2l0cyBhcmUgb25seSBhbGxvd2VkIHdoZW4gc3RyaW5nIHN0YXJ0c1xuICAgICAgICAgICAgLy8gd2l0aCAwLCAxLCAyLCAzXG4gICAgICAgICAgICBpZiAoJzAxMjMnLmluZGV4T2YoY2gpID49IDAgJiZcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggPCBsZW5ndGggJiZcbiAgICAgICAgICAgICAgICAgICAgaXNPY3RhbERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7XG4gICAgICAgICAgICAgICAgY29kZSA9IGNvZGUgKiA4ICsgJzAxMjM0NTY3Jy5pbmRleE9mKHNvdXJjZVtpbmRleCsrXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29kZTogY29kZSxcbiAgICAgICAgICAgIG9jdGFsOiBvY3RhbFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjIgV2hpdGUgU3BhY2VcblxuICAgIGZ1bmN0aW9uIGlzV2hpdGVTcGFjZShjaCkge1xuICAgICAgICByZXR1cm4gKGNoID09PSAweDIwKSB8fCAoY2ggPT09IDB4MDkpIHx8IChjaCA9PT0gMHgwQikgfHwgKGNoID09PSAweDBDKSB8fCAoY2ggPT09IDB4QTApIHx8XG4gICAgICAgICAgICAoY2ggPj0g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uWlxuICAgICAgICAgICAgKGNoID49IDB4NjEgJiYgY2ggPD0gMHg3QSkgfHwgICAgICAgICAvLyBhLi56XG4gICAgICAgICAgICAoY2ggPT09IDB4NUMpIHx8ICAgICAgICAgICAgICAgICAgICAgIC8vIFxcIChiYWNrc2xhc2gpXG4gICAgICAgICAgICAoKGNoID49IDB4ODApICYmIFJlZ2V4Lk5vbkFzY2lpSWRlbnRpZmllclN0YXJ0LnRlc3QoZnJvbUNvZGVQb2ludChjaCkpKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc0lkZW50aWZpZXJQYXJ0KGNoKSB7XG4gICAgICAgIHJldHVybiAoY2ggPT09IDB4MjQpIHx8IChjaCA9PT0gMHg1RikgfHwgIC8vICQgKGRvbGxhcikgYW5kIF8gKHVuZGVyc2NvcmUpXG4gICAgICAgICAgICAoY2ggPj0gMHg0MSAmJiBjaCA8PSAweDVBKSB8fCAgICAgICAgIC8vIEEuLlpcbiAgICAgICAgICAgIChjaCA+PSAweDYxICYmIGNoIDw9IDB4N0EpIHx8ICAgICAgICAgLy8gYS4uelxuICAgICAgICAgICAgKGNoID49IDB4MzAgJiYgY2ggPD0gMHgzOSkgfHwgICAgICAgICAvLyAwLi45XG4gICAgICAgICAgICAoY2ggPT09IDB4NUMpIHx8ICAgICAgICAgICAgICAgICAgICAgIC8vIFxcIChiYWNrc2xhc2gpXG4gICAgICAgICAgICAoKGNoID49IDB4ODApICYmIFJlZ2V4Lk5vbkFzY2lpSWRlbnRpZmllclBhcnQudGVzdChmcm9tQ29kZVBvaW50KGNoKSkpO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjYuMi4yIEZ1dHVyZSBSZXNlcnZlZCBXb3Jkc1xuXG4gICAgZnVuY3Rpb24gaXNGdXR1cmVSZXNlcnZlZFdvcmQoaWQpIHtcbiAgICAgICAgc3dpdGNoIChpZCkge1xuICAgICAgICBjYXNlICdlbnVtJzpcbiAgICAgICAgY2FzZSAnZXhwb3J0JzpcbiAgICAgICAgY2FzZSAnaW1wb3J0JzpcbiAgICAgICAgY2FzZSAnc3VwZXInOlxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQoaWQpIHtcbiAgICAgICAgc3dpdGNoIChpZCkge1xuICAgICAgICBjYXNlICdpbXBsZW1lbnRzJzpcbiAgICAgICAgY2FzZSAnaW50ZXJmYWNlJzpcbiAgICAgICAgY2FzZSAncGFja2FnZSc6XG4gICAgICAgIGNhc2UgJ3ByaXZhdGUnOlxuICAgICAgICBjYXNlICdwcm90ZWN0ZWQnOlxuICAgICAgICBjYXNlICdwdWJsaWMnOlxuICAgICAgICBjYXNlICdzdGF0aWMnOlxuICAgICAgICBjYXNlICd5aWVsZCc6XG4gICAgICAgIGNhc2UgJ2xldCc6XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGlzUmVzdHJpY3RlZFdvcmQoaWQpIHtcbiAgICAgICAgcmV0dXJuIGlkID09PSAnZXZhbCcgfHwgaWQgPT09ICdhcmd1bWVudHMnO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjYuMi4xIEtleXdvcmRzXG5cbiAgICBmdW5jdGlvbiBpc0tleXdvcmQoaWQpIHtcbiAgICAgICAgc3dpdGNoIChpZC5sZW5ndGgpIHtcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ2lmJykgfHwgKGlkID09PSAnaW4nKSB8fCAoaWQgPT09ICdkbycpO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAndmFyJykgfHwgKGlkID09PSAnZm9yJykgfHwgKGlkID09PSAnbmV3JykgfHxcbiAgICAgICAgICAgICAgICAoaWQgPT09ICd0cnknKSB8fCAoaWQgPT09ICdsZXQnKTtcbiAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ3RoaXMnKSB8fCAoaWQgPT09ICdlbHNlJykgfHwgKGlkID09PSAnY2FzZScpIHx8XG4gICAgICAgICAgICAgICAgKGlkID09PSAndm9pZCcpIHx8IChpZCA9PT0gJ3dpdGgnKSB8fCAoaWQgPT09ICdlbnVtJyk7XG4gICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgIHJldHVybiAoaWQgPT09ICd3aGlsZScpIHx8IChpZCA9PT0gJ2JyZWFrJykgfHwgKGlkID09PSAnY2F0Y2gnKSB8fFxuICAgICAgICAgICAgICAgIChpZCA9PT0gJ3Rocm93JykgfHwgKGlkID09PSAnY29uc3QnKSB8fCAoaWQgPT09ICd5aWVsZCcpIHx8XG4gICAgICAgICAgICAgICAgKGlkID09PSAnY2xhc3MnKSB8fCAoaWQgPT09ICdzdXBlcicpO1xuICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAncmV0dXJuJykgfHwgKGlkID09PSAndHlwZW9mJykgfHwgKGlkID09PSAnZGVsZXRlJykgfHxcbiAgICAgICAgICAgICAgICAoaWQgPT09ICdzd2l0Y2gnKSB8fCAoaWQgPT09ICdleHBvcnQnKSB8fCAoaWQgPT09ICdpbXBvcnQnKTtcbiAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ2RlZmF1bHQnKSB8fCAoaWQgPT09ICdmaW5hbGx5JykgfHwgKGlkID09PSAnZXh0ZW5kcycpO1xuICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAnZnVuY3Rpb24nKSB8fCAoaWQgPT09ICdjb250aW51ZScpIHx8IChpZCA9PT0gJ2RlYnVnZ2VyJyk7XG4gICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAnaW5zdGFuY2VvZicpO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuNCBDb21tZW50c1xuXG4gICAgZnVuY3Rpb24gYWRkQ29tbWVudCh0eXBlLCB2YWx1ZSwgc3RhcnQsIGVuZCwgbG9jKSB7XG4gICAgICAgIHZhciBjb21tZW50O1xuXG4gICAgICAgIGFzc2VydCh0eXBlb2Ygc3RhcnQgPT09ICdudW1iZXInLCAnQ29tbWVudCBtdXN0IGhhdmUgdmFsaWQgcG9zaXRpb24nKTtcblxuICAgICAgICBzdGF0ZS5sYXN0Q29tbWVudFN0YXJ0ID0gc3RhcnQ7XG5cbiAgICAgICAgY29tbWVudCA9IHtcbiAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICB2YWx1ZTogdmFsdWVcbiAgICAgICAgfTtcbiAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7XG4gICAgICAgICAgICBjb21tZW50LnJhbmdlID0gW3N0YXJ0LCBlbmRdO1xuICAgICAgICB9XG4gICAgICAgIGlmIChleHRyYS5sb2MpIHtcbiAgICAgICAgICAgIGNvbW1lbnQubG9jID0gbG9jO1xuICAgICAgICB9XG4gICAgICAgIGV4dHJhLmNvbW1lbnRzLnB1c2goY29tbWVudCk7XG4gICAgICAgIGlmIChleHRyYS5hdHRhY2hDb21tZW50KSB7XG4gICAgICAgICAgICBleHRyYS5sZWFkaW5nQ29tbWVudHMucHVzaChjb21tZW50KTtcbiAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMucHVzaChjb21tZW50KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgIGNvbW1lbnQudHlwZSA9IGNvbW1lbnQudHlwZSArICdDb21tZW50JztcbiAgICAgICAgICAgIGlmIChleHRyYS5kZWxlZ2F0ZSkge1xuICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBleHRyYS5kZWxlZ2F0ZShjb21tZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV4dHJhLnRva2Vucy5wdXNoKGNvbW1lbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2tpcFNpbmdsZUxpbmVDb21tZW50KG9mZnNldCkge1xuICAgICAgICB2YXIgc3RhcnQsIGxvYywgY2gsIGNvbW1lbnQ7XG5cbiAgICAgICAgc3RhcnQgPSBpbmRleCAtIG9mZnNldDtcbiAgICAgICAgbG9jID0ge1xuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnQgLSBvZmZzZXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoKSkge1xuICAgICAgICAgICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpZiAoZXh0cmEuY29tbWVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IHNvdXJjZS5zbGljZShzdGFydCArIG9mZnNldCwgaW5kZXggLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0IC0gMVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBhZGRDb21tZW50KCdMaW5lJywgY29tbWVudCwgc3RhcnQsIGluZGV4IC0gMSwgbG9jKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAxMyAmJiBzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgPT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZXh0cmEuY29tbWVudHMpIHtcbiAgICAgICAgICAgIGNvbW1lbnQgPSBzb3VyY2Uuc2xpY2Uoc3RhcnQgKyBvZmZzZXQsIGluZGV4KTtcbiAgICAgICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgYWRkQ29tbWVudCgnTGluZScsIGNvbW1lbnQsIHN0YXJ0LCBpbmRleCwgbG9jKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNraXBNdWx0aUxpbmVDb21tZW50KCkge1xuICAgICAgICB2YXIgc3RhcnQsIGxvYywgY2gsIGNvbW1lbnQ7XG5cbiAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7XG4gICAgICAgICAgICBzdGFydCA9IGluZGV4IC0gMjtcbiAgICAgICAgICAgIGxvYyA9IHtcbiAgICAgICAgICAgICAgICBzdGFydDoge1xuICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0IC0gMlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuICAgICAgICAgICAgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2gpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAweDBEICYmIHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkgPT09IDB4MEEpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaGFzTGluZVRlcm1pbmF0b3IgPSB0cnVlO1xuICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgyQSkge1xuICAgICAgICAgICAgICAgIC8vIEJsb2NrIGNvbW1lbnQgZW5kcyB3aXRoICcqLycuXG4gICAgICAgICAgICAgICAgaWYgKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkgPT09IDB4MkYpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gc291cmNlLnNsaWNlKHN0YXJ0ICsgMiwgaW5kZXggLSAyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkQ29tbWVudCgnQmxvY2snLCBjb21tZW50LCBzdGFydCwgaW5kZXgsIGxvYyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gUmFuIG9mZiB0aGUgZW5kIG9mIHRoZSBmaWxlIC0gdGhlIHdob2xlIHRoaW5nIGlzIGEgY29tbWVudFxuICAgICAgICBpZiAoZXh0cmEuY29tbWVudHMpIHtcbiAgICAgICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgY29tbWVudCA9IHNvdXJjZS5zbGljZShzdGFydCArIDIsIGluZGV4KTtcbiAgICAgICAgICAgIGFkZENvbW1lbnQoJ0Jsb2NrJywgY29tbWVudCwgc3RhcnQsIGluZGV4LCBsb2MpO1xuICAgICAgICB9XG4gICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2tpcENvbW1lbnQoKSB7XG4gICAgICAgIHZhciBjaCwgc3RhcnQ7XG4gICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yID0gZmFsc2U7XG5cbiAgICAgICAgc3RhcnQgPSAoaW5kZXggPT09IDApO1xuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuXG4gICAgICAgICAgICBpZiAoaXNXaGl0ZVNwYWNlKGNoKSkge1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2gpKSB7XG4gICAgICAgICAgICAgICAgaGFzTGluZVRlcm1pbmF0b3IgPSB0cnVlO1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAweDBEICYmIHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSA9PT0gMHgwQSkge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgc3RhcnQgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgyRikgeyAvLyBVKzAwMkYgaXMgJy8nXG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDEpO1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gMHgyRikge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICBza2lwU2luZ2xlTGluZUNvbW1lbnQoMik7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAweDJBKSB7ICAvLyBVKzAwMkEgaXMgJyonXG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHNraXBNdWx0aUxpbmVDb21tZW50KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChzdGFydCAmJiBjaCA9PT0gMHgyRCkgeyAvLyBVKzAwMkQgaXMgJy0nXG4gICAgICAgICAgICAgICAgLy8gVSswMDNFIGlzICc+J1xuICAgICAgICAgICAgICAgIGlmICgoc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKSA9PT0gMHgyRCkgJiYgKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMikgPT09IDB4M0UpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vICctLT4nIGlzIGEgc2luZ2xlLWxpbmUgY29tbWVudFxuICAgICAgICAgICAgICAgICAgICBpbmRleCArPSAzO1xuICAgICAgICAgICAgICAgICAgICBza2lwU2luZ2xlTGluZUNvbW1lbnQoMyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgzQykgeyAvLyBVKzAwM0MgaXMgJzwnXG4gICAgICAgICAgICAgICAgaWYgKHNvdXJjZS5zbGljZShpbmRleCArIDEsIGluZGV4ICsgNCkgPT09ICchLS0nKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGA8YFxuICAgICAgICAgICAgICAgICAgICArK2luZGV4OyAvLyBgIWBcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDsgLy8gYC1gXG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGAtYFxuICAgICAgICAgICAgICAgICAgICBza2lwU2luZ2xlTGluZUNvbW1lbnQoNCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5IZXhFc2NhcGUocHJlZml4KSB7XG4gICAgICAgIHZhciBpLCBsZW4sIGNoLCBjb2RlID0gMDtcblxuICAgICAgICBsZW4gPSAocHJlZml4ID09PSAndScpID8gNCA6IDI7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47ICsraSkge1xuICAgICAgICAgICAgaWYgKGluZGV4IDwgbGVuZ3RoICYmIGlzSGV4RGlnaXQoc291cmNlW2luZGV4XSkpIHtcbiAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgICAgICBjb2RlID0gY29kZSAqIDE2ICsgJzAxMjM0NTY3ODlhYmNkZWYnLmluZGV4T2YoY2gudG9Mb3dlckNhc2UoKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuVW5pY29kZUNvZGVQb2ludEVzY2FwZSgpIHtcbiAgICAgICAgdmFyIGNoLCBjb2RlO1xuXG4gICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgY29kZSA9IDA7XG5cbiAgICAgICAgLy8gQXQgbGVhc3QsIG9uZSBoZXggZGlnaXQgaXMgcmVxdWlyZWQuXG4gICAgICAgIGlmIChjaCA9PT0gJ30nKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIGlmICghaXNIZXhEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvZGUgPSBjb2RlICogMTYgKyAnMDEyMzQ1Njc4OWFiY2RlZicuaW5kZXhPZihjaC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjb2RlID4gMHgxMEZGRkYgfHwgY2ggIT09ICd9Jykge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmcm9tQ29kZVBvaW50KGNvZGUpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNvZGVQb2ludEF0KGkpIHtcbiAgICAgICAgdmFyIGNwLCBmaXJzdCwgc2Vjb25kO1xuXG4gICAgICAgIGNwID0gc291cmNlLmNoYXJDb2RlQXQoaSk7XG4gICAgICAgIGlmIChjcCA+PSAweEQ4MDAgJiYgY3AgPD0gMHhEQkZGKSB7XG4gICAgICAgICAgICBzZWNvbmQgPSBzb3VyY2UuY2hhckNvZGVBdChpICsgMSk7XG4gICAgICAgICAgICBpZiAoc2Vjb25kID49IDB4REMwMCAmJiBzZWNvbmQgPD0gMHhERkZGKSB7XG4gICAgICAgICAgICAgICAgZmlyc3QgPSBjcDtcbiAgICAgICAgICAgICAgICBjcCA9IChmaXJzdCAtIDB4RDgwMCkgKiAweDQwMCArIHNlY29uZCAtIDB4REMwMCArIDB4MTAwMDA7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY3A7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZ2V0Q29tcGxleElkZW50aWZpZXIoKSB7XG4gICAgICAgIHZhciBjcCwgY2gsIGlkO1xuXG4gICAgICAgIGNwID0gY29kZVBvaW50QXQoaW5kZXgpO1xuICAgICAgICBpZCA9IGZyb21Db2RlUG9pbnQoY3ApO1xuICAgICAgICBpbmRleCArPSBpZC5sZW5ndGg7XG5cbiAgICAgICAgLy8gJ1xcdScgKFUrMDA1QywgVSswMDc1KSBkZW5vdGVzIGFuIGVzY2FwZWQgY2hhcmFjdGVyLlxuICAgICAgICBpZiAoY3AgPT09IDB4NUMpIHtcbiAgICAgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgIT09IDB4NzUpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIGNoID0gc2NhblVuaWNvZGVDb2RlUG9pbnRFc2NhcGUoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzY2FuSGV4RXNjYXBlKCd1Jyk7XG4gICAgICAgICAgICAgICAgY3AgPSBjaC5jaGFyQ29kZUF0KDApO1xuICAgICAgICAgICAgICAgIGlmICghY2ggfHwgY2ggPT09ICdcXFxcJyB8fCAhaXNJZGVudGlmaWVyU3RhcnQoY3ApKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWQgPSBjaDtcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY3AgPSBjb2RlUG9pbnRBdChpbmRleCk7XG4gICAgICAgICAgICBpZiAoIWlzSWRlbnRpZmllclBhcnQoY3ApKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjaCA9IGZyb21Db2RlUG9pbnQoY3ApO1xuICAgICAgICAgICAgaWQgKz0gY2g7XG4gICAgICAgICAgICBpbmRleCArPSBjaC5sZW5ndGg7XG5cbiAgICAgICAgICAgIC8vICdcXHUnIChVKzAwNUMsIFUrMDA3NSkgZGVub3RlcyBhbiBlc2NhcGVkIGNoYXJhY3Rlci5cbiAgICAgICAgICAgIGlmIChjcCA9PT0gMHg1Qykge1xuICAgICAgICAgICAgICAgIGlkID0gaWQuc3Vic3RyKDAsIGlkLmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgIT09IDB4NzUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGNoID0gc2NhblVuaWNvZGVDb2RlUG9pbnRFc2NhcGUoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjaCA9IHNjYW5IZXhFc2NhcGUoJ3UnKTtcbiAgICAgICAgICAgICAgICAgICAgY3AgPSBjaC5jaGFyQ29kZUF0KDApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNoIHx8IGNoID09PSAnXFxcXCcgfHwgIWlzSWRlbnRpZmllclBhcnQoY3ApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlkICs9IGNoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGlkO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGdldElkZW50aWZpZXIoKSB7XG4gICAgICAgIHZhciBzdGFydCwgY2g7XG5cbiAgICAgICAgc3RhcnQgPSBpbmRleCsrO1xuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuICAgICAgICAgICAgaWYgKGNoID09PSAweDVDKSB7XG4gICAgICAgICAgICAgICAgLy8gQmxhY2tzbGFzaCAoVSswMDVDKSBtYXJrcyBVbmljb2RlIGVzY2FwZSBzZXF1ZW5jZS5cbiAgICAgICAgICAgICAgICBpbmRleCA9IHN0YXJ0O1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRDb21wbGV4SWRlbnRpZmllcigpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA+PSAweEQ4MDAgJiYgY2ggPCAweERGRkYpIHtcbiAgICAgICAgICAgICAgICAvLyBOZWVkIHRvIGhhbmRsZSBzdXJyb2dhdGUgcGFpcnMuXG4gICAgICAgICAgICAgICAgaW5kZXggPSBzdGFydDtcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q29tcGxleElkZW50aWZpZXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc0lkZW50aWZpZXJQYXJ0KGNoKSkge1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHNvdXJjZS5zbGljZShzdGFydCwgaW5kZXgpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5JZGVudGlmaWVyKCkge1xuICAgICAgICB2YXIgc3RhcnQsIGlkLCB0eXBlO1xuXG4gICAgICAgIHN0YXJ0ID0gaW5kZXg7XG5cbiAgICAgICAgLy8gQmFja3NsYXNoIChVKzAwNUMpIHN0YXJ0cyBhbiBlc2NhcGVkIGNoYXJhY3Rlci5cbiAgICAgICAgaWQgPSAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpID09PSAweDVDKSA/IGdldENvbXBsZXhJZGVudGlmaWVyKCkgOiBnZXRJZGVudGlmaWVyKCk7XG5cbiAgICAgICAgLy8gVGhlcmUgaXMgbm8ga2V5d29yZCBvciBsaXRlcmFsIHdpdGggb25seSBvbmUgY2hhcmFjdGVyLlxuICAgICAgICAvLyBUaHVzLCBpdCBtdXN0IGJlIGFuIGlkZW50aWZpZXIuXG4gICAgICAgIGlmIChpZC5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5JZGVudGlmaWVyO1xuICAgICAgICB9IGVsc2UgaWYgKGlzS2V5d29yZChpZCkpIHtcbiAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5LZXl3b3JkO1xuICAgICAgICB9IGVsc2UgaWYgKGlkID09PSAnbnVsbCcpIHtcbiAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5OdWxsTGl0ZXJhbDtcbiAgICAgICAgfSBlbHNlIGlmIChpZCA9PT0gJ3RydWUnIHx8IGlkID09PSAnZmFsc2UnKSB7XG4gICAgICAgICAgICB0eXBlID0gVG9rZW4uQm9vbGVhbkxpdGVyYWw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0eXBlID0gVG9rZW4uSWRlbnRpZmllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICAgICAgdmFsdWU6IGlkLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuXG4gICAgLy8gRUNNQS0yNjIgMTEuNyBQdW5jdHVhdG9yc1xuXG4gICAgZnVuY3Rpb24gc2NhblB1bmN0dWF0b3IoKSB7XG4gICAgICAgIHZhciB0b2tlbiwgc3RyO1xuXG4gICAgICAgIHRva2VuID0ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uUHVuY3R1YXRvcixcbiAgICAgICAgICAgIHZhbHVlOiAnJyxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBpbmRleCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBDaGVjayBmb3IgbW9zdCBjb21tb24gc2luZ2xlLWNoYXJhY3RlciBwdW5jdHVhdG9ycy5cbiAgICAgICAgc3RyID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgc3dpdGNoIChzdHIpIHtcblxuICAgICAgICBjYXNlICcoJzpcbiAgICAgICAgICAgIGlmIChleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgICAgIGV4dHJhLm9wZW5QYXJlblRva2VuID0gZXh0cmEudG9rZW5WYWx1ZXMubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ3snOlxuICAgICAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEub3BlbkN1cmx5VG9rZW4gPSBleHRyYS50b2tlblZhbHVlcy5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5jdXJseVN0YWNrLnB1c2goJ3snKTtcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICcuJzpcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJy4nICYmIHNvdXJjZVtpbmRleCArIDFdID09PSAnLicpIHtcbiAgICAgICAgICAgICAgICAvLyBTcHJlYWQgb3BlcmF0b3I6IC4uLlxuICAgICAgICAgICAgICAgIGluZGV4ICs9IDI7XG4gICAgICAgICAgICAgICAgc3RyID0gJy4uLic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICd9JzpcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBzdGF0ZS5jdXJseVN0YWNrLnBvcCgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJyknOlxuICAgICAgICBjYXNlICc7JzpcbiAgICAgICAgY2FzZSAnLCc6XG4gICAgICAgIGNhc2UgJ1snOlxuICAgICAgICBjYXNlICddJzpcbiAgICAgICAgY2FzZSAnOic6XG4gICAgICAgIGNhc2UgJz8nOlxuICAgICAgICBjYXNlICd+JzpcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgLy8gNC1jaGFyYWN0ZXIgcHVuY3R1YXRvci5cbiAgICAgICAgICAgIHN0ciA9IHNvdXJjZS5zdWJzdHIoaW5kZXgsIDQpO1xuICAgICAgICAgICAgaWYgKHN0ciA9PT0gJz4+Pj0nKSB7XG4gICAgICAgICAgICAgICAgaW5kZXggKz0gNDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAvLyAzLWNoYXJhY3RlciBwdW5jdHVhdG9ycy5cbiAgICAgICAgICAgICAgICBzdHIgPSBzdHIuc3Vic3RyKDAsIDMpO1xuICAgICAgICAgICAgICAgIGlmIChzdHIgPT09ICc9PT0nIHx8IHN0ciA9PT0gJyE9PScgfHwgc3RyID09PSAnPj4+JyB8fFxuICAgICAgICAgICAgICAgICAgICBzdHIgPT09ICc8PD0nIHx8IHN0ciA9PT0gJz4+PScpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggKz0gMztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIDItY2hhcmFjdGVyIHB1bmN0dWF0b3JzLlxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBzdHIuc3Vic3RyKDAsIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyID09PSAnJiYnIHx8IHN0ciA9PT0gJ3x8JyB8fCBzdHIgPT09ICc9PScgfHwgc3RyID09PSAnIT0nIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgPT09ICcrPScgfHwgc3RyID09PSAnLT0nIHx8IHN0ciA9PT0gJyo9JyB8fCBzdHIgPT09ICcvPScgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9PT0gJysrJyB8fCBzdHIgPT09ICctLScgfHwgc3RyID09PSAnPDwnIHx8IHN0ciA9PT0gJz4+JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyID09PSAnJj0nIHx8IHN0ciA9PT0gJ3w9JyB8fCBzdHIgPT09ICdePScgfHwgc3RyID09PSAnJT0nIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgPT09ICc8PScgfHwgc3RyID09PSAnPj0nIHx8IHN0ciA9PT0gJz0+Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXggKz0gMjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gMS1jaGFyYWN0ZXIgcHVuY3R1YXRvcnMuXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCc8Pj0hKy0qJSZ8Xi8nLmluZGV4T2Yoc3RyKSA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpbmRleCA9PT0gdG9rZW4uc3RhcnQpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0b2tlbi5lbmQgPSBpbmRleDtcbiAgICAgICAgdG9rZW4udmFsdWUgPSBzdHI7XG4gICAgICAgIHJldHVybiB0b2tlbjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMS44LjMgTnVtZXJpYyBMaXRlcmFsc1xuXG4gICAgZnVuY3Rpb24gc2NhbkhleExpdGVyYWwoc3RhcnQpIHtcbiAgICAgICAgdmFyIG51bWJlciA9ICcnO1xuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKCFpc0hleERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG51bWJlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5OdW1lcmljTGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiBwYXJzZUludCgnMHgnICsgbnVtYmVyLCAxNiksXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhbkJpbmFyeUxpdGVyYWwoc3RhcnQpIHtcbiAgICAgICAgdmFyIGNoLCBudW1iZXI7XG5cbiAgICAgICAgbnVtYmVyID0gJyc7XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgICAgICBpZiAoY2ggIT09ICcwJyAmJiBjaCAhPT0gJzEnKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG51bWJlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIC8vIG9ubHkgMGIgb3IgMEJcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgICAgIGlmIChpc0lkZW50aWZpZXJTdGFydChjaCkgfHwgaXNEZWNpbWFsRGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5OdW1lcmljTGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiBwYXJzZUludChudW1iZXIsIDIpLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5PY3RhbExpdGVyYWwocHJlZml4LCBzdGFydCkge1xuICAgICAgICB2YXIgbnVtYmVyLCBvY3RhbDtcblxuICAgICAgICBpZiAoaXNPY3RhbERpZ2l0KHByZWZpeCkpIHtcbiAgICAgICAgICAgIG9jdGFsID0gdHJ1ZTtcbiAgICAgICAgICAgIG51bWJlciA9ICcwJyArIHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG9jdGFsID0gZmFsc2U7XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgbnVtYmVyID0gJyc7XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmICghaXNPY3RhbERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFvY3RhbCAmJiBudW1iZXIubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAvLyBvbmx5IDBvIG9yIDBPXG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkgfHwgaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5OdW1lcmljTGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiBwYXJzZUludChudW1iZXIsIDgpLFxuICAgICAgICAgICAgb2N0YWw6IG9jdGFsLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGlzSW1wbGljaXRPY3RhbExpdGVyYWwoKSB7XG4gICAgICAgIHZhciBpLCBjaDtcblxuICAgICAgICAvLyBJbXBsaWNpdCBvY3RhbCwgdW5sZXNzIHRoZXJlIGlzIGEgbm9uLW9jdGFsIGRpZ2l0LlxuICAgICAgICAvLyAoQW5uZXggQi4xLjEgb24gTnVtZXJpYyBMaXRlcmFscylcbiAgICAgICAgZm9yIChpID0gaW5kZXggKyAxOyBpIDwgbGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2ldO1xuICAgICAgICAgICAgaWYgKGNoID09PSAnOCcgfHwgY2ggPT09ICc5Jykge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghaXNPY3RhbERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2Nhbk51bWVyaWNMaXRlcmFsKCkge1xuICAgICAgICB2YXIgbnVtYmVyLCBzdGFydCwgY2g7XG5cbiAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICBhc3NlcnQoaXNEZWNpbWFsRGlnaXQoY2guY2hhckNvZGVBdCgwKSkgfHwgKGNoID09PSAnLicpLFxuICAgICAgICAgICAgJ051bWVyaWMgbGl0ZXJhbCBtdXN0IHN0YXJ0IHdpdGggYSBkZWNpbWFsIGRpZ2l0IG9yIGEgZGVjaW1hbCBwb2ludCcpO1xuXG4gICAgICAgIHN0YXJ0ID0gaW5kZXg7XG4gICAgICAgIG51bWJlciA9ICcnO1xuICAgICAgICBpZiAoY2ggIT09ICcuJykge1xuICAgICAgICAgICAgbnVtYmVyID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuXG4gICAgICAgICAgICAvLyBIZXggbnVtYmVyIHN0YXJ0cyB3aXRoICcweCcuXG4gICAgICAgICAgICAvLyBPY3RhbCBudW1iZXIgc3RhcnRzIHdpdGggJzAnLlxuICAgICAgICAgICAgLy8gT2N0YWwgbnVtYmVyIGluIEVTNiBzdGFydHMgd2l0aCAnMG8nLlxuICAgICAgICAgICAgLy8gQmluYXJ5IG51bWJlciBpbiBFUzYgc3RhcnRzIHdpdGggJzBiJy5cbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09ICcwJykge1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ3gnIHx8IGNoID09PSAnWCcpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5IZXhMaXRlcmFsKHN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAnYicgfHwgY2ggPT09ICdCJykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2NhbkJpbmFyeUxpdGVyYWwoc3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICdvJyB8fCBjaCA9PT0gJ08nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FuT2N0YWxMaXRlcmFsKGNoLCBzdGFydCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGlzT2N0YWxEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzSW1wbGljaXRPY3RhbExpdGVyYWwoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5PY3RhbExpdGVyYWwoY2gsIHN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgd2hpbGUgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNoID09PSAnLicpIHtcbiAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICB3aGlsZSAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY2ggPT09ICdlJyB8fCBjaCA9PT0gJ0UnKSB7XG4gICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuXG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgICAgICBpZiAoY2ggPT09ICcrJyB8fCBjaCA9PT0gJy0nKSB7XG4gICAgICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5OdW1lcmljTGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiBwYXJzZUZsb2F0KG51bWJlciksXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuOC40IFN0cmluZyBMaXRlcmFsc1xuXG4gICAgZnVuY3Rpb24gc2NhblN0cmluZ0xpdGVyYWwoKSB7XG4gICAgICAgIHZhciBzdHIgPSAnJywgcXVvdGUsIHN0YXJ0LCBjaCwgdW5lc2NhcGVkLCBvY3RUb0RlYywgb2N0YWwgPSBmYWxzZTtcblxuICAgICAgICBxdW90ZSA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIGFzc2VydCgocXVvdGUgPT09ICdcXCcnIHx8IHF1b3RlID09PSAnXCInKSxcbiAgICAgICAgICAgICdTdHJpbmcgbGl0ZXJhbCBtdXN0IHN0YXJ0cyB3aXRoIGEgcXVvdGUnKTtcblxuICAgICAgICBzdGFydCA9IGluZGV4O1xuICAgICAgICArK2luZGV4O1xuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG5cbiAgICAgICAgICAgIGlmIChjaCA9PT0gcXVvdGUpIHtcbiAgICAgICAgICAgICAgICBxdW90ZSA9ICcnO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICAgICAgaWYgKCFjaCB8fCAhaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3UnOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICd4JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSBzY2FuVW5pY29kZUNvZGVQb2ludEVzY2FwZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmVzY2FwZWQgPSBzY2FuSGV4RXNjYXBlKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXVuZXNjYXBlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gdW5lc2NhcGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ24nOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXG4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXHInO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXHQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2InOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXGInO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2YnOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXGYnO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3YnOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXHgwQic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJzknOlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPY3RhbERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9jdFRvRGVjID0gb2N0YWxUb0RlY2ltYWwoY2gpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2N0YWwgPSBvY3RUb0RlYy5vY3RhbCB8fCBvY3RhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShvY3RUb0RlYy5jb2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xccicgJiYgc291cmNlW2luZGV4XSA9PT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChxdW90ZSAhPT0gJycpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uU3RyaW5nTGl0ZXJhbCxcbiAgICAgICAgICAgIHZhbHVlOiBzdHIsXG4gICAgICAgICAgICBvY3RhbDogb2N0YWwsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBzdGFydExpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IHN0YXJ0TGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjguNiBUZW1wbGF0ZSBMaXRlcmFsIExleGljYWwgQ29tcG9uZW50c1xuXG4gICAgZnVuY3Rpb24gc2NhblRlbXBsYXRlKCkge1xuICAgICAgICB2YXIgY29va2VkID0gJycsIGNoLCBzdGFydCwgcmF3T2Zmc2V0LCB0ZXJtaW5hdGVkLCBoZWFkLCB0YWlsLCByZXN0b3JlLCB1bmVzY2FwZWQ7XG5cbiAgICAgICAgdGVybWluYXRlZCA9IGZhbHNlO1xuICAgICAgICB0YWlsID0gZmFsc2U7XG4gICAgICAgIHN0YXJ0ID0gaW5kZXg7XG4gICAgICAgIGhlYWQgPSAoc291cmNlW2luZGV4XSA9PT0gJ2AnKTtcbiAgICAgICAgcmF3T2Zmc2V0ID0gMjtcblxuICAgICAgICArK2luZGV4O1xuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICBpZiAoY2ggPT09ICdgJykge1xuICAgICAgICAgICAgICAgIHJhd09mZnNldCA9IDE7XG4gICAgICAgICAgICAgICAgdGFpbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGVybWluYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnJCcpIHtcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLmN1cmx5U3RhY2sucHVzaCgnJHsnKTtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgdGVybWluYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb29rZWQgKz0gY2g7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFxcXCcpIHtcbiAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgICAgICBpZiAoIWlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjaCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlICduJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdyJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFxyJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd0JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFx0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd1JzpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAneCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc291cmNlW2luZGV4XSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gc2NhblVuaWNvZGVDb2RlUG9pbnRFc2NhcGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdG9yZSA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZXNjYXBlZCA9IHNjYW5IZXhFc2NhcGUoY2gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmVzY2FwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9IHVuZXNjYXBlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IHJlc3RvcmU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnYic6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcYic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZic6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcZic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndic6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcdic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAnMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbGxlZ2FsOiBcXDAxIFxcMDIgYW5kIHNvIG9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuVGVtcGxhdGVPY3RhbExpdGVyYWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gJ1xcMCc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlzT2N0YWxEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbGxlZ2FsOiBcXDEgXFwyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5UZW1wbGF0ZU9jdGFsTGl0ZXJhbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICdcXHInICYmIHNvdXJjZVtpbmRleF0gPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICdcXHInICYmIHNvdXJjZVtpbmRleF0gPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFxuJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29va2VkICs9IGNoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCF0ZXJtaW5hdGVkKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFoZWFkKSB7XG4gICAgICAgICAgICBzdGF0ZS5jdXJseVN0YWNrLnBvcCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLlRlbXBsYXRlLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgICBjb29rZWQ6IGNvb2tlZCxcbiAgICAgICAgICAgICAgICByYXc6IHNvdXJjZS5zbGljZShzdGFydCArIDEsIGluZGV4IC0gcmF3T2Zmc2V0KVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhlYWQ6IGhlYWQsXG4gICAgICAgICAgICB0YWlsOiB0YWlsLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZ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XF1aXZhbGVudFxuICAgICAgICAgICAgICAgIC8vIEJNUCBjaGFyYWN0ZXIgb3IgYSBjb25zdGFudCBBU0NJSSBjb2RlIHBvaW50IGluIHRoZSBjYXNlIG9mXG4gICAgICAgICAgICAgICAgLy8gYXN0cmFsIHN5bWJvbHMuIChTZWUgdGhlIGFib3ZlIG5vdGUgb24gYGFzdHJhbFN1YnN0aXR1dGVgXG4gICAgICAgICAgICAgICAgLy8gZm9yIG1vcmUgaW5mb3JtYXRpb24uKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXFxcdVxceyhbMC05YS1mQS1GXSspXFx9fFxcXFx1KFthLWZBLUYwLTldezR9KS9nLCBmdW5jdGlvbiAoJDAsICQxLCAkMikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29kZVBvaW50ID0gcGFyc2VJbnQoJDEgfHwgJDIsIDE2KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGVQb2ludCA+IDB4MTBGRkZGKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihudWxsLCBNZXNzYWdlcy5JbnZhbGlkUmVnRXhwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZVBvaW50IDw9IDB4RkZGRikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUoY29kZVBvaW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXN0cmFsU3Vic3RpdHV0ZTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC8vIFJlcGxhY2UgZWFjaCBwYWlyZWQgc3Vycm9nYXRlIHdpdGggYSBzaW5nbGUgQVNDSUkgc3ltYm9sIHRvXG4gICAgICAgICAgICAgICAgLy8gYXZvaWQgdGhyb3dpbmcgb24gcmVndWxhciBleHByZXNzaW9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iAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICBhc3NlcnQoY2ggPT09ICcvJywgJ1JlZ3VsYXIgZXhwcmVzc2lvbiBsaXRlcmFsIG11c3Qgc3RhcnQgd2l0aCBhIHNsYXNoJyk7XG4gICAgICAgIHN0ciA9IHNvdXJjZVtpbmRleCsrXTtcblxuICAgICAgICBjbGFzc01hcmtlciA9IGZhbHNlO1xuICAgICAgICB0ZXJtaW5hdGVkID0gZmFsc2U7XG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICBpZiAoY2ggPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgICAgIC8vIEVDTUEtMjYyIDcuOC41XG4gICAgICAgICAgICAgICAgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obnVsbCwgTWVzc2FnZXMuVW50ZXJtaW5hdGVkUmVnRXhwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3RyICs9IGNoO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obnVsbCwgTWVzc2FnZXMuVW50ZXJtaW5hdGVkUmVnRXhwKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xhc3NNYXJrZXIpIHtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykge1xuICAgICAgICAgICAgICAgICAgICBjbGFzc01hcmtlciA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAnLycpIHtcbiAgICAgICAgICAgICAgICAgICAgdGVybWluYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdbJykge1xuICAgICAgICAgICAgICAgICAgICBjbGFzc01hcmtlciA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCF0ZXJtaW5hdGVkKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihudWxsLCBNZXNzYWdlcy5VbnRlcm1pbmF0ZWRSZWdFeHApO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRXhjbHVkZSBsZWFkaW5nIGFuZCB0cmFpbGluZyBzbGFzaC5cbiAgICAgICAgYm9keSA9IHN0ci5zdWJzdHIoMSwgc3RyLmxlbmd0aCAtIDIpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IGJvZHksXG4gICAgICAgICAgICBsaXRlcmFsOiBzdHJcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuUmVnRXhwRmxhZ3MoKSB7XG4gICAgICAgIHZhciBjaCwgc3RyLCBmbGFncywgcmVzdG9yZTtcblxuICAgICAgICBzdHIgPSAnJztcbiAgICAgICAgZmxhZ3MgPSAnJztcbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgICAgICBpZiAoIWlzSWRlbnRpZmllclBhcnQoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xcXFwnICYmIGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ3UnKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RvcmUgPSBpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgY2ggPSBzY2FuSGV4RXNjYXBlKCd1Jyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHN0ciArPSAnXFxcXHUnOyByZXN0b3JlIDwgaW5kZXg7ICsrcmVzdG9yZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSBzb3VyY2VbcmVzdG9yZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IHJlc3RvcmU7XG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFncyArPSAndSc7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcXFx1JztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxcXCc7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmbGFncyArPSBjaDtcbiAgICAgICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IGZsYWdzLFxuICAgICAgICAgICAgbGl0ZXJhbDogc3RyXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhblJlZ0V4cCgpIHtcbiAgICAgICAgdmFyIHN0YXJ0LCBib2R5LCBmbGFncywgdmFsdWU7XG4gICAgICAgIHNjYW5uaW5nID0gdHJ1ZTtcblxuICAgICAgICBsb29rYWhlYWQgPSBudWxsO1xuICAgICAgICBza2lwQ29tbWVudCgpO1xuICAgICAgICBzdGFydCA9IGluZGV4O1xuXG4gICAgICAgIGJvZHkgPSBzY2FuUmVnRXhwQm9keSgpO1xuICAgICAgICBmbGFncyA9IHNjYW5SZWdFeHBGbGFncygpO1xuICAgICAgICB2YWx1ZSA9IHRlc3RSZWdFeHAoYm9keS52YWx1ZSwgZmxhZ3MudmFsdWUpO1xuICAgICAgICBzY2FubmluZyA9IGZhbHNlO1xuICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgdHlwZTogVG9rZW4uUmVndWxhckV4cHJlc3Npb24sXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiB7XG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IGJvZHkudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGZsYWdzOiBmbGFncy52YWx1ZVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBsaXRlcmFsOiBib2R5LmxpdGVyYWwgKyBmbGFncy5saXRlcmFsLFxuICAgICAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICAgICAgcmVnZXg6IHtcbiAgICAgICAgICAgICAgICBwYXR0ZXJuOiBib2R5LnZhbHVlLFxuICAgICAgICAgICAgICAgIGZsYWdzOiBmbGFncy52YWx1ZVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjb2xsZWN0UmVnZXgoKSB7XG4gICAgICAgIHZhciBwb3MsIGxvYywgcmVnZXgsIHRva2VuO1xuXG4gICAgICAgIHNraXBDb21tZW50KCk7XG5cbiAgICAgICAgcG9zID0gaW5kZXg7XG4gICAgICAgIGxvYyA9IHtcbiAgICAgICAgICAgIHN0YXJ0OiB7XG4gICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgcmVnZXggPSBzY2FuUmVnRXhwKCk7XG5cbiAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgIH07XG5cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKCFleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgLy8gUG9wIHRoZSBwcmV2aW91cyB0b2tlbiwgd2hpY2ggaXMgbGlrZWx5ICcvJyBvciAnLz0nXG4gICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5zLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGV4dHJhLnRva2Vuc1tleHRyYS50b2tlbnMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnJhbmdlWzBdID09PSBwb3MgJiYgdG9rZW4udHlwZSA9PT0gJ1B1bmN0dWF0b3InKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PT0gJy8nIHx8IHRva2VuLnZhbHVlID09PSAnLz0nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYS50b2tlbnMucG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV4dHJhLnRva2Vucy5wdXNoKHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnUmVndWxhckV4cHJlc3Npb24nLFxuICAgICAgICAgICAgICAgIHZhbHVlOiByZWdleC5saXRlcmFsLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiByZWdleC5yZWdleCxcbiAgICAgICAgICAgICAgICByYW5nZTogW3BvcywgaW5kZXhdLFxuICAgICAgICAgICAgICAgIGxvYzogbG9jXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZWdleDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc0lkZW50aWZpZXJOYW1lKHRva2VuKSB7XG4gICAgICAgIHJldHVybiB0b2tlbi50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyIHx8XG4gICAgICAgICAgICB0b2tlbi50eXBlID09PSBUb2tlbi5LZXl3b3JkIHx8XG4gICAgICAgICAgICB0b2tlbi50eXBlID09PSBUb2tlbi5Cb29sZWFuTGl0ZXJhbCB8fFxuICAgICAgICAgICAgdG9rZW4udHlwZSA9PT0gVG9rZW4uTnVsbExpdGVyYWw7XG4gICAgfVxuXG4gICAgLy8gVXNpbmcgdGhlIGZvbGxvd2luZyBhbGdvcml0aG06XG4gICAgLy8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ICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgICAgICBzdGFydDogaW5kZXgsXG4gICAgICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNwID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpO1xuXG4gICAgICAgIGlmIChpc0lkZW50aWZpZXJTdGFydChjcCkpIHtcbiAgICAgICAgICAgIHRva2VuID0gc2NhbklkZW50aWZpZXIoKTtcbiAgICAgICAgICAgIGlmIChzdHJpY3QgJiYgaXNTdHJpY3RNb2RlUmVzZXJ2ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHRva2VuLnR5cGUgPSBUb2tlbi5LZXl3b3JkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gVmVyeSBjb21tb246ICggYW5kICkgYW5kIDtcbiAgICAgICAgaWYgKGNwID09PSAweDI4IHx8IGNwID09PSAweDI5IHx8IGNwID09PSAweDNCKSB7XG4gICAgICAgICAgICByZXR1cm4gc2NhblB1bmN0dWF0b3IoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFN0cmluZyBsaXRlcmFsIHN0YXJ0cyB3aXRoIHNpbmdsZSBxdW90ZSAoVSswMDI3KSBvciBkb3VibGUgcXVvdGUgKFUrMDAyMikuXG4gICAgICAgIGlmIChjcCA9PT0gMHgyNyB8fCBjcCA9PT0gMHgyMikge1xuICAgICAgICAgICAgcmV0dXJuIHNjYW5TdHJpbmdMaXRlcmFsKCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBEb3QgKC4pIFUrMDAyRSBjYW4gYWxzbyBzdGFydCBhIGZsb2F0aW5nLXBvaW50IG51bWJlciwgaGVuY2UgdGhlIG5lZWRcbiAgICA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CA+PSAweEQ4MDAgJiYgY3AgPCAweERGRkYpIHtcbiAgICAgICAgICAgIGNwID0gY29kZVBvaW50QXQoaW5kZXgpO1xuICAgICAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KGNwKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzY2FuSWRlbnRpZmllcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHNjYW5QdW5jdHVhdG9yKCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY29sbGVjdFRva2VuKCkge1xuICAgICAgICB2YXIgbG9jLCB0b2tlbiwgdmFsdWUsIGVudHJ5O1xuXG4gICAgICAgIGxvYyA9IHtcbiAgICAgICAgICAgIHN0YXJ0OiB7XG4gICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdG9rZW4gPSBhZHZhbmNlKCk7XG4gICAgICAgIGxvYy5lbmQgPSB7XG4gICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICh0b2tlbi50eXBlICE9PSBUb2tlbi5FT0YpIHtcbiAgICAgICAgICAgIHZhbHVlID0gc291cmNlLnNsaWNlKHRva2VuLnN0YXJ0LCB0b2tlbi5lbmQpO1xuICAgICAgICAgICAgZW50cnkgPSB7XG4gICAgICAgICAgICAgICAgdHlwZTogVG9rZW5OYW1lW3Rva2VuLnR5cGVdLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgICAgICByYW5nZTogW3Rva2VuLnN0YXJ0LCB0b2tlbi5lbmRdLFxuICAgICAgICAgICAgICAgIGxvYzogbG9jXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaWYgKHRva2VuLnJlZ2V4KSB7XG4gICAgICAgICAgICAgICAgZW50cnkucmVnZXggPSB7XG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IHRva2VuLnJlZ2V4LnBhdHRlcm4sXG4gICAgICAgICAgICAgICAgICAgIGZsYWdzOiB0b2tlbi5yZWdleC5mbGFnc1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5WYWx1ZXMpIHtcbiAgICAgICAgICAgICAgICBleHRyYS50b2tlblZhbHVlcy5wdXNoKChlbnRyeS50eXBlID09PSAnUHVuY3R1YXRvcicgfHwgZW50cnkudHlwZSA9PT0gJ0tleXdvcmQnKSA/IGVudHJ5LnZhbHVlIDogbnVsbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWV4dHJhLnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBlbnRyeS5yYW5nZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFleHRyYS5sb2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGVudHJ5LmxvYztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGV4dHJhLmRlbGVnYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGVudHJ5ID0gZXh0cmEuZGVsZWdhdGUoZW50cnkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV4dHJhLnRva2Vucy5wdXNoKGVudHJ5KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0b2tlbjtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBsZXgoKSB7XG4gICAgICAgIHZhciB0b2tlbjtcbiAgICAgICAgc2Nhbm5pbmcgPSB0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BwaW5nU291cmNlTG9jYXRpb24oc3RhcnRUb2tlbik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBXcmFwcGluZ05vZGUucHJvdG90eXBlID0gTm9kZS5wcm90b3R5cGUgPSB7XG5cbiAgICAgICAgcHJvY2Vzc0NvbW1lbnQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBsYXN0Q2hpbGQsXG4gICAgICAgICAgICAgICAgaW5uZXJDb21tZW50cyxcbiAgICAgICAgICAgICAgICBsZWFkaW5nQ29tbWVudHMsXG4gICAgICAgICAgICAgICAgdHJhaWxpbmdDb21tZW50cyxcbiAgICAgICAgICAgICAgICBib3R0b21SaWdodCA9IGV4dHJhLmJvdHRvbVJpZ2h0U3RhY2ssXG4gICAgICAgICAgICAgICAgaSxcbiAgICAgICAgICAgICAgICBjb21tZW50LFxuICAgICAgICAgICAgICAgIGxhc3QgPSBib3R0b21SaWdodFtib3R0b21SaWdodC5sZW5ndGggLSAxXTtcblxuICAgICAgICAgICAgaWYgKHRoaXMudHlwZSA9PT0gU3ludGF4LlByb2dyYW0pIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5ib2R5Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogcGF0Y2ggaW5ubmVyQ29tbWVudHMgZm9yIHByb3BlcnRpZXMgZW1wdHkgYmxvY2tcbiAgICAgICAgICAgICAqIGBmdW5jdGlvbiBhKCkgey8qKiBjb21tZW50cyAqKlxcL31gXG4gICAgICAgICAgICAgKi9cblxuICAgICAgICAgICAgaWYgKHRoaXMudHlwZSA9PT0gU3ludGF4LkJsb2NrU3RhdGVtZW50ICYmIHRoaXMuYm9keS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICBpbm5lckNvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChpID0gZXh0cmEubGVhZGluZ0NvbW1lbnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBleHRyYS5sZWFkaW5nQ29tbWVudHNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnJhbmdlWzFdID49IGNvbW1lbnQucmFuZ2VbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlubmVyQ29tbWVudHMudW5zaGlmdChjb21tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLmxlYWRpbmdDb21tZW50cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYS50cmFpbGluZ0NvbW1lbnRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaW5uZXJDb21tZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbm5lckNvbW1lbnRzID0gaW5uZXJDb21tZW50cztcbiAgICAgICAgICAgICAgICAgICAgLy9ib3R0b21SaWdodC5wdXNoKHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXh0cmEudHJhaWxpbmdDb21tZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdHJhaWxpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IGV4dHJhLnRyYWlsaW5nQ29tbWVudHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IGV4dHJhLnRyYWlsaW5nQ29tbWVudHNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50LnJhbmdlWzBdID49IHRoaXMucmFuZ2VbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYWlsaW5nQ29tbWVudHMudW5zaGlmdChjb21tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGxhc3QgJiYgbGFzdC50cmFpbGluZ0NvbW1lbnRzICYmIGxhc3QudHJhaWxpbmdDb21tZW50c1swXS5yYW5nZVswXSA+PSB0aGlzLnJhbmdlWzFdKSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYWlsaW5nQ29tbWVudHMgPSBsYXN0LnRyYWlsaW5nQ29tbWVudHM7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXN0LnRyYWlsaW5nQ29tbWVudHM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBFYXRpbmcgdGhlIHN0YWNrLlxuICAgICAgICAgICAgd2hpbGUgKGxhc3QgJiYgbGFzdC5yYW5nZVswXSA+PSB0aGlzLnJhbmdlWzBdKSB7XG4gICAgICAgICAgICAgICAgbGFzdENoaWxkID0gYm90dG9tUmlnaHQucG9wKCk7XG4gICAgICAgICAgICAgICAgbGFzdCA9IGJvdHRvbVJpZ2h0W2JvdHRvbVJpZ2h0Lmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobGFzdENoaWxkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgbGVhZGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IGxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1lbnQucmFuZ2VbMV0gPD0gdGhpcy5yYW5nZVswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlYWRpbmdDb21tZW50cy51bnNoaWZ0KGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENoaWxkLmxlYWRpbmdDb21tZW50cyA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZXh0cmEubGVhZGluZ0NvbW1lbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBsZWFkaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBleHRyYS5sZWFkaW5nQ29tbWVudHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IGV4dHJhLmxlYWRpbmdDb21tZW50c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1lbnQucmFuZ2VbMV0gPD0gdGhpcy5yYW5nZVswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGVhZGluZ0NvbW1lbnRzLnVuc2hpZnQoY29tbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYS5sZWFkaW5nQ29tbWVudHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG5cbiAgICAgICAgICAgIGlmIChsZWFkaW5nQ29tbWVudHMgJiYgbGVhZGluZ0NvbW1lbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxlYWRpbmdDb21tZW50cyA9IGxlYWRpbmdDb21tZW50cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0cmFpbGluZ0NvbW1lbnRzICYmIHRyYWlsaW5nQ29tbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHRoaXMudHJhaWxpbmdDb21tZW50cyA9IHRyYWlsaW5nQ29tbWVudHM7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJvdHRvbVJpZ2h0LnB1c2godGhpcyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJhbmdlWzFdID0gbGFzdEluZGV4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLmxvYykge1xuICAgICAgICAgICAgICAgIHRoaXMubG9jLmVuZCA9IHtcbiAgICAgICAgICAgICAgICAgICAgbGluZTogbGFzdExpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbjogbGFzdEluZGV4IC0gbGFzdExpbmVTdGFydFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGV4dHJhLnNvdXJjZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvYy5zb3VyY2UgPSBleHRyYS5zb3VyY2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXh0cmEuYXR0YWNoQ29tbWVudCkge1xuICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0NvbW1lbnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hBcnJheUV4cHJlc3Npb246IGZ1bmN0aW9uIChlbGVtZW50cykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkFycmF5RXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuZWxlbWVudHMgPSBlbGVtZW50cztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hBcnJheVBhdHRlcm46IGZ1bmN0aW9uIChlbGVtZW50cykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkFycmF5UGF0dGVybjtcbiAgICAgICAgICAgIHRoaXMuZWxlbWVudHMgPSBlbGVtZW50cztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjogZnVuY3Rpb24gKHBhcmFtcywgZGVmYXVsdHMsIGJvZHksIGV4cHJlc3Npb24pIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5BcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuaWQgPSBudWxsO1xuICAgICAgICAgICAgdGhpcy5wYXJhbXMgPSBwYXJhbXM7XG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRzID0gZGVmYXVsdHM7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuIC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9uIDogU3ludGF4LkJpbmFyeUV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLm9wZXJhdG9yID0gb3BlcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmxlZnQgPSBsZWZ0O1xuICAgICAgICAgICAgdGhpcy5yaWdodCA9IHJpZ2h0O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEJsb2NrU3RhdGVtZW50OiBmdW5jdGlvbiAoYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkJsb2NrU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hCcmVha1N0YXRlbWVudDogZnVuY3Rpb24gKGxhYmVsKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQnJlYWtTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmxhYmVsID0gbGFiZWw7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ2FsbEV4cHJlc3Npb246IGZ1bmN0aW9uIChjYWxsZWUsIGFyZ3MpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5DYWxsRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuY2FsbGVlID0gY2FsbGVlO1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudHMgPSBhcmdzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENhdGNoQ2xhdXNlOiBmdW5jdGlvbiAocGFyYW0sIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5DYXRjaENsYXVzZTtcbiAgICAgICAgICAgIHRoaXMucGFyYW0gPSBwYXJhbTtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ2xhc3NCb2R5OiBmdW5jdGlvbiAoYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNsYXNzQm9keTtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ2xhc3NEZWNsYXJhdGlvbjogZnVuY3Rpb24gKGlkLCBzdXBlckNsYXNzLCBib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ2xhc3NEZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuaWQgPSBpZDtcbiAgICAgICAgICAgIHRoaXMuc3VwZXJDbGFzcyA9IHN1cGVyQ2xhc3M7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENsYXNzRXhwcmVzc2lvbjogZnVuY3Rpb24gKGlkLCBzdXBlckNsYXNzLCBib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ2xhc3NFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5pZCA9IGlkO1xuICAgICAgICAgICAgdGhpcy5zdXBlckNsYXNzID0gc3VwZXJDbGFzcztcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ29uZGl0aW9uYWxFeHByZXNzaW9uOiBmdW5jdGlvbiAodGVzdCwgY29uc2VxdWVudCwgYWx0ZXJuYXRlKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ29uZGl0aW9uYWxFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy50ZXN0ID0gdGVzdDtcbiAgICAgICAgICAgIHRoaXMuY29uc2VxdWVudCA9IGNvbnNlcXVlbnQ7XG4gICAgICAgICAgICB0aGlzLmFsdGVybmF0ZSA9IGFsdGVybmF0ZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDb250aW51ZVN0YXRlbWVudDogZnVuY3Rpb24gKGxhYmVsKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ29udGludWVTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmxhYmVsID0gbGFiZWw7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRGVidWdnZXJTdGF0ZW1lbnQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5EZWJ1Z2dlclN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hEb1doaWxlU3RhdGVtZW50OiBmdW5jdGlvbiAoYm9keSwgdGVzdCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkRvV2hpbGVTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy50ZXN0ID0gdGVzdDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hFbXB0eVN0YXRlbWVudDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkVtcHR5U3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEV4cHJlc3Npb25TdGF0ZW1lbnQ6IGZ1bmN0aW9uIChleHByZXNzaW9uKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRXhwcmVzc2lvblN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuZXhwcmVzc2lvbiA9IGV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRm9yU3RhdGVtZW50OiBmdW5jdGlvbiAoaW5pdCwgdGVzdCwgdXBkYXRlLCBib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRm9yU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5pbml0ID0gaW5pdDtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSA9IHVwZGF0ZTtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRm9yT2ZTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsZWZ0LCByaWdodCwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkZvck9mU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5sZWZ0ID0gbGVmdDtcbiAgICAgICAgICAgIHRoaXMucmlnaHQgPSByaWdodDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRm9ySW5TdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsZWZ0LCByaWdodCwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkZvckluU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5sZWZ0ID0gbGVmdDtcbiAgICAgICAgICAgIHRoaXMucmlnaHQgPSByaWdodDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmVhY2ggPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hGdW5jdGlvbkRlY2xhcmF0aW9uOiBmdW5jdGlvbiAoaWQsIHBhcmFtcywgZGVmYXVsdHMsIGJvZHksIGdlbmVyYXRvcikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkZ1bmN0aW9uRGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmlkID0gaWQ7XG4gICAgICAgICAgICB0aGlzLnBhcmFtcyA9IHBhcmFtcztcbiAgICAgICAgICAgIHRoaXMuZGVmYXVsdHMgPSBkZWZh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BhbHRlcm5hdGUpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5JZlN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLmNvbnNlcXVlbnQgPSBjb25zZXF1ZW50O1xuICAgICAgICAgICAgdGhpcy5hbHRlcm5hdGUgPSBhbHRlcm5hdGU7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTGFiZWxlZFN0YXRlbWVudDogZnVuY3Rpb24gKGxhYmVsLCBib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguTGFiZWxlZFN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMubGFiZWwgPSBsYWJlbDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTGl0ZXJhbDogZnVuY3Rpb24gKHRva2VuKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguTGl0ZXJhbDtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIHRoaXMucmF3ID0gc291cmNlLnNsaWNlKHRva2VuLnN0YXJ0LCB0b2tlbi5lbmQpO1xuICAgICAgICAgICAgaWYgKHRva2VuLnJlZ2V4KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZWdleCA9IHRva2VuLnJlZ2V4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaE1lbWJlckV4cHJlc3Npb246IGZ1bmN0aW9uIChhY2Nlc3Nvciwgb2JqZWN0LCBwcm9wZXJ0eSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4Lk1lbWJlckV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmNvbXB1dGVkID0gYWNjZXNzb3IgPT09ICdbJztcbiAgICAgICAgICAgIHRoaXMub2JqZWN0ID0gb2JqZWN0O1xuICAgICAgICAgICAgdGhpcy5wcm9wZXJ0eSA9IHByb3BlcnR5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaE1ldGFQcm9wZXJ0eTogZnVuY3Rpb24gKG1ldGEsIHByb3BlcnR5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguTWV0YVByb3BlcnR5O1xuICAgICAgICAgICAgdGhpcy5tZXRhID0gbWV0YTtcbiAgICAgICAgICAgIHRoaXMucHJvcGVydHkgPSBwcm9wZXJ0eTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hOZXdFeHByZXNzaW9uOiBmdW5jdGlvbiAoY2FsbGVlLCBhcmdzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguTmV3RXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuY2FsbGVlID0gY2FsbGVlO1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudHMgPSBhcmdzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaE9iamVjdEV4cHJlc3Npb246IGZ1bmN0aW9uIChwcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguT2JqZWN0RXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMucHJvcGVydGllcyA9IHByb3BlcnRpZXM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoT2JqZWN0UGF0dGVybjogZnVuY3Rpb24gKHByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5PYmplY3RQYXR0ZXJuO1xuICAgICAgICAgICAgdGhpcy5wcm9wZXJ0aWVzID0gcHJvcGVydGllcztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hQb3N0Zml4RXhwcmVzc2lvbjogZnVuY3Rpb24gKG9wZXJhdG9yLCBhcmd1bWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlVwZGF0ZUV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLm9wZXJhdG9yID0gb3BlcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50ID0gYXJndW1lbnQ7XG4gICAgICAgICAgICB0aGlzLnByZWZpeCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFByb2dyYW06IGZ1bmN0aW9uIChib2R5LCBzb3VyY2VUeXBlKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguUHJvZ3JhbTtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLnNvdXJjZVR5cGUgPSBzb3VyY2VUeXBlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFByb3BlcnR5OiBmdW5jdGlvbiAoa2luZCwga2V5LCBjb21wdXRlZCwgdmFsdWUsIG1ldGhvZCwgc2hvcnRoYW5kKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguUHJvcGVydHk7XG4gICAgICAgICAgICB0aGlzLmtleSA9IGtleTtcbiAgICAgICAgICAgIHRoaXMuY29tcHV0ZWQgPSBjb21wdXRlZDtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMua2luZCA9IGtpbmQ7XG4gICAgICAgICAgICB0aGlzLm1ldGhvZCA9IG1ldGhvZDtcbiAgICAgICAgICAgIHRoaXMuc2hvcnRoYW5kID0gc2hvcnRoYW5kO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFJlc3RFbGVtZW50OiBmdW5jdGlvbiAoYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5SZXN0RWxlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnQgPSBhcmd1bWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hSZXR1cm5TdGF0ZW1lbnQ6IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlJldHVyblN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnQgPSBhcmd1bWVudDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hTZXF1ZW5jZUV4cHJlc3Npb246IGZ1bmN0aW9uIChleHByZXNzaW9ucykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlNlcXVlbmNlRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuZXhwcmVzc2lvbnMgPSBleHByZXNzaW9ucztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hTcHJlYWRFbGVtZW50OiBmdW5jdGlvbiAoYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5TcHJlYWRFbGVtZW50O1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFN3aXRjaENhc2U6IGZ1bmN0aW9uICh0ZXN0LCBjb25zZXF1ZW50KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguU3dpdGNoQ2FzZTtcbiAgICAgICAgICAgIHRoaXMudGVzdCA9IHRlc3Q7XG4gICAgICAgICAgICB0aGlzLmNvbnNlcXVlbnQgPSBjb25zZXF1ZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFN1cGVyOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguU3VwZXI7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoU3dpdGNoU3RhdGVtZW50OiBmdW5jdGlvbiAoZGlzY3JpbWluYW50LCBjYXNlcykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlN3aXRjaFN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuZGlzY3JpbWluYW50ID0gZGlzY3JpbWluYW50O1xuICAgICAgICAgICAgdGhpcy5jYXNlcyA9IGNhc2VzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRhZ2dlZFRlbXBsYXRlRXhwcmVzc2lvbjogZnVuY3Rpb24gKHRhZywgcXVhc2kpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UYWdnZWRUZW1wbGF0ZUV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLnRhZyA9IHRhZztcbiAgICAgICAgICAgIHRoaXMucXVhc2kgPSBxdWFzaTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUZW1wbGF0ZUVsZW1lbnQ6IGZ1bmN0aW9uICh2YWx1ZSwgdGFpbCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRlbXBsYXRlRWxlbWVudDtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMudGFpbCA9IHRhaWw7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVGVtcGxhdGVMaXRlcmFsOiBmdW5jdGlvbiAocXVhc2lzLCBleHByZXNzaW9ucykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRlbXBsYXRlTGl0ZXJhbDtcbiAgICAgICAgICAgIHRoaXMucXVhc2lzID0gcXVhc2lzO1xuICAgICAgICAgICAgdGhpcy5leHByZXNzaW9ucyA9IGV4cHJlc3Npb25zO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRoaXNFeHByZXNzaW9uOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVGhpc0V4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVGhyb3dTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRocm93U3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRyeVN0YXRlbWVudDogZnVuY3Rpb24gKGJsb2NrLCBoYW5kbGVyLCBmaW5hbGl6ZXIpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UcnlTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmJsb2NrID0gYmxvY2s7XG4gICAgICAgICAgICB0aGlzLmd1YXJkZWRIYW5kbGVycyA9IFtdO1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVycyA9IGhhbmRsZXIgPyBbaGFuZGxlcl0gOiBbXTtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlciA9IGhhbmRsZXI7XG4gICAgICAgICAgICB0aGlzLmZpbmFsaXplciA9IGZpbmFsaXplcjtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hVbmFyeUV4cHJlc3Npb246IGZ1bmN0aW9uIChvcGVyYXRvciwgYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IChvcGVyYXRvciA9PT0gJysrJyB8fCBvcGVyYXRvciA9PT0gJy0tJykgPyBTeW50YXguVXBkYXRlRXhwcmVzc2lvbiA6IFN5bnRheC5VbmFyeUV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLm9wZXJhdG9yID0gb3BlcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50ID0gYXJndW1lbnQ7XG4gICAgICAgICAgICB0aGlzLnByZWZpeCA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVmFyaWFibGVEZWNsYXJhdGlvbjogZnVuY3Rpb24gKGRlY2xhcmF0aW9ucykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlZhcmlhYmxlRGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmRlY2xhcmF0aW9ucyA9IGRlY2xhcmF0aW9ucztcbiAgICAgICAgICAgIHRoaXMua2luZCA9ICd2YXInO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaExleGljYWxEZWNsYXJhdGlvbjogZnVuY3Rpb24gKGRlY2xhcmF0aW9ucywga2luZCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlZhcmlhYmxlRGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmRlY2xhcmF0aW9ucyA9IGRlY2xhcmF0aW9ucztcbiAgICAgICAgICAgIHRoaXMua2luZCA9IGtpbmQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVmFyaWFibGVEZWNsYXJhdG9yOiBmdW5jdGlvbiAoaWQsIGluaXQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5WYXJpYWJsZURlY2xhcmF0b3I7XG4gICAgICAgICAgICB0aGlzLmlkID0gaWQ7XG4gICAgICAgICAgICB0aGlzLmluaXQgPSBpbml0O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFdoaWxlU3RhdGVtZW50OiBmdW5jdGlvbiAodGVzdCwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LldoaWxlU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy50ZXN0ID0gdGVzdDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoV2l0aFN0YXRlbWVudDogZnVuY3Rpb24gKG9iamVjdCwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LldpdGhTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLm9iamVjdCA9IG9iamVjdDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRXhwb3J0U3BlY2lmaWVyOiBmdW5jdGlvbiAobG9jYWwsIGV4cG9ydGVkKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRXhwb3J0U3BlY2lmaWVyO1xuICAgICAgICAgICAgdGhpcy5leHBvcnRlZCA9IGV4cG9ydGVkIHx8IGxvY2FsO1xuICAgICAgICAgICAgdGhpcy5sb2NhbCA9IGxvY2FsO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEltcG9ydERlZmF1bHRTcGVjaWZpZXI6IGZ1bmN0aW9uIChsb2NhbCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkltcG9ydERlZmF1bHRTcGVjaWZpZXI7XG4gICAgICAgICAgICB0aGlzLmxvY2FsID0gbG9jYWw7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyOiBmdW5jdGlvbiAobG9jYWwpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5JbXBvcnROYW1lc3BhY2VTcGVjaWZpZXI7XG4gICAgICAgICAgICB0aGlzLmxvY2FsID0gbG9jYWw7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRXhwb3J0TmFtZWREZWNsYXJhdGlvbjogZnVuY3Rpb24gKGRlY2xhcmF0aW9uLCBzcGVjaWZpZXJzLCBzcmMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5FeHBvcnROYW1lZERlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5kZWNsYXJhdGlvbiA9IGRlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5zcGVjaWZpZXJzID0gc3BlY2lmaWVycztcbiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc3JjO1xuICAgICAgICAgICAgd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wZSA9IFN5bnRheC5JbXBvcnREZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuc3BlY2lmaWVycyA9IHNwZWNpZmllcnM7XG4gICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNyYztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hZaWVsZEV4cHJlc3Npb246IGZ1bmN0aW9uIChhcmd1bWVudCwgZGVsZWdhdGUpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5ZaWVsZEV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50ID0gYXJndW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmRlbGVnYXRlID0gZGVsZWdhdGU7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICB9O1xuXG5cbiAgICBmdW5jdGlvbiByZWNvcmRFcnJvcihlcnJvcikge1xuICAgICAgICB2YXIgZSwgZXhpc3Rpbmc7XG5cbiAgICAgICAgZm9yIChlID0gMDsgZSA8IGV4dHJhLmVycm9ycy5sZW5ndGg7IGUrKykge1xuICAgICAgICAgICAgZXhpc3RpbmcgPSBleHRyYS5lcnJvcnNbZV07XG4gICAgICAgICAgICAvLyBQcmV2ZW50IGR1cGxpY2F0ZWQgZXJyb3IuXG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgaWYgKGV4aXN0aW5nLmluZGV4ID09PSBlcnJvci5pbmRleCAmJiBleGlzdGluZy5tZXNzYWdlID09PSBlcnJvci5tZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXh0cmEuZXJyb3JzLnB1c2goZXJyb3IpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNvbnN0cnVjdEVycm9yKG1zZywgY29sdW1uKSB7XG4gICAgICAgIHZhciBlcnJvciA9IG5ldyBFcnJvcihtc2cpO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH0gY2F0Y2ggKGJhc2UpIHtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICBpZiAoT2JqZWN0LmNyZWF0ZSAmJiBPYmplY3QuZGVmaW5lUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICBlcnJvciA9IE9iamVjdC5jcmVhdGUoYmFzZSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGVycm9yLCAnY29sdW1uJywgeyB2YWx1ZTogY29sdW1uIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY3JlYXRlRXJyb3IobGluZSwgcG9zLCBkZXNjcmlwdGlvbikge1xuICAgICAgICB2YXIgbXNnLCBjb2x1bW4sIGVycm9yO1xuXG4gICAgICAgIG1zZyA9ICdMaW5lICcgKyBsaW5lICsgJzogJyArIGRlc2NyaXB0aW9uO1xuICAgICAgICBjb2x1bW4gPSBwb3MgLSAoc2Nhbm5pbmcgPyBsaW5lU3RhcnQgOiBsYXN0TGluZVN0YXJ0KSArIDE7XG4gICAgICAgIGVycm9yID0gY29uc3RydWN0RXJyb3IobXNnLCBjb2x1bW4pO1xuICAgICAgICBlcnJvci5saW5lTnVtYmVyID0gbGluZTtcbiAgICAgICAgZXJyb3IuZGVzY3JpcHRpb24gPSBkZXNjcmlwdGlvbjtcbiAgICAgICAgZXJyb3IuaW5kZXggPSBwb3M7XG4gICAgICAgIHJldHVybiBlcnJvcjtc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0ZXNcbiAgICAgKiB0byA8Y29kZT5leHBlY3QodmFsdWUpPC9jb2RlPlxuICAgICAqIEBzaW5jZSAyLjBcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBleHBlY3RDb21tYVNlcGFyYXRvcigpIHtcbiAgICAgICAgdmFyIHRva2VuO1xuXG4gICAgICAgIGlmIChleHRyYS5lcnJvcnMpIHtcbiAgICAgICAgICAgIHRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUgPT09IFRva2VuLlB1bmN0dWF0b3IgJiYgdG9rZW4udmFsdWUgPT09ICcsJykge1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0b2tlbi50eXBlID09PSBUb2tlbi5QdW5jdHVhdG9yICYmIHRva2VuLnZhbHVlID09PSAnOycpIHtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBFeHBlY3QgdGhlIG5leHQgdG9rZW4gdG8gbWF0Y2ggdGhlIHNwZWNpZmllZCBrZXl3b3JkLlxuICAgIC8vIElmIG5vdCwgYW4gZXhjZXB0aW9uIHdpbGwgYmUgdGhyb3duLlxuXG4gICAgZnVuY3Rpb24gZXhwZWN0S2V5d29yZChrZXl3b3JkKSB7XG4gICAgICAgIHZhciB0b2tlbiA9IGxleCgpO1xuICAgICAgICBpZiAodG9rZW4udHlwZSAhPT0gVG9rZW4uS2V5d29yZCB8fCB0b2tlbi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biBpcyBhbiBhc3NpZ25tZW50IG9wZXJhdG9yXG5cbiAgICBmdW5jdGlvbiBtYXRjaEFzc2lnbigpIHtcbiAgICAgICAgdmFyIG9wO1xuXG4gICAgICAgIGlmIChsb29rYWhlYWQudHlwZSAhPT0gVG9rZW4uUHVuY3R1YXRvcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIG9wID0gbG9va2FoZWFkLnZhbHVlO1xuICAgICAgICByZXR1cm4gb3AgPT09ICc9JyB8fFxuICAgICAgICAgICAgb3AgPT09ICcqPScgfHxcbiAgICAgICAgICAgIG9wID09PSAnLz0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJyU9JyB8fFxuICAgICAgICAgICAgb3AgPT09ICcrPScgfHxcbiAgICAgICAgICAgIG9wID09PSAnLT0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJzw8PScgfHxcbiAgICAgICAgICAgIG9wID09PSAnPj49JyB8fFxuICAgICAgICAgICAgb3AgPT09ICc+Pj49JyB8fFxuICAgICAgICAgICAgb3AgPT09ICcmPScgfHxcbiAgICAgICAgICAgIG9wID09PSAnXj0nIHx8XG4gICAgICAgICAgICBvcCA9PT0gJ3w9JztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjb25zdW1lU2VtaWNvbG9uKCkge1xuICAgICAgICAvLyBDYXRjaCB0aGUgdmVyeSBjb21tb24gY2FzZSBmaXJzdDogaW1tZWRpYXRlbHkgYSBzZW1pY29sb24gKFUrMDAzQikuXG4gICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChzdGFydEluZGV4KSA9PT0gMHgzQiB8fCBtYXRjaCgnOycpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChoYXNMaW5lVGVybWluYXRvcikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gR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G4gICAgICAgICAgICAgICAgICAgIHBhcmFtcy5wdXNoKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3QgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcihraW5kKTtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChyZXN0Tm9kZS5maW5pc2hSZXN0RWxlbWVudChyZXN0KSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRzLnB1c2gocGFyc2VQYXR0ZXJuV2l0aERlZmF1bHQocGFyYW1zLCBraW5kKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbWF0Y2goJ10nKSkge1xuICAgICAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdCgnXScpO1xuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEFycmF5UGF0dGVybihlbGVtZW50cyk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VQcm9wZXJ0eVBhdHRlcm4ocGFyYW1zLCBraW5kKSB7XG4gICAgICAgIHZhciBub2RlID0gbmV3IE5vZGUoKSwga2V5LCBrZXlUb2tlbiwgY29tcHV0ZWQgPSBtYXRjaCgnWycpLCBpbml0O1xuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIGtleVRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAga2V5ID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnPScpKSB7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnB1c2goa2V5VG9rZW4pO1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIGluaXQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eShcbiAgICAgICAgICAgICAgICAgICAgJ2luaXQnLCBrZXksIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBuZXcgV3JhcHBpbmdOb2RlKGtleVRva2VuKS5maW5pc2hBc3NpZ25tZW50UGF0dGVybihrZXksIGluaXQpLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghbWF0Y2goJzonKSkge1xuICAgICAgICAgICAgICAgIHBhcmFtcy5wdXNoKGtleVRva2VuKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnaW5pdCcsIGtleSwgZmFsc2UsIGtleSwgZmFsc2UsIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtleSgpO1xuICAgICAgICB9XG4gICAgICAgIGV4cGVjdCgnOicpO1xuICAgICAgICBpbml0ID0gcGFyc2VQYXR0ZXJuV2l0aERlZmF1bHQocGFyYW1zLCBraW5kKTtcbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcGVydHkoJ2luaXQnLCBrZXksIGNvbXB1dGVkLCBpbml0LCBmYWxzZSwgZmFsc2UpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlT2JqZWN0UGF0dGVybihwYXJhbXMsIGtpbmQpIHtcbiAgICAgICAgdmFyIG5vZGUgPSBuZXcgTm9kZSgpLCBwcm9wZXJ0aWVzID0gW107XG5cbiAgICAgICAgZXhwZWN0KCd7Jyk7XG5cbiAgICAgICAgd2hpbGUgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICBwcm9wZXJ0aWVzLnB1c2gocGFyc2VQcm9wZXJ0eVBhdHRlcm4ocGFyYW1zLCBraW5kKSk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGxleCgpO1xuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaE9iamVjdFBhdHRlcm4ocHJvcGVydGllcyk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VQYXR0ZXJuKHBhcmFtcywga2luZCkge1xuICAgICAgICBpZiAobWF0Y2goJ1snKSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlQXJyYXlQYXR0ZXJuKHBhcmFtcywga2luZCk7XG4gICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJ3snKSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlT2JqZWN0UGF0dGVybihwYXJhbXMsIGtpbmQpO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoS2V5d29yZCgnbGV0JykpIHtcbiAgICAgICAgICAgIGlmIChraW5kID09PSAnY29uc3QnIHx8IGtpbmQgPT09ICdsZXQnKSB7XG4gICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkLCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcGFyYW1zLnB1c2gobG9va2FoZWFkKTtcbiAgICAgICAgcmV0dXJuIHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKGtpbmQpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlUGF0dGVybldpdGhEZWZhdWx0KHBhcmFtcywga2luZCkge1xuICAgICAgICB2YXIgc3RhcnRUb2tlbiA9IGxvb2thaGVhZCwgcGF0dGVybiwgcHJldmlvdXNBbGxvd1lpZWxkLCByaWdodDtcbiAgICAgICAgcGF0dGVybiA9IHBhcnNlUGF0dGVybihwYXJhbXMsIGtpbmQpO1xuICAgICAgICBpZiAobWF0Y2goJz0nKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBwcmV2aW91c0FsbG93WWllbGQgPSBzdGF0ZS5hbGxvd1lpZWxkO1xuICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHRydWU7XG4gICAgICAgICAgICByaWdodCA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuICAgICAgICAgICAgcGF0dGVybiA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoQXNzaWdubWVudFBhdHRlcm4ocGF0dGVybiwgcmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwYXR0ZXJuO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEyLjIuNSBBcnJheSBJbml0aWFsaXplclxuXG4gICAgZnVuY3Rpb24gcGFyc2VBcnJheUluaXRpYWxpemVyKCkge1xuICAgICAgICB2YXIgZWxlbWVudHMgPSBbXSwgbm9kZSA9IG5ldyBOb2RlKCksIHJlc3RTcHJlYWQ7XG5cbiAgICAgICAgZXhwZWN0KCdbJyk7XG5cbiAgICAgICAgd2hpbGUgKCFtYXRjaCgnXScpKSB7XG4gICAgICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIGVsZW1lbnRzLnB1c2gobnVsbCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcuLi4nKSkge1xuICAgICAgICAgICAgICAgIHJlc3RTcHJlYWQgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIHJlc3RTcHJlYWQuZmluaXNoU3ByZWFkRWxlbWVudChpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcblxuICAgICAgICAgICAgICAgIGlmICghbWF0Y2goJ10nKSkge1xuICAgICAgICAgICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKHJlc3RTcHJlYWQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnXScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGxleCgpO1xuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEFycmF5RXhwcmVzc2lvbihlbGVtZW50cyk7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTIuMi42IE9iamVjdCBJbml0aWFsaXplclxuXG4gICAgZnVuY3Rpb24gcGFyc2VQcm9wZXJ0eUZ1bmN0aW9uKG5vZGUsIHBhcmFtSW5mbywgaXNHZW5lcmF0b3IpIHtcbiAgICAgICAgdmFyIHByZXZpb3VzU3RyaWN0LCBib2R5O1xuXG4gICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcblxuICAgICAgICBwcmV2aW91c1N0cmljdCA9IHN0cmljdDtcbiAgICAgICAgYm9keSA9IGlzb2xhdGVDb3ZlckdyYW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4gICAgICAgICAgICAgICAgZXhwZWN0KCcoJyk7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcpJyk7XG5cbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZVByb3BlcnR5RnVuY3Rpb24obWV0aG9kTm9kZSwge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0czogW10sXG4gICAgICAgICAgICAgICAgICAgIHN0cmljdGVkOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQ6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG51bGxcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHByZXZpb3VzQWxsb3dZaWVsZDtcblxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdnZXQnLCBrZXksIGNvbXB1dGVkLCB2YWx1ZSwgZmFsc2UsIGZhbHNlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodG9rZW4udmFsdWUgPT09ICdzZXQnICYmIGxvb2thaGVhZFByb3BlcnR5TmFtZSgpKSB7XG4gICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBtYXRjaCgnWycpO1xuICAgICAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgICAgICAgICBtZXRob2ROb2RlID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICAgICAgICAgIG9wdGlvbnMgPSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtczogW10sXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRDb3VudDogMCxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQ6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtU2V0OiB7fVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlUGFyYW0ob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBwcmV2aW91c0FsbG93WWllbGQ7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmRlZmF1bHRDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5kZWZhdWx0cyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFyc2VQcm9wZXJ0eUZ1bmN0aW9uKG1ldGhvZE5vZGUsIG9wdGlvbnMsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcGVydHkoJ3NldCcsIGtleSwgY29tcHV0ZWQsIHZhbHVlLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKH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nVsbDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZU9iamVjdFByb3BlcnR5KGhhc1Byb3RvKSB7XG4gICAgICAgIHZhciB0b2tlbiA9IGxvb2thaGVhZCwgbm9kZSA9IG5ldyBOb2RlKCksIGNvbXB1dGVkLCBrZXksIG1heWJlTWV0aG9kLCBwcm90bywgdmFsdWU7XG5cbiAgICAgICAgY29tcHV0ZWQgPSBtYXRjaCgnWycpO1xuICAgICAgICBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3BlcnR5S2V5KCk7XG4gICAgICAgIH1cbiAgICAgICAgbWF5YmVNZXRob2QgPSB0cnlQYXJzZU1ldGhvZERlZmluaXRpb24odG9rZW4sIGtleSwgY29tcHV0ZWQsIG5vZGUpO1xuICAgICAgICBpZiAobWF5YmVNZXRob2QpIHtcbiAgICAgICAgICAgIHJldHVybiBtYXliZU1ldGhvZDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICgha2V5KSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2hlY2sgZm9yIGR1cGxpY2F0ZWQgX19wcm90b19fXG4gICAgICAgIGlmICghY29tcHV0ZWQpIHtcbiAgICAgICAgICAgIHByb3RvID0gKGtleS50eXBlID09PSBTeW50YXguSWRlbnRpZmllciAmJiBrZXkubmFtZSA9PT0gJ19fcHJvdG9fXycpIHx8XG4gICAgICAgICAgICAgICAgKGtleS50eXBlID09PSBTeW50YXguTGl0ZXJhbCAmJiBrZXkudmFsdWUgPT09ICdfX3Byb3RvX18nKTtcbiAgICAgICAgICAgIGlmIChoYXNQcm90by52YWx1ZSAmJiBwcm90bykge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuRHVwbGljYXRlUHJvdG9Qcm9wZXJ0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBoYXNQcm90by52YWx1ZSB8PSBwcm90bztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtYXRjaCgnOicpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIHZhbHVlID0gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdpbml0Jywga2V5LCBjb21wdXRlZCwgdmFsdWUsIGZhbHNlLCBmYWxzZSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCc9JykpIHtcbiAgICAgICAgICAgICAgICBmaXJzdENvdmVySW5pdGlhbGl6ZWROYW1lRXJyb3IgPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdpbml0Jywga2V5LCBjb21wdXRlZCxcbiAgICAgICAgICAgICAgICAgICAgbmV3IFdyYXBwaW5nTm9kZSh0b2tlbikuZmluaXNoQXNzaWdubWVudFBhdHRlcm4oa2V5LCB2YWx1ZSksIGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KCdpbml0Jywga2V5LCBjb21wdXRlZCwga2V5LCBmYWxzZSwgdHJ1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1x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uICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4LkFycmF5RXhwcmVzc2lvbjpcbiAgICAgICAgICAgIGV4cHIudHlwZSA9IFN5bnRheC5BcnJheVBhdHRlcm47XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZXhwci5lbGVtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChleHByLmVsZW1lbnRzW2ldICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByLmVsZW1lbnRzW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguT2JqZWN0RXhwcmVzc2lvbjpcbiAgICAgICAgICAgIGV4cHIudHlwZSA9IFN5bnRheC5PYmplY3RQYXR0ZXJuO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGV4cHIucHJvcGVydGllcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihleHByLnByb3BlcnRpZXNbaV0udmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4LkFzc2lnbm1lbnRFeHByZXNzaW9uOlxuICAgICAgICAgICAgZXhwci50eXBlID0gU3ludGF4LkFzc2lnbm1lbnRQYXR0ZXJuO1xuICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIubGVmdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIC8vIEFsbG93IG90aGVyIG5vZGUgdHlwZSBmb3IgdG9sZXJhbnQgcGFyc2luZy5cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAg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AgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaFRlbXBsYXRlTGl0ZXJhbChxdWFzaXMsIGV4cHJlc3Npb25zKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4yLjEwIFRoZSBHcm91cGluZyBPcGVyYXRvclxuXG4gICAgZnVuY3Rpb24gcGFyc2VHcm91cEV4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciBleHByLCBleHByZXNzaW9ucywgc3RhcnRUb2tlbiwgaSwgcGFyYW1zID0gW107XG5cbiAgICAgICAgZXhwZWN0KCcoJyk7XG5cbiAgICAgICAgaWYgKG1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnPT4nKSkge1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnPT4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgdHlwZTogUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXIsXG4gICAgICAgICAgICAgICAgcGFyYW1zOiBbXSxcbiAgICAgICAgICAgICAgICByYXdQYXJhbXM6IFtdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgaWYgKG1hdGNoKCcuLi4nKSkge1xuICAgICAgICAgICAgZXhwciA9IHBhcnNlUmVzdEVsZW1lbnQocGFyYW1zKTtcbiAgICAgICAgICAgIGV4cGVjdCgnKScpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnPT4nKSkge1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnPT4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgdHlwZTogUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXIsXG4gICAgICAgICAgICAgICAgcGFyYW1zOiBbZXhwcl1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gdHJ1ZTtcbiAgICAgICAgZXhwciA9IGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG5cbiAgICAgICAgaWYgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGZhbHNlO1xuICAgICAgICAgICAgZXhwcmVzc2lvbnMgPSBbZXhwcl07XG5cbiAgICAgICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXgoKTtcblxuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnLi4uJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0JpbmRpbmdFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb25zLnB1c2gocGFyc2VSZXN0RWxlbWVudChwYXJhbXMpKTtcbiAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCcpJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbWF0Y2goJz0+JykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnPT4nKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBleHByZXNzaW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHJlc3Npb25zW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IGV4cHJlc3Npb25zXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZXhwcmVzc2lvbnMucHVzaChpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoU2VxdWVuY2VFeHByZXNzaW9uKGV4cHJlc3Npb25zKTtcbiAgICAgICAgfVxuXG5cbiAgICAgICAgZXhwZWN0KCcpJyk7XG5cbiAgICAgICAgaWYgKG1hdGNoKCc9PicpKSB7XG4gICAgICAgICAgICBpZiAoZXhwci50eXBlID09PSBTeW50YXguSWRlbnRpZmllciAmJiBleHByLm5hbWUgPT09ICd5aWVsZCcpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBQbGFjZUhvbGRlcnMuQXJyb3dQYXJhbWV0ZXJQbGFjZUhvbGRlcixcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiBbZXhwcl1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWlzQmluZGluZ0VsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXhwci50eXBlID09PSBTeW50YXguU2VxdWVuY2VFeHByZXNzaW9uKSB7XG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGV4cHIuZXhwcmVzc2lvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIuZXhwcmVzc2lvbnNbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleHByID0ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyLFxuICAgICAgICAgICAgICAgIHBhcmFtczogZXhwci50eXBlID09PSBTeW50YXguU2VxdWVuY2VFeHByZXNzaW9uID8gZXhwci5leHByZXNzaW9ucyA6IFtleHByXVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuXG4gICAgLy8gRUNNQS0yNjIgMTIuMiBQcmltYXJ5IEV4cHJlc3Npb25zXG5cbiAgICBmdW5jdGlvbiBwYXJzZVByaW1hcnlFeHByZXNzaW9uKCkge1xuICAgICAgICB2YXIgdHlwZSwgdG9rZW4sIGV4cHIsIG5vZGU7XG5cbiAgICAgICAgaWYgKG1hdGNoKCcoJykpIHtcbiAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybiBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlR3JvdXBFeHByZXNzaW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtYXRjaCgnWycpKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFycmF5SW5pdGlhbGl6ZXIpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hdGNoKCd7JykpIHtcbiAgICAgICAgICAgIHJldHVybiBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlT2JqZWN0SW5pdGlhbGl6ZXIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdHlwZSA9IGxvb2thaGVhZC50eXBlO1xuICAgICAgICBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikge1xuICAgICAgICAgICAgaWYgKHN0YXRlLnNvdXJjZVR5cGUgPT09ICdtb2R1bGUnICYmIGxvb2thaGVhZC52YWx1ZSA9PT0gJ2F3YWl0Jykge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHByID0gbm9kZS5maW5pc2hJZGVudGlmaWVyKGxleCgpLnZhbHVlKTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5TdHJpbmdMaXRlcmFsIHx8IHR5cGUgPT09IFRva2VuLk51bWVyaWNMaXRlcmFsKSB7XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc3RyaWN0ICYmIGxvb2thaGVhZC5vY3RhbCkge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCwgTWVzc2FnZXMuU3RyaWN0T2N0YWxMaXRlcmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV4cHIgPSBub2RlLmZpbmlzaExpdGVyYWwobGV4KCkpO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgIGlmICghc3RyaWN0ICYmIHN0YXRlLmFsbG93WWllbGQgJiYgbWF0Y2hLZXl3b3JkKCd5aWVsZCcpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlTm9uQ29tcHV0ZWRQcm9wZXJ0eSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFzdHJpY3QgJiYgbWF0Y2hLZXl3b3JkKCdsZXQnKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaElkZW50aWZpZXIobGV4KCkudmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29yZCgnZnVuY3Rpb24nKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUZ1bmN0aW9uRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29yZCgndGhpcycpKSB7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoVGhpc0V4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2NsYXNzJykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VDbGFzc0V4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxleCgpKTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5Cb29sZWFuTGl0ZXJhbCkge1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTtcbiAgICAgICAgICAgIHRva2VuLnZhbHVlID0gKHRva2VuLnZhbHVlID09PSAndHJ1ZScpO1xuICAgICAgICAgICAgZXhwciA9IG5vZGUuZmluaXNoTGl0ZXJhbCh0b2tlbik7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gVG9rZW4uTnVsbExpdGVyYWwpIHtcbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICB0b2tlbi52YWx1ZSA9IG51bGw7XG4gICAgICAgICAgICBleHByID0gbm9kZS5maW5pc2hMaXRlcmFsKHRva2VuKTtcbiAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnLycpIHx8IG1hdGNoKCcvPScpKSB7XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICBpbmRleCA9IHN0YXJ0SW5kZXg7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEudG9rZW5zICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIHRva2VuID0gY29sbGVjdFJlZ2V4KCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRva2VuID0gc2NhblJlZ0V4cCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBleHByID0gbm9kZS5maW5pc2hMaXRlcmFsKHRva2VuKTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5UZW1wbGF0ZSkge1xuICAgICAgICAgICAgZXhwciA9IHBhcnNlVGVtcGxhdGVMaXRlcmFsKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsZXgoKSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4zIExlZnQtSGFuZC1TaWRlIEV4cHJlc3Npb25zXG5cbiAgICBmdW5jdGlvbiBwYXJzZUFyZ3VtZW50cygpIHtcbiAgICAgICAgdmFyIGFyZ3MgPSBbXSwgZXhwcjtcblxuICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICBpZiAoIW1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcuLi4nKSkge1xuICAgICAgICAgICAgICAgICAgICBleHByID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIGV4cHIuZmluaXNoU3ByZWFkRWxlbWVudChpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBleHByID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYXJncy5wdXNoKGV4cHIpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnKScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBleHBlY3RDb21tYVNlcGFyYXRvcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXhwZWN0KCcpJyk7XG5cbiAgICAgICAgcmV0dXJuIGF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ZS5pbkZ1bmN0aW9uQm9keSkge1xuICAgICAgICAgICAgZXhwciA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGV4cHIgPSBleHByLmZpbmlzaFN1cGVyKCk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCcoJykgJiYgIW1hdGNoKCcuJykgJiYgIW1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZXhwciA9IGluaGVyaXRDb3ZlckdyYW1tYXIobWF0Y2hLZXl3b3JkKCduZXcnKSA/IHBhcnNlTmV3RXhwcmVzc2lvbiA6IHBhcnNlUHJpbWFyeUV4cHJlc3Npb24pO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICg7Oykge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCcuJykpIHtcbiAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eSA9IHBhcnNlTm9uQ29tcHV0ZWRNZW1iZXIoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hNZW1iZXJFeHByZXNzaW9uKCcuJywgZXhwciwgcHJvcGVydHkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnKCcpKSB7XG4gICAgICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGFyZ3MgPSBwYXJzZUFyZ3VtZW50cygpO1xuICAgICAgICAgICAgICA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GV4cHIsIHByb3BlcnR5LCBzdGFydFRva2VuO1xuICAgICAgICBhc3NlcnQoc3RhdGUuYWxsb3dJbiwgJ2NhbGxlZSBvZiBuZXcgZXhwcmVzc2lvbiBhbHdheXMgYWxsb3cgaW4ga2V5d29yZC4nKTtcblxuICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkO1xuXG4gICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ3N1cGVyJykgJiYgc3RhdGUuaW5GdW5jdGlvbkJvZHkpIHtcbiAgICAgICAgICAgIGV4cHIgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBleHByID0gZXhwci5maW5pc2hTdXBlcigpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnWycpICYmICFtYXRjaCgnLicpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGV4cHIgPSBpbmhlcml0Q292ZXJHcmFtbWFyKG1hdGNoS2V5d29yZCgnbmV3JykgPyBwYXJzZU5ld0V4cHJlc3Npb24gOiBwYXJzZVByaW1hcnlFeHByZXNzaW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnWycpKSB7XG4gICAgICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcHJvcGVydHkgPSBwYXJzZUNvbXB1dGVkTWVtYmVyKCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoTWVtYmVyRXhwcmVzc2lvbignWycsIGV4cHIsIHByb3BlcnR5KTtcbiAgICAgICAgIC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bG9va2FoZWFkLnR5cGUgPT09IFRva2VuLlB1bmN0dWF0b3IpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnKysnKSB8fCBtYXRjaCgnLS0nKSkge1xuICAgICAgICAgICAgICAgIC8vIEVDTUEtMjYyIDExLjMuMSwgMTEuMy4yXG4gICAgICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyICYmIGlzUmVzdHJpY3RlZFdvcmQoZXhwci5uYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLlN0cmljdExIU1Bvc3RmaXgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghaXNBc3NpZ25tZW50VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSW52YWxpZExIU0luQXNzaWdubWVudCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hQb3N0Zml4RXhwcmVzc2lvbih0b2tlbi52YWx1ZSwgZXhwcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi41IFVuYXJ5IE9wZXJhdG9yc1xuXG4gICAgZnVuY3Rpb24gcGFyc2VVbmFyeUV4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciB0b2tlbiwgZXhwciwgc3RhcnRUb2tlbjtcblxuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuL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gICAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICBleHByID0gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZVVuYXJ5RXhwcmVzc2lvbik7XG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hVbmFyeUV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIpO1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoS2V5d29yZCgnZGVsZXRlJykgfHwgbWF0Y2hLZXl3b3JkKCd2b2lkJykgfHwgbWF0Y2hLZXl3b3JkKCd0eXBlb2YnKSkge1xuICAgICAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgIHRva2VuID0gbGV4KCk7XG4gICAgICAgICAgICBleHByID0gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZVVuYXJ5RXhwcmVzc2lvbik7XG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hVbmFyeUV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIpO1xuICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBleHByLm9wZXJhdG9yID09PSAnZGVsZXRlJyAmJiBleHByLmFyZ3VtZW50LnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5TdHJpY3REZWxldGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZXhwciA9IHBhcnNlUG9zdGZpeEV4cHJlc3Npb24oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGJpbmFyeVByZWNlZGVuY2UodG9rZW4sIGFsbG93SW4pIHtcbiAgICAgICAgdmFyIHByZWMgPSAwO1xuXG4gICAgICAgIGlmICh0b2tlbi50eXBlICE9PSBUb2tlbi5QdW5jdHVhdG9yICYmIHRva2VuLnR5cGUgIT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9XG5cbiAgICAgICAgc3dpdGNoICh0b2tlbi52YWx1ZSkge1xuICAgICAgICBjYXNlICd8fCc6XG4gICAgICAgICAgICBwcmVjID0gMTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJyYmJzpcbiAgICAgICAgICAgIHByZWMgPSAyO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnfCc6XG4gICAgICAgICAgICBwcmVjID0gMztcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ14nOlxuICAgICAgICAgICAgcHJlYyA9IDQ7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICcmJzpcbiAgICAgICAgICAgIHByZWMgPSA1O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnPT0nOlxuICAgICAgICBjYXNlICchPSc6XG4gICAgICAgIGNhc2UgJz09PSc6XG4gICAgICAgIGNhc2UgJyE9PSc6XG4gICAgICAgICAgICBwcmVjID0gNjtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJzwnOlxuICAgICAgICBjYXNlICc+JzpcbiAgICAgICAgY2FzZSAnPD0nOlxuICAgICAgICBjYXNlICc+PSc6XG4gICAgICAgIGNhc2UgJ2luc3RhbmNlb2YnOlxuICAgICAgICAgICAgcHJl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LmVsZW1lbnRzW2ldICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtLmVsZW1lbnRzW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguWWllbGRFeHByZXNzaW9uOlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBhc3NlcnQocGFyYW0udHlwZSA9PT0gU3ludGF4Lk9iamVjdFBhdHRlcm4sICdJbnZhbGlkIHR5cGUnKTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBwYXJhbS5wcm9wZXJ0aWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY2hlY2tQYXR0ZXJuUGFyYW0ob3B0aW9ucywgcGFyYW0ucHJvcGVydGllc1tpXS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiByZWludGVycHJldEFzQ292ZXJGb3JtYWxzTGlzdChleHByKSB7XG4gICAgICAgIHZhciBpLCBsZW4sIHBhcmFtLCBwYXJhbXMsIGRlZmF1bHRzLCBkZWZhdWx0Q291bnQsIG9wdGlvbnMsIHRva2VuO1xuXG4gICAgICAgIGRlZmF1bHRzID0gW107XG4gICAgICAgIGRlZmF1bHRDb3VudCA9IDA7XG4gICAgICAgIHBhcmFtcyA9IFtleHByXTtcblxuICAgICAgICBzd2l0Y2ggKGV4cHIudHlwZSkge1xuICAgICAgICBjYXNlIFN5bnRheC5JZGVudGlmaWVyOlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXI6XG4gICAgICAgICAgICBwYXJhbXMgPSBleHByLnBhcmFtcztcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zID0ge1xuICAgICAgICAgICAgcGFyYW1TZXQ6IHt9XG4gICAgICAgIH07XG5cbiAgICAgICAgZm9yIChpID0gMCwgbGVuID0gcGFyYW1zLmxlbmd0aDsgaSA8IGxlbjsgaSArPSAxKSB7XG4gICAgICAgICAgICBwYXJhbSA9IHBhcmFtc1tpXTtcbiAgICAgICAgICAgIHN3aXRjaCAocGFyYW0udHlwZSkge1xuICAgICAgICAgICAgY2FzZSBTeW50YXguQXNzaWdubWVudFBhdHRlcm46XG4gICAgICAgICAgICAgICAgcGFyYW1zW2ldID0gcGFyYW0ubGVmdDtcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0ucmlnaHQudHlwZSA9PT0gU3ludGF4LllpZWxkRXhwcmVzc2lvbikge1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW0ucmlnaHQuYXJndW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyYW0ucmlnaHQudHlwZSA9IFN5bnRheC5JZGVudGlmaWVyO1xuICAgICAgICAgICAgICAgICAgICBwYXJhbS5yaWdodC5uYW1lID0gJ3lpZWxkJztcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHBhcmFtLnJpZ2h0LmFyZ3VtZW50O1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyYW0ucmlnaHQuZGVsZWdhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRlZmF1bHRzLnB1c2gocGFyYW0ucmlnaHQpO1xuICAgICAgICAgICAgICAgICsrZGVmYXVsdENvdW50O1xuICAgICAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtLmxlZnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBjaGVja1BhdHRlcm5QYXJhbShvcHRpb25zLCBwYXJhbSk7XG4gICAgICAgICAgICAgICAgcGFyYW1zW2ldID0gcGFyYW07XG4gICAgICAgICAgICAgICAgZGVmYXVsdHMucHVzaChudWxsKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzdHJpY3QgfHwgIXN0YXRlLmFsbG93WWllbGQpIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDAsIGxlbiA9IHBhcmFtcy5sZW5ndGg7IGkgPCBsZW47IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgIHBhcmFtID0gcGFyYW1zW2ldO1xuICAgICAgICAgICAgICAgIGlmIChwYXJhbS50eXBlID09PSBTeW50YXguWWllbGRFeHByZXNzaW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG9wdGlvbnMubWVzc2FnZSA9PT0gTWVzc2FnZXMuU3RyaWN0UGFyYW1EdXBlKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHN0cmljdCA/IG9wdGlvbnMuc3RyaWN0ZWQgOiBvcHRpb25zLmZpcnN0UmVzdHJpY3RlZDtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKHRva2VuLCBvcHRpb25zLm1lc3NhZ2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRlZmF1bHRDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgZGVmYXVsdHMgPSBbXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJ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AgICBsaXN0ID0gcmVpbnRlcnByZXRBc0NvdmVyRm9ybWFsc0xpc3QoZXhwcik7XG5cbiAgICAgICAgICAgIGlmIChsaXN0KSB7XG4gICAgICAgICAgICAgICAgZmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yID0gbnVsbDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbihsaXN0LCBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGV4cHI7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWF0Y2hBc3NpZ24oKSkge1xuICAgICAgICAgICAgaWYgKCFpc0Fzc2lnbm1lbnRUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLkludmFsaWRMSFNJbkFzc2lnbm1lbnQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBFQ01BLTI2MiAxMi4xLjFcbiAgICAgICAgICAgIGlmIChzdHJpY3QgJiYgZXhwci50eXBlID09PSBTeW50YXguSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKGV4cHIubmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLlN0cmljdExIU0Fzc2lnbm1lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNTdHJpY3RNb2RlUmVzZXJ2ZWRXb3JkKGV4cHIubmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLlN0cmljdFJlc2VydmVkV29yZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgIC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biAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25zLnB1c2goaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV4cHIgPSBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pLmZpbmlzaFNlcXVlbmNlRXhwcmVzc2lvbihleHByZXNzaW9ucyk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy4yIEJsb2NrXG5cbiAgICBmdW5jdGlvbiBwYXJzZVN0YXRlbWVudExpc3RJdGVtKCkge1xuICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkLnZhbHVlKSB7XG4gICAgICAgICAgICBjYXNlICdleHBvcnQnOlxuICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5zb3VyY2VUeXBlICE9PSAnbW9kdWxlJykge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQsIE1lc3NhZ2VzLklsbGVnYWxFeHBvcnREZWNsYXJhdGlvbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUV4cG9ydERlY2xhcmF0aW9uKCk7XG4gICAgICAgICAgICBjYXNlICdpbXBvcnQnOlxuICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5zb3VyY2VUeXBlICE9PSAnbW9kdWxlJykge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQsIE1lc3NhZ2VzLklsbGVnYWxJbXBvcnREZWNsYXJhdGlvbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUltcG9ydERlY2xhcmF0aW9uKCk7XG4gICAgICAgICAgICBjYXNlICdjb25zdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlTGV4aWNhbERlY2xhcmF0aW9uKHtpbkZvcjogZmFsc2V9KTtcbiAgICAgICAgICAgIGNhc2UgJ2Z1bmN0aW9uJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGdW5jdGlvbkRlY2xhcmF0aW9uKG5ldyBOb2RlKCkpO1xuICAgICAgICAgICAgY2FzZSAnY2xhc3MnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUNsYXNzRGVjbGFyYXRpb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2xldCcpICYmIGlzTGV4aWNhbERlY2xhcmF0aW9uKCkpIHtcbiAgICAgICAgICAgIHJldHVybiBwYXJzZUxleGljYWxEZWNsYXJhdGlvbih7aW5Gb3I6IGZhbHNlfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcGFyc2VTdGF0ZW1lbnQoKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZVN0YXRlbWVudExpc3QoKSB7XG4gICAgICAgIHZhciBsaXN0ID0gW107XG4gICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAobWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGlzdC5wdXNoKHBhcnNlU3RhdGVtZW50TGlzdEl0ZW0oKSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGlzdDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUJsb2NrKCkge1x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JpY3RSZXNlcnZlZFdvcmQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RyaWN0IHx8IHRva2VuLnZhbHVlICE9PSAnbGV0JyB8fCBraW5kICE9PSAndmFyJykge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHN0YXRlLnNvdXJjZVR5cGUgPT09ICdtb2R1bGUnICYmIHRva2VuLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIgJiYgdG9rZW4udmFsdWUgPT09ICdhd2FpdCcpIHtcbiAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKHRva2VuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaElkZW50aWZpZXIodG9rZW4udmFsdWUpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlVmFyaWFibGVEZWNsYXJhdGlvbihvcHRpb25zKSB7XG4gICAgICAgIHZhciBpbml0ID0gbnVsbCwgaWQsIG5vZGUgPSBuZXcgTm9kZSgpLCBwYXJhbXMgPSBbXTtcblxuICAgICAgICBpZCA9IHBhcnNlUGF0dGVybihwYXJhbXMsICd2YXInKTtcblxuICAgICAgICAvLyBFQ01BLTI2MiAxMi4yLjFcbiAgICAgICAgaWYgKHN0cmljdCAmJiBpc1Jlc3RyaWN0ZWRXb3JkKGlkLm5hbWUpKSB7XG4gICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLlN0cmljdFZhck5hbWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hdGNoKCc9JykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgaW5pdCA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2l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c2VCaW5kaW5nTGlzdChraW5kLCBvcHRpb25zKSB7XG4gICAgICAgIHZhciBsaXN0ID0gW3BhcnNlTGV4aWNhbEJpbmRpbmcoa2luZCwgb3B0aW9ucyldO1xuXG4gICAgICAgIHdoaWxlIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGxpc3QucHVzaChwYXJzZUxleGljYWxCaW5kaW5nKGtpbmQsIG9wdGlvbnMpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBsaXN0O1xuICAgIH1cblxuXG4gICAgZnVuY3Rpb24gdG9rZW5pemVyU3RhdGUoKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBpbmRleDogaW5kZXgsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBoYXNMaW5lVGVybWluYXRvcjogaGFzTGluZVRlcm1pbmF0b3IsXG4gICAgICAgICAgICBsYXN0SW5kZXg6IGxhc3RJbmRleCxcbiAgICAgICAgICAgIGxhc3RMaW5lTnVtYmVyOiBsYXN0TGluZU51bWJlcixcbiAgICAgICAgICAgIGxhc3RMaW5lU3RhcnQ6IGxhc3RMaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydEluZGV4OiBzdGFydEluZGV4LFxuICAgICAgICAgICAgc3RhcnRMaW5lTnVtYmVyOiBzdGFydExpbmVOdW1iZXIsXG4gICAgICAgICAgICBzdGFydExpbmVTdGFydDogc3RhcnRMaW5lU3RhcnQsXG4gICAgICAgICAgICBsb29rYWhlYWQ6IGxvb2thaGVhZCxcbiAgICAgICAgICAgIHRva2VuQ291bnQ6IGV4dHJhLnRva2VucyA/IGV4dHJhLnRva2Vucy5sZW5ndGggOiAwXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcmVzZXRUb2tlbml6ZXJTdGF0ZSh0cykge1xuICAgICAgICBpbmRleCA9IHRzLmluZGV4O1xuICAgICAgICBsaW5lTnVtYmVyID0gdHMubGluZU51bWJlcjtcbiAgICAgICAgbGluZVN0YXJ0ID0gdHMubGluZVN0YXJ0O1xuICAgICAgICBoYXNMaW5lVGVybWluYXRvciA9IHRzLmhhc0xpbmVUZXJtaW5hdG9yO1xuICAgICAgICBsYXN0SW5kZXggPSB0cy5sYXN0SW5kZXg7XG4gICAgICAgIGxhc3RMaW5lTnVtYmVyID0gdHMubGFzdExpbmVOdW1iZXI7XG4gICAgICAgIGxhc3RMaW5lU3RhcnQgPSB0cy5sYXN0TGluZVN0YXJ0O1xuICAgICAgICBzdGFydEluZGV4ID0gdHMuc3RhcnRJbmRleDtcbiAgICAgICAgc3RhcnRMaW5lTnVtYmVyID0gdHMuc3RhcnRMaW5lTnVtYmVyO1xuICAgICAgICBzdGFydExpbmVTdGFydCA9IHRzLnN0YXJ0TGluZVN0YXJ0O1xuICAgICAgICBsb29rYWhlYWQgPSB0cy5sb29rYWhlYWQ7XG4gICAgICAgIGlmIChleHRyYS50b2tlbnMpIHtcbiAgICAgICAgICAgIGV4dHJhLnRva2Vucy5zcGxpY2UodHMudG9rZW5Db3VudCwgZXh0cmEudG9rZW5zLmxlbmd0aCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc0xleGljYWxEZWNsYXJhdGlvbigpIHtcbiAgICAgICAgdmFyIGxleGljYWwsIHRzO1xuXG4gICAgICAgIHRzID0gdG9rZW5pemVyU3RhdGUoKTtcblxuICAgICAgICBsZXgoKTtcbiAgICAgICAgbGV4aWNhbCA9IChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikgfHwgbWF0Y2goJ1snKSB8fCBtYXRjaCgneycpIHx8XG4gICAgICAgICAgICBtYXRjaEtleXdvcmQoJ2xldCcpIHx8IG1hdGNoS2V5d29yZCgneWllbGQnKTtcblxuICAgICAgICByZXNldFRva2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AgICAgICAgIGluaXQgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgIGxleCgpO1xuXG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9ucyA9IHBhcnNlVmFyaWFibGVEZWNsYXJhdGlvbkxpc3QoeyBpbkZvcjogdHJ1ZSB9KTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gcHJldmlvdXNBbGxvd0luO1xuXG4gICAgICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9ucy5sZW5ndGggPT09IDEgJiYgbWF0Y2hLZXl3b3JkKCdpbicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaFZhcmlhYmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGRlY2xhcmF0aW9ucy5sZW5ndGggPT09IDEgJiYgZGVjbGFyYXRpb25zWzBdLmluaXQgPT09IG51bGwgJiYgbWF0Y2hDb250ZXh0dWFsS2V5d29yZCgnb2YnKSkge1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hWYXJpYWJsZURlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICBmb3JJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaFZhcmlhYmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCc7Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaEtleXdvcmQoJ2NvbnN0JykgfHwgbWF0Y2hLZXl3b3JkKCdsZXQnKSkge1xuICAgICAgICAgICAgICAgIGluaXQgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgIGtpbmQgPSBsZXgoKS52YWx1ZTtcblxuICAgICAgICAgICAgICAgIGlmICghc3RyaWN0ICYmIGxvb2thaGVhZC52YWx1ZSA9PT0gJ2luJykge1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hJZGVudGlmaWVyKGtpbmQpO1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb25zID0gcGFyc2VCaW5kaW5nTGlzdChraW5kLCB7aW5Gb3I6IHRydWV9KTtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IHByZXZpb3VzQWxsb3dJbjtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZGVjbGFyYXRpb25zLmxlbmd0aCA9PT0gMSAmJiBkZWNsYXJhdGlvbnNbMF0uaW5pdCA9PT0gbnVsbCAmJiBtYXRjaEtleXdvcmQoJ2luJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaExleGljYWxEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMsIGtpbmQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChkZWNsYXJhdGlvbnMubGVuZ3RoID09PSAxICYmIGRlY2xhcmF0aW9uc1swXS5pbml0ID09PSBudWxsICYmIG1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ29mJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaExleGljYWxEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMsIGtpbmQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoTGV4aWNhbERlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucywga2luZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGluaXRTdGFydFRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpbml0ID0gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gcHJldmlvdXNBbGxvd0luO1xuXG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29yZCgnaW4nKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzQXNzaWdubWVudFRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5JbnZhbGlkTEhTSW5Gb3JJbik7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGluaXQpO1xuICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdvZicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNBc3NpZ25tZW50VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLkludmFsaWRMSFNJbkZvckxvb3ApO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0RXhwcmVzc2lvbkFzUGF0dGVybihpbml0KTtcbiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgZm9ySW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdFNlcSA9IFtpbml0XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdFNlcS5wdXNoKGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG5ldyBXcmFwcGluZ05vZGUoaW5pdFN0YXJ0VG9rZW4pLmZpbmlzaFNlcXVlbmNlRXhwcmVzc2lvbihpbml0U2VxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBleHBlY3QoJzsnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGxlZnQgPT09ICd1bmRlZmluZWQnKSB7XG5cbiAgICAgICAgICAgIGlmICghbWF0Y2goJzsnKSkge1xuICAgICAgICAgICAgICAgIHRlc3QgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV4cGVjdCgnOycpO1xuXG4gICAgICAgICAgICBpZiAoIW1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgICAgICB1cGRhdGUgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgIG9sZEluSXRlcmF0aW9uID0gc3RhdGUuaW5JdGVyYXRpb247XG4gICAgICAgIHN0YXRlLmluSXRlcmF0aW9uID0gdHJ1ZTtcblxuICAgICAgICBib2R5ID0gaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZVN0YXRlbWVudCk7XG5cbiAgICAgICAgc3RhdGUuaW5JdGVyYXRpb24gPSBvbGRJbkl0ZXJhdGlvbjtcblxuICAgICAgICByZXR1cm4gKHR5cGVvZiBsZWZ0ID09PSAndW5kZWZpbmVkJykgP1xuICAgICAgICAgICAgICAgIG5vZGUuZmluaXNoRm9yU3RhdGVtZW50KGluaXQsIHRlc3QsIHVwZGF0ZSwgYm9keSkgOlxuICAgICAgICAgICAgICAgIGZvckluID8gbm9kZS5maW5pc2hGb3JJblN0YXRlbWVudChsZWZ0LCByaWdodCwgYm9keSkgOlxuICAgICAgICAgICAgICAgICAgICBub2RlLmZpbmlzaEZvck9mU3RhdGVtZW50KGxlZnQsIHJpZ2h0LCBib2R5KTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy44IFRoZSBjb250aW51ZSBzdGF0ZW1lbnRcblxuICAgIGZ1bmN0aW9uIHBhcnNlQ29udGludWVTdGF0ZW1lbnQobm9kZSkge1xuICAgICAgICB2YXIgbGFiZWwgPSBudWxsLCBrZXk7XG5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnY29udGludWUnKTtcblxuICAgICAgICAvLyBPcHRpbWl6ZSB0aGUgbW9zdCBjb21tb24gZm9ybTogJ2NvbnRpbnVlOycuXG4gICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChzdGFydEluZGV4KSA9PT0gMHgzQikge1xuICAgICAgICAgICAgbGV4KCk7XG5cbiAgICAgICAgICAgIGlmICghc3RhdGUuaW5JdGVyYXRpb24pIHtcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLklsbGVnYWxDb250aW51ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaENvbnRpbnVlU3RhdGVtZW50KG51bGwpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc0xpbmVUZXJtaW5hdG9yKSB7XG4gICAgICAgICAgICBpZiAoIXN0YXRlLmluSXRlcmF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5JbGxlZ2FsQ29udGludWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hDb250aW51ZVN0YXRlbWVudChudWxsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikge1xuICAgICAgICAgICAgbGFiZWwgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuXG4gICAgICAgICAgICBrZXkgPSAnJCcgKyBsYWJlbC5uYW1lO1xuICAgICAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc3RhdGUubGFiZWxTZXQsIGtleSkpIHtcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLlVua25vd25MYWJlbCwgbGFiZWwubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG5cbiAgICAgICAgaWYgKGxhYmVsID09PSBudWxsICYmICFzdGF0ZS5pbkl0ZXJhdGlvbikge1xuICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5JbGxlZ2FsQ29udGludWUpO1xuICAgICA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ICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoc291cmNlLmNoYXJDb2RlQXQobGFzdEluZGV4ICsgMSkpKSB7XG4gICAgICAgICAgICAgICAgYXJndW1lbnQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUmV0dXJuU3RhdGVtZW50KGFyZ3VtZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChoYXNMaW5lVGVybWluYXRvcikge1xuICAgICAgICAgICAgLy8gSEFDS1xuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUmV0dXJuU3RhdGVtZW50KG51bGwpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFtYXRjaCgnOycpKSB7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykgJiYgbG9va2FoZWFkLnR5cGUgIT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgICAgIGFyZ3VtZW50ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG5cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUmV0dXJuU3RhdGVtZW50KGFyZ3VtZW50KTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy4xMSBUaGUgd2l0aCBzdGF0ZW1lbnRcblxuICAgIGZ1bmN0aW9uIHBhcnNlV2l0aFN0YXRlbWVudChub2RlKSB7XG4gICAgICAgIHZhciBvYmplY3QsIGJvZHk7XG5cbiAgICAgICAgaWYgKHN0cmljdCkge1xuICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5TdHJpY3RNb2RlV2l0aCk7XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3RLZXl3b3JkKCd3aXRoJyk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S5maW5pc2hTd2l0Y2hDYXNlKHRlc3QsIGNvbnNlcXVlbnQpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlU3dpdGNoU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgdmFyIGRpc2NyaW1pbmFudCwgY2FzZXMsIGNsYXVzZSwgb2xkSW5Td2l0Y2gsIGRlZmF1bHRGb3VuZDtcblxuICAgICAgICBleHBlY3RLZXl3b3JkKCdzd2l0Y2gnKTtcblxuICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICBkaXNjcmltaW5hbnQgPSBwYXJzZUV4cHJlc3Npb24oKTtcblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICBleHBlY3QoJ3snKTtcblxuICAgICAgICBjYXNlcyA9IFtdO1xuXG4gICAgICAgIGlmIChtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFN3aXRjaFN0YXRlbWVudChkaXNjcmltaW5hbnQsIGNhc2VzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG9sZEluU3dpdGNoID0gc3RhdGUuaW5Td2l0Y2g7XG4gICAgICAgIHN0YXRlLmluU3dpdGNoID0gdHJ1ZTtcbiAgICAgICAgZGVmYXVsdEZvdW5kID0gZmFsc2U7XG5cbiAgICAgICAgd2hpbGUgKHN0YXJ0SW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjbGF1c2UgPSBwYXJzZVN3aXRjaENhc2UoKTtcbiAgICAgICAgICAgIGlmIChjbGF1c2UudGVzdCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmIChkZWZhdWx0Rm91bmQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5NdWx0aXBs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ICh0eXBlID09PSBUb2tlbi5FT0YpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uUHVuY3R1YXRvciAmJiBsb29rYWhlYWQudmFsdWUgPT09ICd7Jykge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlQmxvY2soKTtcbiAgICAgICAgfVxuICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gdHJ1ZTtcbiAgICAgICAgbm9kZSA9IG5ldyBOb2RlKCk7XG5cbiAgICAgICAgaWYgKHR5cGUgPT09IFRva2VuLlB1bmN0dWF0b3IpIHtcbiAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkLnZhbHVlKSB7XG4gICAgICAgICAgICBjYXNlICc7JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VFbXB0eVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJygnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUV4cHJlc3Npb25TdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkLnZhbHVlKSB7XG4gICAgICAgICAgICBjYXNlICdicmVhayc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlQnJlYWtTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdjb250aW51ZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlQ29udGludWVTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdkZWJ1Z2dlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRGVidWdnZXJTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdkbyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRG9XaGlsZVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2Zvcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRm9yU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUZ1bmN0aW9uRGVjbGFyYXRpb24obm9kZSk7XG4gICAgICAgICAgICBjYXNlICdpZic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlSWZTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdyZXR1cm4nOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVJldHVyblN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3N3aXRjaCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlU3dpdGNoU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAndGhyb3cnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVRocm93U3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAndHJ5JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VUcnlTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICd2YXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVZhcmlhYmxlU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnd2hpbGUnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVdoaWxlU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnd2l0aCc6XG4gICAgICAgICAgICAgICA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cnNlRnVuY3Rpb25Tb3VyY2VFbGVtZW50cygpIHtcbiAgICAgICAgdmFyIHN0YXRlbWVudCwgYm9keSA9IFtdLCB0b2tlbiwgZGlyZWN0aXZlLCBmaXJzdFJlc3RyaWN0ZWQsXG4gICAgICAgICAgICBvbGRMYWJlbFNldCwgb2xkSW5JdGVyYXRpb24sIG9sZEluU3dpdGNoLCBvbGRJbkZ1bmN0aW9uQm9keSwgb2xkUGFyZW50aGVzaXNDb3VudCxcbiAgICAgICAgICAgIG5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGV4cGVjdCgneycpO1xuXG4gICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLlN0cmluZ0xpdGVyYWwpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRva2VuID0gbG9va2FoZWFkO1xuXG4gICAgICAgICAgICBzdGF0ZW1lbnQgPSBwYXJzZVN0YXRlbWVudExpc3RJdGVtKCk7XG4gICAgICAgICAgICBib2R5LnB1c2goc3RhdGVtZW50KTtcbiAgICAgICAgICAgIGlmIChzdGF0ZW1lbnQuZXhwcmVzc2lvbi50eXBlICE9PSBTeW50YXguTGl0ZXJhbCkge1xuICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgbm90IGRpcmVjdGl2ZVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlyZWN0aXZlID0gc291cmNlLnNsaWNlKHRva2VuLnN0YXJ0ICsgMSwgdG9rZW4uZW5kIC0gMSk7XG4gICAgICAgICAgICBpZiAoZGlyZWN0aXZlID09PSAndXNlIHN0cmljdCcpIHtcbiAgICAgICAgICAgICAgICBzdHJpY3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmIChmaXJzdFJlc3RyaWN0ZWQpIHtcbi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zdFJlc3RyaWN0ZWRcbiAgICAgICAgfTtcblxuICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICBpZiAoIW1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgIG9wdGlvbnMucGFyYW1TZXQgPSB7fTtcbiAgICAgICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFwYXJzZVBhcmFtKG9wdGlvbnMpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmRlZmF1bHRDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgb3B0aW9ucy5kZWZhdWx0cyA9IFtdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBhcmFtczogb3B0aW9ucy5wYXJhbXMsXG4gICAgICAgICAgICBkZWZhdWx0czogb3B0aW9ucy5kZWZhdWx0cyxcbiAgICAgICAgICAgIHN0cmljdGVkOiBvcHRpb25zLnN0cmljdGVkLFxuICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkOiBvcHRpb25zLmZpcnN0UmVzdHJpY3RlZCxcbiAgICAgICAgICAgIG1lc3NhZ2U6IG9wdGlvbnMubWVzc2FnZVxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlRnVuY3Rpb25EZWNsYXJhdGlvbihub2RlLCBpZGVudGlmaWVySXNPcHRpb25hbCkge1xuICAgICAgICB2YXIgaWQgPSBudWxsLCBwYXJhbXMgPSBbXSwgZGVmYXVsdHMgPSBbXSwgYm9keSwgdG9rZW4sIHN0cmljdGVkLCB0bXAsIGZpcnN0UmVzdHJpY3RlZCwgbWVzc2FnZSwgcHJldmlvdXNTdHJpY3QsXG4gICAgICAgICAgICBpc0dlbmVyYXRvciwgcHJldmlvdXNBbGxvd1lpZWxkO1xuXG4gICAgICAgIHByZXZpb3VzQWxsb3dZaWVsZCA9IHN0YXRlLmFsbG93WWllbGQ7XG5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnZnVuY3Rpb24nKTtcblxuICAgICAgICBpc0dlbmVyYXRvciA9IG1hdGNoKCcqJyk7XG4gICAgICAgIGlmIChpc0dlbmVyYXRvcikge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWlkZW50aWZpZXJJc09wdGlvbmFsIHx8ICFtYXRjaCgnKCcpKSB7XG4gICAgICAgICAgICB0b2tlbiA9IGxvb2thaGVhZDtcbiAgICAgICAgICAgIGlkID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTtcbiAgICAgICAgICAgIGlmIChzdHJpY3QpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZCh0b2tlbi52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLlN0cmljdEZ1bmN0aW9uTmFtZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZCh0b2tlbi52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkID0gdG9rZW47XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBNZXNzYWdlcy5TdHJpY3RGdW5jdGlvbk5hbWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQodG9rZW4udmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZCA9I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AgICAgICAgICAgICAgIGlzU3RhdGljID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBtYXRjaCgnWycpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnKicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtleS5uYW1lID09PSAnc3RhdGljJyAmJiAobG9va2FoZWFkUHJvcGVydHlOYW1lKCkgfHwgbWF0Y2goJyonKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgICAgICAgICAgICAgaXNTdGF0aWMgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBtYXRjaCgnWycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcqJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtleSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG1ldGhvZCA9IHRyeVBhcnNlTWV0aG9kRGVmaW5pdGlvbih0b2tlbiwga2V5LCBjb21wdXRlZCwgbWV0aG9kKTtcbiAgICAgICAgICAgICAgICBpZiAobWV0aG9kKSB7XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZFsnc3RhdGljJ10gPSBpc1N0YXRpYzsgLy8ganNjczppZ25vcmUgcmVxdWlyZURvdE5vdGF0aW9uXG4gICAgICAgICAgICAgICAgICAgIGlmIChtZXRob2Qua2luZCA9PT0gJ2luaXQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Qua2luZCA9ICdtZXRob2QnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNTdGF0aWMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghbWV0aG9kLmNvbXB1dGVkICYmIChtZXRob2Qua2V5Lm5hbWUgfHwgbWV0aG9kLmtleS52YWx1ZS50b1N0cmluZygpKSA9PT0gJ2NvbnN0cnVjdG9yJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtZXRob2Qua2luZCAhPT0gJ21ldGhvZCcgfHwgIW1ldGhvZC5tZXRob2QgfHwgbWV0aG9kLnZhbHVlLmdlbmVyYXRvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuQ29uc3RydWN0b3JTcGVjaWFsTWV0aG9kKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0NvbnN0cnVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5EdXBsaWNhdGVDb25zdHJ1Y3Rvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzQ29uc3RydWN0b3IgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Qua2luZCA9ICdjb25zdHJ1Y3Rvcic7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW1ldGhvZC5jb21wdXRlZCAmJiAobWV0aG9kLmtleS5uYW1lIHx8IG1ldGhvZC5rZXkudmFsdWUudG9TdHJpbmcoKSkgPT09ICdwcm90b3R5cGUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLlN0YXRpY1Byb3RvdHlwZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kLnR5cGUgPSBTeW50YXguTWV0aG9kRGVmaW5pdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG1ldGhvZC5tZXRob2Q7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBtZXRob2Quc2hvcnRoYW5kO1xuICAgICAgICAgICAgICAgICAgICBib2R5LnB1c2gobWV0aG9kKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBsZXgoKTtcbiAgICAgICAgcmV0dXJuIGNsYXNzQm9keS5maW5pc2hDbGFzc0JvZHkoYm9keSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VDbGFzc0RlY2xhcmF0aW9uKGlkZW50aWZpZXJJc09wdGlvbmFsKSB7XG4gICAgICAgIHZhciBpZCA9IG51bGwsIHN1cGVyQ2xhc3MgPSBudWxsLCBjbGFzc05vZGUgPSBuZXcgTm9kZSgpLCBjbGFzc0JvZHksIHByZXZpb3VzU3RyaWN0ID0gc3RyaWN0O1xuICAgICAgICBzdHJpY3QgPSB0cnVlO1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ2Ns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ICAgICAgbG9jYWwgPSBkZWYuZmluaXNoSWRlbnRpZmllcignZGVmYXVsdCcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbG9jYWwgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdhcycpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGV4cG9ydGVkID0gcGFyc2VOb25Db21wdXRlZFByb3BlcnR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoRXhwb3J0U3BlY2lmaWVyKGxvY2FsLCBleHBvcnRlZCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VFeHBvcnROYW1lZERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgdmFyIGRlY2xhcmF0aW9uID0gbnVsbCxcbiAgICAgICAgICAgIGlzRXhwb3J0RnJvbUlkZW50aWZpZXIsXG4gICAgICAgICAgICBzcmMgPSBudWxsLCBzcGVjaWZpZXJzID0gW107XG5cbiAgICAgICAgLy8gbm9uLWRlZmF1bHQgZXhwb3J0XG4gICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uS2V5d29yZCkge1xuICAgICAgICAgICAgLy8gY292ZXJzOlxuICAgICAgICAgICAgLy8gZXhwb3J0IHZhciBmID0gMTtcbiAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnbGV0JzpcbiAgICAgICAgICAgICAgICBjYXNlICdjb25zdCc6XG4gICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uID0gcGFyc2VMZXhpY2FsRGVjbGFyYXRpb24oe2luRm9yOiBmYWxzZX0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hFeHBvcnROYW1lZERlY2xhcmF0aW9uKGRlY2xhcmF0aW9uLCBzcGVjaWZpZXJzLCBudWxsKTtcbiAgICAgICAgICAgICAgICBjYXNlICd2YXInOlxuICAgICAgICAgICAgICAgIGNhc2UgJ2NsYXNzJzpcbiAgICAgICAgICAgICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uID0gcGFyc2VTdGF0ZW1lbnRMaXN0SXRlbSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hFeHBvcnROYW1lZERlY2xhcmF0aW9uKGRlY2xhcmF0aW9uLCBzcGVjaWZpZXJzLCBudWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdCgneycpO1xuICAgICAgICB3aGlsZSAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgIGlzRXhwb3J0RnJvbUlkZW50aWZpZXIgPSBpc0V4cG9ydEZyb21JZGVudGlmaWVyIHx8IG1hdGNoS2V5d29yZCgnZGVmYXVsdCcpO1xuICAgICAgICAgICAgc3BlY2lmaWVycy5wdXNoKHBhcnNlRXhwb3J0U3BlY2lmaWVyKCkpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGV4cGVjdCgnfScpO1xuXG4gICAgICAgIGlmIChtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdmcm9tJykpIHtcbiAgICAgICAgICAgIC8vIGNvdmVyaW5nOlxuICAgICAgICAgICAgLy8gZXhwb3J0IHtkZWZhdWx0fSBmcm9tICdmb28nO1xuICAgICAgICAgICAgLy8gZXhwb3J0IHtmb299IGZyb20gJ2Zvbyc7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIHNyYyA9IHBhcnNlTW9kdWxlU3BlY2lmaWVyKCk7XG4gICAgICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG4gICAgICAgIH0gZWxzZSBpZiAoaXNFeHBvcnRGcm9tSWRlbnRpZmllcikge1xuICAgICAgICAgICAgLy8gY292ZXJpbmc6XG4gICAgICAgICAgICAvLyBleHBvcnQge2RlZmF1bHR9OyAvLyBtaXNzaW5nIGZyb21DbGF1c2VcbiAgICAgICAgICAgIHRocm93RXJyb3IobG9va2FoZWFkLnZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuIDogTWVzc2FnZXMuTWlzc2luZ0Zyb21DbGF1c2UsIGxvb2thaGVhZC52YWx1ZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBjb3ZlclxuICAgICAgICAgICAgLy8gZXhwb3J0IHtmb299O1xuICAgICAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEV4cG9ydE5hbWVkRGVjbGFyYXRpb24oZGVjbGFyYXRpb24sIHNwZWNpZmllcnMsIHNyYyk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICB2YXIgZGVjbGFyYXRpb24gPSBudWxsLFxuICAgICAgICAgICAgZXhwcmVzc2lvbiA9IG51bGw7XG5cbiAgICAgICAgLy8gY292ZXJzOlxuICAgICAgICAvLyBleHBvcnQgZGVmYXVsdCAuLi5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnZGVmYXVsdCcpO1xuXG4gICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2Z1bmN0aW9uJykpIHtcbiAgICAgICAgICAgIC8vIGNvdmVyczpcbiAgICAgICAg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ICAgICAgIHdoaWxlICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgc3BlY2lmaWVycy5wdXNoKHBhcnNlSW1wb3J0U3BlY2lmaWVyKCkpO1xuICAgICAgICAgICAgaWYgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGV4cGVjdCgnfScpO1xuICAgICAgICByZXR1cm4gc3BlY2lmaWVycztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUltcG9ydERlZmF1bHRTcGVjaWZpZXIoKSB7XG4gICAgICAgIC8vIGltcG9ydCA8Zm9vPiAuLi47XG4gICAgICAgIHZhciBsb2NhbCwgbm9kZSA9IG5ldyBOb2RlKCk7XG5cbiAgICAgICAgbG9jYWwgPSBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hJbXBvcnREZWZhdWx0U3BlY2lmaWVyKGxvY2FsKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUltcG9ydE5hbWVzcGFjZVNwZWNpZmllcigpIHtcbiAgICAgICAgLy8gaW1wb3J0IDwqIGFzIGZvbz4gLi4uO1xuICAgICAgICB2YXIgbG9jYWwsIG5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGV4cGVjdCgnKicpO1xuICAgICAgICBpZiAoIW1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ2FzJykpIHtcbiAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuTm9Bc0FmdGVySW1wb3J0TmFtZXNwYWNlKTtcbiAgICAgICAgfVxuICAgICAgICBsZXgoKTtcbiAgICAgICAgbG9jYWwgPSBwYXJzZU5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B7XG4gICAgICAgICAgICAgICAgLy8gaW1wb3J0IGZvb1xuICAgICAgICAgICAgICAgIHNwZWNpZmllcnMucHVzaChwYXJzZUltcG9ydERlZmF1bHRTcGVjaWZpZXIoKSk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnKicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbXBvcnQgZm9vLCAqIGFzIGZvb1xuICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWVycy5wdXNoKHBhcnNlSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyKCkpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCd7JykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGltcG9ydCBmb28sIHtiYXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpZXJzID0gc3BlY2lmaWVycy5jb25jYXQocGFyc2VOYW1lZEltcG9ydHMoKSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsZXgoKSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghbWF0Y2hDb250ZXh0dWFsS2V5d29yZCgnZnJvbScpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihsb29rYWhlYWQudmFsdWUgP1xuICAgICAgICAgICAgICAgICAgICAgICAgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuIDogTWVzc2FnZXMuTWlzc2luZ0Zy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IGlmIChkaXJlY3RpdmUgPT09ICd1c2Ugc3RyaWN0Jykge1xuICAgICAgICAgICAgICAgIHN0cmljdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgaWYgKGZpcnN0UmVzdHJpY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihmaXJzdFJlc3RyaWN0ZWQsIE1lc3NhZ2VzLlN0cmljdE9jdGFsTGl0ZXJhbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIWZpcnN0UmVzdHJpY3RlZCAmJiB0b2tlbi5vY3RhbCkge1xuICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgc3RhdGVtZW50ID0gcGFyc2VTdGF0ZW1lbnRMaXN0SXRlbSgpO1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodHlwZW9mIHN0YXRlbWVudCA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJvZHkucHVzaChzdGF0ZW1lbnQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBib2R5O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlUHJvZ3JhbSgpIHtcbiAgICAgICAgdmFyIGJvZHksIG5vZGU7XG5cbiAgICAgICAgcGVlaygpO1xuICAgICAgICBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBib2R5ID0gcGFyc2VTY3JpcHRCb2R5KCk7XG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb2dyYW0oYm9keSwgc3RhdGUuc291cmNlVHlwZSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZmlsdGVyVG9rZW5Mb2NhdGlvbigpIHtcbiAgICAgICAgdmFyIGksIGVudHJ5LCB0b2tlbiwgdG9rZW5zID0gW107XG5cbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGV4dHJhLnRva2Vucy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgZW50cnkgPSBleHRyYS50b2tlbnNbaV07XG4gICAgICAgICAgICB0b2tlbiA9IHtcbiAgICAgICAgICAgICAgICB0eXBlOiBlbnRyeS50eXBlLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBlbnRyeS52YWx1ZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChlbnRyeS5yZWdleCkge1xuICAgICAgICAgICAgICAgIHRva2VuLnJlZ2V4ID0ge1xuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBlbnRyeS5yZWdleC5wYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBmbGFnczogZW50cnkucmVnZXguZmxhZ3NcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4ucmFuZ2UgPSBlbnRyeS5yYW5nZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS5sb2MpIHtcbiAgICAgICAgICAgICAgICB0b2tlbi5sb2MgPSBlbnRyeS5sb2M7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgIH1cblxuICAgICAgICBleHRyYS50b2tlbnMgPSB0b2tlbnM7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gdG9rZW5pemUoY29kZSwgb3B0aW9ucywgZGVsZWdhdGUpIHtcbiAgICAgICAgdmFyIHRvU3RyaW5nLFxuICAgICAgICAgICAgdG9rZW5zO1xuXG4gICAgICAgIHRvU3RyaW5nID0gU3RyaW5nO1xuICAgICAgICBpZiAodHlwZW9mIGNvZGUgIT09ICdzdHJpbmcnICYmICEoY29kZSBpbnN0YW5jZW9mIFN0cmluZykpIHtcbiAgICAgICAgICAgIGNvZGUgPSB0b1N0cmluZyhjb2RlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHNvdXJjZSA9IGNvZGU7XG4gICAgICAgIGluZGV4ID0gMDtcbiAgICAgICAgbGluZU51bWJlciA9IChzb3VyY2UubGVuZ3RoID4gMCkgPyAxIDogMDtcbiAgICAgICAgbGluZVN0YXJ0ID0gMDtcbiAgICAgICAgc3RhcnRJbmRleCA9IGluZGV4O1xuICAgICAgICBzdGFydExpbmVOdW1iZXIgPSBsaW5lTnVtYmVyO1xuICAgICAgICBzdGFydExpbmVTdGFydCA9IGxpbmVTdGFydDtcbiAgICAgICAgbGVuZ3RoID0gc291cmNlLmxlbmd0aDtcbiAgICAgICAgbG9va2FoZWFkID0gbnVsbDtcbiAgICAgICAgc3RhdGUgPSB7XG4gICAgICAgICAgICBhbGxvd0luOiB0cnVlLFxuICAgICAgICAgICAgYWxsb3dZaWVsZDogdHJ1ZSxcbiAgICAgICAgICAgIGxhYmVsU2V0OiB7fSxcbiAgICAgICAgICAgIGluRnVuY3Rpb25Cb2R5OiBmYWxzZSxcbiAgICAgICAgICAgIGluSXRlcmF0aW9uOiBmYWxzZSxcbiAgICAgICAgICAgIGluU3dpdGNoOiBmYWxzZSxcbiAgICAgICAgICAgIGxhc3RDb21tZW50U3RhcnQ6IC0xLFxuICAgICAgICAgICAgY3VybHlTdGFjazogW11cbiAgICAgICAgfTtcblxuICAgICAgICBleHRyYSA9IHt9O1xuXG4gICAgICAgIC8vIE9wdGlvbnMgbWF0Y2hpbmcuXG4gICAgICAgIG9wdGlvbnMgPSBvcHRpb25zIHx8IHt9O1xuXG4gICAgICAgIC8vIE9mIGNvdXJzZSB3ZSBjb2xsZWN0IHRva2VucyBoZXJlLlxuICAgICAgICBvcHRpb25zLnRva2VucyA9IHRydWU7XG4gICAgICAgIGV4dHJhLnRva2VucyA9IFtdO1xuICAgICAgICBleHRyYS50b2tlblZhbHVlcyA9IFtdO1xuICAgICAgICBleHRyYS50b2tlbml6ZSA9IHRydWU7XG4gICAgICAgIGV4dHJhLmRlbGVnYXRlID0gZGVsZWdhdGU7XG5cbiAgICAgICAgLy8gVGhlIGZvbGxvd2luZyB0d28gZmllbGRzIGFyZSBuZWNlc3NhcnkgdG8gY29tcHV0ZSB0aGUgUmVnZXggdG9rZW5zLlxuICAgICAgICBleHRyYS5vcGVuUGFyZW5Ub2tlbiA9IC0xO1xuICAgICAgICBleHRyYS5vcGVuQ3VybHlUb2tlbiA9IC0xO1xuXG4gICAgICAgIGV4dHJhLnJhbmdlID0gKHR5cGVvZiBvcHRpb25zLnJhbmdlID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMucmFuZ2U7XG4gICAgICAgIGV4dHJhLmxvYyA9ICh0eXBlb2Ygb3B0aW9ucy5sb2MgPT09ICdib29sZWFuJykgJiYgb3B0aW9ucy5sb2M7XG5cbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmNvbW1lbnQgPT09ICdib29sZWFuJyAmJiBvcHRpb25zLmNvbW1lbnQpIHtcbiAgICAgICAgICAgIGV4dHJhLmNvbW1lbnRzID0gW107XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnRvbGVyYW50ID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy50b2xlcmFudCkge1xuICAgICAgICAgICAgZXh0cmEuZXJyb3JzID0gW107XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcGVlaygpO1xuICAgICAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5FT0YpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZXh0cmEudG9rZW5zO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIHdoaWxlIChsb29rYWhlYWQudHlwZSAhPT0gVG9rZW4uRU9GKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAobGV4RXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4dHJhLmVycm9ycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3JkRXJyb3IobGV4RXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgaGF2ZSB0byBicmVhayBvbiB0aGUgZmlyc3QgZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvIGF2b2lkIGluZmluaXRlIGxvb3BzLlxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBsZXhFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdG9rZW5zID0gZXh0cmEudG9rZW5zO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBleHRyYS5lcnJvcnMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgdG9rZW5zLmVycm9ycyA9IGV4dHJhLmVycm9ycztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIGV4dHJhID0ge307XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRva2VucztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZShjb2RlLCBvcHRpb25zKSB7XG4gICAgICAgIHZhciBwcm9ncmFtLCB0b1N0cmluZztcblxuICAgICAgICB0b1N0cmluZyA9IFN0cmluZztcbiAgICAgICAgaWYgKHR5cGVvZiBjb2RlICE9PSAnc3RyaW5nJyAmJiAhKGNvZGUgaW5zdGFuY2VvZiBTdHJpbmcpKSB7XG4gICAgICAgICAgICBjb2RlID0gdG9TdHJpbmcoY29kZSk7XG4gICAgICAgIH1cblxuICAgICAgICBzb3VyY2UgPSBjb2RlO1xuICAgICAgICBpbmRleCA9IDA7XG4gICAgICAgIGxpbmVOdW1iZXIgPSAoc291cmNlLmxlbmd0aCA+IDApID8gMSA6IDA7XG4gICAgICAgIGxpbmVTdGFydCA9IDA7XG4gICAgICAgIHN0YXJ0SW5kZXggPSBpbmRleDtcbiAgICAgICAgc3RhcnRMaW5lTnVtYmVyID0gbGluZU51bWJlcjtcbiAgICAgICAgc3RhcnRMaW5lU3RhcnQgPSBsaW5lU3RhcnQ7XG4gICAgICAgIGxlbmd0aCA9IHNvdXJjZS5sZW5ndGg7XG4gICAgICAgIGxvb2thaGVhZCA9IG51bGw7XG4gICAgICAgIHN0YXRlID0ge1xuICAgICAgICAgICAgYWxsb3dJbjogdHJ1ZSxcbiAgICAgICAgICAgIGFsbG93WWllbGQ6IHRydWUsXG4gICAgICAgICAgICBsYWJlbFNldDoge30sXG4gICAgICAgICAgICBpbkZ1bmN0aW9uQm9keTogZmFsc2UsXG4gICAgICAgICAgICBpbkl0ZXJhdGlvbjogZmFsc2UsXG4gICAgICAgICAgICBpblN3aXRjaDogZmFsc2UsXG4gICAgICAgICAgICBsYXN0Q29tbWVudFN0YXJ0OiAtMSxcbiAgICAgICAgICAgIGN1cmx5U3RhY2s6IFtdLFxuICAgICAgICAgICAgc291cmNlVHlwZTogJ3NjcmlwdCdcbiAgICAgICAgfTtcbiAgICAgICAgc3RyaWN0ID0gZmFsc2U7XG5cbiAgICAgICAgZXh0cmEgPSB7fTtcbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgZXh0cmEucmFuZ2UgPSAodHlwZW9mIG9wdGlvbnMucmFuZ2UgPT09ICdib29sZWFuJykgJiYgb3B0aW9ucy5yYW5nZTtcbiAgICAgICAgICAgIGV4dHJhLmxvYyA9ICh0eXBlb2Ygb3B0aW9ucy5sb2MgPT09ICdib29sZWFuJykgJiYgb3B0aW9ucy5sb2M7XG4gICAgICAgICAgICBleHRyYS5hdHRhY2hDb21tZW50ID0gKHR5cGVvZiBvcHRpb25zLmF0dGFjaENvbW1lbnQgPT09ICdib29sZWFuJykgJiYgb3B0aW9ucy5hdHRhY2hDb21tZW50O1xuXG4gICAgICAgICAgICBpZiAoZXh0cmEubG9jICYmIG9wdGlvbnMuc291cmNlICE9PSBudWxsICYmIG9wdGlvbnMuc291cmNlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5zb3VyY2UgPSB0b1N0cmluZyhvcHRpb25zLnNvdXJjZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy50b2tlbnMgPT09ICdib29sZWFuJyAmJiBvcHRpb25zLnRva2Vucykge1xuICAgICAgICAgICAgICAgIGV4dHJhLnRva2VucyA9IFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmNvbW1lbnQgPT09ICdib29sZWFuJyAmJiBvcHRpb25zLmNvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5jb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnRvbGVyYW50ID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy50b2xlcmFudCkge1xuICAgICAgICAgICAgICAgIGV4dHJhLmVycm9ycyA9IFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLmF0dGFjaENvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5yYW5nZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgZXh0cmEuY29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICBleHRyYS5ib3R0b21SaWdodFN0YWNrID0gW107XG4gICAgICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIGV4dHJhLmxlYWRpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG9wdGlvbnMuc291cmNlVHlwZSA9PT0gJ21vZHVsZScpIHtcbiAgICAgICAgICAgICAgICAvLyB2ZXJ5IHJlc3RyaWN0aXZlIGNvbmRpdGlvbiBmb3Igbm93XG4gICAgICAgICAgICAgICAgc3RhdGUuc291cmNlVHlwZSA9IG9wdGlvbnMuc291cmNlVHlwZTtcbiAgICAgICAgICAgICAgICBzdHJpY3QgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHByb2dyYW0gPSBwYXJzZVByb2dyYW0oKTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEuY29tbWVudHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS5jb21tZW50cyA9IGV4dHJhLmNvbW1lbnRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBleHRyYS50b2tlbnMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgZmlsdGVyVG9rZW5Mb2NhdGlvbigpO1xuICAgICAgICAgICAgICAgIHByb2dyYW0udG9rZW5zID0gZXh0cmEudG9rZW5zO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBleHRyYS5lcnJvcnMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS5lcnJvcnMgPSBleHRyYS5lcnJvcnM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICBleHRyYSA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHByb2dyYW07XG4gICAgfVxuXG4gICAgLy8gU3luYyB3aXRoICouanNvbiBtYW5pZmVzdHMuXG4gICAgZXhwb3J0cy52ZXJzaW9uID0gJzIuNy4xJztcblxuICAgIGV4cG9ydHMudG9rZW5pemUgPSB0b2tlbml6ZTtcblxuICAgIGV4cG9ydHMucGFyc2UgPSBwYXJzZTtcblxuICAgIC8vIERlZXAgY29weS5cbiAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgIGV4cG9ydHMuU3ludGF4ID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIG5hbWUsIHR5cGVzID0ge307XG5cbiAgICAgICAgaWYgKHR5cGVvZiBPYmplY3QuY3JlYXRlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB0eXBlcyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKG5hbWUgaW4gU3ludGF4KSB7XG4gICAgICAgICAgICBpZiAoU3ludGF4Lmhhc093blByb3BlcnR5KG5hbWUpKSB7XG4gICAgICAgICAgICAgICAgdHlwZXNbbmFtZV0gPSBTeW50YXhbbmFtZV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIE9iamVjdC5mcmVlemUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIE9iamVjdC5mcmVlemUodHlwZXMpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHR5cGVzO1xuICAgIH0oKSk7XG5cbn0pKTtcbi8qIHZpbTogc2V0IHN3PTQgdHM9NCBldCB0dz04MCA6ICovXG4i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ZXRob2ROYW1lXSAhPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBiaW5kTWV0aG9kKGNvbnNvbGUsIG1ldGhvZE5hbWUpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoY29uc29sZS5sb2cgIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gYmluZE1ldGhvZChjb25zb2xlLCAnbG9nJyk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmV0dXJuIG5vb3A7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGJpbmRNZXRob2Qob2JqLCBtZXRob2ROYW1lKSB7XHJcbiAgICAgICAgdmFyIG1ldGhvZCA9IG9ialttZXRob2ROYW1lXTtcclxuICAgICAgICBpZiAodHlwZW9mIG1ldGhvZC5iaW5kID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBtZXRob2QuYmluZChvYmopO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gRnVuY3Rpb24ucHJvdG90eXBlLmJpbmQuY2FsbChtZXRob2QsIG9iaik7XHJcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcclxuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRnVuY3Rpb24ucHJvdG90eXBlLmFwcGx5LmFwcGx5KG1ldGhvZCwgW29iaiwgYXJndW1lbnRzXSk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIG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ykudG9VcHBlckNhc2UoKTtcclxuXHJcbiAgICAgICAgLy8gVXNlIGxvY2FsU3RvcmFnZSBpZiBhdmFpbGFibGVcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICB3aW5kb3cubG9jYWxTdG9yYWdlWydsb2dsZXZlbCddID0gbGV2ZWxOYW1lO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfSBjYXRjaCAoaWdub3JlKSB7fVxyXG5cclxuICAgICAgICAvLyBVc2Ugc2Vzc2lvbiBjb29raWUgYXMgZmFsbGJhY2tcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICB3aW5kb3cuZG9jdW1lbnQuY29va2llID0gXCJsb2dsZXZlbD1cIiArIGxldmVsTmFtZSArIFwiO1wiO1xyXG4gICAgICAgIH0gY2F0Y2ggKGlnbm9yZSkge31cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBsb2FkUGVyc2lzdGVkTGV2ZWwoKSB7XHJcbiAgICAgICAgdmFyIHN0b3JlZExldmVsO1xyXG5cclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBzdG9yZWRMZXZlbCA9IHdpbmRvdy5sb2NhbFN0b3JhZ2VbJ2xvZ2xldmVsJ107XHJcbiAgICAgICAgfSBjYXRjaCAoaWdub3JlKSB7fVxyXG5cclxuICAgICAgICBpZiAodHlwZW9mIHN0b3JlZExldmVsID09PSB1bmRlZmluZWRUeXBlKSB7XHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICBzdG9yZWRMZXZlbCA9IC9sb2dsZXZlbD0oW147XSspLy5leGVjKHdpbmRvdy5kb2N1bWVudC5jb29raWUpWzFdO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgIGlmIChzZWxmLmxldmVsc1tzdG9yZWRMZXZlbF0gPT09IHVuZGVmaW5lZCkge1xyXG4gICA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AgICAgICAgdHlwZTogJ25vbmUnLFxuICAgICAgICB2YWx1ZXM6IGFueShudWxsLCB2YWx1ZXMpLFxuICAgICAgICB0b1N0cmluZzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICchJyArIHdyYXAodGhpcy52YWx1ZXMudG9TdHJpbmcoKSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiBwcmludE5lc3RlZCh2YWx1ZXMsIGpvaW5lcikge1xuICAgIHJldHVybiB3cmFwKHZhbHVlcy5maWx0ZXIobm90TnVsbCkubWFwKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgIHJldHVybiB3cmFwKHguam9pbignICYmICcpKTtcbiAgICB9KS5qb2luKCcgJyArIGpvaW5lciArICcgJykpO1xufVxuXG5mdW5jdGlvbiBhbnkoXywgdmFsdWVzKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ2FueScsXG4gICAgICAgIHZhbHVlczogdmFsdWVzLm1hcChwYXJzZUZpbHRlciksXG4gICAgICAgIHRvU3RyaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJpbnROZXN0ZWQodGhpcy52YWx1ZXMsICd8fCcpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gYWxsKF8sIHZhbHVlcykge1xuICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6ICdhbGwnLFxuICAgICAgICB2YWx1ZXM6IHZhbHVlcy5maWx0ZXIobm90TnVsbCkubWFwKHBhcnNlRmlsdGVyKSxcbiAgICAgICAgdG9TdHJpbmc6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBwcmludE5lc3RlZCh0aGlzLnZhbHVlcywgJyYmJyk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiBwcm9wZXJ0eU1hdGNoZXNCb29sZWFuKGtleSwgdmFsdWUpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0eXBlOiAncHJvcGVydHlNYXRjaGVzQm9vbGVhbicsXG4gICAgICAgIGtleToga2V5LFxuICAgICAgICB2YWx1ZTogdmFsdWUsXG4gICAgICAgIHRvU3RyaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gd3JhcChsb29rVXAodGhpcy5rZXkpICsgKHRoaXMudmFsdWUgPyAnICE9ICcgOiAnID09ICcpICArICdudWxsJyk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiByYW5nZU1hdGNoKGtleSwgdmFsdWVzKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ3JhbmdlTWF0Y2gnLFxuICAgICAgICBrZXk6IGtleSxcbiAgICAgICAgdmFsdWVzOiB2YWx1ZXMsXG4gICAgICAgIHRvU3RyaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZXhwcmVzc2lvbnMgPSBbXTtcblxuICAgICAgICAgICAgaWYgKHRoaXMudmFsdWVzLm1heCkge1xuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25zLnB1c2goJycgKyBsb29rVXAoa2V5KSArICcgPCAnICsgdGhpcy52YWx1ZXMubWF4KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMudmFsdWVzLm1pbikge1xuICAgICAgICAgICAgICAgIGV4cHJlc3Npb25zLnB1c2goJycgKyBsb29rVXAoa2V5KSArICcgPj0gJyArIHRoaXMudmFsdWVzLm1pbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB3cmFwKGV4cHJlc3Npb25zLmpvaW4oJyAmJiAnKSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiBwYXJzZUZpbHRlcihmaWx0ZXIpIHtcbiAgICB2YXIgZmlsdGVyQVNUID0gW107XG5cbiAgICAvLyBGdW5jdGlvbiBmaWx0ZXJcbiAgICBpZiAod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PSAwKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgICAgY2FzZSAnbm90JzpcbiAgICAgICAgICAgICAgICBmaWx0ZXJBU1QucHVzaChub3Qoa2V5LCB2YWx1ZSkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnYW55JzpcbiAgICAgICAgICAgICAgICBmaWx0ZXJBU1QucHVzaChhbnkoa2V5LCB2YWx1ZSkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnYWxsJzpcbiAgICAgICAgICAgICAgICBmaWx0ZXJBU1QucHVzaChhbGwoa2V5LCB2YWx1ZSkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnbm9uZSc6XG4gICAgICAgICAgICAgICAgZmlsdGVyQVNULnB1c2gobm9uZShrZXksIHZhbHVlKSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVW5oYW5kbGVkIFdoaXRlTGlzdGVkIHByb3BlcnR5OiAnICsga2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgZmlsdGVyQVNULnB1c2gocHJvcGVydHlPcihrZXksIHZhbHVlKSk7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ29iamVjdCcgJiYgdmFsdWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKHZhbHVlLm1heCB8fCB2YWx1ZS5taW4pIHtcbiAgICAgICAgICAgICAgICBmaWx0ZXJBU1QucHVzaChyYW5nZU1hdGNoKGtleSwgdmFsdWUpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVW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pZiAobGVhZCkge1xuICAgICAgICAgICAgICAgIGlmIChjIDwgMHhEQzAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGJ5dGVzLnB1c2goMHhFRiwgMHhCRiwgMHhCRCk7XG4gICAgICAgICAgICAgICAgICAgIGxlYWQgPSBjO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGMgPSBsZWFkIC0gMHhEODAwIDw8IDEwIHwgYyAtIDB4REMwMCB8IDB4MTAwMDA7XG4gICAgICAgICAgICAgICAgICAgIGxlYWQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoYyA+IDB4REJGRiB8fCAoaSArIDEgPT09IGxlbmd0aCkpIGJ5dGVzLnB1c2goMHhFRiwgMHhCRiwgMHhCRCk7XG4gICAgICAgICAgICAgICAgZWxzZSBsZWFkID0gYztcblxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0gZWxzZSBpZiAobGVhZCkge1xuICAgICAgICAgICAgYnl0ZXMucHVzaCgweEVGLCAweEJGLCAweEJEKTtcbiAgICAgICAgICAgIGxlYWQgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPCAweDgwKSBieXRlcy5wdXNoKGMpO1xuICAgICAgICBlbHNlIGlmIChjIDwgMHg4MDApIGJ5dGVzLnB1c2goYyA+PiAweDYgfCAweEMwLCBjICYgMHgzRiB8IDB4ODApO1xuICAgICAgICBlbHNlIGlmIChjIDwgMHgxMDAwMCkgYnl0ZXMucHVzaChjID4+IDB4QyB8IDB4RTAsIGMgPj4gMHg2ICYgMHgzRiB8IDB4ODAsIGMgJiAweDNGIHwgMHg4MCk7XG4gICAgICAgIGVsc2UgYnl0ZXMucHVzaChjID4+IDB4MTIgfCAweEYwLCB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uICAgIGRlc3Ryb3k6IGZ1bmN0aW9uKCkge1xuICAgICAgICB0aGlzLmJ1ZiA9IG51bGw7XG4gICAgfSxcblxuICAgIC8vID09PSBSRUFESU5HID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbiAgICByZWFkRmllbGRzOiBmdW5jdGlvbihyZWFkRmllbGQsIHJlc3VsdCwgZW5kKSB7XG4gICAgICAgIGVuZCA9IGVuZCB8fCB0aGlzLmxlbmd0aDtcblxuICAgICAgICB3aGlsZSAodGhpcy5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIHZhciB2YWwgPSB0aGlzLnJlYWRWYXJpbnQoKSxcbiAgICAgICAgICAgICAgICB0YWcgPSB2YWwgPj4gMyxcbiAgICAgICAgICAgICAgICBzdGFydFBvcyA9IHRoaXMucG9zO1xuXG4gICAgICAgICAgICByZWFkRmllbGQodGFnLCByZXN1bHQsIHRoaXMpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPT09IHN0YXJ0UG9zKSB0aGlzLnNraXAodmFsKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH0sXG5cbiAgICByZWFkTWVzc2FnZTogZnVuY3Rpb24ocmVhZEZpZWxkLCByZXN1bHQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucmVhZEZpZWxkcyhyZWFkRmllbGQsIHJlc3VsdCwgdGhpcy5yZWFkVmFyaW50KCkgKyB0aGlzLnBvcyk7XG4gICAgfSxcblxuICAgIHJlYWRGaXhlZDMyOiBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHZhbCA9IHRoaXMuYnVmLnJlYWRVSW50MzJMRSh0aGlzLnBvcyk7XG4gICAgICAgIHRoaXMucG9zICs9IDQ7XG4gICAgICAgIHJldHVybiB2YWw7XG4gICAgfSxcblxuICAgIHJlYWRTRml4ZWQzMjogZnVuY3Rpb24oKSB7XG4gICAg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l0aFNlcDogZnVuY3Rpb24oeCwgeSkge1xuICAgICAgICByZXR1cm4gTWF0aC5hdGFuMihcbiAgICAgICAgICAgIHRoaXMueCAqIHkgLSB0aGlzLnkgKiB4LFxuICAgICAgICAgICAgdGhpcy54ICogeCArIHRoaXMueSAqIHkpO1xuICAgIH0sXG5cbiAgICBfbWF0TXVsdDogZnVuY3Rpb24obSkge1xuICAgICAgICB2YXIgeCA9IG1bMF0gKiB0aGlzLnggKyBtWzFdICogdGhpcy55LFxuICAgICAgICAgICAgeSA9IG1bMl0gKiB0aGlzLnggKyBtWzNdICogdGhpcy55O1xuICAgICAgICB0aGlzLnggPSB4O1xuICAgICAgICB0aGlzLnkgPSB5O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX2FkZDogZnVuY3Rpb24ocCkge1xuICAgICAgICB0aGlzLnggKz0gcC54O1xuICAgICAgICB0aGlzLnkgKz0gcC55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX3N1YjogZnVuY3Rpb24ocCkge1xuICAgICAgICB0aGlzLnggLT0gcC54O1xuICAgICAgICB0aGlzLnkgLT0gcC55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX211bHQ6IGZ1bmN0aW9uKGspIHtcbiAgICAgICAgdGhpcy54ICo9IGs7XG4gICAgICAgIHRoaXMueSAqPSBrO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9LFxuXG4gICAgX2RpdjogZnVuY3Rpb24oaykge1xuICAgICAgICB0aGlzLnggLz0gaztcbiAgICAgICAgdGhpcy55IC89IGs7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH0sXG5cbiAgICBfdW5pdDogZnVuY3Rpb24oKSB7XG4gICAgICAgIHRoaXMuX2Rpdih0aGlzLm1hZygpKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfSxcblxuICAgIF9wZXJwOiBmdW5jdGlvbigpIHtcb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ICAgIHJldHVybiBmdW5jdGlvbiBuZXh0VGljayhmbikge1xuICAgICAgICAgICAgaWYgKCFxdWV1ZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBoaWRkZW5EaXYuc2V0QXR0cmlidXRlKCd5ZXMnLCAnbm8nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHF1ZXVlLnB1c2goZm4pO1xuICAgICAgICB9O1xuICAgIH1cblxuICAgIGlmIChjYW5Qb3N0KSB7XG4gICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICB2YXIgc291cmNlID0gZXYuc291cmNlO1xuICAgICAgICAgICAgaWYgKChzb3VyY2UgPT09IHdpbmRvdyB8fCBzb3VyY2UgPT09IG51bGwpICYmIGV2LmRhdGEgPT09ICdwcm9jZXNzLXRpY2snKSB7XG4gICAgICAgICAgICAgICAgZXYuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgaWYgKHF1ZXVlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZuID0gcXVldWUuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgZm4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIHRydWUpO1xuXG4gICAgICAgIHJldHVybiBmdW5jdGlvbiBuZXh0VGljayhmbikge1xuICAgICAgICAgICAgcXVldWUucHVzaChmbik7XG4gICAgICAgICAgICB3aW5kb3cucG9zdE1lc3NhZ2UoJ3Byb2Nlc3MtdGljaycsICcqJyk7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuIGZ1bmN0aW9uIG5leHRUaWNrKGZuKSB7XG4gICAgICAgIHNldFRpbWVvdXQoZm4sIDApO1xuICAgIH07XG59KSgpO1xuXG5wcm9jZXNzLnRpdGxlID0gJ2Jyb3dzZXInO1xucHJvY2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ICAgdmFyIGNvbXBvbmVudCA9IFtdLFxuICAgICAgICAgICAgbmVpZ2hib3JzID0gW3BvbHlnb25dO1xuICAgICAgICBwb2x5Z29uLl8gPSAxO1xuICAgICAgICBjb21wb25lbnRzLnB1c2goY29tcG9uZW50KTtcbiAgICAgICAgd2hpbGUgKHBvbHlnb24gPSBuZWlnaGJvcnMucG9wKCkpIHtcbiAgICAgICAgICBjb21wb25lbnQucHVzaChwb2x5Z29uKTtcbiAgICAgICAgICBwb2x5Z29uLmZvckVhY2goZnVuY3Rpb24ocmluZykge1xuICAgICAgICAgICAgcmluZy5mb3JFYWNoKGZ1bmN0aW9uKGFyYykge1xuICAgICAgICAgICAgICBwb2x5Z29uc0J5QXJjW2FyYyA8IDAgPyB+YXJjIDogYXJjXS5mb3JFYWNoKGZ1bmN0aW9uKHBvbHlnb24pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXBvbHlnb24uXykge1xuICAgICAgICAgICAgICAgICAgcG9seWdvbi5fID0gMTtcbiAgICAgICAgICAgICAgICAgIG5laWdoYm9ycy5wdXNoKHBvbHlnb24pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuXG4gICAgcG9seWdvbnMuZm9yRWFjaChmdW5jdGlvbihwb2x5Z29uKSB7XG4gICAgICBkZWxldGUgcG9seWdvbi5fO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIHR5cGU6IFwiTXVsdGlQb2x5Z29uXCIsXG4gICAgICBhcmNzOiBjb21wb25lbnRzLm1hcChmdW5jdGlvbihwb2x5Z29ucykge1xuICAgICAgICB2YXIgYXJjcyA9IFtdO1xuXG4gICAgICAgIC8vIEV4dHJhY3QgdGhlIGV4dGVyaW9yICh1bmlxdWUpIGFyY3MuXG4gICAgICAgIHBvbHlnb25zLmZvckVhY2goZnVuY3Rpb24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cbiAgICAgICAgeSA9IDAsXG4gICAgICAgIGxpbmVzID0gW10sXG4gICAgICAgIGxpbmU7XG5cbiAgICB3aGlsZSAocGJmLnBvcyA8IGVuZCkge1xuICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGNtZExlbiA9IHBiZi5yZWFkVmFyaW50KCk7XG4gICAgICAgICAgICBjbWQgPSBjbWRMZW4gJiAweDc7XG4gICAgICAgICAgICBsZW5ndGggPSBjbWRMZW4gPj4gMztcbiAgICAgICAgfVxuXG4gICAgICAgIGxlbmd0aC0tO1xuXG4gICAgICAgIGlmIChjbWQgPT09IDEgfHwgY21kID09PSAyKSB7XG4gICAgICAgICAgICB4ICs9IHBiZi5yZWFkU1ZhcmludCgpO1xuICAgICAgICAgICAgeSArPSBwYmYucmVhZFNWYXJpbnQoKTtcblxuICAgICAgICAgICAgaWYgKGNtZCA9PT0gMSkgeyAvLyBtb3ZlVG9cbiAgICAgICAgICAgICAgICBpZiAobGluZSkgbGluZXMucHVzaChsaW5lKTtcbiAgICAgICAgICAgICAgICBsaW5lID0gW107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxpbmUucHVzaChuZXcgUG9pbnQoeCwgeSkpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY21kID09PSA3KSB7XG4gICAgICAgICAgICBsaW5lLnB1c2gobGluZVswXS5jbG9uZSgpKTsgLy8gY2xvc2VQb2x5Z29uXG5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigndW5rbm93biBjb21tYW5kICcgKyBjbWQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGxpbmUpIGxpbmVzLnB1c2gobGluZSk7XG5cbiAgICByZXR1cm4gbGluZXM7XG59O1xuXG5WZWN0b3JUaWxlRmVhdHVyZS5wcm90b3R5cGUuYmJveCA9IGZ1bmN0aW9uKCkge1xuICAgIHZhciBwYmYgPSB0aGlzLl9wYmY7XG4gICAgcGJmLnBvcyA9IHRoaXMuX2dlb21ldHJ5O1xuXG4gICAgdmFyIGVuZCA9IHBiZi5yZWFkVmFyaW50KCkgKyBwYmYucG9zLFxuICAgICAgICBjbWQgPSAxLFxuICAgICAgICBsZW5ndGggPSAwLFxuICAgICAgICB4ID0gMCxcbiAgICAgICAgeSA9IDAsXG4gICAgICAgIHgxID0gSW5maW5pdHksXG4gICAgICAgIHgyID0gLUluZmluaXR5LFxuICAgICAgICB5MSA9IEluZmluaXR5LFxuICAgICAgICB5MiA9IC1JbmZpbml0eTtcblxuICAgIHdoaWxlIChwYmYucG9zIDwgZW5kKSB7XG4gICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICB2YXIgY21kTGVuID0gcGJmLnJlYWRWYXJpbnQoKTtcbiAgICAgICAgICAgIGNtZCA9IGNtZExlbiAmIDB4NztcbiAgICAgICAgICAgIGxlbmd0aCA9IGNtZExlbiA+PiAzO1xuICAgICAgICB9XG5cbiAgICAgICAgbGVuZ3RoLS07XG5cbiAgICAgICAgaWYgKGNtZCA9PT0gMSB8fCBjbWQgPT09IDIpIHtcbiAgICAgICAgICAgIHggKz0gcGJmLnJlYWRTVmFyaW50KCk7XG4gICAgICAgICAgICB5ICs9IHBiZi5yZWFkU1ZhcmludCgpO1xuICAgICAgICAgICAgaWYgKHggPCB4MSkgeDEgPSB4O1xuICAgICAgICAgICAgaWYgKHggPiB4MikgeDIgPSB4O1xuICAgICAgICAgICAgaWYgKHkgPCB5MSkgeTEgPSB5O1xuICAgICAgICAgICAgaWYgKHkgPiB5MikgeTIgPSB5O1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY21kICE9PSA3KSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3Vua25vd24gY29tbWFuZCAnICsgY21kKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBbeDEsIHkxLCB4MiwgeTJdO1xufTtcblxuVmVjdG9yVGlsZUZlYXR1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ckVhY2godHJhbnNmb3JtKSk7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICAvLyBUT0RPOiBzdXBwb3J0IEdlb21ldHJ5Q29sbGVjdGlvblxufTtcblxuR2VvLmJveEludGVyc2VjdCA9IGZ1bmN0aW9uIChiMSwgYjIpIHtcbiAgICByZXR1cm4gIShcbiAgICAgICAgYjIuc3cueCA+IGIxLm5lLnggfHxcbiAgICAgICAgYjIubmUueCA8IGIxLnN3LnggfHxcbiAgICAgICAgYjIuc3cueSA+IGIxLm5lLnkgfHxcbiAgICAgICAgYjIubmUueSA8IGIxLnN3LnlcbiAgICApO1xufTtcblxuLy8gRmluZHMgdGhlIGF4aXMtYWxpZ25lZCBib3VuZGluZyBib3ggZm9yIGEgcG9seWdvblxuR2VvLmZpbmRCb3VuZGluZ0JveCA9IGZ1bmN0aW9uIChwb2x5Z29uKSB7XG4gICAgdmFyIG1pbl94ID0gSW5maW5pdHksXG4gICAgICAgIG1heF94ID0gLUluZmluaXR5LFxuICAgICAgICBtaW5feSA9IEluZmluaXR5LFxuICAgICAgICBtYXhfeSA9IC1JbmZpbml0eTtcblxuICAgIC8vIE9ubHkgbmVlZCB0byBleGFtaW5lIG91dGVyIHJpbmcgKHBvbHlnb25bMF0pXG4gICAgdmFyIG51bV9jb29yZHMgPSBwb2x5Z29uWzBdLmxlbmd0aDtcbiAgICBmb3IgKHZhciBjPTA7IGMgPCBudW1fY29vcmRzOyBjKyspIHtcbiAgICAgICAgdmFyIGNvb3JkID0gcG9seWdvblswXVtjXTtcblxuICAgICAgICBpZiAoY29vcmRbMF0gPCBtaW5feCkge1xuICAgICAgICAgICAgbWluX3ggPSBjb29yZFswXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29vcmRbMV0gPCBtaW5feSkge1xuICAgICAgICAgICAgbWluX3kgPSBjb29yZFsxXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29vcmRbMF0gPiBtYXhfeCkge1xuICAgICAgICAgICAgbWF4X3ggPS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IH1cblxuICAgICAgICAvLyBTaW5nbGUgZmxvYXRcbiAgICAgICAgaWYgKHR5cGVvZiB1bmlmb3JtID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcGFyc2VkLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdmbG9hdCcsXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnMWYnLFxuICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHVuaWZvcm0sXG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgIHVuaWZvcm1zXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBBcnJheTogdmVjdG9yLCBhcnJheSBvZiBmbG9hdHMsIGFycmF5IG9mIHRleHR1cmVzLCBvciBhcnJheSBvZiBzdHJ1Y3RzXG4gICAgICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkodW5pZm9ybSkpIHtcbiAgICAgICAgICAgIC8vIE51bWVyaWMgdmFsdWVzXG4gICAgICAgICAgICBpZiAodHlwZW9mIHVuaWZvcm1bMF0gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgLy8gZmxvYXQgdmVjdG9ycyAodmVjMiwgdmVjMywgdmVjNClcbiAgICAgICAgICAgICAgICBpZiAodW5pZm9ybS5sZW5ndGggPj0gMiAmJiB1bmlmb3JtLmxlbmd0aCA8PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd2ZWMnICsgdW5pZm9ybS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IHVuaWZvcm0ubGVuZ3RoICsgJ2Z2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdW5pZm9ybSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuaWZvcm1zXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBmbG9hdCBhcnJheVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHVuaWZvcm0ubGVuZ3RoID4gNCkge1xuICAgICAgICAgICAgICAgICAgICBwYXJzZWQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnZmxvYXRbXScsXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICcxZnYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSArICdbMF0nLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHVuaWZvcm0sXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgICAgICB1bmlmb3Jtc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gVE9ETzogYXNzdW1lIG1hdHJpeCBmb3IgKHR5cGVvZiA9PSBGbG9hdDMyQXJyYXkgJiYgbGVuZ3RoID09IDE2KT9cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEFycmF5IG9mIHRleHR1cmVzXG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgdW5pZm9ybVswXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHU9MDsgdSA8IHVuaWZvcm0ubGVuZ3RoOyB1KyspIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3NhbXBsZXIyRCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICcxaScsXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lICsgJ1snICsgdSArICddJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB1bmlmb3JtW3VdLFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiB1LFxuICAgICAgICAgICAgICAgICAgICAgICAgdW5pZm9ybXM6IHVuaWZvcm1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQXJyYXkgb2YgYXJyYXlzIC0gYnV0IG9ubHkgYXJyYXlzIG9mIHZlY3RvcnMgYXJlIGFsbG93ZWQgaW4gdGhpcyBjYXNlXG4gICAgICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHVuaWZvcm1bMF0pICYmIHR5cGVvZiB1bmlmb3JtWzBdWzBdID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIC8vIGZsb2F0IHZlY3RvcnMgKHZlYzIsIHZlYzMsIHZlYzQpXG4gICAgICAgICAgICAgICAgaWYgKHVuaWZvcm1bMF0ubGVuZ3RoID49IDIgJiYgdW5pZm9ybVswXS5sZW5ndGggPD0gNCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBTZXQgZWFjaCB2ZWN0b3IgaW4gdGhlIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIGZvciAodT0wOyB1IDwgdW5pZm9ybS5sZW5ndGg7IHUrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd2ZWMnICsgdW5pZm9ybVswXS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiB1bmlmb3JtW3VdLmxlbmd0aCArICdmdicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSArICdbJyArIHUgKyAnXScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHVuaWZvcm1bdV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiB1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaWZvcm1zOiB1bmlmb3JtXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBlbHNlIGVycm9yP1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQXJyYXkgb2Ygc3RydWN0dXJlc1xuICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHVuaWZvcm1bMF0gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgZm9yICh1PTA7IHUgPCB1bmlmb3JtLmxlbmd0aDsgdSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNldCBlYWNoIHN0cnVjdCBpbiB0aGUgYXJyYXlcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnB1c2goLi4uR0xTTC5wYXJzZVVuaWZvcm1zKHVuaWZvcm1bdV0sIG5hbWUgKyAnWycgKyB1ICsgJ10nKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEJvb2xlYW5cbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHVuaWZvcm0gPT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgcGFyc2VkLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdib29sJyxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICcxaScsXG4gICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogdW5pZm9ybSxcbiAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgdW5pZm9ybXNcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIC8vIFRleHR1cmVcbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHVuaWZvcm0gPT09ICdzdHJpbmcnKSB7XG4gIC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zdCgpO1xuICAgICAgICB2YXIgcmVnZXhwO1xuXG4gICAgICAgIGZvciAodmFyIGtleSBpbiBibG9ja3MpIHtcbiAgICAgICAgICAgIHZhciBibG9jayA9IGJsb2Nrc1trZXldO1xuICAgICAgICAgICAgaWYgKCFibG9jayB8fCAoQXJyYXkuaXNBcnJheShibG9jaykgJiYgYmxvY2subGVuZ3RoID09PSAwKSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBGaXJzdCBmaW5kIGNvZGUgcmVwbGFjZSBwb2ludHMgaW4gc2hhZGVyc1xuICAgICAgICAgICAgcmVnZXhwID0gbmV3IFJlZ0V4cCgnXlxcXFxzKiNwcmFnbWFcXFxccyt0YW5ncmFtOlxcXFxzKycgKyBrZXkgKyAnXFxcXHMqJCcsICdtJyk7XG4gICAgICAgICAgICB2YXIgaW5qZWN0X3ZlcnRleCA9IHRoaXMuY29tcHV0ZWRfdmVydGV4X3NvdXJjZS5tYXRjaChyZWdleHApO1xuICAgICAgICAgICAgdmFyIGluamVjdF9mcmFnbWVudCA9IHRoaXMuY29tcHV0ZWRfZnJhZ21lbnRfc291cmNlLm1hdGNoKHJlZ2V4cCk7XG5cbiAgICAgICAgICAgIC8vIEF2b2lkIG5ldHdvcmsgcmVxdWVzdCBpZiBub3RoaW5nIHRvIHJlcGxhY2VcbiAgICAgICAgICAgIGlmIChpbmplY3RfdmVydGV4ID09IG51bGwgJiYgaW5qZWN0X2ZyYWdtZW50ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQ29tYmluZSBhbGwgYmxvY2tzIGludG8gb25lIHN0cmluZ1xuICAgICAgICAgICAgdmFyIHNvdXJjZSA9ICcnO1xuICAgICAgICAgICAgYmxvY2suZm9yRWFjaCh2YWwgPT4ge1xuICAgICAgICAgICAgICAgIC8vIE1hcmsgc3RhcnQgYW5kIGVuZCBvZiBlYWNoIGJsb2NrIHdpdGggbWV0YWRhdGEgKHdoaWNoIGNhbiBiZSBleHRyYWN0ZWQgZnJvbVxuICAgICAgICAgICAgICAgIC8vIGZpbmFsIHNvdXJjZSBmb3IgZXJyb3IgaGFuZGxpbmcsIGRlYnVnZ2luZywgZXRjLilcbiAgICAgICAgICAgICAgICBsZXQgbWFyayA9IGAke3ZhbC5zY29wZX0sICR7dmFsLmtleX0sICR7dmFsLm51bX1gO1xuICAgICAgICAgICAgICAgIHNvdXJjZSArPSBgXFxuLy8gdGFuZ3JhbS1ibG9jay1zdGFydDogJHttYXJrfVxcbmA7XG4gICAgICAgICAgICAgICAgc291cmNlICs9IHZhbC5zb3VyY2U7XG4gICAgICAgICAgICAgICAgc291cmNlICs9IGBcXG4vLyB0YW5ncmFtLWJsb2NrLWVuZDogJHttYXJrfVxcbmA7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gSW5qZWN0XG4gICAgICAgICAgICBpZiAoaW5qZWN0X3ZlcnRleCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jb21wdXRlZF92ZXJ0ZXhfc291cmNlID0gdGhpcy5jb21wdXRlZF92ZXJ0ZXhfc291cmNlLnJlcGxhY2UocmVnZXhwLCBzb3VyY2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGluamVjdF9mcmFnbWVudCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jb21wdXRlZF9mcmFnbWVudF9zb3VyY2UgPSB0aGlzLmNvbXB1dGVkX2ZyYWdtZW50X3NvdXJjZS5yZXBsYWNlKHJlZ2V4cCwgc291cmNlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQWRkIGEgI2RlZmluZSBmb3IgdGhpcyBpbmplY3Rpb24gcG9pbnRcbiAgICAgICAgICAgIGRlZmluZXNbJ1RBTkdSQU1fQkxPQ0tfJyArIGtleS5yZXBsYWNl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AgICAgICB0aGlzLmVycm9yID0gZXJyb3I7XG5cbiAgICAgICAgICAgIC8vIHNoYWRlciBlcnJvciBpbmZvXG4gICAgICAgICAgICBpZiAoZXJyb3IudHlwZSA9PT0gJ3ZlcnRleCcgfHwgZXJyb3IudHlwZSA9PT0gJ2ZyYWdtZW50Jykge1xuICAgICAgICAgICAgICAgIHRoaXMuc2hhZGVyX2Vycm9ycyA9IGVycm9yLmVycm9ycztcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBlIG9mIHRoaXMuc2hhZGVyX2Vycm9ycykge1xuICAgICAgICAgICAgICAgICAgICBlLnR5cGUgPSBlcnJvci50eXBlO1xuICAgICAgICAgICAgICAgICAgICBlLmJsb2NrID0gdGhpcy5ibG9jayhlcnJvci50eXBlLCBlLmxpbmUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhyb3cobmV3IEVycm9yKGBTaGFkZXJQcm9ncmFtLmNvbXBpbGUoKTogcHJvZ3JhbSAke3RoaXMuaWR9ICgke3RoaXMubmFtZX0pIGVycm9yOmAsIGVycm9yKSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnVzZSgpO1xuICAgICAgICB0aGlzLnJlZnJlc2hVbmlmb3JtcygpO1xuICAgICAgICB0aGlzLnJlZnJlc2hBdHRyaWJ1dGVzKCk7XG4gICAgfVxuXG4gICAgLy8gTWFrZSBsaXN0IG9mIGRlZmluZXMgKGdsb2JhbCwgdGhlbiBwcm9ncmFtLXNwZWNpZmljKVxuICAgIGJ1aWxkRGVmaW5lTGlzdCgpIHtcbiAgICAgICAgdmFyIGQsIGRlZmluZXMgPSB7fTtcbiAgICAgICAgZm9yIChkIGluIFNoYWRlclByb2dyYW0uZGVmaW5lcykge1xuICAgICAgICAgICAgZGVmaW5lc1tkXSA9IFNoYWRlclByb2dyYW0uZGVmaW5lc1tkXTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGQgaW4gdGhpcy5kZWZpbmVzKSB7XG4gICAgICAgICAgICBkZWZpbmVzW2RdID0gdGhpcy5kZWZpbmVzW2RdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBkZWZpbmVzO1xuICAgIH1cblxuICAgIC8vIE1ha2UgbGlzdCBvZiBzaGFkZXIgYmxvY2tzIChnbG9iYWwsIHRoZW4gcHJvZ3JhbS1zcGVjaWZpYylcbiAgICBidWlsZFNoYWRlckJsb2NrTGlzdCgpIHtcbiAgICAgICAgbGV0IGtleSwgYmxvY2tzID0ge307XG5cbiAgICAgICAgLy8gR2xvYmFsIGJsb2Nrc1xuICAgICAgICBmb3IgKGtleSBpbiBTaGFkZXJQcm9ncmFtLmJsb2Nrcykge1xuICAgICAgICAgICAgYmxvY2tzW2tleV0gPSBbXTtcblxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoU2hhZGVyUHJvZ3JhbS5ibG9ja3Nba2V5XSkpIHtcbiAgICAgICAgICAgICAgICBibG9ja3Nba2V5XS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAuLi5TaGFkZXJQcm9ncmFtLmJsb2Nrc1trZXldLm1hcCgoc291cmNlLCBudW0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGtleSwgc291cmNlLCBudW0sIHNjb3BlOiAnU2hhZGVyUHJvZ3JhbScgfTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgYmxvY2tzW2tleV0gPSBbeyBrZXksIHNvdXJjZTogU2hhZGVyUHJvZ3JhbS5ibG9ja3Nba2V5XSwgbnVtOiAwLCBzY29wZTogJ1NoYWRlclByb2dyYW0nIH1dO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gUHJvZ3JhbS1zcGVjaWZpYyBibG9ja3NcbiAgICAgICAgZm9yIChrZXkgaW4gdGhpcy5ibG9ja3MpIHtcbiAgICAgICAgICAgIGJsb2Nrc1trZXldID0gYmxvY2tzW2tleV0gfHwgW107XG5cbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRoaXMuYmxvY2tzW2tleV0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IHNjb3BlcyA9ICh0aGlzLmJsb2NrX3Njb3BlcyAmJiB0aGlzLmJsb2NrX3Njb3Blc1trZXldKSB8fCBbXTtcbiAgICAgICAgICAgICAgICBsZXQgY3VyX3Njb3BlID0gbnVsbCwgbnVtID0gMDtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGI9MDsgYiA8IHRoaXMuYmxvY2tzW2tleV0ubGVuZ3RoOyBiKyspIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ291bnQgYmxvY2tzIHJlbGF0aXZlIHRvIGN1cnJlbnQgc2NvcGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3Blc1tiXSAhPT0gY3VyX3Njb3BlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJfc2NvcGUgPSBzY29wZXNbYl07XG4gICAgICAgICAgICAgICAgICAgICAgICBudW0gPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgYmxvY2tzW2tleV0ucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2U6IHRoaXMuYmxvY2tzW2tleV1bYl0sXG4gICAgICAgICAgICAgICAgICAgICAgICBudW0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZTogY3VyX3Njb3BlIHx8IHRoaXMubmFtZVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBudW0rKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBhZGRyZXNzI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AgICAgICAgICBpZiAoIWluamVjdCkge1xuICAgICAgICAgICAgICAgICAgICBpbmplY3QgPSBHTFNMLmRlZmluZVVuaWZvcm0obmFtZSwgdW5pZm9ybXNbbmFtZV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2cudHJhY2UoYFByb2dyYW0gJHt0aGlzLm5hbWV9OiAke25hbWV9IG5vdCBkZWZpbmVkIGluIHZlcnRleCBzaGFkZXIsIGluamVjdGluZzogJyR7aW5qZWN0fSdgKTtcbiAgICAgICAgICAgICAgICB2c19pbmplY3Rpb25zLnB1c2goaW5qZWN0KTtcblxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQ2hlY2sgZnJhZ21lbnQgc2hhZGVyXG4gICAgICAgICAgICBpZiAoIUdMU0wuaXNVbmlmb3JtRGVmaW5lZChuYW1lLCBmcykgJiYgR0xTTC5pc1N5bWJvbFJlZmVyZW5jZWQobmFtZSwgZnMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFpbmplY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5qZWN0ID0gR0xTTC5kZWZpbmVVbmlmb3JtKG5hbWUsIHVuaWZvcm1zW25hbWVdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbG9nLnRyYWNlKGBQcm9ncmFtICR7dGhpcy5uYW1lfTogJHtuYW1lfSBub3QgZGVmaW5lZCBpbiBmcmFnbWVudCBzaGFkZXIsIGluamVjdGluZzogJyR7aW5qZWN0fSdgKTtcbiAgICAgICAgICAgICAgICBmc19pbmplY3Rpb25zLnB1c2goaW5qZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEluamVjdCBtaXNzaW5nIHVuaWZvcm1zXG4gICAgICAgIC8vIE5PVEU6IHRoZXNlIGFyZSBpbmplY3RlZCBhdCB0aGUgdmVyeSB0b3Agb2YgdGhlIHNoYWRlcnMsIGV2ZW4gYmVmb3JlIGF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0Y2hbMl0sXG4gICAgICAgICAgICAgICAgICAgIG51bTogbWF0Y2hbM11cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbWF0Y2ggPSBsaW5lLm1hdGNoKC9cXC9cXC8gdGFuZ3JhbS1ibG9jay1lbmQ6IChbQS1aYS16MC05Xy1dKyksIChbQS1aYS16MC05Xy1dKyksIChcXGQrKS8pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCAmJiBtYXRjaC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGJsb2NrID0gbnVsbDsgLy8gY2xlYXIgY3VycmVudCBibG9ja1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gdXBkYXRlIGxpbmUgIyBhbmQgY29udGVudFxuICAgICAgICAgICAgaWYgKGJsb2NrKSB7XG4gICAgICAgICAgICAgICAgLy8gaW5pdCB0byAtMSBzbyB0aGF0IGxpbmUgMCBpcyBmaXJzdCBhY3R1YWwgbGluZSBvZiBibG9jayBjb2RlLCBhZnRlciBjb21tZW50IG1hcmtlclxuICAgICAgICAgICAgICAgIGJsb2NrLmxpbmUgPSAoYmxvY2subGluZSA9PSBudWxsKSA/IC0xIDogYmxvY2subGluZSArIDE7XG4gICAgICAgICAgICAgICAgYmxvY2suc291cmNlID0gbGluZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYmxvY2s7XG4gICAgfVxuXG4gICAgLy8gUmV0dXJucyBsaXN0IG9mIGF2YWlsYWJsZSBleHRlbnNpb25zIGZyb20gdGhvc2UgcmVxdWVzdGVkXG4gICAgLy8gU2V0cyBpbnRlcm5hbCAjZGVmaW5lcyBpbmRpY2F0aW5nIGF2YWlsYWJpbGl0eSBvZiBlYWNoIHJlcXVlc3RlZCBleHRlbnNpb25cbiAgICBjaGVja0V4dGVuc2lvbnM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AgICAgICAgdmVjNCBhbWJpZW50O1xcblwiICtcblwiICAgICAgICAjaWZkZWYgVEFOR1JBTV9NQVRFUklBTF9BTUJJRU5UX1RFWFRVUkVcXG5cIiArXG5cIiAgICAgICAgICAgIHZlYzMgYW1iaWVudFNjYWxlO1xcblwiICtcblwiICAgICAgICAjZW5kaWZcXG5cIiArXG5cIiAgICAjZW5kaWZcXG5cIiArXG5cIlxcblwiICtcblwiICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX0RJRkZVU0VcXG5cIiArXG5cIiAgICAgICAgdmVjNCBkaWZmdXNlO1xcblwiICtcblwiICAgICAgICAjaWZkZWYgVEFOR1JBTV9NQVRFUklBTF9ESUZGVVNFX1RFWFRVUkVcXG5cIiArXG5cIiAgICAgICAgICAgIHZlYzMgZGlmZnVzZVNjYWxlO1xcblwiICtcblwiICAgICAgICAjZW5kaWZcXG5cIiArXG5cIiAgICAjZW5kaWZcXG5cIiArXG5cIlxcblwiICtcblwiICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX1NQRUNVTEFSXFxuXCIgK1xuXCIgICAgICAgIHZlYzQgc3BlY3VsYXI7XFxuXCIgK1xuXCIgICAgICAgIGZsb2F0IHNoaW5pbmVzcztcXG5cIiArXG5cIiAgICAgICAgI2lmZGVmIFRBTkdSQU1fTUFURVJJQUxfU1BFQ1VMQVJfVEVYVFVSRVxcblwiICtcblwiICAgICAgICAgICAgdmVjMyBzcGVjdWxhclNjYWxlO1xcblwiICtcblwiICAgICAgICAjZW5kaWZcXG5cIiArXG5cIiAgICAjZW5kaWZcXG5cIiArXG5cIlxcblwiICtcblwiXFxuXCIgK1xuXCIgICAgI2lmZGVmIFRBTkdSQU1fTUFURVJJQUxfTk9STUFMX1RFWFRVUkVcXG5cIiArXG5cIiAgICAgICAgdmVjMyBub3JtYWxTY2FsZTtcXG5cIiArXG5cIiAgICAgICAgZmxvYXQgbm9ybWFsQW1vdW50O1xcblwiICtcblwiICAgICNlbmRpZlxcbl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mLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCIgICAgICAgICAgICAgICAgYXR0ZW51YXRpb24gPSAxLjAtZCpkO1xcblwiICtcblwiICAgICAgICAgICAgI2Vsc2VcXG5cIiArXG5cIiAgICAgICAgICAgICAgICAvLyBJZiBubyBvdXRlciBpcyBwcm92aWRlIGJlaGF2ZXMgbGlrZTpcXG5cIiArXG5cIiAgICAgICAgICAgICAgICAvLyBodHRwczovL2ltZG9pbmdpdHdyb25nLndvcmRwcmVzcy5jb20vMjAxMS8wMS8zMS9saWdodC1hdHRlbnVhdGlvbi9cXG5cIiArXG5cIiAgICAgICAgICAgICAgICBmbG9hdCBkID0gbWF4KDAuMCxkaXN0LVJpbikvUmluKzEuMDtcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBhdHRlbnVhdGlvbiA9IGNsYW1wKDEuMC9kLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCIgICAgICAgICAgICAjZW5kaWZcXG5cIiArXG5cIiAgICAgICAgI2Vsc2VcXG5cIiArXG5cIiAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX1BPSU5UTElHSFRfQVRURU5VQVRJT05fT1VURVJfUkFESVVTXFxuXCIgK1xuXCIgICAgICAgICAgICAgICAgZmxvYXQgZCA9IGNsYW1wKGRpc3QvX2xpZ2h0Lm91dGVyUmFkaXVzLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCIgICAgICAgICAgICAgICAgYXR0ZW51YXRpb24gPSAxLjAtZCpkO1xcblwiICtcblwiICAgICAgICAgICAgI2Vsc2VcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBhdHRlbnVhdGlvbiA9IDEuMDtcXG5cIiArXG5cIiAgICAgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICAgICAjZW5kaWZcXG5cIiArXG5cIiAgICAjZW5kaWZcXG5cIiArXG5cIlxcblwiICtcblwiICAgIC8vIENvbXB1dGVyIGFjY3VtdWxhdG9yc1xcblwiICtcblwiICAgIGxpZ2h0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0d3Jvbmcud29yZHByZXNzLmNvbS8yMDExLzAxLzMxL2xpZ2h0LWF0dGVudWF0aW9uL1xcblwiICtcblwiICAgICAgICAgICAgZmxvYXQgZCA9IG1heCgwLjAsZGlzdC1SaW4pL1JpbisxLjA7XFxuXCIgK1xuXCIgICAgICAgICAgICBhdHRlbnVhdGlvbiA9IGNsYW1wKDEuMC8ocG93KGQsZSkpLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCIgICAgICAgICNlbmRpZlxcblwiICtcblwiICAgICNlbHNlXFxuXCIgK1xuXCIgICAgICAgIGZsb2F0IFJpbiA9IDAuMDtcXG5cIiArXG5cIlxcblwiICtcblwiICAgICAgICAjaWZkZWYgVEFOR1JBTV9QT0lOVExJR0hUX0FUVEVOVUFUSU9OX0lOTkVSX1JBRElVU1xcblwiICtcblwiICAgICAgICAgICAgUmluID0gX2xpZ2h0LmlubmVyUmFkaXVzO1xcblwiICtcblwiICAgICAgICAgICAgI2lmZGVmIFRBTkdSQU1fUE9JTlRMSUdIVF9BVFRFTlVBVElPTl9PVVRFUl9SQURJVVNcXG5cIiArXG5cIiAgICAgICAgICAgICAgICBmbG9hdCBSZGlmZiA9IF9saWdodC5vdXRlclJhZGl1cy1SaW47XFxuXCIgK1xuXCIgICAgICAgICAgICAgICAgZmxvYXQgZCA9IGNsYW1wKG1heCgwLjAsZGlzdC1SaW4pL1JkaWZmLCAwLjAsIDEuMCk7XFxuXCIgK1xuXCIgICAgICAgICAgICAgICAgYXR0ZW51YXRpb24gPSAxLjAtZCpkO1xcblwiICtcblwiICAgICAgICAgICAgI2Vsc2VcXG5cIiArXG5cIiAgICAgICAgICAgICAgICAvLyBJZiBubyBvdXRlciBpcyBwcm92aWRlIGJlaGF2ZXMgbGlrZTpcXG5cIiArXG5cIiAgICAgICAgICAgICAgICAvLyBodHRwczovL2ltZG9pbmdpdHdyb25nLndvcmRwcmVzcy5jb20vMjAxMS8wMS8zMS9saWdodC1hdHRlbnVhdGlvbi9cXG5cIiAr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AgIGlmICghdGhpcy52YWxpZCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuZ2wuZGVsZXRlVGV4dHVyZSh0aGlzLnRleHR1cmUpO1xuICAgICAgICB0aGlzLnRleHR1cmUgPSBudWxsO1xuICAgICAgICBkZWxldGUgdGhpcy5kYXRhO1xuICAgICAgICB0aGlzLmRhdGEgPSBudWxsO1xuICAgICAgICBkZWxldGUgVGV4dHVyZS50ZXh0dXJlc1t0aGlzLm5hbWVdO1xuICAgICAgICB0aGlzLnZhbGlkID0gZmFsc2U7XG4gICAgICAgIGxvZy50cmFjZShgZGVzdHJveWluZyBUZXh0dXJlICR7dGhpcy5uYW1lfWApO1xuICAgIH1cblxuICAgIGJpbmQodW5pdCkge1xuICAgICAgICBpZiAoIXRoaXMudmFsaWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZW9mIHVuaXQgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICBpZiAoVGV4dHVyZS5hY3RpdmVVbml0ICE9PSB1bml0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5nbC5hY3RpdmVUZXh0dXJlKHRoaXMuZ2wuVEVYVFVSRTAgKyB1bml0KTtcbiAgICAgICAgICAgICAgICBUZXh0dXJlLmFjdGl2ZVVuaXQgPSB1bml0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChUZXh0dXJlLmFjdGl2ZVRleHR1cmUgIT09IHRoaXMudGV4dHVyZSkge1xuICAgICAgICAgICAgdGhpcy5nbC5iaW5kVGV4dHVyZSh0aGlzLmdsLlRFWFRVUkVfMkQsIHRoaXMudGV4dHVyZSk7XG4gICAgICAgICAgICBUZXh0dXJlLmFjdGl2ZVRleHR1cmUgPSB0aGlzLnRleHR1cmU7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBsb2FkKG9wdGlvbnMgPSB7fSkge1xuICAgICAgIC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J3cml0dGVuIHdoZW4gZWxlbWVudCBpcyBsb2FkZWQgYmVsb3cpXG4gICAgICAgIHRoaXMuc291cmNlID0gdGhpcy51cmw7XG4gICAgICAgIHRoaXMuc291cmNlX3R5cGUgPSAndXJsJztcblxuICAgICAgICB0aGlzLmxvYWRpbmcgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBsZXQgaW1hZ2UgPSBuZXcgSW1hZ2UoKTtcbiAgICAgICAgICAgIGltYWdlLm9ubG9hZCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEVsZW1lbnQoaW1hZ2UsIG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICBsb2cud2FybihgVGV4dHVyZSAnJHt0aGlzLm5hbWV9JzogZmFpbGVkIHRvIGxvYWQgdXJsOiAnJHt0aGlzLnNvdXJjZX0nYCwgZSwgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIFRleHR1cmUudHJpZ2dlcignd2FybmluZycsIHsgbWVzc2FnZTogYEZhaWxlZCB0byBsb2FkIHRleHR1cmUgZnJvbSAke3RoaXMuc291cmNlfWAsIGVycm9yOiBlLCB0ZXh0dXJlOiBvcHRpb25zIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJlc29sdmUodGhpcyk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaW1hZ2Uub25lcnJvciA9IGUgPT4ge1xuICAgICAgICAgICAgICAgIC8vIFdhcm4gYW5kIHJlc29sdmUgb24gZXJyb3JcbiAgICAgICAgICAgICAgICBsb2cud2FybihgVGV4dHVyZSAnJHt0aGlzLm5hbWV9JzogZmFpbGVkIHRvIGxvYWQgdXJsOiAnJHt0aGlzLnNvdXJjZX0nYCwgZSwgb3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biAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKG5hbWUubWFwKG4gPT4gVGV4dHVyZS5nZXRJbmZvKG4pKSk7XG4gICAgfVxuXG4gICAgLy8gR2V0IHNpbmdsZSB0ZXh0dXJlXG4gICAgdmFyIHRleCA9IFRleHR1cmUudGV4dHVyZXNbbmFtZV07XG4gICAgaWYgKHRleCkge1xuICAgICAgICAvLyBXYWl0IGZvciB0aGlzIHRleHR1cmUgdG8gZmluaXNoIGxvYWRpbmcsIG9yIHJldHVybiBpbW1lZGlhdGVseVxuICAgICAgICB2YXIgbG9hZGluZyA9IHRleC5sb2FkaW5nIHx8IFByb21pc2UucmVzb2x2ZSh0ZXgpO1xuICAgICAgICByZXR1cm4gbG9hZGluZy50aGVuKCgpID0+IHtcbiAgICAgICAgICAgIC8vIFJldHVybiBhIHN1YnNldCBvZiB0ZXh0dXJlIGluZm9cbiAgICAgICAgICAgIC8vIChjb21wYXRpYmxlIHcvc3RydWN0dXJlZCBjbG9uaW5nLCBzdWl0YWJsZSBmb3IgcGFzc2luZyB0byBhIHdvcmtlcilcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbmFtZTogdGV4Lm5hbWUsXG4gICAgICAgICAgICAgICAgd2lkdGg6IHRleC53aWR0aCxcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IHRleC5oZWlnaHQsXG4gICAgICAgICAgICAgICAgc3ByaXRlczogdGV4LnNwcml0ZXMsXG4gICAgICAgICAgICAgICAgdGV4Y29vcmRzOiB0ZXgudGV4Y29vcmRzLFxuICAgICAgICAgICAgICAgIHNpemVzOiB0ZXguc2l6ZXMsXG4gICAgICAgICAgICAgICAgZmlsdGVyaW5nOiB0ZXguZmlsdGVyaW5nLFxuICAgICAgICAgICAgICAgIHBvd2VyX29mXzI6IHRleC5wb3dlcl9vZl8yLFxuICAgICAgICAgICAgICAgIHZhbGlkOiB0ZXgudmFsaWRcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO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aXN0IG9mIHR5cGUgYW5kIG9mZnNldCBpbmZvIGFib3V0IGVhY2ggYXR0cmlidXRlIGNvbXBvbmVudFxuICAgICAgICB0aGlzLmluZGV4ID0ge307ICAgICAgICAvLyBsaW5lYXIgYnVmZmVyIGluZGV4IG9mIGVhY2ggYXR0cmlidXRlIGNvbXBvbmVudCwgZS5nLiB0aGlzLmluZGV4LnBvc2l0aW9uLnhcblxuICAgICAgICAvLyBDYWxjIHZlcnRleCBzdHJpZGVcbiAgICAgICAgdGhpcy5zdHJpZGUgPSAwO1xuXG4gICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgIGZvciAodmFyIGF0dHJpYiBvZiB0aGlzLmF0dHJpYnMpIHtcbiAgICAgICAgICAgIGF0dHJpYi5vZmZzZXQgPSB0aGlzLnN0cmlkZTtcbiAgICAgICAgICAgIGF0dHJpYi5ieXRlX3NpemUgPSBhdHRyaWIuc2l6ZTtcbiAgICAgICAgICAgIHZhciBzaGlmdCA9IDA7XG5cbiAgICAgICAgICAgIHN3aXRjaCAoYXR0cmliLnR5cGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIGdsLkZMT0FUOlxuICAgICAgICAgICAgICAgIGNhc2UgZ2wuSU5UOlxuICAgICAgICAgICAgICAgIGNhc2UgZ2wuVU5TSUdORURfSU5UOlxuICAgICAgICAgICAgICAgICAgICBhdHRyaWIuYnl0ZV9zaXplICo9IDQ7XG4gICAgICAgICAgICAgICAgICAgIHNoaWZ0ID0gMjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBnbC5TSE9SVDpcbiAgICAgICAgICAgICAgICBjYXNlIGdsLlVOU0lHTkVEX1NIT1JUOlxuICAgICAgICAgICAgICAgICAgICBhdHRyaWIuYnl0ZV9zaXplICo9IDI7XG4gICAgICAgICAgICAgICAgICAgIHNoaWZ0ID0gMTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5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ZWN0cyA9IHN0YXRlLm9iamVjdHNbcHJpb3JpdHldO1xuICAgICAgICAgICAgaWYgKCFzdHlsZV9vYmplY3RzKSB7IC8vIG5vIGxhYmVscyBhdCB0aGlzIHByaW9yaXR5LCBza2lwIHRvIG5leHRcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRm9yIGVhY2ggc3R5bGVcbiAgICAgICAgICAgIGZvciAobGV0IHN0eWxlIGluIHN0eWxlX29iamVjdHMpIHtcbiAgICAgICAgICAgICAgICBsZXQgb2JqZWN0cyA9IHN0eWxlX29iamVjdHNbc3R5bGVdO1xuICAgICAgICAgICAgICAgIGtlZXBbc3R5bGVdID0ga2VlcFtzdHlsZV0gfHwgW107XG5cbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG9iamVjdHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHsgbGFiZWwsIGxheW91dCB9ID0gb2JqZWN0c1tpXTsgLy8gVE9ETzogYGxhYmVsYCBzaG91bGQgYmUgZ2VuZXJpY1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIHRlc3QgdGhlIGxhYmVsIGZvciBpbnRlcnNlY3Rpb25zIHdpdGggb3RoZXIgbGFiZWxzIGluIHRoZSB0aWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICghbGF5b3V0LmNvbGxpZGUgfHwgIWxhYmVsLmRpc2NhcmQoYmJveGVzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgZm9yIHJlcGVhdHNcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaGVjayA9IFJlcGVhdEdyb3VwLmNoZWNrKGxhYmVsLCBsYXlvdXQsIHRpbGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoZWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nLnRyYWNlKGBkaXNjYXJkIGxhYmVsICcke2xhYmVsLnRleHR9JywgKG9uZV9wZXJfZ3JvdXA6ICR7Y2hlY2sub25lX3Blcl9ncm91cH0pLCBkaXN0ICR7TWF0aC5zcXJ0KGNoZWNrLmRpc3Rfc3EpL2xheW91dC51bml0c19wZXJfcGl4ZWx9IDwgJHtNYXRoLnNxcnQoY2hlY2sucmVwZWF0X2Rpc3Rfc3EpL2xheW91dC51bml0c19wZXJfcGl4ZWx9YCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZWdpc3RlciBhcyBwbGFjZWQgZm9yIGZ1dHVyZSByZXBlYXQgY3VsbGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgUmVwZWF0R3JvdXAuYWRkKGxhYmVsLCBsYXlvdXQsIHRpbGUpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbC5hZGQoYmJveGVzKTsgLy8gYWRkIGxhYmVsIHRvIGN1cnJlbnRseSB2aXNpYmxlIHNldFxuICAgICAgICAgICAgICAgICAgICAgICAga2VlcFtzdHlsZV0ucHVzaChvYmplY3RzW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChsYXlvdXQuY29sbGlkZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nLnRyYWNlKGBkaXNjYXJkIGxhYmVsICcke2xhYmVsLnRleHR9JyBkdWUgdG8gY29sbGlzaW9uYCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBkZWxldGUgdGhpcy50aWxlc1t0aWxlXTtcbiAgICAgICAgc3RhdGUucmVzb2x2ZSgpO1xuICAgIH1cblxufTtcbiIsImltcG9ydCBib3hJbnRlcnNlY3QgZnJvbSAnYm94LWludGVyc2Vjd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GlzaW9uIGlmIG5vIHJvdGF0aW9uXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMub2JiLmFuZ2xlID09PSAwICYmIG9iYnNbal0uYW5nbGUgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLnRyYWNlKCdjb2xsaXNpb246IHNraXAgbmFycm93IHBoYXNlIGNvbGxpZGUgYmVjYXVzZSBuZWl0aGVyIGlzIHJvdGF0ZWQnLCB0aGlzLm9wdGlvbnMuaWQsIHRoaXMsIHRoaXMub2JiLCBvYmJzW2pdKTtcbiAgICAgICAgICAgICAgICAgICAgaW50ZXJzZWN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gTmFycm93IHBoYXNlXG4gICAgICAgICAgICAgICAgaWYgKE9CQi5pbnRlcnNlY3QodGhpcy5vYmIsIG9iYnNbal0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy50cmFjZSgnY29sbGlzaW9uOiBuYXJyb3cgcGhhc2UgY29sbGlkZScsIHRoaXMub3B0aW9ucy5pZCwgdGhpcywgdGhpcy5vYmIsIG9iYnNbal0pO1xuICAgICAgICAgICAgICAgICAgICBpbnRlcnNlY3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW50ZXJzZWN0O1xuICAgIH1cblxuICAgIC8vIEFkZCB0aGlzIGxhYmVsJ3MgYm91bmRpbmcgYm94IHRvIHRoZSBwcm92aWRlZCBzZXRcbiAgICBhZGQgKGJib3hlcykge1xuICAgICAgICBiYm94ZXMuYWFiYi5wdXNoKHRoaXMuYWFiYik7XG4gICAgICAgIGJib3hlcy5vYmIucHVzaCh0aGlzLm9iYik7XG4gICAgfVxuXG4gICAgLy8gY2hlY2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GRpc3RhbmNlIGZyb20gbmV3IG9iamVjdCB0byBvYmplY3RzIGFscmVhZHkgaW4gZ3JvdXBcbiAgICAgICAgbGV0IHAxID0gb2JqLnBvc2l0aW9uO1xuICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCB0aGlzLnBvc2l0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbGV0IHAyID0gdGhpcy5wb3NpdGlvbnNbaV07XG4gICAgICAgICAgICBsZXQgZHggPSBwMVswXSAtIHAyWzBdO1xuICAgICAgICAgICAgbGV0IGR5ID0gcDFbMV0gLSBwMlsxXTtcbiAgICAgICAgICAgIGxldCBkaXN0X3NxID0gZHggKiBkeCArIGR5ICogZHk7XG5cbiAgICAgICAgICAgIC8vIEZvdW5kIGFuIGV4aXN0aW5nIG9iamVjdCB3aXRoaW4gYWxsb3dlZCBkaXN0YW5jZVxuICAgICAgICAgICAgaWYgKGRpc3Rfc3EgPCB0aGlzLnJlcGVhdF9kaXN0X3NxKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZGlzdF9zcSxcbiAgICAgICAgICAgICAgICAgICAgcmVwZWF0X2Rpc3Rfc3E6IHRoaXMucmVwZWF0X2Rpc3Rfc3FcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gQWRkIG9iamVjdCB0byB0aGlzIGdyb3VwXG4gICAgYWRkIChvYmopIHtcbiAgICAgICAgLy8gb25seSBzdG9yZSBvYmplY3QncyBwb3NpdGlvbiwgdG8gc2F2ZSBzcGFjZSAvIHByZXZlbnQgdW5uZWNlc3NhcnkgcmVmZXJlbmNlc1xuICAgICAgICBpZiAob2JqICYmIG9iai5wb3NpdGlvbikge1xuICAgICAgICAgICAgdGhpcy5wb3NpdGlvbnMucHVzaChvYmoucG9zaXRpb24pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gU3RhdGljIG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QmFzZUNsYXNzID09PSBMLlRpbGVMYXllcikge1xuICAgICAgICAgICAgbGF5ZXJDbGFzc0NvbmZpZy5fYWRkVGlsZSA9IGZ1bmN0aW9uKCl7fTtcbiAgICAgICAgICAgIGxheWVyQ2xhc3NDb25maWcuX3JlbW92ZVRpbGUgPSBmdW5jdGlvbigpe307XG4gICAgICAgIH1cblxuICAgICAgICAvLyBEZWZpbmUgY3VzdG9tIGxheWVyIG1ldGhvZHNcbiAgICAgICAgT2JqZWN0LmFzc2lnbihsYXllckNsYXNzQ29uZmlnLCB7XG5cbiAgICAgICAgICAgIGluaXRpYWxpemU6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgLy8gRGVmYXVsdHNcbiAgICAgICAgICAgICAgICBvcHRpb25zLnNob3dEZWJ1ZyA9ICghb3B0aW9ucy5zaG93RGVidWcgPyBmYWxzZSA6IHRydWUpO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMud2hlZWxEZWJvdW5jZVRpbWUgPSBvcHRpb25zLndoZWVsRGVib3VuY2VUaW1lIHx8IDQwO1xuXG4gICAgICAgICAgICAgICAgTC5zZXRPcHRpb25zKHRoaXMsIG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgIHRoaXMuY3JlYXRlU2NlbmUoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmhvb2tzID0ge307XG4gICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgLy8gRm9yY2UgbGVhZmxldCB6b29tIGFuaW1hdGlvbnMgb2ZmXG4gICAgICAgICAgICAgICAgdGhpcy5fem9vbUFuaW1hdGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmRlYm91bmNlVmlld1Jlc2V0ID0gVXRpbHMuZGVib3VuY2UoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9tYXAuZmlyZSgnem9vbWVuZCcpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9tYXAuZmlyZSgnbW92ZWVuZCcpO1xuICAgICAgICAgICAgICAgIH0sIHRoaXMub3B0aW9ucy53aGVlbERlYm91bmNlVGltZSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBjcmVhdGVTY2VuZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUgPSBTY2VuZS5jcmVhdGUoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy5zY2VuZSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgbnVtV29ya2VyczogdGhpcy5vcHRpb25zLm51bVdvcmtlcnMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmVVcGRhdGU6IHRoaXMub3B0aW9ucy5wcmVVcGRhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3N0VXBkYXRlOiB0aGlzLm9wdGlvbnMucG9zdFVwZGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVvdXNab29tOiAoTGVhZmxldExheWVyLmxlYWZsZXRWZXJzaW9uID09PSAnMS54JyksXG4gICAgICAgICAgICAgICAgICAgICAgICBoaWdoRGVuc2l0eURpc3BsYXk6IHRoaXMub3B0aW9ucy5oaWdoRGVuc2l0eURpc3BsYXksXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dMZXZlbDogdGhpcy5vcHRpb25zLmxvZ0xldmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWR2YW5jZWQgb3B0aW9uLCBhcHAgd2lsbCBoYXZlIHRvIG1hbnVhbGx5IGNhbGxlZCBzY2VuZS51cGRhdGUoKSBwZXIgZnJhbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVSZW5kZXJMb29wOiB0aGlzLm9wdGlvbnMuZGlzYWJsZVJlbmRlckxvb3AsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhZHZhbmNlZCBvcHRpb24sIHdpbGwgcmVxdWlyZSBsaWJyYXJ5IHRvIGJlIHNlcnZlZCBhcyBzYW1lIGhvc3QgYXMgcGFnZVxuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dDcm9zc0RvbWFpbldvcmtlcnM6IHRoaXMub3B0aW9ucy5hbGxvd0Nyb3NzRG9tYWluV29ya2Vyc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIC8vIEZpbmlzaCBpbml0aWFsaXppbmcgc2NlbmUgYW5kIHNldHVwIGV2ZW50cyB3aGVuIGxheWVyIGlzIGFkZGVkIHRvIG1hcFxuICAgICAgICAgICAgb25BZGQ6IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuc2NlbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVTY2VuZSgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxheWVyQmFzZUNsYXNzLnByb3RvdHlwZS5vbkFkZC5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5ob29rcy5yZXNpemUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVNpemUoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbWFwLm9uKCdyZXNpemUnLCB0aGlzLmhvb2tzLnJlc2l6ZSk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmhvb2tzLm1vdmUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl91cGRhdGluZ190YW5ncmFtKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZpZXcgPSBtYXAuZ2V0Q2VudGVyKCk7XG4gICAgICAgICAgICAgICAgICAgIHZpZXcuem9vbSA9IE1hdGgubWluKG1hcC5nZXRab29tKCksIG1hcC5nZXRNYXhab29tKCkgfHwgR2VvLmRlZmF1bHRfbWF4X3pvb20pO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuc2V0Vmlldyh2aWV3KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5pbW1lZGlhdGVSZWRyYXcoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXZlcnNlVHJhbnNmb3JtKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG1hcC5vbignbW92ZScsIHRoaXMuaG9va3MubW92ZSk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmhvb2tzLnpvb21zdGFydCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLnN0YXJ0Wm9vbSgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBtYXAub24oJ3pvb21zdGFydCcsIHRoaXMuaG9va3Muem9vbXN0YXJ0KTtcblxuICAgICAgICAgICAgICAgIHRoaXMuaG9va3MuZHJhZ3N0YXJ0ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLnBhbm5pbmcgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbWFwLm9uKCdkcmFnc3RhcnQnLCB0aGlzLmhvb2tzLmRyYWdzdGFydCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmhvb2tzLmRyYWdlbmQgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUucGFubmluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbWFwLm9uKCdkcmFnZW5kJywgdGhpcy5ob29rcy5kcmFnZW5kKTtcblxuICAgICAgICAgICAgICAgIC8vIEZvcmNlIGxlYWZsZXQgem9vbSBhbmltYXRpb25zIG9mZlxuICAgICAgICAgICAgICAgIG1hcC5fem9vbUFuaW1hdGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAvLyBNb2RpZnkgZGVmYXVsdCBsZWFmbGV0IHNjcm9sbCB3aGVlbCBiZWhhdmlvclxuICAgICAgICAgICAgICAgIHRoaXMubW9kaWZ5U2Nyb2xsV2hlZWxCZWhhdmlvcihtYXApO1xuXG4gICAgICAgICAgICAgICAgLy8gQWRkIEdMIGNhbnZhcyB0byBsYXllciBjb250YWluZXJcbiAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLmNvbnRhaW5lciA9IHRoaXMuZ2V0Q29udGFpbmVyKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBJbml0aWFsIHZpZXdcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVZpZXcoKTtcblxuICAgICAgICAgICAgICAgIC8vIFN1YnNjcmliZSB0byB0YW5ncmFtIGV2ZW50c1xuICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuc3Vic2NyaWJlKHtcbiAgICAgICAgICAgICAgICAgICAgbW92ZTogdGhpcy5vblRhbmdyYW1WaWV3VXBkYXRlLmJpbmQodGhpcylcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFVzZSBsZWFmbGV0J3MgZXhpc3RpbmcgZXZlbnQgc3lzdGVtIGFzIHRoZSBjYWxsYmFjayBtZWNoYW5pc21cbiAgICAgICAgICAgICAgICB0aGlzLnNjZW5lLmxvYWQoKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IHRydWU7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVTaXplKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlVmlldygpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJldmVyc2VUcmFuc2Zvcm0oKTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5maXJlKCdpbml0Jyk7XG4gICAgICAgICAgICAgICAgfSkuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmZpcmUoJ2Vycm9yJywgZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgb25SZW1vdmU6IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgICAgICAgICBsYXllckJhc2VDbGFzcy5wcm90b3R5cGUub25SZW1vdmUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcblxuICAgICAgICAgICAgICAgIG1hcC5vZmYoJ3Jlc2l6ZScsIHRoaXMuaG9va3MucmVzaXplKTtcbiAgICAgICAgICAgICAgICBtYXAub2ZmKCdtb3ZlJywgdGhpcy5ob29rcy5tb3ZlKTtcbiAgICAgICAgICAgICAgICBtYXAub2ZmKCd6b29tc3RhcnQnLCB0aGlzLmhvb2tzLnpvb21zdGFydCk7XG4gICAgICAgICAgICAgICAgbWFwLm9mZignZHJhZ3N0YXJ0JywgdGhpcy5ob29rcy5kcmFnc3RhcnQpO1xuICAgICAgICAgICAgICAgIG1hcC5vZmYoJ2RyYWdlbmQnLCB0aGlzLmhvb2tzLmRyYWdlbmQpO1xuICAgICAgICAgICAgICAgIHRoaXMuaG9va3MgPSB7fTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNjZW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuZGVzdHJveSgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjZW5lID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBjcmVhdGVUaWxlOiBmdW5jdGlvbiAoY29vcmRzKSB7XG4gICAgICAgICAgICAgICAgdmFyIGtleSA9IGNvb3Jkcy54ICsgJy8nICsgY29vcmRzLnkgKyAnLycgKyBjb29yZHMuejtcbiAgICAgICAgICAgICAgICB2YXIgZGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gICAgICAgICAgICAgICAgZGl2LnNldEF0dHJpYnV0ZSgnZGF0YS10aWxlLWtleScsIGtleSk7XG4gICAgICAgICAgICAgICAgZGl2LnN0eWxlLndpZHRoID0gJzI1NnB4JztcbiAgICAgICAgICAgICAgICBkaXYuc3R5bGUuaGVpZ2h0ID0gJzI1NnB4JztcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMuc2hvd0RlYnVnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZWJ1Z19vdmVybGF5ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkudGV4dENvbnRlbnQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkuc3R5bGUucG9zaXRpb24gPSAnYWJzb2x1dGUnO1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Z19vdmVybGF5LnN0eWxlLmxlZnQgPSAwO1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Z19vdmVybGF5LnN0eWxlLnRvcCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX292ZXJsYXkuc3R5bGUuY29sb3IgPSAnd2hpdGUnO1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Z19vdmVybGF5LnN0eWxlLmZvbnRTaXplID0gJzE2cHgnO1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Z19vdmVybGF5LnN0eWxlLnRleHRPdXRsaW5lID0gJzFweCAjMDAwMDAwJztcbiAgICAgICAgICAgICAgICAgICAgZGVidWdfb3ZlcmxheS5zdHlsZS5wYWRkaW5nID0gJzhweCc7XG5cbiAgICAgICAgICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKGRlYnVnX292ZXJsYXkpO1xuICAgICAgICAgICAgICAgICAgICBkaXYuc3R5bGUuYm9yZGVyU3R5bGUgPSAnc29saWQnO1xuICAgICAgICAgICAgICAgICAgICBkaXYuc3R5bGUuYm9yZGVyQ29sb3IgPSAnd2hpdGUnO1xuICAgICAgICAgICAgICAgICAgICBkaXYuc3R5bGUuYm9yZGVyV2lkdGggPSAnMXB4JztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZGl2O1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgLy8gTW9kaWZ5IGxlYWZsZXQncyBkZWZhdWx0IHNjcm9sbCB3aGVlbCBiZWhhdmlvciB0byBoYXZlIGEgbXVjaCBtb3JlIHNlbnNpdHZlL2NvbnRpbnVvdXMgem9vbVxuICAgICAgICAgICAgLy8gTm90ZTogdGhpcyBzaG91bGQgYmUgZGVwcmVjYXRlZCBvbmNlIGxlYWZsZXQgY29udGludW91cyB6b29tIGlzIG1vcmUgd2lkZWx5IHVzZWQgYW5kIHRoZVxuICAgICAgICAgICAgLy8gZGVmYXVsdCBiZWhhdmlvciBpcyBwcmVzdW1hYmx5IGltcHJvdmVkXG4gICAgICAgICAgICBtb2RpZnlTY3JvbGxXaGVlbEJlaGF2aW9yOiBmdW5jdGlvbiAobWFwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2NlbmUuY29udGludW91c196b29tICYmIG1hcC5zY3JvbGxXaGVlbFpvb20gJiYgdGhpcy5vcHRpb25zLm1vZGlmeVNjcm9sbFdoZWVsICE9PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbGF5ZXIgPSB0aGlzO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZW5hYmxlZCA9IG1hcC5zY3JvbGxXaGVlbFpvb20uZW5hYmxlZCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWFwLnNjcm9sbFdoZWVsWm9vbS5kaXNhYmxlKCk7IC8vIGRpc2FibGUgYmVmb3JlIG1vZGlmeWluZ1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gbW9kaWZ5IHByb3RvdHlwZSBhbmQgY3VycmVudCBpbnN0YW5jZSwgc28gYWRkL3JlbW92ZSBob29rcyB3b3JrIG9uIGV4aXN0aW5nIHJlZmVyZW5jZXNcbiAgICAgICAgICAgICAgICAgICAgTC5NYXAuU2Nyb2xsV2hlZWxab29tLl9vbldoZWVsU2Nyb2xsID0gbWFwLnNjcm9sbFdoZWVsWm9vbS5fb25XaGVlbFNjcm9sbCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1vZGlmeSB0byBza2lwIGRlYm91bmNlLCBhcyBpdCBzZWVtcyB0byBjYXVzZSBhbmltYXRpb24tc3luYyBpc3N1ZXMgaW4gQ2hyb21lXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB3aXRoIFRhbmdyYW0gY29udGludW91cyByZW5kZXJpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RlbHRhICs9IEwuRG9tRXZlbnQuZ2V0V2hlZWxEZWx0YShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2xhc3RNb3VzZVBvcyA9IHRoaXMuX21hcC5tb3VzZUV2ZW50VG9Db250YWluZXJQb2ludChlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3BlcmZvcm1ab29tKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBMLkRvbUV2ZW50LnN0b3AoZSk7XG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgTC5NYXAuU2Nyb2xsV2hlZWxab29tLl9wZXJmb3JtWm9vbSA9IG1hcC5zY3JvbGxXaGVlbFpvb20uX3BlcmZvcm1ab29tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1hcCA9IHRoaXMuX21hcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSA9IHRoaXMuX2RlbHRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb20gPSBtYXAuZ2V0Wm9vbSgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBtYXAuc3RvcCgpOyAvLyBzdG9wIHBhbm5pbmcgYW5kIGZseSBhbmltYXRpb25zIGlmIGFueVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBOT1RFOiB0aGlzIGlzIHRoZSBvbmx5IHJlYWwgbW9kaWZpY2F0aW9uIHRvIGRlZmF1bHQgbGVhZmxldCBiZWhhdmlvclxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsdGEgLz0gNDA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhID0gTWF0aC5tYXgoTWF0aC5taW4oZGVsdGEsIDQpLCAtNCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSA9IG1hcC5fbGltaXRab29tKHpvb20gKyBkZWx0YSkgLSB6b29tO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9kZWx0YSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zdGFydFRpbWUgPSBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRlbHRhKSB7IHJldHVybjsgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWFwLm9wdGlvbnMuc2Nyb2xsV2hlZWxab29tID09PSAnY2VudGVyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcC5zZXRab29tKHpvb20gKyBkZWx0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcC5zZXRab29tQXJvdW5kKHRoaXMuX2xhc3RNb3VzZVBvcywgem9vbSArIGRlbHRhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXIuZGVib3VuY2VWaWV3UmVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWFwLnNjcm9sbFdoZWVsWm9vbS5lbmFibGUoKTsgLy8gcmUtZW5hYmxlIGFmdGVyIG1vZGlmeWluZ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdXBkYXRlVmlldzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciB2aWV3ID0gdGhpcy5fbWFwLmdldENlbnRlcigpO1xuICAgICAgICAgICAgICAgIHZpZXcuem9vbSA9IE1hdGgubWluKHRoaXMuX21hcC5nZXRab29tKCksIHRoaXMuX21hcC5nZXRNYXhab29tKCkgfHwgR2VvLmRlZmF1bHRfbWF4X3pvb20pO1xuICAgICAgICAgICAgICAgIHRoaXMuc2NlbmUuc2V0Vmlldyh2aWV3KTtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHVwZGF0ZVNpemU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2l6ZSA9IHRoaXMuX21hcC5nZXRTaXplKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zY2VuZS5yZXNpemVNYXAoc2l6ZS54LCBzaXplLnkpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgb25UYW5ncmFtVmlld1VwZGF0ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbWFwIHx8IHRoaXMuX3VwZGF0aW5nX3RhbmdyYW0pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGluZ190YW5ncmFtID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLl9tYXAuc2V0VmlldyhbdGhpcy5zY2VuZS5jZW50ZXIubGF0LCB0aGlzLnNjZW5lLmNlbnRlci5sbmddLCB0aGlzLnNjZW5lLnpvb20sIHsgYW5pbWF0ZTogZmFsc2UgfSk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXZlcnNlVHJhbnNmb3JtKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRpbmdfdGFuZ3JhbSA9IGZhbHNlO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgcmVuZGVyOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLnNjZW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAg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XNcbiAgICAgICAgICAgICAgICBjYWxjdWxhdGVNYXRlcmlhbChfZXllVG9Qb2ludCxfbm9ybWFsKTtcblxuICAgICAgICAgICAgICAgIC8vIFVuIHJvbGwgdGhlIGxvb3Agb2YgaW5kaXZpZHVhbCBsaWd0aHMgdG8gY2FsY3VsYXRlXG4gICAgICAgICAgICAgICAgJHtjYWxjdWxhdGVMaWdodHN9XG5cbiAgICAgICAgICAgICAgICAvLyAgRmluYWwgbGlnaHQgaW50ZW5zaXR5IGNhbGN1bGF0aW9uXG4gICAgICAgICAgICAgICAgdmVjNCBjb2xvciA9IHZlYzQoMC4wKTtcblxuICAgICAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX0VNSVNTSU9OXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gbWF0ZXJpYWwuZW1pc3Npb247XG4gICAgICAgICAgICAgICAgI2VuZGlmXG5cbiAgICAgICAgICAgICAgICAjaWZkZWYgVEFOR1JBTV9NQVRFUklBTF9BTUJJRU5UXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yICs9IGxpZ2h0X2FjY3VtdWxhdG9yX2FtYmllbnQgKiBfY29sb3IgKiBtYXRlcmlhbC5hbWJpZW50O1xuICAgICAgICAgICAgICAgICNlbHNlXG4gICAgICAgICAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX0RJRkZVU0VcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yICs9IGxpZ2h0X2FjY3VtdWxhdG9yX2FtYmllbnQgKiBfY29sb3IgKiBtYXRlcmlhbC5kaWZmdXNlO1xuICAgICAgICAgICAgICAgICAgICAjZW5kaWZcbiAgICAgICAgICAgICAgICAjZW5kaWZcblxuICAgICAgICAgICAgICAgICNpZmRlZiBUQU5HUkFNX01BVEVSSUFMX0RJRkZVU0VcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgKz0gbGlnaHRfYWNjdW11bGF0b3JfZGlmZnVzZSAqIF9jb2xvciAqIG1hdGVyaWFsLmRpZmZ1c2U7XG4gICAgICAgICAgICAgICAgI2VuZGlmXG5cbiAgICAgICAgICAgICAgICAjaWZkZWYgVEFOR1JBTV9NQVRFUklBTF9TUEVDVUxBUlxuICAgICAgICAgICAgICAgICAgICBjb2xvciArPSBsaWdodF9hY2N1bXVsYXRvcl9zcGVjdWxhciAqIG1hdGVyaWFsLnNwZWN1bGFyO1xuICAgICAgICAgICAgICAgICNlbmRpZlxuXG4gICAgICAgICAgICAgICAgLy8gQ2xhbXAgZmluYWwgY29sb3JcbiAgICAgICAgICAgICAgICBjb2xvciA9IGNsYW1wKGNvbG9yLCAwLjAsIDEuMCk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gY29sb3I7XG4gICAgICAgICAgICB9YDtcblxuICAgICAgICBTaGFkZXJQcm9ncmFtLmFkZEJsb2NrKExpZ2h0LmJsb2NrLCBjYWxjdWxhdGVGdW5jdGlvbik7XG4gICAgfVxuXG4gICAgLy8gQ29tbW9uIGluc3RhbmNlIGRlZmluaXRpb25cbiAgICBpbmplY3QgKCkge1xuICAgICAgICBsZXQgaW5zdGFuY2UgPSAgYFxuICAgICAgICAgICAgdW5pZm9ybSAke3RoaXMuc3RydWN0X25hbWV9IHVfJHt0aGlzLm5hbWV9O1xuICAgICAgICAgICAgJHt0aGlzLnN0cnVjdF9uYW1lfSAke3RoaXMubmFtZX07XG4gICAgICAgICAgICBgO1xuICAgICAgICBsZXQgYXNzaWduID0gYFxuICAgICAgICAgICAgJHt0aGlzLm5hbWV9ID0gdV8ke3RoaXMubmFtZX07XFxuXG4gICAgICAgIGA7XG5cbiAgICAgICAgU2hhZGVyUHJvZ3JhbS5hZGRCbG9jayhMaWdodC5ibG9jaywgaW5zdGFuY2UpO1xuICAgICAgICBTaGFkZXJQcm9ncmFtLmFkZEJsb2NrKCdzZXR1cCcsIGFzc2lnbik7XG4gICAgfVxuXG4gICAgLy8gVXBkYXRlIG1ldGhvZCBjYWxsZWQgb25jZSBw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biAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmc6IGNvbmZpZ1twcm9wXS5tYXBwaW5nIHx8ICdzcGhlcmVtYXAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGU6IEdMU0wuZXhwYW5kVmVjMyhjb25maWdbcHJvcF0uc2NhbGUgIT0gbnVsbCA/IGNvbmZpZ1twcm9wXS5zY2FsZSA6IDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgYW1vdW50OiBHTFNMLmV4cGFuZFZlYzQoY29uZmlnW3Byb3BdLmFtb3VudCAhPSBudWxsID8gY29uZmlnW3Byb3BdLmFtb3VudCA6IDEpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBjb25maWdbcHJvcF0gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXNbcHJvcF0gPSB7IGFtb3VudDogR0xTTC5leHBhbmRWZWM0KGNvbmZpZ1twcm9wXSkgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIGNvbmZpZ1twcm9wXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc1twcm9wXSA9IHsgYW1vdW50OiBTdHlsZVBhcnNlci5wYXJzZUNvbG9yKGNvbmZpZ1twcm9wXSkgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXNbcHJvcF0gPSBjb25maWdbcHJvcF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gRXh0cmEgc3BlY3VsYXIgcHJvcHNcbiAgICAgICAgaWYgKHRoaXMuc3BlY3VsYXIpIHtcbiAgICAgICAgICAgIHRoaXMuc3BlY3VsYXIuc2hpbmluZXNzID0gY29uZmlnLnNoaW5pbmVzcyA/IHBhcnNlRmxvYXQoY29uZmlnLnNoaW5pbmVzcykgOiAwLjI7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBOb3JtYWwgbWFwcGluZ1xuICAgICAgICBpZiAoY29uZmlnLm5vcm1hbCAhPSBudWxsKSB7XG4gICAgICAgICAgICB0aGlzLm5vcm1hbCA9IHtcbiAgICAgICAgICAgICAgICB0ZXh0dXJlOiBjb25maWcubm9ybWFsLnRleHR1cmUsXG4gICAgICAgICAgICAgICAgbWFwcGluZzogY29uZmlnLm5vcm1hbC5tYXBwaW5nIHx8ICd0cmlwbGFuYXInLFxuICAgICAgICAgICAgICAgIHNjYWxlOiBHTFNMLmV4cGFuZFZlYzMoY29uZmlnLm5vcm1hbC5zY2FsZSAhPSBudWxsID8gY29uZmlnLm5vcm1hbC5zY2FsZSA6IDEpLFxuICAgICAgICAgICAgICAgIGFtb3VudDogY29uZmlnLm5vcm1hbC5hbW91bnQgIT0gbnVsbCA/IGNvbmZpZy5ub3JtYWwuYW1vdW50IDogMVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIERldGVybWluZSBpZiBhIG1hdGVyaWFsIGNvbmZpZyBibG9jayBoYXMgc3VmZmljaWVudCBwcm9wZXJ0aWVzIHRvIGNyZWF0ZSBhIG1hdGVyaWFsXG4gICAgc3RhdGljIGlzVmFsaWQgKGNvbmZpZykge1xuICAgICAgICBpZiAoY29uZmlnID09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjb25maWcuZW1pc3Npb24gPT0gbnVsbCAmJlxuICAgICAgICAgICAgY29uZmlnLmFtYmllbnQgPT0gbnVsbCAmJlxuICAgICAgICAgICAgY29uZmlnLmRpZmZ1c2UgPT0gbnVsbCAmJlxuICAgICAgICAgICAgY29uZmlnLnNwZWN1bGFyID09IG51bGwpIHtcbiAgICAgICAgICA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nVsbCwgY29uZmlnX3BhdGggPSBudWxsKSB7XG4gICAgICAgIGlmICh0aGlzLmluaXRpYWxpemluZykge1xuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy51cGRhdGluZysrO1xuICAgICAgICB0aGlzLmluaXRpYWxpemVkID0gZmFsc2U7XG4gICAgICAgIHRoaXMuaW5pdGlhbGl6aW5nID0gdHJ1ZTtcblxuICAgICAgICAvLyBMb2FkIHNjZW5lIGRlZmluaXRpb24gKHNvdXJjZXMsIHN0eWxlcywgZXRjLiksIHRoZW4gY3JlYXRlIHN0eWxlcyAmIHdvcmtlcnNcbiAgICAgICAgcmV0dXJuIHRoaXMubG9hZFNjZW5lKGNvbmZpZ19zb3VyY2UsIGNvbmZpZ19wYXRoKVxuICAgICAgICAgICAgLnRoZW4oKCkgPT4gdGhpcy5jcmVhdGVXb3JrZXJzKCkpXG4gICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVDYW52YXMoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlc2V0RmVhdHVyZVNlbGVjdGlvbigpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLnRleHR1cmVfbGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50ZXh0dXJlX2xpc3RlbmVyID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlOiAoKSA9PiB0aGlzLmRpcnR5ID0gdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdhcm5pbmc6IChkYXRhKSA9PiB0aGlzLnRyaWdnZXIoJ3dhcm5pbmcnLCBPYmplY3QuYXNzaWduKHsgdHlwZTogJ3RleHR1cmVzJyB9LCBkYXRhKSlcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgVGV4dHVyZS5zdWJzY3JpYmUodGhpcy50ZXh0dXJlX2xpc3RlbmVyKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGlsZXMgYmVmb3JlIHJlYnVpbGRpbmdcbiAgICAgICAgICAgICAgICB0aGlzLnRpbGVfbWFuYWdlci5yZW1vdmVUaWxlcyh0aWxlID0+ICF0aWxlLnZpc2libGUpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZUNvbmZpZyh7IHJlYnVpbGQ6IHRydWUgfSk7XG4gICAgICAgICAgICB9KS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0aW5nLS07XG4gICAgICAgICAgICAgICAgdGhpcy5pbml0aWFsaXppbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLmluaXRpYWxpemVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLmxhc3RfdmFsaWRfY29uZmlnX3NvdXJjZSA9IHRoaXMuY29uZmlnX3NvdXJjZTtcbiAgICAgICAgICAgICAgICB0aGlzLmxhc3RfdmFsaWRfY29uZmlnX3BhdGggPSB0aGlzLmNvbmZpZ19wYXRoO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucmVuZGVyX2xvb3AgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0dXBSZW5kZXJMb29wKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucmVxdWVzdFJlZHJhdygpO1xuICAgICAgICB9KS5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICB0aGlzLmluaXRpYWxpemluZyA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy51cGRhdGluZyA9IDA7XG5cbiAgICAgICAgICAgIC8vIFJlcG9ydCBhbmQgcmV2ZXJ0IHRvIGxhc3QgdmFsaWQgY29uZmlnIGlmIGF2YWlsYWJsZVxuICAgICAgICAgICAgbGV0IHR5cGUsIG1lc3NhZ2U7XG4gICAgICAgICAgICBpZiAoZXJyb3IubmFtZSA9PT0gJ1lBTUxFeGNlcHRpb24nKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9ICd5YW1sJztcbiAgICAgICAgICAgICAgICBtZXNzYWdlID0gJ0Vycm9yIHBhcnNpbmcgc2NlbmUgWUFNTCc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBtb3JlIGVycm9yIHR5cGVzXG4gICAgICAgICAgICAgICAgbWVzc2FnZSA9ICdFcnJvciBpbml0aWFsaXppbmcgc2NlbmUnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy50cmlnZ2VyKCdlcnJvcicsIHsgdHlwZSwgbWVzc2FnZSwgZXJyb3IsIHVybDogdGhpcy5jb25maWdfc291cmNlIH0pO1xuXG4gICAgICAgICAgICBtZXNzYWdlID0gYFNjZW5lLmxvYWQoKSBmYWlsZWQgdG8gbG9hZCAke3RoaXMuY29uZmlnX3NvdXJjZX06ICR7ZXJyb3IubWVzc2FnZX1gO1xuICAgICAgICAgICAgaWYgKHRoaXMubGFzdF92YWxpZF9jb25maWdfc291cmNlKSB7XG4gICAgICAgICAgICAgICAgbG9nLndhcm4obWVzc2FnZSwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIGxvZy5pbmZvKGBTY2VuZS5sb2FkKCkgcmV2ZXJ0aW5nIHRvIGxhc3QgdmFsaWQgY29uZmlndXJhdGlvbmApO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmxvYWQodGhpcy5sYXN0X3ZhbGlkX2NvbmZpZ19zb3VyY2UsIHRoaXMubGFzdF92YWxpZF9jb25maWdfcGF0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsb2cuZXJyb3IobWVzc2FnZSwgZXJyb3IpO1xuICAgICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH0pO1xuICAg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pcy5zdHlsZXMgPSB7fTtcblxuICAgICAgICAgICAgdGhpcy5nbCA9IG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNvdXJjZXMgPSB7fTtcblxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLndvcmtlcnMpKSB7XG4gICAgICAgICAgICB0aGlzLndvcmtlcnMuZm9yRWFjaCgod29ya2VyKSA9PiB7XG4gICAgICAgICAgICAgICAgd29ya2VyLnRlcm1pbmF0ZSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB0aGlzLndvcmtlcnMgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy50aWxlX21hbmFnZXIuZGVzdHJveSgpO1xuICAgIH1cblxuICAgIGNyZWF0ZUNhbnZhcygpIHtcbiAgICAgICAgaWYgKHRoaXMuY2FudmFzKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNvbnRhaW5lciA9IHRoaXMuY29udGFpbmVyIHx8IGRvY3VtZW50LmJvZHk7XG4gICAgICAgIHRoaXMuY2FudmFzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnY2FudmFzJyk7XG4gICAgICAgIHRoaXMuY2FudmFzLnN0eWxlLnBvc2l0aW9uID0gJ2Fic29sdXRlJztcbiAgICAgICAgdGhpcy5jYW52YXMuc3R5bGUudG9wID0gMDtcbiAgICAgICAgdGhpcy5jYW52YXMuc3R5bGUubGVmdCA9IDA7XG5cbiAgICAgICAgLy8gRm9yY2UgdGFuZ3JhbSBjYW52YXMgdW5kZXJuZWF0aCBhbGwgbGVhZmxldCBsYXllcnMsIGFuZCBzZXQgYmFja2dyb3VuZCB0byB0cmFuc3BhcmVudFxuICAgICAgICB0aGlzLmNvbnRhaW5lci5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSAndHJhbnNwYXJlbnQnO1xuICAgICAgICB0aGlzLmNvbnRhaW5lci5hcHBlbmRD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blxuICAgICAgICB0aGlzLndvcmtlcnMgPSBbXTtcbiAgICAgICAgZm9yICh2YXIgaWQ9MDsgaWQgPCB0aGlzLm51bV93b3JrZXJzOyBpZCsrKSB7XG4gICAgICAgICAgICB2YXIgd29ya2VyID0gbmV3IFdvcmtlcih1cmwpO1xuICAgICAgICAgICAgdGhpcy53b3JrZXJzW2lkXSA9IHdvcmtlcjtcblxuICAgICAgICAgICAgd29ya2VyLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCB0aGlzLndvcmtlckxvZ01lc3NhZ2UuYmluZCh0aGlzKSk7XG4gICAgICAgICAgICBXb3JrZXJCcm9rZXIuYWRkV29ya2VyKHdvcmtlcik7XG5cbiAgICAgICAgICAgIGxvZy5kZWJ1ZyhgU2NlbmUubWFrZVdvcmtlcnM6IGluaXRpYWxpemluZyB3b3JrZXIgJHtpZH1gKTtcbiAgICAgICAgICAgIGxldCBfaWQgPSBpZDtcbiAgICAgICAgICAgIHF1ZXVlLnB1c2goV29ya2VyQnJva2VyLnBvc3RNZXNzYWdlKHdvcmtlciwgJ3NlbGYuaW5pdCcsIGlkLCB0aGlzLm51bV93b3JrZXJzLCBVdGlscy5kZXZpY2VfcGl4ZWxfcmF0aW8pLnRoZW4oXG4gICAgICAgICAgICAgICAgKGlkKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5kZWJ1ZyhgU2NlbmUubWFrZVdvcmtlcnM6IGluaXRpYWxpemVkIHdvcmtlciAke2lkfWApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaWQ7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLmVycm9yKGBTY2VuZS5tYWtlV29ya2VyczogZmFpbGVkIHRvIGluaXRpYWxpemUgd29ya2VyICR7X2lkfTpgLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm5leHRfd29ya2VyID0gMDtcbiAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKHF1ZXVlKTtcbiAgICB9XG5cbiAgICAvLyBSb3VuZCByb2JpbiBzZWxlY3Rpb24gb2YgbmV4dCB3b3JrZXJcbiAgICBuZXh0V29ya2VyKCkge1xuICAgICAgICB2YXIgd29ya2VyID0gdGhpcy53b3JrZXJzW3RoaXMubmV4dF93b3JrZXJdO1xuICAgICAgICB0aGlzLm5leHRfd29ya2VyID0gKHRoaXMubmV4dF93b3JrZXIgKyAxKSAlIHRoaXMud29ya2Vycy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB3b3JrZXI7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICAgIFNldCB0aGUgbWFwIHZpZXcsIGNhbiBiZSBwYXNzZWQgYW4gb2JqZWN0IHdpdGggbGF0L2xuZyBhbmQvb3Igem9vbVxuICAgICovXG4gICAgc2V0Vmlldyh7IGxuZywgbGF0LCB6b29tIH0gPSB7fSkge1xuICAgICAgICB2YXIgY2hhbmdlZCA9IGZhbHNlO1xuXG4gICAgICAgIC8vIFNldCBjZW50ZXJcbiAgICAgICAgaWYgKHR5cGVvZiBsbmcgPT09ICdudW1iZXInICYmIHR5cGVvZiBsYXQgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY2VudGVyIHx8IGxuZyAhPT0gdGhpcy5jZW50ZXIubG5nIHx8IGxhdCAhPT0gdGhpcy5jZW50ZXIubGF0KSB7XG4gICAgICAgICAgICAgICAgY2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5jZW50ZXIgPSB7IGxuZzogR2VvLndyYXBMbmcobG5nKSwgbGF0IH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTZXQgem9vbVxuICAgICAgICBpZiAodHlwZW9mIHpvb20gPT09ICdudW1iZXInICYmIHpvb20gIT09IHRoaXMuem9vbSkge1xuICAgICAgICAgICAgY2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLnNldFpvb20oem9vbSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY2hhbmdlZCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVCb3VuZHMoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY2hhbmdlZDtcbiAgICB9XG5cbiAgICBzdGFydFpvb20oKSB7XG4gICAgICAgIHRoaXMubGFzdF96b29tID0gdGhpcy56b29tO1xuICAgICAgICB0aGlzLnpvb21pbmcgPSB0cnVlO1xuICAgIH1cblxuICAgIC8vIENob29zZSB0aGUgYmFzZSB6b29tIGxldmVsIHRvIHVzZSBmb3IgYSBnaXZlbiBmcmFjdGlvbmFsIHpvb21cbiAgICBiYXNlWm9vbSh6b29tKSB7XG4gICAgICAgIHJldHVybiBNYXRoLmZsb29yKHpvb20pO1xuICAgIH1cblxuICAgIC8vIEZvciBhIGdpdmVuIHZpZXcgem9vbSwgd2hhdCB0aWxlIHpvb20gc2hvdWxkIGJlIGxvYWRlZD9cbiAgICB0aWxlWm9vbSh2aWV3X3pvb20pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZVpvb20odmlld196b29tKSAtIHRoaXMudGlsZV9zaW1wbGlmaWNhdGlvbl9sZXZlbDtcbiAgICB9XG5cbiAgICAvLyBGb3IgYSBnaXZlbiB0aWxlIHpvb20sIHdoYXQgc3R5bGUgem9vbSBzaG91bGQgYmUgdXNlZD9cbiAgICBzdHlsZVpvb20odGlsZV96b29tKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmJhc2Vab29tKHRpbGVfem9vbSkgKyB0aGlzLnRpbGVfc2ltcGxpZmljYXRpb25fbGV2ZWw7XG4gICAgfVxuXG4gICAgc2V0Wm9vbSh6b29tKSB7XG4gICAgICAgIHRoaXMuem9vbWluZyA9IGZhbHNlO1xuICAgICAgICBsZXQgdGlsZV96b29tID0gdGhpcy50aWxlWm9vbSh6b29tKTtcblxuICAgICAgICBpZiAoIXRoaXMuY29udGludW91c196b29tKSB7XG4gICAgICAgICAgICB6b29tID0gdGlsZV96b29tO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRpbGVfem9vbSAhPT0gdGhpcy50aWxlWm9vbSh0aGlzLmxhc3Rfem9vbSkpIHtcbiAgICAgICAgICAgIC8vIFJlbW92ZSB0aWxlcyBvdXRzaWRlIGN1cnJlbnQgem9vbSB0aGF0IGFyZSBzdGlsbCBsb2FkaW5nXG4gICAgICAgICAgICB0aGlzLnRpbGVfbWFuYWdlci5yZW1vdmVUaWxlcyh0aWxlID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGlsZS5sb2FkaW5nICYmIHRoaXMudGlsZVpvb20odGlsZS5jb29yZHMueikgIT09IHRpbGVfem9vbSkge1xuICAgICAgICAgICAgICAgICAgICBsb2cudHJhY2UoYHJlbW92ZWQgJHt0aWxlLmtleX0gKHdhcyBsb2FkaW5nLCBidXQgb3V0c2lkZSBjdXJyZW50IHpvb20pYCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5sYXN0X3pvb20gPSB0aGlzLnpvb207XG4gICAgICAgIHRoaXMuem9vbSA9IHpvb207XG4gICAgICAgIHRoaXMudGlsZV96b29tID0gdGlsZV96b29tO1xuXG4gICAgICAgIHRoaXMudXBkYXRlQm91bmRzKCk7XG5cbiAgICAgICAgdGhpcy5kaXJ0eSA9IHRydWU7XG4gICAgfVxuXG4gICAgdmlld1JlYWR5KCkge1xuICAgICAgICBpZiAodGhpcy5jc3Nfc2l6ZSA9PSBudWxsIHx8IHRoaXMuY2VudGVyID09IG51bGwgfHwgdGhpcy56b29tID09IG51bGwgfHwgT2JqZ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29tKTtcbiAgICAgICAgdGhpcy5jZW50ZXJfdGlsZSA9IEdlby50aWxlRm9yTWV0ZXJzKFt0aGlzLmNlbnRlcl9tZXRlcnMueCwgdGhpcy5jZW50ZXJfbWV0ZXJzLnldLCB6KTtcblxuICAgICAgICB0aGlzLmJvdW5kc19tZXRlcnMgPSB7XG4gICAgICAgICAgICBzdzoge1xuICAgICAgICAgICAgICAgIHg6IHRoaXMuY2VudGVyX21ldGVycy54IC0gdGhpcy52aWV3cG9ydF9tZXRlcnMueCAvIDIsXG4gICAgICAgICAgICAgICAgeTogdGhpcy5jZW50ZXJfbWV0ZXJzLnkgLSB0aGlzLnZpZXdwb3J0X21ldGVycy55IC8gMlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG5lOiB7XG4gICAgICAgICAgICAgICAgeDogdGhpcy5jZW50ZXJfbWV0ZXJzLnggKyB0aGlzLnZpZXdwb3J0X21ldGVycy54IC8gMixcbiAgICAgICAgICAgICAgICB5OiB0aGlzLmNlbnRlcl9tZXRlcnMueSArIHRoaXMudmlld3BvcnRfbWV0ZXJzLnkgLyAyXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy50aWxlX21hbmFnZXIudXBkYXRlVGlsZXNGb3JWaWV3KCk7XG5cbiAgICAgICAgdGhpcy50cmlnZ2VyKCdtb3ZlJyk7XG4gICAgICAgIHRoaXMuZGlydHkgPSB0cnVlO1xuICAgIH1cblxuICAgIGZpbmRWaXNpYmxlVGlsZUNvb3JkaW5hdGVzKHsgYnVmZmVyIH0gPSB7fSkge1xuICAgICAgICBpZiAoIXRoaXMuYm91bmRzX21ldGVycykge1xuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHogPSB0aGlzLnRpbGVab29tKHRoaXMuem9vbSk7XG4gICAgICAgIGxldCBzdyA9IEdlby50aWxlRm9yTWV0ZXJzKFt0aGlzLmJvdW5kc19tZXRlcnMuc3cueCw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Edlby50aWxlX3NpemUpICsgMikgLyAyKVxuICAgICAgICBdO1xuICAgICAgICBsZXQgc3R5bGVfem9vbSA9IHRoaXMudGlsZVpvb20odGhpcy56b29tKTtcblxuICAgICAgICB0aGlzLnRpbGVfbWFuYWdlci5yZW1vdmVUaWxlcyh0aWxlID0+IHtcbiAgICAgICAgICAgIC8vIElnbm9yZSB2aXNpYmxlIHRpbGVzXG4gICAgICAgICAgICBpZiAodGlsZS52aXNpYmxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBEaXNjYXJkIGlmIHRvbyBmYXIgZnJvbSBjdXJyZW50IHpvb21cbiAgICAgICAgICAgIGxldCB6ZGlmZiA9IHRpbGUuY29vcmRzLnogLSBzdHlsZV96b29tO1xuICAgICAgICAgICAgaWYgKE1hdGguYWJzKHpkaWZmKSA+IHRoaXMucHJlc2VydmVfdGlsZXNfd2l0aGluX3pvb20pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gSGFuZGxlIHRpbGVzIGF0IGRpZmZlcmVudCB6b29tc1xuICAgICAgICAgICAgbGV0IHp0cmFucyA9IE1hdGgucG93KDIsIHpkaWZmKTtcbiAgICAgICAgICAgIGxldCBjb29yZHMgPSB7XG4gICAgICAgICAgICAgICAgeDogTWF0aC5mbG9vcih0aWxlLmNvb3Jkcy54IC8genRyYW5zKSxcbiAgICAgICAgICAgICAgICB5OiBNYXRoLmZsb29yKHRpbGUuY29vcmRzLnkgLyB6dHJhbnMpXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAvLyBEaXNjYXJkIHRpbGVzIG91dHNpZGUgYW4gYXJlYSBzdXJyb3VuZGluZyB0aGUgdmlld3BvcnRcbiAgICAgICAgICAgIGlmIChNYXRoLmFicyhjb29yZHMueCAtIHRoaXMuY2VudGVyX3RpbGUueCkgLSB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2aWNlX3BpeGVsX3JhdGlvKVxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHRoaXMucmVidWlsZCgpKVxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHRoaXMucmVzaXplTWFwKHRoaXMuY3NzX3NpemUud2lkdGgsIHRoaXMuY3NzX3NpemUuaGVpZ2h0KSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXNpemVNYXAod2lkdGgsIGhlaWdodCkge1xuICAgICAgICB0aGlzLmRpcnR5ID0gdHJ1ZTtcblxuICAgICAgICB0aGlzLmNzc19zaXplID0geyB3aWR0aDogd2lkdGgsIGhlaWdodDogaGVpZ2h0IH07XG4gICAgICAgIHRoaXMuZGV2aWNlX3NpemUgPSB7XG4gICAgICAgICAgICB3aWR0aDogTWF0aC5yb3VuZCh0aGlzLmNzc19zaXplLndpZHRoICogVXRpbHMuZGV2aWNlX3BpeGVsX3JhdGlvKSxcbiAgICAgICAgICAgIGhlaWdodDogTWF0aC5yb3VuZCh0aGlzLmNzc19zaXplLmhlaWdodCAqIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbylcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy52aWV3X2FzcGVjdCA9IHRoaXMuY3NzX3NpemUud2lkdGggLyB0aGlzLmNzc19zaXplLmhlaWdodDtcbiAgICAgICAgdGhpcy51cGRhdGVCb3VuZHMoKTtcblxuICAgICAgICBpZiAodGhpcy5jYW52YXMpIHtcbiAgICAgICAgICAgIHRoaXMuY2FudmFzLnN0eWxlLndpZHRoID0gdGhpcy5jc3Nfc2l6ZS53aWR0aCArICdweCc7XG4gICAgICAgICAgICB0aGlzLmNhbnZhcy5zdHlsZS5oZWlnaHQgPSB0aGlzLmNzc19zaXplLmhlaWdodCArICdweCc7XG4gICAgICAgICAgICB0aGlzLmNhbnZhcy53aWR0aCA9IHRoaXMuZGV2aWNlX3NpemUud2lkdGg7XG4gICAgICAgICAgICB0aGlzLmNhbnZhcy5oZWlnaHQgPS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zKCk7XG5cbiAgICAgICAgLy8gUmVuZGVyIHNlbGVjdGlvbiBwYXNzIChpZiBuZWVkZWQpXG4gICAgICAgIGlmICh0aGlzLnNlbGVjdGlvbi5wZW5kaW5nUmVxdWVzdHMoKSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucGFubmluZykge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uLmNsZWFyUGVuZGluZ1JlcXVlc3RzKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5iaW5kKCk7ICAgICAgICAgICAgICAgICAgLy8gc3dpdGNoIHRvIEZCT1xuICAgICAgICAgICAgdGhpcy5yZW5kZXJQYXNzKFxuICAgICAgICAgICAgICAgICdzZWxlY3Rpb25fcHJvZ3JhbScsICAgICAgICAgICAgICAgIC8vIHJlbmRlciB3L2FsdGVybmF0ZSBwcm9ncmFtXG4gICAgICAgICAgICAgICAgeyBhbGxvd19ibGVuZDogZmFsc2UgfSk7XG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5yZWFkKCk7ICAgICAgICAgICAgICAgICAgLy8gcmVhZCByZXN1bHRzIGZyb20gc2VsZWN0aW9uIGJ1ZmZlclxuXG4gICAgICAgICAgICAvLyBSZXNldCB0byBzY3JlZW4gYnVmZmVyXG4gICAgICAgICAgICBnbC5iaW5kRnJhbWVidWZmZXIoZ2wuRlJBTUVCVUZGRVIsIG51bGwpO1xuICAgICAgICAgICAgZ2wudmlld3BvcnQoMCwgMCwgdGhpcy5jYW52YXMud2lkdGgsIHRoaXMuY2FudmFzLmhlaWdodCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnJlbmRlcl9jb3VudF9jaGFuZ2VkID0gZmFsc2U7XG4gICAgICAgIGlmICh0aGlzLnJlbmRlcl9jb3VudCAhPT0gdGhpcy5sYXN0X3JlbmRlcl9jb3VudCkge1xuICAgICAgICAgICAgdGhp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A9PT0gJ292ZXJsYXknIHx8IGJsZW5kID09PSAnaW5sYXknKSB7XG4gICAgICAgICAgICAgICAgUmVuZGVyU3RhdGUuYmxlbmRpbmcuc2V0KHtcbiAgICAgICAgICAgICAgICAgICAgYmxlbmQ6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHNyYzogZ2wuU1JDX0FMUEhBLCBkc3Q6IGdsLk9ORV9NSU5VU19TUkNfQUxQSEEsXG4gICAgICAgICAgICAgICAgICAgIHNyY19hbHBoYTogZ2wuT05FLCBkc3RfYWxwaGE6IGdsLk9ORV9NSU5VU19TUkNfQUxQSEFcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEFkZGl0aXZlIGJsZW5kaW5nXG4gICAgICAgICAgICBlbHNlIGlmIChibGVuZCA9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgICBSZW5kZXJTdGF0ZS5ibGVuZGluZy5zZXQoe1xuICAgICAgICAgICAgICAgICAgICBibGVuZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3JjOiBnbC5PTkUsIGRzdDogZ2wuT05FLFxuICAgICAgICAgICAgICAgICAgICBzcmNfYWxwaGE6IGdsLk9ORSwgZHN0X2FscGhhOiBnbC5PTkVfTUlOVVNfU1JDX0FMUEhBXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBNdWx0aXBsaWNhdGl2ZSBibGVuZGluZ1xuICAgICAgICAgICAgZWxzZSBpZiAoYmxlbmQgPT09ICdtdWx0aXBseScpIHtcbiAgICAgICAgICAgICAgICBSZW5kZXJTdGF0ZS5ibGVuZGluZy5zZXQoe1xuICAgICAgICAgICAgICAgICAgICBibGVuZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3JjOiBnbC5aRVJPLCBkc3Q6IGdsLlNSQ19DT0xPUixcbiAgICAgICAgICAgICAgICAgICAgc3JjX2FscGhhOiBn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BuZXdseSBhY3RpdmUgc3R5bGVzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnJlc2V0RmVhdHVyZVNlbGVjdGlvbigpO1xuICAgICAgICAgICAgdGhpcy5yZXNldFRpbWUoKTtcblxuICAgICAgICAgICAgLy8gUmVidWlsZCB2aXNpYmxlIHRpbGVzLCBzb3J0ZWQgZnJvbSBjZW50ZXJcbiAgICAgICAgICAgIGxldCBidWlsZCA9IFtdO1xuICAgICAgICAgICAgdGhpcy50aWxlX21hbmFnZXIuZm9yRWFjaFRpbGUoKHRpbGUpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGlsZS52aXNpYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgIGJ1aWxkLnB1c2godGlsZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRpbGVfbWFuYWdlci5yZW1vdmVUaWxlKHRpbGUua2V5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRoaXMudGlsZV9tYW5hZ2VyLmJ1aWxkVGlsZXMoYnVpbGQpO1xuICAgICAgICB9KS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgIC8vIFByb2ZpbGluZ1xuICAgICAgICAgICAgaWYgKHRoaXMuZGVidWcucHJvZmlsZS5nZW9tZXRyeV9idWlsZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3Byb2ZpbGVFbmQoJ3JlYnVpbGRHZW9tZXRyeScpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvLyBUaWxlIG1hbmFnZXIgZmluaXNoZWQgYnVpbGRpbmcgdGlsZXNcbiAgICB0aWxlTWFuYWdlckJ1aWxkRG9uZSgpIHtcbiAgICAgICAgaWYgKHRoaXMuYnVpbGRpbmcpIHtcbiAgICAgICAgICAgIGxvZy5pbmZvKGBTY2VuZTogYnV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WlsZDogdHJ1ZSB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMucmVidWlsZCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbG9hZERhdGFTb3VyY2VzKCkge1xuICAgICAgICBmb3IgKHZhciBuYW1lIGluIHRoaXMuY29uZmlnLnNvdXJjZXMpIHtcbiAgICAgICAgICAgIGxldCBzb3VyY2UgPSB0aGlzLmNvbmZpZy5zb3VyY2VzW25hbWVdO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHRoaXMuc291cmNlc1tuYW1lXSA9IERhdGFTb3VyY2UuY3JlYXRlKE9iamVjdC5hc3NpZ24oe30sIHNvdXJjZSwge25hbWV9KSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLnNvdXJjZXNbbmFtZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2goZSkge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnNvdXJjZXNbbmFtZV07XG4gICAgICAgICAgICAgICAgbGV0IG1lc3NhZ2UgPSBgQ291bGQgbm90IGNyZWF0ZSBkYXRhIHNvdXJjZTogJHtlLm1lc3NhZ2V9YDtcbiAgICAgICAgICAgICAgICBsb2cud2FybihgU2NlbmU6ICR7bWVzc2FnZX1gLCBzb3VyY2UpO1xuICAgICAgICAgICAgICAgIHRoaXMudHJpZ2dlcignd2FybmluZycsIHsgdHlwZTogJ3NvdXJjZXMnLCBzb3VyY2UsIG1lc3NhZ2UgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBMb2FkIGFsbCB0ZXh0dXJlcyBpbiB0aGUgc2NlbmUgZGVmaW5pdGlvblxuICAgIGxvYWRUZXh0dXJlcygpIHtcbiAgICAgICAgcmV0dXJuIFRleHR1cmUuY3JlYXRlRn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gICAgICAgLy8gb3B0aW9uYWwgYWRkaXRpb25hbCBvdXRsaW5lIHN0eWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ3JvdXAub3V0bGluZSAmJiBncm91cC5vdXRsaW5lLnN0eWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVzLnB1c2goZ3JvdXAub3V0bGluZS5zdHlsZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlcyA9IHN0eWxlcy5maWx0ZXIoeCA9PiB0aGlzLnN0eWxlc1t4XSkuZm9yRWFjaChzdHlsZV9uYW1lID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGUgPSB0aGlzLnN0eWxlc1tzdHlsZV9uYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3R5bGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVfc3R5bGVzW3N0eWxlX25hbWVdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0eWxlLmFuaW1hdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFVzZSBleHBsaWNpdGx5IHNldCBzY2VuZSBhbmltYXRpb24gZmxhZyBpZiBkZWZpbmVkLCBvdGhlcndpc2UgdHVybiBvbiBhbmltYXRpb25cbiAgICAgICAgLy8gaWYgdGhlcmUgYXJlIGFueSBhbmltYXRlZC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ZXR1cERlYnVnICgpIHtcbiAgICAgICAgbGV0IHNjZW5lID0gdGhpcztcbiAgICAgICAgdGhpcy5kZWJ1ZyA9IHtcbiAgICAgICAgICAgIHByb2ZpbGU6IHtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeV9idWlsZDogZmFsc2VcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIC8vIFJlYnVpbGQgZ2VvbWV0cnkgYSBnaXZlbiAjIG9mIHRpbWVzIGFuZCBwcmludCBhdmVyYWdlLCBtaW4sIG1heCB0aW1pbmdzXG4gICAgICAgICAgICB0aW1lUmVidWlsZCAobnVtID0gMSwgb3B0aW9ucyA9IHt9KSB7XG4gICAgICAgICAgICAgICAgbGV0IHRpbWVzID0gW107XG4gICAgICAgICAgICAgICAgbGV0IGN5Y2xlID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnQgPSArbmV3IERhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NlbmUucmVidWlsZChvcHRpb25zKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzLnB1c2goK25ldyBEYXRlKCkgLSBzdGFydCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aW1lcy5sZW5ndGggPCBudW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjeWNsZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF2ZyA9IH5+KHRpbWVzLnJlZHVjZSgoYSwgYikgPT4gYSArIGIpIC8gdGltZXMubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cuaW5mbyhgUHJvZmlsZWQgcmVidWlsZCAke251bX0gdGltZXM6ICR7YXZnfSBhdmcgKCR7TWF0aC5taW4oLi4udGltZXMpfSBtaW4sICR7TWF0aC5tYXgoLi4udGltZXMpfSBtYXgpYCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY3ljbGUoKTtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIC8vIFJldHVybiBnZW9tZXRyeSBjb3VudHMgb2YgdmlzaWJsZSB0aWxlcywgZ3JvdXBlZCBieSBzdHlsZSBuYW1lXG4gICAgICAgICAgICBnZW9tZXRyeUNvdW50QnlTdHlsZSAoKSB7XG4gICAgICAgICAgICAgICAgbGV0IGNvdW50cyA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IHRpbGUgb2Ygc2NlbmUudGlsZV9tYW5hZ2VyLmdldFJlbmRlcmFibGVUaWxlcygpKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IHN0eWxlIGluIHRpbGUubWVzaGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbc3R5bGVdID0gY291bnRzW3N0eWxlXSB8fCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzW3N0eWxlXSArPSB0aWxlLm1lc2hlc1tzdHlsZV0uZ2VvbWV0cnlfY291bnQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50cztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGdlb21ldHJ5Q291bnRCeUJhc2VTdHlsZSAoKSB7XG4gICAgICAgICAgICAgICAgbGV0IHN0eWxlX2NvdW50cyA9IHNjZW5lLmRlYnVnLmdlb21ldHJ5Q291bnRCeVN0eWxlKCk7XG4gICAgICAgICAgICAgICAgbGV0IGNvdW50cyA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IHN0eWxlIGluIHN0eWxlX2NvdW50cykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgY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4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBhY2NlcHQgc2luZ2xlLXN0cmluZyBvciBhcnJheVxuICAgICAgICAgICAgICAgICAgICAvLyBpZiAodHlwZW9mIGNvbmZpZy5pbmNsdWRlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICAvLyAgICAgY29uZmlnLmluY2x1ZGUgPSBbY29uZmlnLmluY2x1ZGVdO1xuICAgICAgICAgICAgICAgICAgICAvLyB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgKCFBcnJheS5pc0FycmF5KGNvbmZpZy5pbmNsdWRlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgU2NlbmVMb2FkZXIubm9ybWFsaXplKGNvbmZpZywgcGF0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnO1xuICAgICAgICAgICAgICAgICAgICAvLyB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQ29sbGVjdCBVUkxzIG9mIHNjZW5lcyB0byBpbmNsdWRlXG4gICAgICAgICAgICAgICAgICAgIC8vIGxldCBpbmNsdWRlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAvLyBmb3IgKGxldCB1cmwgb2YgY29uZmlnLmluY2x1ZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gICAgIGluY2x1ZGVzLnB1c2goVXRpbHMuYWRkQmFzZVVSTCh1cmwsIHBhdGgpKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gfVxuICAgICAgICAgICAgICAgICAgICAvLyBkZWxldGUgY29uZmlnLmluY2x1ZGU7IC8vIGRvbid0IHdhbnQgdG8gbWVyZ2UgdGhpcyBwcm9wZXJ0eVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIHJldHVybiBQcm9taXNlLlxuICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWxsKGluY2x1ZGVzLm1hcCh1cmwgPT4gU2NlbmVMb2FkZXIubG9hZFNjZW5lUmVjdXJzaXZlKHVybCkpKS5cbiAgICAgICAgICAgICAgICAgICAgLy8gICAgIHRoZW4oY29uZmlncyA9PiB7XG4gICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgY29uZmlnID0gbWVyZ2VPYmplY3RzKHt9LCAuLi5jb25maWdzLCBjb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIFNjZW5lTG9hZGVyLm5vcm1hbGl6ZShjb25maWcsIHBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIHJldHVybiBjb25maWc7XG4gICAgICAgICAgICAgICAgICAgIC8vICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSxcblxuICAgIC8vIE5vcm1hbGl6ZSBwcm9wZXJ0aWVzIHRoYXQgc2hvdWxkIGJlIGFkanVzdCB3aXRoaW4gZWFjaCBsb2NhbCBzY2VuZSBmaWxlICh1c3VhbGx5IGJ5IHBhdGgpXG4gICAgbm9ybWFsaXplKGNvbmZpZywgcGF0aCkge1xuICAgICAgICBTY2VuZUxvYWRlci5ub3JtYWxpemVEYXRhU291cmNlcyhjb25maWcsIHBhdGgpO1xuICAgICAgICBTY2VuZUxvYWRlci5ub3JtYWxpemVUZXh0dXJlcyhjb25maWcsIHBhdGgpO1xuICAgICAgICByZXR1cm4gY29uZmlnO1xuICAgIH0sXG5cbiAgICAvLyBFeHBhbmQgcGF0aHMgZm9yIGRhdGEgc291cmNlXG4gICAgbm9ybWFsaXplRGF0YVNvdXJjZXMoY29uZmlnLCBwYXRoKSB7XG4gICAgICAgIGNvbmZpZy5zb3VyY2VzID0gY29uZmlnLnNvdXJjZXMgfHwge307XG5cbiAgICAgICAgZm9yIChsZXQgc291cmNlIG9mICBVdGlscy52YWx1ZXMoY29uZmlnLnNvdXJjZXMpKSB7XG4gICAgICAgICAgICBzb3VyY2UudXJsID0gVXRpbHMuYWRkQmFzZVVSTChzb3VyY2UudXJsLCBwYXRoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjb25maWc7XG4gICAgfSxcblxuICAgIC8vIEV4cGFuZCBwYXRocyBhbmQgY2VudHJhbGl6ZSB0ZXh0dXJlIGRlZmluaXRpb25zIGZvciBhIHNjZW5lIG9iamVjdFxuICAgIG5vcm1hbGl6ZVRleHR1cmVzKGNvbmZpZywgcGF0aCkge1xuICAgICAgICBjb25maWcudGV4dHVyZXMgPSBjb25maWcudGV4dHVyZXMgfHwge307XG5cbiAgICAgICAgaWYgKGNvbmZpZy5zdHlsZXMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IFtzdHlsZV9uYW1lLCBzdHlsZV0gb2YgVXRpbHMuZW50cmllcyhjb25maWcuc3R5bGVzKSkge1xuICAgICAgICAgICAgICAgIGlmIChzdHlsZS50ZXh0dXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0ZXggPSBzdHlsZS50ZXh0dXJlO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIFRleHR1cmUgYnkgVVJMLCBleHBhbmQgcmVsYXRpdmUgdG8gc2NlbmUgZmlsZVxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRleCA9PT0gJ3N0cmluZycgJiYgIWNvbmZpZy50ZXh0dXJlc1t0ZXhdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dHVyZV9uYW1lID0gJ19fJyArIHN0eWxlX25hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcudGV4dHVyZXNbdGV4dHVyZV9uYW1lXSA9IHsgdXJsOiB0ZXggfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnRleHR1cmUgPSB0ZXh0dXJlX25hbWU7IC8vIHBvaW50IHN0eWxlIHRvIGxvY2F0aW9uIG9mIHRleHR1cmVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBUZXh0dXJlIGJ5IG9iamVjdCwgbW92ZSBpdCB0byB0aGUgZ2xvYmFsIHNjZW5lIHRleHR1cmUgc2V0IGFuZCBnaXZlIGl0IGEgZGVmYXVsdCBuYW1lXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiB0ZXggPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dHVyZV9uYW1lID0gJ19fJyArIHN0eWxlX25hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcudGV4dHVyZXNbdGV4dHVyZV9uYW1lXSA9IHRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnRleHR1cmUgPSB0ZXh0dXJlX25hbWU7IC8vIHBvaW50IHN0eWxlIHRvIGxvY2F0aW9uIG9mIHRleHR1cmVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIElmIHN0eWxlIGhhcyB0ZXh0dXJlIHVuaWZvcm1zLCBleHBhbmQgdGV4dHVyZSBVUkxzIHJlbGF0aXZlIHRvIHNjZW5lIGZpbGVcbiAgICAgICAgICAgICAgICBpZiAoc3R5bGUuc2hhZGVycyAmJiBzdHlsZS5zaGFkZXJzLnVuaWZvcm1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IHt0eXBlLCB2YWx1ZSwga2V5LCB1bmlmb3Jtc30gb2YgR0xTTC5wYXJzZVVuaWZvcm1zKHN0eWxlLnNoYWRlcnMudW5pZm9ybXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PT0gJ3NhbXBsZXIyRCcgJiYgdHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyAmJiAhY29uZmlnLnRleHR1cmVzW3ZhbHVlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlX25hbWUgPSAnX18nICsgc3R5bGVfbmFtZSArICdfdW5pZm9ybV8nICsga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy50ZXh0dXJlc1t0ZXh0dXJlX25hbWVdID0geyB1cmw6IHZhbHVlIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pZm9ybXNba2V5XSA9IHRleHR1cmVfbmFtZTsgLy8gcG9pbnQgc3R5bGUgdG8gbG9jYXRpb24gb2YgdGV4dHVyZVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBJZiBzdHlsZSBoYXMgbWF0ZXJpYWwsIGV4cGFuZCB0ZXh0dXJlIFVSTHMgcmVsYXRpdmUgdG8gc2NlbmUgZmlsZVxuICAgICAgICAgICAgICAgIGlmIChzdHlsZS5tYXRlcmlhbCkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBwcm9wIG9mIFsnZW1pc3Npb24nLCAnYW1iaWVudCcsICdkaWZmdXNlJywgJ3NwZWN1bGFyJywgJ25vcm1hbCddKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBNYXRlcmlhbCBwcm9wZXJ0eSBoYXMgYSB0ZXh0dXJlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3R5bGUubWF0ZXJpYWxbcHJvcF0gIT0gbnVsbCAmJiBzdHlsZS5tYXRlcmlhbFtwcm9wXS50ZXh0dXJlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleCA9IHN0eWxlLm1hdGVyaWFsW3Byb3BdLnRleHR1cmU7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUZXh0dXJlIGJ5IFVSTCwgZXhwYW5kIHJlbGF0aXZlIHRvIHNjZW5lIGZpbGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRleCA9PT0gJ3N0cmluZycgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIWNvbmZpZy50ZXh0dXJlc1t0ZXhdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0dXJlX25hbWUgPSAnX18nICsgc3R5bGVfbmFtZSArICdfbWF0ZXJpYWxfJyArIHByb3A7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy50ZXh0dXJlc1t0ZXh0dXJlX25hbWVdID0geyB1cmw6IHRleCB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5tYXRlcmlhbFtwcm9wXS50ZXh0dXJlID0gdGV4dHVyZV9uYW1lOyAvLyBwb2ludCBzdHlsZSB0byBsb2NhdGlvbiBvZiB0ZXh0dXJlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRleHR1cmUgYnkgb2JqZWN0LCBtb3ZlIGl0IHRvIHRoZSBnbG9iYWwgc2NlbmUgdGV4dHVyZSBzZXQgYW5kIGdpdmUgaXQgYSBkZWZhdWx0IG5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgdGV4ID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dHVyZV9uYW1lID0gJ19fJyArIHN0eWxlX25hbWUgKyAnX21hdGVyaWFsXycgKyBwcm9wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcudGV4dHVyZXNbdGV4dHVyZV9uYW1lXSA9IHRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUubWF0ZXJpYWxbcHJvcF0udGV4dHVyZSA9IHRleHR1cmVfbmFtZTsgLy8gcG9pbnQgc3R5bGUgdG8gbG9jYXRpb24gb2YgdGV4dHVyZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFkZCBwYXRoIHRvIHRleHR1cmVzXG4gICAgICAgIGlmIChjb25maWcudGV4dHVyZXMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IHRleHR1cmUgb2YgVXRpbHMudmFsdWVzKGNvbmZpZy50ZXh0dXJlcykpIHtcbiAgICAgICAgICAgICAgICBpZiAodGV4dHVyZS51cmwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dHVyZS51cmwgPSBVdGlscy5hZGRCYXNlVVJMKHRleHR1cmUudXJsLCBwYXRoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY29uZmlnO1xuICAgIH0sXG5cbiAgICAvLyBOb3JtYWxpemUgc29tZSBzY2VuZS13aWRlIHNldHRpbmdzIHRoYXQgYXBwbHkgdG8gdGhlIGZpbmFsLCBtZXJnZWQgc2NlbmVcbiAgICBmaW5hbGl6ZShjb25maWcpIHtcbiAgICAgICAgLy8gQXNzaWduIGlkcyB0byBkYXRhIHNvdXJjZXNcbiAgICAgICAgbGV0IHNvdXJjZV9pZCA9IDA7XG4gICAgICAgIGZvciAobGV0IHNvdXJjZSBpbiBjb25maWcuc291cmNlcykge1xuICAgICAgICAgICAgY29uZmlnLnNvdXJjZXNbc291cmNlXS5pZCA9IHNvdXJjZV9pZCsrO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSWYgb25seSBvbmUgY2FtZXJhIHNwZWNpZmllZCwgc2V0IGl0IGFzIGRlZmF1bHRcbiAgICAgICAgY29uZmlnLmNhbWVyYXMgPSBjb25maWcuY2FtZXJhcyB8fCB7fTtcbiAgICAgICAgaWYgKGNvbmZpZy5jYW1lcmEpIHtcbiAgICAgICAgICAgIGNvbmZpZy5jYW1lcmFzLmRlZmF1bHQgPSBjb25maWcuY2FtZXJhO1xuICA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RvRnVuY3Rpb25zKGNvbmZpZy5sYXllcnNbbGF5ZXJdLmRhdGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ3JlYXRlIGRhdGEgc291cmNlc1xuICAgICAgICBjb25maWcuc291cmNlcyA9IFV0aWxzLnN0cmluZ3NUb0Z1bmN0aW9ucyhjb25maWcuc291cmNlcyk7IC8vIHBhcnNlIG5ldyBzb3VyY2VzXG4gICAgICAgIHNlbGYuc291cmNlcy50aWxlcyA9IHt9OyAvLyBjbGVhciBwcmV2aW91cyBzb3VyY2VzXG4gICAgICAgIGZvciAobGV0IG5hbWUgaW4gY29uZmlnLnNvdXJjZXMpIHtcbiAgICAgICAgICAgIGxldCBzb3VyY2U7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHNvdXJjZSA9IERhdGFTb3VyY2UuY3JlYXRlKE9iamVjdC5hc3NpZ24oe30sIGNvbmZpZy5zb3VyY2VzW25hbWVdLCB7bmFtZX0pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoKGUpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFzb3VyY2UpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNvdXJjZS50aWxlZCkge1xuICAgICAgICAgICAgICAgIHNlbGYuc291cmNlcy50aWxlc1tuYW1lXSA9IHNvdXJjZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIERpc3RyaWJ1dGUgb2JqZWN0IHNvdXJjZXMgYWNyb3NzIHdvcmtlcnNcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlLmlkICUgc2VsZi5udW1fd29ya2VycyA9PT0gc2VsZi5fd29ya2VyX2lkKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIExvYWQgc291cmNlIGlmIG5vdCBjYWNoZWRcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zb3VyY2VzLm9iamVjdHNbbmFtZV0gPSBzb3VyY2U7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5vYmplY3RzW3NvdXJjZS5uYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5vYmplY3RzW3NvdXJjZS5uYW1lXSA9IHt9O1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLmxvYWQoc2VsZi5vYmplY3RzW3NvdXJjZS5uYW1lXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDbGVhciB0aWxlIGNhY2hlIGlmIGRhdGEgc291cmNlIGNvbmZpZyBjaGFuZ2VkXG4gICAgICAgIGlmICghc2VsZi5jb25maWcuc291cmNlcyB8fFxuICAgICAgICAgICAgIXNlbGYubGFzdF9jb25maWcuc291cmNlcyB8fFxuICAgICAgICAgICAgT2JqZWN0LmtleXMoc2VsZi5jb25maWcuc291cmNlcykuc29tZShzID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoc2VsZi5jb25maWcuc291cmNlc1tzXSkgIT09IEpTT04uc3RyaW5naWZ5KHNlbGYubGFzdF9jb25maWcuc291cmNlc1tzXSk7XG4gICAgICAgICAgICB9KSkge1xuICAgICAgICAgICAgc2VsZi50aWxlcyA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRXhwYW5kIHN0eWxlc1xuICAgICAgICBjb25maWcgPSBVdGlscy5zdHJpbmdzVG9GdW5jdGlvbnMoY29uZmlnLCBTdHlsZVBhcnNlci53cmFwRnVuY3Rpb24pO1xuICAgICAgICBzZWxmLnN0eWxlcyA9IFN0eWxlTWFuYWdlci5idWlsZChjb25maWcuc3R5bGVzLCB7IGdlbmVyYXRpb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rZXldICE9IG51bGwpIHtcbiAgICAgICAgICAgIC8vIEFscmVhZHkgbG9hZGluZz9cbiAgICAgICAgICAgIGlmIChzZWxmLnRpbGVzW3RpbGUua2V5XS5sb2FkaW5nID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gVXBkYXRlIHRpbGUgY2FjaGVcbiAgICAgICAgdGlsZSA9IHNlbGYudGlsZXNbdGlsZS5rZXldID0gT2JqZWN0LmFzc2lnbihzZWxmLnRpbGVzW3RpbGUua2V5XSB8fCB7fSwgdGlsZSk7XG5cbiAgICAgICAgLy8gVXBkYXRlIGNvbmZpZyAoc3R5bGVzLCBldGMuKSwgdGhlbiBidWlsZCB0aWxlXG4gICAgICAgIHJldHVybiBzZWxmLmF3YWl0Q29uZmlndXJhdGlvbigpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgLy8gRmlyc3QgdGltZSBidWlsZGluZyB0aGUgdGlsZVxuICAgICAgICAgICAgaWYgKHRpbGUubG9hZGVkICE9PSB0cnVlKSB7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIHRpbGUubG9hZGluZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHRpbGUubG9hZGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHRpbGUuZXJyb3IgPSBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgIHNlbGYubG9hZFRpbGVTb3VyY2VEYXRhKHRpbGUpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2FybiBhbmQgY29udGludWUgb24gZGF0YSBzb3VyY2UgZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aWxlLnNvdXJjZV9kYXRhLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVXRpbHMubG9nKCd3YXJuJywgYHRpbGUgbG9hZCBlcnJvcihzKSBmb3IgJHt0aWxlLmtleX06ICR7dGlsZS5zb3VyY2VfZGF0YS5lcnJvcn1gKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgdGlsZS5sb2FkaW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWxlLmxvYWRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBUaWxlLmJ1aWxkR2VvbWV0cnkodGlsZSwgc2VsZi5sYXllcnMsIHNlbGYucnVsZXMsIHNlbGYuc3R5bGVzKS50aGVuKGtleXMgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoeyB0aWxlOiBUaWxlLnNsaWNlKHRpbGUsIGtleXMpIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGlsZS5sb2FkaW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWxlLmxvYWRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGlsZS5lcnJvciA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBVdGlscy5sb2coJ2Vycm9yJywgYHRpbGUgbG9hZCBlcnJvciBmb3IgJHt0aWxlLmtleX06ICR7dGlsZS5lcnJvcn0gYXQ6ICR7ZXJyb3Iuc3RhY2t9YCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoeyB0aWxlOiBUaWxlLnNsaWNlKHRpbGUpIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRpbGUgYWxyZWFkeSBsb2FkZWQsIGp1c3QgcmVidWlsZFxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgVXRpbHMubG9nKCd0cmFjZScsIGB1c2VkIHdvcmtlciBjYWNoZSBmb3IgdGlsZSAke3RpbGUua2V5fWApO1xuXG4gICAgICAgICAgICAgICAgLy8gQnVpbGQgZ2VvbWV0cnlcbiAgICAgICAgICAgICAgICByZXR1cm4gVGlsZS5idWlsZEdlb21ldHJ5KHRpbGUsIHNlbGYubGF5ZXJzLCBzZWxmLnJ1bGVzLCBzZWxmLnN0eWxlcykudGhlbihrZXlzID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgdGlsZTogVGlsZS5zbGljZSh0aWxlLCBrZXlzKSB9O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgLy8gTG9hZCB0aGlzIHRpbGUncyBkYXRhIHNvdXJjZVxuICAgIGxvYWRUaWxlU291cmNlRGF0YSAodGlsZSkge1xuICAgICAgICByZXR1cm4gc2VsZi5zb3VyY2VzLnRpbGVzW3RpbGUuc291cmNlXS5sb2FkKHRpbGUpO1xuICAgIH0sXG5cbiAgICAvLyBSZW1vdmUgdGlsZVxuICAgIHJlbW92ZVRpbGUgKGtleSkge1xuICAgICAgICB2YXIgdGlsZSA9IHNlbGYudGlsZXNba2V5XTtcblxuICAgICAgICBpZiAodGlsZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAvLyBDYW5jZWwgaWYgbG9hZGluZ1xuICAgICAgICAgICAgaWYgKHRpbGUubG9hZGluZyA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgIFV0aWxzLmxvZygndHJhY2UnLCBgY2FuY2VsIHRpbGUgbG9hZCBmb3IgJHtrZXl9YCk7XG4gICAgICAgICAgICAgICAgdGlsZS5sb2FkaW5nID0gZmFsc2U7XG4gICAgICAgICAgICB9XG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AncG9pbnQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIENoZWNrIHNlbGVjdGlvbiBtYXAgYWdhaW5zdCBGQk9cbiAgICAgICAgICAgICAgICBnbC5yZWFkUGl4ZWxzKFxuICAgICAgICAgICAgICAgICAgICBNYXRoLmZsb29yKHJlcXVlc3QucG9pbnQueCAqIHRoaXMuZmJvX3NpemUud2lkdGgpLFxuICAgICAgICAgICAgICAgICAgICBNYXRoLmZsb29yKCgxIC0gcmVxdWVzdC5wb2ludC55KSAqIHRoaXMuZmJvX3NpemUuaGVpZ2h0KSxcbiAgICAgICAgICAgICAgICAgICAgMSwgMSwgZ2wuUkdCQSwgZ2wuVU5TSUdORURfQllURSwgdGhpcy5waXhlbCk7XG4gICAgICAgICAgICAgICAgdmFyIGZlYXR1cmVfa2V5ID0gKHRoaXMucGl4ZWxbMF0gKyAodGhpcy5waXhlbFsxXSA8PCA4KSArICh0aGlzLnBpeGVsWzJdIDw8IDE2KSArICh0aGlzLnBpeGVsWzNdIDw8IDI0KSkgPj4+IDA7XG5cbiAgICAgICAgICAgICAgICAvLyBJZiBmZWF0dXJlIGZvdW5kLCBhc2sgYXBwcm9wcmlhdGUgd2ViIHdvcmtlciB0byBsb29rdXAgZmVhdHVyZVxuICAgICAgICAgICAgICAgIHZhciB3b3JrZXJfaWQgPSB0aGlzLnBpeGVsWzNdO1xuICAgICAgICAgICAgICAgIGlmICh3b3JrZXJfaWQgIT09IDI1NSkgeyAvLyAyNTUgaW5kaWNhdGVzIGFuIGVtcHR5IHNlbGVjdGlvbiBidWZmZXIgcGl4ZWxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMud29ya2Vyc1t3b3JrZXJfaWRdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFdvcmtlckJyb2tlci5wb3N0TWVzc2FnZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLndvcmtlcnNbd29ya2VyX2lkXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2VsZi5nZXRGZWF0dXJlU2VsZWN0aW9uJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGlkOiByZXF1ZXN0LmlkLCBrZXk6IGZlYXR1cmVfa2V5IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihtZXNzYWdlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZpbmlzaFJlYWQobWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBObyBmZWF0dXJlIGZvdW5kLCBidXQgc3RpbGwgbmVlZCB0byByZXNvbHZlIHByb21pc2VcbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5maW5pc2hSZWFkKHsgaWQ6IHJlcXVlc3QuaWQsIGZlYXR1cmU6IG51bGwgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5zZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZ2wuYmluZEZyYW1lYnVmZmVyKGdsLkZSQU1FQlVGRkVSLCBudWxsKTtcblxuICAgICAgICB9LCB0aGlzLnJlYWRfZGVsYXkpO1xuICAgIH1cblxuICAgIC8vIENhbGxlZCBvbiBtYWluIHRocmVhZCB3aGVuIGEgd2ViIHdvcmtlciBmaW5kcyBhIGZlYXR1cmUgaW4gdGhlIHNlbGVjdGlvbiBidWZmZXJcbiAgICBmaW5pc2hSZWFkIChtZXNzYWdlKSB7XG4gICAgICAgIHZhciByZXF1ZXN0ID0gdGhpcy5yZXF1ZXN0c1ttZXNzYWdlLmlkXTtcbiAgICAgICAgaWYgKCFyZXF1ZXN0KSB7XG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YiA8PCAxNikgKyAoaWEgPDwgMjQpKSA+Pj4gMDsgLy8gbmVlZCB1bnNpZ25lZCByaWdodCBzaGlmdCB0byBjb252ZXJ0IHRvIHBvc2l0aXZlICNcblxuICAgICAgICB0aGlzLm1hcFtrZXldID0ge1xuICAgICAgICAgICAgY29sb3I6IFtyLCBnLCBiLCBhXSxcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5tYXBfc2l6ZSsrO1xuXG4gICAgICAgIHRoaXMudGlsZXNbdGlsZS5rZXldID0gdGhpcy50aWxlc1t0aWxlLmtleV0gfHwgW107XG4gICAgICAgIHRoaXMudGlsZXNbdGlsZS5rZXldLnB1c2goa2V5KTtcblxuICAgICAgICByZXR1cm4gdGhpcy5tYXBba2V5XTtcbiAgICB9XG5cbiAgICBzdGF0aWMgbWFrZUNvbG9yKGZlYXR1cmUsIHRpbGUpIHtcbiAgICAgICAgdmFyIHNlbGVjdG9yID0gdGhpcy5tYWtlRW50cnkodGlsZSk7XG4gICAgICAgIHNlbGVjdG9yLmZlYXR1cmUgPSB7XG4gICAgICAgICAgICBpZDogZmVhdHVyZS5pZCxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IGZlYXR1cmUucHJvcGVydGllcyxcbiAgICAgICAgICAgIHRpbGU6IHRpbGUua2V5XG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIHNlbGVjdG9yLmNvbG9yO1xuICAgIH1cblxuICAgIHN0YXRpYyByZXNldCgpIHtcbiAgICAgICAgdGhpcy50aWxlcyA9IHt9O1xuICAgICAgICB0aGlzLm1hcCA9IHt9O1xuICAgICAgICB0aGlzLm1hcF9zaXplID0gMDtcbiAgICAgICAgdGhpcy5tYXBfZW50cnkgPSAwO1xuICAgIH1cblxuICAgIHN0YXRpYyBjbGVhclRpbGUoa2V5KSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRoaXMudGlsZXNba2V5XSkpIHtcbiAgICAgICAgICAgIHRoaXMudGlsZXNba2V5XS5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pKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgaW1wb3J0U2NyaXB0cyhzKTtcbiAgICAgICAgICAgICAgICAgICAgVXRpbHMubG9nKCdpbmZvJywgJ0RhdGFTb3VyY2U6IGxvYWRlZCBsaWJyYXJ5OiAnICsgcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIFV0aWxzLmxvZygnZXJyb3InLCAnRGF0YVNvdXJjZTogZmFpbGVkIHRvIGxvYWQgbGlicmFyeTogJyArIHMpO1xuICAgICAgICAgICAgICAgICAgICBVdGlscy5sb2coJ2Vycm9yJywgZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBvdmVyem9vbSB3aWxsIGFwcGx5IGZvciB6b29tcyBoaWdoZXIgdGhhbiB0aGlzXG4gICAgICAgIHRoaXMubWF4X3pvb20gPSBzb3VyY2UubWF4X3pvb20gfHwgR2VvLmRlZmF1bHRfbWF4X3pvb207XG4gICAgfVxuXG4gICAgLy8gQ3JlYXRlIGEgdGlsZSBzb3VyY2UgYnkgdHlwZSwgZmFjdG9yeS1zdHlsZVxuICAgIHN0YXRpYyBjcmVhdGUgKHNvdXJjZSkge1xuICAgICAgICBpZiAoRGF0YVNvdXJjZS50eXBlc1tzb3VyY2UudHlwZV0pIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgRGF0YVNvdXJjZS50eXBlc1tzb3VyY2UudHlwZV0oc291cmNlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIE1lcmNhdG9yIHByb2plY3Rpb25cbiAgICBzdGF0aWMgcHJvamVjdERhdGEgKHNvdXJjZSkge1xuICAgICAgICB2YXIgdGltZXIgPSArbmV3IERhdGUoKTtcbiAgICAgICAgZm9yICh2YXIgdCBpbiBzb3VyY2UubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbnVtX2ZlYXR1cmVzID0gc291cmNlLmxheWVyc1t0XS5mZWF0dXJlcy5sZW5ndGg7XG4gICAgICAgICAgICBmb3IgKHZhciBmPTA7IGYgPCBudW1fZmVhdHVyZXM7IGYrKykge1xuICAgICAgICAgICAgICAgIHZhciBmZWF0dXJlID0gc291cmNlLmxheWVyc1t0XS5mZWF0dXJlc1tmXTtcbiAgICAgICAgICAgICAgICBHZW8udHJhbnNmb3JtR2VvbWV0cnkoZmVhdHVyZS5nZW9tZXRyeSwgY29vcmQgPT4ge1xuICAgICAgICAgICAgICAgICAgICB2YXIgW3gsIHldID0gR2VvLmxhdExuZ1RvTWV0ZXJzKGNvb3JkKTtcbiAgICAgICAgICAgICAgICAgICAgY29vcmRbMF0gPSB4O1xuICAgICAgICAgICAgICAgICAgICBjb29yZFsxXSA9IHk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc291cmNlLmRlYnVnICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHNvdXJjZS5kZWJ1Zy5wcm9qZWN0aW9uID0gK25ldyBEYXRlKCkgLSB0aW1lcjtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICBSZS1zY2FsZSBnZW9tZXRyaWVzIHdpdGhpbiBlYWNoIHNvdXJjZSB0byBpbnRlcm5hbCB0aWxlIHVuaXRzXG4gICAgKi9cbiAgICBzdGF0aWMgc2NhbGVEYXRhIChzb3VyY2UsIHtjb29yZHM6IHt6fSwgbWluLCBtYXh9KSB7XG4gICAgICAgIGxldCB1bml0c19wZXJfbWV0ZXIgPSBHZW8udW5pdHNQZXJNZXRlcih6KTtcbiAgICAgICAgZm9yICh2YXIgdCBpbiBzb3VyY2UubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbnVtX2ZlYXR1cmVzID0gc291cmNlLmxheWVyc1t0XS5mZWF0dXJlcy5sZW5ndGg7XG4gICAgICAgICAgICBmb3IgKHZhciBmPTA7IGYgPCBudW1fZmVhdHVyZXM7IGYrKykge1xuICAgICAgICAgICAgICAgIHZhciBmZWF0dXJlID0gc291cmNlLmxheWVyc1t0XS5mZWF0dXJlc1tmXTtcbiAgICAgICAgICAgICAgICBHZW8udHJhbnNmb3JtR2VvbWV0cnkoZmVhdHVyZS5nZW9tZXRyeSwgY29vcmQgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb29yZFswXSA9IChjb29yZFswXSAtIG1pbi54KSAqIHVuaXRzX3Blcl9tZXRlcjtcbiAgICAgICAgICAgICAgICAgICAgY29vcmRbMV0gPSAoY29vcmRbMV0gLSBtaW4ueSkgKiB1bml0c19wZXJfbWV0ZXIgKiAtMTsgLy8gZmxpcCBjb29yZHMgcG9zaXRpdmVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGxvYWQoZGVzdCkge1xuICAgICAgICBkZXN0LnNvdXJjZV9kYXRhID0ge307XG4gICAgICAgIGRlc3Quc291cmNlX2RhdGEubGF5ZXJzID0ge307XG4gICAgICAgIGRlc3QucGFkX3NjYWxlID0gdGhpcy5wYWRfc2NhbGU7XG5cbiAgICAgICAgcmV0dXJuIHRoaXMuX2xvYWQoZGVzdCkudGhlbigoZGVzdCkgPT4ge1xuICAgICAgICAgICAgLy8gUG9zdC1wcm9jZXNzaW5nXG4gICAgICAgICAgICBmb3IgKGxldCBsYXllciBpbiBkZXN0LnNvdXJjZV9kYXRhLmxheWVycykge1xuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gZGVzdC5zb3VyY2VfZGF0YS5sYXllcnNbbGF5ZXJdO1xuICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuZmVhdHVyZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5mZWF0dXJlcy5mb3JFYWNoKGZlYXR1cmUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgR2VvLnRyYW5zZm9ybUdlb21ldHJ5KGZlYXR1cmUuZ2VvbWV0cnksIGNvb3JkID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGbGlwIFkgY29vcmRzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29vcmRbMV0gPSAtY29vcmRbMV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTbGlnaHRseSBzY2FsZSB1cCB0aWxlIHRvIGNvdmVyIHNlYW1zXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMucGFkX3NjYWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkWzBdID0gTWF0aC5yb3VuZChjb29yZFswXSAqICgxICsgdGhpcy5wYWRfc2NhbGUpIC0gKEdlby50aWxlX3NjYWxlICogdGhpcy5wYWRfc2NhbGUvMikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZFsxXSA9IE1hdGgucm91bmQoY29vcmRbMV0gKiAoMSArIHRoaXMucGFkX3NjYWxlKSAtIChHZW8udGlsZV9zY2FsZSAqIHRoaXMucGFkX3NjYWxlLzIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXNlIGZpcnN0IGVuY291bnRlcmVkIHBvbHlnb24gd2luZGluZyBvcmRlciBhcyBkZWZhdWx0IGZvciBkYXRhIHNvdXJjZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVEZWZhdWx0V2luZGluZyhmZWF0dXJlLmdlb21ldHJ5KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkZXN0LmRlZmF1bHRfd2luZGluZyA9IHRoaXMuZGVmYXVsdF93aW5kaW5nI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HNvdXJjZV9kYXRhLmVycm9yID0gbnVsbDtcbiAgICAgICAgICAgIC8vIEZvciB0ZXN0aW5nIG5ldHdvcmsgZXJyb3JzXG4gICAgICAgICAgICAvLyB2YXIgcHJvbWlzZSA9IFV0aWxzLmlvKHVybCwgNjAgKiAxMDAsIHRoaXMucmVzcG9uc2VfdHlwZSk7XG4gICAgICAgICAgICAvLyBpZiAoTWF0aC5yYW5kb20oKSA8IC43KSB7XG4gICAgICAgICAgICAvLyAgICAgcHJvbWlzZSA9IFByb21pc2UucmVqZWN0KEVycm9yKCdmYWtlIGRhdGEgc291cmNlIGVycm9yJykpO1xuICAgICAgICAgICAgLy8gfVxuICAgICAgICAgICAgLy8gcHJvbWlzZS50aGVuKChib2R5KSA9PiB7XG4gICAgICAgICAgICBsZXQgcHJvbWlzZSA9IFV0aWxzLmlvKHVybCwgNjAgKiAxMDAwLCB0aGlzLnJlc3BvbnNlX3R5cGUpO1xuICAgICAgICAgICAgc291cmNlX2RhdGEucmVxdWVzdCA9IHByb21pc2UucmVxdWVzdDtcblxuICAgICAgICAgICAgcHJvbWlzZS50aGVuKChib2R5KSA9PiB7XG4gICAgICAgICAgICAgICAgZGVzdC5kZWJ1Zy5yZXNwb25zZV9zaXplID0gYm9keS5sZW5ndGggfHwgYm9keS5ieXRlTGVuZ3RoO1xuICAgICAgICAgICAgICAgIGRlc3QuZGVidWcubmV0d29yayA9ICtuZXcgRGF0ZSgpIC0gZGVzdC5kZWJ1Zy5uZXR3b3JrO1xuICAgICAgICAgICAgICAgIGRlc3QuZGVidWcucGFyc2luZyA9ICtuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucGFyc2VTb3VyY2VEYXRhKGRlc3QsIHNvdXJjZV9kYXRhLCBib2R5KTtcbiAgICAgICAgICAgICAgICBkZXN0LmRlYnVnLnBhcnNpbmcgPSArbmV3IERhdGUoKSAtIGRlc3QuZGVidWcucGFyc2luZztcbiAgICAgICAgICAgICAgICByZXNvbHZlKG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A9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGxheWVycyA9IGRhdGEuc291cmNlX2RhdGEubGF5ZXJzO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGxheWVyX25hbWUgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGlsZV9pbmRleGVzW2xheWVyX25hbWVdID0gZ2VvanNvbnZ0KGxheWVyc1tsYXllcl9uYW1lXSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogdGhpcy5tYXhfem9vbSwgIC8vIG1heCB6b29tIHRvIHByZXNlcnZlIGRldGFpbCBvblxuICAgICAgICAgICAgICAgICAgICAgICAgdG9sZXJhbmNlOiAzLCAvLyBzaW1wbGlmaWNhdGlvbiB0b2xlcmFuY2UgKGhpZ2hlciBtZWFucyBzaW1wbGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0ZW50OiBHZW8udGlsZV9zY2FsZSwgLy8gdGlsZSBleHRlbnQgKGJvdGggd2lkdGggYW5kIGhlaWdodClcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcjogMCAgICAgLy8gdGlsZSBidWZmZXIgb24gZWFjaCBzaWRlXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXMubG9hZF9kYXRhLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgZm9yIChsZXQgbGF5ZXJfbmFtZSBpbiB0aGlzLnRpbGVfaW5kZXhlcykge1xuICAgICAgICAgICAgICAgIGRlc3Quc291cmNlX2RhdGEubGF5ZXJzW2xheWVyX25hbWVdID0gdGhpcy5nZXRUaWxlRmVhdHVyZXMoZGVzdCwgbGF5ZXJfbmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZGVzdDtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZ2V0VGlsZUZlYXR1cmVzKHRpbGUsIGxheWVyX25hbWUpIHtcbiAgICAgICAgbGV0IGNvb3JkcyA9IEdlby53cmFwVGlsZSh0aWxlLmNvb3JkcywgeyB4OiB0cnVlIH0pO1xuXG4gICAgICAgIC8vIHJlcXVlc3QgYSBwYXJ0aWN1bGFyIHRpbGVcbiAgICAgICAgbGV0IHQgPSB0aGlzLnRpbGVfaW5kZXhlc1tsYXllcl9uYW1lXS5nZXRUaWxlKGNvb3Jkcy56LCBjb29yZHMueCwgY29vcmRzLnkpO1xuXG4gICAgICAgIC8vIENvbnZlcnQgZnJvbSBNVlQtc3R5bGUgSlNPTiBzdHJ1Y3QgdG8gR2VvSlNPTlxuICAgICAgICBsZXQgY29sbGVjdGlvbjtcbiAgICAgICAgaWYgKHQgJiYgdC5mZWF0dXJlcykge1xuICAgICAgICAgICAgY29sbGVjdGlvbiA9IHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZUNvbGxlY3Rpb24nLFxuICAgICAgICAgICAgICAgIGZlYXR1cmVzOiBbXVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yIChsZXQgZmVhdHVyZSBvZiB0LmZlYXR1cmVzKSB7XG4gICAgICAgICAgICAgICAgLy8gR2VvSlNPTiBmZWF0dXJlXG4gICAgICAgICAgICAgICAgbGV0IGYgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICdGZWF0dXJlJyxcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHt9LFxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzOiBmZWF0dXJlLnRhZ3NcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUudHlwZSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBmLmdlb21ldHJ5LmNvb3JkaW5hdGVzID0gZmVhdHVyZS5nZW9tZXRyeS5tYXAoY29vcmQgPT4gW2Nvb3JkWzBdLCBjb29yZFsxXV0pO1xuICAgICAgICAgICAgICAgICAgICBmLmdlb21ldHJ5LnR5cGUgPSAnTXVsdGlQb2ludCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGZlYXR1cmUudHlwZSA9PT0gMiB8fCBmZWF0dXJlLnR5cGUgPT09IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgZi5nZW9tZXRyeS5jb29yZGluYXRlcyA9IGZlYXR1cmUuZ2VvbWV0cnkubWFwKHJpbmcgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJpbmcubWFwKGNvb3JkID0+IFtjb29yZFswXSwgY29vcmRbMV1dKVxuICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnR5cGUgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYuZ2VvbWV0cnkudHlwZSA9ICdNdWx0aUxpbmVTdHJpbmcnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYuZ2VvbWV0cnkgPSBNVlRTb3VyY2UuZGVjb2RlTXVsdGlQb2x5Z29uKGYuZ2VvbWV0cnkpOyAvLyB1bi1mbGF0dGVuIHJpbmdzXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbGxlY3Rpb24uZmVhdHVyZXMucHVzaChmKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjb2xsZWN0a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W5zdGFuY2UgdHlwZSBmcm9tIHBhcmVudCBjbGFzc1xuICAgICAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBHZW9KU09OVGlsZVNvdXJjZSkge1xuICAgICAgICAgICAgICAgIC8vIFJlcGxhY2UgaW5zdGFuY2UgdHlwZVxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgR2VvSlNPTlNvdXJjZShzb3VyY2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gUGFzcyBiYWNrIHRvIHBhcmVudCBjbGFzcyB0byBpbnN0YW50aWF0ZVxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHBhcnNlU291cmNlRGF0YSAodGlsZSwgc291cmNlLCByZXNwb25zZSkge1xuICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzcG9uc2UpO1xuICAgICAgICB0aGlzLnByZXBhcmVHZW9KU09OKGRhdGEsIHRpbGUsIHNvdXJjZSk7XG4gICAgfVxuXG4gICAgcHJlcGFyZUdlb0pTT04gKGRhdGEsIHRpbGUsIHNvdXJjZSkge1xuICAgICAgICAvLyBBcHBseSBvcHRpb25hbCBkYXRhIHRyYW5zZm9ybVxuICAgICAgICBpZiAodHlwZW9mIHRoaXMudHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBkYXRhID0gdGhpcy50cmFuc2Zvcm0oZGF0YSwgdGhpcy5leHRyYV9kYXRhKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHNvdXJjZS5sYXllcnMgPSBHZW9KU09OU291cmNlLnByb3RvdHlwZS5nZXRMYXllcnMoZGF0YSk7XG5cbiAgICAgICAgLy8gQSBcInN5bnRoZXRpY1wiIHRpbGUgdGhhdCBhZGp1c3RzIHRoZSB0aWxlIG1pbiBhbmN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HlwZTogJ0ZlYXR1cmVDb2xsZWN0aW9uJyxcbiAgICAgICAgICAgICAgICBmZWF0dXJlczogW11cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGZvciAodmFyIGY9MDsgZiA8IGxheWVyLmxlbmd0aDsgZisrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZlYXR1cmUgPSBsYXllci5mZWF0dXJlKGYpO1xuICAgICAgICAgICAgICAgIHZhciBmZWF0dXJlX2dlb2pzb24gPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICdGZWF0dXJlJyxcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHt9LFxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzOiBmZWF0dXJlLnByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdmFyIGdlb21ldHJ5ID0gZmVhdHVyZV9nZW9qc29uLmdlb21ldHJ5O1xuICAgICAgICAgICAgICAgIHZhciBjb29yZGluYXRlcyA9IGZlYXR1cmUubG9hZEdlb21ldHJ5KCk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcj0wOyByIDwgY29vcmRpbmF0ZXMubGVuZ3RoOyByKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJpbmcgPSBjb29yZGluYXRlc1tyXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgYz0wOyBjIDwgcmluZy5sZW5ndGg7IGMrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmluZ1tjXSA9IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByaW5nW2NdLngsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmluZ1tjXS55XG4gICAgICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGdlb21ldHJ5LmNvb3JkaW5hdGVzID0gY29vcmRpbmF0ZXM7XG5cbiAgICAgICAgICAgICAgICBpZiAoVmVjdG9yVGlsZUZlYXR1cmUudHlwZXNbZmVhdHVyZS50eXBlXSA9PT0gJ1BvaW50Jykge1xuICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeS50eXBlID0gJ1BvaW50JztcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkuY29vcmRpbmF0ZXMgPSBnZW9tZXRyeS5jb29yZGluYXRlc1swXVswXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoVmVjdG9yVGlsZUZlYXR1cmUudHlwZXNbZmVhdHVyZS50eXBlXSA9PT0gJ0xpbmVTdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlcy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5LnR5cGUgPSAnTGluZVN0cmluZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeS5jb29yZGluYXRlcyA9IGdlb21ldHJ5LmNvb3JkaW5hdGVzWzBdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkudHlwZSA9ICdNdWx0aUxpbmVTdHJpbmcnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZlY3RvclRpbGVGZWF0dXJlLnR5cGVzW2ZlYXR1cmUudHlwZV0gPT09ICdQb2x5Z29uJykge1xuICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeSA9IE1WVFNvdXJjZS5kZWNvZGVNdWx0aVBvbHlnb24oZ2VvbWV0cnkpOyAvLyB1bi1mbGF0dGVuIHJpbmdzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGF5ZXJfZ2VvanNvbi5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04oZGF0YSk7XG4gICAgICAgIHNvdXJjZS5sYXllcnMgPSB0aGlzLmdldExheWVycyhkYXRhKTtcbiAgICB9XG5cbiAgICB0b0dlb0pTT04gKGRhdGEpIHtcbiAgICAgICAgLy8gU2luZ2xlIGxheWVyXG4gICAgICAgIGlmIChkYXRhLm9iamVjdHMgJiZcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKGRhdGEub2JqZWN0cykubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICBsZXQgbGF5ZXIgPSBPYmplY3Qua2V5cyhkYXRhLm9iamVjdHMpWzBdO1xuICAgICAgICAgICAgZGF0YSA9IHRvcG9qc29uLmZlYXR1cmUoZGF0YSwgZGF0YS5vYmplY3RzW2xheWVyXSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gTXVsdGlwbGUgbGF5ZXJzXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgbGV0IGxheWVycyA9IHt9O1xuICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIGRhdGEub2JqZWN0cykge1xuICAgICAgICAgICAgICAgIGxheWVyc1trZXldID0gdG9wb2pzb24uZmVhdHVyZShkYXRhLCBkYXRhLm9iamVjdHNba2V5XSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkYXRhID0gbGF5ZXJzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBkYXRhO1xuICAgIH1cblxufVxuXG4vKipcbiBNYXB6ZW4vT1NNLlVTLXN0eWxlIFRvcG9KU09OIHZlY3RvciB0aWxlc1xuIEBjbGFzcyBUb3BvSlNPTlRpbGVTb3VyY2VcbiovXG5leHBvcnQgY2xhc3MgVG9wb0pTT05UaWxlU291cmNlIGV4dGVuZHMgR2VvSlNPTlRpbGVTb3VyY2Uge1xuXG4gICAgY29uc3RydWN0b3Ioc291cmNlKSB7XG4gICAgICAgIGxldCBfdGhpcyA9IHN1cGVyKHNvdXJjZSk7XG5cbiAgICAgICAgLy8gUmVwbGFjZSB3aXRoIG5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92XSxcblxuICAgICAgICAgICAgW21heF91LCBtaW5fdl0sXG4gICAgICAgICAgICBbbWF4X3UsIG1heF92XSxcbiAgICAgICAgICAgIFttaW5fdSwgbWF4X3ZdXG4gICAgICAgIF07XG4gICAgfVxuXG4gICAgdmFyIG51bV9wb2x5Z29ucyA9IHBvbHlnb25zLmxlbmd0aDtcbiAgICBmb3IgKHZhciBwPTA7IHAgPCBudW1fcG9seWdvbnM7IHArKykge1xuICAgICAgICB2YXIgcG9seWdvbiA9IHBvbHlnb25zW3BdO1xuXG4gICAgICAgIGZvciAodmFyIHE9MDsgcSA8IHBvbHlnb24ubGVuZ3RoOyBxKyspIHtcbiAgICAgICAgICAgIHZhciBjb250b3VyID0gcG9seWdvbltxXTtcblxuICAgICAgICAgICAgZm9yICh2YXIgdz0wOyB3IDwgY29udG91ci5sZW5ndGggLSAxOyB3KyspIHtcbiAgICAgICAgICAgICAgICBpZiAocmVtb3ZlX3RpbGVfZWRnZXMgJiYgQnVpbGRlcnMub3V0c2lkZVRpbGUoY29udG91clt3XSwgY29udG91clt3KzFdLCB0aWxlX2VkZ2VfdG9sZXJhbmNlKSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gZG9uJ3QgZXh0cnVkZSB0aWxlIGVkZ2VzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gV2FsbCBvcmRlciBpcyBkZXBlbmRlbnQgb24gd2luZGluZyBvcmRlciwgc28gdGhhdCBub3JtYWxzIGZhY2Ugb3V0d2FyZFxuICAgICAgICAgICAgICAgIGxldCB3MCwgdzE7XG4gICAgICAgICAgICAgICAgaWYgKHdpbmRpbmcgPT09ICdDQ1cnKSB7XG4gICAgICAgICAgICAgICAgICAgIHcwID0gdztcbiAgICAgICAgICAgICAgICAgICAgdzEgPSB3KzE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB3MCA9IHcrMTtcbiAgICAgICAgICAgICAgICAgICAgdzEgPSB3O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFR3byB0cmlhbmdsZXMgZm9yIHRoZSBxdWFkIGZvcm1lZCBieSBlYWNoIHZlcnRleCBwYWlyLCBnb2luZyBmcm9tIGJvdHRvbSB0byB0b3AgaGVpZ2h0XG4gICAgICAgICAgICAgICAgdmFyIHdhbGxfdmVydGljZXMgPSBbXG4gICAgICAgICAgICAgICAgICAgIC8vIFRyaWFuZ2xlXG4gICAgICAgICAgICAgICAgICAgIFtjb250b3VyW3cxXVswXSwgY29udG91clt3MV1bMV0sIG1heF96XSxcbiAgICAgICAgICAgICAgICAgICAgW2NvbnRvdXJbdzFdWzBdLCBjb250b3VyW3cxXVsxXSwgbWluX3pdLFxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3MF1bMF0sIGNvbnRvdXJbdzBdWzFdLCBtaW5fel0sXG4gICAgICAgICAgICAgICAgICAgIC8vIFRyaWFuZ2xlXG4gICAgICAgICAgICAgICAgICAgIFtjb250b3VyW3cwXVswXSwgY29udG91clt3MF1bMV0sIG1pbl96XSxcbiAgICAgICAgICAgICAgICAgICAgW2NvbnRvdXJbdzBdWzBdLCBjb250b3VyW3cwXVsxXSwgbWF4X3pdLFxuICAgICAgICAgICAgICAgICAgICBbY29udG91clt3MV1bMF0sIGNvbnRvdXJbdzFdWzFdLCBtYXhfel1cbiAgICAgICAgICAgICAgICBdO1xuXG4gICAgICAgICAgICAgICAgLy8gQ2FsYyB0aGUgbm9ybWFsIG9mIHRoZSB3YWxsIGZyb20gdXAgdmVjdG9yIGFuZCBvbmUgc2VnbWVudCBvZiB0aGUgd2FsbCB0cmlhbmdsZXNcbiAgICAgICAgICAgICAgICBsZXQgd2FsbF92ZWMgPSBWZWN0b3Iubm9ybWFsaXplKFtjb250b3VyW3cxXVswXSAtIGNvbnRvdXJbdzBdWzBdLCBjb250b3VyW3cxXVsxXSAtIGNvbnRvdXJbd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ICAgIHRleGNvb3JkX2luZGV4LFxuICAgICAgICB0ZXhjb29yZHM6IHRleGNvb3JkX2luZGV4ICYmIFtdLFxuICAgICAgICB0ZXhjb29yZF9ub3JtYWxpemUsXG4gICAgICAgIG1pbl91LCBtaW5fdiwgbWF4X3UsIG1heF92LFxuICAgICAgICBuUGFpcnM6IDBcbiAgICB9O1xuXG4gICAgZm9yICh2YXIgbG4gPSAwOyBsbiA8IGxpbmVzLmxlbmd0aDsgbG4rKykge1xuICAgICAgICB2YXIgbGluZSA9IGxpbmVzW2xuXTtcbiAgICAgICAgdmFyIGxpbmVTaXplID0gbGluZS5sZW5ndGg7XG5cbiAgICAgICAgLy8gSWdub3JlIG5vbi1saW5lc1xuICAgICAgICBpZiAobGluZVNpemUgPCAyKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vICBJbml0aWFsaXplIHZhcmlhYmxlc1xuICAgICAgICB2YXIgY29vcmRQcmV2ID0gWzAsIDBdLCAvLyBQcmV2aW91cyBwb2ludCBjb29yZGluYXRlc1xuICAgICAgICAgICAgY29vcmRDdXJyID0gWzAsIDBdLCAvLyBDdXJyZW50IHBvaW50IGNvb3JkaW5hdGVzXG4gICAgICAgICAgICBjb29yZE5leHQgPSBbMCwgMF07IC8vIE5leHQgcG9pbnQgY29vcmRpbmF0ZXNcblxuICAgICAgICB2YXIgbm9ybVByZXYgPSBbMCwgMF0sICAvLyBSaWdodCBub3JtYWwgdG8gc2VnbWVudCBiZXR3ZWVuIHByZXZpb3VzIGFuZCBjdXJyZW50IG1fcG9pbnRzXG4gICAgICAgICAgICBub3JtQ3VyciA9IFswLCAwXSwgIC8vIFJpZ2h0IG5vcm1hbCBhdCBjdXJyZW50IHBvaW50LCBzY2FsZWQgZm9yIG1pdGVyIGpvaW50XG4gICAgICAgICAgICBub3JtTmV4dCA9IFswLCAwXTsgIC8vIFJpZ2h0IG5vcm1hbCB0byBzZWdtZW50IGJldHdlZW4gY3V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bGRlcnMub3V0c2lkZVRpbGUobGluZVtpXSwgbGluZVtsaW5lU2l6ZS0yXSwgdGlsZV9lZGdlX3RvbGVyYW5jZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5lZWRUb0Nsb3NlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobmVlZFRvQ2xvc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgY29vcmRQcmV2ID0gbGluZVtsaW5lU2l6ZS0yXTtcbiAgICAgICAgICAgICAgICAgICAgbm9ybVByZXYgPSBWZWN0b3Iubm9ybWFsaXplKFZlY3Rvci5wZXJwKGNvb3JkUHJldiwgbGluZVtpXSkpO1xuICAgICAgICAgICAgICAgICAgICBpc1ByZXYgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQXNzaWduIGN1cnJlbnQgY29vcmRpbmF0ZVxuICAgICAgICAgICAgY29vcmRDdXJyID0gbGluZVtpXTtcblxuICAgICAgICAgICAgaWYgKGlzTmV4dCkge1xuICAgICAgICAgICAgICAgIGNvb3JkTmV4dCA9IGxpbmVbaSsxXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xvc2VkX3BvbHlnb24gPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBpdCdzIHRoZSBsYXN0IHBvaW50IGluIGEgY2xvc2VkIHBvbHlnb25cbiAgICAgICAgICAgICAgICBjb29yZE5leHQgPSBsaW5lWzFdO1xuICAgICAgICAgICAgICAgIGlzTmV4dCA9IHRydWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpc05leHQpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBpdCdzIG5vdCB0aGUgbGFzdCBvbmUgZ2V0IG5leHQgY29vcmRpbmF0ZXMgYW5kIGNhbGN1bGF0ZSB0aGUgcmlnaHQgbm9ybWFsXG5cbiAgICAgICAgICAgICAgICBub3JtTmV4dCA9IFZlY3Rvci5ub3JtYWxpemUoVmVjdG9yLnBlcnAoY29vcmRDdXJyLCBjb29yZE5leHQpKTtcbiAgICAgICAgICAgICAgICBpZiAocmVtb3ZlX3RpbGVfZWRnZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKEJ1aWxkZXJzLm91dHNpZGVUaWxlKGNvb3JkQ3VyciwgY29vcmROZXh0LCB0aWxlX2VkZ2VfdG9sZXJhbmNlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9ybUN1cnIgPSBWZWN0b3Iubm9ybWFsaXplKFZlY3Rvci5wZXJwKGNvb3JkUHJldiwgY29vcmRDdXJyKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNQcmV2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkVmVydGV4UGFpcihjb29yZEN1cnIsIG5vcm1DdXJyLCBpL2xpbmVTaXplLCBjb25zdGFudHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0YW50cy5uUGFpcnMrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkZCB2ZXJ0aWNlcyB0byBidWZmZXIgYWNvcmRpbmcgdGhlaXIgaW5kZXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleFBhaXJzKGNvbnN0YW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpc1ByZXYgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyAgQ29tcHV0ZSBjdXJyZW50IG5vcm1hbFxuICAgICAgICAgICAgaWYgKGlzUHJldikge1xuICAgICAgICAgICAgICAgIC8vICBJZiB0aGVyZSBpcyBhIFBSRVZJT1VTIC4uLlxuICAgICAgICAgICAgICAgIGlmIChpc05leHQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gLi4uIGFuZCBhIE5FWFQgT05FLCBjb21wdXRlIHByZXZpb3VzIGFuZCBuZXh0IG5vcm1hbHMgKHNjYWxlZCBieSB0aGUgYW5nbGUgd2l0aCB0aGUgbGFzdCBwcmV2KVxuICAgICAgICAgICAgICAgICAgICBub3JtQ3VyciA9IFZlY3Rvci5ub3JtYWxpemUoVmVjdG9yLmFkZChub3JtUHJldiwgbm9ybU5leHQpKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNjYWxlID0gMiAvICgxICsgTWF0aC5hYnMoVmVjdG9yLmRvdChub3JtUHJldiwgbm9ybUN1cnIpKSk7XG4gICAgICAgICAgICAgICAgICAgIG5vcm1DdXJyID0gVmVjdG9yLm11bHQobm9ybUN1cnIsc2NhbGUqc2NhbGUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIC4uLiBhbmQgdGhlcmUgaXMgTk9UIGEgTkVYVCBPTkUsIGNvcHkgdGhlIHByZXZpb3VzIG5leHQgb25lICh3aGljaCBpcyB0aGUgY3VycmVudCBvbmUpXG4gICAgICAgICAgICAgICAgICAgIG5vcm1DdXJyID0gVmVjdG9yLm5vcm1hbGl6ZShWZWN0b3IucGVycChjb29yZFByZXYsIGNvb3JkQ3VycikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUgaXMgTk8gUFJFVklPVVMgLi4uXG4gICAgICAgICAgICAgICAgaWYgKGlzTmV4dCkge1xuICAgICAgICAgICAgICAgICAgICAvLyAuLi4gYW5kIGEgTkVYVCBPTkUsXG4gICAgICAgICAgICAgICAgICAgIG5vcm1OZXh0ID0gVmVjdG9yLm5vcm1hbGl6ZShWZWN0b3IucGVycChjb29yZEN1cnIsIGNvb3JkTmV4dCkpO1xuICAgICAgICAgICAgICAgICAgICBub3JtQ3VyciA9IG5vcm1OZXh0O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIC4uLiBhbmQgTk8gTkVYVCBPTkUsIG5vdGhpbmcgdG8gZG8gKHdpdGhvdXQgcHJldiBvciBuZXh0IG9uZSB0aGlzIGlzIGp1c3QgYSBwb2ludClcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaXNQcmV2IHx8IGlzTmV4dCkge1xuICAgICAgICAgICAgICAgIC8vIElmIGl0J3MgdGhlIEJFR0lOTklORyBvZiBhIExJTkVcbiAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCAmJiAhaXNQcmV2ICYmICFjbG9zZWRfcG9seWdvbikge1xuICAgICAgICAgICAgICAgICAgICBhZGRDYXAoY29vcmRDdXJyLCBub3JtQ3VyciwgY29ybmVyc09uQ2FwLCB0cnVlLCBjb25zdGFudHMpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vICBNaXRlciBsaW1pdDogaWYgbWl0ZXIgam9pbiBpcyB0b28gc2hhcnAsIGNvbnZlcnQgdG8gYmV2ZWwgaW5zdGVhZFxuICAgICAgICAgICAgICAgIGlmICh0cmlhbmdsZXNPbkpvaW4gPT09IDAgJiYgVmVjdG9yLmxlbmd0aFNxKG5vcm1DdXJyKSA+IG1pdGVyX2xlbl9zcSkge1xuICAgICAgICAgICAgICAgICAgICB0cmlhbmdsZXNPbkpvaW4gPSB0cmlhbmdsZXNGb3JKb2luWydiZXZlbCddOyAvLyBzd2l0Y2ggdG8gYmV2ZWxcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBJZiBpdCdzIGEgSk9JTlxuICAgICAgICAgICAgICAgIGlmICh0cmlhbmdsZXNPbkpvaW4gIT09IDAgJiYgaXNQcmV2ICYmIGlzTmV4dCkge1xuICAgICAgICAgICAgICAgICAgICBhZGRKb2luKFtjb29yZFByZXYsIGNvb3JkQ3VyciwgY29vcmROZXh0XSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbm9ybVByZXYsbm9ybUN1cnIsIG5vcm1OZXh0XSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpL2xpbmVTaXplLCB0cmlhbmdsZXNPbkpvaW4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RhbnRzKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhZGRWZXJ0ZXhQYWlyKGNvb3JkQ3Vyciwgbm9ybUN1cnIsIGkvKGxpbmVTaXplLTEpLCBjb25zdGFudHMpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpc05leHQpIHtcbiAgICAgICAgICAgICAgICAgICBjb25zdGFudHMublBhaXJzKys7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaXNQcmV2ID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFkZCB2ZXJ0aWNlcyB0byBidWZmZXIgYWNjb3JkaW5nIHRvIHRoZWlyIGluZGV4XG4gICAgICAgIGluZGV4UGFpcnMoY29uc3RhbnRzKTtcblxuICAgICAgICAgLy8gSWYgaXQncyB0aGUgRU5EIG9mIGEgTElORVxuICAgICAgICBpZighY2xvc2VkX3BvbHlnb24pIHtcbiAgICAgICAgICAgIGFkZENhcChjb29yZEN1cnIsIG5vcm1DdXJyLCBjb3JuZXJzT25DYXAgLCBmYWxzZSwgY29uc3RhbnRzKTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5cbi8vIEFkZCB0byBlcXVpZGlzdGFudCBwYWlycyBvZiB2ZXJ0aWNlcyAoaW50ZXJuYWwgbWV0aG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HtcbiAgICAgICAgaWYgKGlzQmVnaW5uaW5nKSB7XG4gICAgICAgICAgICB1dkEgPSBbY29uc3RhbnRzLm1pbl91LGNvbnN0YW50cy5taW5fdl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJlZ2lubmluZyBhbmdsZSBVVnNcbiAgICAgICAgICAgIHV2QyA9IFtjb25zdGFudHMubWluX3UrKGNvbnN0YW50cy5tYXhfdS1jb25zdGFudHMubWluX3UpLzIsIGNvbnN0YW50cy5taW5fdl07ICAgLy8gQ2VudGVyIHBvaW50IFVWc1xuICAgICAgICAgICAgdXZCID0gW2NvbnN0YW50cy5tYXhfdSxjb25zdGFudHMubWluX3ZdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBFbmRpbmcgYW5nbGUgVVZzXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB1dkEgPSBbY29uc3RhbnRzLm1pbl91LGNvbnN0YW50cy5tYXhfdl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJlZ2luaW5nIGFuZ2xlIFVWc1xuICAgICAgICAgICAgdXZDID0gW2NvbnN0YW50cy5taW5fdSsoY29uc3RhbnRzLm1heF91LWNvbnN0YW50cy5taW5fdSkvMiwgY29uc3RhbnRzLm1heF92XTsgICAvLyBDZW50ZXIgcG9pbnQgVVZzXG4gICAgICAgICAgICB1dkIgPSBbY29uc3RhbnRzLm1heF91LGNvbnN0YW50cy5tYXhfdl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEVuZGluZyBhbmdsZSBVVnNcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFkZEZhbihjb29yZCxcbiAgICAgICAgICAgVmVjdG9yLm5lZyhub3JtYWwpLCBbMCwgMF0sIG5vcm1hbCxcbiAgICAgICAgICAgdXZBLCB1dkMsIHV2QixcbiAgICAgICAgICAgaXNCZWdpbm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IsIC1oMl0sXG4gICAgICAgIFt3MiwgLWgyXSxcbiAgICAgICAgW3cyLCBoMl0sXG5cbiAgICAgICAgWy13MiwgLWgyXSxcbiAgICAgICAgW3cyLCBoMl0sXG4gICAgICAgIFstdzIsIGgyXVxuICAgIF07XG5cbiAgICBsZXQgdGV4Y29vcmRzO1xuICAgIGlmICh0ZXhjb29yZF9pbmRleCkge1xuICAgICAgICB0ZXhjb29yZF9ub3JtYWxpemUgPSB0ZXhjb29yZF9ub3JtYWxpemUgfHwgMTtcblxuICAgICAgICB2YXIgW21pbl91LCBtaW5fdiwgbWF4X3UsIG1heF92XSA9IHRleGNvb3JkX3NjYWxlIHx8IEJ1aWxkZXJzLmRlZmF1bHRVVnM7XG4gICAgICAgIHRleGNvb3JkcyA9IFtcbiAgICAgICAgICAgIFttaW5fdSwgbWluX3ZdLFxuICAgICAgICAgICAgW21heF91LCBtaW5fdl0sXG4gICAgICAgICAgICBbbWF4X3UsIG1heF92XSxcblxuICAgICAgICAgICAgW21pbl91LCBtaW5fdl0sXG4gICAgICAgICAgICBbbWF4X3UsIG1heF92XSxcbiAgICAgICAgICAgIFttaW5fdSwgbWF4X3ZdXG4gICAgICAgIF07XG4gICAgfVxuXG4gICAgbGV0IG51bV9wb2ludHMgPSBwb2ludHMubGVuZ3RoO1xuICAgIGZvciAobGV0IHA9MDsgcCA8IG51bV9wb2ludHM7IHArKykge1xuICAgICAgICBsZXQgcG9pbnQgPSBwb2ludHNbcF07XG5cbiAgICAgICAgZm9yIChsZXQgcG9zPTA7IHBvcyA8IDY7IHBvcysrKSB7XG4gICAgICAgICAgICAvLyBBZGQgdGV4Y29vcmRzXG4gICAgICAgICAgICBpZiAodGV4Y29vcmRfaW5kZXgpIHtcbiAgICAgICAgICAgICAgICB2ZXJ0ZXhfdGVtcGxhdGVbdGV4Y29vcmRfaW5kZXggKyAwXSA9IHRleGNvb3Jkc1twb3NdWzBdICogdGV4Y29vcmRfbm9ybWFsaXplO1xuICAgICAgICAgICA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gd2lkdGhcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLndpZHRoLnZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm5leHRfd2lkdGgudmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUuY29sb3IgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gTWFpbnRhaW4gY29uc2lzdGVudCBvdXRsaW5lIHdpZHRoIGFyb3VuZCB0aGUgbGluZSBmaWxsXG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS53aWR0aC52YWx1ZSA9IG91dGxpbmVfd2lkdGggKyB3aWR0aDtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm5leHRfd2lkdGgudmFsdWUgPSBvdXRsaW5lX25leHRfd2lkdGggKyBuZXh0X3dpZHRoO1xuXG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5jb2xvciA9IHJ1bGVfc3R5bGUub3V0bGluZS5jb2xvcjtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLmNhcCA9IHJ1bGVfc3R5bGUub3V0bGluZS5jYXAgfHwgcnVsZV9zdHlsZS5jYXA7XG4gICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5qb2luID0gcnVsZV9zdHlsZS5vdXRsaW5lLmpvaW4gfHwgcnVsZV9zdHlsZS5qb2luO1xuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUubWl0ZXJfbGltaXQgPSBydWxlX3N0eWxlLm91dGxpbmUubWl0ZXJfbGltaXQgfHwgcnVsZV9zdHlsZS5taXRlcl9saW1pdDtcbiAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLnN0eWxlID0gcnVsZV9zdHlsZS5vdXRsaW5lLnN0eWxlIHx8IHRoaXMubmFtZTtcblxuICAgICAgICAgICAgICAgIC8vIEV4cGxpY2l0bHkgZGVmaW5lZCBvdXRsaW5lIG9yZGVyLCBvciBpbmhlcml0ZWQgZnJvbSBpbm5lciBsaW5lXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGVfc3R5bGUub3V0bGluZS5vcmRlcikge1xuICAgICAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm9yZGVyID0gdGhpcy5wYXJzZU9yZGVyKHJ1bGVfc3R5bGUub3V0bGluZS5vcmRlciwgY29udGV4dCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm9yZGVyID0gc3R5bGUub3JkZXI7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gRG9uJ3QgbGV0IG91dGxpbmUgYmUgYWJvdmUgaW5uZXIgbGluZVxuICAgICAgICAgICAgICAgIGlmIChzdHlsZS5vdXRsaW5lLm9yZGVyID4gc3R5bGUub3JkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgc3R5bGUub3V0bGluZS5vcmRlciA9IHN0eWxlLm9yZGVyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIE91dGxpbmVzIGFyZSBhbHdheXMgYXQgaGFsZi1sYXllciBpbnRlcnZhbHMgdG8gYXZvaWQgY29uZmxpY3Rpbmcgd2l0aCBpbm5lciBsaW5lc1xuICAgICAgICAgICAgICAgIHN0eWxlLm91dGxpbmUub3JkZXIgLT0gMC41O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc3R5bGUub3V0bGluZS53aWR0aC52YWx1ZSA9IG51bGw7XG4gICAgICAgICAgICBzdHlsZS5vdXRsaW5lLm5leHRfd2lkdGgudmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgc3R5bGUub3V0bGluZS5jb2xvciA9IG51bGw7XG4gICAgICAgIH1cblxu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Vycy5idWlsZFBvbHlsaW5lcyhcbiAgICAgICAgICAgIGxpbmVzLFxuICAgICAgICAgICAgc3R5bGUud2lkdGgsXG4gICAgICAgICAgICB2ZXJ0ZXhfZGF0YSxcbiAgICAgICAgICAgIHZlcnRleF90ZW1wbGF0ZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjYXA6IHN0eWxlLmNhcCxcbiAgICAgICAgICAgICAgICBqb2luOiBzdHlsZS5qb2luLFxuICAgICAgICAgICAgICAgIG1pdGVyX2xpbWl0OiBzdHlsZS5taXRlcl9saW1pdCxcbiAgICAgICAgICAgICAgICBzY2FsaW5nX2luZGV4OiB0aGlzLnZlcnRleF9sYXlvdXQuaW5kZXguYV9leHRydWRlLFxuICAgICAgICAgICAgICAgIHNjYWxpbmdfbm9ybWFsaXplOiBVdGlscy5zY2FsZUludDE2KDEsIDI1NiksIC8vIHNjYWxlIGV4dHJ1c2lvbiBub3JtYWxzIHRvIHNpZ25lZCBzaG9ydHMgdy8yNTYgdW5pdCBiYXNpc1xuICAgICAgICAgICAgICAgIHRleGNvb3JkX2luZGV4OiB0aGlzLnZlcnRleF9sYXlvdXQuaW5kZXguYV90ZXhjb29yZCxcbiAgICAgICAgICAgICAgICB0ZXhjb29yZF9zY2FsZTogdGhpcy50ZXhjb29yZF9zY2FsZSxcbiAgICAgICAgICAgICAgICB0ZXhjb29yZF9ub3JtYWxpemU6IDY1NTM1LCAvLyBzY2FsZSBVVnMgdG8gdW5zaWduZWQgc2hvcnRzXG4gICAgICAgICAgICAgICAgY2xvc2VkX3BvbHlnb246IG9wdGlvbnMgJiYgb3B0aW9ucy5jbG9zZWRfcG9seWdvbixcbiAgICAgICAgICAgICAgICByZW1vdmVfdGlsZV9lZGdlczogIXN0eWxlLnRpbGVfZWRnZXMgJiYgb3B0aW9ucyAmJiBvcHRpb25zLnJlbW92ZV90aWxlX2VkZ2VzLFxuICAgICAgICAgICAgICAgIHRpbGVfZWRnZV90b2xlcmFuY2U6IE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VyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9mZnNldDtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBvZmZzZXQyID0gW29mZnNldFswXSwgb2Zmc2V0WzFdXTtcblxuICAgICAgICAvLyBBbiBvcHRpb25hbCBsZWZ0L3JpZ2h0IG9mZnNldFxuICAgICAgICBpZiAodGhpcy5pc0xlZnRBbmNob3IoYW5jaG9yKSkge1xuICAgICAgICAgICAgb2Zmc2V0MlswXSAtPSBzaXplWzBdIC8gMjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLmlzUmlnaHRBbmNob3IoYW5jaG9yKSkge1xuICAgICAgICAgICAgb2Zmc2V0MlswXSArPSBzaXplWzBdIC8gMjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFuIG9wdGlvbmFsIHRvcC9ib3R0b20gb2Zmc2V0XG4gICAgICAgIGlmICh0aGlzLmlzVG9wQW5jaG9yKGFuY2hvcikpIHtcbiAgICAgICAgICAgIG9mZnNldDJbMV0gLT0gc2l6ZVsxXSAvIDI7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodGhpcy5pc0JvdHRvbUFuY2hvcihhbmNob3IpKSB7XG4gICAgICAgICAgICBvZmZzZXQyWzFdICs9IHNpemVbMV0gLyAyO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG9mZnNldDI7XG4gICAgfSxcblxuICAgIGlzTGVmdEFuY2hvciAoYW5jaG9yKSB7XG4gICAgICAgIHJldHVybiAobGVmdHMuaW5kZXhPZihhbmNob3IpID4gLTEpO1xuICAgIH0sXG5cbiAgICBpc1JpZ2h0QW5jaG9yIChhbmNob3IpIHtcbiAgICAgICAgcmV0dXJuIChyaWdodHMuaW5kZXhPZihhbmNob3IpID4gLTEpO1xuICAgIH0sXG5cbiAgICBpc1RvcEFuY2hvciAoYW5jaG9yKSB7XG4gICAgICAgIHJldHVybiAodG9wcy5pbmRleE9mKGFuY2hvcikgPiAtMSk7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cmUgJiYgVGV4dHVyZS50ZXh0dXJlc1t0aGlzLnRleHR1cmVdICYmIFRleHR1cmUudGV4dHVyZXNbdGhpcy50ZXh0dXJlXS5zcHJpdGVzKSB7XG4gICAgICAgICAgICBpZiAoIXNwcml0ZSAmJiAhc3R5bGUuc3ByaXRlX2RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICghVGV4dHVyZS50ZXh0dXJlc1t0aGlzLnRleHR1cmVdLnNwcml0ZXNbc3ByaXRlXSkge1xuICAgICAgICAgICAgICAgIC8vIElmIHNwcml0ZSBub3QgZm91bmQsIGNoZWNrIGZvciBkZWZhdWx0IHNwcml0ZVxuICAgICAgICAgICAgICAgIGlmIChzdHlsZS5zcHJpdGVfZGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICBzcHJpdGUgPSBzdHlsZS5zcHJpdGVfZGVmYXVsdDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFUZXh0dXJlLnRleHR1cmVzW3RoaXMudGV4dHVyZV0uc3ByaXRlc1tzcHJpdGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2cud2FybihgU3R5bGU6IGluIHN0eWxlICcke3RoaXMubmFtZX0nLCBjb3VsZCBub3QgZmluZCBkZWZhdWx0IHNwcml0ZSAnJHtzcHJpdGV9JyBmb3IgdGV4dHVyZSAnJHt0aGlzLnRleHR1cmV9J2ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsb2cud2FybihgU3R5bGU6IGluIHN0eWxlICcke3RoaXMubmFtZX0nLCBjb3VsZCBub3QgZmluZCBzcHJpdGUgJyR7c3ByaXRlfScgZm9yIHRleHR1cmUgJyR7dGhpcy50ZXh0dXJlfSdgKTt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G4gICAgICAgICAgICBsZXQgc3R5bGUgPSBxLnN0eWxlO1xuICAgICAgICAgICAgbGV0IGZlYXR1cmUgPSBxLmZlYXR1cmU7XG4gICAgICAgICAgICBsZXQgZ2VvbWV0cnkgPSBmZWF0dXJlLmdlb21ldHJ5O1xuXG4gICAgICAgICAgICBsZXQgZmVhdHVyZV9sYWJlbHMgPSB0aGlzLmJ1aWxkTGFiZWxzRnJvbUdlb21ldHJ5KHN0eWxlLnNpemUsIGdlb21ldHJ5LCBzdHlsZSk7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZlYXR1cmVfbGFiZWxzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IGxhYmVsID0gZmVhdHVyZV9sYWJlbHNbaV07XG4gICAgICAgICAgICAgICAgYm94ZXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGZlYXR1cmUsXG4gICAgICAgICAgICAgICAgICAgIGRyYXc6IHEuZHJhdyxcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dDogcS5jb250ZXh0LFxuICAgICAgICAgICAgICAgICAgICBzdHlsZSxcbiAgICAgICAgICAgICAgICAgICAgbGF5b3V0OiBzdHlsZSxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gU3VibWl0IHBvaW50IGxhYmVscyBmb3IgY29sbGlzaW9uLCB0aGVuIGJ1aWxkIGdlb21ldHJ5IGZvciByZW1haW5pbmcgb25lc1xuICAgICAgICByZXR1cm4gQ29sbGlzaW9uLmNvbGxpZGUoYm94ZXMsIHRoaXMubmFtZSwgdGlsZSkudGhlbihib3hlcyA9PiB7XG4gICAgICAgICAgICBib3hlcy5mb3JFYWNoKHEgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZmVhdHVyZV9zdHlsZSA9IHEuc3R5bGU7XG4gICAgICAgICAg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ICB9XG4gICAgICAgIGVsc2UgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiTXVsdGlQb2ludFwiKSB7XG4gICAgICAgICAgICBsZXQgcG9pbnRzID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBvaW50cy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgIGxldCBwb2ludCA9IHBvaW50c1tpXTtcbiAgICAgICAgICAgICAgICBsYWJlbHMucHVzaChuZXcgTGFiZWxQb2ludChwb2ludCwgc2l6ZSwgb3B0aW9ucykpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiTGluZVN0cmluZ1wiKSB7XG4gICAgICAgICAgICAvLyBQb2ludCBhdCBlYWNoIGxpbmUgdmVydGV4XG4gICAgICAgICAgICBsZXQgcG9pbnRzID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBvaW50cy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgIGxhYmVscy5wdXNoKG5ldyBMYWJlbFBvaW50KHBvaW50c1tpXSwgc2l6ZSwgb3B0aW9ucykpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiTXVsdGlMaW5lU3RyaW5nXCIpIHtcbiAgICAgICAgICAgIC8vIFBvaW50IGF0IGVhY2ggbGluZSB2ZXJ0ZXhcbiAgICAgICAgICAgIGxldCBsaW5lcyA9IGdlb21ldHJ5LmNvb3JkaW5hdGVzO1xuICAgICAgICAgICAgZm9yIChsZXQgbG4gPSAwOyBsbiA8IGxpbmVzLmxlbmd0aDsgbG4rKykge1xuICAgICAgICAgICAgICAgIGxldCBwb2ludHMgPSBsaW5lc1tsbl07XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxzLnB1c2gobmV3IExhYmVsUG9pbnQocG9pbnRzW2ldLCBzaXplLCBvcHRpb25zKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGdlb21ldHJ5LnR5cGUgPT09IFwiUG9seWdvblwiKSB7XG4gICAgICAgICAgICAvLyBQb2ludCBhdCBwb2x5Z29uIGNlbnRyb2lkIChvZiBvdXRlciByaW5nKVxuICAgICAgICAgICAgaWYgKG9wdGlvbnMuY2VudHJvaWQpIHtcbiAgICAgICAgICAgICAgICBsZXQgY2VudHJvaWQgPSBHZW8uY2VudHJvaWQoZ2VvbWV0cnkuY29vcmRpbmF0ZXNbMF0pO1xuICAgICAgICAgICAgICAgIGxhYmVscy5wdXNoKG5ldyBMYWJlbFBvaW50KGNlbnRyb2lkLCBzaXplLCBvcHRpb25zKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBQb2ludCBhdCBlYWNoIHBvbHlnb24gdmVydGV4IChhbGwgcmluZ3MpXG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBsZXQgcmluZ3MgPSBnZW9tZXRyeS5jb29yZGluYXRlcztcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBsbiA9IDA7IGxuIDwgcmluZ3MubGVuZ3RoOyBsbisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwb2ludHMgPSByaW5nc1tsbl07XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcG9pbnRzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbHMucHVzaChuZXcgTGFiZWxQb2ludChwb2ludHNbaV0sIHNpemUsIG9wdGlvbnMpKTtcbiAgICAgICAgICAgICAgIC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cud2Fybihtc2cpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gWm9vbXMgb2Z0ZW4gY3VsbCBsYXJnZSBzd2F0aHMgb2YgdGhlIGxheWVyIHJ1bGUgdHJlZSwgc28gdGhleSBnZXQgc3BlY2lhbCB0cmVhdG1lbnQgYW5kIGFyZSBjaGVja2VkIGZpcnN0XG4gICAgYnVpbGRab29tcygpIHtcbiAgICAgICAgbGV0IHpvb20gPSB0aGlzLmZpbHRlciAmJiB0aGlzLmZpbHRlci4kem9vbTtcbiAgICAgICAgbGV0IHp0eXBlID0gdHlwZW9mIHpvb207XG4gICAgICAgIGlmICh6b29tICE9IG51bGwgJiYgenR5cGUgIT09ICdmdW5jdGlvbicpIHsgLy8gZG9uJ3QgYWNjZWxlcmF0ZSBmdW5jdGlvbi1iYXNlZCBmaWx0ZXJzXG4gICAgICAgICAgICB0aGlzLnpvb21zID0ge307XG5cbiAgICAgICAgICAgIGlmICh6dHlwZSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnpvb21zW3pvb21dID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoem9vbSkpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCB6PTA7IHogPCB6b29tLmxlbmd0aDsgeisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuem9vbXNbem9vbVt6XV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHp0eXBlID09PSAnb2JqZWN0JyAmJiAoem9vbS5taW4gIT0gbnVsbCB8fCB6b29tLm1heCAhPSBudWxsKSkge1xuICAgICAgICAgICAgICAgIGxldCB6bWluID0gem9vbS5taW4gfHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgem1heCA9IHpvb20ubWF4IHx8IDI1OyAvLyBUT0RPOiByZXBsYWNlIG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BydWxlID0gZHJhd19ydWxlc1tyXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFydWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBnPTA7IGcgPCBydWxlLmxlbmd0aDsgZysrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZ3JvdXAgPSBydWxlW2ddO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIGdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJhd19rZXlzW2tleV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ2FsY3VsYXRlIGVhY2ggZHJhdyBncm91cFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGRyYXdfa2V5IGluIGRyYXdfa2V5cykge1xuICAgICAgICAgICAgICAgICAgICBydWxlQ2FjaGVbY2FjaGVfa2V5XSA9IHJ1bGVDYWNoZVtjYWNoZV9rZXldIHx8IHt9O1xuICAgICAgICAgICAgICAgICAgICBydWxlQ2FjaGVbY2FjaGVfa2V5XVtkcmF3X2tleV0gPSBtZXJnZVRyZWVzKGRyYXdfcnVsZXMsIGRyYXdfa2V5KTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBPbmx5IHNhdmUgdGhlIG9uZXMgdGhhdCB3ZXJlbid0IG51bGxcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFydWxlQ2FjaGVbY2FjaGVfa2V5XVtkcmF3X2tleV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlQ2FjaGVbY2FjaGVfa2V5XVtkcmF3X2tleV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlQ2FjaGVbY2FjaGVfa2V5XVtkcmF3X2tleV0ua2V5ID0gY2FjaGVfa2V5ICsgJy8nICsgZHJhd19rZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlQ2FjaGVbY2FjaGVfa2V5XVtkcmF3X2tleV0ubGF5ZXJzID0gcnVsZXMubWFwKHggPT4geCAmJiB4LmZ1bGxfbmFtZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBObyBydWxlcyBldmFsdWF0ZWRcbiAgICAgICAgICAgICAgICBpZiAocnVsZUNhY2hlW2NhY2hlX2tleV0gJiYgT2JqZWN0LmtleXMocnVsZUNhY2hlW2NhY2hlX2tleV0pLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBydWxlQ2FjaGVbY2FjaGVfa2V5XSA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJ1bGVDYWNoZVtjYWNoZV9rZXldO1xuICAgICAgICB9XG4gICAgfVxuXG59XG5cbmZ1bmN0aW9uIGlzV2hpdGVMaXN0ZWQoa2V5KSB7XG4gICAgcmV0dXJuIHdoaXRlTGlzdC5pbmRleE9mKGtleSkgPiAtMTtcbn1cblxuZnVuY3Rpb24gaXNFbXB0eShvYmopIHtcbiAgICByZXR1cm4gT2JqZWN0LmtleXMob2JqKS5sZW5ndGggPT09IDA7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3YWxrVXAocnVsZSwgY2IpIHtcblxuICAgIGlmIChydWxlLnBhcmVudCkge1xuICAgICAgICB3YWxrVXAocnVsZS5wYXJlbnQsIGNiKTtcbiAgICB9XG5cbiAgICBjYihydWxlKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdhbGtEb3duKHJ1bGUsIGNiKSB7XG5cbiAgICBpZiA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jb3JyZWN0bHkgbmVzdGVkIGxheWVyXG4gICAgICAgICAgICAgICAgaWYgKFN0eWxlc1tyLm5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZyArPSBgIFRoZSBwYXJlbnQgJyR7ci5uYW1lfScgaXMgYWxzbyB0aGUgbmFtZSBvZiBhIHN0eWxlLCBkaWQgeW91IG1lYW4gdG8gY3JlYXRlIGEgJ2RyYXcnIGdyb3VwYDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXNnICs9IGAgdW5kZXIgJyR7cGFyZW50Lm5hbWV9J2A7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXNnICs9IGAgaW5zdGVhZD9gO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2cud2Fybihtc2cpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICB9XG5cbiAgICByZXR1cm4gcjtcbn1cblxuXG5leHBvcnQgZnVuY3Rpb24gcGFyc2VSdWxlcyhydWxlcykge1xuICAgIGxldCBydWxlVHJlZXMgPSB7fTtcblxuICAgIGZvciAobGV0IGtleSBpbiBydWxlcykge1xuICAgICAgICBsZXQgcnVsZSA9IHJ1bGVzW2tleV07XG4gICAgICAgIGlmIChydWxlKSB7XG4gICAgICAgICAgICBydWxlVHJlZXNba2V5XSA9IHBhcnNlUnVsZVRyZWUoa2V5LCBydWxlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBydWxlVHJlZXM7XG59XG5cblxuZnVuY3Rpb24gZG9lc01hdGNoKHJ1bGUsIGNvbnRleHQpIHtcbiAgICAvLyB6b29tIHByZS1maWx0ZXI6IHNraXAgcmVzdCBvZiBmaWx0ZXIgaWYgb3V0IG9mIHJ1bGUgem9vbSByYW5nZVxuICAgIGlmIChydWxlLnpvb21zICE9IG51bGwgJiYgIXJ1bGUuem9vbXNbY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AgICAgICAgICAgZXh0ZW5zaW9uc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICB0aGlzLnByb2dyYW0uY29tcGlsZSgpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5zZWxlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbl9wcm9ncmFtID0gbmV3IFNoYWRlclByb2dyYW0oXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZ2wsXG4gICAgICAgICAgICAgICAgICAgIHNoYWRlclNvdXJjZXNbdGhpcy52ZXJ0ZXhfc2hhZGVyX2tleV0sXG4gICAgICAgICAgICAgICAgICAgIHNoYWRlclNvdXJjZXNbJ2dsL3NoYWRlcnMvc2VsZWN0aW9uX2ZyYWdtZW50J10sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6ICh0aGlzLm5hbWUgKyAnIChzZWxlY3Rpb24pJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZpbmVzOiBzZWxlY3Rpb25fZGVmaW5lcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuaWZvcm1zLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tfc2NvcGVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0ZW5zaW9uc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbl9wcm9ncmFtLmNvbXBpbGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uX3Byb2dyYW0gPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhdGNoKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLm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gaW1wb3J0IGZvciB0aGlzIFVSTFxuICAgICAgICAgICAgdXJsc1t1cmxdLnB1c2goe1xuICAgICAgICAgICAgICAgIHRhcmdldF9uYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgIHNvdXJjZV9uYW1lOiBzdHlsZS5uYW1lIHx8IG5hbWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gQXMgZWFjaCBVUkwgZmluaXNoZXMgbG9hZGluZywgcmVwbGFjZSB0aGUgdGFyZ2V0IHN0eWxlKHMpXG4gICAgcmV0dXJuIFByb21pc2UuYWxsKE9iamVjdC5rZXlzKHVybHMpLm1hcCh1cmwgPT4ge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgVXRpbHMubG9hZFJlc291cmNlKHVybCkudGhlbigoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIE1peGluIHJlbW90ZSBzdHlsZXMsIHdpdGhpbiBlYWNoIHJlbW90ZSBmaWxlXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogbWF5IG5vdCBoYW5kbGUgbXVsdGlwbGUgbGV2ZWxzIG9mIG1peGlucywgYW5kIHdpbGwgbm90IGhhbmRsZSBuZXN0ZWQgcmVtb3RlIGZpbGVzXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgc291cmNlX25hbWUgaW4gZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgc291cmNlX2ltcG9ydCA9IHVybHNbdXJsXSAmJiB1cmxzW3VybF0uZmlsdGVyKHMgPT4gcy5zb3VyY2VfbmFtZSA9PT0gc291cmNlX25hbWUpO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VfaW1wb3J0ID0gc291cmNlX2ltcG9ydCAmJiBzb3VyY2VfaW1wb3J0WzBdO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChzb3VyY2VfaW1wb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1c2UgaW1wb3J0ZWQgbmFtZSBpZiBkaWZmZXJlbnQgZnJvbSBuYW1lIGluIHNvdXJjZSBmaWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhW3NvdXJjZV9uYW1lXS5uYW1lID0gc291cmNlX2ltcG9ydC50YXJnZXRfbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbc291cmNlX25hbWVdLm5hbWUgPSBzb3VyY2VfbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGRhdGFbc291cmNlX25hbWVdID0gU3R5bGVNYW5hZ2VyLm1peChkYXRhW3NvdXJjZV9uYW1lXSwgZGF0YSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQWRkIHJlbW90ZSBzdHlsZXMgdG8gbG9jYWwgc3R5bGVzXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdGFyZ2V0IG9mIHVybHNbdXJsXSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhW3RhcmdldC5zb3VyY2VfbmFtZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlc1t0YXJnZXQudGFyZ2V0X25hbWVdID0gZGF0YVt0YXJnZXQuc291cmNlX25hbWVdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHN0eWxlc1t0YXJnZXQudGFyZ2V0X25hbWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChuZXcgRXJyb3IoYFN0eWxlTWFuYWdlci5sb2FkUmVtb3RlU3R5bGVzOiBlcnJvciBpbXBvcnRpbmcgc3R5bGUgJHt0YXJ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MuZW50cmllcyhzdHlsZS5zaGFkZXJzLmJsb2NrcykpIHtcbiAgICAgICAgICAgICAgICBsZXQgX2tleSA9IGtleTtcblxuICAgICAgICAgICAgICAgIC8vIEFycmF5IG9mIGJsb2Nrc1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGJsb2NrKSkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBiPTA7IGIgPCBibG9jay5sZW5ndGg7IGIrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBibG9ja1tiXSA9PT0gJ29iamVjdCcgJiYgYmxvY2tbYl0udXJsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IF9pbmRleCA9IGI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGJsb2NrW2JdLnVybDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYmFzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSBVdGlscy5hZGRCYXNlVVJMKHVybCwgYmFzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWUucHVzaChVdGlscy5pbyhVdGlscy5jYWNoZUJ1c3RlckZvclVybCh1cmwpKS50aGVuKChkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9ibG9ja3NbX2tleV1bX2luZGV4XSA9IGRhdGE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZy5lcnJvcihgU3R5bGVNYW5hZ2VyLmxvYWRTaGFkZXJCbG9ja3M6IGVycm9yIGxvYWRpbmcgc2hhZGVyIGJsb2NrYCwgX2Jsb2NrcywgX2tleSwgX2luZGV4LCBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFNpbmdsZSBibG9ja1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBibG9jayA9PT0gJ29iamVjdCcgJiYgYmxvY2sudXJsKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBibG9jay51cmw7XG4gICAgICAgICAgICAgICAgICAgIGlmIChiYXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSBVdGlscy5hZGRCYXNlVVJMKHVybCwgYmFzZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKFV0aWxzLmlvKFV0aWxzLmNhY2hlQnVzdGVyRm9yVXJsKHVybCkpLnRoZW4oKGRhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9ibG9ja3NbX2tleV0gPSBkYXRhO1xuICAgICAgICAgICAgICAgICAgICB9KS5jYXRjaCgoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZy5lcnJvcihgU3R5bGVNYW5hZ2VyLmxvYWRTaGFkZXJCbG9ja3M6IGVycm9yIGxvYWRpbmcgc2hhZGVyIGJsb2NrYCwgX2Jsb2NrcywgX2tleSwgZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBQcm9taXNlLmFsbChxdWV1ZSkudGhlbigoKSA9PiBQcm9taXNlLnJlc29sdmUoc3R5bGVzKSk7IC8vIFRPRE86IGFkZCBlcnJvclxufTtcblxuU3R5bGVNYW5hZ2VyLm1peCA9IGZ1bmN0aW9uIChzdHlsZSwgc3R5bGVzKSB7XG4gICAgLy8gR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dWx0aXBsZSBhbmNlc3RvcnMgKHZpYSBtaXhpbnMpXG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHNoYWRlcnMudW5pZm9ybXMsIHUsIHtcbiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVuaWZvcm0gaXMgZXhwbGljaXRseSBkZWZpbmVkIG9uIHRoaXMgc3R5bGVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzaGFkZXJzLl91bmlmb3Jtc1t1XSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNoYWRlcnMuX3VuaWZvcm1zW3VdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVW5pZm9ybSB3YXMgbWl4ZWQgZnJvbSBhbm90aGVyIHN0eWxlLCBmb3J3YXJkIHJlcXVlc3QgdGhlcmVcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElkZW50aWZ5IGNoZWNrIGlzIG5lZWRlZCB0byBwcmV2ZW50IGluZmluaXRlIHJlY3Vyc2lvbiBpZiBhIHByZXZpb3VzbHkgZGVmaW5lZCB1bmlmb3JtXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpcyBzZXQgdG8gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChzdHlsZXNbc2hhZGVycy5fdW5pZm9ybV9zY29wZXNbdV1dLnNoYWRlcnMudW5pZm9ybXMgIT09IHNoYWRlcnMudW5pZm9ybXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3R5bGVzW3NoYWRlcnMuX3VuaWZvcm1fc2NvcGVzW3VdXS5zaGFkZXJzLnVuaWZvcm1zW3VdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaGFkZXJzLl91bmlmb3Jtc1t1XSA9IHY7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAvLyBFeHRlbnNpb25zOiBidWlsZCBhIGxpc3Qgb2YgdW5pcXVlIGV4dGVuc2lvbnNcbiAgICBzaGFkZXJzLmV4dGVuc2lvbnMgPSBPYmplY3Qua2V5cyhzaGFkZXJfbWVyZ2VzXG4gICAgICAgIC5tYXAoeCA9PiB4LmV4dGVuc2lvbnMpXG4gICAgICAgIC5maWx0ZXIoeCA9PiB4KVxuICAgICAgICAucmVkdWNlKChwcmV2LCBjdXIpID0+IHtcbiAgICAgICAgICAgIC8vIHNpbmdsZSBleHRlbnNpb25cbiAgICAgICAgICAgIGlmICh0eXBlb2YgY3VyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIHByZXZbY3VyXSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBhcnJheSBvZiBleHRlbnNpb25zXG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjdXIuZm9yRWFjaCh4ID0+IHByZXZbeF0gPSB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9LCB7fSkgfHwge31cbiAgICApO1xuXG4gICAgLy8gU2hhZGVyIGJsb2Nrc1xuICAgIC8vIE1hcmsgYWxsIHNoYWRlciBibG9ja3MgZm9yIHRoZSB0YXJnZXQgc3R5bGUgYXMgb3JpZ2luYXRpbmcgd2l0aCBpdH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GVzKSBhbmQgZnV0dXJlIChzdHlsZXMpIGR1cGxpY2F0aW9uLCBjb25mdXNpbmdcblN0eWxlTWFuYWdlci5pbmhlcml0YW5jZURlcHRoID0gZnVuY3Rpb24gKGtleSwgc3R5bGVzKSB7XG4gICAgbGV0IHBhcmVudHMgPSAwO1xuXG4gICAgd2hpbGUodHJ1ZSkge1xuICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNba2V5XTtcbiAgICAgICAgaWYgKCFzdHlsZSkge1xuICAgICAgICAgICAgLy8gdGhpcyBpcyBhIHNjZW5lIGRlZiBlcnJvciwgdHJ5aW5nIHRvIGV4dGVuZCBhIHN0eWxlIHRoYXQgZG9lc24ndCBleGlzdFxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBEZXBlbmRlbmN5IGNoYWluIGVuZHMgd2hlbiB0aGlzIHN0eWxlIGlzbid0IG1peGluZyBpbiBhbnkgb3RoZXJzXG4gICAgICAgIGlmICghc3R5bGUubWl4KSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFRyYXZlcnNlIG5leHQgcGFyZW50IHN0eWxlXG4gICAgICAgIHBhcmVudHMrKztcblxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShzdHlsZS5taXgpKSB7XG4gICAgICAgICAgICAvLyBJZiBtdWx0aXBsZSBtaXhpbnMsIGZpbmQgdGhlIGRlZXBlc3Qgb25lXG4gICAgICAgICAgICBwYXJlbnRzICs9IE1hdGgubWF4KC4uLnN0eWxlLm1peC5tYXAocyA9PiB7XG4gICAgICAgICAgICAgICAgLy8gVHJ5aW5nIHRvIG1peCBpbnRvIGl0c2VsZiFcbiAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSBzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gU3R5bGVNYW5hZ2VyLmluaGVyaXRhbmNlRGVwdGgocywgc3R5bGVzKTtcbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gVHJ5aW5nIHRvIG1peCBpbnRvIGl0c2VsZiFcbiAgICAgICAgICAgIGlmIChrZXkgPT09IHN0eWxlLm1peCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBJZiBzaW5nbGUgbWl4aW4sIGNvbnRpbnVlIGxvb3AgdXAgdGhlIHRyZWVcbiAgICAgICAgICAgIGtleSA9IHN0eWxlLm1peDtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcGFyZW50cztcbn07XG5cbi8vIENvbXBpbGUgYWxsIHN0eWxlc1xuU3R5bGVNYW5hZ2VyLmNvbXBpbGUgPSBmdW5jdGlvbiAoa2V5cywgc2NlbmUpIHtcbiAgICBrZXlzID0ga2V5cyB8fCBPYmplY3Qua2V5cyhTdHlsZXMpO1xuICAgIGZvciAobGV0IGtleSBvZiBrZXlzKSB7XG4gICAgICAgIGxldCBzdHlsZSA9IFN0eWxlc1trZXldO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgc3R5bGUuY29tcGlsZSgpO1xuICAgICAgICAgICAgbG9nLnRyYWNlKGBTdHlsZU1hbmFnZXIuY29tcGlsZSgpOiBjb21waWxlZCBzdHlsZSAke2tleX1gKTtcbiAgICAgICAgfVxuICAgICAgICBjYXRjaChlcnJvcikge1xuICAgICAgICAgICAgbG9nLmVycm9yKGBTdHlsZU1hbmFnZXIuY29tcGlsZSgpOiBlcnJvciBjb21waWxpbmcgc3R5bGUgJHtrZXl9OmAsIGVycm9yKTtcblxuICAgICAgICAgICAgc2NlbmUudHJpZ2dlcignd2FybmluZycsIHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnc3R5bGVzJyxcbiAgICAgICAgICAgICAgICBt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b21wdXRlIGVhY2ggdGltZSAobm8gY2FjaGluZylcbiAgICAgICAgbGV0IHYgPSB2YWwuZHluYW1pYyhjb250ZXh0KTtcbiAgICAgICAgcmV0dXJuIHY7XG4gICAgfVxuICAgIGVsc2UgaWYgKHZhbC5zdGF0aWMpIHsgLy8gc2luZ2xlIHN0YXRpYyB2YWx1ZVxuICAgICAgICByZXR1cm4gdmFsLnN0YXRpYztcbiAgICB9XG4gICAgZWxzZSBpZiAodmFsLnpvb20gJiYgdmFsLnpvb21bY29udGV4dC56b29tXSkgeyAvLyBpbnRlcnBvbGF0ZWQsIGNhY2hlZFxuICAgICAgICByZXR1cm4gdmFsLnpvb21bY29udGV4dC56b29tXTtcbiAgICB9XG4gICAgZWxzZSB7IC8vIG5vdCB5ZXQgZXZhdWxhdGVkIGZvciBjYWNoZVxuICAgICAgICAvLyBEeW5hbWljIGZ1bmN0aW9uLWJhc2VkXG4gICAgICAgIGlmICh0eXBlb2YgdmFsLnZhbHVlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB2YWwuZHluYW1pYyA9IHZhbC52YWx1ZTtcbiAgICAgICAgICAgIGxldCB2ID0gdmFsLmR5bmFtaWMoY29udGV4dCk7XG4gICAgICAgICAgICByZXR1cm4gdjtcbiAgICAgICAgfVxuICAgICAgICAvLyBBcnJheSBvZiB6b29tLWludGVycG9sYXRlZCBzdG9wcywgZS5nLiBbem9vbSwgdmFsdWVdIHBhaXJzXG4gICAgICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkodmFsLnZhbHVlKSAmJiBBcnJheS5pc0FycmF5KHZhbC52YWx1ZVswXSkpIHtcbiAgICAgICAgICAgIC8vIENhbGN1bGF0ZSB2YWx1ZSBmb3IgY3VycmVudCB6b29tXG4gICAgICAgICAgICB2YWwuem9vbSA9IHZhbC56b29tIHx8IHt9O1xuICAgICAgICAgICAgdmFsLnpvb20gPSB7fTtcbiAgICAgICAgICAgIHZhbC56b29tW2NvbnRleHQuem9vbV0gPSBVdGlscy5pbnRlcnBvbGF0ZShjb250ZXh0Lnpvb20sIHZhbC52YWx1ZSk7XG4gICAgICAgICAgICByZXR1cm4gdmFsLnpvb21bY29udGV4dC56b29tXTtcbiAgICAgICAgfVxuICAgICAgICAvLyBTaW5nbGUgc3RhdGljIHZhbHVlXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFsLnN0YXRpYyA9IHZhbC52YWx1ZTtcbiAgICAgICAgICAgIHJldHVybiB2YWwuc3RhdGljO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuU3R5bGVQYXJzZXIuY29udmVydFVuaXRzID0gZnVuY3Rpb24odmFsLCBjb250ZXh0KSB7XG4gICAgLy8gcHJlLXBhcnNlZCB1bml0c1xuICAgIGlmICh2YWwudmFsICE9IG51bGwpIHtcbiAgICAgICAgaWYgKHZhbC51bml0cyA9PT0gJ3B4JykgeyAvLyBjb252ZXJ0IGZyb20gcGl4ZWxzXG4gICAgICAgICAgICByZXR1cm4gdmFsLnZhbCAqIEdlby5tZXRlcnNQZXJQaXhlbChjb250ZXh0Lnpvb20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2YWwudmFsO1xuICAgIH1cbiAgICAvLyB1bi1wYXJzZWQgdW5pdCBzdHJpbmdcbiAgICBlbHNlIGlmICh0eXBlb2YgdmFsID09PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgdW5pdHMgPSB2YWwubWF0Y2goLyhbMC05Li1dKykoW2Etel0rKS8pO1xuICAgICAgICBpZiAodW5pdHMgJiYgdW5pdHMubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB2YWwgPSBwYXJzZUZsb2F0KHVuaXRzWzFdKTtcbiAgICAgICAgICAgIHVuaXRzID0gdW5pdHNbMl07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodW5pdHMgPT09ICdweCcpIHsgLy8gY29udmVydCBmcm9tIHBpeGVsc1xuICAgICAgICAgICAgdmFsICo9IEdlby5tZXRlcnNQZXJQ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y8gVGFrZXMgYSBjb2xvciBjYWNoZSBvYmplY3QgYW5kIHJldHVybnMgYSBjb2xvciB2YWx1ZSBmb3IgdGhpcyB6b29tXG4vLyAoY2FjaGluZyB0aGUgcmVzdWx0IGZvciBmdXR1cmUgdXNlKVxuLy8geyB2YWx1ZTogb3JpZ2luYWwsIHN0YXRpYzogW3IsZyxiLGFdLCB6b29tOiB7IHo6IFtyLGcsYixhXSB9LCBkeW5hbWljOiBmdW5jdGlvbigpey4uLn0gfVxuU3R5bGVQYXJzZXIuY2FjaGVDb2xvciA9IGZ1bmN0aW9uKHZhbCwgY29udGV4dCA9IHt9KSB7XG4gICAgaWYgKHZhbC5keW5hbWljKSB7XG4gICAgICAgIGxldCB2ID0gdmFsLmR5bmFtaWMoY29udGV4dCk7XG4gICAgICAgIGlmICh2ICYmIHZbM10gPT0gbnVsbCkge1xuICAgICAgICAgICAgdlszXSA9IDE7IC8vIGRlZmF1bHQgYWxwaGFcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdjtcbiAgICB9XG4gICAgZWxzZSBpZiAodmFsLnN0YXRpYykge1xuICAgICAgICByZXR1cm4gdmFsLnN0YXRpYztcbiAgICB9XG4gICAgZWxzZSBpZiAodmFsLnpvb20gJiYgdmFsLnpvb21bY29udGV4dC56b29tXSkge1xuICAgICAgICByZXR1cm4gdmFsLnpvb21bY29udGV4dC56b29tXTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIC8vIER5bmFtaWMgZnVuY3Rpb24tYmFzZWQgY29sb3JcbiAgICAgICAgaWYgKHR5cGVvZiB2YWwudmFsdWUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHZhbC5keW5hbWljID0gdmFsLnZhbHVlO1xuICAgICAgICAgICAgbGV0IHYgPSB2YWwuZHluYW1pYyhjb250ZXh0KTtcbiAgICAgICAgICAgIGlmICh2ICYmIHZbM10gPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHZbM10gPSAxOyAvLyBkZWZhdWx0IGFscGhhXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdjtcbiAgICAgICAgfVxuICAgICAgICAvLyBTaW5nbGUgc3RyaW5nIGNvbG9yXG4gICAgICAgIGVsc2UgaWYgKHR5cGVvZiB2YWwudmFsdWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICB2YWwuc3RhdGljID0gU3R5bGVQYXJzZXIuY29sb3JGb3JTdHJpbmcodmFsLnZhbHVlKTtcbiAgICAgICAgICAgIHJldHVybiB2YWwuc3RhdGljO1xuICAgICAgICB9XG4gICAgICAgIC8vIEFycmF5IG9mIHpvb20taW50ZXJwb2xhdGVkIHN0b3BzLCBlLmcuIFt6b29tLCBjb2xvcl0gcGFpcnNcbiAgICAgICAgZWxzZSBpZiAodmFsLnpvb20pIHtcbiAgICAgICAgICAgIC8vIFBhcnNlIGFueSBzdHJpbmcgY29sb3JzIGluc2lkZSBzdG9wcywgdGhlIGZpcnN0IHRpbWUgd2UgZW5jb3VudGVyIHRoaXMgcHJvcGVydHlcbiAgICAgICAgICAgIGlmICghdmFsLnpvb21fcHJlcHJvY2Vzc2VkKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgdmFsLnZhbHVlLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB2ID0gdmFsLnZhbHVlW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAodiAmJiB0eXBlb2YgdlsxXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZbMV0gPSBTdHlsZVBhcnNlci5jb2xvckZvclN0cmluZyh2WzFdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWwuem9vbV9wcmVwcm9jZXNzZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBDYWxjdWxhdGUgY29sb3IgZm9yIGN1cnJlbnQgem9vbVxuICAgICAgICAgICAgdmFsLnpvb21bY29udGV4dC56b29tXSA9IFV0aWxzLmludGVycG9sYXRlKGNvbnRleHQuem9vbSwgdmFsLnZhbHVlKTtcbiAgICAgICAgICAgIHZhbC56b29tW2NvbnRleHQuem9vbV1bM10gPSB2YWwuem9vbVtjb250ZXh0Lnpvb21dWzNdIHx8IDE7IC8vIGRlZmF1bHQgYWxwaGFcbiAgICAgICAgICAgIHJldHVybiB2YWwuem9vbVtjb250ZXh0Lnpvb21dO1xuICAgICAgICB9XG4gICAgICAgIC8vIFNpbmdsZSBhcnJheSBjb2xvclxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhbC5zdGF0aWMgPSB2YWwudmFsdWU7XG4gICAgICAgICAgICBpZiAodmFsLnN0YXRpYyAmJiB2YWwuc3RhdGljWzNdID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YWwuc3RhdGljWzNdID0gMTsgLy8gZGVmYXVsdCBhbHBoYVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHZhbC5zdGF0aWM7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5TdHlsZVBhcnNlci5wYXJzZUNvbG9yID0gZnVuY3Rpb24odmFsLCBjb250ZXh0ID0ge30pIHtcbiAgICBpZiAodHlwZW9mIHZhbCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB2YWwgPSB2YWwoY29udGV4dCk7XG4gICAgfVxuXG4gICAgLy8gUGFyc2UgQ1NTLXN0eWxlIGNvbG9yc1xuICAgIC8vIFRPRE86IGNoYW5nZSBhbGwgY29sb3JzIHRvIHVzZSAwLTI1NSByYW5nZSBpbnRlcm5hbGx5IHRvIGF2b2lkIGRpdmlkaW5nIGFuZCB0aGVuIHJlLW11bHRpcGx5aW5nIGluIGdlb20gYnVpbGRlclxuICAgIGlmICh0eXBlb2YgdmFsID09PSAnc3RyaW5nJykge1xuICAgICAgICB2YWwgPSBTdHls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sZSwgdGV4dHMpIHtcbiAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gdGV4dHMpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0X2luZm9zID0gdGV4dHNbc3R5bGVdO1xuXG4gICAgICAgICAgICBmb3IgKGxldCB0ZXh0IGluIHRleHRfaW5mb3MpIHtcbiAgICAgICAgICAgICAgICBsZXQgdGV4dF9zZXR0aW5ncyA9IHRleHRfaW5mb3NbdGV4dF0udGV4dF9zZXR0aW5ncztcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgdGV4dCBzaXplc1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0Rm9udCh0aWxlLCB0ZXh0X3NldHRpbmdzKTsgLy8gVE9ETzogb25seSBzZXQgb25jZSBhYm92ZVxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oXG4gICAgICAgICAgICAgICAgICAgIHRleHRfaW5mb3NbdGV4dF0sXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGV4dFNpemUoXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LFxuICAgICAgICAgICAgICAgICAgICAgICAgdGlsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfc2V0dGluZ3MudHJhbnNmb3JtLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dF9zZXR0aW5ncy50ZXh0X3dyYXBcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGV4dHM7XG4gICAgfVxuXG4gICAgLy8gQ29tcHV0ZXMgd2lkdGggYW5kIGhlaWdodCBvZiB0ZXh0IGJhc2VkIG9uIGN1cnJlbnQgZm9udCBzdHlsZVxuICAgIC8vIEluY2x1ZGVzIHdvcmQgd3JhcHBpbmcsIHJldHVybnMgc2l6ZSBpbmZvIGZvciB3aG9sZSB0ZXh0IGJsb2NrIGFuZCBpbmRpdmlkdWFsIGxpb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yZHMgPSBbc3RyXTsgLy8gbm8gbWF4IGxpbmUgd29yZCB3cmFwcGluZyAoYnV0IG5ldyBsaW5lcyB3aWxsIHN0aWxsIGJlIGluIGVmZmVjdClcbiAgICAgICAgfVxuICAgICAgICBsZXQgbmV3X2xpbmVfdGVtcGxhdGUgPSB7IHdpZHRoOiAwLCBjaGFyczogMCwgdGV4dDogJycgfTtcbiAgICAgICAgbGV0IGxpbmUgPSBPYmplY3QuYXNzaWduKHt9LCBuZXdfbGluZV90ZW1wbGF0ZSk7IC8vIGN1cnJlbnQgbGluZVxuICAgICAgICBsZXQgbGluZXMgPSBbXTsgLy8gY29tcGxldGVkIGxpbmVzXG4gICAgICAgIGxldCBtYXhfd2lkdGggPSAwOyAvLyBtYXggd2lkdGggdG8gZml0IGFsbCBsaW5lc1xuXG4gICAgICAgIC8vIGFkZCBjdXJyZW50IGxpbmUgYnVmZmVyIHRvIGNvbXBsZXRlZCBsaW5lcywgb3B0aW9uYWxseSBzdGFydCBuZXcgbGluZVxuICAgICAgICBmdW5jdGlvbiBhZGRMaW5lIChuZXdfbGluZSkge1xuICAgICAgICAgICAgbGluZS50ZXh0ID0gbGluZS50ZXh0LnRyaW0oKTtcbiAgICAgICAgICAgIGlmIChsaW5lLnRleHQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGxpbmUud2lkdGggPSBjdHgubWVhc3VyZVRleHQobGluZS50ZXh0KS53aWR0aDtcbiAgICAgICAgICAgICAgICBtYXhfd2lkdGggPSBNYXRoLm1heChtYXhfd2lkdGgsIE1hdGguY2VpbChsaW5lLndpZHRoKSk7XG4gICAgICAgICAgICAgICAgbGluZXMucHVzaChsaW5lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXdfbGluZSkge1xuICAgICAgICAgICAgICAgIGxpbmUgPSBPYmplY3QuYXNzaWduKHt9LCBuZXdfbGluZV90ZW1wbGF0ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICA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ICAgICAgICAgICAgICAgICAgICBhZGRMaW5lKHRydWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBhZGRMaW5lKGZhbHNlKTtcblxuICAgICAgICAvLyBGaW5hbCBkaW1lbnNpb25zIG9mIHRleHRcbiAgICAgICAgbGV0IGhlaWdodCA9IGxpbmVzLmxlbmd0aCAqIGxpbmVfaGVpZ2h0O1xuXG4gICAgICAgIGxldCBjb2xsaXNpb25fc2l6ZSA9IFtcbiAgICAgICAgICAgIG1heF93aWR0aCAvIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbyxcbiAgICAgICAgICAgIGhlaWdodCAvIFV0aWxzLmRldmljZV9waXhlbF9yYXRpb1xuICAgICAgICBdO1xuXG4gICAgICAgIGxldCB0ZXh0dXJlX3NpemUgPSBbXG4gICAgICAgICAgICBtYXhfd2lkdGggKyBidWZmZXIgKiAyLFxuICAgICAgICAgICAgaGVpZ2h0ICsgYnVmZmVyICogMlxuICAgICAgICBdO1xuXG4gICAgICAgIGxldCBsb2dpY2FsX3NpemUgPSB0ZXh0dXJlX3NpemUubWFwKHYgPT4gdiAvIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbyk7XG5cbiAgICAgICAgLy8gUmV0dXJucyBsaW5lcyAody9wZXItbGluZSBpbmZvIGZvciBkcmF3aW5nKSBhbmQgdGV4dCdzIG92ZXJhbGwgYm91bmRpbmcgYm94ICsgY2FudmFzIHNpemVcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGxpbmVzLFxuICAgICAgICAgICAgc2l6ZTogeyBjb2xsaXNpb25fc2l6ZSwgdGV4dHVyZV9zaXplLCBsb2dpY2FsX3NpemUsIGxpbmVfaGVpZ2h0IH1cbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICAvLyBEcmF3IG9uZSBvciBtb3JlIGxpbmVzIG9mIHRleHQgYXQgc3BlY2lmaWVkIGxvY2F0aW9uLCBhZGp1c3RpbmcgZm9yIGJ1ZmZlciBhbmQgYmFzZWxpbmVcbiAgICBkcmF3VGV4dCAobGluZXMsIFt4LCB5XSwgc2l6ZSwgdGlsZSwgeyBzdHJva2UsIHRyYW5zZm9ybSwgYWxpZ24gfSkge1xuICAgICAgICBhbGlnbiA9IGFsaWduIHx8ICdjZW50ZXInO1xuXG4gICAgICAgIGZvciAobGV0IGxpbmVfbnVtPTA7IGxpbmVfbnVtIDwgbGluZXMubGVuZ3RoOyBsaW5lX251bSsrKSB7XG4gICAgICAgICAgICBsZXQgbGluZSA9IGxpbmVzW2xpbmVfbnVtXTtcbiAgICAgICAgICAgIGxldCBzdHIgPSB0aGlzLmFwcGx5VGV4dFRyYW5zZm9ybShsaW5lLnRleHQsIHRyYW5zZm9ybSk7XG4gICAgICAgICAgICBsZXQgYnVmZmVyID0gdGhpcy50ZXh0X2J1ZmZlciAqIFV0aWxzLmRldmljZV9waXhlbF9yYXRpbztcbiAgICAgICAgICAgIGxldCB0ZXh0dXJlX3NpemUgPSBzaXplLnRleHR1cmVfc2l6ZTtcbiAgICAgICAgICAgIGxldCBsaW5lX2hlaWdodCA9IHNpemUubGluZV9oZWlnaHQ7XG5cbiAgICAgICAgICAgIC8vIFRleHQgYWxpZ25tZW50XG4gICAgICAgICAgICBsZXQgdHg7XG4gICAgICAgICAgICBpZiAoYWxpZ24gPT09ICdsZWZ0Jykge1xuICAgICAgICAgICAgICAgIHR4ID0geCArIGJ1ZmZlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGFsaWduID09PSAnY2VudGVyJykge1xuICAgICAgICAgICAgICAgIHR4ID0geCArIHRleHR1cmVfc2l6ZVswXS8yIC0gbGluZS53aWR0aC8yO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoYWxpZ24gPT09ICdyaWdodCcpIHtcbiAgICAgICAgICAgICAgICB0eCA9IHggKyB0ZXh0dXJlX3NpemVbMF0gLSBsaW5lLndpZHRo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ICAgICAgICAgICAgICAgICAgc3Ryb2tlOiBpbmZvLnRleHRfc2V0dGluZ3Muc3Ryb2tlLFxuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IGluZm8udGV4dF9zZXR0aW5ncy50cmFuc2Zvcm0sXG4gICAgICAgICAgICAgICAgICAgIGFsaWduOiBpbmZvLnRleHRfc2V0dGluZ3MuYWxpZ25cbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGluZm8udGV4Y29vcmRzID0gQnVpbGRlcnMuZ2V0VGV4Y29vcmRzRm9yU3ByaXRlKFxuICAgICAgICAgICAgICAgICAgICBpbmZvLnBvc2l0aW9uLFxuICAgICAgICAgICAgICAgICAgICBpbmZvLnNpemUudGV4dHVyZV9zaXplLFxuICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlX3NpemVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gUGxhY2UgdGV4dCBsYWJlbHMgd2l0aGluIGFuIGF0bGFzIG9mIHRoZSBnaXZlbiBtYXggc2l6ZVxuICAgIHNldFRleHR1cmVUZXh0UG9zaXRpb25zICh0ZXh0cywgbWF4X3RleHR1cmVfc2l6ZSkge1xuICAgICAgICAvLyBGaW5kIHdpZGVzdCBsYWJlbFxuICAgICAgICBsZXQgd2lkZXN0ID0gMDtcbiAgICAgICAgZm9yIChsZXQgc3R5bGUgaW4gdGV4dHMpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0X2luZm9zID0gdGV4dHNbc3R5bGVdO1xuICAgICAgICAgICAgZm9yIChsZXQgdGV4dCBpbiB0ZXh0X2luZm9zKSB7XG4gICAgICAgICAgICAgICAgbGV0IHNpemUgPSB0ZXh0X2luZm9zW3RleHRdLnNpemUudGV4dHVyZV9zaXplO1xuICAgICAgICAgICAgICAgIGlmIChzaXplWzBdID4gd2lkZXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIHdpZGVzdCA9IHNpemVbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gTGF5b3V0IGxhYmVscywgc3RhY2tlZCBpbiBjb2x1bW5zXG4gICAgICAgIGxldCBjeCA9IDAsIGN5ID0gMDsgLy8gY3VycmVudCB4L3kgcG9zaXRpb24gaW4gYXRsYXNcbiAgICAgICAgbGV0IGhlaWdodCA9IDA7ICAgICAvLyBvdmVyYWxsIGF0bGFzIGhlaWdodFxuICAgICAgICBmb3IgKGxldCBzdHlsZSBpbiB0ZXh0cykge1xuICAgICAgICAgICAgbGV0IHRleHRfaW5mb3MgPSB0ZXh0c1tzdHlsZV07XG4gICAgICAgICAgICBmb3IgKGxldCB0ZXh0IGluIHRleHRfaW5mb3MpIHtcbiAgICAgICAgICAgICAgICBsZXQgdGV4dF9pbmZvID0gdGV4dF9pbmZvc1t0ZXh0XTtcbiAgICAgICAgICAgICAgICBsZXQgc2l6ZSA9IHRleHRfaW5mby5zaXplLnRleHR1cmVfc2l6ZTtcbiAgICAgICAgICAgICAgICBpZiAoY3kgKyBzaXplWzFdIDwgbWF4X3RleHR1cmVfc2l6ZSkge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0X2luZm8ucG9zaXRpb24gPSBbY3gsIGN5XTsgLy8gYWRkIGxhYmVsIHRvIGN1cnJlbnQgY29sdW1uXG4gICAgICAgICAgICAgICAgICAgIGN5ICs9IHNpemVbMV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChjeSA+IGhlaWdodCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0ID0gY3k7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7IC8vIHN0YXJ0IG5ldyBjb2x1bW4gaWYgdGFsbGVyIHRoYW4gdGV4dHVyZVxuICAgICAgICAgICAgICAgICAgICBjeCArPSB3aWRlc3Q7XG4gICAgICAgICAgICA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dmlzaWJsZSBmb3IgdGhpcyB0aWxlXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5jdWxsVGV4dFN0eWxlcyh0ZXh0cywgbGFiZWxzKTtcblxuICAgICAgICAgICAgICAgIC8vIHNlY29uZCBjYWxsIHRvIG1haW4gdGhyZWFkLCBmb3IgcmFzdGVyaXppbmcgdGhlIHNldCBvZiB0ZXh0c1xuICAgICAgICAgICAgICAgIHJldHVybiBXb3JrZXJCcm9rZXIucG9zdE1lc3NhZ2UodGhpcy5tYWluX3RocmVhZF90YXJnZXQrJy5yYXN0ZXJpemVUZXh0cycsIHRpbGUsIHRleHRzKS50aGVuKCh7IHRleHRzLCB0ZXh0dXJlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRleHRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHRzW3RpbGVdID0gdGV4dHM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJ1aWxkIHF1ZXVlZCBmZWF0dXJlc1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxzLmZvckVhY2gocSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHRfc2V0dGluZ3Nfa2V5ID0gcS50ZXh0X3NldHRpbmdzX2tleTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dF9pbmZvID0gdGhpcy50ZXh0c1t0aWxlXSAmJiB0aGlzLnRleHRzW3RpbGVdW3RleHRfc2V0dGluZ3Nfa2V5XSAmJiB0aGlzLnRleHRzW3RpbGVdW3RleHRfc2V0dGluZ3Nfa2V5XVtxLnRleHRdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0dXAgc3R5bGluZyBvYmplY3QgZXhwZWN0ZWQgYnkgU3R5bGUgY2xhc3NcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGUgPSB0aGlzLmZlYXR1cmVfc3R5bGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUubGFiZWwgPSBxLmxhYmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnNpemUgPSB0ZXh0X2luZm8uc2l6ZS5sb2dpY2FsX3NpemU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuYW5nbGUgPSBVdGlscy5yYWRUb0RlZyhxLmxhYmVsLmFuZ2xlKSB8fCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnRleGNvb3JkcyA9IHRleHRfaW5mby50ZXhjb29yZHM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdHlsZS5hZGRGZWF0dXJlLmNhbGwodGhpcywgcS5mZWF0dXJlLCBxLmRyYXcsIHEuY29udGV4dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmZpbmlzaFRpbGUodGlsZSkudGhlbih0aWxlX2RhdGEgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXR0YWNoIHRpbGUtc3BlY2lmaWMgbGFiZWwgYXRsYXMgdG8gbWVzaCBhcyBhIHRleHR1cmUgdW5pZm9ybVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHR1cmUgJiYgdGlsZV9kYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlsZV9kYXRhLnVuaWZvcm1zID0geyB1X3RleHR1cmU6IHRleHR1cmUgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aWxlX2RhdGEudGV4dHVyZXMgPSBbdGV4dHVyZV07IC8vIGFzc2lnbiB0ZXh0dXJlIG93bmVyc2hpcCB0byB0aWxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRpbGVfZGF0YTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSxcblxuICAgIGNyZWF0ZUxhYmVscyAodGlsZSwgZmVhdHVyZV9xdWV1ZSkge1xuICAgICAgICBsZXQgbGFiZWxzID0gW107XG5cbiAgICAgICAgZm9yIChsZXQgZj0wOyBmIDwgZmVhdHVyZV9xdWV1ZS5sZW5ndGg7IGYrKykge1xuICAgICAgICAgICAgbGV0IHsgZmVhdHVyZSwgZHJhdywgY29udGV4dCwgdGV4dCwgdGV4dF9zZXR0aW5nc19rZXksIGxheW91dCB9ID0gZmVhdHVyZV9xdWV1ZVtmXTtcbiAgICAgICAgICAgIGxldCB0ZXh0X2luZm8gPSB0aGlzLnRleHRzW3RpbGVdW3RleHRfc2V0dGluZ3Nfa2V5XVt0ZXh0XTtcblxuICAgICAgICAgICAgbGV0IGZlYXR1cmVfbGFiZWxzID0gdGhpcy5idWlsZExhYmVsc0Zyb21HZW9tZXRyeSh0ZXh0X2luZm8uc2l6ZS5jb2xsaXNpb25fc2l6ZSwgZmVhdHVyZS5nZW9tZXRyeSwgbGF5b3V0KTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmVhdHVyZV9sYWJlbHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgbGFiZWwgPSBmZWF0dXJlX2xhYmVsc1tpXTtcbiAgICAgICAgICAgICAgICBsYWJlbHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGZlYXR1cmUsIGRyYXcsIGNvbnRleHQsXG4gICAgICAgICAgICAgICAgICAgIHRleHQsIHRleHRfc2V0dGluZ3Nfa2V5LCBsYXlvdXQsIGxhYmVsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGFiZWxzO1xuICAgIH0s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ZiAoY29vcmRzLnkgPCAwIHx8IGNvb3Jkcy55ID49ICgxIDw8IGNvb3Jkcy56KSB8fCBjb29yZHMueiA8IDApIHtcbiAgICAgICAgICAgIHJldHVybjsgLy8gY3VsbCB0aWxlcyBvdXQgb2YgcmFuZ2UgKHggd2lsbCB3cmFwKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBbc291cmNlLm5hbWUsIHN0eWxlX3pvb20sIGNvb3Jkcy54LCBjb29yZHMueSwgY29vcmRzLnpdLmpvaW4oJy8nKTtcbiAgICB9XG5cbiAgICBzdGF0aWMgY29vcmRpbmF0ZUF0Wm9vbSh7eCwgeSwgen0sIHpvb20pIHtcbiAgICAgICAgaWYgKHogIT09IHpvb20pIHtcbiAgICAgICAgICAgIGxldCB6c2NhbGUgPSBNYXRoLnBvdygyLCB6IC0gem9vbSk7XG4gICAgICAgICAgICB4ID0gTWF0aC5mbG9vcih4IC8genNjYWxlKTtcbiAgICAgICAgICAgIHkgPSBNYXRoLmZsb29yKHkgLyB6c2NhbGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7eCwgeSwgejogem9vbX07XG4gICAgfVxuXG4gICAgc3RhdGljIGlzQ2hpbGQocGFyZW50LCBjaGlsZCkge1xuICAgICAgICBpZiAoY2hpbGQueiA+IHBhcmVudC56KSB7XG4gICAgICAgICAgICBsZXQge3gsIHl9ID0gVGlsZS5jb29yZGluYXRlQXRab29tKGNoaWxkLCBwYXJlbnQueik7XG4gICAgICAgICAgICByZXR1cm4gKHBhcmVudC54ID09PSB4ICYmIHBhcmVudC55ID09PSB5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgc3RhdGljIG92ZXJab29tZWRDb29yZGluYXRlKHt4LCB5LCB6fSwgbWF4X3pvb20pIHtcbiAgICAgICAgaWYgKG1heF96b29tICE9PSB1bmRlZmluZWQgJiYgeiA+IG1heF96b29tKSB7XG4gICAgICAgICAgICByZXR1cm4gVGlsZS5jb29yZGluYXRlQXRab29tKHt4LCB5LCB6fSwgbWF4X3pvb20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7eCwgeSwgen07XG4gICAgfVxuXG4gICAgLy8gU29ydCBhIHNldCBvZiB0aWxlIGluc3RhbmNlcyAod2hpY2ggYWxyZWFkeSBoYXZlIGEgZGlzdGFuY2UgZnJvbSBjZW50ZXIgdGlsZSBjb21wdXRlZClcbiAgICBzdGF0aWMgc29ydCh0aWxlcykge1xuICAgICAgICByZXR1cm4gdGlsZXMuc29ydCgoYSwgYikgPT4ge1xuICAgICAgICAgICAgbGV0IGFkID0gYS5jZW50ZXJfZGlzdDtcbiAgICAgICAgICAgIGxldCBiZCA9IGIuY2VudGVyX2Rpc3Q7XG4gICAgICAgICAgICByZXR1cm4gKGJkID4gYWQgPyAtMSA6IChiZCA9PT0gYWQgPyAwIDogMSkpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmcmVlUmVzb3VyY2VzKCkge1xuICAgICAgICBpZiAodGhpcy5tZXNoZXMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IG0gaW4gdGhpcy5tZXNoZXMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1lc2hlc1ttXS5kZXN0cm95KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy50ZXh0dXJlcykge1xuICAgICAgICAgICAgZm9yIChsZXQgdCBvZiB0aGlzLnRleHR1cmVzKSB7XG4gICAgICAgICAgICAgICAgbGV0IHRleHR1cmUgPSBUZXh0dXJlLnRleHR1cmVzW3RdO1xuICAgICAgICAgICAgICAgIGlmICh0ZXh0dXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRleHR1cmUuZGVzdHJveSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubWVzaGVzID0ge307XG4gICAgICAgIHRoaXMudGV4dHVyZXMg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Bzb3VyY2UgZGVmaW5lZFxuICAgICAgICAgICAgaWYgKCFsYXllciB8fCAhbGF5ZXIuZGF0YSkge1xuICAgICAgICAgICAgICAgIGxvZy53YXJuKGBMYXllciAke2xheWVyfSB3YXMgZGVmaW5lZCB3aXRob3V0IGEgZ2VvbWV0cnkgZGF0YSBzb3VyY2UgYW5kIHdpbGwgbm90IGJlIHJlbmRlcmVkLmApO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBTb3VyY2UgbmFtZXMgZG9uJ3QgbWF0Y2hcbiAgICAgICAgICAgIGlmIChsYXllci5kYXRhLnNvdXJjZSAhPT0gdGlsZS5zb3VyY2UpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gR2V0IGRhdGEgZm9yIG9uZSBvciBtb3JlIGxheWVycyBmcm9tIHNvdXJjZVxuICAgICAgICAgICAgbGV0IHNvdXJjZV9sYXllcnMgPSBUaWxlLmdldERhdGFGb3JTb3VyY2UoZGF0YSwgbGF5ZXIuZGF0YSwgbGF5ZXJfbmFtZSk7XG5cbiAgICAgICAgICAgIC8vIFJlbmRlciBmZWF0dXJlcyBpbiBsYXllclxuICAgICAgICAgICAgZm9yIChsZXQgcz0wOyBzIDwgc291cmNlX2xheWVycy5sZW5ndGg7IHMrKykge1xuICAgICAgICAgICAgICAgIGxldCBzb3VyY2VfbGF5ZXIgPSBzb3VyY2VfbGF5ZXJzW3NdO1xuICAgICAgICAgICAgICAgIGxldCBnZW9tID0gc291cmNlX2xheWVyLmdlb207XG4gICAgICAgICAgICAgICAgaWYgKCFnZW9tKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGYgPSAwOyBmIDwgZ2VvbS5mZWF0dXJlcy5sZW5ndGg7IGYrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmVhdHVyZSA9IGdlb20uZmVhdHVyZXNbZl07XG4gICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLmdlb21ldHJ5ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOyAvLyBza2lwIGZlYXR1cmVzIHcvbyBnZW9tZXRyeSAodmFsaWQgR2VvSlNPTilcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb250ZXh0ID0gU3R5bGVQYXJzZXIuZ2V0RmVhdHVyZVBhcnNlQ29udGV4dChmZWF0dXJlLCB0aWxlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC53aW5kaW5nID0gdGlsZS5kZWZhdWx0X3dpbmRpbmc7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQubGF5ZXIgPSBzb3VyY2VfbGF5ZXIubGF5ZXI7IC8vIGFkZCBkYXRhIHNvdXJjZSBsYXllciBuYW1lXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gR2V0IGRyYXcgZ3JvdXBzIGZvciB0aGlzIGZlYXR1cmVcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxheWVyX3J1bGVzID0gcnVsZXNbbGF5ZXJfbmFtZV07XG4gICAgICAgICAgICAgICAgICAgIGxldCBkcmF3X2dyb3VwcyA9IGxheWVyX3J1bGVzLmJ1aWxkRHJhd0dyb3Vwcyhjb250ZXh0LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFkcmF3X2dyb3Vwcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBSZW5kZXIgZHJhdyBncm91cHNcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgZ3JvdXBfbmFtZSBpbiBkcmF3X2dyb3Vwcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGdyb3VwID0gZHJhd19ncm91cHNbZ3JvdXBfbmFtZV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWdyb3VwLnZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHRvIHN0eWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGVfbmFtZSA9IGdyb3VwLnN0eWxlIHx8IGdyb3VwX25hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNbc3R5bGVfbmFtZV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3R5bGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cud2FybihgU3R5bGUgJyR7c3R5bGVfbmFtZX0nIG5vdCBmb3VuZCBmb3IgcnVsZSBpbiBsYXllciAnJHtsYXllcl9uYW1lfSc6YCwgZ3JvdXAsIGZlYXR1cmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LnByb3BlcnRpZXMgPSBncm91cC5wcm9wZXJ0aWVzOyAvLyBhZGQgcnVsZS1zcGVjaWZpYyBwcm9wZXJ0aWVzIHRvIGNvbnRleHRcblxuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuYWRkRmVhdHVyZShmZWF0dXJlLCBncm91cCwgY29udGV4dCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQucHJvcGVydGllcyA9IG51bGw7IC8vIGNsZWFyIGdyb3VwLXNwZWNpZmljIHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRpbGUuZGVidWcuZmVhdHVyZXMrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGlsZS5kZWJ1Zy5yZW5kZXJpbmcgPSArbmV3IERhdGUoKSAtIHRpbGUuZGVidWcucmVuZGVyaW5nO1xuXG4gICAgICAgIC8vIEZpbmFsaXplIGFycmF5IGJ1ZmZlciBmb3IgZWFjaCByZW5kZXIgc3R5bGVcbiAgICAgICAgbGV0IHRpbGVfc3R5bGVzID0gU3R5bGVNYW5hZ2VyLnN0eWxlc0ZvclRpbGUodGlsZS5rZXkpO1xuICAgICAgICB0aWxlLm1lc2hfZGF0YSA9IHt9O1xuICAgICAgICBsZXQgcXVldWUgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgcz0wOyBzIDwgdGlsZV9zdHlsZXMubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgIGxldCBzdHlsZV9uYW1lID0gdGlsZV9zdHlsZXNbc107XG4gICAgICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNbc3R5bGVfbmFtZV07XG4gICAgICAgICAgICBxdWV1ZS5wdXNoKHN0eWxlLmVuZERhdGEodGlsZS5rZXkpLnRoZW4oKHN0eWxlX2RhdGEpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoc3R5bGVfZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICB0aWxlLm1lc2hfZGF0YVtzdHlsZV9uYW1lXSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRleF9kYXRhOiBzdHlsZV9kYXRhLnZlcnRleF9kYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgdW5pZm9ybXM6IHN0eWxlX2RhdGEudW5pZm9ybXMsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlczogc3R5bGVfZGF0YS50ZXh0dXJlc1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBQcm9taXNlLmFsbChxdWV1ZSkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICBDb2xsaXNpb24ucmVzZXRUaWxlKHRpbGUua2V5KTtcblxuICAgICAgICAgICAgLy8gUmV0dXJuIGtleXMgdG8gYmUgdHJhbnNmZXJlZCB0byBtYWluIHRocmVhZFxuICAgICAgICAgICAgcmV0dXJuIFsnbWVzaF9kYXRhJ107XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAgICBSZXRyaWV2ZXMgZ2VvbWV0cnkgZnJvbSBhIHRpbGUgYWNjb3JkaW5nIHRvIGEgZGF0YSBzb3VyY2UgZGVmaW5pdGlvblxuICAgICAgICBSZXR1cm5zIGFuIGFycmF5IG9mIG9iamVjdHMgd2l0aDpcbiAgICAgICAgICAgIGxheWVyOiBzb3VyY2UgbGF5ZXIgbmFtZVxuICAgICAgICAgICAgZ2VvbTogR2VvSlNPTiBGZWF0dXJlQ29sbGVjdGlvblxuICAgICovXG4gICAgc3RhdGljIGdldERhdGFGb3JTb3VyY2UgKHNvdXJjZV9kYXRhLCBzb3VyY2VfY29uZmlnLCBkZWZhdWx0X2xheWVyID0gbnVsbCkge1xuICAgICAgICB2YXIgbGF5ZXJzID0gW107XG5cbiAgICAgICAgaWYgKHNvdXJjZV9jb25maWcgIT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gSWYgbm8gbGF5ZXIgc3BlY2lmaWVkLCBhbmQgYSBkZWZhdWx0IHNvdXJjZSBsYXllciBleGlzdHNcbiAgICAgICAgICAgIGlmICghc291cmNlX2NvbmZpZy5sYXllciAmJiBzb3VyY2VfZGF0YS5sYXllcnMuX2RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICBsYXllcnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGxheWVyOiAnX2RlZmF1bHQnLFxuICAgICAgICAgICAgICAgICAgICBnZW9tOiBzb3VyY2VfZGF0YS5sYXllcnMuX2RlZmF1bHRcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIElmIG5vIGxheWVyIHNwZWNpZmllZCwgYW5kIGEgZGVmYXVsdCByZXF1ZXN0ZWQgbGF5ZXIgZXhpc3RzXG4gICAgICAgICAgICBlbHNlIGlmICghc291cmNlX2NvbmZpZy5sYXllciAmJiBkZWZhdWx0X2xheWVyKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBsYXllcjogZGVmYXVsdF9sYXllcixcbiAgICAgICAgICAgICAgICAgICAgZ2VvbTogc291cmNlX2RhdGEubGF5ZXJzW2RlZmF1bHRfbGF5ZXJdXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBJZiBhIGxheWVyIGlzIHNwZWNpZmllZCBieSBuYW1lLCB1c2UgaXRcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBzb3VyY2VfY29uZmlnLmxheWVyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGxheWVycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXI6IHNvdXJjZV9jb25maWcubGF5ZXIsXG4gICAgICAgICAgICAgICAgICAgIGdlb206IHNvdXJjZV9kYXRhLmxheWVyc1tzb3VyY2VfY29uZmlnLmxheWVyXVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gSWYgbXVsdGlwbGUgbGF5ZXJzIGFyZSBzcGVjaWZpZWQgYnkgbmFtZSwgY29tYmluZSB0aGVtXG4gICAgICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHNvdXJjZV9jb25maWcubGF5ZXIpKSB7XG4gICAgICAgICAgICAgICAgc291cmNlX2NvbmZpZy5sYXllci5mb3JFYWNoKGxheWVyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl0gJiYgc291cmNlX2RhdGEubGF5ZXJzW2xheWVyXS5mZWF0dXJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdlb206IHNvdXJjZV9kYXRhLmxheWVyc1tsYXllcl1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBBc3NlbWJsZSBhIGN1c3RvbSBsYXllciB2aWEgYSBmdW5jdGlvbiwgd2hpY2ggaXMgY2FsbGVkIHdpdGggYWxsIHNvdXJjZSBsYXllcnNcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBzb3VyY2VfY29uZmlnLmxheWVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXJzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBnZW9tOiBzb3VyY2VfY29uZmlnLmxheWVyKHNvdXJjZV9kYXRhLmxheWVycylcbiAgICAgICAgICAgICAgICAgICAgLy8gY3VzdG9tIGxheWVyIGhhcyBubyBuYW1lXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGF5ZXJzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAgIENhbGxlZCBvbiBtYWluIHRocmVhZCB3aGVuIGEgd2ViIHdvcmtlciBjb21wbGV0ZXMgcHJvY2Vzc2luZ1xuICAgICAgIGZvciBhIHNpbmdsZSB0aWxlLlxuICAgICovXG4gICAgYnVpbGRNZXNoZXMoc3R5bGVzKSB7XG4gICAgICAgIGlmICh0aGlzLmVycm9yKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgIC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dGVhZCkuXG4gICAgKi9cbiAgICBzdGF0aWMgYWJvcnRCdWlsZCAodGlsZSkge1xuICAgICAgICBpZiAodGlsZS5tZXNoX2RhdGEpIHtcbiAgICAgICAgICAgIGZvciAobGV0IHMgaW4gdGlsZS5tZXNoX2RhdGEpIHtcbiAgICAgICAgICAgICAgICBsZXQgdGV4dHVyZXMgPSB0aWxlLm1lc2hfZGF0YVtzXS50ZXh0dXJlcztcbiAgICAgICAgICAgICAgICBpZiAodGV4dHVyZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgdCBvZiB0ZXh0dXJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHR1cmUgPSBUZXh0dXJlLnRleHR1cmVzW3RdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHR1cmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2cudHJhY2UoYGRlc3Ryb3lpbmcgdGV4dHVyZSAke3R9IGZvciB0aWxlICR7dGlsZS5rZXl9YCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dHVyZS5kZXN0cm95KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcmludERlYnVnICgpIHtcbiAgICAgICAgbG9nLmRlYnVnKGBUaWxlOiBkZWJ1ZyBmb3IgJHt0aGlzLmtleX06IFsgICR7SlNPTi5zdHJpbmdpZnkodGhpcy5kZWJ1Zyl9IF1gKTtcbiAgICB9XG5cbiAgICB1cGRhdGUoc2NlbmUpIHtcbiAgICAgICAgbGV0IGNvb3JkcyA9IHRoaXMuY29vcmRzO1xuICAgICAgICBpZiAoY29vcmRzLnogIT09IHNjZW5lLmNlbnRlcl90aWxlLnopIHtcbiAgICAgICAgICAgIGNvb3JkcyA9IFRpbGUuY29vcmRpbmF0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oaXMudGlsZXNba2V5XTtcblxuICAgICAgICBpZiAodGlsZSAhPSBudWxsKSB7XG4gICAgICAgICAgICB0aWxlLmRlc3Ryb3koKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuZm9yZ2V0VGlsZSh0aWxlLmtleSk7XG4gICAgICAgIHRoaXMuc2NlbmUucmVxdWVzdFJlZHJhdygpO1xuICAgIH0sXG5cbiAgICAvLyBSdW4gYSBmdW5jdGlvbiBvbiBlYWNoIHRpbGVcbiAgICBmb3JFYWNoVGlsZShmdW5jKSB7XG4gICAgICAgIGZvciAobGV0IHQgaW4gdGhpcy50aWxlcykge1xuICAgICAgICAgICAgZnVuYyh0aGlzLnRpbGVzW3RdKTtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvLyBSZW1vdmUgdGlsZXMgdGhhdCBwYXNzIGEgZmlsdGVyIGNvbmRpdGlvblxuICAgIHJlbW92ZVRpbGVzKGZpbHRlcikge1xuICAgICAgICBsZXQgcmVtb3ZlX3RpbGVzID0gW107XG4gICAgICAgIGZvciAobGV0IHQgaW4gdGhpcy50aWxlcykge1xuICAgICAgICAgICAgbGV0IHRpbGUgPSB0aGlzLnRpbGVzW3RdO1xuICAgICAgICAgICAgaWYgKGZpbHRlcih0aWxlKSkge1xuICAgICAgICAgICAgICAgIHJlbW92ZV90aWxlcy5wdXNoKHQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZvciAobGV0IHI9MDsgciA8IHJlbW92ZV90aWxlcy5sZW5ndGg7IHIrKykge1xuICAgICAgICAgICAgbGV0IGtleSA9IHJlbW92ZV90aWxlc1tyXTtcbiAgICAgICAgICAgIHRoaXMucmVtb3ZlVGlsZShrZXkpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHVwZGF0ZVRpbGVzRm9yVmlldygpIHtcbiAgICAgICAgLy8gRmluZCB2aXNpYmxlIHRpbGVzIGFuZCBsb2FkIG5ldyBvbmVzXG4gICAgICAgIHRoaXMudmlzaWJsZV9jb29yZHMgPSB7fTtcbiAgICAgICAgbGV0IHRpbGVfY29vcmRzID0gdGhpcy5zY2VuZS5maW5kVmlzaWJsZVRpbGVDb29yZGluYXRlcygpO1xuICAgICAgICBmb3IgKGxldCBjb29yZHMgb2YgdGlsZV9jb29yZHMpIHtcbiAgICAgICAgICAgIHRoaXMucXVldWVDb29yZGluYXRlKGNvb3Jkcyk7XG4gICAgICAgICAgICB0aGlzLnZpc2libGVfY29vcmRzW1RpbGUuY29vcmRLZXkoY29vcmRzKV0gPSBjb29yZHM7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBSZW1vdmUgdGlsZXMgdG9vIGZhciBvdXRzaWRlIG9mIHZpZXdcbiAgICAgICAgdGhpcy5zY2VuZS5wcnVuZVRpbGVDb29yZGluYXRlc0ZvclZpZXcoKTsgLy8gVE9ETzogcmV0dXJuIGxpc3QgdG8gcHJ1bmU/XG5cbiAgICAgICAgdGhpcy5mb3JFYWNoVGlsZSh0aWxlID0+IHtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlVmlzaWJpbGl0eSh0aWxlKTtcbiAgICAgICAgICAgIHRpbGUudXBkYXRlKHRoaXMuc2NlbmUpO1xuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgdXBkYXRlVmlzaWJpbGl0eSh0aWxlKSB7XG4gICAgICAgIGlmICh0aWxlLnN0eWxlX3pvb20gIT09IHRoaXMuc2NlbmUudGlsZV96b29tKSB7XG4gICAgICAgICAgICB0aWxlLnZpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnZpc2libGVfY29vcmRzW3RpbGUuY29vcmRfa2V5XSkge1xuICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIC8vIGJydXRlIGZvcmNlXG4gICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gdGhpcy52aXNpYmxlX2Nvb3Jkcykge1xuICAgICAgICAgICAgICAgIGlmIChUaWxlLmlzQ2hpbGQodGlsZS5jb29yZHMsIHRoaXMudmlzaWJsZV9jb29yZHNba2V5XSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGlsZS52aXNpYmxlID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgZ2V0UmVuZGVyYWJsZVRpbGVzKCkge1xuICAgICAgICBsZXQgdGlsZXMgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgdCBpbiB0aGlzLnRpbGVzKSB7XG4gICAgICAgICAgICBsZXQgdGlsZSA9IHRoaXMudGlsZXNbdF07XG4gICAgICAgICAgICBpZiAodGlsZS52aXNpYmxlICYmIHRpbGUubG9hZGVkKSB7XG4gICAgICAgICAgICAgICAgdGlsZXMucHVzaCh0aWxlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGlsZXM7XG4gICAgfSxcblxuICAgIGlzTG9hZGluZ1Zpc2libGVUaWxlcygpIHtcbiAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHRoaXMudGlsZXMpLnNvbWUoayA9PiB0aGlzLnRpbGVzW2tdLnZpc2libGUgJiYgdGhpcy50aWxlc1trXS5sb2FkaW5nKTtcbiAgICB9LFxuXG4gICAgLy8gUXVldWUgYSB0aWxlIGZvciBsb2FkXG4gICAgcXVldWVDb29yZGluYXRlKGNvb3Jkcykge1xuICAgICAgICB0aGlzLnF1ZXVlZF9jb29yZHNbdGhpcy5xdWV1ZWRfY29vcmRzLmxlbmd0aF0gPSBjb29yZHM7XG4gICAgfSxcblxuICAgIC8vIExvYWQgYWxsIHF1ZXVlZCB0aWxlc1xuICAgI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y8gRGV0ZXJtaW5lIG5lY2Vzc2FyeSB0aWxlcyBmb3IgZWFjaCBzb3VyY2VcbiAgICAgICAgZm9yIChsZXQgc291cmNlIG9mIFV0aWxzLnZhbHVlcyh0aGlzLnNjZW5lLnNvdXJjZXMpKSB7XG4gICAgICAgICAgICBpZiAoIXNvdXJjZS50aWxlZCkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQga2V5ID0gVGlsZS5rZXkoY29vcmRzLCBzb3VyY2UsIHRoaXMuc2NlbmUudGlsZV96b29tKTtcbiAgICAgICAgICAgIGlmIChrZXkgJiYgIXRoaXMuaGFzVGlsZShrZXkpKSB7XG4gICAgICAgICAgICAgICAgbGV0IHRpbGUgPSBUaWxlLmNyZWF0ZSh7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgY29vcmRzLFxuICAgICAgICAgICAgICAgICAgICAvLyBtYXhfem9vbTogdGhpcy5zY2VuZS5maW5kTWF4Wm9vbSgpLCAvLyBUT0RPOiByZXBsYWNlIHdpdGggYmV0dGVyIG1heCB6b29tIGhhbmRsaW5nXG4gICAgICAgICAgICAgICAgICAgIHdvcmtlcjogdGhpcy5zY2VuZS5uZXh0V29ya2VyKCksXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlX3pvb206IHRoaXMuc2NlbmUuc3R5bGVab29tKGNvb3Jkcy56KSAvLyBUT0RPOiByZXBsYWNlP1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5rZWVwVGlsZSh0aWxlKTtcbiAgICAgICAgICAgICAgICB0aGlzLmJ1aWxkVGlsZSh0aWxlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvLyBTb3J0IGFuZCBidWlsZCBhIGxpc3Qgb2YgdGlsZXNcbiAgICBidWlsZFRpbGVzKHRpbGVzKSB7XG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uZ3RoID4gMSkgPyBwYXRoWzBdIDogJyc7XG4gICAgICAgICAgICB1cmwgPSBwYXRoICsgdXJsO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gRWFzeSB3YXlcbiAgICAgICAgICAgIGlmIChiYXNlX2luZm8ub3JpZ2luKSB7XG4gICAgICAgICAgICAgICAgdXJsID0gYmFzZV9pbmZvLm9yaWdpbiArICcvJyArIHVybDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEhhcmQgd2F5IChJRTExKVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG9yaWdpbiA9IHVybC5tYXRjaCgvXigoaHR0cHxodHRwc3xkYXRhfGJsb2IpOlxcL1xcL1teXFwvXSpcXC8pLyk7XG4gICAgICAgICAgICAgICAgb3JpZ2luID0gKG9yaWdpbiAmJiBvcmlnaW4ubGVuZ3RoID4gMSkgPyBvcmlnaW5bMF0gOiAnJztcbiAgICAgICAgICAgICAgICB1cmwgPSBvcmlnaW4gKyB1cmw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHVybDtcbn07XG5cblV0aWxzLnBhdGhGb3JVUkwgPSBmdW5jdGlvbiAodXJsKSB7XG4gICAgaWYgKHVybCAmJiB1cmwuc2VhcmNoKC9eKGRhdGF8YmxvYik6LykgPT09IC0xKSB7XG4gICAgICAgIHJldHVybiB1cmwuc3Vic3RyKDAsIHVybC5sYXN0SW5kZXhPZignLycpICsgMSkgfHwgJy4vJztcbiAgICB9XG4gICAgcmV0dXJuICcuLyc7XG59O1xuXG5VdGlscy5jYWNoZUJ1c3RlckZvclVybCA9IGZ1bmN0aW9uICh1cmwpIHtcbiAgICBpZiAodXJsLnNlYXJjaCgvXihkYXRhfGJsb2IpOi8pID4gLTEpIHtcbiAgICAgICAgcmV0dXJuIHVybDsgLy8gbm8gY2FjaGUtYnVzdGluZyBvbiBvYmplY3Qg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cbiAgICAgICAgICAgIHJlamVjdChFcnJvcignVGhlcmUgd2FzIGEgbmV0d29yayBlcnJvcicgKyBldnQudG9TdHJpbmcoKSkpO1xuICAgICAgICB9O1xuICAgICAgICByZXF1ZXN0Lm9udGltZW91dCA9IChldnQpID0+IHtcbiAgICAgICAgICAgIHJlamVjdChFcnJvcigndGltZW91dCAnKyBldnQudG9TdHJpbmcoKSkpO1xuICAgICAgICB9O1xuICAgICAgICByZXF1ZXN0LnNlbmQoKTtcbiAgICB9KTtcblxuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShwcm9taXNlLCAncmVxdWVzdCcsIHtcbiAgICAgICAgdmFsdWU6IHJlcXVlc3RcbiAgICB9KTtcblxuICAgIHJldHVybiBwcm9taXNlO1xufTtcblxuVXRpbHMucGFyc2VSZXNvdXJjZSA9IGZ1bmN0aW9uIChib2R5KSB7XG4gICAgdmFyIGRhdGE7XG4gICAgdHJ5IHtcbiAgICAgICAgZGF0YSA9IHlhbWwuc2FmZUxvYWQoYm9keSk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICB0aHJvdyBlO1xuICAgIH1cbiAgICByZXR1cm4gZGF0YTtcbn07XG5cblV0aWxzLmxvYWRSZXNvdXJjZSA9IGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBpZiAodHlwZW9mIHNvdXJjZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIFV0aWxzLmlvKFV0aWxzLmNhY2hlQnVzdGVyRm9yVXJsKHNvdXJjZSkpLnRoZW4oKGJvZHkpID0+IHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IFV0aWxzLnBhcnNlUmVzb3VyY2UoYm9keSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZGF0YSk7XG4gICAgICAgICAgICAgICAg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5LCB5MSwgeTI7XG5cbiAgICAvLyBNaW4gYm91bmRzXG4gICAgaWYgKHggPD0gcG9pbnRzWzBdWzBdKSB7XG4gICAgICAgIHkgPSBwb2ludHNbMF1bMV07XG4gICAgICAgIGlmICh0eXBlb2YgdHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB5ID0gdHJhbnNmb3JtKHkpO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8vIE1heCBib3VuZHNcbiAgICBlbHNlIGlmICh4ID49IHBvaW50c1twb2ludHMubGVuZ3RoLTFdWzBdKSB7XG4gICAgICAgIHkgPSBwb2ludHNbcG9pbnRzLmxlbmd0aC0xXVsxXTtcbiAgICAgICAgaWYgKHR5cGVvZiB0cmFuc2Zvcm0gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHkgPSB0cmFuc2Zvcm0oeSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgLy8gRmluZCB3aGljaCBjb250cm9sIHBvaW50cyB4IGlzIGJldHdlZW5cbiAgICBlbHNlIHtcbiAgICAgICAgZm9yICh2YXIgaT0wOyBpIDwgcG9pbnRzLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICAgICAgaWYgKHggPj0gcG9pbnRzW2ldWzBdICYmIHggPCBwb2ludHNbaSsxXVswXSkge1xuICAgICAgICAgICAgICAgIC8vIExpbmVhciBpbnRlcnBvbGF0aW9uXG4gICAgICAgICAgICAgICAgeDEgPSBwb2ludHNbaV1bMF07XG4gICAgICAgICAgICAgICAgeDIgPSBwb2ludHNbaSsxXVswXTtcblxuICAgICAgICAgICAgICAgIC8vIE11bHRpcGxlIHZhbHVlc1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHBvaW50c1tpXVsxXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgeSA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBjPTA7IGMgPCBwb2ludHNbaV1bMV0ubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeTEgPSB0cmFuc2Zvcm0ocG9pbnRzW2ldWzFdW2NdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5MiA9IHRyYW5zZm9ybShwb2ludHNbaSsxXVsxXVtjXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHkyIC0geTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeVtjXSA9IGQgKiAoeCAtIHgxKSAvICh4MiAtIHgxKSArIHkxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBvaW50c1tpKzFdWzFdW2NdIC0gcG9pbnRzW2ldWzFdW2NdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlbY10gPSBkICogKHggLSB4MSkgLyAoeDIgLSB4MSkgKyBwb2ludHNbaV1bMV1bY107XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gU2luZ2xlIHZhbHVlXG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJhbnNmb3JtID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB5MSA9IHRyYW5zZm9ybShwb2ludHNbaV1bMV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgeTIgPSB0cmFuc2Zvcm0ocG9pbnRzW2krMV1bMV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHkyIC0geTE7XG4gICAgICAgICAgICAgICAgICAgICAgICB5ID0gZCAqICh4IC0geDEpIC8gKHgyIC0geDEpICsgeTE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gcG9pbnRzW2krMV1bMV0gLSBwb2ludHNbaV1bMV07XG4gICAgICAgICAgICAgICAgICAgICAgICB5ID0gZCAqICh4IC0geDEpIC8gKHgyIC0geDEpICsgcG9pbnRzW2ldWzFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB5O1xufTtcblxuLy8gSXRlcmF0b3JzIChFUzYgZ2VuZXJhdG9ycylcblxuLy8gSXRlcmF0b3IgZm9yIGtleS92YWx1ZSBwYWlycyBvZiBhbiBvYmplY3RcblV0aWxzLmVudHJpZXMgPSBmdW5jdGlvbiogKG9iaikge1xuICAgIGZvciAodmFyIGtleSBvZiBPYmplY3Qua2V5cyhvYmopKSB7XG4gICAgICAgIHlpZWxkIFtrZXksIG9ialtrZXldXTtcbiAgICB9XG59O1xuXG4vLyBJdGVyYXRvciBmb3IgdmFsdWVzIG9mIGFuIG9iamVjdFxuVXRpbHMudmFsdWVzID0gZnVuY3Rpb24qIChvYmopIHtcbiAgICBmb3IgKHZhciBrZXkgb2YgT2JqZWN0LmtleXMob2JqKSkge1xuICAgICAgICB5aWVsZCBvYmpba2V5XTtcbiAgICB9XG59O1xuXG4vLyBSZWN1cnNpdmUgaXRlcmF0b3JzIGZvciBhbGwgcHJvcGVydGllcyBvZiBhbiBvYmplY3QsIG5vIG1hdHRlciBob3cgZGVlcGx5IG5lc3RlZFxuLy8gVE9ETzogZml4IGZvciBjaXJjdWxhciBzdHJ1Y3R1cmVzXG5VdGlscy5yZWN1cnNlRW50cmllcyA9IGZ1bmN0aW9uKiAob2JqKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAg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AgICAgICAgICAvLyBBc3luYyByZXN1bHRcbiAgICAgICAgICAgIGlmIChyZXN1bHQgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnRoZW4oKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZmVyYWJsZXMgPSBmaW5kVHJhbnNmZXJhYmxlcyh2YWx1ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdtYWluX3JlcGx5JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VfaWQ6IGlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgfSwgdHJhbnNmZXJhYmxlcy5tYXAodCA9PiB0Lm9iamVjdCkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGZyZWVUcmFuc2ZlcmFibGVzKHRyYW5zZmVyYWJsZXMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNmZXJhYmxlcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBVdGlscy5sb2coJ3RyYWNlJywgYCcke21ldGhvZF9uYW1lfScgdHJhbnNmZXJyZWQgJHt0cmFuc2ZlcmFibGVzLmxlbmd0aH0gb2JqZWN0cyB0byB3b3JrZXIgdGhyZWFkYCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIH0sIChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB3b3JrZXIucG9zdE1lc3NhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ21haW5fcmVwbHknLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZV9pZDogaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcjogKGVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyBgJHtlcnJvci5tZXNzYWdlfTogJHtlcnJvci5zdGFja31gIDogZXJyb3IpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gSW1tZWRpYXRlIHJlc3VsdFxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdHJhbnNmZXJhYmxlcyA9IGZpbmRUcmFuc2ZlcmFibGVzKHJlc3VsdCk7XG5cbiAgICAgICAgICAgICAgICB3b3JrZXIucG9zdE1lc3NhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnbWFpbl9yZXBseScsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VfaWQ6IGlkLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHQsXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOiAoZXJyb3IgaW5zdGFuY2VvZiBFcnJvciA/IGAke2Vycm9yLm1lc3NhZ2V9OiAke2Vycm9yLnN0YWNrfWAgOiBlcnJvcilcbiAgICAgICAgICAgICAgICB9LCB0cmFuc2ZlcmFibGVzLm1hcCh0ID0+IHQub2JqZWN0KSk7XG5cbiAgICAgICAgICAgICAgICBmcmVlVHJhbnNmZXJhYmxlcyh0cmFuc2ZlcmFibGVzKTtcbiAgICAgICAgICAgICAgICBpZiAodHJhbnNmZXJhYmxlcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIFV0aWxzLmxvZygndHJhY2UnLCBgJyR7bWV0aG9kX25hbWV9JyB0cmFuc2ZlcnJlZCAke3RyYW5zZmVyYWJsZXMubGVuZ3RofSBvYmplY3RzIHRvIHdvcmtlciB0aHJlYWRgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgfTtcblxuICAgIC8vIEV4cG9zZSBmb3IgZGVidWdnaW5n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5nIGZvcm0pIHRvIG1haW4gdGhyZWFkXG4gICAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTZW5kIHJldHVybiB2YWx1ZSB0byBtYWluIHRocmVhZFxuICAgICAgICBsZXQgdHJhbnNmZXJhYmxlcztcbiAgICAgICAgLy8gQXN5bmMgcmVzdWx0XG4gICAgICAgIGlmIChyZXN1bHQgaW5zdGFuY2VvZiBQcm9taXNlKSB7XG4gICAgICAgICAgICByZXN1bHQudGhlbigodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICB0cmFuc2ZlcmFibGVzID0gZmluZFRyYW5zZmVyYWJsZXModmFsdWUpO1xuXG4gICAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd3b3JrZXJfcmVwbHknLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlX2lkOiBpZCxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogdmFsdWVcbiAgICAgICAgICAgICAgICB9LCB0cmFuc2ZlcmFibGVzLm1hcCh0ID0+IHQub2JqZWN0KSk7XG5cbiAgICAgICAgICAgICAgICBmcmVlVHJhbnNmZXJhYmxlcyh0cmFuc2ZlcmFibGVzKTtcbiAgICAgICAgICAgICAgICBpZiAodHJhbnNmZXJhYmxlcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIFV0aWxzLmxvZygndHJhY2UnLCBgJyR7bWV0aG9kX25hbWV9JyB0cmFuc2ZlcnJlZCAke3RyYW5zZmVyYWJsZXMubGVuZ3RofSBvYmplY3RzIHRvIG1haW4gdGhyZWFkYCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd3b3JrZXJfcmVwbHknLFxuICAgIC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/dist/tangram.min.js b/dist/tangram.min.js index 8754d9823..b315aa765 100644 --- a/dist/tangram.min.js +++ b/dist/tangram.min.js @@ -1,17 +1,17 @@ -!function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};t[o][0].call(c.exports,function(e){var r=t[o][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o=0,a=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(o){n.regeneratorRuntime=void 0}t.exports={"default":t.exports,__esModule:!0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":27}],27:[function(e,t,r){(function(r,n){"use strict";var i=e("babel-runtime/core-js/symbol")["default"],a=e("babel-runtime/core-js/symbol/iterator")["default"],o=e("babel-runtime/core-js/object/create")["default"],s=e("babel-runtime/core-js/promise")["default"];!function(e){function n(e,t,r,n){var i=o((t||l).prototype);return i._invoke=m(e,r||null,new y(n||[])),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function l(){}function c(){}function f(){}function h(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function d(e){this.arg=e}function p(e){function t(t,r){var n=e[t](r),i=n.value;return i instanceof d?s.resolve(i.arg).then(a,o):s.resolve(i).then(function(e){return n.value=e,n})}function n(e,r){var n=i?i.then(function(){return t(e,r)}):new s(function(n){n(t(e,r))});return i=n["catch"](function(e){}),n}"object"==typeof r&&r.domain&&(t=r.domain.bind(t));var i,a=t.bind(e,"next"),o=t.bind(e,"throw");t.bind(e,"return");this._invoke=n}function m(e,t,r){var n=k;return function(i,a){if(n===F)throw new Error("Generator is already running");if(n===S){if("throw"===i)throw a;return b()}for(;;){var o=r.delegate;if(o){if("return"===i||"throw"===i&&o.iterator[i]===x){r.delegate=null;var s=o.iterator["return"];if(s){var l=u(s,o.iterator,a);if("throw"===l.type){i="throw",a=l.arg;continue}}if("return"===i)continue}var l=u(o.iterator[i],o.iterator,a);if("throw"===l.type){r.delegate=null,i="throw",a=l.arg;continue}i="next",a=x;var c=l.arg;if(!c.done)return n=T,c;r[o.resultName]=c.value,r.next=o.nextLoc,r.delegate=null}if("next"===i)n===T?r.sent=a:r.sent=x;else if("throw"===i){if(n===k)throw n=S,a;r.dispatchException(a)&&(i="next",a=x)}else"return"===i&&r.abrupt("return",a);n=F;var l=u(e,t,r);if("normal"===l.type){n=r.done?S:T;var c={value:l.arg,done:r.done};if(l.arg!==C)return c;r.delegate&&"next"===i&&(a=x)}else"throw"===l.type&&(n=S,i="throw",a=l.arg)}}}function g(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(g,this),this.reset(!0)}function _(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function i(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=A.call(i,"catchLoc"),s=A.call(i,"finallyLoc");if(o&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),C}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},C}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:void 0)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:184,"babel-runtime/core-js/object/create":7,"babel-runtime/core-js/promise":14,"babel-runtime/core-js/symbol":16,"babel-runtime/core-js/symbol/iterator":17}],28:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o?62:t===s?63:u>t?-1:u+10>t?t-u+26+26:c+26>t?t-c:l+26>t?t-l+26:void 0}function r(e){function r(e){l[f++]=e}var n,i,o,s,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new a(3*e.length/4-u),o=u>0?e.length-4:e.length;var f=0;for(n=0,i=0;o>n;n+=4,i+=3)s=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),l}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,a,o,s=e.length%3,u="";for(i=0,o=e.length-s;o>i;i+=3)a=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(a);switch(s){case 1:a=e[e.length-1],u+=t(a>>2),u+=t(a<<4&63),u+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],u+=t(a>>10),u+=t(a>>4&63),u+=t(a<<2&63),u+="="}return u}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),c="A".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],29:[function(e,t,r){"use strict";"use restrict";function n(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var i=32;r.INT_BITS=i,r.INT_MAX=2147483647,r.INT_MIN=-1<0)-(0>e)},r.abs=function(e){var t=e>>i-1;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(t>e)},r.max=function(e,t){return e^(e^t)&-(t>e)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var a=new Array(256);!function(e){for(var t=0;256>t;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|a[e>>>16&255]<<8|a[e>>>24&255]},r.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},r.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},r.interleave3=function(e,t,r){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),e|r<<2},r.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],30:[function(e,t,r){"use strict";function n(e,t){for(var r=0;e>r;++r)if(!(t[r]<=t[r+e]))return!0;return!1}function i(e,t,r,i){for(var a=0,o=0,s=0,u=e.length;u>s;++s){var l=e[s];if(!n(t,l)){for(var c=0;2*t>c;++c)r[a++]=l[c];i[o++]=s}}return o}function a(e,t,r,n){var a=e.length,o=t.length;if(!(0>=a||0>=o)){var s=e[0].length>>>1;if(!(0>=s)){var u,l=f.mallocDouble(2*s*a),c=f.mallocInt32(a);if(a=i(e,s,l,c),a>0){if(1===s&&n)h.init(a),u=h.sweepComplete(s,r,0,a,l,c,0,a,l,c);else{var p=f.mallocDouble(2*s*o),m=f.mallocInt32(o);o=i(t,s,p,m),o>0&&(h.init(a+o),u=1===s?h.sweepBipartite(s,r,0,a,l,c,0,o,p,m):d(s,r,n,a,l,c,o,p,m),f.free(p),f.free(m))}f.free(l),f.free(c)}return u}}}function o(e,t){c.push([e,t])}function s(e){return c=[],a(e,e,o,!0),c}function u(e,t){return c=[],a(e,t,o,!1),c}function l(e,t,r){switch(arguments.length){case 1:return s(e);case 2:return"function"==typeof t?a(e,e,t,!0):u(e,t);case 3:return a(e,t,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}t.exports=l;var c,f=e("typedarray-pool"),h=e("./lib/sweep"),d=e("./lib/intersect")},{"./lib/intersect":32,"./lib/sweep":36,"typedarray-pool":187}],31:[function(e,t,r){"use strict";function n(e,t,r){var n="bruteForce"+(e?"Red":"Blue")+(t?"Flip":"")+(r?"Full":""),i=["function ",n,"(",A.join(),"){","var ",l,"=2*",a,";"],u="for(var i="+c+","+p+"="+l+"*"+c+";i<"+f+";++i,"+p+"+="+l+"){var x0="+h+"["+o+"+"+p+"],x1="+h+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",w="for(var j="+m+","+_+"="+l+"*"+m+";j<"+g+";++j,"+_+"+="+l+"){var y0="+v+"["+o+"+"+_+"],"+(r?"y1="+v+"["+o+"+"+_+"+"+a+"],":"")+"yi="+y+"[j];";return e?i.push(u,x,":",w):i.push(w,x,":",u),r?i.push("if(y1"+g+"-"+m+"){"),e?(t(!0,!1),o.push("}else{"),t(!1,!1)):(o.push("if("+u+"){"),t(!0,!0),o.push("}else{"),t(!0,!1),o.push("}}else{if("+u+"){"),t(!1,!0),o.push("}else{"),t(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join(""),l=new Function(s);return l()}var a="d",o="ax",s="vv",u="fp",l="es",c="rs",f="re",h="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",_="bp",b="rv",x="Q",A=[a,o,s,c,f,h,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],32:[function(e,t,r){"use strict";function n(e,t){var r=8*l.log2(t+1)*(e+1)|0,n=l.nextPow2(D*r);F.lengthS&&(u.free(S),S=u.mallocDouble(i))}function i(e,t,r,n,i,a,o,s,u){var l=D*e;F[l]=t,F[l+1]=r,F[l+2]=n,F[l+3]=i,F[l+4]=a,F[l+5]=o;var c=k*e;S[c]=s,S[c+1]=u}function a(e,t,r,n,i,a,o,s,u,l,c){var f=2*e,h=u*f,d=l[h+t];e:for(var p=i,m=i*f;a>p;++p,m+=f){var g=o[m+t],v=o[m+t+e];if(!(g>d||d>v||n&&d===g)){for(var y=s[p],_=t+1;e>_;++_){var g=o[m+_],v=o[m+_+e],b=l[h+_],x=l[h+_+e];if(b>v||g>x)continue e}var A;if(A=n?r(c,y):r(y,c),void 0!==A)return A}}}function o(e,t,r,n,i,a,o,s,u,l){var c=2*e,f=s*c,h=u[f+t];e:for(var d=n,p=n*c;i>d;++d,p+=c){var m=o[d];if(m!==l){var g=a[p+t],v=a[p+t+e];if(!(g>h||h>v)){for(var y=t+1;e>y;++y){var g=a[p+y],v=a[p+y+e],_=u[f+y],b=u[f+y+e];if(_>v||g>b)continue e}var x=r(m,l);if(void 0!==x)return x}}}}function s(e,t,r,s,u,l,c,m,T){n(e,s+c);var C,M=0,R=2*e;for(i(M++,0,0,s,0,c,r?16:0,-(1/0),1/0),r||i(M++,0,0,c,0,s,1,-(1/0),1/0);M>0;){M-=1;var j=M*D,P=F[j],I=F[j+1],L=F[j+2],B=F[j+3],N=F[j+4],O=F[j+5],z=M*k,U=S[z],$=S[z+1],G=1&O,q=!!(16&O),V=u,W=l,Y=m,H=T;if(G&&(V=m,W=T,Y=u,H=l),!(2&O&&(L=x(e,P,I,L,V,W,$),I>=L)||4&O&&(I=A(e,P,I,L,V,W,U),I>=L))){var X=L-I,Z=N-B;if(q){if(y>e*X*(X+Z)){if(C=d.scanComplete(e,P,t,I,L,V,W,B,N,Y,H),void 0!==C)return C;continue}}else{if(e*Math.min(X,Z)e*X*Z){if(C=d.scanBipartite(e,P,t,G,I,L,V,W,B,N,Y,H),void 0!==C)return C;continue}}var J=_(e,P,I,L,V,W,U,$);if(J>I)if(g>e*(J-I)){if(C=h(e,P+1,t,I,J,V,W,B,N,Y,H),void 0!==C)return C}else if(P===e-2){if(C=G?d.sweepBipartite(e,t,B,N,Y,H,I,J,V,W):d.sweepBipartite(e,t,I,J,V,W,B,N,Y,H),void 0!==C)return C}else i(M++,P+1,I,J,B,N,G,-(1/0),1/0),i(M++,P+1,B,N,I,J,1^G,-(1/0),1/0);if(L>J){var K=p(e,P,B,N,Y,H),Q=Y[R*K+P],ee=b(e,P,K,N,Y,H,Q);if(N>ee&&i(M++,P,J,L,ee,N,(4|G)+(q?16:0),Q,$),K>B&&i(M++,P,J,L,B,K,(2|G)+(q?16:0),U,Q),K+1===ee){if(C=q?o(e,P,t,J,L,V,W,K,Y,H[K]):a(e,P,t,G,J,L,V,W,K,Y,H[K]),void 0!==C)return C}else if(ee>K){var te;if(q){if(te=w(e,P,J,L,V,W,Q),te>J){var re=b(e,P,J,te,V,W,Q);if(P===e-2){if(re>J&&(C=d.sweepComplete(e,t,J,re,V,W,K,ee,Y,H),void 0!==C))return C;if(te>re&&(C=d.sweepBipartite(e,t,re,te,V,W,K,ee,Y,H),void 0!==C))return C}else re>J&&i(M++,P+1,J,re,K,ee,16,-(1/0),1/0),te>re&&(i(M++,P+1,re,te,K,ee,0,-(1/0),1/0),i(M++,P+1,K,ee,re,te,1,-(1/0),1/0))}}else te=G?E(e,P,J,L,V,W,Q):w(e,P,J,L,V,W,Q),te>J&&(P===e-2?C=G?d.sweepBipartite(e,t,K,ee,Y,H,J,te,V,W):d.sweepBipartite(e,t,J,te,V,W,K,ee,Y,H):(i(M++,P+1,J,te,K,ee,G,-(1/0),1/0),i(M++,P+1,K,ee,J,te,1^G,-(1/0),1/0)))}}}}}t.exports=s;var u=e("typedarray-pool"),l=e("bit-twiddle"),c=e("./brute"),f=c.partial,h=c.full,d=e("./sweep"),p=e("./median"),m=e("./partition"),g=128,v=1<<22,y=1<<22,_=m("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),b=m("lo===p0",["p0"]),x=m("lou;++u,s+=o)for(var l=i[s],c=u,f=o*(u-1);c>r&&i[f+t]>l;--c,f-=o){for(var h=f,d=f+o,p=0;o>p;++p,++h,++d){var m=i[h];i[h]=i[d],i[d]=m}var g=a[c];a[c]=a[c-1],a[c-1]=g}}function i(e,t,r,i,a,u){if(r+1>=i)return r;for(var l=r,c=i,f=i+r>>>1,h=2*e,d=f,p=a[h*f+t];c>l;){if(s>c-l){n(e,t,l,c,a,u),p=a[h*f+t];break}var m=c-l,g=Math.random()*m+l|0,v=a[h*g+t],y=Math.random()*m+l|0,_=a[h*y+t],b=Math.random()*m+l|0,x=a[h*b+t];_>=v?x>=_?(d=y,p=_):v>=x?(d=g,p=v):(d=b,p=x):_>=x?(d=y,p=_):x>=v?(d=g,p=v):(d=b,p=x);for(var A=h*(c-1),w=h*d,E=0;h>E;++E,++A,++w){var D=a[A];a[A]=a[w],a[w]=D}var k=u[c-1];u[c-1]=u[d],u[d]=k,d=o(e,t,l,c-1,a,u,p);for(var A=h*(c-1),w=h*d,E=0;h>E;++E,++A,++w){var D=a[A];a[A]=a[w],a[w]=D}var k=u[c-1];if(u[c-1]=u[d],u[d]=k,d>f){for(c=d-1;c>l&&a[h*(c-1)+t]===p;)c-=1;c+=1}else{if(!(f>d))break;for(l=d+1;c>l&&a[h*l+t]===p;)l+=1}}return o(e,t,r,f,a,u,a[h*f+t])}t.exports=i;var a=e("./partition"),o=a("lo=0&&n.push("lo=e[k+n]"),e.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",e)),Function.apply(void 0,r)}t.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],35:[function(e,t,r){"use strict";function n(e,t){4*h>=t?i(0,t-1,e):f(0,t-1,e)}function i(e,t,r){for(var n=2*(e+1),i=e+1;t>=i;++i){for(var a=r[n++],o=r[n++],s=i,u=n-2;s-- >e;){var l=r[u-2],c=r[u-1];if(a>l)break;if(l===a&&o>c)break;r[u]=l,r[u+1]=c,u-=2}r[u]=a,r[u+1]=o}}function a(e,t,r){e*=2,t*=2;var n=r[e],i=r[e+1];r[e]=r[t],r[e+1]=r[t+1],r[t]=n,r[t+1]=i}function o(e,t,r){e*=2,t*=2,r[e]=r[t],r[e+1]=r[t+1]}function s(e,t,r,n){e*=2,t*=2,r*=2;var i=n[e],a=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=n[r],n[t+1]=n[r+1],n[r]=i,n[r+1]=a}function u(e,t,r,n,i){e*=2,t*=2,i[e]=i[t],i[t]=r,i[e+1]=i[t+1],i[t+1]=n}function l(e,t,r){e*=2,t*=2;var n=r[e],i=r[t];return i>n?!1:n===i?r[e+1]>r[t+1]:!0}function c(e,t,r,n){e*=2;var i=n[e];return t>i?!0:i===t?n[e+1]>1,g=m-n,v=m+n,y=d,_=g,b=m,x=v,A=p,w=e+1,E=t-1,D=0;l(y,_,r)&&(D=y,y=_,_=D),l(x,A,r)&&(D=x,x=A,A=D),l(y,b,r)&&(D=y,y=b,b=D),l(_,b,r)&&(D=_,_=b,b=D),l(y,x,r)&&(D=y,y=x,x=D),l(b,x,r)&&(D=b,b=x,x=D),l(_,A,r)&&(D=_,_=A,A=D),l(_,b,r)&&(D=_,_=b,b=D),l(x,A,r)&&(D=x,x=A,A=D);for(var k=r[2*_],T=r[2*_+1],F=r[2*x],S=r[2*x+1],C=2*y,M=2*b,R=2*A,j=2*d,P=2*m,I=2*p,L=0;2>L;++L){var B=r[C+L],N=r[M+L],O=r[R+L];r[j+L]=B,r[P+L]=N,r[I+L]=O}o(g,e,r),o(v,t,r);for(var z=w;E>=z;++z)if(c(z,k,T,r))z!==w&&a(z,w,r),++w;else if(!c(z,F,S,r))for(;;){if(c(E,F,S,r)){c(E,k,T,r)?(s(z,w,E,r),++w,--E):(a(z,E,r),--E);break}if(--E=w-2-e?i(e,w-2,r):f(e,w-2,r),h>=t-(E+2)?i(E+2,t,r):f(E+2,t,r),h>=E-w?i(w,E,r):f(w,E,r)}t.exports=n;var h=32},{}],36:[function(e,t,r){"use strict";function n(e){var t=f.nextPow2(e);m.lengthw;++w){var E=s[w],D=_*w;x[p++]=o[D+b],x[p++]=-(E+1),x[p++]=o[D+A],x[p++]=E}for(var w=u;l>w;++w){var E=f[w]+d,k=_*w;x[p++]=c[k+b],x[p++]=-E,x[p++]=c[k+A],x[p++]=E}var T=p>>>1;h(x,T);for(var F=0,S=0,w=0;T>w;++w){var C=0|x[2*w+1];if(C>=d)C=C-d|0,i(v,y,S--,C);else if(C>=0)i(m,g,F--,C);else if(-d>=C){C=-C-d|0;for(var M=0;F>M;++M){var R=t(m[M],C);if(void 0!==R)return R}a(v,y,S++,C)}else{C=-C-1|0;for(var M=0;S>M;++M){var R=t(C,v[M]);if(void 0!==R)return R}a(m,g,F++,C)}}}function s(e,t,r,n,o,s,u,l,c,f){for(var d=0,p=2*e,A=e-1,w=p-1,E=r;n>E;++E){var D=s[E]+1<<1,k=p*E;x[d++]=o[k+A],x[d++]=-D,x[d++]=o[k+w],x[d++]=D}for(var E=u;l>E;++E){var D=f[E]+1<<1,T=p*E;x[d++]=c[T+A],x[d++]=1|-D,x[d++]=c[T+w],x[d++]=1|D}var F=d>>>1;h(x,F);for(var S=0,C=0,M=0,E=0;F>E;++E){var R=0|x[2*E+1],j=1&R;if(F-1>E&&R>>1===x[2*E+3]>>1&&(j=2,E+=1),0>R){for(var P=-(R>>1)-1,I=0;M>I;++I){var L=t(_[I],P);if(void 0!==L)return L}if(0!==j)for(var I=0;S>I;++I){var L=t(m[I],P);if(void 0!==L)return L}if(1!==j)for(var I=0;C>I;++I){var L=t(v[I],P);if(void 0!==L)return L}0===j?a(m,g,S++,P):1===j?a(v,y,C++,P):2===j&&a(_,b,M++,P)}else{var P=(R>>1)-1;0===j?i(m,g,S--,P):1===j?i(v,y,C--,P):2===j&&i(_,b,M--,P)}}}function u(e,t,r,n,o,s,u,l,c,f,p,v){var y=0,_=2*e,b=t,A=t+e,w=1,E=1;n?E=d:w=d;for(var D=o;s>D;++D){var k=D+w,T=_*D;x[y++]=u[T+b],x[y++]=-k,x[y++]=u[T+A],x[y++]=k}for(var D=c;f>D;++D){var k=D+E,F=_*D;x[y++]=p[F+b],x[y++]=-k}var S=y>>>1;h(x,S);for(var C=0,D=0;S>D;++D){var M=0|x[2*D+1];if(0>M){var k=-M,R=!1;if(k>=d?(R=!n,k-=d):(R=!!n,k-=1),R)a(m,g,C++,k);else{var j=v[k],P=_*k,I=p[P+t+1],L=p[P+t+1+e];e:for(var B=0;C>B;++B){var N=m[B],O=_*N;if(!(Lz;++z)if(p[P+z+e]y;++y){var _=y+d,b=p*y;x[f++]=a[b+g],x[f++]=-_,x[f++]=a[b+v],x[f++]=_}for(var y=s;u>y;++y){var _=y+1,A=p*y;x[f++]=l[A+g],x[f++]=-_}var w=f>>>1;h(x,w);for(var E=0,y=0;w>y;++y){var D=0|x[2*y+1];if(0>D){var _=-D;if(_>=d)m[E++]=_-d;else{_-=1;var k=c[_],T=p*_,F=l[T+t+1],S=l[T+t+1+e];e:for(var C=0;E>C;++C){var M=m[C],R=o[M];if(R===k)break;var j=p*M;if(!(SP;++P)if(l[T+P+e]=0;--C)if(m[C]===_){for(var P=C+1;E>P;++P)m[P-1]=m[P];break}--E}}}t.exports={init:n,sweepBipartite:o,sweepComplete:s,scanBipartite:u,scanComplete:l};var c=e("typedarray-pool"),f=e("bit-twiddle"),h=e("./sort"),d=1<<28,p=1024,m=c.mallocInt32(p),g=c.mallocInt32(p),v=c.mallocInt32(p),y=c.mallocInt32(p),_=c.mallocInt32(p),b=c.mallocInt32(p),x=c.mallocDouble(8*p)},{"./sort":35,"bit-twiddle":29,"typedarray-pool":187}],37:[function(e,t,r){},{}],38:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i,a=typeof e;if("number"===a)i=e>0?e>>>0:0;else if("string"===a)"base64"===t&&(e=w(e)),i=n.byteLength(e,t);else{if("object"!==a||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&I(e.data)&&(e=e.data),i=+e.length>0?Math.floor(+e.length):0}if(this.length>L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");var o;n.TYPED_ARRAY_SUPPORT?o=n._augment(new Uint8Array(i)):(o=this,o.length=i,o._isBuffer=!0);var s;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)o._set(e);else if(D(e))if(n.isBuffer(e))for(s=0;i>s;s++)o[s]=e.readUInt8(s);else for(s=0;i>s;s++)o[s]=(e[s]%256+256)%256;else if("string"===a)o.write(e,0,t);else if("number"===a&&!n.TYPED_ARRAY_SUPPORT&&!r)for(s=0;i>s;s++)o[s]=0;return o}function i(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;n>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+o]=s}return o}function a(e,t,r,n){var i=M(T(t),e,r,n);return i}function o(e,t,r,n){var i=M(F(t),e,r,n);return i}function s(e,t,r,n){return o(e,t,r,n)}function u(e,t,r,n){var i=M(C(t),e,r,n);return i}function l(e,t,r,n){var i=M(S(t),e,r,n,2);return i}function c(e,t,r){return 0===t&&r===e.length?j.fromByteArray(e):j.fromByteArray(e.slice(t,r))}function f(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var a=t;r>a;a++)e[a]<=127?(n+=R(i)+String.fromCharCode(e[a]),i=""):i+="%"+e[a].toString(16);return n+R(i)}function h(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function d(e,t,r){return h(e,t,r)}function p(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",a=t;r>a;a++)i+=k(e[a]);return i}function m(e,t,r){for(var n=e.slice(t,r),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,r,i,a,o){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>a||o>t)throw new TypeError("value is out of bounds");if(r+i>e.length)throw new TypeError("index out of range")}function y(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);a>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function _(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);a>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function b(e,t,r,n,i,a){if(t>i||a>t)throw new TypeError("value is out of bounds");if(r+n>e.length)throw new TypeError("index out of range")}function x(e,t,r,n,i){return i||b(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),P.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,i){return i||b(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),P.write(e,t,r,n,52,8),r+8}function w(e){for(e=E(e).replace(N,"");e.length%4!==0;)e+="=";return e}function E(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function D(e){return I(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function k(e){return 16>e?"0"+e.toString(16):e.toString(16)}function T(e){for(var t=[],r=0;r=n)t.push(n);else{var i=r;n>=55296&&57343>=n&&r++;for(var a=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),o=0;o>8,n=t%256,i.push(n),i.push(r);return i}function C(e){return j.toByteArray(e)}function M(e,t,r,n,i){i&&(n-=n%i);for(var a=0;n>a&&!(a+r>=t.length||a>=e.length);a++)t[a+r]=e[a];return a; -}function R(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var j=e("base64-js"),P=e("ieee754"),I=e("is-array");r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var L=1073741823;n.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var r=e.length,i=t.length,a=0,o=Math.min(r,i);o>a&&e[a]===t[a];a++);return a!==o&&(r=e[a],i=t[a]),i>r?-1:r>i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!I(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new n(0);if(1===e.length)return e[0];var r;if(void 0===t)for(t=0,r=0;r>>1;break;case"utf8":case"utf-8":r=T(e).length;break;case"base64":r=C(e).length;break;default:r=e.length}return r},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(e,t,r){var n=!1;if(t>>>=0,r=void 0===r||r===1/0?this.length:r>>>0,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return p(this,t,r);case"utf8":case"utf-8":return f(this,t,r);case"ascii":return h(this,t,r);case"binary":return d(this,t,r);case"base64":return c(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}},n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===n.compare(this,e)},n.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},n.prototype.compare=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return n.compare(this,e)},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var c=n;n=t,t=r,r=c}t=Number(t)||0;var f=this.length-t;r?(r=Number(r),r>f&&(r=f)):r=f,n=String(n||"utf8").toLowerCase();var h;switch(n){case"hex":h=i(this,e,t,r);break;case"utf8":case"utf-8":h=a(this,e,t,r);break;case"ascii":h=o(this,e,t,r);break;case"binary":h=s(this,e,t,r);break;case"base64":h=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=l(this,e,t,r);break;default:throw new TypeError("Unknown encoding: "+n)}return h},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r=this.length;if(e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e),n.TYPED_ARRAY_SUPPORT)return n._augment(this.subarray(e,t));for(var i=t-e,a=new n(i,void 0,!0),o=0;i>o;o++)a[o]=this[o+e];return a},n.prototype.readUInt8=function(e,t){return t||g(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return t||g(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return t||g(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return t||g(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return t||g(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readInt8=function(e,t){return t||g(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||g(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){t||g(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return t||g(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||g(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||g(e,4,this.length),P.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||g(e,4,this.length),P.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||g(e,8,this.length),P.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||g(e,8,this.length),P.read(this,e,!1,52,8)},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):_(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):_(this,e,t,!1),t+4},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):_(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):_(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,i){var a=this;if(r||(r=0),i||0===i||(i=this.length),t||(t=0),i!==r&&0!==e.length&&0!==a.length){if(r>i)throw new TypeError("sourceEnd < sourceStart");if(0>t||t>=e.length)throw new TypeError("targetStart out of bounds");if(0>r||r>=a.length)throw new TypeError("sourceStart out of bounds");if(0>i||i>a.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-to||!n.TYPED_ARRAY_SUPPORT)for(var s=0;o>s;s++)e[s+t]=this[s+r];else e._set(this.subarray(r,r+o),t)}},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new TypeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new TypeError("start out of bounds");if(0>r||r>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=T(e.toString()),a=i.length;for(n=t;r>n;n++)this[n]=i[n%a]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var B=n.prototype;n._augment=function(e){return e.constructor=n,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=B.get,e.set=B.set,e.write=B.write,e.toString=B.toString,e.toLocaleString=B.toString,e.toJSON=B.toJSON,e.equals=B.equals,e.compare=B.compare,e.copy=B.copy,e.slice=B.slice,e.readUInt8=B.readUInt8,e.readUInt16LE=B.readUInt16LE,e.readUInt16BE=B.readUInt16BE,e.readUInt32LE=B.readUInt32LE,e.readUInt32BE=B.readUInt32BE,e.readInt8=B.readInt8,e.readInt16LE=B.readInt16LE,e.readInt16BE=B.readInt16BE,e.readInt32LE=B.readInt32LE,e.readInt32BE=B.readInt32BE,e.readFloatLE=B.readFloatLE,e.readFloatBE=B.readFloatBE,e.readDoubleLE=B.readDoubleLE,e.readDoubleBE=B.readDoubleBE,e.writeUInt8=B.writeUInt8,e.writeUInt16LE=B.writeUInt16LE,e.writeUInt16BE=B.writeUInt16BE,e.writeUInt32LE=B.writeUInt32LE,e.writeUInt32BE=B.writeUInt32BE,e.writeInt8=B.writeInt8,e.writeInt16LE=B.writeInt16LE,e.writeInt16BE=B.writeInt16BE,e.writeInt32LE=B.writeInt32LE,e.writeInt32BE=B.writeInt32BE,e.writeFloatLE=B.writeFloatLE,e.writeFloatBE=B.writeFloatBE,e.writeDoubleLE=B.writeDoubleLE,e.writeDoubleBE=B.writeDoubleBE,e.fill=B.fill,e.inspect=B.inspect,e.toArrayBuffer=B.toArrayBuffer,e};var N=/[^+\/0-9A-z]/g},{"base64-js":28,ieee754:145,"is-array":148}],39:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/$.core").Array.from},{"../../modules/$.core":64,"../../modules/es6.array.from":116,"../../modules/es6.string.iterator":128}],40:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":114,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],41:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.is-iterable")},{"../modules/core.is-iterable":115,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],42:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/$.core").Map},{"../modules/$.core":64,"../modules/es6.map":118,"../modules/es6.object.to-string":125,"../modules/es6.string.iterator":128,"../modules/es7.map.to-json":130,"../modules/web.dom.iterable":132}],43:[function(e,t,r){e("../../modules/es6.math.log2"),t.exports=e("../../modules/$.core").Math.log2},{"../../modules/$.core":64,"../../modules/es6.math.log2":119}],44:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/$.core").Object.assign},{"../../modules/$.core":64,"../../modules/es6.object.assign":120}],45:[function(e,t,r){var n=e("../../modules/$");t.exports=function(e,t){return n.create(e,t)}},{"../../modules/$":89}],46:[function(e,t,r){var n=e("../../modules/$");t.exports=function(e,t){return n.setDescs(e,t)}},{"../../modules/$":89}],47:[function(e,t,r){var n=e("../../modules/$");t.exports=function(e,t,r){return n.setDesc(e,t,r)}},{"../../modules/$":89}],48:[function(e,t,r){e("../../modules/es6.object.freeze"),t.exports=e("../../modules/$.core").Object.freeze},{"../../modules/$.core":64,"../../modules/es6.object.freeze":121}],49:[function(e,t,r){var n=e("../../modules/$");e("../../modules/es6.object.get-own-property-descriptor"),t.exports=function(e,t){return n.getDesc(e,t)}},{"../../modules/$":89,"../../modules/es6.object.get-own-property-descriptor":122}],50:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/$.core").Object.keys},{"../../modules/$.core":64,"../../modules/es6.object.keys":123}],51:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/$.core").Object.setPrototypeOf},{"../../modules/$.core":64,"../../modules/es6.object.set-prototype-of":124}],52:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),t.exports=e("../modules/$.core").Promise},{"../modules/$.core":64,"../modules/es6.object.to-string":125,"../modules/es6.promise":126,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],53:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.set"),e("../modules/es7.set.to-json"),t.exports=e("../modules/$.core").Set},{"../modules/$.core":64,"../modules/es6.object.to-string":125,"../modules/es6.set":127,"../modules/es6.string.iterator":128,"../modules/es7.set.to-json":131,"../modules/web.dom.iterable":132}],54:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),t.exports=e("../../modules/$.core").Symbol},{"../../modules/$.core":64,"../../modules/es6.object.to-string":125,"../../modules/es6.symbol":129}],55:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/$.wks")("iterator")},{"../../modules/$.wks":112,"../../modules/es6.string.iterator":128,"../../modules/web.dom.iterable":132}],56:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],57:[function(e,t,r){t.exports=function(){}},{}],58:[function(e,t,r){var n=e("./$.is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./$.is-object":82}],59:[function(e,t,r){var n=e("./$.cof"),i=e("./$.wks")("toStringTag"),a="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[i])?r:a?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},{"./$.cof":60,"./$.wks":112}],60:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],61:[function(e,t,r){"use strict";var n=e("./$"),i=e("./$.hide"),a=e("./$.redefine-all"),o=e("./$.ctx"),s=e("./$.strict-new"),u=e("./$.defined"),l=e("./$.for-of"),c=e("./$.iter-define"),f=e("./$.iter-step"),h=e("./$.uid")("id"),d=e("./$.has"),p=e("./$.is-object"),m=e("./$.set-species"),g=e("./$.descriptors"),v=Object.isExtensible||p,y=g?"_s":"size",_=0,b=function(e,t){if(!p(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!d(e,h)){if(!v(e))return"F";if(!t)return"E";i(e,h,++_)}return"O"+e[h]},x=function(e,t){var r,n=b(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,i){var c=e(function(e,a){s(e,c,t),e._i=n.create(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=a&&l(a,r,e[i],e)});return a(c.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[y]=0},"delete":function(e){var t=this,r=x(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[y]--}return!!r},forEach:function(e){for(var t,r=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!x(this,e)}}),g&&n.setDesc(c.prototype,"size",{get:function(){return u(this[y])}}),c},def:function(e,t,r){var n,i,a=x(e,t);return a?a.v=r:(e._l=a={i:i=b(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=a),n&&(n.n=a),e[y]++,"F"!==i&&(e._i[i]=a)),e},getEntry:x,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?f(0,r.k):"values"==t?f(0,r.v):f(0,[r.k,r.v]):(e._t=void 0,f(1))},r?"entries":"values",!r,!0),m(t)}}},{"./$":89,"./$.ctx":65,"./$.defined":66,"./$.descriptors":67,"./$.for-of":72,"./$.has":75,"./$.hide":76,"./$.is-object":82,"./$.iter-define":85,"./$.iter-step":87,"./$.redefine-all":96,"./$.set-species":100,"./$.strict-new":104,"./$.uid":111}],62:[function(e,t,r){var n=e("./$.for-of"),i=e("./$.classof");t.exports=function(e){return function(){if(i(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return n(this,!1,t.push,t),t}}},{"./$.classof":59,"./$.for-of":72}],63:[function(e,t,r){"use strict";var n=e("./$"),i=e("./$.global"),a=e("./$.export"),o=e("./$.fails"),s=e("./$.hide"),u=e("./$.redefine-all"),l=e("./$.for-of"),c=e("./$.strict-new"),f=e("./$.is-object"),h=e("./$.set-to-string-tag"),d=e("./$.descriptors");t.exports=function(e,t,r,p,m,g){var v=i[e],y=v,_=m?"set":"add",b=y&&y.prototype,x={};return d&&"function"==typeof y&&(g||b.forEach&&!o(function(){(new y).entries().next()}))?(y=t(function(t,r){c(t,y,e),t._c=new v,void 0!=r&&l(r,m,t[_],t)}),n.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(e){var t="add"==e||"set"==e;e in b&&(!g||"clear"!=e)&&s(y.prototype,e,function(r,n){if(!t&&g&&!f(r))return"get"==e?void 0:!1;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in b&&n.setDesc(y.prototype,"size",{get:function(){return this._c.size}})):(y=p.getConstructor(t,e,m,_),u(y.prototype,r)),h(y,e),x[e]=y,a(a.G+a.W+a.F,x),g||p.setStrong(y,e,m),y}},{"./$":89,"./$.descriptors":67,"./$.export":70,"./$.fails":71,"./$.for-of":72,"./$.global":74,"./$.hide":76,"./$.is-object":82,"./$.redefine-all":96,"./$.set-to-string-tag":101,"./$.strict-new":104}],64:[function(e,t,r){var n=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},{}],65:[function(e,t,r){var n=e("./$.a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./$.a-function":56}],66:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],67:[function(e,t,r){t.exports=!e("./$.fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./$.fails":71}],68:[function(e,t,r){var n=e("./$.is-object"),i=e("./$.global").document,a=n(i)&&n(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}},{"./$.global":74,"./$.is-object":82}],69:[function(e,t,r){var n=e("./$");t.exports=function(e){var t=n.getKeys(e),r=n.getSymbols;if(r)for(var i,a=r(e),o=n.isEnum,s=0;a.length>s;)o.call(e,i=a[s++])&&t.push(i);return t}},{"./$":89}],70:[function(e,t,r){var n=e("./$.global"),i=e("./$.core"),a=e("./$.ctx"),o="prototype",s=function(e,t,r){var u,l,c,f=e&s.F,h=e&s.G,d=e&s.S,p=e&s.P,m=e&s.B,g=e&s.W,v=h?i:i[t]||(i[t]={}),y=h?n:d?n[t]:(n[t]||{})[o];h&&(r=t);for(u in r)l=!f&&y&&u in y,l&&u in v||(c=l?y[u]:r[u],v[u]=h&&"function"!=typeof y[u]?r[u]:m&&l?a(c,n):g&&y[u]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[o]=e[o],t}(c):p&&"function"==typeof c?a(Function.call,c):c,p&&((v[o]||(v[o]={}))[u]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},{"./$.core":64,"./$.ctx":65,"./$.global":74}],71:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],72:[function(e,t,r){var n=e("./$.ctx"),i=e("./$.iter-call"),a=e("./$.is-array-iter"),o=e("./$.an-object"),s=e("./$.to-length"),u=e("./core.get-iterator-method");t.exports=function(e,t,r,l){var c,f,h,d=u(e),p=n(r,l,t?2:1),m=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(a(d))for(c=s(e.length);c>m;m++)t?p(o(f=e[m])[0],f[1]):p(e[m]);else for(h=d.call(e);!(f=h.next()).done;)i(h,p,f.value,t)}},{"./$.an-object":58,"./$.ctx":65,"./$.is-array-iter":80,"./$.iter-call":83,"./$.to-length":109,"./core.get-iterator-method":113}],73:[function(e,t,r){var n=e("./$.to-iobject"),i=e("./$").getNames,a={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return o.slice()}};t.exports.get=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(n(e))}},{"./$":89,"./$.to-iobject":108}],74:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],75:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],76:[function(e,t,r){var n=e("./$"),i=e("./$.property-desc");t.exports=e("./$.descriptors")?function(e,t,r){return n.setDesc(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./$":89,"./$.descriptors":67,"./$.property-desc":95}],77:[function(e,t,r){t.exports=e("./$.global").document&&document.documentElement},{"./$.global":74}],78:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],79:[function(e,t,r){var n=e("./$.cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./$.cof":60}],80:[function(e,t,r){var n=e("./$.iterators"),i=e("./$.wks")("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},{"./$.iterators":88,"./$.wks":112}],81:[function(e,t,r){var n=e("./$.cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./$.cof":60}],82:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],83:[function(e,t,r){var n=e("./$.an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(a){var o=e["return"];throw void 0!==o&&n(o.call(e)),a}}},{"./$.an-object":58}],84:[function(e,t,r){"use strict";var n=e("./$"),i=e("./$.property-desc"),a=e("./$.set-to-string-tag"),o={};e("./$.hide")(o,e("./$.wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n.create(o,{next:i(1,r)}),a(e,t+" Iterator")}},{"./$":89,"./$.hide":76,"./$.property-desc":95,"./$.set-to-string-tag":101,"./$.wks":112}],85:[function(e,t,r){"use strict";var n=e("./$.library"),i=e("./$.export"),a=e("./$.redefine"),o=e("./$.hide"),s=e("./$.has"),u=e("./$.iterators"),l=e("./$.iter-create"),c=e("./$.set-to-string-tag"),f=e("./$").getProto,h=e("./$.wks")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",m="keys",g="values",v=function(){return this};t.exports=function(e,t,r,y,_,b,x){l(r,t,y);var A,w,E=function(e){if(!d&&e in F)return F[e];switch(e){case m:return function(){return new r(this,e)};case g:return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",k=_==g,T=!1,F=e.prototype,S=F[h]||F[p]||_&&F[_],C=S||E(_);if(S){var M=f(C.call(new e));c(M,D,!0),!n&&s(F,p)&&o(M,h,v),k&&S.name!==g&&(T=!0,C=function(){return S.call(this)})}if(n&&!x||!d&&!T&&F[h]||o(F,h,C),u[t]=C,u[D]=v,_)if(A={values:k?C:E(g),keys:b?C:E(m),entries:k?E("entries"):C},x)for(w in A)w in F||a(F,w,A[w]);else i(i.P+i.F*(d||T),t,A);return A}},{"./$":89,"./$.export":70,"./$.has":75,"./$.hide":76,"./$.iter-create":84,"./$.iterators":88,"./$.library":91,"./$.redefine":97,"./$.set-to-string-tag":101,"./$.wks":112}],86:[function(e,t,r){var n=e("./$.wks")("iterator"),i=!1;try{var a=[7][n]();a["return"]=function(){i=!0},Array.from(a,function(){throw 2})}catch(o){}t.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var a=[7],o=a[n]();o.next=function(){r=!0},a[n]=function(){return o},e(a)}catch(s){}return r}},{"./$.wks":112}],87:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],88:[function(e,t,r){t.exports={}},{}],89:[function(e,t,r){var n=Object;t.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},{}],90:[function(e,t,r){var n=e("./$"),i=e("./$.to-iobject");t.exports=function(e,t){for(var r,a=i(e),o=n.getKeys(a),s=o.length,u=0;s>u;)if(a[r=o[u++]]===t)return r}},{"./$":89,"./$.to-iobject":108}],91:[function(e,t,r){t.exports=!0},{}],92:[function(e,t,r){var n,i,a,o=e("./$.global"),s=e("./$.task").set,u=o.MutationObserver||o.WebKitMutationObserver,l=o.process,c=o.Promise,f="process"==e("./$.cof")(l),h=function(){var e,t,r;for(f&&(e=l.domain)&&(l.domain=null,e.exit());n;)t=n.domain,r=n.fn,t&&t.enter(),r(),t&&t.exit(),n=n.next;i=void 0,e&&e.enter()};if(f)a=function(){l.nextTick(h)};else if(u){var d=1,p=document.createTextNode("");new u(h).observe(p,{characterData:!0}),a=function(){p.data=d=-d}}else a=c&&c.resolve?function(){c.resolve().then(h)}:function(){s.call(o,h)};t.exports=function(e){var t={fn:e,next:void 0,domain:f&&l.domain};i&&(i.next=t),n||(n=t,a()),i=t}},{"./$.cof":60,"./$.global":74,"./$.task":106}],93:[function(e,t,r){var n=e("./$"),i=e("./$.to-object"),a=e("./$.iobject");t.exports=e("./$.fails")(function(){var e=Object.assign,t={},r={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(e){r[e]=e}),7!=e({},t)[n]||Object.keys(e({},r)).join("")!=i})?function(e,t){for(var r=i(e),o=arguments,s=o.length,u=1,l=n.getKeys,c=n.getSymbols,f=n.isEnum;s>u;)for(var h,d=a(o[u++]),p=c?l(d).concat(c(d)):l(d),m=p.length,g=0;m>g;)f.call(d,h=p[g++])&&(r[h]=d[h]);return r}:Object.assign},{"./$":89,"./$.fails":71,"./$.iobject":79,"./$.to-object":110}],94:[function(e,t,r){var n=e("./$.export"),i=e("./$.core"),a=e("./$.fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],o={};o[e]=t(r),n(n.S+n.F*a(function(){r(1)}),"Object",o)}},{"./$.core":64,"./$.export":70,"./$.fails":71}],95:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],96:[function(e,t,r){var n=e("./$.redefine");t.exports=function(e,t){for(var r in t)n(e,r,t[r]);return e}},{"./$.redefine":97}],97:[function(e,t,r){t.exports=e("./$.hide")},{"./$.hide":76}],98:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],99:[function(e,t,r){var n=e("./$").getDesc,i=e("./$.is-object"),a=e("./$.an-object"),o=function(e,t){if(a(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,i){try{i=e("./$.ctx")(Function.call,n(Object.prototype,"__proto__").set,2),i(t,[]),r=!(t instanceof Array)}catch(a){r=!0}return function(e,t){return o(e,t),r?e.__proto__=t:i(e,t),e}}({},!1):void 0),check:o}},{"./$":89,"./$.an-object":58,"./$.ctx":65,"./$.is-object":82}],100:[function(e,t,r){"use strict";var n=e("./$.core"),i=e("./$"),a=e("./$.descriptors"),o=e("./$.wks")("species");t.exports=function(e){var t=n[e];a&&t&&!t[o]&&i.setDesc(t,o,{configurable:!0,get:function(){return this}})}},{"./$":89,"./$.core":64,"./$.descriptors":67,"./$.wks":112}],101:[function(e,t,r){var n=e("./$").setDesc,i=e("./$.has"),a=e("./$.wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},{"./$":89,"./$.has":75,"./$.wks":112}],102:[function(e,t,r){var n=e("./$.global"),i="__core-js_shared__",a=n[i]||(n[i]={});t.exports=function(e){return a[e]||(a[e]={})}},{"./$.global":74}],103:[function(e,t,r){var n=e("./$.an-object"),i=e("./$.a-function"),a=e("./$.wks")("species");t.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||void 0==(r=n(o)[a])?t:i(r)}},{"./$.a-function":56,"./$.an-object":58,"./$.wks":112}],104:[function(e,t,r){t.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},{}],105:[function(e,t,r){var n=e("./$.to-integer"),i=e("./$.defined");t.exports=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),l=s.length;return 0>u||u>=l?e?"":void 0:(a=s.charCodeAt(u),55296>a||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):(a-55296<<10)+(o-56320)+65536)}}},{"./$.defined":66,"./$.to-integer":107}],106:[function(e,t,r){var n,i,a,o=e("./$.ctx"),s=e("./$.invoke"),u=e("./$.html"),l=e("./$.dom-create"),c=e("./$.global"),f=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,m=0,g={},v="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},_=function(e){y.call(e.data)};h&&d||(h=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},n(m),m},d=function(e){delete g[e]},"process"==e("./$.cof")(f)?n=function(e){f.nextTick(o(y,e,1))}:p?(i=new p,a=i.port2,i.port1.onmessage=_,n=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",_,!1)):n=v in l("script")?function(e){u.appendChild(l("script"))[v]=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),t.exports={set:h,clear:d}},{"./$.cof":60,"./$.ctx":65,"./$.dom-create":68,"./$.global":74,"./$.html":77,"./$.invoke":78}],107:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],108:[function(e,t,r){var n=e("./$.iobject"),i=e("./$.defined");t.exports=function(e){return n(i(e))}},{"./$.defined":66,"./$.iobject":79}],109:[function(e,t,r){var n=e("./$.to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./$.to-integer":107}],110:[function(e,t,r){var n=e("./$.defined");t.exports=function(e){return Object(n(e))}},{"./$.defined":66}],111:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],112:[function(e,t,r){var n=e("./$.shared")("wks"),i=e("./$.uid"),a=e("./$.global").Symbol;t.exports=function(e){return n[e]||(n[e]=a&&a[e]||(a||i)("Symbol."+e))}},{"./$.global":74,"./$.shared":102,"./$.uid":111}],113:[function(e,t,r){var n=e("./$.classof"),i=e("./$.wks")("iterator"),a=e("./$.iterators");t.exports=e("./$.core").getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||a[n(e)]:void 0}},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],114:[function(e,t,r){var n=e("./$.an-object"),i=e("./core.get-iterator-method");t.exports=e("./$.core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./$.an-object":58,"./$.core":64,"./core.get-iterator-method":113}],115:[function(e,t,r){var n=e("./$.classof"),i=e("./$.wks")("iterator"),a=e("./$.iterators");t.exports=e("./$.core").isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||a.hasOwnProperty(n(t))}},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],116:[function(e,t,r){"use strict";var n=e("./$.ctx"),i=e("./$.export"),a=e("./$.to-object"),o=e("./$.iter-call"),s=e("./$.is-array-iter"),u=e("./$.to-length"),l=e("./core.get-iterator-method");i(i.S+i.F*!e("./$.iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,c,f=a(e),h="function"==typeof this?this:Array,d=arguments,p=d.length,m=p>1?d[1]:void 0,g=void 0!==m,v=0,y=l(f);if(g&&(m=n(m,p>2?d[2]:void 0,2)),void 0==y||h==Array&&s(y))for(t=u(f.length),r=new h(t);t>v;v++)r[v]=g?m(f[v],v):f[v];else for(c=y.call(f),r=new h;!(i=c.next()).done;v++)r[v]=g?o(c,m,[i.value,v],!0):i.value;return r.length=v,r}})},{"./$.ctx":65,"./$.export":70,"./$.is-array-iter":80,"./$.iter-call":83,"./$.iter-detect":86,"./$.to-length":109,"./$.to-object":110,"./core.get-iterator-method":113}],117:[function(e,t,r){"use strict";var n=e("./$.add-to-unscopables"),i=e("./$.iter-step"),a=e("./$.iterators"),o=e("./$.to-iobject"); -t.exports=e("./$.iter-define")(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},{"./$.add-to-unscopables":57,"./$.iter-define":85,"./$.iter-step":87,"./$.iterators":88,"./$.to-iobject":108}],118:[function(e,t,r){"use strict";var n=e("./$.collection-strong");e("./$.collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{"./$.collection":63,"./$.collection-strong":61}],119:[function(e,t,r){var n=e("./$.export");n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{"./$.export":70}],120:[function(e,t,r){var n=e("./$.export");n(n.S+n.F,"Object",{assign:e("./$.object-assign")})},{"./$.export":70,"./$.object-assign":93}],121:[function(e,t,r){var n=e("./$.is-object");e("./$.object-sap")("freeze",function(e){return function(t){return e&&n(t)?e(t):t}})},{"./$.is-object":82,"./$.object-sap":94}],122:[function(e,t,r){var n=e("./$.to-iobject");e("./$.object-sap")("getOwnPropertyDescriptor",function(e){return function(t,r){return e(n(t),r)}})},{"./$.object-sap":94,"./$.to-iobject":108}],123:[function(e,t,r){var n=e("./$.to-object");e("./$.object-sap")("keys",function(e){return function(t){return e(n(t))}})},{"./$.object-sap":94,"./$.to-object":110}],124:[function(e,t,r){var n=e("./$.export");n(n.S,"Object",{setPrototypeOf:e("./$.set-proto").set})},{"./$.export":70,"./$.set-proto":99}],125:[function(e,t,r){t.exports=e(37)},{"/Users/bcamper/Documents/dev/vector-map/node_modules/browser-resolve/empty.js":37}],126:[function(e,t,r){"use strict";var n,i=e("./$"),a=e("./$.library"),o=e("./$.global"),s=e("./$.ctx"),u=e("./$.classof"),l=e("./$.export"),c=e("./$.is-object"),f=e("./$.an-object"),h=e("./$.a-function"),d=e("./$.strict-new"),p=e("./$.for-of"),m=e("./$.set-proto").set,g=e("./$.same-value"),v=e("./$.wks")("species"),y=e("./$.species-constructor"),_=e("./$.microtask"),b="Promise",x=o.process,A="process"==u(x),w=o[b],E=function(e){var t=new w(function(){});return e&&(t.constructor=Object),w.resolve(t)===t},D=function(){function t(e){var r=new w(e);return m(r,t.prototype),r}var r=!1;try{if(r=w&&w.resolve&&E(),m(t,w),t.prototype=i.create(w.prototype,{constructor:{value:t}}),t.resolve(5).then(function(){})instanceof t||(r=!1),r&&e("./$.descriptors")){var n=!1;w.resolve(i.setDesc({},"then",{get:function(){n=!0}})),r=n}}catch(a){r=!1}return r}(),k=function(e,t){return a&&e===w&&t===n?!0:g(e,t)},T=function(e){var t=f(e)[v];return void 0!=t?t:e},F=function(e){var t;return c(e)&&"function"==typeof(t=e.then)?t:!1},S=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=h(t),this.reject=h(r)},C=function(e){try{e()}catch(t){return{error:t}}},M=function(e,t){if(!e.n){e.n=!0;var r=e.c;_(function(){for(var n=e.v,i=1==e.s,a=0,s=function(t){var r,a,o=i?t.ok:t.fail,s=t.resolve,u=t.reject;try{o?(i||(e.h=!0),r=o===!0?n:o(n),r===t.promise?u(TypeError("Promise-chain cycle")):(a=F(r))?a.call(r,s,u):s(r)):u(n)}catch(l){u(l)}};r.length>a;)s(r[a++]);r.length=0,e.n=!1,t&&setTimeout(function(){var t,r,i=e.p;R(i)&&(A?x.emit("unhandledRejection",n,i):(t=o.onunhandledrejection)?t({promise:i,reason:n}):(r=o.console)&&r.error&&r.error("Unhandled promise rejection",n)),e.a=void 0},1)})}},R=function(e){var t,r=e._d,n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(t=n[i++],t.fail||!R(t.promise))return!1;return!0},j=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),M(t,!0))},P=function(e){var t,r=this;if(!r.d){r.d=!0,r=r.r||r;try{if(r.p===e)throw TypeError("Promise can't be resolved itself");(t=F(e))?_(function(){var n={r:r,d:!1};try{t.call(e,s(P,n,1),s(j,n,1))}catch(i){j.call(n,i)}}):(r.v=e,r.s=1,M(r,!1))}catch(n){j.call({r:r,d:!1},n)}}};D||(w=function(e){h(e);var t=this._d={p:d(this,w,b),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(s(P,t,1),s(j,t,1))}catch(r){j.call(t,r)}},e("./$.redefine-all")(w.prototype,{then:function(e,t){var r=new S(y(this,w)),n=r.promise,i=this._d;return r.ok="function"==typeof e?e:!0,r.fail="function"==typeof t&&t,i.c.push(r),i.a&&i.a.push(r),i.s&&M(i,!1),n},"catch":function(e){return this.then(void 0,e)}})),l(l.G+l.W+l.F*!D,{Promise:w}),e("./$.set-to-string-tag")(w,b),e("./$.set-species")(b),n=e("./$.core")[b],l(l.S+l.F*!D,b,{reject:function(e){var t=new S(this),r=t.reject;return r(e),t.promise}}),l(l.S+l.F*(!D||E(!0)),b,{resolve:function(e){if(e instanceof w&&k(e.constructor,this))return e;var t=new S(this),r=t.resolve;return r(e),t.promise}}),l(l.S+l.F*!(D&&e("./$.iter-detect")(function(e){w.all(e)["catch"](function(){})})),b,{all:function(e){var t=T(this),r=new S(t),n=r.resolve,a=r.reject,o=[],s=C(function(){p(e,!1,o.push,o);var r=o.length,s=Array(r);r?i.each.call(o,function(e,i){var o=!1;t.resolve(e).then(function(e){o||(o=!0,s[i]=e,--r||n(s))},a)}):n(s)});return s&&a(s.error),r.promise},race:function(e){var t=T(this),r=new S(t),n=r.reject,i=C(function(){p(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i&&n(i.error),r.promise}})},{"./$":89,"./$.a-function":56,"./$.an-object":58,"./$.classof":59,"./$.core":64,"./$.ctx":65,"./$.descriptors":67,"./$.export":70,"./$.for-of":72,"./$.global":74,"./$.is-object":82,"./$.iter-detect":86,"./$.library":91,"./$.microtask":92,"./$.redefine-all":96,"./$.same-value":98,"./$.set-proto":99,"./$.set-species":100,"./$.set-to-string-tag":101,"./$.species-constructor":103,"./$.strict-new":104,"./$.wks":112}],127:[function(e,t,r){"use strict";var n=e("./$.collection-strong");e("./$.collection")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e=0===e?0:e,e)}},n)},{"./$.collection":63,"./$.collection-strong":61}],128:[function(e,t,r){"use strict";var n=e("./$.string-at")(!0);e("./$.iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./$.iter-define":85,"./$.string-at":105}],129:[function(e,t,r){"use strict";var n=e("./$"),i=e("./$.global"),a=e("./$.has"),o=e("./$.descriptors"),s=e("./$.export"),u=e("./$.redefine"),l=e("./$.fails"),c=e("./$.shared"),f=e("./$.set-to-string-tag"),h=e("./$.uid"),d=e("./$.wks"),p=e("./$.keyof"),m=e("./$.get-names"),g=e("./$.enum-keys"),v=e("./$.is-array"),y=e("./$.an-object"),_=e("./$.to-iobject"),b=e("./$.property-desc"),x=n.getDesc,A=n.setDesc,w=n.create,E=m.get,D=i.Symbol,k=i.JSON,T=k&&k.stringify,F=!1,S=d("_hidden"),C=n.isEnum,M=c("symbol-registry"),R=c("symbols"),j="function"==typeof D,P=Object.prototype,I=o&&l(function(){return 7!=w(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=x(P,t);n&&delete P[t],A(e,t,r),n&&e!==P&&A(P,t,n)}:A,L=function(e){var t=R[e]=w(D.prototype);return t._k=e,o&&F&&I(P,e,{configurable:!0,set:function(t){a(this,S)&&a(this[S],e)&&(this[S][e]=!1),I(this,e,b(1,t))}}),t},B=function(e){return"symbol"==typeof e},N=function(e,t,r){return r&&a(R,t)?(r.enumerable?(a(e,S)&&e[S][t]&&(e[S][t]=!1),r=w(r,{enumerable:b(0,!1)})):(a(e,S)||A(e,S,b(1,{})),e[S][t]=!0),I(e,t,r)):A(e,t,r)},O=function(e,t){y(e);for(var r,n=g(t=_(t)),i=0,a=n.length;a>i;)N(e,r=n[i++],t[r]);return e},z=function(e,t){return void 0===t?w(e):O(w(e),t)},U=function(e){var t=C.call(this,e);return t||!a(this,e)||!a(R,e)||a(this,S)&&this[S][e]?t:!0},$=function(e,t){var r=x(e=_(e),t);return!r||!a(R,t)||a(e,S)&&e[S][t]||(r.enumerable=!0),r},G=function(e){for(var t,r=E(_(e)),n=[],i=0;r.length>i;)a(R,t=r[i++])||t==S||n.push(t);return n},q=function(e){for(var t,r=E(_(e)),n=[],i=0;r.length>i;)a(R,t=r[i++])&&n.push(R[t]);return n},V=function(e){if(void 0!==e&&!B(e)){for(var t,r,n=[e],i=1,a=arguments;a.length>i;)n.push(a[i++]);return t=n[1],"function"==typeof t&&(r=t),(r||!v(t))&&(t=function(e,t){return r&&(t=r.call(this,e,t)),B(t)?void 0:t}),n[1]=t,T.apply(k,n)}},W=l(function(){var e=D();return"[null]"!=T([e])||"{}"!=T({a:e})||"{}"!=T(Object(e))});j||(D=function(){if(B(this))throw TypeError("Symbol is not a constructor");return L(h(arguments.length>0?arguments[0]:void 0))},u(D.prototype,"toString",function(){return this._k}),B=function(e){return e instanceof D},n.create=z,n.isEnum=U,n.getDesc=$,n.setDesc=N,n.setDescs=O,n.getNames=m.get=G,n.getSymbols=q,o&&!e("./$.library")&&u(P,"propertyIsEnumerable",U,!0));var Y={"for":function(e){return a(M,e+="")?M[e]:M[e]=D(e)},keyFor:function(e){return p(M,e)},useSetter:function(){F=!0},useSimple:function(){F=!1}};n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=d(e);Y[e]=j?t:L(t)}),F=!0,s(s.G+s.W,{Symbol:D}),s(s.S,"Symbol",Y),s(s.S+s.F*!j,"Object",{create:z,defineProperty:N,defineProperties:O,getOwnPropertyDescriptor:$,getOwnPropertyNames:G,getOwnPropertySymbols:q}),k&&s(s.S+s.F*(!j||W),"JSON",{stringify:V}),f(D,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},{"./$":89,"./$.an-object":58,"./$.descriptors":67,"./$.enum-keys":69,"./$.export":70,"./$.fails":71,"./$.get-names":73,"./$.global":74,"./$.has":75,"./$.is-array":81,"./$.keyof":90,"./$.library":91,"./$.property-desc":95,"./$.redefine":97,"./$.set-to-string-tag":101,"./$.shared":102,"./$.to-iobject":108,"./$.uid":111,"./$.wks":112}],130:[function(e,t,r){var n=e("./$.export");n(n.P,"Map",{toJSON:e("./$.collection-to-json")("Map")})},{"./$.collection-to-json":62,"./$.export":70}],131:[function(e,t,r){var n=e("./$.export");n(n.P,"Set",{toJSON:e("./$.collection-to-json")("Set")})},{"./$.collection-to-json":62,"./$.export":70}],132:[function(e,t,r){e("./es6.array.iterator");var n=e("./$.iterators");n.NodeList=n.HTMLCollection=n.Array},{"./$.iterators":88,"./es6.array.iterator":117}],133:[function(e,t,r){function n(e){return e=Math.round(e),0>e?0:e>255?255:e}function i(e){return 0>e?0:e>1?1:e}function a(e){return n("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function o(e){return i("%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function s(e,t,r){return 0>r?r+=1:r>1&&(r-=1),1>6*r?e+(t-e)*r*6:1>2*r?t:2>3*r?e+(t-e)*(2/3-r)*6:e}function u(e){var t=e.replace(/ /g,"").toLowerCase();if(t in l)return l[t].slice();if("#"===t[0]){if(4===t.length){var r=parseInt(t.substr(1),16);return r>=0&&4095>=r?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===t.length){var r=parseInt(t.substr(1),16);return r>=0&&16777215>=r?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=t.indexOf("("),u=t.indexOf(")");if(-1!==i&&u+1===t.length){var c=t.substr(0,i),f=t.substr(i+1,u-(i+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=o(f.pop());case"rgb":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case"hsla":if(4!==f.length)return null;h=o(f.pop());case"hsl":if(3!==f.length)return null;var d=(parseFloat(f[0])%360+360)%360/360,p=o(f[1]),m=o(f[2]),g=.5>=m?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),h];default:return null}}return null}var l={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=u}catch(c){}},{}],134:[function(e,t,r){"use strict";function n(e,t,r){var i=0|e[r];if(0>=i)return[];var a,o=new Array(i);if(r===e.length-1)for(a=0;i>a;++a)o[a]=t;else for(a=0;i>a;++a)o[a]=n(e,t,r+1);return o}function i(e,t){var r,n;for(r=new Array(e),n=0;e>n;++n)r[n]=t;return r}function a(e,t){switch("undefined"==typeof t&&(t=0),typeof e){case"number":if(e>0)return i(0|e,t);break;case"object":if("number"==typeof e.length)return n(e,t,0)}return[]}t.exports=a},{}],135:[function(e,t,r){"use strict";function n(e){for(var t,r,n,a,s,u,c,f,h=i(e[0],!0),d=0,p=80,m=0;p>d&&m=p){t=h.next,r=a=t.p[0],n=s=t.p[1];do u=t.p[0],c=t.p[1],r>u&&(r=u),n>c&&(n=c),u>a&&(a=u),c>s&&(s=c),t=t.next;while(t!==h);f=Math.max(a-r,s-n)}e.length>1&&(h=l(e,h));var g=[];return h&&o(h,g,r,n,f),g}function i(e,t){var r,n,i,a=0,o=e.length;for(r=0,n=o-1;o>r;n=r++){var s=e[r],u=e[n];a+=(u[0]-s[0])*(s[1]+u[1])}if(t===a>0)for(r=0;o>r;r++)i=D(e[r],i);else for(r=o-1;r>=0;r--)i=D(e[r],i);return i}function a(e){var t,r=e;do if(t=!1,y(r.p,r.next.p)||0===v(r.prev.p,r.p,r.next.p)){if(r.prev.next=r.next,r.next.prev=r.prev,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ),r=e=r.prev,r===r.next)return null;t=!0}else r=r.next;while(t||r!==e);return e}function o(e,t,r,n,i,l){if(e=a(e)){l||void 0===r||h(e,r,n,i);for(var c,f,d=e;e.prev!==e.next;)if(c=e.prev,f=e.next,s(e,r,n,i))t.push(c.p,e.p,f.p),f.prev=c,c.next=f,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),e=f.next,d=f.next;else if(e=f,e===d){l?u(e,t,r,n,i):o(e,t,r,n,i,!0);break}}}function s(e,t,r,n){var i=e.prev.p,a=e.p,o=e.next.p,s=i[0],u=a[0],l=o[0],c=i[1],f=a[1],h=o[1],d=s*f-c*u,m=s*h-c*l,g=l*f-h*u,v=d-m-g;if(0>=v)return!1;var y,_,b,x,A,w,E,D=h-c,k=s-l,T=c-f,F=u-s;if(void 0!==t){var S=u>s?l>s?s:l:l>u?u:l,C=f>c?h>c?c:h:h>f?f:h,M=s>u?s>l?s:l:u>l?u:l,R=c>f?c>h?c:h:f>h?f:h,j=p(S,C,t,r,n),P=p(M,R,t,r,n);for(E=e.nextZ;E&&E.z<=P;)if(y=E.p,E=E.nextZ,y!==i&&y!==o&&(_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+d,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w)))))return!1;for(E=e.prevZ;E&&E.z>=j;)if(y=E.p,E=E.prevZ,y!==i&&y!==o&&(_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+d,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w)))))return!1}else for(E=e.next.next;E!==e.prev;)if(y=E.p,E=E.next,_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+d,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w))))return!1;return!0}function u(e,t,r,n,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(g(a,s)){var u=E(a,s);return o(a,t,r,n,i),void o(u,t,r,n,i)}s=s.next}a=a.next}while(a!==e)}function l(e,t){for(var r=e.length,n=[],o=1;r>o;o++){var s=a(i(e[o],!1));s&&n.push(m(s))}for(n.sort(w),o=0;o=i[1]){var c=n[0]+(u-n[1])*(i[0]-n[0])/(i[1]-n[1]);s>=c&&c>l&&(l=c,r=n[0]=k?-1:1,F=r,S=1/0;for(a=r.next;a!==F;)f=a.p[0],h=a.p[1],d=s-f,d>=0&&f>=v&&(p=(A*f+w*h-b)*T,p>=0&&(m=(E*f+D*h+_)*T,m>=0&&k*T-p-m>=0&&(g=Math.abs(u-h)/d,S>g&&x(a,e)&&(r=a,S=g)))),a=a.next;return r}function h(e,t,r,n){var i=e;do i.z=i.z||p(i.p[0],i.p[1],t,r,n),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,d(i)}function d(e){for(var t,r,n,i,a,o,s,u,l=1;;){for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;l>t&&(s++,n=n.nextZ,n);t++);for(u=l;s>0||u>0&&n;)0===s?(i=n,n=n.nextZ,u--):0!==u&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}if(a.nextZ=null,1>=o)return e;l*=2}}function p(e,t,r,n,i){return e=1e3*(e-r)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=1e3*(t-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function m(e){var t=e,r=e;do t.p[0]0?1:0>n?-1:0}function y(e,t){return e[0]===t[0]&&e[1]===t[1]}function _(e,t,r,n){return v(e,t,r)!==v(e,t,n)&&v(r,n,e)!==v(r,n,t)}function b(e,t,r){var n=e;do{var i=n.p,a=n.next.p;if(i!==t&&a!==t&&i!==r&&a!==r&&_(i,a,t,r))return!0;n=n.next}while(n!==e);return!1}function x(e,t){return-1===v(e.prev.p,e.p,e.next.p)?-1!==v(e.p,t.p,e.next.p)&&-1!==v(e.p,e.prev.p,t.p):-1===v(e.p,t.p,e.prev.p)||-1===v(e.p,e.next.p,t.p)}function A(e,t,r){var n=e,i=!1,a=(t[0]+r[0])/2,o=(t[1]+r[1])/2;do{var s=n.p,u=n.next.p;s[1]>o!=u[1]>o&&a<(u[0]-s[0])*(o-s[1])/(u[1]-s[1])+s[0]&&(i=!i),n=n.next}while(n!==e);return i}function w(e,t){return e.p[0]-t.p[0]}function E(e,t){var r=new k(e.p),n=new k(t.p),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,r}function D(e,t){var r=new k(e);return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function k(e){this.p=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null}t.exports=n},{}],136:[function(e,t,r){!function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):t("undefined"!=typeof r?r:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function r(e){return e>=48&&57>=e}function n(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function a(e){var t="0"!==e,r="01234567".indexOf(e);return yr>sr&&i(ar[sr])&&(t=!0,r=8*r+"01234567".indexOf(ar[sr++]),"0123".indexOf(e)>=0&&yr>sr&&i(ar[sr])&&(r=8*r+"01234567".indexOf(ar[sr++]))),{code:r,octal:t}}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function u(e){return 65536>e?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&ir.NonAsciiIdentifierStart.test(u(e))}function c(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&ir.NonAsciiIdentifierPart.test(u(e))}function f(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}}function h(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function m(e,r,n,i,a){var o;t("number"==typeof n,"Comment must have valid position"),br.lastCommentStart=n,o={type:e,value:r},xr.range&&(o.range=[n,i]),xr.loc&&(o.loc=a),xr.comments.push(o),xr.attachComment&&(xr.leadingComments.push(o),xr.trailingComments.push(o)),xr.tokenize&&(o.type=o.type+"Comment",xr.delegate&&(o=xr.delegate(o)),xr.tokens.push(o))}function g(e){var t,r,n,i;for(t=sr-e,r={start:{line:ur,column:sr-lr-e}};yr>sr;)if(n=ar.charCodeAt(sr),++sr,s(n))return cr=!0,xr.comments&&(i=ar.slice(t+e,sr-1),r.end={line:ur,column:sr-lr-1},m("Line",i,t,sr-1,r)),13===n&&10===ar.charCodeAt(sr)&&++sr,++ur,void(lr=sr);xr.comments&&(i=ar.slice(t+e,sr),r.end={line:ur,column:sr-lr},m("Line",i,t,sr,r))}function v(){var e,t,r,n;for(xr.comments&&(e=sr-2,t={start:{line:ur,column:sr-lr-2}});yr>sr;)if(r=ar.charCodeAt(sr),s(r))13===r&&10===ar.charCodeAt(sr+1)&&++sr,cr=!0,++ur,++sr,lr=sr;else if(42===r){if(47===ar.charCodeAt(sr+1))return++sr,++sr,void(xr.comments&&(n=ar.slice(e+2,sr-2),t.end={line:ur,column:sr-lr},m("Block",n,e,sr,t)));++sr}else++sr;xr.comments&&(t.end={line:ur,column:sr-lr},n=ar.slice(e+2,sr),m("Block",n,e,sr,t)),re()}function y(){var e,t;for(cr=!1,t=0===sr;yr>sr;)if(e=ar.charCodeAt(sr),o(e))++sr;else if(s(e))cr=!0,++sr,13===e&&10===ar.charCodeAt(sr)&&++sr,++ur,lr=sr,t=!0;else if(47===e)if(e=ar.charCodeAt(sr+1),47===e)++sr,++sr,g(2),t=!0;else{if(42!==e)break;++sr,++sr,v()}else if(t&&45===e){if(45!==ar.charCodeAt(sr+1)||62!==ar.charCodeAt(sr+2))break;sr+=3,g(3)}else{if(60!==e)break;if("!--"!==ar.slice(sr+1,sr+4))break;++sr,++sr,++sr,++sr,g(4)}}function _(e){var t,r,i,a=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(yr>sr&&n(ar[sr])))return"";i=ar[sr++],a=16*a+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(a)}function b(){var e,t;for(e=ar[sr],t=0,"}"===e&&te();yr>sr&&(e=ar[sr++],n(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&te(),u(t)}function x(e){var t,r,n;return t=ar.charCodeAt(e),t>=55296&&56319>=t&&(n=ar.charCodeAt(e+1),n>=56320&&57343>=n&&(r=t,t=1024*(r-55296)+n-56320+65536)),t}function A(){var e,t,r;for(e=x(sr),r=u(e),sr+=r.length,92===e&&(117!==ar.charCodeAt(sr)&&te(),++sr,"{"===ar[sr]?(++sr,t=b()):(t=_("u"),e=t.charCodeAt(0),t&&"\\"!==t&&l(e)||te()),r=t);yr>sr&&(e=x(sr),c(e));)t=u(e),r+=t,sr+=t.length,92===e&&(r=r.substr(0,r.length-1),117!==ar.charCodeAt(sr)&&te(),++sr,"{"===ar[sr]?(++sr,t=b()):(t=_("u"),e=t.charCodeAt(0),t&&"\\"!==t&&c(e)||te()),r+=t);return r}function w(){var e,t;for(e=sr++;yr>sr;){if(t=ar.charCodeAt(sr),92===t)return sr=e,A();if(t>=55296&&57343>t)return sr=e,A();if(!c(t))break;++sr}return ar.slice(e,sr)}function E(){var e,t,r;return e=sr,t=92===ar.charCodeAt(sr)?A():w(),r=1===t.length?Kt.Identifier:p(t)?Kt.Keyword:"null"===t?Kt.NullLiteral:"true"===t||"false"===t?Kt.BooleanLiteral:Kt.Identifier,{type:r,value:t,lineNumber:ur,lineStart:lr,start:e,end:sr}}function D(){var e,t;switch(e={type:Kt.Punctuator,value:"",lineNumber:ur,lineStart:lr,start:sr,end:sr},t=ar[sr]){case"(":xr.tokenize&&(xr.openParenToken=xr.tokenValues.length),++sr;break;case"{":xr.tokenize&&(xr.openCurlyToken=xr.tokenValues.length),br.curlyStack.push("{"),++sr;break;case".":++sr,"."===ar[sr]&&"."===ar[sr+1]&&(sr+=2,t="...");break;case"}":++sr,br.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++sr;break;default:t=ar.substr(sr,4),">>>="===t?sr+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t?sr+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t?sr+=2:(t=ar[sr],"<>=!+-*%&|^/".indexOf(t)>=0&&++sr)))}return sr===e.start&&te(),e.end=sr,e.value=t,e}function k(e){for(var t="";yr>sr&&n(ar[sr]);)t+=ar[sr++];return 0===t.length&&te(),l(ar.charCodeAt(sr))&&te(),{type:Kt.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ur,lineStart:lr,start:e,end:sr}}function T(e){var t,n;for(n="";yr>sr&&(t=ar[sr],"0"===t||"1"===t);)n+=ar[sr++];return 0===n.length&&te(),yr>sr&&(t=ar.charCodeAt(sr),(l(t)||r(t))&&te()),{type:Kt.NumericLiteral,value:parseInt(n,2),lineNumber:ur,lineStart:lr,start:e,end:sr}}function F(e,t){var n,a;for(i(e)?(a=!0,n="0"+ar[sr++]):(a=!1,++sr,n="");yr>sr&&i(ar[sr]);)n+=ar[sr++];return a||0!==n.length||te(),(l(ar.charCodeAt(sr))||r(ar.charCodeAt(sr)))&&te(),{type:Kt.NumericLiteral,value:parseInt(n,8),octal:a,lineNumber:ur,lineStart:lr,start:t,end:sr}}function S(){var e,t;for(e=sr+1;yr>e;++e){if(t=ar[e],"8"===t||"9"===t)return!1;if(!i(t))return!0}return!0}function C(){var e,n,a;if(a=ar[sr],t(r(a.charCodeAt(0))||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),n=sr,e="","."!==a){if(e=ar[sr++],a=ar[sr],"0"===e){if("x"===a||"X"===a)return++sr,k(n);if("b"===a||"B"===a)return++sr,T(n);if("o"===a||"O"===a)return F(a,n);if(i(a)&&S())return F(a,n)}for(;r(ar.charCodeAt(sr));)e+=ar[sr++];a=ar[sr]}if("."===a){for(e+=ar[sr++];r(ar.charCodeAt(sr));)e+=ar[sr++];a=ar[sr]}if("e"===a||"E"===a)if(e+=ar[sr++],a=ar[sr],("+"===a||"-"===a)&&(e+=ar[sr++]),r(ar.charCodeAt(sr)))for(;r(ar.charCodeAt(sr));)e+=ar[sr++];else te();return l(ar.charCodeAt(sr))&&te(),{type:Kt.NumericLiteral,value:parseFloat(e),lineNumber:ur,lineStart:lr,start:n,end:sr}}function M(){var e,r,n,o,u,l="",c=!1;for(e=ar[sr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=sr,++sr;yr>sr;){if(n=ar[sr++],n===e){e="";break}if("\\"===n)if(n=ar[sr++],n&&s(n.charCodeAt(0)))++ur,"\r"===n&&"\n"===ar[sr]&&++sr,lr=sr;else switch(n){case"u":case"x":if("{"===ar[sr])++sr,l+=b();else{if(o=_(n),!o)throw te();l+=o}break;case"n":l+="\n";break;case"r":l+="\r";break;case"t":l+=" ";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="\x0B";break;case"8":case"9":l+=n,re();break;default:i(n)?(u=a(n),c=u.octal||c,l+=String.fromCharCode(u.code)):l+=n}else{if(s(n.charCodeAt(0)))break;l+=n}}return""!==e&&te(),{type:Kt.StringLiteral,value:l,octal:c,lineNumber:mr,lineStart:gr,start:r,end:sr}}function R(){var e,t,n,a,o,u,l,c,f="";for(a=!1,u=!1,t=sr,o="`"===ar[sr],n=2,++sr;yr>sr;){if(e=ar[sr++],"`"===e){n=1,u=!0,a=!0;break}if("$"===e){if("{"===ar[sr]){br.curlyStack.push("${"),++sr,a=!0;break}f+=e}else if("\\"===e)if(e=ar[sr++],s(e.charCodeAt(0)))++ur,"\r"===e&&"\n"===ar[sr]&&++sr,lr=sr;else switch(e){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"u":case"x":"{"===ar[sr]?(++sr,f+=b()):(l=sr,c=_(e),c?f+=c:(sr=l,f+=e));break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="\x0B";break;default:"0"===e?(r(ar.charCodeAt(sr))&&K(nr.TemplateOctalLiteral),f+="\x00"):i(e)?K(nr.TemplateOctalLiteral):f+=e}else s(e.charCodeAt(0))?(++ur,"\r"===e&&"\n"===ar[sr]&&++sr,lr=sr,f+="\n"):f+=e}return a||te(),o||br.curlyStack.pop(),{type:Kt.Template,value:{cooked:f,raw:ar.slice(t+1,sr-n)},head:o,tail:u,lineNumber:ur,lineStart:lr,start:t,end:sr}}function j(e,t){var r="￿",n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&te(null,nr.InvalidRegExp),65535>=i?String.fromCharCode(i):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(n)}catch(i){te(null,nr.InvalidRegExp)}try{return new RegExp(e,t)}catch(a){return null}}function P(){var e,r,n,i,a;for(e=ar[sr],t("/"===e,"Regular expression literal must start with a slash"),r=ar[sr++],n=!1,i=!1;yr>sr;)if(e=ar[sr++],r+=e,"\\"===e)e=ar[sr++],s(e.charCodeAt(0))&&te(null,nr.UnterminatedRegExp),r+=e;else if(s(e.charCodeAt(0)))te(null,nr.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){i=!0;break}"["===e&&(n=!0)}return i||te(null,nr.UnterminatedRegExp),a=r.substr(1,r.length-2),{value:a,literal:r}}function I(){var e,t,r,n;for(t="",r="";yr>sr&&(e=ar[sr],c(e.charCodeAt(0)));)if(++sr,"\\"===e&&yr>sr)if(e=ar[sr],"u"===e){if(++sr,n=sr,e=_("u"))for(r+=e,t+="\\u";sr>n;++n)t+=ar[n];else sr=n,r+="u",t+="\\u";re()}else t+="\\",re();else r+=e,t+=e;return{value:r,literal:t}}function L(){var e,t,r,n;return vr=!0,_r=null,y(),e=sr,t=P(),r=I(),n=j(t.value,r.value),vr=!1,xr.tokenize?{type:Kt.RegularExpression,value:n,regex:{pattern:t.value,flags:r.value},lineNumber:ur,lineStart:lr,start:e,end:sr}:{literal:t.literal+r.literal,value:n,regex:{pattern:t.value,flags:r.value},start:e,end:sr}}function B(){var e,t,r,n;return y(),e=sr,t={start:{line:ur,column:sr-lr}},r=L(),t.end={line:ur,column:sr-lr},xr.tokenize||(xr.tokens.length>0&&(n=xr.tokens[xr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&xr.tokens.pop()),xr.tokens.push({type:"RegularExpression",value:r.literal,regex:r.regex,range:[e,sr],loc:t})),r}function N(e){return e.type===Kt.Identifier||e.type===Kt.Keyword||e.type===Kt.BooleanLiteral||e.type===Kt.NullLiteral}function O(){function e(e){return e&&e.length>1&&e[0]>="a"&&e[0]<="z"}var t,r,n;switch(r=xr.tokenValues[xr.tokens.length-1],t=null!==r,r){case"this":case"]":t=!1;break;case")":n=xr.tokenValues[xr.openParenToken-1],t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":t=!1,e(xr.tokenValues[xr.openCurlyToken-3])?(n=xr.tokenValues[xr.openCurlyToken-4],t=n?er.indexOf(n)<0:!1):e(xr.tokenValues[xr.openCurlyToken-4])&&(n=xr.tokenValues[xr.openCurlyToken-5],t=n?er.indexOf(n)<0:!0)}return t?B():D()}function z(){var e,t;return sr>=yr?{type:Kt.EOF,lineNumber:ur,lineStart:lr,start:sr,end:sr}:(e=ar.charCodeAt(sr),l(e)?(t=E(),or&&h(t.value)&&(t.type=Kt.Keyword),t):40===e||41===e||59===e?D():39===e||34===e?M():46===e?r(ar.charCodeAt(sr+1))?C():D():r(e)?C():xr.tokenize&&47===e?O():96===e||125===e&&"${"===br.curlyStack[br.curlyStack.length-1]?R():e>=55296&&57343>e&&(e=x(sr),l(e))?E():D())}function U(){ -var e,t,r,n;return e={start:{line:ur,column:sr-lr}},t=z(),e.end={line:ur,column:sr-lr},t.type!==Kt.EOF&&(r=ar.slice(t.start,t.end),n={type:Qt[t.type],value:r,range:[t.start,t.end],loc:e},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),xr.tokenValues&&xr.tokenValues.push("Punctuator"===n.type||"Keyword"===n.type?n.value:null),xr.tokenize&&(xr.range||delete n.range,xr.loc||delete n.loc,xr.delegate&&(n=xr.delegate(n))),xr.tokens.push(n)),t}function $(){var e;return vr=!0,fr=sr,hr=ur,dr=lr,y(),e=_r,pr=sr,mr=ur,gr=lr,_r="undefined"!=typeof xr.tokens?U():z(),vr=!1,e}function G(){vr=!0,y(),fr=sr,hr=ur,dr=lr,pr=sr,mr=ur,gr=lr,_r="undefined"!=typeof xr.tokens?U():z(),vr=!1}function q(){this.line=mr,this.column=pr-gr}function V(){this.start=new q,this.end=null}function W(e){this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function Y(){xr.range&&(this.range=[pr,0]),xr.loc&&(this.loc=new V)}function H(e){xr.range&&(this.range=[e.start,0]),xr.loc&&(this.loc=new W(e))}function X(e){var t,r;for(t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function ce(){return 59===ar.charCodeAt(pr)||oe(";")?void $():void(cr||(fr=pr,hr=mr,dr=gr,_r.type===Kt.EOF||oe("}")||te(_r)))}function fe(e){var t,r=Ar,n=wr,i=Er;return Ar=!0,wr=!0,Er=null,t=e(),null!==Er&&te(Er),Ar=r,wr=n,Er=i,t}function he(e){var t,r=Ar,n=wr,i=Er;return Ar=!0,wr=!0,Er=null,t=e(),Ar=Ar&&r,wr=wr&&n,Er=i||Er,t}function de(e,t){var r,n,i=new Y,a=[];for(ne("[");!oe("]");)if(oe(","))$(),a.push(null);else{if(oe("...")){n=new Y,$(),e.push(_r),r=Qe(t),a.push(n.finishRestElement(r));break}a.push(ve(e,t)),oe("]")||ne(",")}return ne("]"),i.finishArrayPattern(a)}function pe(e,t){var r,n,i,a=new Y,o=oe("[");if(_r.type===Kt.Identifier){if(n=_r,r=Qe(),oe("="))return e.push(n),$(),i=He(),a.finishProperty("init",r,!1,new H(n).finishAssignmentPattern(r,i),!1,!1);if(!oe(":"))return e.push(n),a.finishProperty("init",r,!1,r,!1,!0)}else r=xe();return ne(":"),i=ve(e,t),a.finishProperty("init",r,o,i,!1,!1)}function me(e,t){var r=new Y,n=[];for(ne("{");!oe("}");)n.push(pe(e,t)),oe("}")||ne(",");return $(),r.finishObjectPattern(n)}function ge(e,t){return oe("[")?de(e,t):oe("{")?me(e,t):(se("let")&&("const"===t||"let"===t)&&re(_r,nr.UnexpectedToken),e.push(_r),Qe(t))}function ve(e,t){var r,n,i,a=_r;return r=ge(e,t),oe("=")&&($(),n=br.allowYield,br.allowYield=!0,i=fe(He),br.allowYield=n,r=new H(a).finishAssignmentPattern(r,i)),r}function ye(){var e,t=[],r=new Y;for(ne("[");!oe("]");)oe(",")?($(),t.push(null)):oe("...")?(e=new Y,$(),e.finishSpreadElement(he(He)),oe("]")||(wr=Ar=!1,ne(",")),t.push(e)):(t.push(he(He)),oe("]")||ne(","));return $(),r.finishArrayExpression(t)}function _e(e,t,r){var n,i;return wr=Ar=!1,n=or,i=fe(Tt),or&&t.firstRestricted&&re(t.firstRestricted,t.message),or&&t.stricted&&re(t.stricted,t.message),or=n,e.finishFunctionExpression(null,t.params,t.defaults,i,r)}function be(){var e,t,r=new Y,n=br.allowYield;return br.allowYield=!1,e=Ct(),br.allowYield=n,br.allowYield=!1,t=_e(r,e,!1),br.allowYield=n,t}function xe(){var e,t,r=new Y;switch(e=$(),e.type){case Kt.StringLiteral:case Kt.NumericLiteral:return or&&e.octal&&re(e,nr.StrictOctalLiteral),r.finishLiteral(e);case Kt.Identifier:case Kt.BooleanLiteral:case Kt.NullLiteral:case Kt.Keyword:return r.finishIdentifier(e.value);case Kt.Punctuator:if("["===e.value)return t=fe(He),ne("]"),t}te(e)}function Ae(){switch(_r.type){case Kt.Identifier:case Kt.StringLiteral:case Kt.BooleanLiteral:case Kt.NullLiteral:case Kt.NumericLiteral:case Kt.Keyword:return!0;case Kt.Punctuator:return"["===_r.value}return!1}function we(e,t,r,n){var i,a,o,s,u=br.allowYield;if(e.type===Kt.Identifier){if("get"===e.value&&Ae())return r=oe("["),t=xe(),o=new Y,ne("("),ne(")"),br.allowYield=!1,i=_e(o,{params:[],defaults:[],stricted:null,firstRestricted:null,message:null},!1),br.allowYield=u,n.finishProperty("get",t,r,i,!1,!1);if("set"===e.value&&Ae())return r=oe("["),t=xe(),o=new Y,ne("("),a={params:[],defaultCount:0,defaults:[],firstRestricted:null,paramSet:{}},oe(")")?re(_r):(br.allowYield=!1,St(a),br.allowYield=u,0===a.defaultCount&&(a.defaults=[])),ne(")"),br.allowYield=!1,i=_e(o,a,!1),br.allowYield=u,n.finishProperty("set",t,r,i,!1,!1)}else if(e.type===Kt.Punctuator&&"*"===e.value&&Ae())return r=oe("["),t=xe(),o=new Y,br.allowYield=!0,s=Ct(),br.allowYield=u,br.allowYield=!1,i=_e(o,s,!0),br.allowYield=u,n.finishProperty("init",t,r,i,!0,!1);return t&&oe("(")?(i=be(),n.finishProperty("init",t,r,i,!0,!1)):null}function Ee(e){var t,r,n,i,a,o=_r,s=new Y;return t=oe("["),oe("*")?$():r=xe(),(n=we(o,r,t,s))?n:(r||te(_r),t||(i=r.type===tr.Identifier&&"__proto__"===r.name||r.type===tr.Literal&&"__proto__"===r.value,e.value&&i&&Q(nr.DuplicateProtoProperty),e.value|=i),oe(":")?($(),a=he(He),s.finishProperty("init",r,t,a,!1,!1)):o.type===Kt.Identifier?oe("=")?(Er=_r,$(),a=fe(He),s.finishProperty("init",r,t,new H(o).finishAssignmentPattern(r,a),!1,!0)):s.finishProperty("init",r,t,r,!1,!0):void te(_r))}function De(){var e=[],t={value:!1},r=new Y;for(ne("{");!oe("}");)e.push(Ee(t)),oe("}")||ie();return ne("}"),r.finishObjectExpression(e)}function ke(e){var t;switch(e.type){case tr.Identifier:case tr.MemberExpression:case tr.RestElement:case tr.AssignmentPattern:break;case tr.SpreadElement:e.type=tr.RestElement,ke(e.argument);break;case tr.ArrayExpression:for(e.type=tr.ArrayPattern,t=0;t")||ne("=>"),{type:rr.ArrowParameterPlaceHolder,params:[],rawParams:[]};if(r=_r,oe("..."))return e=lt(i),ne(")"),oe("=>")||ne("=>"),{type:rr.ArrowParameterPlaceHolder,params:[e]};if(Ar=!0,e=he(He),oe(",")){for(wr=!1,t=[e];yr>pr&&oe(",");){if($(),oe("...")){for(Ar||te(_r),t.push(lt(i)),ne(")"),oe("=>")||ne("=>"),Ar=!1,n=0;n")){if(e.type===tr.Identifier&&"yield"===e.name)return{type:rr.ArrowParameterPlaceHolder,params:[e]};if(Ar||te(_r),e.type===tr.SequenceExpression)for(n=0;npr&&(oe("...")?(e=new Y,$(),e.finishSpreadElement(fe(He))):e=fe(He),t.push(e),!oe(")"));)ie();return ne(")"),t}function Re(){var e,t=new Y;return e=$(),N(e)||te(e),t.finishIdentifier(e.value)}function je(){return ne("."),Re()}function Pe(){var e;return ne("["),e=fe(Xe),ne("]"),e}function Ie(){var e,t,r=new Y;if(ae("new"),oe(".")){if($(),_r.type===Kt.Identifier&&"target"===_r.value&&br.inFunctionBody)return $(),r.finishMetaProperty("new","target");te(_r)}return e=fe(Be),t=oe("(")?Me():[],wr=Ar=!1,r.finishNewExpression(e,t)}function Le(){var e,t,r,n,i,a=br.allowIn;for(i=_r,br.allowIn=!0,se("super")&&br.inFunctionBody?(t=new Y,$(),t=t.finishSuper(),oe("(")||oe(".")||oe("[")||te(_r)):t=he(se("new")?Ie:Ce);;)if(oe("."))Ar=!1,wr=!0,n=je(),t=new H(i).finishMemberExpression(".",t,n);else if(oe("("))Ar=!1,wr=!1,r=Me(),t=new H(i).finishCallExpression(t,r);else if(oe("["))Ar=!1,wr=!0,n=Pe(),t=new H(i).finishMemberExpression("[",t,n);else{if(_r.type!==Kt.Template||!_r.head)break;e=Fe(),t=new H(i).finishTaggedTemplateExpression(t,e)}return br.allowIn=a,t}function Be(){var e,r,n,i;for(t(br.allowIn,"callee of new expression always allow in keyword."),i=_r,se("super")&&br.inFunctionBody?(r=new Y,$(),r=r.finishSuper(),oe("[")||oe(".")||te(_r)):r=he(se("new")?Ie:Ce);;)if(oe("["))Ar=!1,wr=!0,n=Pe(),r=new H(i).finishMemberExpression("[",r,n);else if(oe("."))Ar=!1,wr=!0,n=je(),r=new H(i).finishMemberExpression(".",r,n);else{if(_r.type!==Kt.Template||!_r.head)break;e=Fe(),r=new H(i).finishTaggedTemplateExpression(r,e)}return r}function Ne(){var e,t,r=_r;return e=he(Le),cr||_r.type!==Kt.Punctuator||(oe("++")||oe("--"))&&(or&&e.type===tr.Identifier&&d(e.name)&&Q(nr.StrictLHSPostfix),wr||Q(nr.InvalidLHSInAssignment),wr=Ar=!1,t=$(),e=new H(r).finishPostfixExpression(t.value,e)),e}function Oe(){var e,t,r;return _r.type!==Kt.Punctuator&&_r.type!==Kt.Keyword?t=Ne():oe("++")||oe("--")?(r=_r,e=$(),t=he(Oe),or&&t.type===tr.Identifier&&d(t.name)&&Q(nr.StrictLHSPrefix),wr||Q(nr.InvalidLHSInAssignment),t=new H(r).finishUnaryExpression(e.value,t),wr=Ar=!1):oe("+")||oe("-")||oe("~")||oe("!")?(r=_r,e=$(),t=he(Oe),t=new H(r).finishUnaryExpression(e.value,t),wr=Ar=!1):se("delete")||se("void")||se("typeof")?(r=_r,e=$(),t=he(Oe),t=new H(r).finishUnaryExpression(e.value,t),or&&"delete"===t.operator&&t.argument.type===tr.Identifier&&Q(nr.StrictDelete),wr=Ar=!1):t=Ne(),t}function ze(e,t){var r=0;if(e.type!==Kt.Punctuator&&e.type!==Kt.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=t?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function Ue(){var e,t,r,n,i,a,o,s,u,l;if(e=_r,u=he(Oe),n=_r,i=ze(n,br.allowIn),0===i)return u;for(wr=Ar=!1,n.prec=i,$(),t=[e,_r],o=fe(Oe),a=[u,n,o];(i=ze(_r,br.allowIn))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,u=a.pop(),t.pop(),r=new H(t[t.length-1]).finishBinaryExpression(s,u,o),a.push(r);n=$(),n.prec=i,a.push(n),t.push(_r),r=fe(Oe),a.push(r)}for(l=a.length-1,r=a[l],t.pop();l>1;)r=new H(t.pop()).finishBinaryExpression(a[l-1].value,a[l-2],r),l-=2;return r}function $e(){var e,t,r,n,i;return i=_r,e=he(Ue),oe("?")&&($(),t=br.allowIn,br.allowIn=!0,r=fe(He),br.allowIn=t,ne(":"),n=fe(He),e=new H(i).finishConditionalExpression(e,r,n),wr=Ar=!1),e}function Ge(){return oe("{")?Tt():fe(He)}function qe(e,r){var n;switch(r.type){case tr.Identifier:Ft(e,r,r.name);break;case tr.RestElement:qe(e,r.argument);break;case tr.AssignmentPattern:qe(e,r.left);break;case tr.ArrayPattern:for(n=0;nt;t+=1)switch(n=i[t],n.type){case tr.AssignmentPattern:i[t]=n.left,n.right.type===tr.YieldExpression&&(n.right.argument&&te(_r),n.right.type=tr.Identifier,n.right.name="yield",delete n.right.argument,delete n.right.delegate),a.push(n.right),++o,qe(s,n.left);break;default:qe(s,n),i[t]=n,a.push(null)}if(or||!br.allowYield)for(t=0,r=i.length;r>t;t+=1)n=i[t],n.type===tr.YieldExpression&&te(_r);return s.message===nr.StrictParamDupe&&(u=or?s.stricted:s.firstRestricted,te(u,s.message)),0===o&&(a=[]),{params:i,defaults:a,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}function We(e,t){var r,n,i;return cr&&re(_r),ne("=>"),r=or,n=br.allowYield,br.allowYield=!0,i=Ge(),or&&e.firstRestricted&&te(e.firstRestricted,e.message),or&&e.stricted&&re(e.stricted,e.message),or=r,br.allowYield=n,t.finishArrowFunctionExpression(e.params,e.defaults,i,i.type!==tr.BlockStatement)}function Ye(){var e,t,r,n;return e=null,t=new Y,r=!1,ae("yield"),cr||(n=br.allowYield,br.allowYield=!1,r=oe("*"),r?($(),e=He()):oe(";")||oe("}")||oe(")")||_r.type===Kt.EOF||(e=He()),br.allowYield=n),t.finishYieldExpression(e,r)}function He(){var e,t,r,n,i;return i=_r,e=_r,!br.allowYield&&se("yield")?Ye():(t=$e(),t.type===rr.ArrowParameterPlaceHolder||oe("=>")?(wr=Ar=!1,n=Ve(t),n?(Er=null,We(n,new H(i))):t):(le()&&(wr||Q(nr.InvalidLHSInAssignment),or&&t.type===tr.Identifier&&(d(t.name)&&re(e,nr.StrictLHSAssignment),h(t.name)&&re(e,nr.StrictReservedWord)),oe("=")?ke(t):wr=Ar=!1,e=$(),r=fe(He),t=new H(i).finishAssignmentExpression(e.value,t,r),Er=null),t))}function Xe(){var e,t,r=_r;if(e=fe(He),oe(",")){for(t=[e];yr>pr&&oe(",");)$(),t.push(fe(He));e=new H(r).finishSequenceExpression(t)}return e}function Ze(){if(_r.type===Kt.Keyword)switch(_r.value){case"export":return"module"!==br.sourceType&&re(_r,nr.IllegalExportDeclaration),Ut();case"import":return"module"!==br.sourceType&&re(_r,nr.IllegalImportDeclaration),Wt();case"const":return ut({inFor:!1});case"function":return Mt(new Y);case"class":return Pt()}return se("let")&&st()?ut({inFor:!1}):kt()}function Je(){for(var e=[];yr>pr&&!oe("}");)e.push(Ze());return e}function Ke(){var e,t=new Y;return ne("{"),e=Je(),ne("}"),t.finishBlockStatement(e)}function Qe(e){var t,r=new Y;return t=$(),t.type===Kt.Keyword&&"yield"===t.value?(or&&re(t,nr.StrictReservedWord),br.allowYield||te(t)):t.type!==Kt.Identifier?or&&t.type===Kt.Keyword&&h(t.value)?re(t,nr.StrictReservedWord):(or||"let"!==t.value||"var"!==e)&&te(t):"module"===br.sourceType&&t.type===Kt.Identifier&&"await"===t.value&&re(t),r.finishIdentifier(t.value)}function et(e){var t,r=null,n=new Y,i=[];return t=ge(i,"var"),or&&d(t.name)&&Q(nr.StrictVarName),oe("=")?($(),r=fe(He)):t.type===tr.Identifier||e.inFor||ne("="),n.finishVariableDeclarator(t,r)}function tt(e){var t,r;for(t={inFor:e.inFor},r=[et(t)];oe(",");)$(),r.push(et(t));return r}function rt(e){var t;return ae("var"),t=tt({inFor:!1}),ce(),e.finishVariableDeclaration(t)}function nt(e,t){var r,n=null,i=new Y,a=[];return r=ge(a,e),or&&r.type===tr.Identifier&&d(r.name)&&Q(nr.StrictVarName),"const"===e?se("in")||ue("of")||(ne("="),n=fe(He)):(!t.inFor&&r.type!==tr.Identifier||oe("="))&&(ne("="),n=fe(He)),i.finishVariableDeclarator(r,n)}function it(e,t){for(var r=[nt(e,t)];oe(",");)$(),r.push(nt(e,t));return r}function at(){return{index:sr,lineNumber:ur,lineStart:lr,hasLineTerminator:cr,lastIndex:fr,lastLineNumber:hr,lastLineStart:dr,startIndex:pr,startLineNumber:mr,startLineStart:gr,lookahead:_r,tokenCount:xr.tokens?xr.tokens.length:0}}function ot(e){sr=e.index,ur=e.lineNumber,lr=e.lineStart,cr=e.hasLineTerminator,fr=e.lastIndex,hr=e.lastLineNumber,dr=e.lastLineStart,pr=e.startIndex,mr=e.startLineNumber,gr=e.startLineStart,_r=e.lookahead,xr.tokens&&xr.tokens.splice(e.tokenCount,xr.tokens.length)}function st(){var e,t;return t=at(),$(),e=_r.type===Kt.Identifier||oe("[")||oe("{")||se("let")||se("yield"),ot(t),e}function ut(e){var r,n,i=new Y;return r=$().value,t("let"===r||"const"===r,"Lexical declaration must be either let or const"),n=it(r,e),ce(),i.finishLexicalDeclaration(n,r)}function lt(e){var t,r=new Y;return $(),oe("{")&&K(nr.ObjectPatternAsRestParameter),e.push(_r),t=Qe(),oe("=")&&K(nr.DefaultRestParameter),oe(")")||K(nr.ParameterAfterRestParameter),r.finishRestElement(t)}function ct(e){return ne(";"),e.finishEmptyStatement()}function ft(e){var t=Xe();return ce(),e.finishExpressionStatement(t)}function ht(e){var t,r,n;return ae("if"),ne("("),t=Xe(),ne(")"),r=kt(),se("else")?($(),n=kt()):n=null,e.finishIfStatement(t,r,n)}function dt(e){var t,r,n;return ae("do"),n=br.inIteration,br.inIteration=!0,t=kt(),br.inIteration=n,ae("while"),ne("("),r=Xe(),ne(")"),oe(";")&&$(),e.finishDoWhileStatement(t,r)}function pt(e){var t,r,n;return ae("while"),ne("("),t=Xe(),ne(")"),n=br.inIteration,br.inIteration=!0,r=kt(),br.inIteration=n,e.finishWhileStatement(t,r)}function mt(e){var t,r,n,i,a,o,s,u,l,c,f,h,d=br.allowIn;if(t=a=o=null,r=!0,ae("for"),ne("("),oe(";"))$();else if(se("var"))t=new Y,$(),br.allowIn=!1,c=tt({inFor:!0}),br.allowIn=d,1===c.length&&se("in")?(t=t.finishVariableDeclaration(c),$(),s=t,u=Xe(),t=null):1===c.length&&null===c[0].init&&ue("of")?(t=t.finishVariableDeclaration(c),$(),s=t,u=He(),t=null,r=!1):(t=t.finishVariableDeclaration(c),ne(";"));else if(se("const")||se("let"))t=new Y,l=$().value,or||"in"!==_r.value?(br.allowIn=!1,c=it(l,{inFor:!0}),br.allowIn=d,1===c.length&&null===c[0].init&&se("in")?(t=t.finishLexicalDeclaration(c,l),$(),s=t,u=Xe(),t=null):1===c.length&&null===c[0].init&&ue("of")?(t=t.finishLexicalDeclaration(c,l),$(),s=t,u=He(),t=null,r=!1):(ce(),t=t.finishLexicalDeclaration(c,l))):(t=t.finishIdentifier(l),$(),s=t,u=Xe(),t=null);else if(i=_r,br.allowIn=!1,t=he(He),br.allowIn=d,se("in"))wr||Q(nr.InvalidLHSInForIn),$(),ke(t),s=t,u=Xe(),t=null;else if(ue("of"))wr||Q(nr.InvalidLHSInForLoop),$(),ke(t),s=t,u=He(),t=null,r=!1;else{if(oe(",")){for(n=[t];oe(",");)$(),n.push(fe(He));t=new H(i).finishSequenceExpression(n)}ne(";")}return"undefined"==typeof s&&(oe(";")||(a=Xe()),ne(";"),oe(")")||(o=Xe())),ne(")"),h=br.inIteration,br.inIteration=!0,f=fe(kt),br.inIteration=h,"undefined"==typeof s?e.finishForStatement(t,a,o,f):r?e.finishForInStatement(s,u,f):e.finishForOfStatement(s,u,f)}function gt(e){var t,r=null;return ae("continue"),59===ar.charCodeAt(pr)?($(),br.inIteration||K(nr.IllegalContinue),e.finishContinueStatement(null)):cr?(br.inIteration||K(nr.IllegalContinue),e.finishContinueStatement(null)):(_r.type===Kt.Identifier&&(r=Qe(),t="$"+r.name,Object.prototype.hasOwnProperty.call(br.labelSet,t)||K(nr.UnknownLabel,r.name)),ce(),null!==r||br.inIteration||K(nr.IllegalContinue),e.finishContinueStatement(r))}function vt(e){var t,r=null;return ae("break"),59===ar.charCodeAt(fr)?($(),br.inIteration||br.inSwitch||K(nr.IllegalBreak),e.finishBreakStatement(null)):(cr?br.inIteration||br.inSwitch||K(nr.IllegalBreak):_r.type===Kt.Identifier&&(r=Qe(),t="$"+r.name,Object.prototype.hasOwnProperty.call(br.labelSet,t)||K(nr.UnknownLabel,r.name)),ce(),null!==r||br.inIteration||br.inSwitch||K(nr.IllegalBreak),e.finishBreakStatement(r))}function yt(e){var t=null;return ae("return"),br.inFunctionBody||Q(nr.IllegalReturn),32===ar.charCodeAt(fr)&&l(ar.charCodeAt(fr+1))?(t=Xe(),ce(),e.finishReturnStatement(t)):cr?e.finishReturnStatement(null):(oe(";")||oe("}")||_r.type===Kt.EOF||(t=Xe()),ce(),e.finishReturnStatement(t))}function _t(e){var t,r;return or&&Q(nr.StrictModeWith),ae("with"),ne("("),t=Xe(),ne(")"),r=kt(),e.finishWithStatement(t,r)}function bt(){var e,t,r=[],n=new Y;for(se("default")?($(),e=null):(ae("case"),e=Xe()),ne(":");yr>pr&&!(oe("}")||se("default")||se("case"));)t=Ze(),r.push(t);return n.finishSwitchCase(e,r)}function xt(e){var t,r,n,i,a;if(ae("switch"),ne("("),t=Xe(),ne(")"),ne("{"),r=[],oe("}"))return $(),e.finishSwitchStatement(t,r);for(i=br.inSwitch,br.inSwitch=!0,a=!1;yr>pr&&!oe("}");)n=bt(),null===n.test&&(a&&K(nr.MultipleDefaultsInSwitch),a=!0),r.push(n);return br.inSwitch=i,ne("}"),e.finishSwitchStatement(t,r)}function At(e){var t;return ae("throw"),cr&&K(nr.NewlineAfterThrow),t=Xe(),ce(),e.finishThrowStatement(t)}function wt(){var e,t,r,n,i=[],a={},o=new Y;for(ae("catch"),ne("("),oe(")")&&te(_r),e=ge(i),r=0;rpr&&_r.type===Kt.StringLiteral&&(t=_r,e=Ze(),l.push(e),e.expression.type===tr.Literal);)r=ar.slice(t.start+1,t.end-1),"use strict"===r?(or=!0,n&&re(n,nr.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(i=br.labelSet,a=br.inIteration,o=br.inSwitch,s=br.inFunctionBody,u=br.parenthesizedCount,br.labelSet={},br.inIteration=!1,br.inSwitch=!1,br.inFunctionBody=!0,br.parenthesizedCount=0;yr>pr&&!oe("}");)l.push(Ze());return ne("}"),br.labelSet=i,br.inIteration=a,br.inSwitch=o,br.inFunctionBody=s,br.parenthesizedCount=u,c.finishBlockStatement(l)}function Ft(e,t,r){var n="$"+r;or?(d(r)&&(e.stricted=t,e.message=nr.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=nr.StrictParamDupe)):e.firstRestricted||(d(r)?(e.firstRestricted=t,e.message=nr.StrictParamName):h(r)?(e.firstRestricted=t,e.message=nr.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=nr.StrictParamDupe)),e.paramSet[n]=!0}function St(e){var t,r,n,i,a=[];if(t=_r,"..."===t.value)return r=lt(a),Ft(e,r.argument,r.argument.name),e.params.push(r),e.defaults.push(null),!1;for(r=ve(a),n=0;npr&&St(t);)ne(",");return ne(")"),0===t.defaultCount&&(t.defaults=[]),{params:t.params,defaults:t.defaults,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}function Mt(e,t){var r,n,i,a,o,s,u,l,c,f=null,p=[],m=[];return c=br.allowYield,ae("function"),l=oe("*"),l&&$(),t&&oe("(")||(n=_r,f=Qe(),or?d(n.value)&&re(n,nr.StrictFunctionName):d(n.value)?(o=n,s=nr.StrictFunctionName):h(n.value)&&(o=n,s=nr.StrictReservedWord)),br.allowYield=!l,a=Ct(o),p=a.params,m=a.defaults,i=a.stricted,o=a.firstRestricted,a.message&&(s=a.message),u=or,r=Tt(),or&&o&&te(o,s),or&&i&&re(i,s),or=u,br.allowYield=c,e.finishFunctionDeclaration(f,p,m,r,l)}function Rt(){var e,t,r,n,i,a,o,s,u,l=null,c=[],f=[],p=new Y;return u=br.allowYield,ae("function"),s=oe("*"),s&&$(),br.allowYield=!s,oe("(")||(e=_r,l=or||s||!se("yield")?Qe():Re(),or?d(e.value)&&re(e,nr.StrictFunctionName):d(e.value)?(r=e,n=nr.StrictFunctionName):h(e.value)&&(r=e,n=nr.StrictReservedWord)),i=Ct(r),c=i.params,f=i.defaults,t=i.stricted,r=i.firstRestricted,i.message&&(n=i.message),o=or,a=Tt(),or&&r&&te(r,n),or&&t&&re(t,n),or=o,br.allowYield=u,p.finishFunctionExpression(l,c,f,a,s)}function jt(){var e,t,r,n,i,a,o,s=!1;for(e=new Y,ne("{"),n=[];!oe("}");)oe(";")?$():(i=new Y,t=_r,r=!1,a=oe("["),oe("*")?$():(o=xe(),"static"===o.name&&(Ae()||oe("*"))&&(t=_r,r=!0,a=oe("["),oe("*")?$():o=xe())),i=we(t,o,a,i),i?(i["static"]=r,"init"===i.kind&&(i.kind="method"),r?i.computed||"prototype"!==(i.key.name||i.key.value.toString())||te(t,nr.StaticPrototype):i.computed||"constructor"!==(i.key.name||i.key.value.toString())||(("method"!==i.kind||!i.method||i.value.generator)&&te(t,nr.ConstructorSpecialMethod),s?te(t,nr.DuplicateConstructor):s=!0,i.kind="constructor"),i.type=tr.MethodDefinition,delete i.method,delete i.shorthand,n.push(i)):te(_r));return $(),e.finishClassBody(n)}function Pt(e){var t,r=null,n=null,i=new Y,a=or;return or=!0,ae("class"),e&&_r.type!==Kt.Identifier||(r=Qe()),se("extends")&&($(),n=fe(Le)),t=jt(),or=a,i.finishClassDeclaration(r,n,t)}function It(){var e,t=null,r=null,n=new Y,i=or;return or=!0,ae("class"),_r.type===Kt.Identifier&&(t=Qe()),se("extends")&&($(),r=fe(Le)),e=jt(),or=i,n.finishClassExpression(t,r,e)}function Lt(){var e=new Y;return _r.type!==Kt.StringLiteral&&K(nr.InvalidModuleSpecifier),e.finishLiteral($())}function Bt(){var e,t,r,n=new Y;return se("default")?(r=new Y,$(),t=r.finishIdentifier("default")):t=Qe(),ue("as")&&($(),e=Re()),n.finishExportSpecifier(t,e)}function Nt(e){var t,r=null,n=null,i=[];if(_r.type===Kt.Keyword)switch(_r.value){case"let":case"const":return r=ut({inFor:!1}),e.finishExportNamedDeclaration(r,i,null);case"var":case"class":case"function":return r=Ze(),e.finishExportNamedDeclaration(r,i,null)}for(ne("{");!oe("}")&&(t=t||se("default"),i.push(Bt()),oe("}")||(ne(","),!oe("}"))););return ne("}"),ue("from")?($(),n=Lt(),ce()):t?K(_r.value?nr.UnexpectedToken:nr.MissingFromClause,_r.value):ce(),e.finishExportNamedDeclaration(r,i,n)}function Ot(e){var t=null,r=null;return ae("default"),se("function")?(t=Mt(new Y,!0),e.finishExportDefaultDeclaration(t)):se("class")?(t=Pt(!0),e.finishExportDefaultDeclaration(t)):(ue("from")&&K(nr.UnexpectedToken,_r.value),r=oe("{")?De():oe("[")?ye():He(),ce(),e.finishExportDefaultDeclaration(r))}function zt(e){var t;return ne("*"),ue("from")||K(_r.value?nr.UnexpectedToken:nr.MissingFromClause,_r.value),$(),t=Lt(),ce(),e.finishExportAllDeclaration(t)}function Ut(){var e=new Y;return br.inFunctionBody&&K(nr.IllegalExportDeclaration),ae("export"),se("default")?Ot(e):oe("*")?zt(e):Nt(e)}function $t(){var e,t,r=new Y;return t=Re(),ue("as")&&($(),e=Qe()),r.finishImportSpecifier(e,t)}function Gt(){var e=[];for(ne("{");!oe("}")&&(e.push($t()),oe("}")||(ne(","),!oe("}"))););return ne("}"),e}function qt(){var e,t=new Y;return e=Re(),t.finishImportDefaultSpecifier(e)}function Vt(){var e,t=new Y;return ne("*"),ue("as")||K(nr.NoAsAfterImportNamespace),$(),e=Re(),t.finishImportNamespaceSpecifier(e)}function Wt(){var e,t=[],r=new Y;return br.inFunctionBody&&K(nr.IllegalImportDeclaration),ae("import"),_r.type===Kt.StringLiteral?e=Lt():(oe("{")?t=t.concat(Gt()):oe("*")?t.push(Vt()):N(_r)&&!se("default")?(t.push(qt()),oe(",")&&($(),oe("*")?t.push(Vt()):oe("{")?t=t.concat(Gt()):te(_r))):te($()),ue("from")||K(_r.value?nr.UnexpectedToken:nr.MissingFromClause,_r.value),$(),e=Lt()),ce(),r.finishImportDeclaration(t,e)}function Yt(){for(var e,t,r,n,i=[];yr>pr&&(t=_r,t.type===Kt.StringLiteral)&&(e=Ze(),i.push(e),e.expression.type===tr.Literal);)r=ar.slice(t.start+1,t.end-1),"use strict"===r?(or=!0,n&&re(n,nr.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;yr>pr&&(e=Ze(),"undefined"!=typeof e);)i.push(e);return i}function Ht(){var e,t;return G(),t=new Y,e=Yt(),t.finishProgram(e,br.sourceType)}function Xt(){var e,t,r,n=[];for(e=0;e0?1:0,lr=0,pr=sr,mr=ur,gr=lr,yr=ar.length,_r=null,br={allowIn:!0,allowYield:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,curlyStack:[]},xr={},t=t||{},t.tokens=!0,xr.tokens=[],xr.tokenValues=[],xr.tokenize=!0,xr.delegate=r,xr.openParenToken=-1,xr.openCurlyToken=-1,xr.range="boolean"==typeof t.range&&t.range,xr.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(xr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(xr.errors=[]);try{if(G(),_r.type===Kt.EOF)return xr.tokens;for($();_r.type!==Kt.EOF;)try{$()}catch(a){if(xr.errors){X(a);break}throw a}i=xr.tokens,"undefined"!=typeof xr.errors&&(i.errors=xr.errors)}catch(o){throw o}finally{xr={}}return i}function Jt(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),ar=e,sr=0,ur=ar.length>0?1:0,lr=0,pr=sr,mr=ur,gr=lr,yr=ar.length,_r=null,br={allowIn:!0,allowYield:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,curlyStack:[],sourceType:"script"},or=!1,xr={},"undefined"!=typeof t&&(xr.range="boolean"==typeof t.range&&t.range,xr.loc="boolean"==typeof t.loc&&t.loc,xr.attachComment="boolean"==typeof t.attachComment&&t.attachComment,xr.loc&&null!==t.source&&void 0!==t.source&&(xr.source=n(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(xr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(xr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(xr.errors=[]),xr.attachComment&&(xr.range=!0,xr.comments=[],xr.bottomRightStack=[],xr.trailingComments=[],xr.leadingComments=[]),"module"===t.sourceType&&(br.sourceType=t.sourceType,or=!0));try{r=Ht(),"undefined"!=typeof xr.comments&&(r.comments=xr.comments),"undefined"!=typeof xr.tokens&&(Xt(),r.tokens=xr.tokens),"undefined"!=typeof xr.errors&&(r.errors=xr.errors)}catch(i){throw i}finally{xr={}}return r}var Kt,Qt,er,tr,rr,nr,ir,ar,or,sr,ur,lr,cr,fr,hr,dr,pr,mr,gr,vr,yr,_r,br,xr,Ar,wr,Er;Kt={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6, -Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10},Qt={},Qt[Kt.BooleanLiteral]="Boolean",Qt[Kt.EOF]="",Qt[Kt.Identifier]="Identifier",Qt[Kt.Keyword]="Keyword",Qt[Kt.NullLiteral]="Null",Qt[Kt.NumericLiteral]="Numeric",Qt[Kt.Punctuator]="Punctuator",Qt[Kt.StringLiteral]="String",Qt[Kt.RegularExpression]="RegularExpression",Qt[Kt.Template]="Template",er=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tr={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},rr={ArrowParameterPlaceHolder:"ArrowParameterPlaceHolder"},nr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",ObjectPatternAsRestParameter:"Unexpected token {",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0"},ir={NonAsciiIdentifierStart:/[\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-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\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\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-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\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\u19C1-\u19C7\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\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\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\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-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u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20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6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F0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\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\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},H.prototype=Y.prototype={processComment:function(){var e,t,r,n,i,a,o=xr.bottomRightStack,s=o[o.length-1];if(!(this.type===tr.Program&&this.body.length>0)){if(this.type===tr.BlockStatement&&0===this.body.length){for(t=[],i=xr.leadingComments.length-1;i>=0;--i)a=xr.leadingComments[i],this.range[1]>=a.range[1]&&(t.unshift(a),xr.leadingComments.splice(i,1),xr.trailingComments.splice(i,1));if(t.length)return void(this.innerComments=t)}if(xr.trailingComments.length>0){for(n=[],i=xr.trailingComments.length-1;i>=0;--i)a=xr.trailingComments[i],a.range[0]>=this.range[1]&&(n.unshift(a),xr.trailingComments.splice(i,1));xr.trailingComments=[]}else s&&s.trailingComments&&s.trailingComments[0].range[0]>=this.range[1]&&(n=s.trailingComments,delete s.trailingComments);for(;s&&s.range[0]>=this.range[0];)e=o.pop(),s=o[o.length-1];if(e){if(e.leadingComments){for(r=[],i=e.leadingComments.length-1;i>=0;--i)a=e.leadingComments[i],a.range[1]<=this.range[0]&&(r.unshift(a),e.leadingComments.splice(i,1));e.leadingComments.length||(e.leadingComments=void 0)}}else if(xr.leadingComments.length>0)for(r=[],i=xr.leadingComments.length-1;i>=0;--i)a=xr.leadingComments[i],a.range[1]<=this.range[0]&&(r.unshift(a),xr.leadingComments.splice(i,1));r&&r.length>0&&(this.leadingComments=r),n&&n.length>0&&(this.trailingComments=n),o.push(this)}},finish:function(){xr.range&&(this.range[1]=fr),xr.loc&&(this.loc.end={line:hr,column:fr-dr},xr.source&&(this.loc.source=xr.source)),xr.attachComment&&this.processComment()},finishArrayExpression:function(e){return this.type=tr.ArrayExpression,this.elements=e,this.finish(),this},finishArrayPattern:function(e){return this.type=tr.ArrayPattern,this.elements=e,this.finish(),this},finishArrowFunctionExpression:function(e,t,r,n){return this.type=tr.ArrowFunctionExpression,this.id=null,this.params=e,this.defaults=t,this.body=r,this.generator=!1,this.expression=n,this.finish(),this},finishAssignmentExpression:function(e,t,r){return this.type=tr.AssignmentExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishAssignmentPattern:function(e,t){return this.type=tr.AssignmentPattern,this.left=e,this.right=t,this.finish(),this},finishBinaryExpression:function(e,t,r){return this.type="||"===e||"&&"===e?tr.LogicalExpression:tr.BinaryExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishBlockStatement:function(e){return this.type=tr.BlockStatement,this.body=e,this.finish(),this},finishBreakStatement:function(e){return this.type=tr.BreakStatement,this.label=e,this.finish(),this},finishCallExpression:function(e,t){return this.type=tr.CallExpression,this.callee=e,this.arguments=t,this.finish(),this},finishCatchClause:function(e,t){return this.type=tr.CatchClause,this.param=e,this.body=t,this.finish(),this},finishClassBody:function(e){return this.type=tr.ClassBody,this.body=e,this.finish(),this},finishClassDeclaration:function(e,t,r){return this.type=tr.ClassDeclaration,this.id=e,this.superClass=t,this.body=r,this.finish(),this},finishClassExpression:function(e,t,r){return this.type=tr.ClassExpression,this.id=e,this.superClass=t,this.body=r,this.finish(),this},finishConditionalExpression:function(e,t,r){return this.type=tr.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r,this.finish(),this},finishContinueStatement:function(e){return this.type=tr.ContinueStatement,this.label=e,this.finish(),this},finishDebuggerStatement:function(){return this.type=tr.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(e,t){return this.type=tr.DoWhileStatement,this.body=e,this.test=t,this.finish(),this},finishEmptyStatement:function(){return this.type=tr.EmptyStatement,this.finish(),this},finishExpressionStatement:function(e){return this.type=tr.ExpressionStatement,this.expression=e,this.finish(),this},finishForStatement:function(e,t,r,n){return this.type=tr.ForStatement,this.init=e,this.test=t,this.update=r,this.body=n,this.finish(),this},finishForOfStatement:function(e,t,r){return this.type=tr.ForOfStatement,this.left=e,this.right=t,this.body=r,this.finish(),this},finishForInStatement:function(e,t,r){return this.type=tr.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1,this.finish(),this},finishFunctionDeclaration:function(e,t,r,n,i){return this.type=tr.FunctionDeclaration,this.id=e,this.params=t,this.defaults=r,this.body=n,this.generator=i,this.expression=!1,this.finish(),this},finishFunctionExpression:function(e,t,r,n,i){return this.type=tr.FunctionExpression,this.id=e,this.params=t,this.defaults=r,this.body=n,this.generator=i,this.expression=!1,this.finish(),this},finishIdentifier:function(e){return this.type=tr.Identifier,this.name=e,this.finish(),this},finishIfStatement:function(e,t,r){return this.type=tr.IfStatement,this.test=e,this.consequent=t,this.alternate=r,this.finish(),this},finishLabeledStatement:function(e,t){return this.type=tr.LabeledStatement,this.label=e,this.body=t,this.finish(),this},finishLiteral:function(e){return this.type=tr.Literal,this.value=e.value,this.raw=ar.slice(e.start,e.end),e.regex&&(this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,r){return this.type=tr.MemberExpression,this.computed="["===e,this.object=t,this.property=r,this.finish(),this},finishMetaProperty:function(e,t){return this.type=tr.MetaProperty,this.meta=e,this.property=t,this.finish(),this},finishNewExpression:function(e,t){return this.type=tr.NewExpression,this.callee=e,this.arguments=t,this.finish(),this},finishObjectExpression:function(e){return this.type=tr.ObjectExpression,this.properties=e,this.finish(),this},finishObjectPattern:function(e){return this.type=tr.ObjectPattern,this.properties=e,this.finish(),this},finishPostfixExpression:function(e,t){return this.type=tr.UpdateExpression,this.operator=e,this.argument=t,this.prefix=!1,this.finish(),this},finishProgram:function(e,t){return this.type=tr.Program,this.body=e,this.sourceType=t,this.finish(),this},finishProperty:function(e,t,r,n,i,a){return this.type=tr.Property,this.key=t,this.computed=r,this.value=n,this.kind=e,this.method=i,this.shorthand=a,this.finish(),this},finishRestElement:function(e){return this.type=tr.RestElement,this.argument=e,this.finish(),this},finishReturnStatement:function(e){return this.type=tr.ReturnStatement,this.argument=e,this.finish(),this},finishSequenceExpression:function(e){return this.type=tr.SequenceExpression,this.expressions=e,this.finish(),this},finishSpreadElement:function(e){return this.type=tr.SpreadElement,this.argument=e,this.finish(),this},finishSwitchCase:function(e,t){return this.type=tr.SwitchCase,this.test=e,this.consequent=t,this.finish(),this},finishSuper:function(){return this.type=tr.Super,this.finish(),this},finishSwitchStatement:function(e,t){return this.type=tr.SwitchStatement,this.discriminant=e,this.cases=t,this.finish(),this},finishTaggedTemplateExpression:function(e,t){return this.type=tr.TaggedTemplateExpression,this.tag=e,this.quasi=t,this.finish(),this},finishTemplateElement:function(e,t){return this.type=tr.TemplateElement,this.value=e,this.tail=t,this.finish(),this},finishTemplateLiteral:function(e,t){return this.type=tr.TemplateLiteral,this.quasis=e,this.expressions=t,this.finish(),this},finishThisExpression:function(){return this.type=tr.ThisExpression,this.finish(),this},finishThrowStatement:function(e){return this.type=tr.ThrowStatement,this.argument=e,this.finish(),this},finishTryStatement:function(e,t,r){return this.type=tr.TryStatement,this.block=e,this.guardedHandlers=[],this.handlers=t?[t]:[],this.handler=t,this.finalizer=r,this.finish(),this},finishUnaryExpression:function(e,t){return this.type="++"===e||"--"===e?tr.UpdateExpression:tr.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(e){return this.type=tr.VariableDeclaration,this.declarations=e,this.kind="var",this.finish(),this},finishLexicalDeclaration:function(e,t){return this.type=tr.VariableDeclaration,this.declarations=e,this.kind=t,this.finish(),this},finishVariableDeclarator:function(e,t){return this.type=tr.VariableDeclarator,this.id=e,this.init=t,this.finish(),this},finishWhileStatement:function(e,t){return this.type=tr.WhileStatement,this.test=e,this.body=t,this.finish(),this},finishWithStatement:function(e,t){return this.type=tr.WithStatement,this.object=e,this.body=t,this.finish(),this},finishExportSpecifier:function(e,t){return this.type=tr.ExportSpecifier,this.exported=t||e,this.local=e,this.finish(),this},finishImportDefaultSpecifier:function(e){return this.type=tr.ImportDefaultSpecifier,this.local=e,this.finish(),this},finishImportNamespaceSpecifier:function(e){return this.type=tr.ImportNamespaceSpecifier,this.local=e,this.finish(),this},finishExportNamedDeclaration:function(e,t,r){return this.type=tr.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r,this.finish(),this},finishExportDefaultDeclaration:function(e){return this.type=tr.ExportDefaultDeclaration,this.declaration=e,this.finish(),this},finishExportAllDeclaration:function(e){return this.type=tr.ExportAllDeclaration,this.source=e,this.finish(),this},finishImportSpecifier:function(e,t){return this.type=tr.ImportSpecifier,this.local=e||t,this.imported=t,this.finish(),this},finishImportDeclaration:function(e,t){return this.type=tr.ImportDeclaration,this.specifiers=e,this.source=t,this.finish(),this},finishYieldExpression:function(e,t){return this.type=tr.YieldExpression,this.argument=e,this.delegate=t,this.finish(),this}},e.version="2.7.1",e.tokenize=Zt,e.parse=Jt,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in tr)tr.hasOwnProperty(e)&&(t[e]=tr[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})},{}],137:[function(e,t,r){"use strict";function n(e,t,r,n,o,s,u,l){if(r/=t,n/=t,u>=r&&n>=l)return e;if(u>n||r>l)return null;for(var c=[],f=0;f=r&&n>=d)c.push(p);else if(!(h>n||r>d)){var v=1===g?i(m,r,n,o):a(m,r,n,o,s,3===g);v.length&&c.push({geometry:v,type:g,tags:e[f].tags||null,min:p.min,max:p.max})}}return c.length?c:null}function i(e,t,r,n){for(var i=[],a=0;a=t&&r>=s&&i.push(o)}return i}function a(e,t,r,n,i,a){for(var s=[],u=0;uc;c++)l=p||m[c],p=m[c+1],h=d||l[n],d=p[n],t>h?d>r?(_.push(i(l,p,t),i(l,p,r)),a||(_=o(s,_,g,v))):d>=t&&_.push(i(l,p,t)):h>r?t>d?(_.push(i(l,p,r),i(l,p,t)),a||(_=o(s,_,g,v))):r>=d&&_.push(i(l,p,r)):(_.push(l),t>d?(_.push(i(l,p,t)),a||(_=o(s,_,g,v))):d>r&&(_.push(i(l,p,r)),a||(_=o(s,_,g,v))));l=m[y-1],h=l[n],h>=t&&r>=h&&_.push(l),f=_[_.length-1],a&&f&&(_[0][0]!==f[0]||_[0][1]!==f[1])&&_.push(_[0]),o(s,_,g,v)}return s}function o(e,t,r,n){return t.length&&(t.area=r,t.dist=n,e.push(t)),[]}t.exports=n},{}],138:[function(e,t,r){"use strict";function n(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;nn?-1:n>1?1:n,[r,n,0]}function u(e){for(var t,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var s=0;a>s;s++){var u=o(i.geometry[0][s],t,e.z2,e.x,e.y);if(u[0]!==-r&&u[0]!==t+r||u[1]!==-r&&u[1]!==t+r)return!1}return!0}t.exports=n;var h=e("./convert"),d=e("./clip"),p=e("./wrap"),m=e("./tile");i.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},i.prototype.splitTile=function(e,t,r,n,i,a,o){for(var c=[e,t,r,n],h=this.options,p=h.debug;c.length;){n=c.pop(),r=c.pop(),t=c.pop(),e=c.pop();var g=1<1&&console.time("creation"),y=this.tiles[v]=m(e,g,r,n,_,t===h.maxZoom),this.tileCoords.push({z:t,x:r,y:n}),p)){p>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,y.numFeatures,y.numPoints,y.numSimplified),console.timeEnd("creation"));var b="z"+t;this.stats[b]=(this.stats[b]||0)+1,this.total++}if(y.source=e,h.solidChildren||!f(y,h.extent,h.buffer)){if(i){if(t===h.maxZoom||t===i)continue;var x=1<1&&console.time("clipping");var A,w,E,D,k,T,F=.5*h.buffer/h.extent,S=.5-F,C=.5+F,M=1+F;A=w=E=D=null,k=d(e,g,r-F,r+C,0,u,y.min[0],y.max[0]),T=d(e,g,r+S,r+M,0,u,y.min[0],y.max[0]),k&&(A=d(k,g,n-F,n+C,1,l,y.min[1],y.max[1]),w=d(k,g,n+S,n+M,1,l,y.min[1],y.max[1])),T&&(E=d(T,g,n-F,n+C,1,l,y.min[1],y.max[1]),D=d(T,g,n+S,n+M,1,l,y.min[1],y.max[1])),p>1&&console.timeEnd("clipping"),A&&c.push(A,t+1,2*r,2*n),w&&c.push(w,t+1,2*r,2*n+1),E&&c.push(E,t+1,2*r+1,2*n),D&&c.push(D,t+1,2*r+1,2*n+1)}}},i.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,o=n.debug,u=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var c,h=e,d=t,p=r;!c&&h>0;)h--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[s(h,d,p)];if(!c)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",h,d,p),c.source){if(f(c,i,n.buffer))return a(c,i);o>1&&console.time("drilling down"),this.splitTile(c.source,h,d,p,e,t,r),o>1&&console.timeEnd("drilling down")}return this.tiles[l]?a(this.tiles[l],i):null}},{"./clip":137,"./convert":138,"./tile":141,"./wrap":142}],140:[function(e,t,r){"use strict";function n(e,t){var r,n,a,o,s=t*t,u=e.length,l=0,c=u-1,f=[];for(e[l][2]=1,e[c][2]=1;c;){for(n=0,r=l+1;c>r;r++)a=i(e[r],e[l],e[c]),a>n&&(o=r,n=a);n>s?(e[o][2]=n,f.push(l),f.push(o),l=o):(c=f.pop(),l=f.pop())}}function i(e,t,r){var n=t[0],i=t[1],a=r[0],o=r[1],s=e[0],u=e[1],l=a-n,c=o-i;if(0!==l||0!==c){var f=((s-n)*l+(u-i)*c)/(l*l+c*c);f>1?(n=a,i=o):f>0&&(n+=l*f,i+=c*f)}return l=s-n,c=u-i,l*l+c*c}t.exports=n},{}],141:[function(e,t,r){"use strict";function n(e,t,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:t,transformed:!1,min:[2,1],max:[-1,0]},u=0;us.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(e,t,r,n){var i,a,o,s,u=t.geometry,l=t.type,c=[],f=r*r;if(1===l)for(i=0;if)&&(h.push(s),e.numSimplified++),e.numPoints++;c.push(h)}else e.numPoints+=o.length;c.length&&e.features.push({geometry:c,type:l,tags:t.tags||null})}t.exports=n},{}],142:[function(e,t,r){"use strict";function n(e,t,r){var n=e,a=o(e,1,-1-t,t,0,r,-1,2),s=o(e,1,1-t,2+t,0,r,-1,2);return(a||s)&&(n=o(e,1,-t,1+t,0,r,-1,2),a&&(n=i(a,1).concat(n)),s&&(n=n.concat(i(s,-1)))),n}function i(e,t){for(var r=[],n=0;n0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},o.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},o.cross=function(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},o.lerp=function(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e},o.random=function(e,t){t=t||1;var r=2*n()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},o.transformMat2=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e},o.transformMat2d=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},o.transformMat3=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e},o.transformMat4=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e},o.forEach=function(){var e=o.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=2),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}}(),o.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},"undefined"!=typeof e&&(e.vec2=o);var s={};s.create=function(){var e=new r(3);return e[0]=0,e[1]=0,e[2]=0,e},s.clone=function(e){var t=new r(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},s.fromValues=function(e,t,n){var i=new r(3);return i[0]=e,i[1]=t,i[2]=n,i},s.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},s.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},s.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},s.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},s.sub=s.subtract,s.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e},s.mul=s.multiply,s.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},s.div=s.divide,s.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},s.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},s.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},s.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},s.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)},s.dist=s.distance,s.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i},s.sqrDist=s.squaredDistance,s.length=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)},s.len=s.length,s.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},s.sqrLen=s.squaredLength,s.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},s.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e},s.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},s.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e},s.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e},s.random=function(e,t){t=t||1;var r=2*n()*Math.PI,i=2*n()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e},s.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12],e[1]=r[1]*n+r[5]*i+r[9]*a+r[13],e[2]=r[2]*n+r[6]*i+r[10]*a+r[14],e},s.transformMat3=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e},s.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],l=r[3],c=l*n+s*a-u*i,f=l*i+u*n-o*a,h=l*a+o*i-s*n,d=-o*n-s*i-u*a;return e[0]=c*l+d*-o+f*-u-h*-s,e[1]=f*l+d*-s+h*-o-c*-u,e[2]=h*l+d*-u+c*-s-f*-o,e},s.rotateX=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},s.rotateY=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},s.rotateZ=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},s.forEach=function(){var e=s.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=3),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}}(),s.str=function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},"undefined"!=typeof e&&(e.vec3=s);var u={};u.create=function(){var e=new r(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e},u.clone=function(e){var t=new r(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},u.fromValues=function(e,t,n,i){var a=new r(4);return a[0]=e,a[1]=t,a[2]=n,a[3]=i,a},u.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},u.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e},u.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},u.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e},u.sub=u.subtract,u.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},u.mul=u.multiply,u.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e},u.div=u.divide,u.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},u.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},u.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},u.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},u.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)},u.dist=u.distance,u.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a},u.sqrDist=u.squaredDistance,u.length=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)},u.len=u.length,u.squaredLength=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i},u.sqrLen=u.squaredLength,u.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},u.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*o),e},u.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},u.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e},u.random=function(e,t){return t=t||1,e[0]=n(),e[1]=n(),e[2]=n(),e[3]=n(),u.normalize(e,e),u.scale(e,e,t),e},u.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e},u.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],l=r[3],c=l*n+s*a-u*i,f=l*i+u*n-o*a,h=l*a+o*i-s*n,d=-o*n-s*i-u*a;return e[0]=c*l+d*-o+f*-u-h*-s,e[1]=f*l+d*-s+h*-o-c*-u,e[2]=h*l+d*-u+c*-s-f*-o,e},u.forEach=function(){var e=u.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=4),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}(),u.str=function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},"undefined"!=typeof e&&(e.vec4=u);var l={};l.create=function(){var e=new r(4);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},l.clone=function(e){var t=new r(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},l.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},l.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},l.transpose=function(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e},l.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*a-i*n;return o?(o=1/o,e[0]=a*o,e[1]=-n*o,e[2]=-i*o,e[3]=r*o,e):null},l.adjoint=function(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e},l.determinant=function(e){return e[0]*e[3]-e[2]*e[1]},l.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*s+a*u,e[1]=i*s+o*u,e[2]=n*l+a*c,e[3]=i*l+o*c,e},l.mul=l.multiply,l.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=n*-s+a*u,e[3]=i*-s+o*u,e},l.scale=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1];return e[0]=n*s,e[1]=i*s,e[2]=a*u,e[3]=o*u,e},l.str=function(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},l.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2))},l.LDU=function(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]},"undefined"!=typeof e&&(e.mat2=l);var c={};c.create=function(){var e=new r(6);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},c.clone=function(e){var t=new r(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},c.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},c.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},c.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=r*a-n*i;return u?(u=1/u,e[0]=a*u,e[1]=-n*u,e[2]=-i*u,e[3]=r*u,e[4]=(i*s-a*o)*u,e[5]=(n*o-r*s)*u,e):null},c.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},c.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],c=r[1],f=r[2],h=r[3],d=r[4],p=r[5];return e[0]=n*l+a*c,e[1]=i*l+o*c,e[2]=n*f+a*h,e[3]=i*f+o*h,e[4]=n*d+a*p+s,e[5]=i*d+o*p+u,e},c.mul=c.multiply,c.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=Math.sin(r),c=Math.cos(r);return e[0]=n*c+a*l,e[1]=i*c+o*l,e[2]=n*-l+a*c,e[3]=i*-l+o*c,e[4]=s,e[5]=u,e},c.scale=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],c=r[1];return e[0]=n*l,e[1]=i*l,e[2]=a*c,e[3]=o*c,e[4]=s,e[5]=u,e},c.translate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],c=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=n*l+a*c+s,e[5]=i*l+o*c+u,e},c.str=function(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"},c.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+1)},"undefined"!=typeof e&&(e.mat2d=c);var f={};f.create=function(){var e=new r(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},f.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},f.clone=function(e){var t=new r(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},f.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},f.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},f.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e},f.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=c*o-s*l,h=-c*a+s*u,d=l*a-o*u,p=r*f+n*h+i*d;return p?(p=1/p,e[0]=f*p,e[1]=(-c*n+i*l)*p,e[2]=(s*n-i*o)*p,e[3]=h*p,e[4]=(c*r-i*u)*p,e[5]=(-s*r+i*a)*p,e[6]=d*p,e[7]=(-l*r+n*u)*p,e[8]=(o*r-n*a)*p,e):null},f.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8];return e[0]=o*c-s*l,e[1]=i*l-n*c,e[2]=n*s-i*o,e[3]=s*u-a*c,e[4]=r*c-i*u,e[5]=i*a-r*s,e[6]=a*l-o*u,e[7]=n*u-r*l,e[8]=r*o-n*a,e},f.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8];return t*(l*a-o*u)+r*(-l*i+o*s)+n*(u*i-a*s)},f.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=r[0],d=r[1],p=r[2],m=r[3],g=r[4],v=r[5],y=r[6],_=r[7],b=r[8];return e[0]=h*n+d*o+p*l,e[1]=h*i+d*s+p*c,e[2]=h*a+d*u+p*f,e[3]=m*n+g*o+v*l,e[4]=m*i+g*s+v*c,e[5]=m*a+g*u+v*f,e[6]=y*n+_*o+b*l,e[7]=y*i+_*s+b*c,e[8]=y*a+_*u+b*f,e},f.mul=f.multiply,f.translate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=r[0],d=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=h*n+d*o+l,e[7]=h*i+d*s+c,e[8]=h*a+d*u+f,e},f.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=Math.sin(r),d=Math.cos(r);return e[0]=d*n+h*o,e[1]=d*i+h*s,e[2]=d*a+h*u,e[3]=d*o-h*n,e[4]=d*s-h*i,e[5]=d*u-h*a,e[6]=l,e[7]=c,e[8]=f,e},f.scale=function(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},f.fromMat2d=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},f.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,c=n*o,f=n*s,h=i*o,d=i*s,p=i*u,m=a*o,g=a*s,v=a*u;return e[0]=1-f-p,e[3]=c-v,e[6]=h+g,e[1]=c+v,e[4]=1-l-p,e[7]=d-m,e[2]=h-g,e[5]=d+m,e[8]=1-l-f,e},f.normalFromMat4=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*o,_=r*u-i*o,b=r*l-a*o,x=n*u-i*s,A=n*l-a*s,w=i*l-a*u,E=c*m-f*p,D=c*g-h*p,k=c*v-d*p,T=f*g-h*m,F=f*v-d*m,S=h*v-d*g,C=y*S-_*F+b*T+x*k-A*D+w*E;return C?(C=1/C,e[0]=(s*S-u*F+l*T)*C,e[1]=(u*k-o*S-l*D)*C,e[2]=(o*F-s*k+l*E)*C,e[3]=(i*F-n*S-a*T)*C,e[4]=(r*S-i*k+a*D)*C,e[5]=(n*k-r*F-a*E)*C,e[6]=(m*w-g*A+v*x)*C,e[7]=(g*b-p*w-v*_)*C,e[8]=(p*A-m*b+v*y)*C,e):null},f.str=function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},f.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2))},"undefined"!=typeof e&&(e.mat3=f);var h={};h.create=function(){var e=new r(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},h.clone=function(e){var t=new r(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},h.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},h.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},h.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},h.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*o,_=r*u-i*o,b=r*l-a*o,x=n*u-i*s,A=n*l-a*s,w=i*l-a*u,E=c*m-f*p,D=c*g-h*p,k=c*v-d*p,T=f*g-h*m,F=f*v-d*m,S=h*v-d*g,C=y*S-_*F+b*T+x*k-A*D+w*E;return C?(C=1/C,e[0]=(s*S-u*F+l*T)*C,e[1]=(i*F-n*S-a*T)*C,e[2]=(m*w-g*A+v*x)*C,e[3]=(h*A-f*w-d*x)*C,e[4]=(u*k-o*S-l*D)*C,e[5]=(r*S-i*k+a*D)*C,e[6]=(g*b-p*w-v*_)*C,e[7]=(c*w-h*b+d*_)*C,e[8]=(o*F-s*k+l*E)*C,e[9]=(n*k-r*F-a*E)*C,e[10]=(p*A-m*b+v*y)*C,e[11]=(f*b-c*A-d*y)*C,e[12]=(s*D-o*T-u*E)*C,e[13]=(r*T-n*D+i*E)*C,e[14]=(m*_-p*x-g*y)*C,e[15]=(c*x-f*_+h*y)*C,e):null},h.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(h*v-d*g)-f*(u*v-l*g)+m*(u*d-l*h),e[1]=-(n*(h*v-d*g)-f*(i*v-a*g)+m*(i*d-a*h)),e[2]=n*(u*v-l*g)-s*(i*v-a*g)+m*(i*l-a*u),e[3]=-(n*(u*d-l*h)-s*(i*d-a*h)+f*(i*l-a*u)),e[4]=-(o*(h*v-d*g)-c*(u*v-l*g)+p*(u*d-l*h)),e[5]=r*(h*v-d*g)-c*(i*v-a*g)+p*(i*d-a*h),e[6]=-(r*(u*v-l*g)-o*(i*v-a*g)+p*(i*l-a*u)),e[7]=r*(u*d-l*h)-o*(i*d-a*h)+c*(i*l-a*u),e[8]=o*(f*v-d*m)-c*(s*v-l*m)+p*(s*d-l*f),e[9]=-(r*(f*v-d*m)-c*(n*v-a*m)+p*(n*d-a*f)),e[10]=r*(s*v-l*m)-o*(n*v-a*m)+p*(n*l-a*s),e[11]=-(r*(s*d-l*f)-o*(n*d-a*f)+c*(n*l-a*s)),e[12]=-(o*(f*g-h*m)-c*(s*g-u*m)+p*(s*h-u*f)),e[13]=r*(f*g-h*m)-c*(n*g-i*m)+p*(n*h-i*f),e[14]=-(r*(s*g-u*m)-o*(n*g-i*m)+p*(n*u-i*s)),e[15]=r*(s*h-u*f)-o*(n*h-i*f)+c*(n*u-i*s),e},h.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=e[11],d=e[12],p=e[13],m=e[14],g=e[15],v=t*o-r*a,y=t*s-n*a,_=t*u-i*a,b=r*s-n*o,x=r*u-i*o,A=n*u-i*s,w=l*p-c*d,E=l*m-f*d,D=l*g-h*d,k=c*m-f*p,T=c*g-h*p,F=f*g-h*m;return v*F-y*T+_*k+b*D-x*E+A*w},h.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],_=r[0],b=r[1],x=r[2],A=r[3];return e[0]=_*n+b*s+x*f+A*m,e[1]=_*i+b*u+x*h+A*g,e[2]=_*a+b*l+x*d+A*v,e[3]=_*o+b*c+x*p+A*y,_=r[4],b=r[5],x=r[6],A=r[7],e[4]=_*n+b*s+x*f+A*m,e[5]=_*i+b*u+x*h+A*g,e[6]=_*a+b*l+x*d+A*v,e[7]=_*o+b*c+x*p+A*y,_=r[8],b=r[9],x=r[10],A=r[11],e[8]=_*n+b*s+x*f+A*m,e[9]=_*i+b*u+x*h+A*g,e[10]=_*a+b*l+x*d+A*v,e[11]=_*o+b*c+x*p+A*y,_=r[12],b=r[13],x=r[14],A=r[15],e[12]=_*n+b*s+x*f+A*m,e[13]=_*i+b*u+x*h+A*g,e[14]=_*a+b*l+x*d+A*v,e[15]=_*o+b*c+x*p+A*y,e},h.mul=h.multiply,h.translate=function(e,t,r){var n,i,a,o,s,u,l,c,f,h,d,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=l,e[7]=c,e[8]=f,e[9]=h,e[10]=d,e[11]=p,e[12]=n*m+s*g+f*v+t[12],e[13]=i*m+u*g+h*v+t[13],e[14]=a*m+l*g+d*v+t[14],e[15]=o*m+c*g+p*v+t[15]),e},h.scale=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},h.rotate=function(e,r,n,i){var a,o,s,u,l,c,f,h,d,p,m,g,v,y,_,b,x,A,w,E,D,k,T,F,S=i[0],C=i[1],M=i[2],R=Math.sqrt(S*S+C*C+M*M);return Math.abs(R)o?(s.cross(e,t,i),s.length(e)<1e-6&&s.cross(e,r,i),s.normalize(e,e),d.setAxisAngle(n,e,Math.PI),n):o>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(s.cross(e,i,a),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=1+o,d.normalize(n,n))}}(),d.setAxes=function(){var e=f.create();return function(t,r,n,i){return e[0]=n[0],e[3]=n[1],e[6]=n[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],d.normalize(t,d.fromMat3(t,e))}}(),d.clone=u.clone,d.fromValues=u.fromValues,d.copy=u.copy,d.set=u.set,d.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},d.setAxisAngle=function(e,t,r){r=.5*r;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e},d.add=u.add,d.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*c+o*s+i*l-a*u,e[1]=i*c+o*u+a*s-n*l,e[2]=a*c+o*l+n*u-i*s,e[3]=o*c-n*s-i*u-a*l,e},d.mul=d.multiply,d.scale=u.scale,d.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-n*s,e},d.rotateY=function(e,t,r){ -r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=i*u+o*s,e[2]=a*u+n*s,e[3]=o*u-i*s,e},d.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e},d.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=-Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e},d.dot=u.dot,d.lerp=u.lerp,d.slerp=function(e,t,r,n){var i,a,o,s,u,l=t[0],c=t[1],f=t[2],h=t[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=l*d+c*p+f*m+h*g,0>a&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,u=Math.sin(n*i)/o):(s=1-n,u=n),e[0]=s*l+u*d,e[1]=s*c+u*p,e[2]=s*f+u*m,e[3]=s*h+u*g,e},d.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e},d.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},d.length=u.length,d.len=d.length,d.squaredLength=u.squaredLength,d.sqrLen=d.squaredLength,d.normalize=u.normalize,d.fromMat3=function(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[7]-t[5])*r,e[1]=(t[2]-t[6])*r,e[2]=(t[3]-t[1])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*o+a]-t[3*a+o])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r}return e},d.str=function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},"undefined"!=typeof e&&(e.quat=d)}(t.exports)}(this)},{}],144:[function(e,t,r){function n(e){e=String(e);for(var t,r=[];t=e.match(/ERROR\:([^\n]+)/);){e=e.slice(t.index+1);var n=t[1].trim(),i=n.split(":"),a=i.slice(2).join(":").trim(),o=parseInt(i[0],10),n=parseInt(i[1],10);r.push({message:a,file:o,line:n})}return r}t.exports=n},{}],145:[function(e,t,r){r.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*m}},{}],146:[function(e,t,r){t.exports=e("./lib/inherit")},{"./lib/inherit":147}],147:[function(e,t,r){!function(e){function n(e){var t=f(e);if(v)for(var r,n=0;r=b[n++];)e.hasOwnProperty(r)&&t.push(r);return t}function i(e,t,r){for(var i,a,o=n(r),u=0,l=o.length;l>u;)"__self"!==(i=o[u++])&&(a=r[i],m(a)&&(!s||a.toString().indexOf(".__base")>-1)?t[i]=function(r,n){var i=e[r]?e[r]:"__constructor"===r?t.__self.__parent:g;return function(){var e=this.__base;this.__base=i;var t=n.apply(this,arguments);return this.__base=e,t}}(i,a):t[i]=a)}function a(e,t){for(var r,n=1;r=e[n++];)t?m(r)?o.self(t,r.prototype,r):o.self(t,r):t=m(r)?o(e[0],r.prototype,r):o(e[0],r);return t||e[0]}function o(){var e=arguments,t=p(e[0]),r=t||m(e[0]),n=r?t?a(e[0]):e[0]:u,o=e[r?1:0]||{},s=e[r?2:1],l=o.__constructor||r&&n.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:r?function(){return n.apply(this,arguments)}:function(){};if(!r)return l.prototype=o,l.prototype.__self=l.prototype.constructor=l,h(l,s);h(l,n),l.__parent=n;var f=n.prototype,d=l.prototype=c(f);return d.__self=d.constructor=l,o&&i(f,d,o),s&&i(n,l,s),l}var s=function(){"_"}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,c=Object.create||function(e){var t=function(){};return t.prototype=e,new t},f=Object.keys||function(e){var t=[];for(var r in e)l.call(e,r)&&t.push(r);return t},h=function(e,t){for(var r in t)l.call(t,r)&&(e[r]=t[r]);return e},d=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===d.call(e)},m=function(e){return"[object Function]"===d.call(e)},g=function(){},v=!0,y={toString:""};for(var _ in y)y.hasOwnProperty(_)&&(v=!1);var b=v?["toString","valueOf"]:null;o.self=function(){var e=arguments,t=p(e[0]),r=t?a(e[0],e[0][0]):e[0],n=e[1],o=e[2],s=r.prototype;return n&&i(s,s,n),o&&i(r,r,o),r};var x=!0;"object"==typeof r&&(t.exports=o,x=!1),"object"==typeof modules&&(modules.define("inherit",function(e){e(o)}),x=!1),"function"==typeof define&&(define(function(e,t,r){r.exports=o}),x=!1),x&&(e.inherit=o)}(this)},{}],148:[function(e,t,r){var n=Array.isArray,i=Object.prototype.toString;t.exports=n||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],149:[function(e,t,r){"use strict";var n=e("./lib/js-yaml.js");t.exports=n},{"./lib/js-yaml.js":150}],150:[function(e,t,r){"use strict";function n(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=e("./js-yaml/loader"),a=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=a.dump,t.exports.safeDump=a.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=n("scan"),t.exports.parse=n("parse"),t.exports.compose=n("compose"),t.exports.addConstructor=n("addConstructor")},{"./js-yaml/dumper":152,"./js-yaml/exception":153,"./js-yaml/loader":154,"./js-yaml/schema":156,"./js-yaml/schema/core":157,"./js-yaml/schema/default_full":158,"./js-yaml/schema/default_safe":159,"./js-yaml/schema/failsafe":160,"./js-yaml/schema/json":161,"./js-yaml/type":162}],151:[function(e,t,r){"use strict";function n(e){return"undefined"==typeof e||null===e}function i(e){return"object"==typeof e&&null!==e}function a(e){return Array.isArray(e)?e:n(e)?[]:[e]}function o(e,t){var r,n,i,a;if(t)for(a=Object.keys(t),r=0,n=a.length;n>r;r+=1)i=a[r],e[i]=t[i];return e}function s(e,t){var r,n="";for(r=0;t>r;r+=1)n+=e;return n}function u(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=n,t.exports.isObject=i,t.exports.toArray=a,t.exports.repeat=s,t.exports.isNegativeZero=u,t.exports.extend=o},{}],152:[function(e,t,r){"use strict";function n(e,t){var r,n,i,a,o,s,u;if(null===t)return{};for(r={},n=Object.keys(t),i=0,a=n.length;a>i;i+=1)o=n[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),u=e.compiledTypeMap[o],u&&C.call(u.styleAliases,s)&&(s=u.styleAliases[s]),r[o]=s;return r}function i(e){var t,r,n;if(t=e.toString(16).toUpperCase(),255>=e)r="x",n=2;else if(65535>=e)r="u",n=4;else{if(!(4294967295>=e))throw new k("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+D.repeat("0",n-t.length)+t}function a(e){this.schema=e.schema||T,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=D.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=n(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var r,n=D.repeat(" ",t),i=0,a=-1,o="",s=e.length;s>i;)a=e.indexOf("\n",i),-1===a?(r=e.slice(i),i=s):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(o+=n),o+=r;return o}function s(e,t){return"\n"+D.repeat(" ",e.indent*t)}function u(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;n>r;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function l(e){this.source=e,this.result="",this.checkpoint=0}function c(e,t,r,n){var i,a,s,c,h,m,g,v,y,_,b,x,A,w,E,D,k,T,F,S,C;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(i=!0,a=t.length?t.charCodeAt(0):0,s=P===a||P===t.charCodeAt(t.length-1),(G===a||W===a||Y===a||Z===a)&&(i=!1),s?(i=!1,c=!1,h=!1):(c=!n,h=!n),m=!0,g=new l(t),v=!1,y=0,_=0,b=e.indent*r,x=e.lineWidth,-1===x&&(x=9007199254740991),40>b?x-=b:x=40,w=0;w0&&(k=t.charCodeAt(w-1),k===P&&(h=!1,c=!1)),c&&(T=w-y,y=w,T>_&&(_=T))),A!==L&&(m=!1),g.takeUpTo(w),g.escapeChar())}if(i&&u(e,t)&&(i=!1),F="",(c||h)&&(S=0,t.charCodeAt(t.length-1)===R&&(S+=1,t.charCodeAt(t.length-2)===R&&(S+=1)),0===S?F="-":2===S&&(F="+")),h&&x>_&&(c=!1),v||(h=!1),i)e.dump=t;else if(m)e.dump="'"+t+"'";else if(c)C=f(t,x),e.dump=">"+F+"\n"+o(C,b);else if(h)F||(t=t.replace(/\n$/,"")),e.dump="|"+F+"\n"+o(t,b);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function f(e,t){var r,n="",i=0,a=e.length,o=/\n+$/.exec(e);for(o&&(a=o.index+1);a>i;)r=e.indexOf("\n",i),r>a||-1===r?(n&&(n+="\n\n"),n+=h(e.slice(i,a),t),i=a):(n&&(n+="\n\n"),n+=h(e.slice(i,r),t),i=r+1);return o&&"\n"!==o[0]&&(n+=o[0]),n}function h(e,t){if(""===e)return e;for(var r,n,i,a=/[^\s] [^\s]/g,o="",s=0,u=0,l=a.exec(e);l;)r=l.index,r-u>t&&(n=s!==u?s:r,o&&(o+="\n"),i=e.slice(u,n),o+=i,u=n+1),s=r+1,l=a.exec(e);return o&&(o+="\n"),o+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function d(e){return M!==e&&R!==e&&j!==e&&$!==e&&H!==e&&X!==e&&J!==e&&Q!==e&&B!==e&&O!==e&&U!==e&&I!==e&&K!==e&&V!==e&&z!==e&&L!==e&&N!==e&&q!==e&&!ee[e]&&!p(e)}function p(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,r){var n,i,a="",o=e.tag;for(n=0,i=r.length;i>n;n+=1)b(e,t,r[n],!1,!1)&&(0!==n&&(a+=", "),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function g(e,t,r,n){var i,a,o="",u=e.tag;for(i=0,a=r.length;a>i;i+=1)b(e,t+1,r[i],!0,!0)&&(n&&0===i||(o+=s(e,t)),o+="- "+e.dump);e.tag=u,e.dump=o||"[]"}function v(e,t,r){var n,i,a,o,s,u="",l=e.tag,c=Object.keys(r);for(n=0,i=c.length;i>n;n+=1)s="",0!==n&&(s+=", "),a=c[n],o=r[a],b(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",b(e,t,o,!1,!1)&&(s+=e.dump,u+=s));e.tag=l,e.dump="{"+u+"}"}function y(e,t,r,n){var i,a,o,u,l,c,f="",h=e.tag,d=Object.keys(r);if(e.sortKeys===!0)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new k("sortKeys must be a boolean or a function");for(i=0,a=d.length;a>i;i+=1)c="",n&&0===i||(c+=s(e,t)),o=d[i],u=r[o],b(e,t+1,o,!0,!0,!0)&&(l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,l&&(c+=e.dump&&R===e.dump.charCodeAt(0)?"?":"? "),c+=e.dump,l&&(c+=s(e,t)),b(e,t+1,u,!0,l)&&(c+=e.dump&&R===e.dump.charCodeAt(0)?":":": ",c+=e.dump,f+=c));e.tag=h,e.dump=f||"{}"}function _(e,t,r){var n,i,a,o,s,u;for(i=r?e.explicitTypes:e.implicitTypes,a=0,o=i.length;o>a;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=r?s.tag:"?",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===S.call(s.represent))n=s.represent(t,u);else{if(!C.call(s.represent,u))throw new k("!<"+s.tag+'> tag resolver accepts not "'+u+'" style');n=s.represent[u](t,u)}e.dump=n}return!0}return!1}function b(e,t,r,n,i,a){e.tag=null,e.dump=r,_(e,r,!1)||_(e,r,!0);var o=S.call(e.dump);n&&(n=0>e.flowLevel||e.flowLevel>t);var s,u,l="[object Object]"===o||"[object Array]"===o;if(l&&(s=e.duplicates.indexOf(r),u=-1!==s),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(l&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===o)n&&0!==Object.keys(e.dump).length?(y(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(v(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===o)n&&0!==e.dump.length?(g(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(m(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new k("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&c(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function x(e,t){var r,n,i=[],a=[];for(A(e,i,a),r=0,n=a.length;n>r;r+=1)t.duplicates.push(i[a[r]]);t.usedDuplicates=new Array(n)}function A(e,t,r){var n,i,a;if(null!==e&&"object"==typeof e)if(i=t.indexOf(e),-1!==i)-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;a>i;i+=1)A(e[i],t,r);else for(n=Object.keys(e),i=0,a=n.length;a>i;i+=1)A(e[n[i]],t,r)}function w(e,t){t=t||{};var r=new a(t);return x(e,r),b(r,0,e,!0,!0)?r.dump+"\n":""}function E(e,t){return w(e,D.extend({schema:F},t))}var D=e("./common"),k=e("./exception"),T=e("./schema/default_full"),F=e("./schema/default_safe"),S=Object.prototype.toString,C=Object.prototype.hasOwnProperty,M=9,R=10,j=13,P=32,I=33,L=34,B=35,N=37,O=38,z=39,U=42,$=44,G=45,q=58,V=62,W=63,Y=64,H=91,X=93,Z=96,J=123,K=124,Q=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];l.prototype.takeUpTo=function(e){var t;if(e checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},l.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1,this},l.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=w,t.exports.safeDump=E},{"./common":151,"./exception":153,"./schema/default_full":158,"./schema/default_safe":159}],153:[function(e,t,r){"use strict";function n(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var i=e("inherit");i(n,Error),n.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=n},{inherit:146}],154:[function(e,t,r){"use strict";function n(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function l(e){return e>=48&&57>=e?e-48:-1}function c(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function f(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new U(t,new $(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function p(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,r,n){var i,a,o,s;if(r>t){if(s=e.input.slice(t,r),n)for(i=0,a=s.length;a>i;i+=1)o=s.charCodeAt(i),9===o||o>=32&&1114111>=o||p(e,"expected valid JSON character");else Q.test(s)&&p(e,"the stream contains non-printable characters");e.result+=s}}function v(e,t,r){var n,i,a,o;for(z.isObject(r)||p(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;o>a;a+=1)i=n[a],V.call(t,i)||(t[i]=r[i])}function y(e,t,r,n,i){var a,o;if(n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(i))for(a=0,o=i.length;o>a;a+=1)v(e,t,i[a]);else v(e,t,i);else t[n]=i;return t}function _(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):p(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function b(e,t,r){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!n(o))break;for(_(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==a&&e.lineIndent1&&(e.result+=z.repeat("\n",t-1))}function w(e,t,r){var s,u,l,c,f,h,d,p,m,v=e.kind,y=e.result;if(m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),a(u)||r&&o(u)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,f=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),a(u)||r&&o(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&x(e)||r&&o(m))break;if(n(m)){if(h=e.line,d=e.lineStart,p=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){f=!0,m=e.input.charCodeAt(e.position);continue}e.position=c,e.line=h,e.lineStart=d,e.lineIndent=p;break}}f&&(g(e,l,c,!1),A(e,e.line-h),l=c=e.position,f=!1),i(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,l,c,!1),e.result?!0:(e.kind=v,e.result=y,!1)}function E(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),39!==r)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(g(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),39!==r)return!0;i=a=e.position,e.position++}else n(r)?(g(e,i,a,!0),A(e,b(e,!1,t)),i=a=e.position):e.position===e.lineStart&&x(e)?p(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);p(e,"unexpected end of the stream within a single quoted scalar")}function D(e,t){var r,i,a,o,l,c;if(c=e.input.charCodeAt(e.position),34!==c)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(c=e.input.charCodeAt(e.position));){if(34===c)return g(e,r,e.position,!0),e.position++,!0;if(92===c){if(g(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),n(c))b(e,!1,t);else if(256>c&&ie[c])e.result+=ae[c],e.position++;else if((l=u(c))>0){for(a=l,o=0;a>0;a--)c=e.input.charCodeAt(++e.position),(l=s(c))>=0?o=(o<<4)+l:p(e,"expected hexadecimal character");e.result+=f(o),e.position++}else p(e,"unknown escape sequence");r=i=e.position}else n(c)?(g(e,r,i,!0),A(e,b(e,!1,t)),r=i=e.position):e.position===e.lineStart&&x(e)?p(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}p(e,"unexpected end of the stream within a double quoted scalar")}function k(e,t){var r,n,i,o,s,u,l,c,f,h,d,m=!0,g=e.tag,v=e.anchor;if(d=e.input.charCodeAt(e.position),91===d)o=93,l=!1,n=[];else{if(123!==d)return!1;o=125,l=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),d=e.input.charCodeAt(++e.position);0!==d;){if(b(e,!0,t),d=e.input.charCodeAt(e.position),d===o)return e.position++,e.tag=g,e.anchor=v,e.kind=l?"mapping":"sequence",e.result=n,!0;m||p(e,"missed comma between flow collection entries"),f=c=h=null,s=u=!1,63===d&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=u=!0,e.position++,b(e,!0,t))),r=e.line,j(e,t,W,!1,!0),f=e.tag,c=e.result,b(e,!0,t),d=e.input.charCodeAt(e.position),!u&&e.line!==r||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),b(e,!0,t),j(e,t,W,!1,!0),h=e.result),l?y(e,n,f,c,h):s?n.push(y(e,null,f,c,h)):n.push(c),b(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}p(e,"unexpected end of the stream within a flow collection")}function T(e,t){var r,a,o,s,u=Z,c=!1,f=t,h=0,d=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)Z===u?u=43===s?K:J:p(e,"repeat of a chomping mode identifier");else{if(!((o=l(s))>=0))break;0===o?p(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?p(e,"repeat of an indentation width identifier"):(f=t+o-1,c=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!n(s)&&0!==s)}for(;0!==s;){for(_(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndentf&&(f=e.lineIndent),n(s))h++;else{if(e.lineIndentt)&&0!==i)p(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(j(e,t,X,!0,o)&&(g?d=e.result:m=e.result),g||(y(e,f,h,d,m),h=d=m=null),b(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)p(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentu;u+=1)if(c=e.implicitTypes[u],c.resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else V.call(e.typeMap,e.tag)?(c=e.typeMap[e.tag],null!==e.result&&c.kind!==e.kind&&p(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):p(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):p(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||g}function P(e){var t,r,o,s,u=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(b(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(t,e.position),o=[],r.length<1&&p(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!n(s));break}if(n(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&_(e),V.call(se,r)?se[r](e,r,o):m(e,'unknown document directive "'+r+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):l&&p(e,"directives end mark is expected"),j(e,e.lineIndent-1,X,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&x(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.positionn;n+=1)t(a[n])}function B(e,t){var r=I(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new U("expected a single document in the stream, but found more")}}function N(e,t,r){L(e,t,z.extend({schema:G},r))}function O(e,t){return B(e,z.extend({schema:G},t))}for(var z=e("./common"),U=e("./exception"),$=e("./mark"),G=e("./schema/default_safe"),q=e("./schema/default_full"),V=Object.prototype.hasOwnProperty,W=1,Y=2,H=3,X=4,Z=1,J=2,K=3,Q=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,re=/^(?:!|!!|![a-z\-]+!)$/i,ne=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,ie=new Array(256),ae=new Array(256),oe=0;256>oe;oe++)ie[oe]=c(oe)?1:0,ae[oe]=c(oe);var se={YAML:function(e,t,r){var n,i,a;null!==e.version&&p(e,"duplication of %YAML directive"),1!==r.length&&p(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),null===n&&p(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&p(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=2>a,1!==a&&2!==a&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&p(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],re.test(n)||p(e,"ill-formed tag handle (first argument) of the TAG directive"),V.call(e.tagMap,n)&&p(e,'there is a previously declared suffix for "'+n+'" tag handle'),ne.test(i)||p(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=i}};t.exports.loadAll=L,t.exports.load=B,t.exports.safeLoadAll=N,t.exports.safeLoad=O},{"./common":151,"./exception":153,"./mark":155,"./schema/default_full":158,"./schema/default_safe":159}],155:[function(e,t,r){"use strict";function n(e,t,r,n,i){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=i}var i=e("./common");n.prototype.getSnippet=function(e,t){var r,n,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",n=this.position;n>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(n-=1,this.position-n>t/2-1){r=" ... ",n+=5;break}for(a="",o=this.position;ot/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(n,o),i.repeat(" ",e)+r+s+a+"\n"+i.repeat(" ",e+this.position-n+r.length)+"^"},n.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(r+=":\n"+t)),r},t.exports=n},{"./common":151}],156:[function(e,t,r){"use strict";function n(e,t,r){var i=[];return e.include.forEach(function(e){r=n(e,t,r)}),e[t].forEach(function(e){r.forEach(function(t,r){t.tag===e.tag&&i.push(r)}),r.push(e)}),r.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){n[e.tag]=e}var t,r,n={};for(t=0,r=arguments.length;r>t;t+=1)arguments[t].forEach(e);return n}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){ -if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=n(this,"implicit",[]),this.compiledExplicit=n(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),s=e("./exception"),u=e("./type");a.DEFAULT=null,a.create=function(){var e,t;switch(arguments.length){case 1:e=a.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof a}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof u}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:e,explicit:t})},t.exports=a},{"./common":151,"./exception":153,"./type":162}],157:[function(e,t,r){"use strict";var n=e("../schema");t.exports=new n({include:[e("./json")]})},{"../schema":156,"./json":161}],158:[function(e,t,r){"use strict";var n=e("../schema");t.exports=n.DEFAULT=new n({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":156,"../type/js/function":167,"../type/js/regexp":168,"../type/js/undefined":169,"./default_safe":159}],159:[function(e,t,r){"use strict";var n=e("../schema");t.exports=new n({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":156,"../type/binary":163,"../type/merge":171,"../type/omap":173,"../type/pairs":174,"../type/set":176,"../type/timestamp":178,"./core":157}],160:[function(e,t,r){"use strict";var n=e("../schema");t.exports=new n({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":156,"../type/map":170,"../type/seq":175,"../type/str":177}],161:[function(e,t,r){"use strict";var n=e("../schema");t.exports=new n({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":156,"../type/bool":164,"../type/float":165,"../type/int":166,"../type/null":172,"./failsafe":160}],162:[function(e,t,r){"use strict";function n(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new a('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=n(t.styleAliases||null),-1===s.indexOf(this.kind))throw new a('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var a=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=i},{"./exception":153}],163:[function(e,t,r){"use strict";function n(e){if(null===e)return!1;var t,r,n=0,i=e.length,a=l;for(r=0;i>r;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(0>t)return!1;n+=6}return n%8===0}function i(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=l,o=0,u=[];for(t=0;i>t;t++)t%4===0&&t&&(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(n.charAt(t));return r=i%4*6,0===r?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===r?(u.push(o>>10&255),u.push(o>>2&255)):12===r&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,r,n="",i=0,a=e.length,o=l;for(t=0;a>t;t++)t%3===0&&t&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return r=a%3,0===r?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function o(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,u=e("../type"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:a})},{"../type":162,buffer:37}],164:[function(e,t,r){"use strict";function n(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function a(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:a,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":162}],165:[function(e,t,r){"use strict";function n(e){return null===e?!1:l.test(e)?!0:!1}function i(e){var t,r,n,i;return t=e.replace(/_/g,"").toLowerCase(),r="-"===t[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,n=1,i.forEach(function(e){t+=e*n,n*=60}),r*t):r*parseFloat(t,10)}function a(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return r=e.toString(10),c.test(r)?r.replace("e",".e"):r}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||s.isNegativeZero(e))}var s=e("../common"),u=e("../type"),l=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),c=/^[-+]?[0-9]+e/;t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:a,defaultStyle:"lowercase"})},{"../common":151,"../type":162}],166:[function(e,t,r){"use strict";function n(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function i(e){return e>=48&&55>=e}function a(e){return e>=48&&57>=e}function o(e){if(null===e)return!1;var t,r=e.length,o=0,s=!1;if(!r)return!1;if(t=e[o],("-"===t||"+"===t)&&(t=e[++o]),"0"===t){if(o+1===r)return!0;if(t=e[++o],"b"===t){for(o++;r>o;o++)if(t=e[o],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(o++;r>o;o++)if(t=e[o],"_"!==t){if(!n(e.charCodeAt(o)))return!1;s=!0}return s}for(;r>o;o++)if(t=e[o],"_"!==t){if(!i(e.charCodeAt(o)))return!1;s=!0}return s}for(;r>o;o++)if(t=e[o],"_"!==t){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(o)):!1}function s(e){var t,r,n=e,i=1,a=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),t=n[0],("-"===t||"+"===t)&&("-"===t&&(i=-1),n=n.slice(1),t=n[0]),"0"===n?0:"0"===t?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){a.unshift(parseInt(e,10))}),n=0,r=1,a.forEach(function(e){n+=e*r,r*=60}),i*n):i*parseInt(n,10)}function u(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!l.isNegativeZero(e)}var l=e("../common"),c=e("../type");t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:s,predicate:u,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":151,"../type":162}],167:[function(e,t,r){"use strict";function n(e){if(null===e)return!1;try{var t="("+e+")",r=s.parse(t,{range:!0});return"Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type?!1:!0}catch(n){return!1}}function i(e){var t,r="("+e+")",n=s.parse(r,{range:!0}),i=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=n.body[0].expression.body.range,new Function(i,r.slice(t[0]+1,t[1]-1))}function a(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=e("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var l=e("../../type");t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:a})},{"../../type":162,esprima:136}],168:[function(e,t,r){"use strict";function n(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1;t=t.slice(1,t.length-n.length-1)}try{return!0}catch(i){return!1}}function i(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:a})},{"../../type":162}],169:[function(e,t,r){"use strict";function n(){return!0}function i(){}function a(){return""}function o(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:a})},{"../../type":162}],170:[function(e,t,r){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":162}],171:[function(e,t,r){"use strict";function n(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})},{"../type":162}],172:[function(e,t,r){"use strict";function n(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function a(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":162}],173:[function(e,t,r){"use strict";function n(e){if(null===e)return!0;var t,r,n,i,a,u=[],l=e;for(t=0,r=l.length;r>t;t+=1){if(n=l[t],a=!1,"[object Object]"!==s.call(n))return!1;for(i in n)if(o.call(n,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(e){return null!==e?e:[]}var a=e("../type"),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i})},{"../type":162}],174:[function(e,t,r){"use strict";function n(e){if(null===e)return!0;var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;r>t;t+=1){if(n=s[t],"[object Object]"!==o.call(n))return!1;if(i=Object.keys(n),1!==i.length)return!1;a[t]=[i[0],n[i[0]]]}return!0}function i(e){if(null===e)return[];var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;r>t;t+=1)n=o[t],i=Object.keys(n),a[t]=[i[0],n[i[0]]];return a}var a=e("../type"),o=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:i})},{"../type":162}],175:[function(e,t,r){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":162}],176:[function(e,t,r){"use strict";function n(e){if(null===e)return!0;var t,r=e;for(t in r)if(o.call(r,t)&&null!==r[t])return!1;return!0}function i(e){return null!==e?e:{}}var a=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:i})},{"../type":162}],177:[function(e,t,r){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":162}],178:[function(e,t,r){"use strict";function n(e){return null===e?!1:null===s.exec(e)?!1:!0}function i(e){var t,r,n,i,a,o,u,l,c,f,h=0,d=null;if(t=s.exec(e),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],u=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(l=+t[10],c=+(t[11]||0),d=6e4*(60*l+c),"-"===t[9]&&(d=-d)),f=new Date(Date.UTC(r,n,i,a,o,u,h)),d&&f.setTime(f.getTime()-d),f}function a(e){return e.toISOString()}var o=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:a})},{"../type":162}],179:[function(e,t,r){!function(r,n){"object"==typeof t&&t.exports&&"function"==typeof e?t.exports=n():"function"==typeof define&&"object"==typeof define.amd?define(n):r.log=n()}(this,function(){function e(e){return typeof console===u?!1:void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):s}function t(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(n){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function r(e,t){return function(){typeof console!==u&&(n(t),o[e].apply(o,arguments))}}function n(e){for(var t=0;tt?s:o.methodFactory(r,e)}}function i(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage.loglevel=t)}catch(r){}try{window.document.cookie="loglevel="+t+";"}catch(r){}}function a(){var e;try{e=window.localStorage.loglevel}catch(t){}if(typeof e===u)try{e=/loglevel=([^;]+)/.exec(window.document.cookie)[1]}catch(t){}void 0===o.levels[e]&&(e="WARN"),o.setLevel(o.levels[e])}var o={},s=function(){},u="undefined",l=["trace","debug","info","warn","error"];o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=function(t,n){return e(t)||r(t,n)},o.setLevel=function(e){if("string"==typeof e&&void 0!==o.levels[e.toUpperCase()]&&(e=o.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;return i(e),n(e),typeof console===u&&e= "+this.values.min),a(t.join(" && "))}}}function y(e){var t=[];if("function"==typeof e)return t.push(a(e.toString()+"(context)")),t;if(Array.isArray(e))return t.push(p(null,e)),t;var r=Object.keys(e);return r.forEach(function(r,n){var i=e[r],a=typeof i;if("string"===a||"number"===a)t.push(l(r,i));else if("boolean"===a)t.push(g(r,i));else if(null==i)t.push(u(r,i));else if(x.indexOf(r)>=0)switch(r){case"not":t.push(f(r,i));break;case"any":t.push(p(r,i));break;case"all":t.push(m(r,i));break;case"none":t.push(h(r,i));break;default:throw new Error("Unhandled WhiteListed property: "+r)}else if(Array.isArray(i))t.push(c(r,i));else{if("object"!==a||null==i)throw new Error("Unknown Query sytnax: "+i);(i.max||i.min)&&t.push(v(r,i))}}),0===r.length?["true"]:t}function _(e){return a(e.join(" && "))}function b(e){return null==e?function(){return!0}:new Function("context","return "+_(y(e))+";")}var x=["not","any","all","none"];t.exports={match:b,filterToString:_,parseFilter:y}},{}],181:[function(e,t,r){"use strict";function n(e){var t;e&&e.length&&(t=e,e=t.length);var r=new Uint8Array(e||0);return t&&r.set(t),r.readUInt32LE=a.readUInt32LE,r.writeUInt32LE=a.writeUInt32LE,r.readInt32LE=a.readInt32LE,r.writeInt32LE=a.writeInt32LE,r.readFloatLE=a.readFloatLE,r.writeFloatLE=a.writeFloatLE,r.readDoubleLE=a.readDoubleLE,r.writeDoubleLE=a.writeDoubleLE,r.toString=a.toString,r.write=a.write,r.slice=a.slice,r.copy=a.copy,r._isBuffer=!0,r}function i(e){for(var t,r,n=e.length,i=[],a=0;n>a;a++){if(t=e.charCodeAt(a),t>55295&&57344>t){if(!r){t>56319||a+1===n?i.push(239,191,189):r=t;continue}if(56320>t){i.push(239,191,189),r=t;continue}t=r-55296<<10|t-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);128>t?i.push(t):2048>t?i.push(t>>6|192,63&t|128):65536>t?i.push(t>>12|224,t>>6&63|128,63&t|128):i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}return i}t.exports=n;var a,o,s,u=e("ieee754");a={readUInt32LE:function(e){return(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},writeUInt32LE:function(e,t){this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24},readInt32LE:function(e){return(this[e]|this[e+1]<<8|this[e+2]<<16)+(this[e+3]<<24)},readFloatLE:function(e){return u.read(this,e,!0,23,4)},readDoubleLE:function(e){return u.read(this,e,!0,52,8)},writeFloatLE:function(e,t){return u.write(this,e,t,!0,23,4)},writeDoubleLE:function(e,t){return u.write(this,e,t,!0,52,8)},toString:function(e,t,r){var n="",i="";t=t||0,r=Math.min(this.length,r||this.length);for(var a=t;r>a;a++){var o=this[a];127>=o?(n+=decodeURIComponent(i)+String.fromCharCode(o),i=""):i+="%"+o.toString(16)}return n+=decodeURIComponent(i)},write:function(e,t){for(var r=e===o?s:i(e),n=0;n>3,a=this.pos;e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=this.buf.readUInt32LE(this.pos);return this.pos+=4,e},readSFixed32:function(){var e=this.buf.readInt32LE(this.pos);return this.pos+=4,e},readFixed64:function(){var e=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*p;return this.pos+=8,e},readSFixed64:function(){var e=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*p;return this.pos+=8,e},readFloat:function(){var e=this.buf.readFloatLE(this.pos);return this.pos+=4,e},readDouble:function(){var e=this.buf.readDoubleLE(this.pos);return this.pos+=8,e},readVarint:function(){var e,t,r,n,i,a,o=this.buf;if(r=o[this.pos++],128>r)return r;if(r=127&r,n=o[this.pos++],128>n)return r|n<<7;if(n=(127&n)<<7,i=o[this.pos++],128>i)return r|n|i<<14;if(i=(127&i)<<14,a=o[this.pos++],128>a)return r|n|i|a<<21;if(e=r|n|i|(127&a)<<21,t=o[this.pos++],e+=268435456*(127&t),128>t)return e;if(t=o[this.pos++],e+=34359738368*(127&t),128>t)return e;if(t=o[this.pos++],e+=4398046511104*(127&t),128>t)return e;if(t=o[this.pos++],e+=562949953421312*(127&t),128>t)return e;if(t=o[this.pos++],e+=72057594037927940*(127&t),128>t)return e;if(t=o[this.pos++],e+=0x8000000000000000*(127&t),128>t)return e;throw new Error("Expected varint not more than 10 bytes")},readVarint64:function(){var e=this.pos,t=this.readVarint();if(g>t)return t;for(var r=this.pos-2;255===this.buf[r];)r--;e>r&&(r=e),t=0;for(var n=0;r-e+1>n;n++){var i=127&~this.buf[e+n];t+=4>n?i<<7*n:i*Math.pow(2,7*n)}return-t-1},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.buf.toString("utf8",this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.slice(this.pos,e);return this.pos=e,t},readPackedVarint:function(){for(var e=this.readVarint()+this.pos,t=[];this.pos127;);else if(t===n.Bytes)this.pos=this.readVarint()+this.pos;else if(t===n.Fixed32)this.pos+=4;else{if(t!==n.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t=e)this.realloc(1),this.buf[this.pos++]=e;else if(16383>=e)this.realloc(2),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127;else if(2097151>=e)this.realloc(3),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127|128,this.buf[this.pos++]=e>>>14&127;else if(268435455>=e)this.realloc(4),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127|128,this.buf[this.pos++]=e>>>14&127|128,this.buf[this.pos++]=e>>>21&127;else{for(var t=this.pos;e>=128;)this.realloc(1),this.buf[this.pos++]=255&e|128,e/=128;if(this.realloc(1),this.buf[this.pos++]=0|e,this.pos-t>10)throw new Error("Given varint doesn't fit into 10 bytes")}},writeSVarint:function(e){this.writeVarint(0>e?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e);var t=d.byteLength(e);this.writeVarint(t),this.realloc(t),this.buf.write(e,this.pos),this.pos+=t},writeFloat:function(e){this.realloc(4),this.buf.writeFloatLE(e,this.pos),this.pos+=4},writeDouble:function(e){this.realloc(8),this.buf.writeDoubleLE(e,this.pos),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;t>r;r++)this.buf[this.pos++]=e[r]},writeMessage:function(e,t,r){this.writeTag(e,n.Bytes),this.pos++;var i=this.pos;t(r,this);var a=this.pos-i,o=127>=a?1:16383>=a?2:2097151>=a?3:268435455>=a?4:Math.ceil(Math.log(a)/(7*Math.LN2));if(o>1){this.realloc(o-1);for(var s=this.pos-1;s>=i;s--)this.buf[s+o-1]=this.buf[s]}this.pos=i-1,this.writeVarint(a),this.pos+=a},writePackedVarint:function(e,t){this.writeMessage(e,i,t)},writePackedSVarint:function(e,t){this.writeMessage(e,a,t)},writePackedBoolean:function(e,t){this.writeMessage(e,u,t)},writePackedFloat:function(e,t){this.writeMessage(e,o,t)},writePackedDouble:function(e,t){this.writeMessage(e,s,t)},writePackedFixed32:function(e,t){this.writeMessage(e,l,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,c,t)},writePackedFixed64:function(e,t){this.writeMessage(e,f,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,h,t)},writeBytesField:function(e,t){this.writeTag(e,n.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,n.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,n.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,n.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,n.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,n.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,n.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,n.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,n.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,n.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":181}],183:[function(e,t,r){"use strict";function n(e,t){this.x=e,this.y=t}t.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(e){return e instanceof n?e:Array.isArray(e)?new n(e[0],e[1]):e}},{}],184:[function(e,t,r){function n(){}var i=t.exports={};i.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var n=[];if(t){var i=document.createElement("div"),a=new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})});return a.observe(i,{attributes:!0}),function(e){n.length||i.setAttribute("yes","no"),n.push(e)}}return r?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),i.title="browser",i.browser=!0,i.env={},i.argv=[],i.on=n,i.addListener=n,i.once=n,i.off=n,i.removeListener=n,i.removeAllListeners=n,i.emit=n,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],185:[function(e,t,r){"use strict";function n(e,t){return e?n.block(n.line(e,t),t):""}var i=/\/\*(?!\/)(.|[\r\n]|\n)+?\*\/\n?\n?/gm,a=/\/\*(?!(\*?\/|\*?\!))(.|[\r\n]|\n)+?\*\/\n?\n?/gm,o=/(^|[^\S\n])(?:\/\/)([\s\S]+?)$/gm,s=/(^|[^\S\n])(?:\/\/[^!])([\s\S]+?)$/gm;n.block=function(e,t){t=t||{};var r=i;return t.safe&&(r=a),e?e.replace(r,""):""},n.line=function(e,t){t=t||{};var r=o;return t.safe&&(r=s),e?e.replace(r,""):""},t.exports=n},{}],186:[function(e,t,r){!function(){function e(e,t){function r(t){var r,n=e.arcs[0>t?~t:t],i=n[0];return e.transform?(r=[0,0],n.forEach(function(e){r[0]+=e[0],r[1]+=e[1]})):r=n[n.length-1],0>t?[r,i]:[i,r]}function n(e,t){for(var r in e){var n=e[r];delete t[n.start],delete n.start,delete n.end,n.forEach(function(e){i[0>e?~e:e]=1}),s.push(n)}}var i={},a={},o={},s=[],u=-1;return t.forEach(function(r,n){var i,a=e.arcs[0>r?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++u],t[u]=r,t[n]=i)}),t.forEach(function(e){ -var t,n,i=r(e),s=i[0],u=i[1];if(t=o[s])if(delete o[t.end],t.push(e),t.end=u,n=a[u]){delete a[n.start];var l=n===t?t:t.concat(n);a[l.start=t.start]=o[l.end=n.end]=l}else a[t.start]=o[t.end]=t;else if(t=a[u])if(delete a[t.start],t.unshift(e),t.start=s,n=o[s]){delete o[n.end];var c=n===t?t:n.concat(t);a[c.start=n.start]=o[c.end=t.end]=c}else a[t.start]=o[t.end]=t;else t=[e],a[t.start=s]=o[t.end=u]=t}),n(o,a),n(a,o),t.forEach(function(e){i[0>e?~e:e]||s.push([e])}),s}function r(t,r,n){function i(e){var t=0>e?~e:e;(c[t]||(c[t]=[])).push({i:e,g:l})}function a(e){e.forEach(i)}function o(e){e.forEach(a)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in f&&(l=e,f[e.type](e.arcs))}var u=[];if(arguments.length>1){var l,c=[],f={LineString:a,MultiLineString:o,Polygon:o,MultiPolygon:function(e){e.forEach(o)}};s(r),c.forEach(arguments.length<3?function(e){u.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&u.push(e[0].i)})}else for(var h=0,d=t.arcs.length;d>h;++h)u.push(h);return{type:"MultiLineString",arcs:e(t,u)}}function i(t,r){function i(e){e.forEach(function(t){t.forEach(function(t){(o[t=0>t?~t:t]||(o[t]=[])).push(e)})}),u.push(e)}function a(e){return h(s(t,{type:"Polygon",arcs:[e]}).coordinates[0])>0}var o={},u=[],l=[];return r.forEach(function(e){"Polygon"===e.type?i(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(i)}),u.forEach(function(e){if(!e._){var t=[],r=[e];for(e._=1,l.push(t);e=r.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){o[0>e?~e:e].forEach(function(e){e._||(e._=1,r.push(e))})})})}}),u.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:l.map(function(r){var i=[];if(r.forEach(function(e){e.forEach(function(e){e.forEach(function(e){o[0>e?~e:e].length<2&&i.push(e)})})}),i=e(t,i),(n=i.length)>1)for(var s,u=a(r[0][0]),l=0;le?~e:e],i=0,a=n.length;a>i;++i)t.push(r=n[i].slice()),l(r,i);0>e&&u(t,a)}function n(e){return e=e.slice(),l(e,0),e}function i(e){for(var t=[],n=0,i=e.length;i>n;++n)r(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function a(e){for(var t=i(e);t.length<4;)t.push(t[0].slice());return t}function o(e){return e.map(a)}function s(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(s)}:t in f?{type:t,coordinates:f[t](e)}:null}var l=g(e.transform),c=e.arcs,f={Point:function(e){return n(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(n)},LineString:function(e){return i(e.arcs)},MultiLineString:function(e){return e.arcs.map(i)},Polygon:function(e){return o(e.arcs)},MultiPolygon:function(e){return e.arcs.map(o)}};return s(t)}function u(e,t){for(var r,n=e.length,i=n-t;i<--n;)r=e[i],e[i++]=e[n],e[n]=r}function l(e,t){for(var r=0,n=e.length;n>r;){var i=r+n>>>1;e[i]e&&(e=~e);var r=i[e];r?r.push(t):i[e]=[t]})}function r(e,r){e.forEach(function(e){t(e,r)})}function n(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){n(e,t)}):e.type in o&&o[e.type](e.arcs,t)}var i={},a=e.map(function(){return[]}),o={LineString:t,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach(function(e){r(e,t)})}};e.forEach(n);for(var s in i)for(var u=i[s],c=u.length,f=0;c>f;++f)for(var h=f+1;c>h;++h){var d,p=u[f],m=u[h];(d=a[p])[s=l(d,m)]!==m&&d.splice(s,0,m),(d=a[m])[s=l(d,p)]!==p&&d.splice(s,0,p)}return a}function f(e,t){function r(e){a.remove(e),e[1][2]=t(e),a.push(e)}var n=g(e.transform),i=v(e.transform),a=m();return t||(t=d),e.arcs.forEach(function(e){for(var o,s,u=[],l=0,c=0,f=e.length;f>c;++c)s=e[c],n(e[c]=[s[0],s[1],1/0],c);for(var c=1,f=e.length-1;f>c;++c)o=e.slice(c-1,c+2),o[1][2]=t(o),u.push(o),a.push(o);for(var c=0,f=u.length;f>c;++c)o=u[c],o.previous=u[c-1],o.next=u[c+1];for(;o=a.pop();){var h=o.previous,d=o.next;o[1][2]0;){var r=(t+1>>1)-1,i=n[r];if(p(e,i)>=0)break;n[i._=t]=i,n[e._=t=r]=e}}function t(e,t){for(;;){var r=t+1<<1,a=r-1,o=t,s=n[o];if(i>a&&p(n[a],s)<0&&(s=n[o=a]),i>r&&p(n[r],s)<0&&(s=n[o=r]),o===t)break;n[s._=t]=s,n[e._=t=o]=e}}var r={},n=[],i=0;return r.push=function(t){return e(n[t._=i]=t,i++),i},r.pop=function(){if(!(0>=i)){var e,r=n[0];return--i>0&&(e=n[i],t(n[e._=0]=e,0)),r}},r.remove=function(r){var a,o=r._;if(n[o]===r)return o!==--i&&(a=n[i],(p(a,r)<0?e:t)(n[a._=o]=a,o)),o},r}function g(e){if(!e)return y;var t,r,n=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=r=0),e[0]=(t+=e[0])*n+a,e[1]=(r+=e[1])*i+o}}function v(e){if(!e)return y;var t,r,n=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=r=0);var u=(e[0]-a)/n|0,l=(e[1]-o)/i|0;e[0]=u-t,e[1]=l-r,t=u,r=l}}function y(){}var _={version:"1.6.19",mesh:function(e){return s(e,r.apply(this,arguments))},meshArcs:r,merge:function(e){return s(e,i.apply(this,arguments))},mergeArcs:i,feature:a,neighbors:c,presimplify:f};"function"==typeof define&&define.amd?define(_):"object"==typeof t&&t.exports?t.exports=_:this.topojson=_}()},{}],187:[function(e,t,r){(function(t,n){"use strict";function i(e){if(e){var t=e.length||e.byteLength,r=y.log2(t);A[r].push(e)}}function a(e){i(e.buffer)}function o(e){var e=y.nextPow2(e),t=y.log2(e),r=A[t];return r.length>0?r.pop():new ArrayBuffer(e)}function s(e){return new Uint8Array(o(e),0,e)}function u(e){return new Uint16Array(o(2*e),0,e)}function l(e){return new Uint32Array(o(4*e),0,e)}function c(e){return new Int8Array(o(e),0,e)}function f(e){return new Int16Array(o(2*e),0,e)}function h(e){return new Int32Array(o(4*e),0,e)}function d(e){return new Float32Array(o(4*e),0,e)}function p(e){return new Float64Array(o(8*e),0,e)}function m(e){return b?new Uint8ClampedArray(o(e),0,e):s(e)}function g(e){return new DataView(o(e),0,e)}function v(e){e=y.nextPow2(e);var t=y.log2(e),r=w[t];return r.length>0?r.pop():new n(e)}var y=e("bit-twiddle"),_=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:_([32,0]),UINT16:_([32,0]),UINT32:_([32,0]),INT8:_([32,0]),INT16:_([32,0]),INT32:_([32,0]),FLOAT:_([32,0]),DOUBLE:_([32,0]),DATA:_([32,0]),UINT8C:_([32,0]),BUFFER:_([32,0])});var b="undefined"!=typeof Uint8ClampedArray,x=t.__TYPEDARRAY_POOL;x.UINT8C||(x.UINT8C=_([32,0])),x.BUFFER||(x.BUFFER=_([32,0]));var A=x.DATA,w=x.BUFFER;r.free=function(e){if(n.isBuffer(e))w[y.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|y.log2(t);A[r].push(e)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(e){w[y.log2(e.length)].push(e)},r.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return o(e);switch(t){case"uint8":return s(e);case"uint16":return u(e);case"uint32":return l(e);case"int8":return c(e);case"int16":return f(e);case"int32":return h(e);case"float":case"float32":return d(e);case"double":case"float64":return p(e);case"uint8_clamped":return m(e);case"buffer":return v(e);case"data":case"dataview":return g(e);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=u,r.mallocUint32=l,r.mallocInt8=c,r.mallocInt16=f,r.mallocInt32=h,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var e=0;32>e;++e)x.UINT8[e].length=0,x.UINT16[e].length=0,x.UINT32[e].length=0,x.INT8[e].length=0,x.INT16[e].length=0,x.INT32[e].length=0,x.FLOAT[e].length=0,x.DOUBLE[e].length=0,x.UINT8C[e].length=0,A[e].length=0,w[e].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":29,buffer:38,dup:134}],188:[function(e,t,r){t.exports.VectorTile=e("./lib/vectortile.js"),t.exports.VectorTileFeature=e("./lib/vectortilefeature.js"),t.exports.VectorTileLayer=e("./lib/vectortilelayer.js")},{"./lib/vectortile.js":189,"./lib/vectortilefeature.js":190,"./lib/vectortilelayer.js":191}],189:[function(e,t,r){"use strict";function n(e,t){this.layers=e.readFields(i,{},t)}function i(e,t,r){if(3===e){var n=new a(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var a=e("./vectortilelayer");t.exports=n},{"./vectortilelayer":191}],190:[function(e,t,r){"use strict";function n(e,t,r,n,a){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=a,e.readFields(i,this,t)}function i(e,t,r){1==e?t._id=r.readVarint():2==e?a(r,t):3==e?t.type=r.readVarint():4==e&&(t._geometry=r.pos)}function a(e,t){for(var r=e.readVarint()+e.pos;e.pos>3}if(i--,1===n||2===n)a+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&u.push(t),t=[]),t.push(new o(a,s));else{if(7!==n)throw new Error("unknown command "+n);t.push(t[0].clone())}}return t&&u.push(t),u},n.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-(1/0),u=1/0,l=-(1/0);e.pos>3}if(n--,1===r||2===r)i+=e.readSVarint(),a+=e.readSVarint(),o>i&&(o=i),i>s&&(s=i),u>a&&(u=a),a>l&&(l=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,u,s,l]},n.prototype.toGeoJSON=function(e,t,r){for(var i=this.extent*Math.pow(2,r),a=this.extent*e,o=this.extent*t,s=this.loadGeometry(),u=n.types[this.type],l=0;l>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}var o=e("./vectortilefeature.js");t.exports=n,n.prototype.feature=function(e){if(0>e||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,t,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":190}],192:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/get")["default"],o=e("babel-runtime/helpers/inherits")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("./geo"),l=s(u),c=e("./utils/utils"),f=s(c),h=e("./gl/shader_program"),d=s(h),p=e("gl-matrix"),m=s(p),g=m["default"].mat4,v=m["default"].vec3,y=function(){function e(t,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,e),this.scene=r,this.position=n.position,this.zoom=n.zoom}return n(e,[{key:"update",value:function(){}},{key:"setupProgram",value:function(e){}},{key:"updateScene",value:function(){if(this.position||this.zoom){var e={};this.position&&(e={lng:this.position[0],lat:this.position[1],zoom:this.position[2]}),this.zoom&&(e.zoom=this.zoom),this.scene.setView(e)}}}],[{key:"create",value:function(e,t,r){switch(r.type){case"isometric":return new b(e,t,r);case"flat":return new x(e,t,r);case"perspective":default:return new _(e,t,r)}}}]),e}();r["default"]=y;var _=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="perspective",this.focal_length=n.focal_length,this.fov=n.fov,this.focal_length||this.fov||(this.focal_length=[[16,2],[17,2.5],[18,3],[19,4],[20,6]]),this.vanishing_point=n.vanishing_point||[0,0],this.vanishing_point=this.vanishing_point.map(parseFloat),this.vanishing_point_skew=[],this.position_meters=null,this.viewMatrix=new Float64Array(16),this.projectionMatrix=new Float32Array(16),d["default"].replaceBlock("camera","\n uniform mat4 u_projection;\n uniform vec3 u_eye;\n uniform vec2 u_vanishing_point;\n\n void cameraProjection (inout vec4 position) {\n position = u_projection * position;\n }")}return o(t,e),n(t,[{key:"constrainCamera",value:function(e){var t=e.view_height,r=e.height,n=e.focal_length,i=e.fov;return r?(n=2*r/t,i=2*Math.atan(1/n)):(n?i=2*Math.atan(1/n):i&&(i=i*Math.PI/180,n=1/Math.tan(i/2)),r=t/2*n),{view_height:t,height:r,focal_length:n,fov:i}}},{key:"updateMatrices",value:function(){var e=this.scene.css_size.height*l["default"].metersPerPixel(this.scene.zoom),t=this.constrainCamera({view_height:e,focal_length:f["default"].interpolate(this.scene.zoom,this.focal_length),fov:f["default"].interpolate(this.scene.zoom,this.fov)}),r=t.height,n=t.fov,i=[this.scene.center_meters.x,this.scene.center_meters.y,r];this.position_meters=i,g.lookAt(this.viewMatrix,v.fromValues(i[0],i[1],0),v.fromValues(i[0],i[1],-1),v.fromValues(0,1,0)),g.perspective(this.projectionMatrix,n,this.scene.view_aspect,1,2*r),this.vanishing_point_skew[0]=this.vanishing_point[0]/this.scene.css_size.width,this.vanishing_point_skew[1]=this.vanishing_point[1]/this.scene.css_size.height,this.projectionMatrix[8]=-this.vanishing_point_skew[0],this.projectionMatrix[9]=-this.vanishing_point_skew[1],g.translate(this.projectionMatrix,this.projectionMatrix,v.fromValues(e/2*this.scene.view_aspect*-this.vanishing_point_skew[0],e/2*-this.vanishing_point_skew[1],0)),g.translate(this.projectionMatrix,this.projectionMatrix,v.fromValues(0,0,-r))}},{key:"update",value:function(){a(Object.getPrototypeOf(t.prototype),"update",this).call(this),this.updateMatrices()}},{key:"setupProgram",value:function(e){e.uniform("Matrix4fv","u_projection",!1,this.projectionMatrix),e.uniform("3f","u_eye",0,0,this.position_meters[2]),e.uniform("2fv","u_vanishing_point",this.vanishing_point_skew)}}]),t}(y),b=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="isometric",this.axis=n.axis||{x:0,y:1},2===this.axis.length&&(this.axis={x:this.axis[0],y:this.axis[1]}),this.position_meters=null,this.viewport_height=null,this.viewMatrix=new Float64Array(16),this.projectionMatrix=new Float32Array(16),d["default"].replaceBlock("camera","\n uniform mat4 u_projection;\n uniform vec3 u_eye;\n uniform vec2 u_vanishing_point;\n\n void cameraProjection (inout vec4 position) {\n position = u_projection * position;\n // position.xy += position.z * u_isometric_axis;\n\n // Reverse z for depth buffer so up is negative,\n // and scale down values so objects higher than one screen height will not get clipped\n // pull forward slightly to avoid going past far clipping plane\n position.z = -position.z / 100. + 1. - 0.001;\n }")}return o(t,e),n(t,[{key:"update",value:function(){a(Object.getPrototypeOf(t.prototype),"update",this).call(this),this.viewport_height=this.scene.css_size.height*l["default"].metersPerPixel(this.scene.zoom);var e=[this.scene.center_meters.x,this.scene.center_meters.y,this.viewport_height];this.position_meters=e,g.identity(this.viewMatrix),g.translate(this.viewMatrix,this.viewMatrix,v.fromValues(-e[0],-e[1],0)),g.identity(this.projectionMatrix),this.projectionMatrix[8]=this.axis.x/this.scene.view_aspect,this.projectionMatrix[9]=this.axis.y,g.scale(this.projectionMatrix,this.projectionMatrix,v.fromValues(2/this.scene.viewport_meters.x,2/this.scene.viewport_meters.y,2/this.scene.viewport_meters.y))}},{key:"setupProgram",value:function(e){e.uniform("Matrix4fv","u_projection",!1,this.projectionMatrix),e.uniform("3f","u_eye",0,0,this.viewport_height),e.uniform("2f","u_vanishing_point",0,0)}}]),t}(y),x=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="flat"}return o(t,e),n(t,[{key:"update",value:function(){this.axis.x=0,this.axis.y=0,a(Object.getPrototypeOf(t.prototype),"update",this).call(this)}}]),t}(b);t.exports=r["default"]},{"./geo":193,"./gl/shader_program":199,"./utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":143}],193:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/sliced-to-array")["default"],i=e("babel-runtime/core-js/get-iterator")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a;r["default"]=a={},a.default_max_zoom=18,a.tile_size=256,a.half_circumference_meters=20037508.342789244,a.circumference_meters=2*a.half_circumference_meters,a.min_zoom_meters_per_pixel=a.circumference_meters/a.tile_size;var o=[];a.metersPerPixel=function(e){return o[e]=o[e]||a.min_zoom_meters_per_pixel/Math.pow(2,e),o[e]};var s=[];a.metersPerTile=function(e){return s[e]=s[e]||a.circumference_meters/Math.pow(2,e),s[e]},a.tile_scale=4096,a.units_per_pixel=a.tile_scale/a.tile_size;var u=[];a.unitsPerMeter=function(e){return u[e]=u[e]||a.tile_scale/(a.tile_size*a.metersPerPixel(e)),u[e]},a.metersForTile=function(e){return{x:e.x*a.circumference_meters/Math.pow(2,e.z)-a.half_circumference_meters,y:-(e.y*a.circumference_meters/Math.pow(2,e.z)-a.half_circumference_meters)}},a.tileForMeters=function(e,t){var r=n(e,2),i=r[0],o=r[1];return{x:Math.floor((i+a.half_circumference_meters)/(a.circumference_meters/Math.pow(2,t))),y:Math.floor((-o+a.half_circumference_meters)/(a.circumference_meters/Math.pow(2,t))),z:t}},a.wrapTile=function(e){var t=e.x,r=e.y,n=e.z,i=arguments.length<=1||void 0===arguments[1]?{x:!0,y:!1}:arguments[1],a=(1<180||-180>e)&&(e=((e+180)%360+360)%360-180),e},a.transformGeometry=function(e,t){null!=e&&("Point"===e.type?t(e.coordinates):"LineString"===e.type||"MultiPoint"===e.type?e.coordinates.forEach(t):"Polygon"===e.type||"MultiLineString"===e.type?e.coordinates.forEach(function(e){return e.forEach(t)}):"MultiPolygon"===e.type&&e.coordinates.forEach(function(e){e.forEach(function(e){return e.forEach(t)})}))},a.boxIntersect=function(e,t){return!(t.sw.x>e.ne.x||t.ne.xe.ne.y||t.ne.yo;o++){var s=e[0][o];s[0]r&&(r=s[0]),s[1]>i&&(i=s[1])}return[t,n,r,i]},a.geometryType=function(e){return"Polygon"===e||"MultiPolygon"===e?"polygon":"LineString"===e||"MultiLineString"===e?"line":"Point"===e||"MultiPoint"===e?"point":void 0},a.centroid=function(e){for(var t=e.length,r=[0,0],n=0;nn;n++){var i=e[n],a=e[n+1];t+=i[0]*a[1]-a[0]*i[1]}return t+=e[r-1][0]*e[0][1]-e[0][0]*e[r-1][1]},a.polygonArea=function(e){return Math.abs(a.signedPolygonAreaSum(e))/2},a.multiPolygonArea=function(e){for(var t=0,r=0;r0?"CW":"CCW"},a.enforceWinding=function(e,t){var r=void 0;if("Polygon"===e.type)r=[e.coordinates];else{if("MultiPolygon"!==e.type)return e;r=e.coordinates}for(var n=0;n=2&&u.length<=4?r.push({type:"vec"+u.length,method:u.length+"fv",name:a,value:u,key:s,uniforms:e}):u.length>4&&r.push({type:"float[]",method:"1fv",name:a+"[0]",value:u,key:s,uniforms:e});else if("string"==typeof u[0])for(o=0;o=2&&u[0].length<=4)for(o=0;o=2&&t.length<=4?r="vec"+t.length:(r="float",n=t.length):"string"==typeof t[0]?(r="sampler2D",n=t.length):Array.isArray(t[0])&&"number"==typeof t[0][0]?(t[0].length>=2&&t[0].length<=4&&(r="vec"+t[0].length),n=t[0].length):"object"==typeof t[0]&&(r="_type_"+a,n=t.length,o+=i.defineStruct(r,t[0],a)+"\n"):"boolean"==typeof t?r="bool":"string"==typeof t?r="sampler2D":"object"==typeof t&&(r="_type_"+a,o+=i.defineStruct(r,t,a)+"\n");var s="";return s+=r+" "+e,n&&(s+="["+n+"]"),s+=";\n",{variable:s,structs:o}},i.defineStruct=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],n="struct "+e+" {\n",a="";for(var o in t){var s=i.defineVariable(o,t[o],r);n+=" "+s.variable,a+=s.structs}return n+="};\n",n=a+n},i.defineUniform=function(e,t){var r=i.defineVariable(e,t);return r=r.structs+"uniform "+r.variable},i.isUniformDefined=function(e,t){var r=new RegExp("uniform[^;]+(?:{[\\s\\S]*})?[^;]*\\b"+e+"\\b","g");return t.match(r)?!0:!1},i.isSymbolReferenced=function(e,t){var r=new RegExp("\\b"+e+"\\b","g");return t.search(r)>=0?!0:!1},i.expandVec3=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=void 0;return r=Array.isArray(e)&&2===e.length?[].concat(n(e),[t]).map(parseFloat):[e,e,e].map(parseFloat),r&&r.every(function(e){return"number"==typeof e&&!isNaN(e)})?r:void 0},i.expandVec4=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=void 0;return r=Array.isArray(e)&&3===e.length?[].concat(n(e),[t]).map(parseFloat):[e,e,e,t].map(parseFloat),r&&r.every(function(e){return"number"==typeof e&&!isNaN(e)})?r:void 0},t.exports=r["default"]},{"babel-runtime/helpers/to-consumable-array":25}],198:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(t,r){i(this,e),r(t),this.value=t,this.setup=r}return n(e,[{key:"set",value:function(e){JSON.stringify(this.value)!==JSON.stringify(e)&&(this.setup(e),this.value=e)}}],[{key:"initialize",value:function(t){e.culling=new e({cull:!0,face:t.BACK},function(e){e.cull?(t.enable(t.CULL_FACE),t.cullFace(e.face)):t.disable(t.CULL_FACE)}),e.blending=new e({blend:!1,src:t.SRC_ALPHA,dst:t.ONE_MINUS_SRC_ALPHA,src_alpha:t.ONE,dst_alpha:t.ONE_MINUS_SRC_ALPHA},function(e){e.blend?(t.enable(t.BLEND),e.src_alpha&&e.dst_alpha?t.blendFuncSeparate(e.src,e.dst,e.src_alpha,e.dst_alpha):t.blendFunc(e.src,e.dst)):t.disable(t.BLEND)}),e.depth_write=new e({depth_write:!0},function(e){t.depthMask(e.depth_write)}),e.depth_test=new e({depth_test:!0,depth_func:t.LEQUAL},function(e){e.depth_test?(t.enable(t.DEPTH_TEST),t.depthFunc(e.depth_func)):t.disable(t.DEPTH_TEST)})}}]),e}();r["default"]=a,t.exports=r["default"]},{"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19}],199:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/to-consumable-array")["default"],o=e("babel-runtime/core-js/object/assign")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./glsl"),c=u(l),f=e("./texture"),h=u(f),d=e("./extensions"),p=u(d),m=e("loglevel"),g=u(m),v=e("strip-comments"),y=u(v),_=e("gl-shader-errors"),b=u(_),x=function(){function e(t,r,n,a){i(this,e),a=a||{},this.gl=t,this.program=null,this.compiled=!1,this.compiling=!1,this.error=null,this.defines=o({},a.defines||{}),this.blocks=o({},a.blocks||{}),this.block_scopes=o({},a.block_scopes||{}),this.extensions=a.extensions||[],this.dependent_uniforms=a.uniforms,this.uniforms={},this.attribs={},this.vertex_source=r,this.fragment_source=n,this.id=e.id++,e.programs[this.id]=this,this.name=a.name}return n(e,[{key:"destroy",value:function(){this.gl.useProgram(null),this.gl.deleteProgram(this.program),this.program=null,this.uniforms={},this.attribs={},delete e.programs[this.id],this.compiled=!1}},{key:"use",value:function(){this.compiled&&(e.current!==this&&this.gl.useProgram(this.program),e.current=this)}},{key:"compile",value:function(){if(this.compiling)throw new Error("ShaderProgram.compile(): skipping for "+this.id+" ("+this.name+") because already compiling");this.compiling=!0,this.compiled=!1,this.error=null,this.computed_vertex_source=this.vertex_source,this.computed_fragment_source=this.fragment_source;var t,r=this.checkExtensions(),n=this.buildDefineList(),i=this.buildShaderBlockList();for(var a in i){var o=i[a];if(o&&(!Array.isArray(o)||0!==o.length)){t=new RegExp("^\\s*#pragma\\s+tangram:\\s+"+a+"\\s*$","m");var u=this.computed_vertex_source.match(t),l=this.computed_fragment_source.match(t);if(null!=u||null!=l){var c="";o.forEach(function(e){var t=e.scope+", "+e.key+", "+e.num;c+="\n// tangram-block-start: "+t+"\n",c+=e.source,c+="\n// tangram-block-end: "+t+"\n"}),null!=u&&(this.computed_vertex_source=this.computed_vertex_source.replace(t,c)),null!=l&&(this.computed_fragment_source=this.computed_fragment_source.replace(t,c)),n["TANGRAM_BLOCK_"+a.replace(/[\s-]+/g,"_").toUpperCase()]=!0}}}t=new RegExp("^\\s*#pragma.*$","gm"),this.computed_vertex_source=this.computed_vertex_source.replace(t,""),this.computed_fragment_source=this.computed_fragment_source.replace(t,""),this.ensureUniforms(this.dependent_uniforms);var f=this.name?this.name+" / id "+this.id:"id "+this.id,h="// Program: "+f+"\n",d="#ifdef GL_ES\nprecision highp float;\n#endif\n\n";n.TANGRAM_VERTEX_SHADER=!0,n.TANGRAM_FRAGMENT_SHADER=!1,this.computed_vertex_source=h+e.buildDefineString(n)+this.computed_vertex_source,n.TANGRAM_VERTEX_SHADER=!1,n.TANGRAM_FRAGMENT_SHADER=!0,this.computed_fragment_source=e.buildExtensionString(r)+h+d+e.buildDefineString(n)+this.computed_fragment_source;try{this.program=e.updateProgram(this.gl,this.program,this.computed_vertex_source,this.computed_fragment_source),this.compiled=!0,this.compiling=!1}catch(p){if(this.program=null,this.compiled=!1,this.compiling=!1,this.error=p,"vertex"===p.type||"fragment"===p.type){this.shader_errors=p.errors;var m=!0,g=!1,v=void 0;try{for(var y,_=s(this.shader_errors);!(m=(y=_.next()).done);m=!0){var b=y.value;b.type=p.type,b.block=this.block(p.type,b.line)}}catch(x){g=!0,v=x}finally{try{!m&&_["return"]&&_["return"]()}finally{if(g)throw v}}}throw new Error("ShaderProgram.compile(): program "+this.id+" ("+this.name+") error:",p)}this.use(),this.refreshUniforms(),this.refreshAttributes()}},{key:"buildDefineList",value:function(){var t,r={};for(t in e.defines)r[t]=e.defines[t];for(t in this.defines)r[t]=this.defines[t];return r}},{key:"buildShaderBlockList",value:function(){var t=void 0,r={};for(t in e.blocks)if(r[t]=[],Array.isArray(e.blocks[t])){var n;(n=r[t]).push.apply(n,a(e.blocks[t].map(function(e,r){ -return{key:t,source:e,num:r,scope:"ShaderProgram"}})))}else r[t]=[{key:t,source:e.blocks[t],num:0,scope:"ShaderProgram"}];for(t in this.blocks)if(r[t]=r[t]||[],Array.isArray(this.blocks[t]))for(var i=this.block_scopes&&this.block_scopes[t]||[],o=null,s=0,u=0;u0&&(this.computed_vertex_source=i.join("\n")+this.computed_vertex_source),a.length>0&&(this.computed_fragment_source=a.join("\n")+this.computed_fragment_source)}}},{key:"setUniforms",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];if(this.compiled){t&&(this.texture_unit=0);var r=c["default"].parseUniforms(e),n=!0,i=!1,a=void 0;try{for(var o,u=s(r);!(n=(o=u.next()).done);n=!0){var l=o.value;"sampler2D"===l.type?this.setTextureUniform(l.name,l.value):this.uniform(l.method,l.name,l.value)}}catch(f){i=!0,a=f}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}}}},{key:"saveUniforms",value:function(e){var t=e||this.uniforms;for(var r in t){var n=this.uniforms[r];n&&(n.saved_value=n.value)}this.saved_texture_unit=this.texture_unit||0}},{key:"restoreUniforms",value:function(e){var t=e||this.uniforms;for(var r in t){var n=this.uniforms[r];n&&n.saved_value&&(n.value=n.saved_value,this.updateUniform(r))}this.texture_unit=this.saved_texture_unit||0}},{key:"setTextureUniform",value:function(e,t){var r=h["default"].textures[t];null==r&&(r=h["default"].create(this.gl,t,{url:t})),r.bind(this.texture_unit),this.uniform("1i",e,this.texture_unit),this.texture_unit++}},{key:"uniform",value:function t(e,r){if(this.compiled){this.uniforms[r]=this.uniforms[r]||{};var t=this.uniforms[r];t.name=r,void 0===t.location&&(t.location=this.gl.getUniformLocation(this.program,r)),t.method="uniform"+e;for(var n=arguments.length,i=Array(n>2?n-2:0),a=2;n>a;a++)i[a-2]=arguments[a];t.value=i,this.updateUniform(r)}}},{key:"updateUniform",value:function(e){if(this.compiled){var t=this.uniforms[e];t&&null!=t.location&&(this.use(),this.gl[t.method].apply(this.gl,[t.location].concat(t.value)))}}},{key:"refreshUniforms",value:function(){if(this.compiled)for(var e in this.uniforms)this.uniforms[e].location=this.gl.getUniformLocation(this.program,e),this.updateUniform(e)}},{key:"refreshAttributes",value:function(){this.attribs={}}},{key:"attribute",value:function(e){if(this.compiled){var t=this.attribs[e]=this.attribs[e]||{};return null!=t.location?t:(t.name=e,t.location=this.gl.getAttribLocation(this.program,e),t)}}},{key:"source",value:function(e){return"vertex"===e?this.computed_vertex_source:"fragment"===e?this.computed_fragment_source:void 0}},{key:"lines",value:function(e){var t=this.source(e);return t?t.split("\n"):[]}},{key:"line",value:function(e,t){var r=this.lines(e);return r?r[t]:void 0}},{key:"block",value:function r(e,t){for(var n=this.lines(e),r=void 0,i=0;t>i&&i1?r={scope:o[1],name:o[2],num:o[3]}:(o=a.match(/\/\/ tangram-block-end: ([A-Za-z0-9_-]+), ([A-Za-z0-9_-]+), (\d+)/),o&&o.length>1&&(r=null)),r&&(r.line=null==r.line?-1:r.line+1,r.source=a)}return r}},{key:"checkExtensions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var i,a=s(this.extensions);!(t=(i=a.next()).done);t=!0){var o=i.value,u=(0,p["default"])(this.gl,o),l="TANGRAM_EXTENSION_"+o;this.defines[l]=null!=u,u?e.push(o):g["default"].debug("Could not enable extension '"+o+"'")}}catch(c){r=!0,n=c}finally{try{!t&&a["return"]&&a["return"]()}finally{if(r)throw n}}return e}}]),e}();r["default"]=x,x.id=0,x.programs={},x.current=null,x.defines={},x.blocks={},x.buildDefineString=function(e){var t="";for(var r in e)e[r]!==!1&&(t+="boolean"==typeof e[r]&&e[r]===!0?"#define "+r+"\n":"number"==typeof e[r]&&Math.floor(e[r])===e[r]?"#define "+r+" "+e[r].toFixed(1)+"\n":"#define "+r+" "+e[r]+"\n");return t},x.buildExtensionString=function(e){e=e||[];var t="",r=!0,n=!1,i=void 0;try{for(var a,o=s(e);!(r=(a=o.next()).done);r=!0){var u=a.value;t+="#ifdef GL_"+u+"\n#extension GL_"+u+" : enable\n#endif\n"}}catch(l){n=!0,i=l}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw i}}return t},x.addBlock=function(e){var t;x.blocks[e]=x.blocks[e]||[];for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;r>i;i++)n[i-1]=arguments[i];(t=x.blocks[e]).push.apply(t,n)},x.removeBlock=function(e){x.blocks[e]=[]},x.replaceBlock=function(e){x.removeBlock(e);for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];x.addBlock.apply(x,[e].concat(r))},x.updateProgram=function(e,t,r,n){try{var i=x.createShader(e,r,e.VERTEX_SHADER),a=x.createShader(e,n,e.FRAGMENT_SHADER)}catch(o){throw g["default"].error(o.message),o}if(e.useProgram(null),null!=t)for(var s=e.getAttachedShaders(t),u=0;u0?(this.buffer=e.array_pool.pop(),this.buffer_length=this.buffer.byteLength,this.buffer_size=Math.floor(this.buffer_length/this.vertex_layout.stride),(0,h.log)("trace","VertexData: reused buffer of bytes "+this.buffer_length+", "+this.buffer_size+" vertices")):(this.buffer_size=n||500,this.buffer_length=this.vertex_layout.stride*this.buffer_size,this.buffer=new Uint8Array(this.buffer_length)),this.buffer_offset=0,this.components=[];var i=!0,u=!1,l=void 0;try{for(var c,f=s(this.vertex_layout.components);!(i=(c=f.next()).done);i=!0){var d=c.value;this.components.push([].concat(o(d)))}}catch(p){u=!0,l=p}finally{try{!i&&f["return"]&&f["return"]()}finally{if(u)throw l}}this.vertex_count=0,this.realloc_count=0,this.setBufferViews()}return i(e,[{key:"setBufferViews",value:function(){this.buffer_views={},this.buffer_views[f["default"].UNSIGNED_BYTE]=this.buffer;var e=!0,t=!1,r=void 0;try{for(var n,i=s(this.vertex_layout.attribs);!(e=(n=i.next()).done);e=!0){var a=n.value;if(null==this.buffer_views[a.type]){var o=d[a.type];this.buffer_views[a.type]=new o(this.buffer.buffer)}}}catch(u){t=!0,r=u}finally{try{!e&&i["return"]&&i["return"]()}finally{if(t)throw r}}var l=!0,c=!1,h=void 0;try{for(var p,m=s(this.components);!(l=(p=m.next()).done);l=!0){var g=p.value;g[1]=this.buffer_views[g[0]]}}catch(u){c=!0,h=u}finally{try{!l&&m["return"]&&m["return"]()}finally{if(c)throw h}}}},{key:"checkBufferSize",value:function(){if(this.buffer_offset+this.vertex_layout.stride>this.buffer_length){this.buffer_size=Math.floor(1.5*this.buffer_size),this.buffer_size-=this.buffer_size%4,this.buffer_length=this.vertex_layout.stride*this.buffer_size;var t=new Uint8Array(this.buffer_length);t.set(this.buffer),e.array_pool.push(this.buffer),this.buffer=t,this.setBufferViews(),this.realloc_count++}}},{key:"addVertex",value:function(e){this.checkBufferSize();for(var t=0,r=this.components.length,n=0;r>n;n++){var i=this.components[n];i[1][(this.buffer_offset>>i[2])+i[3]]=e[t++]}this.buffer_offset+=this.vertex_layout.stride,this.vertex_count++}},{key:"end",value:function(){return this.buffer=this.buffer.subarray(0,this.buffer_offset),(0,h.log)("trace","VertexData: "+this.buffer_size+" vertices total, realloc count "+this.realloc_count),this}}]),e}();r["default"]=p,p.array_pool=[],t.exports=r["default"]},{"../utils/utils":241,"./constants":194,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/define-property":20,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25}],205:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/core-js/get-iterator")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var s=e("./constants"),u=o(s),l=e("./vertex_data"),c=o(l),f=function(){function e(t){i(this,e),this.attribs=t,this.components=[],this.index={},this.stride=0;var r=0,n=!0,o=!1,s=void 0;try{for(var l,c=a(this.attribs);!(n=(l=c.next()).done);n=!0){var f=l.value;f.offset=this.stride,f.byte_size=f.size;var h=0;switch(f.type){case u["default"].FLOAT:case u["default"].INT:case u["default"].UNSIGNED_INT:f.byte_size*=4,h=2;break;case u["default"].SHORT:case u["default"].UNSIGNED_SHORT:f.byte_size*=2,h=1}this.stride+=f.byte_size,3&this.stride&&(this.stride+=4-(3&this.stride));var d=f.offset>>h;if(f.size>1)for(var p=0;p0&&(0,s["default"])([this.aabb],n,function(e,a){return d["default"].trace("collision: broad phase collide",t.options.id,t,t.aabb,n[a]),0===t.obb.angle&&0===i[a].angle?(d["default"].trace("collision: skip narrow phase collide because neither is rotated",t.options.id,t,t.obb,i[a]),r=!0,!0):f["default"].intersect(t.obb,i[a])?(d["default"].trace("collision: narrow phase collide",t.options.id,t,t.obb,i[a]),r=!0,!0):void 0}),r}},{key:"add",value:function(e){e.aabb.push(this.aabb),e.obb.push(this.obb)}},{key:"inTileBounds",value:function(){var e=[this.aabb[0],this.aabb[1]],t=[this.aabb[2],this.aabb[3]];return l["default"].pointInTile(e)&&l["default"].pointInTile(t)?!0:!1}},{key:"discard",value:function(e){if(this.options.cull_from_tile){var t=this.inTileBounds();if(!t&&this.options.move_into_tile){if(!this.moveIntoTile())return!0}else if(!t)return!0}return this.occluded(e)}}]),e}();r["default"]=p,p.epsilon=.9999,t.exports=r["default"]},{"../utils/obb":239,"../utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"box-intersect":30,loglevel:179}],208:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/create-class")["default"],o=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("../vector"),l=s(u),c=e("./label"),f=s(c),h=e("../utils/obb"),d=s(h),p=function(e){function t(e,r,i){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i),this.segment_index=0,this.lines=r,this.update()}return i(t,e),a(t,[{key:"update",value:function(){var e=this.currentSegment();this.angle=this.computeAngle(),this.position=[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2],this.updateBBoxes()}},{key:"moveNextSegment",value:function(){return this.segment_index+1>=this.lines.length-1?!1:(this.segment_index++,this.update(),!0)}},{key:"computeAngle",value:function(){var e=this.currentSegment(),t=l["default"].sub(e[0],e[1]);t=l["default"].normalize(t);var r=Math.PI/2,n=Math.atan2(t[0],t[1])+r;return(n>r||-r>n)&&(n+=Math.PI),n%=2*Math.PI}},{key:"fitToSegment",value:function(){var e=this.currentSegment(),t=l["default"].sub(e[0],e[1]),r=l["default"].length(t),n=this.size[0]*this.options.units_per_pixel;if(n>r){var i=100*(1-r/n);return i=n}},{key:"currentSegment",value:function(){var e=this.lines[this.segment_index],t=this.lines[this.segment_index+1];return[e,t]}},{key:"updateBBoxes",value:function(){var e=this.options.units_per_pixel,t=(this.size[0]+2*this.options.buffer[0])*e*f["default"].epsilon,r=(this.size[1]+2*this.options.buffer[1])*e*f["default"].epsilon,n=l["default"].rot(this.options.offset,this.angle),i=[this.position[0]+n[0]*e,this.position[1]-n[1]*e];this.obb=new d["default"](i[0],i[1],-this.angle,t,r),this.aabb=this.obb.getExtent()}},{key:"moveIntoTile",value:function(){for(var e=!1,t=this.fitToSegment();(!e||!t)&&this.moveNextSegment();)e=this.inTileBounds(),t=this.fitToSegment();return e&&t}},{key:"discard",value:function(e){if(this.lines&&!this.fitToSegment())for(;!this.fitToSegment();)if(!this.moveNextSegment())return!0;return n(Object.getPrototypeOf(t.prototype),"discard",this).call(this,e)}}]),t}(f["default"]);r["default"]=p,t.exports=r["default"]},{"../utils/obb":239,"../vector":244,"./label":207,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23}],209:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/create-class")["default"],o=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("./label"),l=s(u),c=e("../geo"),f=s(c),h=e("../utils/obb"),d=s(h),p=e("../styles/points/point_anchor"),m=s(p),g=function(e){function t(e,r,i){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,r,i),this.position=[e[0],e[1]],this.update()}return i(t,e),a(t,[{key:"update",value:function(){this.options.offset=this.computeOffset(),this.updateBBoxes()}},{key:"computeOffset",value:function(){return m["default"].computeOffset(this.options.offset,this.size,this.options.anchor)}},{key:"updateBBoxes",value:function(){var e=(this.size[0]+2*this.options.buffer[0])*this.options.units_per_pixel*l["default"].epsilon,t=(this.size[1]+2*this.options.buffer[1])*this.options.units_per_pixel*l["default"].epsilon,r=[this.position[0]+this.options.offset[0]*this.options.units_per_pixel,this.position[1]-this.options.offset[1]*this.options.units_per_pixel];this.obb=new d["default"](r[0],r[1],0,e,t),this.aabb=this.obb.getExtent()}},{key:"moveIntoTile",value:function(){var e=!1;return this.aabb[0]<0&&(this.position[0]+=-this.aabb[0],e=!0),this.aabb[2]>=f["default"].tile_scale&&(this.position[0]-=this.aabb[2]-f["default"].tile_scale+1,e=!0),this.aabb[3]>0&&(this.position[1]-=this.aabb[3],e=!0),this.aabb[1]<=-f["default"].tile_scale&&(this.position[1]-=this.aabb[1]+f["default"].tile_scale-1,e=!0),e&&this.updateBBoxes(),this.inTileBounds()}}]),t}(l["default"]);r["default"]=g,t.exports=r["default"]},{"../geo":193,"../styles/points/point_anchor":225,"../utils/obb":239,"./label":207,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23}],210:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o=e("../geo"),s=a(o),u=function(){function e(t,r,n){i(this,e),this.key=t,this.repeat_dist=r,this.repeat_dist_sq=this.repeat_dist*this.repeat_dist,this.max_repeat_dist_sq=n*n,this.one_per_group=this.repeat_dist_sq>=this.max_repeat_dist_sq?!0:!1,this.positions=[]}return n(e,[{key:"check",value:function(e){if(this.one_per_group){if(this.positions.length>0)return{dist_sq:this.max_repeat_dist_sq,repeat_dist_sq:this.repeat_dist_sq,one_per_group:this.one_per_group}}else for(var t=e.position,r=0;r0){var n={};for(var i in t)n[t[i].type]=!0;for(var a in n)e.types[a].inject();for(var i in t)t[i].inject(),r+="calculateLight("+i+", _eyeToPoint, _normal);\n"}else r="\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n light_accumulator_diffuse = vec4(1.);\n #endif\n ";var o="\n vec4 calculateLighting(in vec3 _eyeToPoint, in vec3 _normal, in vec4 _color) {\n\n // Do initial material calculations over normal, emission, ambient, diffuse and specular values\n calculateMaterial(_eyeToPoint,_normal);\n\n // Un roll the loop of individual ligths to calculate\n "+r+"\n\n // Final light intensity calculation\n vec4 color = vec4(0.0);\n\n #ifdef TANGRAM_MATERIAL_EMISSION\n color = material.emission;\n #endif\n\n #ifdef TANGRAM_MATERIAL_AMBIENT\n color += light_accumulator_ambient * _color * material.ambient;\n #else\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n color += light_accumulator_ambient * _color * material.diffuse;\n #endif\n #endif\n\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n color += light_accumulator_diffuse * _color * material.diffuse;\n #endif\n\n #ifdef TANGRAM_MATERIAL_SPECULAR\n color += light_accumulator_specular * material.specular;\n #endif\n\n // Clamp final color\n color = clamp(color, 0.0, 1.0);\n\n return color;\n }";f["default"].addBlock(e.block,o)}}}]),e}();r["default"]=_,_.types={},_.block="lighting",_.enabled=!0;var b=function(e){function t(e,r){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="ambient",this.struct_name="AmbientLight"}return o(t,e),n(t,[{key:"setupProgram",value:function(e){e.uniform("4fv","u_"+this.name+".ambient",this.ambient)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/ambientLight"])}}]),t}(_);_.types.ambient=b;var x=function(e){function t(e,r){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="directional",this.struct_name="DirectionalLight",this.direction=(r.direction||[.2,.7,-.5]).map(parseFloat)}return o(t,e),n(t,[{key:"setupProgram",value:function(e){a(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_"+this.name+".direction",this.direction)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/directionalLight"])}}]),t}(_);_.types.directional=x;var A=function(e){function t(e,r){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="point",this.struct_name="PointLight",this.position=r.position||[0,0,0],this.position_eye=[],this.origin=r.origin||"world",this.attenuation=isNaN(parseFloat(r.attenuation))?0:parseFloat(r.attenuation),r.radius?Array.isArray(r.radius)&&2===r.radius.length?this.radius=r.radius:this.radius=[null,r.radius]:this.radius=null}return o(t,e),n(t,[{key:"inject",value:function(){a(Object.getPrototypeOf(t.prototype),"inject",this).call(this),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT=0!==this.attenuation,f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS=null!=this.radius&&null!=this.radius[0],f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS=null!=this.radius}},{key:"update",value:function(){this.updateEyePosition()}},{key:"updateEyePosition",value:function(){if("world"===this.origin){var e=v["default"].latLngToMeters(this.position),t=s(e,2),r=t[0],n=t[1];this.position_eye[0]=r-this.scene.camera.position_meters[0],this.position_eye[1]=n-this.scene.camera.position_meters[1],this.position_eye[2]=y.StyleParser.convertUnits(this.position[2],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}),this.position_eye[2]=this.position_eye[2]-this.scene.camera.position_meters[2]}("ground"===this.origin||"camera"===this.origin)&&(this.position_eye=y.StyleParser.convertUnits(this.position,{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}),"ground"===this.origin&&(this.position_eye[2]=this.position_eye[2]-this.scene.camera.position_meters[2]))}},{key:"setupProgram",value:function(e){a(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("4f","u_"+this.name+".position",this.position_eye[0],this.position_eye[1],this.position_eye[2],1),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT&&e.uniform("1f","u_"+this.name+".attenuationExponent",this.attenuation),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS&&e.uniform("1f","u_"+this.name+".innerRadius",y.StyleParser.convertUnits(this.radius[0],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)})),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS&&e.uniform("1f","u_"+this.name+".outerRadius",y.StyleParser.convertUnits(this.radius[1],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}))}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/pointLight"])}}]),t}(_);_.types.point=A;var w=function(e){function t(e,r){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="spotlight",this.struct_name="SpotLight",this.direction=(r.direction||[0,0,-1]).map(parseFloat),this.exponent=r.exponent?parseFloat(r.exponent):.2,this.angle=r.angle?parseFloat(r.angle):20}return o(t,e),n(t,[{key:"setupProgram",value:function(e){a(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_"+this.name+".direction",this.direction),e.uniform("1f","u_"+this.name+".spotCosCutoff",Math.cos(3.14159*this.angle/180)),e.uniform("1f","u_"+this.name+".spotExponent",this.exponent)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/spotLight"])}}]),t}(A);_.types.spotlight=w,t.exports=r["default"]},{"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/shader_sources":200,"./styles/style_parser":231,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],213:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o=e("./gl/shader_sources"),s=a(o),u=e("./gl/glsl"),l=a(u),c=e("./styles/style_parser"),f=function(){function e(t){i(this,e),t=t||{};for(var r=["emission","ambient","diffuse","specular"],n=0;nn;n++)t[n]=arguments[n];r.apply(void 0,["Tangram "+l["default"].string+":"].concat(t))}}},{"../src/scene_worker":217,"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/texture":201,"./gl/vertex_data":204,"./labels/collision":206,"./leaflet_layer":211,"./light":212,"./material":213,"./selection":218,"./sources/data_source":219,"./sources/geojson":220,"./sources/mvt":221,"./sources/topojson":222,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile_manager":236,"./utils/utils":241,"./utils/version":242,"./utils/worker_broker":243,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":143,"js-yaml":149,loglevel:179}],215:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/sliced-to-array")["default"],o=e("babel-runtime/helpers/to-consumable-array")["default"],s=e("babel-runtime/core-js/promise")["default"],u=e("babel-runtime/core-js/object/assign")["default"],l=e("babel-runtime/core-js/object/keys")["default"],c=e("babel-runtime/core-js/get-iterator")["default"],f=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var h=e("./geo"),d=f(h),p=e("./utils/utils"),m=f(p),g=e("./utils/worker_broker"),v=f(g),y=e("./utils/subscribe"),_=f(y),b=e("./gl/context"),x=f(b),A=e("./gl/texture"),w=f(A),E=e("./gl/vao"),D=f(E),k=e("./styles/style"),T=e("./styles/style_manager"),F=e("./styles/style_parser"),S=e("./scene_loader"),C=f(S),M=e("./camera"),R=f(M),j=e("./light"),P=f(j),I=e("./tile_manager"),L=f(I),B=e("./sources/data_source"),N=f(B),O=e("./selection"),z=f(O),U=e("./gl/render_state"),$=f(U),G=e("./styles/polygons/polygons"),q=e("./styles/lines/lines"),V=e("./styles/points/points"),W=e("./styles/text/text"),Y=e("loglevel"),H=f(Y),X=e("gl-matrix"),Z=f(X);T.StyleManager.register(G.Polygons),T.StyleManager.register(q.Lines),T.StyleManager.register(V.Points),T.StyleManager.register(W.TextStyle);var J=Z["default"].mat4,K=Z["default"].mat3,Q=Z["default"].vec3,ee=function(){function e(t,r){i(this,e),r=r||{},(0,_["default"])(this),this.initialized=!1,this.initializing=!1,this.sources={},this.tile_manager=L["default"],this.tile_manager.init(this),this.num_workers=r.numWorkers||2,this.continuous_zoom="boolean"==typeof r.continuousZoom?r.continuousZoom:!0,this.tile_simplification_level=0,this.allow_cross_domain_workers=r.allowCrossDomainWorkers===!1?!1:!0,this.worker_url=r.workerUrl,r.disableVertexArrayObjects===!0&&(D["default"].disabled=!0),m["default"].use_high_density_display=void 0!==r.highDensityDisplay?r.highDensityDisplay:!0,m["default"].updateDevicePixelRatio(),this.config=null,this.config_source=t,this.config_serialized=null,this.last_valid_config_source=null,this.styles=null,this.active_styles={},this.building=null,this.dirty=!0,this.animated=!1,this.preUpdate=r.preUpdate,this.postUpdate=r.postUpdate,this.render_loop=!r.disableRenderLoop,this.render_loop_active=!1,this.render_loop_stop=!1,this.render_count=0,this.last_render_count=0,this.render_count_changed=!1,this.frame=0,this.queue_screenshot=null,this.resetTime(),this.zoom=null,this.center=null,this.zooming=!1,this.preserve_tiles_within_zoom=1,this.panning=!1,this.container=r.container,this.camera=null,this.lights=null,this.background=null,this.modelMatrix=new Float64Array(16),this.modelMatrix32=new Float32Array(16),this.modelViewMatrix=new Float64Array(16),this.modelViewMatrix32=new Float32Array(16),this.normalMatrix=new Float64Array(9),this.normalMatrix32=new Float32Array(9),this.inverseNormalMatrix32=new Float32Array(9),this.selection=null,this.texture_listener=null,this.updating=0,this.generation=0,this.last_complete_generation=0,this.setupDebug(),this.logLevel=r.logLevel||"warn",H["default"].setLevel(this.logLevel)}return n(e,[{key:"load",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.initializing?s.resolve():(this.updating++,this.initialized=!1,this.initializing=!0,this.loadScene(t,r).then(function(){return e.createWorkers()}).then(function(){return e.createCanvas(),e.resetFeatureSelection(),e.texture_listener||(e.texture_listener={update:function(){return e.dirty=!0},warning:function(t){return e.trigger("warning",u({type:"textures"},t))}},w["default"].subscribe(e.texture_listener)),e.tile_manager.removeTiles(function(e){return!e.visible}),e.updateConfig({rebuild:!0})}).then(function(){e.updating--,e.initializing=!1,e.initialized=!0,e.last_valid_config_source=e.config_source,e.last_valid_config_path=e.config_path,e.render_loop!==!1&&e.setupRenderLoop(),e.requestRedraw()})["catch"](function(t){e.initializing=!1,e.updating=0;var r=void 0,n=void 0;if("YAMLException"===t.name?(r="yaml",n="Error parsing scene YAML"):n="Error initializing scene",e.trigger("error",{type:r,message:n,error:t,url:e.config_source}),n="Scene.load() failed to load "+e.config_source+": "+t.message,e.last_valid_config_source)return H["default"].warn(n,t),H["default"].info("Scene.load() reverting to last valid configuration"),e.load(e.last_valid_config_source,e.last_valid_config_path);throw H["default"].error(n,t),t}))}},{key:"reload",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.load(e,t)}},{key:"destroy",value:function(){this.initialized=!1,this.render_loop_stop=!0,this.unsubscribeAll(),w["default"].unsubscribe(this.texture_listener),this.texture_listener=null,this.canvas&&this.canvas.parentNode&&(this.canvas.parentNode.removeChild(this.canvas),this.canvas=null),this.container=null,this.selection&&this.selection.destroy(),this.gl&&(w["default"].destroy(this.gl),T.StyleManager.destroy(this.gl),this.styles={},this.gl=null),this.sources={},Array.isArray(this.workers)&&(this.workers.forEach(function(e){e.terminate()}),this.workers=null),this.tile_manager.destroy()}},{key:"createCanvas",value:function(){if(!this.canvas){this.container=this.container||document.body,this.canvas=document.createElement("canvas"),this.canvas.style.position="absolute",this.canvas.style.top=0,this.canvas.style.left=0,this.container.style.backgroundColor="transparent",this.container.appendChild(this.canvas);try{this.gl=x["default"].getContext(this.canvas,{alpha:!0,premultipliedAlpha:!0,device_pixel_ratio:m["default"].device_pixel_ratio})}catch(e){throw new Error("Couldn't create WebGL context. Your browser may not support WebGL, or it's turned off? Visit http://webglreport.com/ for more info.")}this.resizeMap(this.container.clientWidth,this.container.clientHeight),D["default"].init(this.gl),$["default"].initialize(this.gl)}}},{key:"getWorkerUrl",value:function(){var e=this.worker_url||m["default"].findCurrentURL("tangram.debug.js","tangram.min.js");if(!e)throw new Error("Can't load worker because couldn't find base URL that library was loaded from");if(this.allow_cross_domain_workers){var t="importScripts('"+e+"');";return m["default"].createObjectURL(new Blob([t],{type:"application/javascript"}))}return e}},{key:"createWorkers",value:function(){return this.workers?s.resolve():this.makeWorkers(this.getWorkerUrl())}},{key:"makeWorkers",value:function(e){var t=this,r=[];this.workers=[];for(var n=function(){a=new Worker(e),t.workers[i]=a,a.addEventListener("message",t.workerLogMessage.bind(t)),v["default"].addWorker(a),H["default"].debug("Scene.makeWorkers: initializing worker "+i);var n=i;r.push(v["default"].postMessage(a,"self.init",i,t.num_workers,m["default"].device_pixel_ratio).then(function(e){return H["default"].debug("Scene.makeWorkers: initialized worker "+e),e},function(e){return H["default"].error("Scene.makeWorkers: failed to initialize worker "+n+":",e),s.reject(e)}))},i=0;ie.preserve_tiles_within_zoom)return!0;var o=Math.pow(2,a),s={x:Math.floor(i.coords.x/o),y:Math.floor(i.coords.y/o)};return Math.abs(s.x-e.center_tile.x)-r[0]>t?(H["default"].trace("Scene: remove tile "+i.key+" (as "+s.x+"/"+s.y+"/"+n+") for being too far out of visible area ***"),!0):Math.abs(s.y-e.center_tile.y)-r[1]>t?(H["default"].trace("Scene: remove tile "+i.key+" (as "+s.x+"/"+s.y+"/"+n+") for being too far out of visible area ***"),!0):!1})}}},{key:"updateDevicePixelRatio",value:function(){var e=this;m["default"].updateDevicePixelRatio()&&v["default"].postMessage(this.workers,"self.updateDevicePixelRatio",m["default"].device_pixel_ratio).then(function(){return e.rebuild()}).then(function(){return e.resizeMap(e.css_size.width,e.css_size.height)})}},{key:"resizeMap",value:function(e,t){this.dirty=!0,this.css_size={width:e,height:t},this.device_size={width:Math.round(this.css_size.width*m["default"].device_pixel_ratio),height:Math.round(this.css_size.height*m["default"].device_pixel_ratio)},this.view_aspect=this.css_size.width/this.css_size.height,this.updateBounds(),this.canvas&&(this.canvas.style.width=this.css_size.width+"px",this.canvas.style.height=this.css_size.height+"px",this.canvas.width=this.device_size.width,this.canvas.height=this.device_size.height,this.gl&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.viewport(0,0,this.canvas.width,this.canvas.height)))}},{key:"requestRedraw",value:function(){this.dirty=!0}},{key:"immediateRedraw",value:function(){this.dirty=!0,this.update()}},{key:"renderLoop",value:function(){this.render_loop_active=!0,this.initialized&&this.update(),this.render_loop_stop?(this.render_loop_stop=!1,this.render_loop_active=!1):window.requestAnimationFrame(this.renderLoop.bind(this))}},{key:"setupRenderLoop",value:function(){var e=this;this.render_loop_active||setTimeout(function(){e.renderLoop()},0)}},{key:"update",value:function(){this.tile_manager.loadQueuedCoordinates();var e=!(this.dirty===!1||this.initialized===!1||this.updating>0||this.viewReady()===!1);return"function"==typeof this.preUpdate&&this.preUpdate(e),e?(this.dirty=!1,this.updateDevicePixelRatio(),this.render(),this.completeScreenshot(),this.updateViewComplete(),"function"==typeof this.postUpdate&&this.postUpdate(e),this.animated===!0&&(this.dirty=!0),this.frame++,H["default"].trace("Scene.render()"),!0):!1}},{key:"render",value:function(){var e=this,t=this.gl;if(this.center_meters){if(this.camera.update(),l(this.active_styles).forEach(function(t){return e.styles[t].update()}),l(this.lights).forEach(function(t){return e.lights[t].update()}),this.renderable_tiles=this.tile_manager.getRenderableTiles(),this.renderable_tiles_count=this.renderable_tiles.length,this.render_count=this.renderPass(),this.selection.pendingRequests()){if(this.panning)return void this.selection.clearPendingRequests();this.selection.bind(),this.renderPass("selection_program",{allow_blend:!1}),this.selection.read(),t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height)}return this.render_count_changed=!1,this.render_count!==this.last_render_count&&(this.render_count_changed=!0,this.getFeatureSelectionMapSize().then(function(t){H["default"].info("Scene: rendered "+e.render_count+" primitives ("+t+" features in selection map)")},function(){})),this.last_render_count=this.render_count,!0}}},{key:"renderPass",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?"program":arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.allow_blend; -n=null==n?!0:n,this.clearFrame({clear_color:!0,clear_depth:!0});var i=l(this.active_styles).map(function(t){return e.styles[t]}).sort(k.Style.blendOrderSort),a=0,o=void 0,s=!0,f=!1,h=void 0;try{for(var d,p=c(i);!(s=(d=p.next()).done);s=!0){var m=d.value;if(m.blend!==o){var g=u({},k.Style.render_states[m.blend],{blend:n&&m.blend});this.setRenderState(g)}a+=this.renderStyle(m.name,t),o=m.blend}}catch(v){f=!0,h=v}finally{try{!s&&p["return"]&&p["return"]()}finally{if(f)throw h}}return a}},{key:"renderStyle",value:function(e,t){var r=!0,n=0,i=this.styles[e][t];if(!i||!i.compiled)return 0;for(var a in this.renderable_tiles){var o=this.renderable_tiles[a];if(null!=o.meshes[e]){if(r===!0){r=!1,i.use(),this.styles[e].setup(),i.uniform("2f","u_resolution",this.device_size.width,this.device_size.height),i.uniform("1f","u_time",this.animated?(+new Date-this.start_time)/1e3:0),i.uniform("3f","u_map_position",this.center_meters.x,this.center_meters.y,this.zoom),i.uniform("1f","u_meters_per_pixel",this.meters_per_pixel),i.uniform("1f","u_device_pixel_ratio",m["default"].device_pixel_ratio),this.camera.setupProgram(i);for(var s in this.lights)this.lights[s].setupProgram(i)}i.uniform("3f","u_tile_origin",o.min.x,o.min.y,o.style_zoom),J.identity(this.modelMatrix),J.translate(this.modelMatrix,this.modelMatrix,Q.fromValues(o.min.x,o.min.y,0)),J.scale(this.modelMatrix,this.modelMatrix,Q.fromValues(o.span.x/d["default"].tile_scale,-1*o.span.y/d["default"].tile_scale,1)),J.copy(this.modelMatrix32,this.modelMatrix),i.uniform("Matrix4fv","u_model",!1,this.modelMatrix32),J.multiply(this.modelViewMatrix32,this.camera.viewMatrix,this.modelMatrix),i.uniform("Matrix4fv","u_modelView",!1,this.modelViewMatrix32),K.normalFromMat4(this.normalMatrix32,this.modelViewMatrix32),K.invert(this.inverseNormalMatrix32,this.normalMatrix32),i.uniform("Matrix3fv","u_normalMatrix",!1,this.normalMatrix32),i.uniform("Matrix3fv","u_inverseNormalMatrix",!1,this.inverseNormalMatrix32),o.meshes[e].render(),n+=o.meshes[e].geometry_count}}return n}},{key:"clearFrame",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.clear_color,r=e.clear_depth;if(this.initialized){t=t===!1?!1:!0,r=r===!1?!1:!0;var n=this.gl;if(t&&n.clearColor.apply(n,o(this.background.color)),r&&n.depthMask(!0),t||r){var i=(t&&n.COLOR_BUFFER_BIT)|(r&&n.DEPTH_BUFFER_BIT);n.clear(i)}}}},{key:"setRenderState",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.depth_test,r=e.depth_write,n=e.cull_face,i=e.blend;if(this.initialized){t=t===!1?!1:!0,r=r===!1?!1:!0,n=n===!1?!1:!0,i=null!=i?i:!1;var a=this.gl;$["default"].depth_test.set({depth_test:t,depth_func:a.LEQUAL}),$["default"].depth_write.set({depth_write:r}),$["default"].culling.set({cull:n,face:a.BACK}),i?"opaque"===i?$["default"].blending.set({blend:!0,src:a.SRC_ALPHA,dst:a.ZERO}):"overlay"===i||"inlay"===i?$["default"].blending.set({blend:!0,src:a.SRC_ALPHA,dst:a.ONE_MINUS_SRC_ALPHA,src_alpha:a.ONE,dst_alpha:a.ONE_MINUS_SRC_ALPHA}):"add"===i?$["default"].blending.set({blend:!0,src:a.ONE,dst:a.ONE,src_alpha:a.ONE,dst_alpha:a.ONE_MINUS_SRC_ALPHA}):"multiply"===i&&$["default"].blending.set({blend:!0,src:a.ZERO,dst:a.SRC_COLOR,src_alpha:a.ONE,dst_alpha:a.ONE_MINUS_SRC_ALPHA}):$["default"].blending.set({blend:!1})}}},{key:"getFeatureAt",value:function(e){if(!this.initialized)return H["default"].debug("Scene.getFeatureAt() called before scene was initialized"),s.resolve();var t={x:e.x*m["default"].device_pixel_ratio/this.device_size.width,y:e.y*m["default"].device_pixel_ratio/this.device_size.height};return this.dirty=!0,this.selection.getFeatureAt(t)["catch"](function(e){return s.resolve(e)})}},{key:"rebuild",value:function(e){return this.rebuildGeometry(e)}},{key:"rebuildGeometry",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.sync,n=void 0===r?!0:r;return new s(function(t,r){if(e.building)return e.building.queued&&e.building.queued.reject&&(H["default"].debug("Scene.rebuildGeometry: request superceded by a newer call"),e.building.queued.resolve(!1)),e.building.queued={resolve:t,reject:r},void H["default"].trace("Scene.rebuildGeometry(): queuing request");e.building={resolve:t,reject:r},e.debug.profile.geometry_build&&e._profile("rebuildGeometry"),n&&(e.syncConfigToWorker(),T.StyleManager.compile(e.updateActiveStyles(),e)),e.resetFeatureSelection(),e.resetTime();var i=[];e.tile_manager.forEachTile(function(t){t.visible?i.push(t):e.tile_manager.removeTile(t.key)}),e.tile_manager.buildTiles(i)}).then(function(){e.debug.profile.geometry_build&&e._profileEnd("rebuildGeometry")})}},{key:"tileManagerBuildDone",value:function(){if(this.building){H["default"].info("Scene: build geometry finished"),this.building.resolve&&this.building.resolve(!0);var e=this.building.queued;this.building=null,e&&(H["default"].debug("Scene: starting queued rebuildGeometry() request"),this.rebuildGeometry().then(e.resolve,e.reject))}}},{key:"loadScene",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.config_source=t||this.config_source,"string"==typeof this.config_source?this.config_path=m["default"].pathForURL(r||this.config_source):this.config_path=m["default"].pathForURL(r),C["default"].loadScene(this.config_source,this.config_path).then(function(t){return e.config=t,e.trigger("load",{config:e.config}),e.config})}},{key:"setDataSource",value:function(e,t){if(!e||!t||!t.type||!t.url&&!t.data)return void H["default"].error("No name provided or not a valid config:",e,t);var r=null==this.config.sources[e],n=this.config.sources[e]=u({},t);n.data&&"object"==typeof n.data&&(n.url=m["default"].createObjectURL(new Blob([JSON.stringify(n.data)])),delete n.data),r?this.updateConfig({rebuild:!0}):this.rebuild()}},{key:"loadDataSources",value:function(){for(var e in this.config.sources){var t=this.config.sources[e];try{if(this.sources[e]=N["default"].create(u({},t,{name:e})),!this.sources[e])throw{}}catch(r){delete this.sources[e];var n="Could not create data source: "+r.message;H["default"].warn("Scene: "+n,t),this.trigger("warning",{type:"sources",source:t,message:n})}}}},{key:"loadTextures",value:function(){return w["default"].createFromObject(this.gl,this.config.textures)}},{key:"updateStyles",value:function(){if(!this.initialized&&!this.initializing)throw new Error("Scene.updateStyles() called before scene was initialized");this.styles=T.StyleManager.build(this.config.styles,this);var e=!0,t=!1,r=void 0;try{for(var n,i=c(m["default"].values(this.styles));!(e=(n=i.next()).done);e=!0){var a=n.value;a.setGL(this.gl)}}catch(o){t=!0,r=o}finally{try{!e&&i["return"]&&i["return"]()}finally{if(t)throw r}}this.updateActiveStyles(),T.StyleManager.compile(l(this.active_styles),this),this.dirty=!0}},{key:"updateActiveStyles",value:function(){var e=this,t=l(this.active_styles||{});this.active_styles={};var r=!1,n=!0,i=!1,o=void 0;try{for(var s,u=c(m["default"].recurseValues(this.config.layers));!(n=(s=u.next()).done);n=!0){var f=s.value;if(f&&f.draw){var h=!0,d=!1,p=void 0;try{for(var g,v=c(m["default"].entries(f.draw));!(h=(g=v.next()).done);h=!0){var y=a(g.value,2),_=y[0],b=y[1];if(null!=b&&"object"==typeof b&&b.visible!==!1){var x=b.style||_,A=[x];b.outline&&b.outline.style&&A.push(b.outline.style),A=A.filter(function(t){return e.styles[t]}).forEach(function(t){var n=e.styles[t];n&&(e.active_styles[t]=!0,n.animated&&(r=!0))})}}}catch(w){d=!0,p=w}finally{try{!h&&v["return"]&&v["return"]()}finally{if(d)throw p}}}}}catch(w){i=!0,o=w}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}return this.animated=void 0!==this.config.scene.animated?this.config.scene.animated:r,l(this.active_styles).filter(function(e){return-1===t.indexOf(e)})}},{key:"createCamera",value:function(){var e=this._active_camera;e&&(this.camera=R["default"].create(e,this,this.config.cameras[this._active_camera]),this.camera.updateScene())}},{key:"getActiveCamera",value:function(){return this._active_camera}},{key:"setActiveCamera",value:function(e){return this._active_camera=e,this.updateConfig(),this._active_camera}},{key:"createLights",value:function(){this.lights={};for(var e in this.config.lights)if(this.config.lights[e]&&"object"==typeof this.config.lights[e]){var t=this.config.lights[e];t.name=e.replace("-","_"),t.visible=t.visible===!1?!1:!0,t.visible&&(this.lights[t.name]=P["default"].create(this,t))}P["default"].inject(this.lights)}},{key:"setBackground",value:function(){var e=this.config.scene.background;this.background={},e&&e.color&&(this.background.color=F.StyleParser.parseColor(e.color)),this.background.color||(this.background.color=[0,0,0,0]),1===this.background.color[3]?this.canvas.style.backgroundColor="rgba("+this.background.color.map(function(e){return Math.floor(255*e)}).join(", ")+")":this.canvas.style.backgroundColor="transparent"}},{key:"updateConfig",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.rebuild;return this.generation++,this.updating++,this.config.scene=this.config.scene||{},T.StyleManager.init(),this.createCamera(),this.createLights(),this.loadDataSources(),this.loadTextures(),this.setBackground(),this.updateBounds(),this.updateStyles(),this.syncConfigToWorker(),r?this.rebuildGeometry().then(function(){e.updating--,e.requestRedraw()}):(this.updating--,this.requestRedraw(),s.resolve())}},{key:"syncConfigToWorker",value:function(){this.config_serialized=m["default"].serializeWithFunctions(this.config),v["default"].postMessage(this.workers,"self.updateConfig",{config:this.config_serialized,generation:this.generation})}},{key:"resetFeatureSelection",value:function(){this.selection?this.workers&&v["default"].postMessage(this.workers,"self.resetFeatureSelection"):this.selection=new z["default"](this.gl,this.workers)}},{key:"getFeatureSelectionMapSize",value:function(){var e=this;return this.fetching_selection_map?s.reject():(this.fetching_selection_map=!0,v["default"].postMessage(this.workers,"self.getFeatureSelectionMapSize").then(function(t){return e.fetching_selection_map=!1,t.reduce(function(e,t){return e+t})}))}},{key:"resetTime",value:function(){this.start_time=+new Date}},{key:"updateViewComplete",value:function(){!this.render_count_changed&&this.generation===this.last_complete_generation||this.tile_manager.isLoadingVisibleTiles()||(this.last_complete_generation=this.generation,this.trigger("view_complete"))}},{key:"resetViewComplete",value:function(){this.last_complete_generation=null}},{key:"screenshot",value:function(){var e=this;return null!=this.queue_screenshot?this.queue_screenshot.promise:(this.requestRedraw(),this.queue_screenshot={},this.queue_screenshot.promise=new s(function(t,r){e.queue_screenshot.resolve=t,e.queue_screenshot.reject=r}),this.queue_screenshot.promise)}},{key:"completeScreenshot",value:function(){if(null!=this.queue_screenshot){for(var e=this.canvas.toDataURL("image/png"),t=atob(e.slice(22)),r=new Uint8Array(t.length),n=0;n0?E["default"].syncTexturesToWorker(t):o.resolve()},updateDevicePixelRatio:function(e){l["default"].device_pixel_ratio=e},profile:function(e){console.profile("worker "+self._worker_id+": "+e)},profileEnd:function(e){console.profileEnd("worker "+self._worker_id+": "+e)}}),f["default"].addTarget("self",self))},{"./gl/texture":201,"./selection":218,"./sources/data_source":219,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile":235,"./utils/merge":238,"./utils/utils":241,"./utils/worker_broker":243,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25}],218:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/core-js/promise")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var s=e("./gl/texture"),u=o(s),l=e("./utils/worker_broker"),c=o(l),f=e("loglevel"),h=o(f),d=function(){function e(t,r){i(this,e),this.gl=t,this.workers=r,this.init()}return n(e,[{key:"init",value:function(){this.requests={},this.feature=null,this.read_delay=5,this.read_delay_timer=null,this.pixel=new Uint8Array(4),this.pixel32=new Float32Array(this.pixel.buffer),this.fbo=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.fbo),this.fbo_size={width:256,height:256},this.fbo_size.aspect=this.fbo_size.width/this.fbo_size.height;var e=u["default"].create(this.gl,"selection_fbo",{filtering:"nearest"});e.setData(this.fbo_size.width,this.fbo_size.height,null,{filtering:"nearest"}),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,e.texture,0);var t=this.gl.createRenderbuffer();this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,t),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_COMPONENT16,this.fbo_size.width,this.fbo_size.height),this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,t),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null)}},{key:"destroy",value:function(){this.gl&&this.fbo&&(this.gl.deleteFramebuffer(this.fbo),this.fbo=null,this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null))}},{key:"bind",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.fbo),this.gl.viewport(0,0,this.fbo_size.width,this.fbo_size.height)}},{key:"getFeatureAt",value:function(e){var t=this;return new a(function(r,n){t.selection_request_id=t.selection_request_id+1||0,t.requests[t.selection_request_id]={type:"point",id:t.selection_request_id,point:e,resolve:r,reject:n}})}},{key:"pendingRequests",value:function(){return this.requests}},{key:"clearPendingRequests",value:function(){for(var e in this.requests){var t=this.requests[e];t.sent||(t.reject({request:t}),delete this.requests[e])}}},{key:"read",value:function(){var e=this;null!=this.read_delay_timer&&clearTimeout(this.read_delay_timer),this.read_delay_timer=setTimeout(function(){var t=e.gl;t.bindFramebuffer(t.FRAMEBUFFER,e.fbo);for(var r in e.requests){var n=e.requests[r];if(!n.sent&&"point"===n.type){t.readPixels(Math.floor(n.point.x*e.fbo_size.width),Math.floor((1-n.point.y)*e.fbo_size.height),1,1,t.RGBA,t.UNSIGNED_BYTE,e.pixel);var i=e.pixel[0]+(e.pixel[1]<<8)+(e.pixel[2]<<16)+(e.pixel[3]<<24)>>>0,a=e.pixel[3];255!==a?null!=e.workers[a]&&c["default"].postMessage(e.workers[a],"self.getFeatureSelection",{id:n.id,key:i}).then(function(t){e.finishRead(t)}):e.finishRead({id:n.id,feature:null}),n.sent=!0}}t.bindFramebuffer(t.FRAMEBUFFER,null)},this.read_delay)}},{key:"finishRead",value:function(e){var t=this.requests[e.id];if(!t)return void h["default"].error("FeatureSelection.finishRead(): could not find message",e);var r=e.feature,n=!1;(null!=r&&null==this.feature||null==r&&null!=this.feature||null!=r&&null!=this.feature&&JSON.stringify(r)!==JSON.stringify(this.feature))&&(n=!0),this.feature=r,t.resolve({feature:r,changed:n,request:t}),delete this.requests[e.id]}}],[{key:"makeEntry",value:function(e){this.map_entry++;var t=255&this.map_entry,r=this.map_entry>>8&255,n=this.map_entry>>16&255,i=this.map_prefix,a=t/255,o=r/255,s=n/255,u=i/255,l=t+(r<<8)+(n<<16)+(i<<24)>>>0;return this.map[l]={color:[a,o,s,u]},this.map_size++,this.tiles[e.key]=this.tiles[e.key]||[],this.tiles[e.key].push(l),this.map[l]}},{key:"makeColor",value:function(e,t){var r=this.makeEntry(t);return r.feature={id:e.id,properties:e.properties,tile:t.key},r.color}},{key:"reset",value:function(){this.tiles={},this.map={},this.map_size=0,this.map_entry=0}},{key:"clearTile",value:function(e){var t=this;Array.isArray(this.tiles[e])&&(this.tiles[e].forEach(function(e){return delete t.map[e]}),this.map_size-=this.tiles[e].length,delete this.tiles[e])}},{key:"getMapSize",value:function(){return this.map_size}},{key:"setPrefix",value:function(e){this.map_prefix=e}}]),e}();r["default"]=d,d.map={},d.tiles={},d.map_size=0,d.map_entry=0,d.map_prefix=0,d.defaultColor=[0,0,0,1],t.exports=r["default"]},{"./gl/texture":201,"./utils/worker_broker":243,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,loglevel:179}],219:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],a=e("babel-runtime/helpers/get")["default"],o=e("babel-runtime/helpers/inherits")["default"],s=e("babel-runtime/helpers/sliced-to-array")["default"],u=e("babel-runtime/core-js/promise")["default"],l=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var c=e("../geo"),f=l(c),h=e("../utils/errors"),d=e("../utils/utils"),p=l(d),m=function(){function e(t){i(this,e),this.id=t.id,this.name=t.name,this.url=t.url,this.pad_scale=t.pad_scale||5e-4,this.enforce_winding=t.enforce_winding||!1,this.transform=t.transform,"function"==typeof this.transform&&this.transform.bind(this),this.extra_data=t.extra_data,"function"==typeof importScripts&&t.scripts&&t.scripts.forEach(function(e,t){try{importScripts(e),p["default"].log("info","DataSource: loaded library: "+e)}catch(r){p["default"].log("error","DataSource: failed to load library: "+e),p["default"].log("error",r)}}),this.max_zoom=t.max_zoom||f["default"].default_max_zoom}return n(e,[{key:"load",value:function(e){var t=this;return e.source_data={},e.source_data.layers={},e.pad_scale=this.pad_scale,this._load(e).then(function(e){for(var r in e.source_data.layers){var n=e.source_data.layers[r];n&&n.features&&n.features.forEach(function(e){f["default"].transformGeometry(e.geometry,function(e){e[1]=-e[1],t.pad_scale&&(e[0]=Math.round(e[0]*(1+t.pad_scale)-f["default"].tile_scale*t.pad_scale/2),e[1]=Math.round(e[1]*(1+t.pad_scale)-f["default"].tile_scale*t.pad_scale/2))}),t.enforce_winding&&f["default"].enforceWinding(e.geometry,"CCW")})}})}},{key:"_load",value:function(e){throw new h.MethodNotImplemented("_load")}}],[{key:"create",value:function(t){return e.types[t.type]?new e.types[t.type](t):void 0}},{key:"projectData",value:function(e){var t=+new Date;for(var r in e.layers)for(var n=e.layers[r].features.length,i=0;n>i;i++){var a=e.layers[r].features[i];f["default"].transformGeometry(a.geometry,function(e){var t=f["default"].latLngToMeters(e),r=s(t,2),n=r[0],i=r[1];e[0]=n,e[1]=i})}void 0!==e.debug&&(e.debug.projection=+new Date-t)}},{key:"scaleData",value:function(e,t){var r=t.coords.z,n=t.min,i=(t.max,f["default"].unitsPerMeter(r));for(var a in e.layers)for(var o=e.layers[a].features.length,s=0;o>s;s++){var u=e.layers[a].features[s];f["default"].transformGeometry(u.geometry,function(e){e[0]=(e[0]-n.x)*i,e[1]=(e[1]-n.y)*i*-1})}}},{key:"register",value:function(t,r){t&&r&&(e.types[r]=t)}}]),e}();r["default"]=m,m.types={};var g=function(e){function t(e){if(i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.response_type="",null==this.url)throw Error("Network data source must provide a `url` property")}return o(t,e),n(t,[{key:"_load",value:function(e){var t=this,r=this.formatUrl(e),n=e.source_data;return n.url=r,e.debug=e.debug||{},e.debug.network=+new Date,new u(function(i,a){n.error=null;var o=p["default"].io(r,6e4,t.response_type);n.request=o.request,o.then(function(r){e.debug.response_size=r.length||r.byteLength,e.debug.network=+new Date-e.debug.network,e.debug.parsing=+new Date,t.parseSourceData(e,n,r),e.debug.parsing=+new Date-e.debug.parsing,i(e)})["catch"](function(t){n.error=t.toString(),i(e)})})}},{key:"formatUrl",value:function(e){throw new h.MethodNotImplemented("formatUrl")}},{key:"parseSourceData",value:function(e,t,r){throw new h.MethodNotImplemented("parseSourceData")}}]),t}(m);r.NetworkSource=g;var v=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.tiled=!0,this.url_hosts=null;var r=this.url.match(/{s:\[([^}+]+)\]}/);null!=r&&r.length>1&&(this.url_hosts=r[1].split(","),this.next_host=0)}return o(t,e),n(t,[{key:"formatUrl",value:function(e){var t=f["default"].wrapTile(e.coords,{x:!0}),r=this.url.replace("{x}",t.x).replace("{y}",t.y).replace("{z}",t.z);return null!=this.url_hosts&&(r=r.replace(/{s:\[([^}+]+)\]}/,this.url_hosts[this.next_host]),this.next_host=(this.next_host+1)%this.url_hosts.length),r}},{key:"urlHasTilePattern",value:function(e){return e&&e.search("{x}")>-1&&e.search("{y}")>-1&&e.search("{z}")>-1}}]),t}(g);r.NetworkTileSource=v},{"../geo":193,"../utils/errors":237,"../utils/utils":241,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],220:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/create-class")["default"],o=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"]; -Object.defineProperty(r,"__esModule",{value:!0});var l=e("./data_source"),c=u(l),f=e("./mvt"),h=e("../geo"),d=u(h),p=e("geojson-vt"),m=u(p),g=function(e){function t(e){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.tiled=!0,this.load_data=null,this.tile_indexes={},this.max_zoom=Math.max(this.max_zoom||0,15),this.pad_scale=0,this.enforce_winding=e.enforce_winding===!1?!1:!0}return i(t,e),a(t,[{key:"_load",value:function(e){var r=this;return this.load_data||(this.load_data=n(Object.getPrototypeOf(t.prototype),"_load",this).call(this,{source_data:{layers:{}}}).then(function(e){var t=e.source_data.layers;for(var n in t)r.tile_indexes[n]=(0,m["default"])(t[n],{maxZoom:r.max_zoom,tolerance:3,extent:d["default"].tile_scale,buffer:0});return r.loaded=!0,e})),this.load_data.then(function(){for(var t in r.tile_indexes)e.source_data.layers[t]=r.getTileFeatures(e,t);return e})}},{key:"getTileFeatures",value:function(e,t){var r=d["default"].wrapTile(e.coords,{x:!0}),n=this.tile_indexes[t].getTile(r.z,r.x,r.y),i=void 0;if(n&&n.features){i={type:"FeatureCollection",features:[]};var a=!0,o=!1,u=void 0;try{for(var l,c=s(n.features);!(a=(l=c.next()).done);a=!0){var h=l.value,p={type:"Feature",geometry:{},properties:h.tags};if(1===h.type)p.geometry.coordinates=h.geometry.map(function(e){return[e[0],e[1]]}),p.geometry.type="MultiPoint";else{if(2!==h.type&&3!==h.type)continue;p.geometry.coordinates=h.geometry.map(function(e){return e.map(function(e){return[e[0],e[1]]})}),2===h.type?p.geometry.type="MultiLineString":p.geometry=f.MVTSource.decodeMultiPolygon(p.geometry)}i.features.push(p)}}catch(m){o=!0,u=m}finally{try{!a&&c["return"]&&c["return"]()}finally{if(o)throw u}}}return i}},{key:"formatUrl",value:function(e){return this.url}},{key:"parseSourceData",value:function(e,t,r){t.layers=this.getLayers(JSON.parse(r))}},{key:"getLayers",value:function(e){return"Feature"===e.type||"FeatureCollection"===e.type?{_default:e}:e}}]),t}(l.NetworkSource);r.GeoJSONSource=g;var v=function(e){function t(e){return o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.urlHasTilePattern(this.url)?this:this instanceof t?new g(e):null}return i(t,e),a(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);this.prepareGeoJSON(n,e,t)}},{key:"prepareGeoJSON",value:function(e,t,r){"function"==typeof this.transform&&(e=this.transform(e,this.extra_data)),r.layers=g.prototype.getLayers(e);var n={coords:t.coords,min:d["default"].metersForTile(d["default"].wrapTile(t.coords,{x:!0}))};c["default"].projectData(r),c["default"].scaleData(r,n)}}]),t}(l.NetworkTileSource);r.GeoJSONTileSource=v,c["default"].register(v,"GeoJSON"),c["default"].register(v,"GeoJSONTiles")},{"../geo":193,"./data_source":219,"./mvt":221,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"geojson-vt":139}],221:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/create-class")["default"],o=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./data_source"),c=u(l),f=e("../geo"),h=u(f),d=e("pbf"),p=u(d),m=e("vector-tile"),g=function(e){function t(e){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.response_type="arraybuffer"}return i(t,e),a(t,[{key:"parseSourceData",value:function(e,t,r){var n=new Uint8Array(r),i=new p["default"](n);t.data=new m.VectorTile(i),t.layers=this.toGeoJSON(t.data),delete t.data}},{key:"toGeoJSON",value:function(e){var r={};for(var n in e.layers){for(var i=e.layers[n],a={type:"FeatureCollection",features:[]},o=0;o0&&(t.push(r),r=[]),r.push(l)}}catch(f){i=!0,a=f}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r.length>0&&t.push(r),1===t.length?(e.type="Polygon",e.coordinates=t[0]):(e.type="MultiPolygon",e.coordinates=t),e}}]),t}(l.NetworkTileSource);r.MVTSource=g,c["default"].register(g,"MVT")},{"../geo":193,"./data_source":219,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,pbf:182,"vector-tile":188}],222:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/create-class")["default"],o=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/object/keys")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./data_source"),c=u(l),f=e("./geojson"),h=e("topojson"),d=u(h),p=function(e){function t(){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),a(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);n=this.toGeoJSON(n),t.layers=this.getLayers(n)}},{key:"toGeoJSON",value:function(e){if(e.objects&&1===s(e.objects).length){var t=s(e.objects)[0];e=d["default"].feature(e,e.objects[t])}else{var r={};for(var n in e.objects)r[n]=d["default"].feature(e,e.objects[n]);e=r}return e}}]),t}(f.GeoJSONSource);r.TopoJSONSource=p;var m=function(e){function t(e){o(this,t);var r=n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e);return r!==this?new p(e):void 0}return i(t,e),a(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);n=p.prototype.toGeoJSON(n),this.prepareGeoJSON(n,e,t)}}]),t}(f.GeoJSONTileSource);r.TopoJSONTileSource=m,c["default"].register(m,"TopoJSON"),c["default"].register(m,"TopoJSONTiles")},{"./data_source":219,"./geojson":220,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,topojson:186}],223:[function(e,t,r){"use strict";function n(e,t,r,n){var i=n.halfWidth,a=n.vertices,o=n.scalingVecs,s=n.texcoords;o?(a.push(e),o.push(t)):a.push([e[0]+t[0]*i,e[1]+t[1]*i]),s&&s.push(r)}function i(e,t,r,i){i.texcoords?(n(e,t,[i.max_u,(1-r)*i.min_v+r*i.max_v],i),n(e,p["default"].neg(t),[i.min_u,(1-r)*i.min_v+r*i.max_v],i)):(n(e,t,null,i),n(e,p["default"].neg(t),null,i))}function a(e,t,r,i,a,o,s,c,f,h){if(!(1>f)){l(h);var d=p["default"].set(t),m=[0,0],g=p["default"].dot(t,i);if(-1>g&&(g=-1),g=Math.acos(g)/f,c||(g*=-1),h.texcoords)var v=p["default"].set(a),y=p["default"].div(p["default"].sub(s,a),f);n(e,r,o,h),n(e,d,a,h);for(var _=0;f>_;_++){if(m=p["default"].normalize(d),d=p["default"].rot(p["default"].normalize(d),g),4===f&&(0===_||_===f-2)){var b=2/(1+Math.abs(p["default"].dot(m,d)));d=p["default"].mult(d,b*b)}h.texcoords&&(v=p["default"].add(v,y)),n(e,d,v,h)}for(var x=0;f>x;x++)c?(u(x+2,h),u(0,h),u(x+1,h)):(u(x+1,h),u(0,h),u(x+2,h));h.vertices=[],h.scalingVecs&&(h.scalingVecs=[]),h.texcoords&&(h.texcoords=[])}}function o(e,t,r,i,o){var s=[p["default"].set(t[0]),p["default"].set(t[1]),p["default"].set(t[2])],u=p["default"].signed_area(e[0],e[1],e[2])>0,l=s[0],c=p["default"].neg(s[1]),f=s[2];if(o.texcoords)var h=[o.max_u,(1-r)*o.min_v+r*o.max_v],d=[o.min_u,(1-r)*o.min_v+r*o.max_v],m=[o.max_u,(1-r)*o.min_v+r*o.max_v];u?(n(e[1],l,h,o),n(e[1],c,d,o)):(l=p["default"].neg(s[0]),c=s[1],f=p["default"].neg(s[2]),o.texcoords&&(h=[o.min_u,(1-r)*o.min_v+r*o.max_v],d=[o.max_u,(1-r)*o.min_v+r*o.max_v],m=[o.min_u,(1-r)*o.min_v+r*o.max_v]),n(e[1],c,d,o),n(e[1],l,h,o)),a(e[1],l,c,f,h,d,m,u,i,o),u?(n(e[1],f,m,o),n(e[1],c,d,o)):(n(e[1],c,d,o),n(e[1],f,m,o))}function s(e,t,r,n,i){if(!(1>r)){var o,s,u;i.texcoords&&(n?(o=[i.min_u,i.min_v],u=[i.min_u+(i.max_u-i.min_u)/2,i.min_v],s=[i.max_u,i.min_v]):(o=[i.min_u,i.max_v],u=[i.min_u+(i.max_u-i.min_u)/2,i.max_v],s=[i.max_u,i.max_v])),a(e,p["default"].neg(t),[0,0],t,o,u,s,n,2*r,i)}}function u(e,t){var r=t.vertex_data,n=t.vertex_template,i=t.halfWidth,a=t.vertices,o=t.scaling_index,s=t.scaling_normalize,u=t.scalingVecs,l=t.texcoord_index,c=t.texcoords,f=t.texcoord_normalize;e>=a.length||(n[0]=a[e][0],n[1]=a[e][1],l&&(n[l+0]=c[e][0]*f,n[l+1]=c[e][1]*f),o&&(n[o+0]=u[e][0]*s,n[o+1]=u[e][1]*s,n[o+2]=i),r.addVertex(n))}function l(e){for(var t=0;tv;v++){var y=e[v];if(i)var _=g["default"].findBoundingBox(y),b=c(_,4),x=b[0],A=b[1],w=b[2],E=b[3],D=w-x,k=E-A,T=(d-l)/D,F=(p-f)/k;for(var S=h.triangulatePolygon(y),C=S.length,M=0;C>M;M++){var R=S[M];r[0]=R[0],r[1]=R[1],i&&(r[i+0]=((R[0]-x)*T+l)*o,r[i+1]=((R[1]-A)*F+f)*o),t.addVertex(r)}}},h.buildExtrudedPolygons=function(e,t,r,n,i,a,o,s,u){var l=u.remove_tile_edges,f=u.tile_edge_tolerance,d=u.texcoord_index,m=u.texcoord_scale,g=u.texcoord_normalize,v=t+(n||0),y=t+r;if(a[2]=y,h.buildPolygons(e,i,a,{texcoord_index:d,texcoord_scale:m,texcoord_normalize:g}),d){g=g||1;var _=m||h.defaultUVs,b=c(_,4),x=b[0],A=b[1],w=b[2],E=b[3],D=[[x,E],[x,A],[w,A],[w,A],[w,E],[x,E]]}for(var k=e.length,T=0;k>T;T++)for(var F=e[T],S=0;SB)){var N=[0,0],O=[0,0],z=[0,0],U=[0,0],$=[0,0],G=[0,0],q=!1,V=!0;l(P);for(var W=0;B>W;W++){if(V=B>W+1,q)N=O,U=p["default"].normalize(p["default"].perp(N,L[W]));else if(0===W&&u===!0){var Y=!0;f&&h.isOnTileEdge(L[W],L[B-2],d)&&(Y=!1),Y&&(N=L[B-2],U=p["default"].normalize(p["default"].perp(N,L[W])),q=!0)}if(O=L[W],V?z=L[W+1]:u===!0&&(z=L[1],V=!0),V&&(G=p["default"].normalize(p["default"].perp(O,z)),f&&h.isOnTileEdge(O,z,d)))$=p["default"].normalize(p["default"].perp(N,O)),q&&(i(O,$,W/B,P),P.nPairs++,l(P)),q=!1;else{if(q)if(V){$=p["default"].normalize(p["default"].add(U,G));var H=2/(1+Math.abs(p["default"].dot(U,$)));$=p["default"].mult($,H*H)}else $=p["default"].normalize(p["default"].perp(N,O));else{if(!V)continue;G=p["default"].normalize(p["default"].perp(O,z)),$=G}(q||V)&&(0!==W||q||u||s(O,$,D,!0,P),0===k&&p["default"].lengthSq($)>T&&(k=b.bevel),0!==k&&q&&V?o([N,O,z],[U,$,G],W/B,k,P):i(O,$,W/(B-1),P),V&&P.nPairs++,q=!0)}}l(P),u||s(O,$,D,!1,P)}}},h.buildQuadsForPoints=function(e,t,r,n,i){var a=n.texcoord_index,o=n.position_index,s=n.shape_index,u=n.offset_index,l=i.quad,f=i.quad_scale,d=i.offset,p=i.angle,m=i.texcoord_scale,g=i.texcoord_normalize,v=l[0]/2,y=l[1]/2,_=[[-v,-y],[v,-y],[v,y],[-v,-y],[v,y],[-v,y]],b=void 0;if(a){g=g||1;var x=m||h.defaultUVs,A=c(x,4),w=A[0],E=A[1],D=A[2],k=A[3];b=[[w,E],[D,E],[D,k],[w,E],[D,k],[w,k]]}for(var T=e.length,F=0;T>F;F++)for(var S=e[F],C=0;6>C;C++)a&&(r[a+0]=b[C][0]*g,r[a+1]=b[C][1]*g),r[o+0]=S[0],r[o+1]=S[1],r[s+0]=_[C][0],r[s+1]=_[C][1],r[s+2]=p,r[s+3]=f,r[u+0]=d[0],r[u+1]=d[1],t.addVertex(r)},h.triangulatePolygon=function(e){return(0,y["default"])(e)},h.isOnTileEdge=function(e,t,r){var n=h.valuesWithinTolerance,i=h.tile_bounds[0],a=h.tile_bounds[1];return n(e[0]%g["default"].tile_scale,i.x,r)&&n(t[0]%g["default"].tile_scale,i.x,r)?!0:n(e[0]%g["default"].tile_scale,a.x,r)&&n(t[0]%g["default"].tile_scale,a.x,r)?!0:n(e[1]%g["default"].tile_scale,i.y,r)&&n(t[1]%g["default"].tile_scale,i.y,r)?!0:n(e[1]%g["default"].tile_scale,a.y,r)&&n(t[1]%g["default"].tile_scale,a.y,r)?!0:!1},h.valuesWithinTolerance=function(e,t,r){return r=r||1,Math.abs(e-t)i)){var a=this.calcWidthNextZoom(t.next_width,r);if(!(0===i&&0===a||0>a)&&(n.width=i*r.units_per_meter,n.next_width=2*a-i,n.next_width*=r.units_per_meter,n.next_width/=2,n.color=this.parseColor(t.color,r),n.color)){if(n.z=t.z&&s.StyleParser.cacheDistance(t.z||0,r)||s.StyleParser.defaults.z,n.height=e.properties.height||s.StyleParser.defaults.height,n.extrude=s.StyleParser.evalProp(t.extrude,r),n.extrude&&("number"==typeof n.extrude?n.height=n.extrude:Array.isArray(n.extrude)&&(n.height=n.extrude[1])),n.extrude&&n.height&&(n.z+=n.height),n.cap=t.cap,n.join=t.join,n.miter_limit=t.miter_limit,n.tile_edges=t.tile_edges,n.outline=n.outline||{width:{},next_width:{},preprocessed:!0},t.outline&&t.outline.color&&t.outline.width){var o=2*this.calcWidth(t.outline.width,r),u=2*this.calcWidthNextZoom(t.outline.next_width,r);0===o&&0===u||0>o||0>u?(n.outline.width.value=null,n.outline.next_width.value=null,n.outline.color=null):(n.outline.width.value=o+i,n.outline.next_width.value=u+a,n.outline.color=t.outline.color,n.outline.cap=t.outline.cap||t.cap,n.outline.join=t.outline.join||t.join,n.outline.miter_limit=t.outline.miter_limit||t.miter_limit,n.outline.style=t.outline.style||this.name,t.outline.order?n.outline.order=this.parseOrder(t.outline.order,r):n.outline.order=n.order,n.outline.order>n.order&&(n.outline.order=n.order),n.outline.order-=.5)}else n.outline.width.value=null,n.outline.next_width.value=null,n.outline.color=null;return n}}},_preprocess:function(e){return e.color=s.StyleParser.colorCacheObject(e.color),e.width=s.StyleParser.cacheObject(e.width,s.StyleParser.cacheUnits),e.next_width=s.StyleParser.cacheObject(e.width,s.StyleParser.cacheUnits),e.z=s.StyleParser.cacheObject(e.z,s.StyleParser.cacheUnits),e.outline&&(e.outline.color=s.StyleParser.colorCacheObject(e.outline.color),e.outline.width=s.StyleParser.cacheObject(e.outline.width,s.StyleParser.cacheUnits),e.outline.next_width=s.StyleParser.cacheObject(e.outline.width,s.StyleParser.cacheUnits)),e},makeVertexTemplate:function(e){var t=0;return this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=e.z||0,this.vertex_template[t++]=e.order,this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=e.next_width,this.vertex_template[t++]=255*e.color[0],this.vertex_template[t++]=255*e.color[1],this.vertex_template[t++]=255*e.color[2],this.vertex_template[t++]=255*e.color[3],this.selection&&(this.vertex_template[t++]=255*e.selection_color[0],this.vertex_template[t++]=255*e.selection_color[1],this.vertex_template[t++]=255*e.selection_color[2],this.vertex_template[t++]=255*e.selection_color[3]),this.texcoords&&(this.vertex_template[t++]=0,this.vertex_template[t++]=0),this.vertex_template},buildLines:function(e,t,r,n,i){var a=this.makeVertexTemplate(t);if(p["default"].buildPolylines(e,t.width,r,a,{cap:t.cap,join:t.join,miter_limit:t.miter_limit,scaling_index:this.vertex_layout.index.a_extrude,scaling_normalize:y["default"].scaleInt16(1,256),texcoord_index:this.vertex_layout.index.a_texcoord,texcoord_scale:this.texcoord_scale,texcoord_normalize:65535,closed_polygon:i&&i.closed_polygon,remove_tile_edges:!t.tile_edges&&i&&i.remove_tile_edges,tile_edge_tolerance:g["default"].tile_scale*n.tile.pad_scale*4}),t.outline&&null!=t.outline.color&&null!=t.outline.width.value){var o=u.StyleManager.styles[t.outline.style];o&&o.addFeature(n.feature,t.outline,n)}},buildPolygons:function(e,t,r,n){for(var i=0;i-1},isRightAnchor:function(e){return a.indexOf(e)>-1},isTopAnchor:function(e){return o.indexOf(e)>-1},isBottomAnchor:function(e){return s.indexOf(e)>-1}},t.exports=r["default"]},{}],226:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/create")["default"],i=e("babel-runtime/core-js/object/assign")["default"],a=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o=e("../style"),s=e("../style_parser"),u=e("../../gl/constants"),l=a(u),c=e("../../gl/vertex_layout"),f=a(c),h=e("../builders"),d=a(h),p=e("../../gl/texture"),m=a(p),g=e("../../geo"),v=a(g),y=e("../../utils/utils"),_=a(y),b=e("../../vector"),x=a(b),A=e("../../labels/collision"),w=a(A),E=e("../../labels/label_point"),D=a(E),k=e("loglevel"),T=a(k),F=n(o.Style);r.Points=F,i(F,{name:"points",built_in:!0,selection:!0,blend:"overlay",init:function(){arguments.length<=0||void 0===arguments[0]?{}:arguments[0];o.Style.init.apply(this,arguments),this.vertex_shader_key="styles/points/points_vertex",this.fragment_shader_key="styles/points/points_fragment";var e=[{name:"a_position",size:4,type:l["default"].SHORT,normalized:!0},{name:"a_shape",size:4,type:l["default"].SHORT,normalized:!0},{name:"a_texcoord",size:2,type:l["default"].UNSIGNED_SHORT,normalized:!0},{name:"a_offset",size:2,type:l["default"].SHORT,normalized:!0},{name:"a_color",size:4,type:l["default"].UNSIGNED_BYTE,normalized:!0}];this.selection&&e.push({name:"a_selection_color",size:4,type:l["default"].UNSIGNED_BYTE,normalized:!0}),"overlay"!==this.blend&&(this.defines.TANGRAM_LAYER_ORDER=!0),this.vertex_layout=new f["default"](e),this.texture&&(this.defines.TANGRAM_POINT_TEXTURE=!0,this.shaders.uniforms=this.shaders.uniforms||{},this.shaders.uniforms.u_texture=this.texture),this.queues={}},reset:function(){this.queues={}},addFeature:function(e,t,r){var n=r.tile;if(t=this.preprocess(t)){var i={};if(i.color=this.parseColor(t.color,r),!i.color&&!this.texture)return null;var a=i.sprite=s.StyleParser.evalProp(t.sprite,r);if(i.sprite_default=t.sprite_default,this.texture&&m["default"].textures[this.texture]&&m["default"].textures[this.texture].sprites){if(!a&&!i.sprite_default)return;if(!m["default"].textures[this.texture].sprites[a]){if(!i.sprite_default)return void T["default"].warn("Style: in style '"+this.name+"', could not find sprite '"+a+"' for texture '"+this.texture+"'");if(a=i.sprite_default,!m["default"].textures[this.texture].sprites[a])return void T["default"].warn("Style: in style '"+this.name+"', could not find default sprite '"+a+"' for texture '"+this.texture+"'")}}else a&&(T["default"].warn("Style: in style '"+this.name+"', sprite '"+a+"' was specified, but texture '"+this.texture+"' has no sprites"),a=null);var o=void 0;this.texture&&a?(o=m["default"].getSpriteInfo(this.texture,a),i.texcoords=o.texcoords):i.texcoords=null,i.z=t.z&&s.StyleParser.cacheDistance(t.z,r)||s.StyleParser.defaults.z,i.size=t.size,i.size?i.size=s.StyleParser.cacheProperty(i.size,r):o?i.size=o.size:i.size=[16,16],i.size=[Math.min(i.size[0]||i.size,256),Math.min(i.size[1]||i.size,256)],i.angle=s.StyleParser.evalProp(t.angle,r)||0,i.centroid=null!=t.centroid?t.centroid:!0,this.computeLayout(i,e,t,r,n),this.tile_data[n.key]||this.startData(n.key),this.queues[n.key]||(this.queues[n.key]=[]),this.queues[n.key].push({feature:e,draw:t,context:r,style:i}),w["default"].addStyle(this.name,n.key)}},endData:function(e){var t=this,r=this.queues[e];this.queues[e]=[];var n=[];return r.forEach(function(e){for(var r=e.style,i=e.feature,a=i.geometry,o=t.buildLabelsFromGeometry(r.size,a,r),s=0;s>>0,a.priority=o,a},buildLabelsFromGeometry:function(e,t,r){var n=[];if("Point"===t.type)n.push(new D["default"](t.coordinates,e,r));else if("MultiPoint"===t.type)for(var i=t.coordinates,a=0;a1){for(var t=e[0],r=1;rn&&(n=e[a].length);if(0===n)return null;for(var o=function(n){return r=e.map(function(e){return e[n]&&e[n][t]}),0===r.length?"continue":(r.sort(function(e,t){return(e&&e.layer_name)>(t&&t.layer_name)?1:-1}),k["default"].apply(void 0,[i].concat(_(r))),void delete i.layer_name)},s=0;n>s;s++){o(s)}return i.visible===!1?null:i}function a(e){return C.indexOf(e)>-1}function o(e){return 0===x(e).length}function s(e,t){e.parent&&s(e.parent,t),t(e)}function u(e,t){e.rules&&e.rules.forEach(function(e){u(e,t)}),t(e)}function l(e){var t={},r={};for(var n in e)a(n)?t[n]=e[n]:r[n]=e[n];return[t,r]}function c(e){var t=[];if(e.parent){var r=e.parent.calculatedDraw||[];t.push.apply(t,_(r))}return t.push(e.draw),t}function f(e,t,r){var n={ -name:e,parent:r},i=l(t),a=b(i,2),s=a[0],u=a[1],c=o(u),h=void 0;h=c&&null!=r?j:P;var d=new h(A(n,s));if(r&&r.addRule(d),!c)for(var p in u){var m=u[p];if("object"!=typeof m||Array.isArray(m)){var g="Layer value must be an object: can't create layer '"+p+": "+JSON.stringify(m)+"'";g+=", under parent layer '"+d.full_name+"'.",E.Styles[d.name]&&(g+=" The parent '"+d.name+"' is also the name of a style, did you mean to create a 'draw' group",r&&(g+=" under '"+r.name+"'"),g+=" instead?"),S["default"].warn(g)}else f(p,m,d)}return d}function h(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=f(r,n))}return t}function d(e,t){return null==e.zooms||e.zooms[t.zoom]?"function"==typeof e.filter&&e.filter(t)||null==e.filter:!1}function p(e,t,r,n){var i=!1,a=!1;if(0!==t.length){for(var o=0;or;r++)this.zooms[r]=!0;delete this.filter.$zoom}}},{key:"toJSON",value:function(){return{name:this.name,draw:this.draw}}}]),e}();R.id=0;var j=function(e){function t(e){var r=e.name,n=e.parent,i=e.draw,a=e.visible,o=e.filter,s=e.properties;g(this,t),v(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,{name:r,parent:n,draw:i,visible:a,filter:o,properties:s})}return y(t,e),t}(R);r.RuleLeaf=j;var P=function(e){function t(e){var r=e.name,n=e.parent,i=e.draw,a=e.visible,o=e.rules,s=e.filter,u=e.properties;g(this,t),v(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,{name:r,parent:n,draw:i,visible:a,filter:s,properties:u}),this.rules=o||[]}return y(t,e),m(t,[{key:"addRule",value:function(e){this.rules.push(e)}},{key:"buildDrawGroups",value:function(e){var t=[],r=[];if(p(e,[this],t,r),t.length>0){var a=n(r);if(void 0===M[a]){for(var o=t.map(function(e){return e&&e.visible!==!1&&e.calculatedDraw}),s={},u=0;uo;++o){var s=t.length>o?t[o]:t;this.vertex_template[a+o+i]=s}},startData:function(e){return this.tile_data[e]={vertex_data:null,uniforms:null},this.tile_data[e]},endData:function(e){var t=this.tile_data[e];return t&&t.vertex_data&&(t.vertex_data.end(),t.vertex_data=t.vertex_data.buffer),this.tile_data[e]=null,n.resolve(t)},hasDataForTile:function(e){return null!=this.tile_data[e]},addFeature:function(e,t,r){var n=r.tile;if(n.generation===this.generation){this.tile_data[n.key]||this.startData(n.key);var i=this.parseFeature.apply(this,arguments);i&&(this.tile_data[n.key].vertex_data||(this.tile_data[n.key].vertex_data=this.vertex_layout.createVertexData()),this.buildGeometry(e.geometry,i,this.tile_data[n.key].vertex_data,r))}},buildGeometry:function(e,t,r,n){"Polygon"===e.type?this.buildPolygons([e.coordinates],t,r,n):"MultiPolygon"===e.type?this.buildPolygons(e.coordinates,t,r,n):"LineString"===e.type?this.buildLines([e.coordinates],t,r,n):"MultiLineString"===e.type?this.buildLines(e.coordinates,t,r,n):"Point"===e.type?this.buildPoints([e.coordinates],t,r,n):"MultiPoint"===e.type&&this.buildPoints(e.coordinates,t,r,n)},parseFeature:function(e,t,r){try{var n=this.feature_style;if(t=this.preprocess(t),!t)return;n.order=this.parseOrder(t.order,r);var i=!1;return n.interactive=t.interactive,this.selection&&(i=o.StyleParser.evalProp(n.interactive,r)),i?n.selection_color=u["default"].makeColor(e,r.tile):n.selection_color=u["default"].defaultColor,n=this._parseFeature.apply(this,arguments)}catch(a){A["default"].error("Style.parseFeature: style parsing error",e,n,a)}},_parseFeature:function(e,t,r){return this.feature_style},preprocess:function(e){if(!e.preprocessed){if(e=this._preprocess(e),!e)return;e.preprocessed=!0}return e},_preprocess:function(e){return e},parseOrder:function(e,t){return"number"!=typeof e?o.StyleParser.calculateOrder(e,t):e},parseColor:function(e,t){return e?o.StyleParser.cacheColor(e,t):this.shaders.blocks.color||this.shaders.blocks.filter?o.StyleParser.defaults.color:void 0},buildPolygons:function(){},buildLines:function(){},buildPoints:function(){},setGL:function(e){this.gl=e,this.max_texture_size=p["default"].getMaxTextureSize(this.gl)},makeMesh:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.uniforms;return new h["default"](this.gl,e,this.vertex_layout,{uniforms:r})},compile:function(){if(!this.gl)throw new Error("style.compile(): skipping for "+this.name+" because no GL context");if(this.compiling)throw new Error("style.compile(): skipping for "+this.name+" because style is already compiling");this.compiling=!0,this.compiled=!1;var e=this.buildDefineList();if(this.selection){var t=i({},e);t.TANGRAM_FEATURE_SELECTION=!0}var r=this.shaders&&this.shaders.blocks,n=this.shaders&&this.shaders.block_scopes,a=this.shaders&&this.shaders.uniforms,o=this.shaders&&this.shaders.extensions;"string"==typeof o&&(o=[o]);try{this.program=new c["default"](this.gl,b["default"][this.vertex_shader_key],b["default"][this.fragment_shader_key],{name:this.name,defines:e,uniforms:a,blocks:r,block_scopes:n,extensions:o}),this.program.compile(),this.selection?(this.selection_program=new c["default"](this.gl,b["default"][this.vertex_shader_key],b["default"]["gl/shaders/selection_fragment"],{name:this.name+" (selection)",defines:t,uniforms:a,blocks:r,block_scopes:n,extensions:o}),this.selection_program.compile()):this.selection_program=null}catch(s){throw this.compiling=!1,this.compiled=!1,new Error("style.compile(): style "+this.name+" error:",s)}this.compiling=!1,this.compiled=!0},addShaderBlock:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.shaders.blocks=this.shaders.blocks||{},this.shaders.blocks[e]=this.shaders.blocks[e]||[],this.shaders.blocks[e].push(t),this.shaders.block_scopes=this.shaders.block_scopes||{},this.shaders.block_scopes[e]=this.shaders.block_scopes[e]||[],this.shaders.block_scopes[e].push(r)},removeShaderBlock:function(e){this.shaders.blocks&&(this.shaders.blocks[e]=null)},replaceShaderBlock:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.removeShaderBlock(e),this.addShaderBlock(e,t,r)},buildDefineList:function(){var e={};if(null!=this.defines)for(var t in this.defines)e[t]=this.defines[t];if(null!=this.shaders&&null!=this.shaders.defines)for(t in this.shaders.defines)e[t]=this.shaders.defines[t];return e},setup:function(){this.setUniforms(),this.material.setupProgram(c["default"].current)},setUniforms:function(){var e=c["default"].current;e&&e.setUniforms(this.shaders&&this.shaders.uniforms,!0)},render_states:{opaque:{depth_test:!0,depth_write:!0},add:{depth_test:!0,depth_write:!1},multiply:{depth_test:!0,depth_write:!1},inlay:{depth_test:!0,depth_write:!1},overlay:{depth_test:!1,depth_write:!1}},default_blend_orders:{opaque:0,add:1,multiply:2,inlay:3,overlay:4},blendOrderSort:function(e,t){return"opaque"===e.blend||"opaque"===t.blend?"opaque"===e.blend&&"opaque"===t.blend?e.namet.blend_order?1:w.default_blend_orders[e.blend]w.default_blend_orders[t.blend]?1:e.name0&&(p.width=s.measureText(p.text).width,g=Math.max(g,Math.ceil(p.width)),m.push(p)),e&&(p=o({},d))}var a=this.applyTextTransform(e,r),s=this.context,u=this.text_buffer*l["default"].device_pixel_ratio,c=2*l["default"].device_pixel_ratio,f=this.px_size+c,h=void 0;h="number"==typeof n?a.split(" "):[a];for(var d={width:0,chars:0,text:""},p=o({},d),m=[],g=0,v=0;vn&&p.chars>0&&i(!0),p.chars+=b.length+1,p.text+=b+" ",y.length>1&&_r&&(r=o[0])}}var s=0,u=0,l=0;for(var n in e){var i=e[n];for(var a in i){var c=i[a],o=c.size.texture_size;u+o[1]l&&(l=u)):(s+=r,u=0,c.position=[s,u])}}return[s+r,l]}},{key:"applyTextTransform",value:function(e,t){return"capitalize"===t?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():e}}],[{key:"fontPixelSize",value:function(t){if(null!=t){t="string"==typeof t?t:String(t);var r=t.match(e.font_size_re)||[],n=a(r,3),i=n[1],o=n[2];return o=o||"px","em"===o?i*=16:"pt"===o?i/=.75:"%"===o&&(i/=6.25),i=parseFloat(i),i*=l["default"].device_pixel_ratio}}}]),e}();r["default"]=h,h.font_size_re=/((?:[0-9]*\.)?[0-9]+)\s*(px|pt|em|%)?/,t.exports=r["default"]},{"../../utils/utils":241,"../builders":223,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],233:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/to-consumable-array")["default"],i=e("babel-runtime/core-js/object/create")["default"],a=e("babel-runtime/core-js/object/assign")["default"],o=e("babel-runtime/core-js/object/keys")["default"],s=e("babel-runtime/core-js/promise")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"]; -Object.defineProperty(r,"__esModule",{value:!0});var l=e("../../gl/texture"),c=u(l),f=e("../../utils/worker_broker"),h=u(f),d=e("../../utils/utils"),p=u(d),m=e("../../geo"),g=u(m),v=e("../style"),y=e("../points/points"),_=e("./canvas_text"),b=u(_),x=e("../../labels/collision"),A=u(x),w=e("../../labels/label_point"),E=u(w),D=e("../../labels/label_line"),k=u(D),T=e("./text_settings"),F=u(T),S=e("../style_parser"),C=e("loglevel"),M=u(C),R=i(y.Points);r.TextStyle=R,a(R,{name:"text","super":y.Points,built_in:!0,selection:!1,init:function(){this["super"].init.apply(this,arguments),this.main_thread_target="TextStyle-"+this.name,p["default"].isMainThread&&h["default"].addTarget(this.main_thread_target,this),this.defines.TANGRAM_POINT_TEXTURE=!0,this.defines.TANGRAM_UNMULTIPLY_ALPHA=!0,this.reset()},reset:function(){this["super"].reset.call(this),p["default"].isMainThread?this.canvas=new b["default"]:p["default"].isWorkerThread&&(this.texts={})},freeTile:function(e){delete this.texts[e]},finishTile:function(e){return this.freeTile(e),v.Style.endData.call(this,e)},addFeature:function(e,t,r){var n=r.tile;if(n.generation===this.generation&&(t=this.preprocess(t))){var i=this.parseTextSource(e,t,r);if(null!=i){var a=this.computeLayout({},e,t,r,n,i),o=F["default"].compute(e,t,r),s=F["default"].key(o);this.texts[n.key]=this.texts[n.key]||{},this.texts[n.key][s]=this.texts[n.key][s]||{},this.texts[n.key][s][i]||(this.texts[n.key][s][i]={text_settings:o,ref:0}),this.tile_data[n.key]||this.startData(n.key),this.queues[n.key]||(this.queues[n.key]=[]),this.queues[n.key].push({feature:e,draw:t,context:r,text:i,text_settings_key:s,layout:a}),A["default"].addStyle(this.name,n.key)}}},endData:function(e){var t=this,r=this.queues[e];return this.queues[e]=[],0===o(this.texts[e]||{}).length?s.resolve():h["default"].postMessage(this.main_thread_target+".calcTextSizes",e,this.texts[e]).then(function(n){if(!n)return A["default"].collide({},t.name,e),t.finishTile(e);t.texts[e]=n;var i=t.createLabels(e,r);return A["default"].collide(i,t.name,e).then(function(r){return 0===r.length?t.finishTile(e):(t.cullTextStyles(n,r),h["default"].postMessage(t.main_thread_target+".rasterizeTexts",e,n).then(function(n){var i=n.texts,a=n.texture;return i&&(t.texts[e]=i,r.forEach(function(r){var n=r.text_settings_key,i=t.texts[e]&&t.texts[e][n]&&t.texts[e][n][r.text],a=t.feature_style;a.label=r.label,a.size=i.size.logical_size,a.angle=p["default"].radToDeg(r.label.angle)||0,a.texcoords=i.texcoords,v.Style.addFeature.call(t,r.feature,r.draw,r.context)})),t.finishTile(e).then(function(e){return a&&e?(e.uniforms={u_texture:a},e.textures=[a],e):void 0})}))})})},createLabels:function(e,t){for(var r=[],n=0;nthis.coords.z&&(this.units_per_pixel/=Math.pow(2,this.style_zoom-this.coords.z)),this.meters_per_pixel=f["default"].metersPerPixel(this.coords.z),this.units_per_meter=f["default"].unitsPerMeter(this.coords.z),this.meshes={},this.textures=[]}return n(e,[{key:"freeResources",value:function(){if(this.meshes)for(var e in this.meshes)this.meshes[e].destroy();if(this.textures){var t=!0,r=!1,n=void 0;try{for(var i,a=s(this.textures);!(t=(i=a.next()).done);t=!0){var o=i.value,u=_["default"].textures[o];u&&u.destroy()}}catch(l){r=!0,n=l}finally{try{!t&&a["return"]&&a["return"]()}finally{if(r)throw n}}}this.meshes={},this.textures=[]}},{key:"destroy",value:function(){this.workerMessage("self.removeTile",this.key),this.freeResources(),this.worker=null}},{key:"buildAsMessage",value:function(){return{key:this.key,coord_key:this.coord_key,source:this.source.name,coords:this.coords,min:this.min,max:this.max,units_per_pixel:this.units_per_pixel,meters_per_pixel:this.meters_per_pixel,units_per_meter:this.units_per_meter,style_zoom:this.style_zoom,generation:this.generation,debug:this.debug}}},{key:"workerMessage",value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return v["default"].postMessage.apply(v["default"],[this.worker].concat(t))}},{key:"build",value:function(e){return this.generation=e,this.loaded||(this.loading=!0),this.workerMessage("self.buildTile",{tile:this.buildAsMessage()})["catch"](function(e){throw e})}},{key:"buildMeshes",value:function(e){if(!this.error){this.freeResources(),this.debug.geometries=0,this.debug.buffer_size=0;var t=this.mesh_data;if(t)for(var r in t){if(t[r].vertex_data){if(this.debug.buffer_size+=t[r].vertex_data.byteLength,!e[r]){x["default"].warn("Could not create mesh because style '"+r+"' not found, for tile "+this.key+", aborting tile"),this.meshes={};break}this.meshes[r]=e[r].makeMesh(t[r].vertex_data,t[r]),this.debug.geometries+=this.meshes[r].geometry_count}if(t[r].textures){var n;(n=this.textures).push.apply(n,a(t[r].textures))}}this.debug.geom_ratio=(this.debug.geometries/this.debug.features).toFixed(1),this.mesh_data=null,this.printDebug()}}},{key:"printDebug",value:function(){x["default"].debug("Tile: debug for "+this.key+": [ "+JSON.stringify(this.debug)+" ]")}},{key:"update",value:function(t){var r=this.coords;r.z!==t.center_tile.z&&(r=e.coordinateAtZoom(r,t.center_tile.z)),this.center_dist=Math.abs(t.center_tile.x-r.x)+Math.abs(t.center_tile.y-r.y)}},{key:"merge",value:function(e){for(var t in e)"key"!==t&&(this[t]=e[t]);return this}}],[{key:"create",value:function(t){return new e(t)}},{key:"coordKey",value:function(e){var t=e.x,r=e.y,n=e.z;return[t,r,n].join("/")}},{key:"key",value:function(t,r,n){return t=e.overZoomedCoordinate(t,r.max_zoom),t.y<0||t.y>=1<t.z){var n=e.coordinateAtZoom(r,t.z),i=n.x,a=n.y;return t.x===i&&t.y===a}return!1}},{key:"overZoomedCoordinate",value:function(t,r){var n=t.x,i=t.y,a=t.z;return void 0!==r&&a>r?e.coordinateAtZoom({x:n,y:i,z:a},r):{x:n,y:i,z:a}}},{key:"sort",value:function(e){return e.sort(function(e,t){var r=e.center_dist,n=t.center_dist;return n>r?-1:n===r?0:1})}},{key:"buildGeometry",value:function(t,r,n,i){t.debug.rendering=+new Date,t.debug.features=0;var a=t.source_data;m["default"].startTile(t.key);for(var o in r){var s=r[o];if(s&&s.data){if(s.data.source===t.source)for(var l=e.getDataForSource(a,s.data,o),c=0;cn?-1:i===n?0:1}),this.queued_coords.forEach(function(t){return e.loadCoordinate(t)}),this.queued_coords=[])},loadCoordinate:function(e){if(e.z===this.scene.center_tile.z){var t=!0,r=!1,i=void 0;try{for(var a,o=n(c["default"].values(this.scene.sources));!(t=(a=o.next()).done);t=!0){var s=a.value;if(s.tiled){var l=u["default"].key(e,s,this.scene.tile_zoom);if(l&&!this.hasTile(l)){var f=u["default"].create({source:s,coords:e,worker:this.scene.nextWorker(),style_zoom:this.scene.styleZoom(e.z)});this.keepTile(f),this.buildTile(f)}}}}catch(h){r=!0,i=h}finally{try{!t&&o["return"]&&o["return"]()}finally{if(r)throw i}}}},buildTiles:function(e){var t=this;u["default"].sort(e).forEach(function(e){return t.buildTile(e)}),this.checkBuildQueue()},buildTile:function(e){var t=this;this.tileBuildStart(e.key),this.updateVisibility(e),e.update(this.scene),e.build(this.scene.generation).then(function(e){return t.buildTileCompleted(e)})["catch"](function(){t.forgetTile(e.key),u["default"].abortBuild(e)})},buildTileCompleted:function(e){var t=e.tile;null==this.tiles[t.key]?(h["default"].trace("discarded tile "+t.key+" in TileManager.buildTileCompleted because previously removed"),u["default"].abortBuild(t),this.updateTilesForView()):t.generation!==this.scene.generation?(h["default"].debug("discarded tile "+t.key+" in TileManager.buildTileCompleted because built with "+("scene config gen "+t.generation+", current "+this.scene.generation)),this.forgetTile(t.key),u["default"].abortBuild(t),this.updateTilesForView()):(this.tiles[t.key]&&(t=this.tiles[t.key].merge(t)),this.updateVisibility(t),t.update(this.scene),t.buildMeshes(this.scene.styles),this.scene.requestRedraw()),this.tileBuildStop(t.key)},tileBuildStart:function(e){this.building_tiles=this.building_tiles||{},this.building_tiles[e]=!0,h["default"].trace("tileBuildStart for "+e+": "+i(this.building_tiles).length)},tileBuildStop:function(e){this.building_tiles&&(h["default"].trace("tileBuildStop for "+e+": "+i(this.building_tiles).length),delete this.building_tiles[e],this.checkBuildQueue())},checkBuildQueue:function(){this.building_tiles&&0!==i(this.building_tiles).length||(this.building_tiles=null,this.scene.tileManagerBuildDone())},getDebugSum:function(e,t){var r=0;for(var n in this.tiles)null==this.tiles[n].debug[e]||"function"==typeof t&&t(this.tiles[n])!==!0||(r+=this.tiles[n].debug[e]);return r},getDebugAverage:function(e,t){return this.getDebugSum(e,t)/i(this.tiles).length}},t.exports=r["default"]},{"./tile":235,"./utils/utils":241,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/interop-require-default":23,loglevel:179}],237:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],a=e("babel-runtime/helpers/class-call-check")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o=function(e){function t(e){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.name="MethodNotImplemented",this.message="Method "+e+" must be implemented in subclass"}return i(t,e),t}(Error);r.MethodNotImplemented=o},{"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22}],238:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];for(var a=0;ar;++r)t[0]=Math.min(this.quad[r][0],t[0]),t[1]=Math.min(this.quad[r][1],t[1]),t[2]=Math.max(this.quad[r][0],t[2]),t[3]=Math.max(this.quad[r][1],t[3]);return t}},{key:"perpAxes",value:function(){this.axes[0]=s["default"].normalize(s["default"].sub(this.quad[2],this.quad[3])),this.axes[1]=s["default"].normalize(s["default"].sub(this.quad[2],this.quad[1]))}},{key:"update",value:function(){var e=[Math.cos(this.angle),Math.sin(this.angle)],t=[-Math.sin(this.angle),Math.cos(this.angle)];e=s["default"].mult(e,this.dimension[0]/2),t=s["default"].mult(t,this.dimension[1]/2),this.quad[0]=s["default"].sub(s["default"].sub(this.centroid,e),t),this.quad[1]=s["default"].sub(s["default"].add(this.centroid,e),t),this.quad[2]=s["default"].add(s["default"].add(this.centroid,e),t),this.quad[3]=s["default"].add(s["default"].sub(this.centroid,e),t),this.perpAxes()}}],[{key:"projectToAxis",value:function(e,t){for(var r=1e6,n=r,i=-r,a=e.quad,o=0;4>o;++o){var u=s["default"].dot(a[o],t);n=Math.min(n,u),i=Math.max(i,u)}return[n,i]}},{key:"axisCollide",value:function(t,r,n){for(var i=0;2>i;++i){var a=e.projectToAxis(t,n[i]),o=e.projectToAxis(r,n[i]);if(o[0]>a[1]||o[1]1?a-1:0),u=1;a>u;u++)s[u-1]=arguments[u];for(var l,c=o(t);!(r=(l=c.next()).done);r=!0){var f=l.value;"function"==typeof f[e]&&f[e].apply(f,s)}}catch(h){n=!0,i=h}finally{try{!r&&c["return"]&&c["return"]()}finally{if(n)throw i}}}})}var i=e("babel-runtime/core-js/set")["default"],a=e("babel-runtime/core-js/object/assign")["default"],o=e("babel-runtime/core-js/get-iterator")["default"];Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=n,t.exports=r["default"]},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/set":15}],241:[function(_dereq_,module,exports){"use strict";var _Promise=_dereq_("babel-runtime/core-js/promise")["default"],_getIterator=_dereq_("babel-runtime/core-js/get-iterator")["default"],_Math$log2=_dereq_("babel-runtime/core-js/math/log2")["default"],_regeneratorRuntime=_dereq_("babel-runtime/regenerator")["default"],_Object$keys=_dereq_("babel-runtime/core-js/object/keys")["default"],_interopRequireDefault=_dereq_("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _loglevel=_dereq_("loglevel"),_loglevel2=_interopRequireDefault(_loglevel),_jsYaml=_dereq_("js-yaml"),_jsYaml2=_interopRequireDefault(_jsYaml),_geo=_dereq_("../geo"),_geo2=_interopRequireDefault(_geo),Utils;exports["default"]=Utils={},Utils.addBaseURL=function(e,t){if(e){if("//"===e.substr(0,2))e=window.location.protocol+e;else if(e.search(/^(http|https|data|blob):/)<0){var r,n="/"!==e[0];if(t?(r=document.createElement("a"),r.href=t):r=window.location,n){var i=r.href.match(/([^\#]+)/);i=i&&i.length>1?i[0]:"",e=i+e}else if(r.origin)e=r.origin+"/"+e;else{var a=e.match(/^((http|https|data|blob):\/\/[^\/]*\/)/);a=a&&a.length>1?a[0]:"",e=a+e}}return e}},Utils.pathForURL=function(e){return e&&-1===e.search(/^(data|blob):/)?e.substr(0,e.lastIndexOf("/")+1)||"./":"./"},Utils.cacheBusterForUrl=function(e){return e.search(/^(data|blob):/)>-1?e:e+=e.indexOf("?")>-1?"&"+ +new Date:"?"+ +new Date},Utils._createObjectURL=void 0,Utils.createObjectURL=function(e){return void 0===Utils._createObjectURL&&(Utils._createObjectURL=window.URL&&window.URL.createObjectURL||window.webkitURL&&window.webkitURL.createObjectURL,"function"!=typeof Utils._createObjectURL&&(Utils._createObjectURL=null,_loglevel2["default"].warn("window.URL.createObjectURL (or vendor prefix) not found, unable to create local blob URLs"))),Utils._createObjectURL?Utils._createObjectURL(e):e},Utils.io=function(e){var t=arguments.length<=1||void 0===arguments[1]?6e4:arguments[1],r=arguments.length<=2||void 0===arguments[2]?"text":arguments[2],n=arguments.length<=3||void 0===arguments[3]?"GET":arguments[3],i=(arguments.length<=4||void 0===arguments[4]?{}:arguments[4],new XMLHttpRequest),a=new _Promise(function(a,o){i.open(n,e,!0),i.timeout=t,i.responseType=r,i.onload=function(){200===i.status?a(["text","json"].indexOf(i.responseType)>-1?i.responseText:i.response):o(Error("Request error with a status of "+i.statusText))},i.onerror=function(e){o(Error("There was a network error"+e.toString()))},i.ontimeout=function(e){o(Error("timeout "+e.toString()))},i.send()});return Object.defineProperty(a,"request",{value:i}),a},Utils.parseResource=function(e){var t;try{t=_jsYaml2["default"].safeLoad(e)}catch(r){throw r}return t},Utils.loadResource=function(e){return new _Promise(function(t,r){"string"==typeof e?Utils.io(Utils.cacheBusterForUrl(e)).then(function(e){try{var n=Utils.parseResource(e);t(n)}catch(i){r(i)}},r):t(e)})},Utils.requestAnimationFramePolyfill=function(){"function"!=typeof window.requestAnimationFrame&&(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)})},Utils.serializeWithFunctions=function(e){var t=JSON.stringify(e,function(e,t){return"function"==typeof t?t.toString():t});return t},Utils.deserializeWithFunctions=function(e,t){var r=JSON.parse(e);return r=Utils.stringsToFunctions(r,t)},Utils.stringsToFunctions=function(e,t){if("string"==typeof e)e=Utils.stringToFunction(e,t);else if("object"==typeof e)for(var r in e)e[r]=Utils.stringsToFunctions(e[r],t);return e},Utils.stringToFunction=function(val,wrap){if(null!=val.match(/^\s*function\s*\w*\s*\([\s\S]*\)\s*\{[\s\S]*\}/m)){var f;try{return"function"==typeof wrap?eval("f = "+wrap(val)):eval("f = "+val),f}catch(e){return val}}return val},Utils.log=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];e=e||"info",Utils.isWorkerThread?self.postMessage({type:"log",level:e,worker_id:self._worker_id,msg:r}):"function"==typeof _loglevel2["default"][e]&&_loglevel2["default"][e].apply(_loglevel2["default"],r)},Utils.use_high_density_display=!0,Utils.updateDevicePixelRatio=function(){var e=Utils.device_pixel_ratio;return Utils.device_pixel_ratio=Utils.use_high_density_display&&window.devicePixelRatio||1,Utils.device_pixel_ratio!==e},function(){try{void 0!==window.document&&(Utils.isWorkerThread=!1,Utils.isMainThread=!0,Utils.updateDevicePixelRatio())}catch(e){void 0!==self&&(Utils.isWorkerThread=!0,Utils.isMainThread=!1)}}(),Utils.findCurrentURL=function(){for(var e=document.currentScript,t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];if(e)return e.src;if(Array.isArray(r))for(var i=document.getElementsByTagName("script"),a=0;a-1)return i[a].src}}catch(h){s=!0,u=h}finally{try{!o&&c["return"]&&c["return"]()}finally{if(s)throw u}}}},Utils.isPowerOf2=function(e){return 0===(e&e-1)},Utils.nextPowerOf2=function(e){return Math.pow(2,Math.ceil(_Math$log2(e)))},Utils.interpolate=function(e,t,r){if(!Array.isArray(t)||!Array.isArray(t[0]))return t;if(t.length<1)return t;var n,i,a,o,s,u;if(e<=t[0][0])o=t[0][1],"function"==typeof r&&(o=r(o));else if(e>=t[t.length-1][0])o=t[t.length-1][1],"function"==typeof r&&(o=r(o));else for(var l=0;l=t[l][0]&&et&&Math.round(255*e)||e}).join(", ")+")"},Utils.pointInTile=function(e){return e[0]>=0&&e[1]>-_geo2["default"].tile_scale&&e[0]<_geo2["default"].tile_scale&&e[1]<=0},Utils.hashString=function(e){if(0===e.length)return 0;for(var t=0,r=0,n=e.length;n>r;r++){var i=e.charCodeAt(r);t=(t<<5)-t+i,t|=0}return t},Utils.debounce=function(e,t,r){var n=void 0;return function(){var i=this,a=arguments,o=function(){n=null,r||e.apply(i,a)},s=r&&!n;clearTimeout(n),n=setTimeout(o,t),s&&e.apply(i,a)}},module.exports=exports["default"]},{"../geo":193,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/math/log2":5,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/regenerator":26,"js-yaml":149,loglevel:179}],242:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/define-properties")["default"];Object.defineProperty(r,"__esModule",{value:!0});var i;r["default"]=i=n({major:0,minor:5,patch:0,pre:!1},{string:{get:function(){return"v"+i.major+"."+i.minor+"."+i.patch},configurable:!0,enumerable:!0}}),t.exports=r["default"]},{"babel-runtime/core-js/object/define-properties":8}],243:[function(e,t,r){"use strict";function n(e){var t=[];"string"==typeof e&&(t=e.split("."),e=t.pop());for(var r=v,n=0;n2?r-2:0),i=2;r>i;i++)n[i-2]=arguments[i];if(Array.isArray(e))return l.all(e.map(function(e){var r;return(r=h).postMessage.apply(r,[e,t].concat(n))}));var a=new l(function(e,r){g[m]={method:t,message:n,resolve:e,reject:r}});return e.postMessage({type:"main_send",message_id:m,method:t,message:n}),m++,a};var e=0,t=new c;h.addWorker=function(r){t.set(r,e++),r.addEventListener("message",function(e){if("worker_reply"===e.data.type){var t=e.data.message_id;g[t]&&(e.data.error?g[t].reject(e.data.error):g[t].resolve(e.data.message),delete g[t])}}),r.addEventListener("message",function(e){var t=e.data.message_id;if("worker_send"===e.data.type&&null!=t){var i=n(e.data.method),a=u(i,2),c=a[0],f=a[1];if(!f)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because no object with that name is registered on main thread");var h="function"==typeof f[c]&&f[c];if(!h)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because object has no method with that name");var d,m;try{d=h.apply(f,e.data.message)}catch(g){m=g}var v=void 0;d instanceof l?d.then(function(e){v=o(e),r.postMessage({type:"main_reply",message_id:t,message:e},v.map(function(e){return e.object})),s(v),v.length>0&&p["default"].log("trace","'"+c+"' transferred "+v.length+" objects to worker thread")},function(e){r.postMessage({type:"main_reply",message_id:t,error:e instanceof Error?e.message+": "+e.stack:e})}):(v=o(d),r.postMessage({type:"main_reply",message_id:t,message:d,error:m instanceof Error?m.message+": "+m.stack:m},v.map(function(e){return e.object})),s(v),v.length>0&&p["default"].log("trace","'"+c+"' transferred "+v.length+" objects to worker thread"))}})},h.getMessages=function(){return g},h.getMessageId=function(){return m}}function a(){h.postMessage=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];var i=new l(function(t,n){g[m]={method:e,message:r,resolve:t,reject:n}});return self.postMessage({type:"worker_send",message_id:m,method:e,message:r}),m++,i},self.addEventListener("message",function(e){if("main_reply"===e.data.type){var t=e.data.message_id;g[t]&&(e.data.error?g[t].reject(e.data.error):g[t].resolve(e.data.message),delete g[t])}}),self.addEventListener("message",function(e){var t=e.data.message_id;if("main_send"===e.data.type&&null!=t){var r=n(e.data.method),i=u(r,2),a=i[0],c=i[1];if(!c)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because no object with that name is registered on main thread");var f="function"==typeof c[a]&&c[a];if(!f)throw Error("Worker broker could not dispatch message type "+e.data.method+" because worker has no method with that name");var h,d;try{h=f.apply(c,e.data.message)}catch(m){d=m}var g=void 0;h instanceof l?h.then(function(e){g=o(e),self.postMessage({type:"worker_reply",message_id:t,message:e},g.map(function(e){return e.object})),s(g),g.length>0&&p["default"].log("trace","'"+a+"' transferred "+g.length+" objects to main thread")},function(e){self.postMessage({type:"worker_reply",message_id:t,error:e instanceof Error?e.message+": "+e.stack:e})}):(g=o(h),self.postMessage({type:"worker_reply",message_id:t,message:h,error:d instanceof Error?d.message+": "+d.stack:d},g.map(function(e){return e.object})),s(g),g.length>0&&p["default"].log("trace","'"+a+"' transferred "+g.length+" objects to main thread"))}})}function o(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(!e)return n;if(Array.isArray(e))e.forEach(function(t,r){return o(t,e,r,n)});else if("object"==typeof e)if(e instanceof ArrayBuffer)n.push({object:e,parent:t,property:r});else if(e.buffer instanceof ArrayBuffer)n.push({object:e.buffer,parent:t,property:r});else for(var i in e)o(e[i],e,i,n);return n}function s(e){Array.isArray(e)&&e.filter(function(e){return e.parent&&e.property}).forEach(function(e){return delete e.parent[e.property]})}var u=e("babel-runtime/helpers/sliced-to-array")["default"],l=e("babel-runtime/core-js/promise")["default"],c=e("babel-runtime/core-js/map")["default"],f=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var h,d=e("./utils"),p=f(d);r["default"]=h={};var m=0,g={},v={};h.addTarget=function(e,t){v[e]=t},p["default"].isMainThread&&i(),p["default"].isWorkerThread&&a(),t.exports=r["default"]},{"./utils":241,"babel-runtime/core-js/map":4,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],244:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/sliced-to-array")["default"];Object.defineProperty(r,"__esModule",{value:!0});var i;r["default"]=i={},i.set=function(e){for(var t=[],r=e.length,n=0;r>n;n++)t[n]=e[n];return t},i.neg=function(e){for(var t=[],r=e.length,n=0;r>n;n++)t[n]=-1*e[n];return t},i.add=function(e,t){for(var r=[],n=Math.min(e.length,t.length),i=0;n>i;i++)r[i]=e[i]+t[i];return r},i.sub=function(e,t){for(var r=[],n=Math.min(e.length,t.length),i=0;n>i;i++)r[i]=e[i]-t[i];return r},i.signed_area=function(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1])},i.mult=function(e,t){var r,n=[],i=e.length;if("number"==typeof t)for(r=0;i>r;r++)n[r]=e[r]*t;else for(i=Math.min(e.length,t.length),r=0;i>r;r++)n[r]=e[r]*t[r];return n},i.div=function(e,t){var r,n=[];if("number"==typeof t)for(r=0;rr;r++)n[r]=e[r]/t[r]}return n},i.perp=function(e,t){return[t[1]-e[1],e[0]-t[0]]},i.rot=function(e,t){var r=Math.cos(t),n=Math.sin(t);return[e[0]*r-e[1]*n,e[0]*n+e[1]*r]},i.angle=function(e){var t=n(e,2),r=t[0],i=t[1];return Math.atan2(i,r)},i.isEqual=function(e,t){for(var r=e.length,n=0;r>n;n++)if(e[n]!==t[n])return!1;return!0},i.lengthSq=function(e){return 2===e.length?e[0]*e[0]+e[1]*e[1]:e[0]*e[0]+e[1]*e[1]+e[2]*e[2]},i.length=function(e){return Math.sqrt(i.lengthSq(e))},i.normalize=function(e){var t;return 2===e.length?(t=e[0]*e[0]+e[1]*e[1],t=Math.sqrt(t),0!==t?[e[0]/t,e[1]/t]:[0,0]):(t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],t=Math.sqrt(t),0!==t?[e[0]/t,e[1]/t,e[2]/t]:[0,0,0])},i.cross=function(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]},i.dot=function(e,t){for(var r=0,n=Math.min(e.length,t.length),i=0;n>i;i++)r+=e[i]*t[i];return r},i.lineIntersection=function(e,t,r,n,i){i=i||.01;var a=e[1]-t[1],o=e[0]-t[0],s=r[1]-n[1],u=r[0]-n[0],l=e[0]*t[1]-e[1]*t[0],c=r[0]*n[1]-r[1]*n[0],f=o*s-a*u;return Math.abs(f)>i?[(l*u-o*c)/f,(l*s-a*c)/f]:null},t.exports=r["default"]},{"babel-runtime/helpers/sliced-to-array":24}]},{},[214]); \ No newline at end of file +!function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(a){n.regeneratorRuntime=void 0}t.exports={"default":t.exports,__esModule:!0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":27}],27:[function(e,t){(function(r,n){"use strict";var i=e("babel-runtime/core-js/symbol")["default"],o=e("babel-runtime/core-js/symbol/iterator")["default"],a=e("babel-runtime/core-js/object/create")["default"],s=e("babel-runtime/core-js/promise")["default"];!function(e){function n(e,t,r,n){var i=a((t||l).prototype);return i._invoke=m(e,r||null,new y(n||[])),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function l(){}function c(){}function f(){}function h(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function d(e){this.arg=e}function p(e){function t(t,r){var n=e[t](r),i=n.value;return i instanceof d?s.resolve(i.arg).then(o,a):s.resolve(i).then(function(e){return n.value=e,n})}function n(e,r){var n=i?i.then(function(){return t(e,r)}):new s(function(n){n(t(e,r))});return i=n["catch"](function(){}),n}"object"==typeof r&&r.domain&&(t=r.domain.bind(t));{var i,o=t.bind(e,"next"),a=t.bind(e,"throw");t.bind(e,"return")}this._invoke=n}function m(e,t,r){var n=k;return function(i,o){if(n===F)throw new Error("Generator is already running");if(n===S){if("throw"===i)throw o;return b()}for(;;){var a=r.delegate;if(a){if("return"===i||"throw"===i&&a.iterator[i]===x){r.delegate=null;var s=a.iterator["return"];if(s){var l=u(s,a.iterator,o);if("throw"===l.type){i="throw",o=l.arg;continue}}if("return"===i)continue}var l=u(a.iterator[i],a.iterator,o);if("throw"===l.type){r.delegate=null,i="throw",o=l.arg;continue}i="next",o=x;var c=l.arg;if(!c.done)return n=T,c;r[a.resultName]=c.value,r.next=a.nextLoc,r.delegate=null}if("next"===i)r.sent=n===T?o:x;else if("throw"===i){if(n===k)throw n=S,o;r.dispatchException(o)&&(i="next",o=x)}else"return"===i&&r.abrupt("return",o);n=F;var l=u(e,t,r);if("normal"===l.type){n=r.done?S:T;var c={value:l.arg,done:r.done};if(l.arg!==C)return c;r.delegate&&"next"===i&&(o=x)}else"throw"===l.type&&(n=S,i="throw",o=l.arg)}}}function g(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(g,this),this.reset(!0)}function _(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function i(){for(;++r=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=A.call(i,"catchLoc"),s=A.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),C}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},C}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:void 0)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:184,"babel-runtime/core-js/object/create":7,"babel-runtime/core-js/promise":14,"babel-runtime/core-js/symbol":16,"babel-runtime/core-js/symbol/iterator":17}],28:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a?62:t===s?63:u>t?-1:u+10>t?t-u+26+26:c+26>t?t-c:l+26>t?t-l+26:void 0}function r(e){function r(e){l[f++]=e}var n,i,a,s,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new o(3*e.length/4-u),a=u>0?e.length-4:e.length;var f=0;for(n=0,i=0;a>n;n+=4,i+=3)s=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),l}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,u="";for(i=0,a=e.length-s;a>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(o);switch(s){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),c="A".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],29:[function(e,t,r){"use strict";"use restrict";function n(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var i=32;r.INT_BITS=i,r.INT_MAX=2147483647,r.INT_MIN=-1<0)-(0>e)},r.abs=function(e){var t=e>>i-1;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(t>e)},r.max=function(e,t){return e^(e^t)&-(t>e)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var o=new Array(256);!function(e){for(var t=0;256>t;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|o[e>>>16&255]<<8|o[e>>>24&255]},r.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},r.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},r.interleave3=function(e,t,r){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),e|r<<2},r.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],30:[function(e,t){"use strict";function r(e,t){for(var r=0;e>r;++r)if(!(t[r]<=t[r+e]))return!0;return!1}function n(e,t,n,i){for(var o=0,a=0,s=0,u=e.length;u>s;++s){var l=e[s];if(!r(t,l)){for(var c=0;2*t>c;++c)n[o++]=l[c];i[a++]=s}}return a}function i(e,t,r,i){var o=e.length,l=t.length;if(!(0>=o||0>=l)){var c=e[0].length>>>1;if(!(0>=c)){var f,h=a.mallocDouble(2*c*o),d=a.mallocInt32(o);if(o=n(e,c,h,d),o>0){if(1===c&&i)s.init(o),f=s.sweepComplete(c,r,0,o,h,d,0,o,h,d);else{var p=a.mallocDouble(2*c*l),m=a.mallocInt32(l);l=n(t,c,p,m),l>0&&(s.init(o+l),f=1===c?s.sweepBipartite(c,r,0,o,h,d,0,l,p,m):u(c,r,i,o,h,d,l,p,m),a.free(p),a.free(m))}a.free(h),a.free(d)}return f}}}function o(e,t,r){var n;switch(arguments.length){case 1:return n=[],i(e,e,function(e,t){n.push([e,t])},!0),n;case 2:if("function"==typeof t){var o=t;return i(e,e,o,!0)}return n=[],i(e,t,function(e,t){n.push([e,t])},!1),n;case 3:return i(e,t,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}t.exports=o;var a=e("typedarray-pool"),s=e("./lib/sweep"),u=e("./lib/intersect")},{"./lib/intersect":32,"./lib/sweep":36,"typedarray-pool":187}],31:[function(e,t,r){"use strict";function n(e,t,r){var n="bruteForce"+(e?"Red":"Blue")+(t?"Flip":"")+(r?"Full":""),i=["function ",n,"(",A.join(),"){","var ",l,"=2*",o,";"],u="for(var i="+c+","+p+"="+l+"*"+c+";i<"+f+";++i,"+p+"+="+l+"){var x0="+h+"["+a+"+"+p+"],x1="+h+"["+a+"+"+p+"+"+o+"],xi="+d+"[i];",w="for(var j="+m+","+_+"="+l+"*"+m+";j<"+g+";++j,"+_+"+="+l+"){var y0="+v+"["+a+"+"+_+"],"+(r?"y1="+v+"["+a+"+"+_+"+"+o+"],":"")+"yi="+y+"[j];";return e?i.push(u,x,":",w):i.push(w,x,":",u),i.push(r?"if(y1"+g+"-"+m+"){"),e?(t(!0,!1),a.push("}else{"),t(!1,!1)):(a.push("if("+u+"){"),t(!0,!0),a.push("}else{"),t(!0,!1),a.push("}}else{if("+u+"){"),t(!1,!0),a.push("}else{"),t(!1,!1),a.push("}")),a.push("}}return "+r);var s=i.join("")+a.join(""),l=new Function(s);return l()}var o="d",a="ax",s="vv",u="fp",l="es",c="rs",f="re",h="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",_="bp",b="rv",x="Q",A=[o,a,s,c,f,h,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],32:[function(e,t){"use strict";function r(e,t){var r=8*u.log2(t+1)*(e+1)|0,n=u.nextPow2(E*r);T.lengthF&&(s.free(F),F=s.mallocDouble(i))}function n(e,t,r,n,i,o,a,s,u){var l=E*e;T[l]=t,T[l+1]=r,T[l+2]=n,T[l+3]=i,T[l+4]=o,T[l+5]=a;var c=D*e;F[c]=s,F[c+1]=u}function i(e,t,r,n,i,o,a,s,u,l,c){var f=2*e,h=u*f,d=l[h+t];e:for(var p=i,m=i*f;o>p;++p,m+=f){var g=a[m+t],v=a[m+t+e];if(!(g>d||d>v||n&&d===g)){for(var y=s[p],_=t+1;e>_;++_){var g=a[m+_],v=a[m+_+e],b=l[h+_],x=l[h+_+e];if(b>v||g>x)continue e}var A;if(A=n?r(c,y):r(y,c),void 0!==A)return A}}}function o(e,t,r,n,i,o,a,s,u,l){var c=2*e,f=s*c,h=u[f+t];e:for(var d=n,p=n*c;i>d;++d,p+=c){var m=a[d];if(m!==l){var g=o[p+t],v=o[p+t+e];if(!(g>h||h>v)){for(var y=t+1;e>y;++y){var g=o[p+y],v=o[p+y+e],_=u[f+y],b=u[f+y+e];if(_>v||g>b)continue e}var x=r(m,l);if(void 0!==x)return x}}}}function a(e,t,a,s,u,l,p,k,S){r(e,s+p);var C,M=0,R=2*e;for(n(M++,0,0,s,0,p,a?16:0,-1/0,1/0),a||n(M++,0,0,p,0,s,1,-1/0,1/0);M>0;){M-=1;var j=M*E,P=T[j],I=T[j+1],L=T[j+2],B=T[j+3],N=T[j+4],O=T[j+5],U=M*D,z=F[U],$=F[U+1],G=1&O,q=!!(16&O),V=u,W=l,Y=k,H=S;if(G&&(V=k,W=S,Y=u,H=l),!(2&O&&(L=b(e,P,I,L,V,W,$),I>=L)||4&O&&(I=x(e,P,I,L,V,W,z),I>=L))){var X=L-I,Z=N-B;if(q){if(v>e*X*(X+Z)){if(C=h.scanComplete(e,P,t,I,L,V,W,B,N,Y,H),void 0!==C)return C;continue}}else{if(e*Math.min(X,Z)e*X*Z){if(C=h.scanBipartite(e,P,t,G,I,L,V,W,B,N,Y,H),void 0!==C)return C;continue}}var J=y(e,P,I,L,V,W,z,$);if(J>I)if(m>e*(J-I)){if(C=f(e,P+1,t,I,J,V,W,B,N,Y,H),void 0!==C)return C}else if(P===e-2){if(C=G?h.sweepBipartite(e,t,B,N,Y,H,I,J,V,W):h.sweepBipartite(e,t,I,J,V,W,B,N,Y,H),void 0!==C)return C}else n(M++,P+1,I,J,B,N,G,-1/0,1/0),n(M++,P+1,B,N,I,J,1^G,-1/0,1/0);if(L>J){var K=d(e,P,B,N,Y,H),Q=Y[R*K+P],et=_(e,P,K,N,Y,H,Q);if(N>et&&n(M++,P,J,L,et,N,(4|G)+(q?16:0),Q,$),K>B&&n(M++,P,J,L,B,K,(2|G)+(q?16:0),z,Q),K+1===et){if(C=q?o(e,P,t,J,L,V,W,K,Y,H[K]):i(e,P,t,G,J,L,V,W,K,Y,H[K]),void 0!==C)return C}else if(et>K){var tt;if(q){if(tt=A(e,P,J,L,V,W,Q),tt>J){var rt=_(e,P,J,tt,V,W,Q);if(P===e-2){if(rt>J&&(C=h.sweepComplete(e,t,J,rt,V,W,K,et,Y,H),void 0!==C))return C;if(tt>rt&&(C=h.sweepBipartite(e,t,rt,tt,V,W,K,et,Y,H),void 0!==C))return C}else rt>J&&n(M++,P+1,J,rt,K,et,16,-1/0,1/0),tt>rt&&(n(M++,P+1,rt,tt,K,et,0,-1/0,1/0),n(M++,P+1,K,et,rt,tt,1,-1/0,1/0))}}else tt=G?w(e,P,J,L,V,W,Q):A(e,P,J,L,V,W,Q),tt>J&&(P===e-2?C=G?h.sweepBipartite(e,t,K,et,Y,H,J,tt,V,W):h.sweepBipartite(e,t,J,tt,V,W,K,et,Y,H):(n(M++,P+1,J,tt,K,et,G,-1/0,1/0),n(M++,P+1,K,et,J,tt,1^G,-1/0,1/0)))}}}}}t.exports=a;var s=e("typedarray-pool"),u=e("bit-twiddle"),l=e("./brute"),c=l.partial,f=l.full,h=e("./sweep"),d=e("./median"),p=e("./partition"),m=128,g=1<<22,v=1<<22,y=p("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),_=p("lo===p0",["p0"]),b=p("lou;++u,s+=a)for(var l=i[s],c=u,f=a*(u-1);c>r&&i[f+t]>l;--c,f-=a){for(var h=f,d=f+a,p=0;a>p;++p,++h,++d){var m=i[h];i[h]=i[d],i[d]=m}var g=o[c];o[c]=o[c-1],o[c-1]=g}}function n(e,t,n,i,s,u){if(n+1>=i)return n;for(var l=n,c=i,f=i+n>>>1,h=2*e,d=f,p=s[h*f+t];c>l;){if(a>c-l){r(e,t,l,c,s,u),p=s[h*f+t];break}var m=c-l,g=Math.random()*m+l|0,v=s[h*g+t],y=Math.random()*m+l|0,_=s[h*y+t],b=Math.random()*m+l|0,x=s[h*b+t];_>=v?x>=_?(d=y,p=_):v>=x?(d=g,p=v):(d=b,p=x):_>=x?(d=y,p=_):x>=v?(d=g,p=v):(d=b,p=x);for(var A=h*(c-1),w=h*d,E=0;h>E;++E,++A,++w){var D=s[A];s[A]=s[w],s[w]=D}var k=u[c-1];u[c-1]=u[d],u[d]=k,d=o(e,t,l,c-1,s,u,p);for(var A=h*(c-1),w=h*d,E=0;h>E;++E,++A,++w){var D=s[A];s[A]=s[w],s[w]=D}var k=u[c-1];if(u[c-1]=u[d],u[d]=k,d>f){for(c=d-1;c>l&&s[h*(c-1)+t]===p;)c-=1;c+=1}else{if(!(f>d))break;for(l=d+1;c>l&&s[h*l+t]===p;)l+=1}}return o(e,t,n,f,s,u,s[h*f+t])}t.exports=n;var i=e("./partition"),o=i("lo=0&&i.push("lo=e[k+n]"),e.indexOf("hi")>=0&&i.push("hi=e[k+o]"),r.push(n.replace("_",i.join()).replace("$",e)),Function.apply(void 0,r)}t.exports=r;var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],35:[function(e,t){"use strict";function r(e,t){4*f>=t?n(0,t-1,e):c(0,t-1,e)}function n(e,t,r){for(var n=2*(e+1),i=e+1;t>=i;++i){for(var o=r[n++],a=r[n++],s=i,u=n-2;s-->e;){var l=r[u-2],c=r[u-1];if(o>l)break;if(l===o&&a>c)break;r[u]=l,r[u+1]=c,u-=2}r[u]=o,r[u+1]=a}}function i(e,t,r){e*=2,t*=2;var n=r[e],i=r[e+1];r[e]=r[t],r[e+1]=r[t+1],r[t]=n,r[t+1]=i}function o(e,t,r){e*=2,t*=2,r[e]=r[t],r[e+1]=r[t+1]}function a(e,t,r,n){e*=2,t*=2,r*=2;var i=n[e],o=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=n[r],n[t+1]=n[r+1],n[r]=i,n[r+1]=o}function s(e,t,r,n,i){e*=2,t*=2,i[e]=i[t],i[t]=r,i[e+1]=i[t+1],i[t+1]=n}function u(e,t,r){e*=2,t*=2;var n=r[e],i=r[t];return i>n?!1:n===i?r[e+1]>r[t+1]:!0}function l(e,t,r,n){e*=2;var i=n[e];return t>i?!0:i===t?n[e+1]>1,g=m-h,v=m+h,y=d,_=g,b=m,x=v,A=p,w=e+1,E=t-1,D=0;u(y,_,r)&&(D=y,y=_,_=D),u(x,A,r)&&(D=x,x=A,A=D),u(y,b,r)&&(D=y,y=b,b=D),u(_,b,r)&&(D=_,_=b,b=D),u(y,x,r)&&(D=y,y=x,x=D),u(b,x,r)&&(D=b,b=x,x=D),u(_,A,r)&&(D=_,_=A,A=D),u(_,b,r)&&(D=_,_=b,b=D),u(x,A,r)&&(D=x,x=A,A=D);for(var k=r[2*_],T=r[2*_+1],F=r[2*x],S=r[2*x+1],C=2*y,M=2*b,R=2*A,j=2*d,P=2*m,I=2*p,L=0;2>L;++L){var B=r[C+L],N=r[M+L],O=r[R+L];r[j+L]=B,r[P+L]=N,r[I+L]=O}o(g,e,r),o(v,t,r);for(var U=w;E>=U;++U)if(l(U,k,T,r))U!==w&&i(U,w,r),++w;else if(!l(U,F,S,r))for(;;){if(l(E,F,S,r)){l(E,k,T,r)?(a(U,w,E,r),++w,--E):(i(U,E,r),--E);break}if(--E=w-2-e?n(e,w-2,r):c(e,w-2,r),f>=t-(E+2)?n(E+2,t,r):c(E+2,t,r),f>=E-w?n(w,E,r):c(w,E,r)}t.exports=r;var f=32},{}],36:[function(e,t){"use strict";function r(e){var t=c.nextPow2(e);p.lengthw;++w){var E=s[w],D=_*w;b[y++]=a[D+x],b[y++]=-(E+1),b[y++]=a[D+A],b[y++]=E}for(var w=u;l>w;++w){var E=d[w]+h,k=_*w;b[y++]=c[k+x],b[y++]=-E,b[y++]=c[k+A],b[y++]=E}var T=y>>>1;f(b,T);for(var F=0,S=0,w=0;T>w;++w){var C=0|b[2*w+1];if(C>=h)C=C-h|0,n(g,v,S--,C);else if(C>=0)n(p,m,F--,C);else if(-h>=C){C=-C-h|0;for(var M=0;F>M;++M){var R=t(p[M],C);if(void 0!==R)return R}i(g,v,S++,C)}else{C=-C-1|0;for(var M=0;S>M;++M){var R=t(C,g[M]);if(void 0!==R)return R}i(p,m,F++,C)}}}function a(e,t,r,o,a,s,u,l,c,h){for(var d=0,x=2*e,A=e-1,w=x-1,E=r;o>E;++E){var D=s[E]+1<<1,k=x*E;b[d++]=a[k+A],b[d++]=-D,b[d++]=a[k+w],b[d++]=D}for(var E=u;l>E;++E){var D=h[E]+1<<1,T=x*E;b[d++]=c[T+A],b[d++]=1|-D,b[d++]=c[T+w],b[d++]=1|D}var F=d>>>1;f(b,F);for(var S=0,C=0,M=0,E=0;F>E;++E){var R=0|b[2*E+1],j=1&R;if(F-1>E&&R>>1===b[2*E+3]>>1&&(j=2,E+=1),0>R){for(var P=-(R>>1)-1,I=0;M>I;++I){var L=t(y[I],P);if(void 0!==L)return L}if(0!==j)for(var I=0;S>I;++I){var L=t(p[I],P);if(void 0!==L)return L}if(1!==j)for(var I=0;C>I;++I){var L=t(g[I],P);if(void 0!==L)return L}0===j?i(p,m,S++,P):1===j?i(g,v,C++,P):2===j&&i(y,_,M++,P)}else{var P=(R>>1)-1;0===j?n(p,m,S--,P):1===j?n(g,v,C--,P):2===j&&n(y,_,M--,P)}}}function s(e,t,r,o,a,s,u,l,c,d,g,v){var y=0,_=2*e,x=t,A=t+e,w=1,E=1;o?E=h:w=h;for(var D=a;s>D;++D){var k=D+w,T=_*D;b[y++]=u[T+x],b[y++]=-k,b[y++]=u[T+A],b[y++]=k}for(var D=c;d>D;++D){var k=D+E,F=_*D;b[y++]=g[F+x],b[y++]=-k}var S=y>>>1;f(b,S);for(var C=0,D=0;S>D;++D){var M=0|b[2*D+1];if(0>M){var k=-M,R=!1;if(k>=h?(R=!o,k-=h):(R=!!o,k-=1),R)i(p,m,C++,k);else{var j=v[k],P=_*k,I=g[P+t+1],L=g[P+t+1+e];e:for(var B=0;C>B;++B){var N=p[B],O=_*N;if(!(LU;++U)if(g[P+U+e]y;++y){var _=y+h,x=m*y;b[d++]=o[x+g],b[d++]=-_,b[d++]=o[x+v],b[d++]=_}for(var y=s;u>y;++y){var _=y+1,A=m*y;b[d++]=l[A+g],b[d++]=-_}var w=d>>>1;f(b,w);for(var E=0,y=0;w>y;++y){var D=0|b[2*y+1];if(0>D){var _=-D;if(_>=h)p[E++]=_-h;else{_-=1;var k=c[_],T=m*_,F=l[T+t+1],S=l[T+t+1+e];e:for(var C=0;E>C;++C){var M=p[C],R=a[M];if(R===k)break;var j=m*M;if(!(SP;++P)if(l[T+P+e]=0;--C)if(p[C]===_){for(var P=C+1;E>P;++P)p[P-1]=p[P];break}--E}}}t.exports={init:r,sweepBipartite:o,sweepComplete:a,scanBipartite:s,scanComplete:u};var l=e("typedarray-pool"),c=e("bit-twiddle"),f=e("./sort"),h=1<<28,d=1024,p=l.mallocInt32(d),m=l.mallocInt32(d),g=l.mallocInt32(d),v=l.mallocInt32(d),y=l.mallocInt32(d),_=l.mallocInt32(d),b=l.mallocDouble(8*d)},{"./sort":35,"bit-twiddle":29,"typedarray-pool":187}],37:[function(){},{}],38:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i,o=typeof e;if("number"===o)i=e>0?e>>>0:0;else if("string"===o)"base64"===t&&(e=w(e)),i=n.byteLength(e,t);else{if("object"!==o||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&I(e.data)&&(e=e.data),i=+e.length>0?Math.floor(+e.length):0}if(this.length>L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");var a;n.TYPED_ARRAY_SUPPORT?a=n._augment(new Uint8Array(i)):(a=this,a.length=i,a._isBuffer=!0);var s;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)a._set(e);else if(D(e))if(n.isBuffer(e))for(s=0;i>s;s++)a[s]=e.readUInt8(s);else for(s=0;i>s;s++)a[s]=(e[s]%256+256)%256;else if("string"===o)a.write(e,0,t);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT&&!r)for(s=0;i>s;s++)a[s]=0;return a}function i(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+a]=s}return a}function o(e,t,r,n){var i=M(T(t),e,r,n);return i}function a(e,t,r,n){var i=M(F(t),e,r,n);return i}function s(e,t,r,n){return a(e,t,r,n)}function u(e,t,r,n){var i=M(C(t),e,r,n);return i}function l(e,t,r,n){var i=M(S(t),e,r,n,2);return i}function c(e,t,r){return j.fromByteArray(0===t&&r===e.length?e:e.slice(t,r))}function f(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;r>o;o++)e[o]<=127?(n+=R(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+R(i)}function h(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function d(e,t,r){return h(e,t,r)}function p(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=k(e[o]);return i}function m(e,t,r){for(var n=e.slice(t,r),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,r,i,o,a){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>o||a>t)throw new TypeError("value is out of bounds");if(r+i>e.length)throw new TypeError("index out of range")}function y(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);o>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function _(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);o>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function b(e,t,r,n,i,o){if(t>i||o>t)throw new TypeError("value is out of bounds");if(r+n>e.length)throw new TypeError("index out of range")}function x(e,t,r,n,i){return i||b(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),P.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,i){return i||b(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),P.write(e,t,r,n,52,8),r+8}function w(e){for(e=E(e).replace(N,"");e.length%4!==0;)e+="=";return e}function E(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function D(e){return I(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function k(e){return 16>e?"0"+e.toString(16):e.toString(16)}function T(e){for(var t=[],r=0;r=n)t.push(n);else{var i=r;n>=55296&&57343>=n&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),a=0;a>8,n=t%256,i.push(n),i.push(r);return i}function C(e){return j.toByteArray(e)}function M(e,t,r,n,i){i&&(n-=n%i);for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function R(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var j=e("base64-js"),P=e("ieee754"),I=e("is-array"); +r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var L=1073741823;n.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var r=e.length,i=t.length,o=0,a=Math.min(r,i);a>o&&e[o]===t[o];o++);return o!==a&&(r=e[o],i=t[o]),i>r?-1:r>i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!I(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new n(0);if(1===e.length)return e[0];var r;if(void 0===t)for(t=0,r=0;r>>1;break;case"utf8":case"utf-8":r=T(e).length;break;case"base64":r=C(e).length;break;default:r=e.length}return r},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(e,t,r){var n=!1;if(t>>>=0,r=void 0===r||1/0===r?this.length:r>>>0,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return p(this,t,r);case"utf8":case"utf-8":return f(this,t,r);case"ascii":return h(this,t,r);case"binary":return d(this,t,r);case"base64":return c(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}},n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===n.compare(this,e)},n.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},n.prototype.compare=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return n.compare(this,e)},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var c=n;n=t,t=r,r=c}t=Number(t)||0;var f=this.length-t;r?(r=Number(r),r>f&&(r=f)):r=f,n=String(n||"utf8").toLowerCase();var h;switch(n){case"hex":h=i(this,e,t,r);break;case"utf8":case"utf-8":h=o(this,e,t,r);break;case"ascii":h=a(this,e,t,r);break;case"binary":h=s(this,e,t,r);break;case"base64":h=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=l(this,e,t,r);break;default:throw new TypeError("Unknown encoding: "+n)}return h},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r=this.length;if(e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e),n.TYPED_ARRAY_SUPPORT)return n._augment(this.subarray(e,t));for(var i=t-e,o=new n(i,void 0,!0),a=0;i>a;a++)o[a]=this[a+e];return o},n.prototype.readUInt8=function(e,t){return t||g(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return t||g(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return t||g(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return t||g(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return t||g(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readInt8=function(e,t){return t||g(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||g(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){t||g(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return t||g(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||g(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||g(e,4,this.length),P.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||g(e,4,this.length),P.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||g(e,8,this.length),P.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||g(e,8,this.length),P.read(this,e,!1,52,8)},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):_(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):_(this,e,t,!1),t+4},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):_(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):_(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,i){var o=this;if(r||(r=0),i||0===i||(i=this.length),t||(t=0),i!==r&&0!==e.length&&0!==o.length){if(r>i)throw new TypeError("sourceEnd < sourceStart");if(0>t||t>=e.length)throw new TypeError("targetStart out of bounds");if(0>r||r>=o.length)throw new TypeError("sourceStart out of bounds");if(0>i||i>o.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-ta||!n.TYPED_ARRAY_SUPPORT)for(var s=0;a>s;s++)e[s+t]=this[s+r];else e._set(this.subarray(r,r+a),t)}},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new TypeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new TypeError("start out of bounds");if(0>r||r>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=T(e.toString()),o=i.length;for(n=t;r>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var B=n.prototype;n._augment=function(e){return e.constructor=n,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=B.get,e.set=B.set,e.write=B.write,e.toString=B.toString,e.toLocaleString=B.toString,e.toJSON=B.toJSON,e.equals=B.equals,e.compare=B.compare,e.copy=B.copy,e.slice=B.slice,e.readUInt8=B.readUInt8,e.readUInt16LE=B.readUInt16LE,e.readUInt16BE=B.readUInt16BE,e.readUInt32LE=B.readUInt32LE,e.readUInt32BE=B.readUInt32BE,e.readInt8=B.readInt8,e.readInt16LE=B.readInt16LE,e.readInt16BE=B.readInt16BE,e.readInt32LE=B.readInt32LE,e.readInt32BE=B.readInt32BE,e.readFloatLE=B.readFloatLE,e.readFloatBE=B.readFloatBE,e.readDoubleLE=B.readDoubleLE,e.readDoubleBE=B.readDoubleBE,e.writeUInt8=B.writeUInt8,e.writeUInt16LE=B.writeUInt16LE,e.writeUInt16BE=B.writeUInt16BE,e.writeUInt32LE=B.writeUInt32LE,e.writeUInt32BE=B.writeUInt32BE,e.writeInt8=B.writeInt8,e.writeInt16LE=B.writeInt16LE,e.writeInt16BE=B.writeInt16BE,e.writeInt32LE=B.writeInt32LE,e.writeInt32BE=B.writeInt32BE,e.writeFloatLE=B.writeFloatLE,e.writeFloatBE=B.writeFloatBE,e.writeDoubleLE=B.writeDoubleLE,e.writeDoubleBE=B.writeDoubleBE,e.fill=B.fill,e.inspect=B.inspect,e.toArrayBuffer=B.toArrayBuffer,e};var N=/[^+\/0-9A-z]/g},{"base64-js":28,ieee754:144,"is-array":147}],39:[function(e,t){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/$.core").Array.from},{"../../modules/$.core":64,"../../modules/es6.array.from":116,"../../modules/es6.string.iterator":128}],40:[function(e,t){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":114,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],41:[function(e,t){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.is-iterable")},{"../modules/core.is-iterable":115,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],42:[function(e,t){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/$.core").Map},{"../modules/$.core":64,"../modules/es6.map":118,"../modules/es6.object.to-string":125,"../modules/es6.string.iterator":128,"../modules/es7.map.to-json":130,"../modules/web.dom.iterable":132}],43:[function(e,t){e("../../modules/es6.math.log2"),t.exports=e("../../modules/$.core").Math.log2},{"../../modules/$.core":64,"../../modules/es6.math.log2":119}],44:[function(e,t){e("../../modules/es6.object.assign"),t.exports=e("../../modules/$.core").Object.assign},{"../../modules/$.core":64,"../../modules/es6.object.assign":120}],45:[function(e,t){var r=e("../../modules/$");t.exports=function(e,t){return r.create(e,t)}},{"../../modules/$":89}],46:[function(e,t){var r=e("../../modules/$");t.exports=function(e,t){return r.setDescs(e,t)}},{"../../modules/$":89}],47:[function(e,t){var r=e("../../modules/$");t.exports=function(e,t,n){return r.setDesc(e,t,n)}},{"../../modules/$":89}],48:[function(e,t){e("../../modules/es6.object.freeze"),t.exports=e("../../modules/$.core").Object.freeze},{"../../modules/$.core":64,"../../modules/es6.object.freeze":121}],49:[function(e,t){var r=e("../../modules/$");e("../../modules/es6.object.get-own-property-descriptor"),t.exports=function(e,t){return r.getDesc(e,t)}},{"../../modules/$":89,"../../modules/es6.object.get-own-property-descriptor":122}],50:[function(e,t){e("../../modules/es6.object.keys"),t.exports=e("../../modules/$.core").Object.keys},{"../../modules/$.core":64,"../../modules/es6.object.keys":123}],51:[function(e,t){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/$.core").Object.setPrototypeOf},{"../../modules/$.core":64,"../../modules/es6.object.set-prototype-of":124}],52:[function(e,t){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),t.exports=e("../modules/$.core").Promise},{"../modules/$.core":64,"../modules/es6.object.to-string":125,"../modules/es6.promise":126,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":132}],53:[function(e,t){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.set"),e("../modules/es7.set.to-json"),t.exports=e("../modules/$.core").Set},{"../modules/$.core":64,"../modules/es6.object.to-string":125,"../modules/es6.set":127,"../modules/es6.string.iterator":128,"../modules/es7.set.to-json":131,"../modules/web.dom.iterable":132}],54:[function(e,t){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),t.exports=e("../../modules/$.core").Symbol},{"../../modules/$.core":64,"../../modules/es6.object.to-string":125,"../../modules/es6.symbol":129}],55:[function(e,t){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/$.wks")("iterator")},{"../../modules/$.wks":112,"../../modules/es6.string.iterator":128,"../../modules/web.dom.iterable":132}],56:[function(e,t){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],57:[function(e,t){t.exports=function(){}},{}],58:[function(e,t){var r=e("./$.is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./$.is-object":82}],59:[function(e,t){var r=e("./$.cof"),n=e("./$.wks")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,o,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=(t=Object(e))[n])?o:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},{"./$.cof":60,"./$.wks":112}],60:[function(e,t){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],61:[function(e,t){"use strict";var r=e("./$"),n=e("./$.hide"),i=e("./$.redefine-all"),o=e("./$.ctx"),a=e("./$.strict-new"),s=e("./$.defined"),u=e("./$.for-of"),l=e("./$.iter-define"),c=e("./$.iter-step"),f=e("./$.uid")("id"),h=e("./$.has"),d=e("./$.is-object"),p=e("./$.set-species"),m=e("./$.descriptors"),g=Object.isExtensible||d,v=m?"_s":"size",y=0,_=function(e,t){if(!d(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!h(e,f)){if(!g(e))return"F";if(!t)return"E";n(e,f,++y)}return"O"+e[f]},b=function(e,t){var r,n=_(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,n,l){var c=e(function(e,i){a(e,c,t),e._i=r.create(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=i&&u(i,n,e[l],e)});return i(c.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[v]=0},"delete":function(e){var t=this,r=b(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[v]--}return!!r},forEach:function(e){for(var t,r=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!b(this,e)}}),m&&r.setDesc(c.prototype,"size",{get:function(){return s(this[v])}}),c},def:function(e,t,r){var n,i,o=b(e,t);return o?o.v=r:(e._l=o={i:i=_(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=o),n&&(n.n=o),e[v]++,"F"!==i&&(e._i[i]=o)),e},getEntry:b,setStrong:function(e,t,r){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?c(0,r.k):"values"==t?c(0,r.v):c(0,[r.k,r.v]):(e._t=void 0,c(1))},r?"entries":"values",!r,!0),p(t)}}},{"./$":89,"./$.ctx":65,"./$.defined":66,"./$.descriptors":67,"./$.for-of":72,"./$.has":75,"./$.hide":76,"./$.is-object":82,"./$.iter-define":85,"./$.iter-step":87,"./$.redefine-all":96,"./$.set-species":100,"./$.strict-new":104,"./$.uid":111}],62:[function(e,t){var r=e("./$.for-of"),n=e("./$.classof");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return r(this,!1,t.push,t),t}}},{"./$.classof":59,"./$.for-of":72}],63:[function(e,t){"use strict";var r=e("./$"),n=e("./$.global"),i=e("./$.export"),o=e("./$.fails"),a=e("./$.hide"),s=e("./$.redefine-all"),u=e("./$.for-of"),l=e("./$.strict-new"),c=e("./$.is-object"),f=e("./$.set-to-string-tag"),h=e("./$.descriptors");t.exports=function(e,t,d,p,m,g){var v=n[e],y=v,_=m?"set":"add",b=y&&y.prototype,x={};return h&&"function"==typeof y&&(g||b.forEach&&!o(function(){(new y).entries().next()}))?(y=t(function(t,r){l(t,y,e),t._c=new v,void 0!=r&&u(r,m,t[_],t)}),r.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(e){var t="add"==e||"set"==e;e in b&&(!g||"clear"!=e)&&a(y.prototype,e,function(r,n){if(!t&&g&&!c(r))return"get"==e?void 0:!1;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in b&&r.setDesc(y.prototype,"size",{get:function(){return this._c.size}})):(y=p.getConstructor(t,e,m,_),s(y.prototype,d)),f(y,e),x[e]=y,i(i.G+i.W+i.F,x),g||p.setStrong(y,e,m),y}},{"./$":89,"./$.descriptors":67,"./$.export":70,"./$.fails":71,"./$.for-of":72,"./$.global":74,"./$.hide":76,"./$.is-object":82,"./$.redefine-all":96,"./$.set-to-string-tag":101,"./$.strict-new":104}],64:[function(e,t){var r=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=r)},{}],65:[function(e,t){var r=e("./$.a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./$.a-function":56}],66:[function(e,t){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],67:[function(e,t){t.exports=!e("./$.fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./$.fails":71}],68:[function(e,t){var r=e("./$.is-object"),n=e("./$.global").document,i=r(n)&&r(n.createElement);t.exports=function(e){return i?n.createElement(e):{}}},{"./$.global":74,"./$.is-object":82}],69:[function(e,t){var r=e("./$");t.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var i,o=n(e),a=r.isEnum,s=0;o.length>s;)a.call(e,i=o[s++])&&t.push(i);return t}},{"./$":89}],70:[function(e,t){var r=e("./$.global"),n=e("./$.core"),i=e("./$.ctx"),o="prototype",a=function(e,t,s){var u,l,c,f=e&a.F,h=e&a.G,d=e&a.S,p=e&a.P,m=e&a.B,g=e&a.W,v=h?n:n[t]||(n[t]={}),y=h?r:d?r[t]:(r[t]||{})[o];h&&(s=t);for(u in s)l=!f&&y&&u in y,l&&u in v||(c=l?y[u]:s[u],v[u]=h&&"function"!=typeof y[u]?s[u]:m&&l?i(c,r):g&&y[u]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[o]=e[o],t}(c):p&&"function"==typeof c?i(Function.call,c):c,p&&((v[o]||(v[o]={}))[u]=c))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},{"./$.core":64,"./$.ctx":65,"./$.global":74}],71:[function(e,t){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],72:[function(e,t){var r=e("./$.ctx"),n=e("./$.iter-call"),i=e("./$.is-array-iter"),o=e("./$.an-object"),a=e("./$.to-length"),s=e("./core.get-iterator-method");t.exports=function(e,t,u,l){var c,f,h,d=s(e),p=r(u,l,t?2:1),m=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(i(d))for(c=a(e.length);c>m;m++)t?p(o(f=e[m])[0],f[1]):p(e[m]);else for(h=d.call(e);!(f=h.next()).done;)n(h,p,f.value,t)}},{"./$.an-object":58,"./$.ctx":65,"./$.is-array-iter":80,"./$.iter-call":83,"./$.to-length":109,"./core.get-iterator-method":113}],73:[function(e,t){var r=e("./$.to-iobject"),n=e("./$").getNames,i={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch(t){return o.slice()}};t.exports.get=function(e){return o&&"[object Window]"==i.call(e)?a(e):n(r(e))}},{"./$":89,"./$.to-iobject":108}],74:[function(e,t){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],75:[function(e,t){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],76:[function(e,t){var r=e("./$"),n=e("./$.property-desc");t.exports=e("./$.descriptors")?function(e,t,i){return r.setDesc(e,t,n(1,i))}:function(e,t,r){return e[t]=r,e}},{"./$":89,"./$.descriptors":67,"./$.property-desc":95}],77:[function(e,t){t.exports=e("./$.global").document&&document.documentElement},{"./$.global":74}],78:[function(e,t){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],79:[function(e,t){var r=e("./$.cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./$.cof":60}],80:[function(e,t){var r=e("./$.iterators"),n=e("./$.wks")("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||i[n]===e)}},{"./$.iterators":88,"./$.wks":112}],81:[function(e,t){var r=e("./$.cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./$.cof":60}],82:[function(e,t){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],83:[function(e,t){var r=e("./$.an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var a=e["return"];throw void 0!==a&&r(a.call(e)),o}}},{"./$.an-object":58}],84:[function(e,t){"use strict";var r=e("./$"),n=e("./$.property-desc"),i=e("./$.set-to-string-tag"),o={};e("./$.hide")(o,e("./$.wks")("iterator"),function(){return this}),t.exports=function(e,t,a){e.prototype=r.create(o,{next:n(1,a)}),i(e,t+" Iterator")}},{"./$":89,"./$.hide":76,"./$.property-desc":95,"./$.set-to-string-tag":101,"./$.wks":112}],85:[function(e,t){"use strict";var r=e("./$.library"),n=e("./$.export"),i=e("./$.redefine"),o=e("./$.hide"),a=e("./$.has"),s=e("./$.iterators"),u=e("./$.iter-create"),l=e("./$.set-to-string-tag"),c=e("./$").getProto,f=e("./$.wks")("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",m="values",g=function(){return this};t.exports=function(e,t,v,y,_,b,x){u(v,t,y);var A,w,E=function(e){if(!h&&e in F)return F[e];switch(e){case p:return function(){return new v(this,e)};case m:return function(){return new v(this,e)}}return function(){return new v(this,e)}},D=t+" Iterator",k=_==m,T=!1,F=e.prototype,S=F[f]||F[d]||_&&F[_],C=S||E(_);if(S){var M=c(C.call(new e));l(M,D,!0),!r&&a(F,d)&&o(M,f,g),k&&S.name!==m&&(T=!0,C=function(){return S.call(this)})}if(r&&!x||!h&&!T&&F[f]||o(F,f,C),s[t]=C,s[D]=g,_)if(A={values:k?C:E(m),keys:b?C:E(p),entries:k?E("entries"):C},x)for(w in A)w in F||i(F,w,A[w]);else n(n.P+n.F*(h||T),t,A);return A}},{"./$":89,"./$.export":70,"./$.has":75,"./$.hide":76,"./$.iter-create":84,"./$.iterators":88,"./$.library":91,"./$.redefine":97,"./$.set-to-string-tag":101,"./$.wks":112}],86:[function(e,t){var r=e("./$.wks")("iterator"),n=!1;try{var i=[7][r]();i["return"]=function(){n=!0},Array.from(i,function(){throw 2})}catch(o){}t.exports=function(e,t){if(!t&&!n)return!1;var i=!1;try{var o=[7],a=o[r]();a.next=function(){i=!0},o[r]=function(){return a},e(o)}catch(s){}return i}},{"./$.wks":112}],87:[function(e,t){t.exports=function(e,t){return{value:t,done:!!e}}},{}],88:[function(e,t){t.exports={}},{}],89:[function(e,t){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},{}],90:[function(e,t){var r=e("./$"),n=e("./$.to-iobject");t.exports=function(e,t){for(var i,o=n(e),a=r.getKeys(o),s=a.length,u=0;s>u;)if(o[i=a[u++]]===t)return i}},{"./$":89,"./$.to-iobject":108}],91:[function(e,t){t.exports=!0},{}],92:[function(e,t){var r,n,i,o=e("./$.global"),a=e("./$.task").set,s=o.MutationObserver||o.WebKitMutationObserver,u=o.process,l=o.Promise,c="process"==e("./$.cof")(u),f=function(){var e,t,i;for(c&&(e=u.domain)&&(u.domain=null,e.exit());r;)t=r.domain,i=r.fn,t&&t.enter(),i(),t&&t.exit(),r=r.next;n=void 0,e&&e.enter()};if(c)i=function(){u.nextTick(f)};else if(s){var h=1,d=document.createTextNode("");new s(f).observe(d,{characterData:!0}),i=function(){d.data=h=-h}}else i=l&&l.resolve?function(){l.resolve().then(f)}:function(){a.call(o,f)};t.exports=function(e){var t={fn:e,next:void 0,domain:c&&u.domain};n&&(n.next=t),r||(r=t,i()),n=t}},{"./$.cof":60,"./$.global":74,"./$.task":106}],93:[function(e,t){var r=e("./$"),n=e("./$.to-object"),i=e("./$.iobject");t.exports=e("./$.fails")(function(){var e=Object.assign,t={},r={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(e){r[e]=e}),7!=e({},t)[n]||Object.keys(e({},r)).join("")!=i})?function(e){for(var t=n(e),o=arguments,a=o.length,s=1,u=r.getKeys,l=r.getSymbols,c=r.isEnum;a>s;)for(var f,h=i(o[s++]),d=l?u(h).concat(l(h)):u(h),p=d.length,m=0;p>m;)c.call(h,f=d[m++])&&(t[f]=h[f]);return t}:Object.assign},{"./$":89,"./$.fails":71,"./$.iobject":79,"./$.to-object":110}],94:[function(e,t){var r=e("./$.export"),n=e("./$.core"),i=e("./$.fails");t.exports=function(e,t){var o=(n.Object||{})[e]||Object[e],a={};a[e]=t(o),r(r.S+r.F*i(function(){o(1)}),"Object",a)}},{"./$.core":64,"./$.export":70,"./$.fails":71}],95:[function(e,t){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],96:[function(e,t){var r=e("./$.redefine");t.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},{"./$.redefine":97}],97:[function(e,t){t.exports=e("./$.hide")},{"./$.hide":76}],98:[function(e,t){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],99:[function(e,t){var r=e("./$").getDesc,n=e("./$.is-object"),i=e("./$.an-object"),o=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,i){try{i=e("./$.ctx")(Function.call,r(Object.prototype,"__proto__").set,2),i(t,[]),n=!(t instanceof Array)}catch(a){n=!0}return function(e,t){return o(e,t),n?e.__proto__=t:i(e,t),e}}({},!1):void 0),check:o}},{"./$":89,"./$.an-object":58,"./$.ctx":65,"./$.is-object":82}],100:[function(e,t){"use strict";var r=e("./$.core"),n=e("./$"),i=e("./$.descriptors"),o=e("./$.wks")("species");t.exports=function(e){var t=r[e];i&&t&&!t[o]&&n.setDesc(t,o,{configurable:!0,get:function(){return this}})}},{"./$":89,"./$.core":64,"./$.descriptors":67,"./$.wks":112}],101:[function(e,t){var r=e("./$").setDesc,n=e("./$.has"),i=e("./$.wks")("toStringTag");t.exports=function(e,t,o){e&&!n(e=o?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},{"./$":89,"./$.has":75,"./$.wks":112}],102:[function(e,t){var r=e("./$.global"),n="__core-js_shared__",i=r[n]||(r[n]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./$.global":74}],103:[function(e,t){var r=e("./$.an-object"),n=e("./$.a-function"),i=e("./$.wks")("species");t.exports=function(e,t){var o,a=r(e).constructor;return void 0===a||void 0==(o=r(a)[i])?t:n(o)}},{"./$.a-function":56,"./$.an-object":58,"./$.wks":112}],104:[function(e,t){t.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},{}],105:[function(e,t){var r=e("./$.to-integer"),n=e("./$.defined");t.exports=function(e){return function(t,i){var o,a,s=String(n(t)),u=r(i),l=s.length;return 0>u||u>=l?e?"":void 0:(o=s.charCodeAt(u),55296>o||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},{"./$.defined":66,"./$.to-integer":107}],106:[function(e,t){var r,n,i,o=e("./$.ctx"),a=e("./$.invoke"),s=e("./$.html"),u=e("./$.dom-create"),l=e("./$.global"),c=l.process,f=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,p=0,m={},g="onreadystatechange",v=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){v.call(e.data)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++p]=function(){a("function"==typeof e?e:Function(e),t)},r(p),p},h=function(e){delete m[e]},"process"==e("./$.cof")(c)?r=function(e){c.nextTick(o(v,e,1))}:d?(n=new d,i=n.port2,n.port1.onmessage=y,r=o(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",y,!1)):r=g in u("script")?function(e){s.appendChild(u("script"))[g]=function(){s.removeChild(this),v.call(e)}}:function(e){setTimeout(o(v,e,1),0)}),t.exports={set:f,clear:h}},{"./$.cof":60,"./$.ctx":65,"./$.dom-create":68,"./$.global":74,"./$.html":77,"./$.invoke":78}],107:[function(e,t){var r=Math.ceil,n=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},{}],108:[function(e,t){var r=e("./$.iobject"),n=e("./$.defined");t.exports=function(e){return r(n(e))}},{"./$.defined":66,"./$.iobject":79}],109:[function(e,t){var r=e("./$.to-integer"),n=Math.min;t.exports=function(e){return e>0?n(r(e),9007199254740991):0}},{"./$.to-integer":107}],110:[function(e,t){var r=e("./$.defined");t.exports=function(e){return Object(r(e))}},{"./$.defined":66}],111:[function(e,t){var r=0,n=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},{}],112:[function(e,t){var r=e("./$.shared")("wks"),n=e("./$.uid"),i=e("./$.global").Symbol;t.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||n)("Symbol."+e))}},{"./$.global":74,"./$.shared":102,"./$.uid":111}],113:[function(e,t){var r=e("./$.classof"),n=e("./$.wks")("iterator"),i=e("./$.iterators");t.exports=e("./$.core").getIteratorMethod=function(e){return void 0!=e?e[n]||e["@@iterator"]||i[r(e)]:void 0}},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],114:[function(e,t){var r=e("./$.an-object"),n=e("./core.get-iterator-method");t.exports=e("./$.core").getIterator=function(e){var t=n(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},{"./$.an-object":58,"./$.core":64,"./core.get-iterator-method":113}],115:[function(e,t){var r=e("./$.classof"),n=e("./$.wks")("iterator"),i=e("./$.iterators");t.exports=e("./$.core").isIterable=function(e){var t=Object(e);return void 0!==t[n]||"@@iterator"in t||i.hasOwnProperty(r(t))}},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],116:[function(e){"use strict";var t=e("./$.ctx"),r=e("./$.export"),n=e("./$.to-object"),i=e("./$.iter-call"),o=e("./$.is-array-iter"),a=e("./$.to-length"),s=e("./core.get-iterator-method");r(r.S+r.F*!e("./$.iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var r,u,l,c,f=n(e),h="function"==typeof this?this:Array,d=arguments,p=d.length,m=p>1?d[1]:void 0,g=void 0!==m,v=0,y=s(f);if(g&&(m=t(m,p>2?d[2]:void 0,2)),void 0==y||h==Array&&o(y))for(r=a(f.length),u=new h(r);r>v;v++)u[v]=g?m(f[v],v):f[v];else for(c=y.call(f),u=new h;!(l=c.next()).done;v++)u[v]=g?i(c,m,[l.value,v],!0):l.value;return u.length=v,u}})},{"./$.ctx":65,"./$.export":70,"./$.is-array-iter":80,"./$.iter-call":83,"./$.iter-detect":86,"./$.to-length":109,"./$.to-object":110,"./core.get-iterator-method":113}],117:[function(e,t){"use strict";var r=e("./$.add-to-unscopables"),n=e("./$.iter-step"),i=e("./$.iterators"),o=e("./$.to-iobject");t.exports=e("./$.iter-define")(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,n(1)):"keys"==t?n(0,r):"values"==t?n(0,e[r]):n(0,[r,e[r]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries") +},{"./$.add-to-unscopables":57,"./$.iter-define":85,"./$.iter-step":87,"./$.iterators":88,"./$.to-iobject":108}],118:[function(e){"use strict";var t=e("./$.collection-strong");e("./$.collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var r=t.getEntry(this,e);return r&&r.v},set:function(e,r){return t.def(this,0===e?0:e,r)}},t,!0)},{"./$.collection":63,"./$.collection-strong":61}],119:[function(e){var t=e("./$.export");t(t.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{"./$.export":70}],120:[function(e){var t=e("./$.export");t(t.S+t.F,"Object",{assign:e("./$.object-assign")})},{"./$.export":70,"./$.object-assign":93}],121:[function(e){var t=e("./$.is-object");e("./$.object-sap")("freeze",function(e){return function(r){return e&&t(r)?e(r):r}})},{"./$.is-object":82,"./$.object-sap":94}],122:[function(e){var t=e("./$.to-iobject");e("./$.object-sap")("getOwnPropertyDescriptor",function(e){return function(r,n){return e(t(r),n)}})},{"./$.object-sap":94,"./$.to-iobject":108}],123:[function(e){var t=e("./$.to-object");e("./$.object-sap")("keys",function(e){return function(r){return e(t(r))}})},{"./$.object-sap":94,"./$.to-object":110}],124:[function(e){var t=e("./$.export");t(t.S,"Object",{setPrototypeOf:e("./$.set-proto").set})},{"./$.export":70,"./$.set-proto":99}],125:[function(e,t){t.exports=e(37)},{"/Users/bcamper/Documents/dev/vector-map/node_modules/browser-resolve/empty.js":37}],126:[function(e){"use strict";var t,r=e("./$"),n=e("./$.library"),i=e("./$.global"),o=e("./$.ctx"),a=e("./$.classof"),s=e("./$.export"),u=e("./$.is-object"),l=e("./$.an-object"),c=e("./$.a-function"),f=e("./$.strict-new"),h=e("./$.for-of"),d=e("./$.set-proto").set,p=e("./$.same-value"),m=e("./$.wks")("species"),g=e("./$.species-constructor"),v=e("./$.microtask"),y="Promise",_=i.process,b="process"==a(_),x=i[y],A=function(e){var t=new x(function(){});return e&&(t.constructor=Object),x.resolve(t)===t},w=function(){function t(e){var r=new x(e);return d(r,t.prototype),r}var n=!1;try{if(n=x&&x.resolve&&A(),d(t,x),t.prototype=r.create(x.prototype,{constructor:{value:t}}),t.resolve(5).then(function(){})instanceof t||(n=!1),n&&e("./$.descriptors")){var i=!1;x.resolve(r.setDesc({},"then",{get:function(){i=!0}})),n=i}}catch(o){n=!1}return n}(),E=function(e,r){return n&&e===x&&r===t?!0:p(e,r)},D=function(e){var t=l(e)[m];return void 0!=t?t:e},k=function(e){var t;return u(e)&&"function"==typeof(t=e.then)?t:!1},T=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=c(t),this.reject=c(r)},F=function(e){try{e()}catch(t){return{error:t}}},S=function(e,t){if(!e.n){e.n=!0;var r=e.c;v(function(){for(var n=e.v,o=1==e.s,a=0,s=function(t){var r,i,a=o?t.ok:t.fail,s=t.resolve,u=t.reject;try{a?(o||(e.h=!0),r=a===!0?n:a(n),r===t.promise?u(TypeError("Promise-chain cycle")):(i=k(r))?i.call(r,s,u):s(r)):u(n)}catch(l){u(l)}};r.length>a;)s(r[a++]);r.length=0,e.n=!1,t&&setTimeout(function(){var t,r,o=e.p;C(o)&&(b?_.emit("unhandledRejection",n,o):(t=i.onunhandledrejection)?t({promise:o,reason:n}):(r=i.console)&&r.error&&r.error("Unhandled promise rejection",n)),e.a=void 0},1)})}},C=function(e){var t,r=e._d,n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(t=n[i++],t.fail||!C(t.promise))return!1;return!0},M=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),S(t,!0))},R=function(e){var t,r=this;if(!r.d){r.d=!0,r=r.r||r;try{if(r.p===e)throw TypeError("Promise can't be resolved itself");(t=k(e))?v(function(){var n={r:r,d:!1};try{t.call(e,o(R,n,1),o(M,n,1))}catch(i){M.call(n,i)}}):(r.v=e,r.s=1,S(r,!1))}catch(n){M.call({r:r,d:!1},n)}}};w||(x=function(e){c(e);var t=this._d={p:f(this,x,y),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(o(R,t,1),o(M,t,1))}catch(r){M.call(t,r)}},e("./$.redefine-all")(x.prototype,{then:function(e,t){var r=new T(g(this,x)),n=r.promise,i=this._d;return r.ok="function"==typeof e?e:!0,r.fail="function"==typeof t&&t,i.c.push(r),i.a&&i.a.push(r),i.s&&S(i,!1),n},"catch":function(e){return this.then(void 0,e)}})),s(s.G+s.W+s.F*!w,{Promise:x}),e("./$.set-to-string-tag")(x,y),e("./$.set-species")(y),t=e("./$.core")[y],s(s.S+s.F*!w,y,{reject:function(e){var t=new T(this),r=t.reject;return r(e),t.promise}}),s(s.S+s.F*(!w||A(!0)),y,{resolve:function(e){if(e instanceof x&&E(e.constructor,this))return e;var t=new T(this),r=t.resolve;return r(e),t.promise}}),s(s.S+s.F*!(w&&e("./$.iter-detect")(function(e){x.all(e)["catch"](function(){})})),y,{all:function(e){var t=D(this),n=new T(t),i=n.resolve,o=n.reject,a=[],s=F(function(){h(e,!1,a.push,a);var n=a.length,s=Array(n);n?r.each.call(a,function(e,r){var a=!1;t.resolve(e).then(function(e){a||(a=!0,s[r]=e,--n||i(s))},o)}):i(s)});return s&&o(s.error),n.promise},race:function(e){var t=D(this),r=new T(t),n=r.reject,i=F(function(){h(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i&&n(i.error),r.promise}})},{"./$":89,"./$.a-function":56,"./$.an-object":58,"./$.classof":59,"./$.core":64,"./$.ctx":65,"./$.descriptors":67,"./$.export":70,"./$.for-of":72,"./$.global":74,"./$.is-object":82,"./$.iter-detect":86,"./$.library":91,"./$.microtask":92,"./$.redefine-all":96,"./$.same-value":98,"./$.set-proto":99,"./$.set-species":100,"./$.set-to-string-tag":101,"./$.species-constructor":103,"./$.strict-new":104,"./$.wks":112}],127:[function(e){"use strict";var t=e("./$.collection-strong");e("./$.collection")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return t.def(this,e=0===e?0:e,e)}},t)},{"./$.collection":63,"./$.collection-strong":61}],128:[function(e){"use strict";var t=e("./$.string-at")(!0);e("./$.iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,r=this._t,n=this._i;return n>=r.length?{value:void 0,done:!0}:(e=t(r,n),this._i+=e.length,{value:e,done:!1})})},{"./$.iter-define":85,"./$.string-at":105}],129:[function(e){"use strict";var t=e("./$"),r=e("./$.global"),n=e("./$.has"),i=e("./$.descriptors"),o=e("./$.export"),a=e("./$.redefine"),s=e("./$.fails"),u=e("./$.shared"),l=e("./$.set-to-string-tag"),c=e("./$.uid"),f=e("./$.wks"),h=e("./$.keyof"),d=e("./$.get-names"),p=e("./$.enum-keys"),m=e("./$.is-array"),g=e("./$.an-object"),v=e("./$.to-iobject"),y=e("./$.property-desc"),_=t.getDesc,b=t.setDesc,x=t.create,A=d.get,w=r.Symbol,E=r.JSON,D=E&&E.stringify,k=!1,T=f("_hidden"),F=t.isEnum,S=u("symbol-registry"),C=u("symbols"),M="function"==typeof w,R=Object.prototype,j=i&&s(function(){return 7!=x(b({},"a",{get:function(){return b(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=_(R,t);n&&delete R[t],b(e,t,r),n&&e!==R&&b(R,t,n)}:b,P=function(e){var t=C[e]=x(w.prototype);return t._k=e,i&&k&&j(R,e,{configurable:!0,set:function(t){n(this,T)&&n(this[T],e)&&(this[T][e]=!1),j(this,e,y(1,t))}}),t},I=function(e){return"symbol"==typeof e},L=function(e,t,r){return r&&n(C,t)?(r.enumerable?(n(e,T)&&e[T][t]&&(e[T][t]=!1),r=x(r,{enumerable:y(0,!1)})):(n(e,T)||b(e,T,y(1,{})),e[T][t]=!0),j(e,t,r)):b(e,t,r)},B=function(e,t){g(e);for(var r,n=p(t=v(t)),i=0,o=n.length;o>i;)L(e,r=n[i++],t[r]);return e},N=function(e,t){return void 0===t?x(e):B(x(e),t)},O=function(e){var t=F.call(this,e);return t||!n(this,e)||!n(C,e)||n(this,T)&&this[T][e]?t:!0},U=function(e,t){var r=_(e=v(e),t);return!r||!n(C,t)||n(e,T)&&e[T][t]||(r.enumerable=!0),r},z=function(e){for(var t,r=A(v(e)),i=[],o=0;r.length>o;)n(C,t=r[o++])||t==T||i.push(t);return i},$=function(e){for(var t,r=A(v(e)),i=[],o=0;r.length>o;)n(C,t=r[o++])&&i.push(C[t]);return i},G=function(e){if(void 0!==e&&!I(e)){for(var t,r,n=[e],i=1,o=arguments;o.length>i;)n.push(o[i++]);return t=n[1],"function"==typeof t&&(r=t),(r||!m(t))&&(t=function(e,t){return r&&(t=r.call(this,e,t)),I(t)?void 0:t}),n[1]=t,D.apply(E,n)}},q=s(function(){var e=w();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))});M||(w=function(){if(I(this))throw TypeError("Symbol is not a constructor");return P(c(arguments.length>0?arguments[0]:void 0))},a(w.prototype,"toString",function(){return this._k}),I=function(e){return e instanceof w},t.create=N,t.isEnum=O,t.getDesc=U,t.setDesc=L,t.setDescs=B,t.getNames=d.get=z,t.getSymbols=$,i&&!e("./$.library")&&a(R,"propertyIsEnumerable",O,!0));var V={"for":function(e){return n(S,e+="")?S[e]:S[e]=w(e)},keyFor:function(e){return h(S,e)},useSetter:function(){k=!0},useSimple:function(){k=!1}};t.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=f(e);V[e]=M?t:P(t)}),k=!0,o(o.G+o.W,{Symbol:w}),o(o.S,"Symbol",V),o(o.S+o.F*!M,"Object",{create:N,defineProperty:L,defineProperties:B,getOwnPropertyDescriptor:U,getOwnPropertyNames:z,getOwnPropertySymbols:$}),E&&o(o.S+o.F*(!M||q),"JSON",{stringify:G}),l(w,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},{"./$":89,"./$.an-object":58,"./$.descriptors":67,"./$.enum-keys":69,"./$.export":70,"./$.fails":71,"./$.get-names":73,"./$.global":74,"./$.has":75,"./$.is-array":81,"./$.keyof":90,"./$.library":91,"./$.property-desc":95,"./$.redefine":97,"./$.set-to-string-tag":101,"./$.shared":102,"./$.to-iobject":108,"./$.uid":111,"./$.wks":112}],130:[function(e){var t=e("./$.export");t(t.P,"Map",{toJSON:e("./$.collection-to-json")("Map")})},{"./$.collection-to-json":62,"./$.export":70}],131:[function(e){var t=e("./$.export");t(t.P,"Set",{toJSON:e("./$.collection-to-json")("Set")})},{"./$.collection-to-json":62,"./$.export":70}],132:[function(e){e("./es6.array.iterator");var t=e("./$.iterators");t.NodeList=t.HTMLCollection=t.Array},{"./$.iterators":88,"./es6.array.iterator":117}],133:[function(e,t,r){function n(e){return e=Math.round(e),0>e?0:e>255?255:e}function i(e){return 0>e?0:e>1?1:e}function o(e){return n("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function a(e){return i("%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function s(e,t,r){return 0>r?r+=1:r>1&&(r-=1),1>6*r?e+(t-e)*r*6:1>2*r?t:2>3*r?e+(t-e)*(2/3-r)*6:e}function u(e){var t=e.replace(/ /g,"").toLowerCase();if(t in l)return l[t].slice();if("#"===t[0]){if(4===t.length){var r=parseInt(t.substr(1),16);return r>=0&&4095>=r?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===t.length){var r=parseInt(t.substr(1),16);return r>=0&&16777215>=r?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=t.indexOf("("),u=t.indexOf(")");if(-1!==i&&u+1===t.length){var c=t.substr(0,i),f=t.substr(i+1,u-(i+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=a(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),h];case"hsla":if(4!==f.length)return null;h=a(f.pop());case"hsl":if(3!==f.length)return null;var d=(parseFloat(f[0])%360+360)%360/360,p=a(f[1]),m=a(f[2]),g=.5>=m?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),h];default:return null}}return null}var l={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=u}catch(c){}},{}],134:[function(e,t){"use strict";function r(e,t,n){var i=0|e[n];if(0>=i)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;i>o;++o)a[o]=t;else for(o=0;i>o;++o)a[o]=r(e,t,n+1);return a}function n(e,t){var r,n;for(r=new Array(e),n=0;e>n;++n)r[n]=t;return r}function i(e,t){switch("undefined"==typeof t&&(t=0),typeof e){case"number":if(e>0)return n(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}t.exports=i},{}],135:[function(e,t){"use strict";function r(e){for(var t,r,i,a,s,l,c,f,h=n(e[0],!0),d=0,p=80,m=0;p>d&&m=p){t=h.next,r=a=t.p[0],i=s=t.p[1];do l=t.p[0],c=t.p[1],r>l&&(r=l),i>c&&(i=c),l>a&&(a=l),c>s&&(s=c),t=t.next;while(t!==h);f=Math.max(a-r,s-i)}e.length>1&&(h=u(e,h));var g=[];return h&&o(h,g,r,i,f),g}function n(e,t){var r,n,i,o=0,a=e.length;for(r=0,n=a-1;a>r;n=r++){var s=e[r],u=e[n];o+=(u[0]-s[0])*(s[1]+u[1])}if(t===o>0)for(r=0;a>r;r++)i=E(e[r],i);else for(r=a-1;r>=0;r--)i=E(e[r],i);return i}function i(e){var t,r=e;do if(t=!1,v(r.p,r.next.p)||0===g(r.prev.p,r.p,r.next.p)){if(r.prev.next=r.next,r.next.prev=r.prev,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ),r=e=r.prev,r===r.next)return null;t=!0}else r=r.next;while(t||r!==e);return e}function o(e,t,r,n,u,l){if(e=i(e)){l||void 0===r||f(e,r,n,u);for(var c,h,d=e;e.prev!==e.next;)if(c=e.prev,h=e.next,a(e,r,n,u))t.push(c.p,e.p,h.p),h.prev=c,c.next=h,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),e=h.next,d=h.next;else if(e=h,e===d){l?s(e,t,r,n,u):o(e,t,r,n,u,!0);break}}}function a(e,t,r,n){var i=e.prev.p,o=e.p,a=e.next.p,s=i[0],u=o[0],l=a[0],c=i[1],f=o[1],h=a[1],p=s*f-c*u,m=s*h-c*l,g=l*f-h*u,v=p-m-g;if(0>=v)return!1;var y,_,b,x,A,w,E,D=h-c,k=s-l,T=c-f,F=u-s;if(void 0!==t){var S=u>s?l>s?s:l:l>u?u:l,C=f>c?h>c?c:h:h>f?f:h,M=s>u?s>l?s:l:u>l?u:l,R=c>f?c>h?c:h:f>h?f:h,j=d(S,C,t,r,n),P=d(M,R,t,r,n);for(E=e.nextZ;E&&E.z<=P;)if(y=E.p,E=E.nextZ,y!==i&&y!==a&&(_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+p,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w)))))return!1;for(E=e.prevZ;E&&E.z>=j;)if(y=E.p,E=E.prevZ,y!==i&&y!==a&&(_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+p,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w)))))return!1}else for(E=e.next.next;E!==e.prev;)if(y=E.p,E=E.next,_=y[0],b=y[1],x=D*_+k*b-m,x>=0&&(A=T*_+F*b+p,A>=0&&(w=v-x-A,w>=0&&(x&&A||x&&w||A&&w))))return!1;return!0}function s(e,t,r,n,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(m(a,s)){var u=w(a,s);return o(a,t,r,n,i),void o(u,t,r,n,i)}s=s.next}a=a.next}while(a!==e)}function u(e,t){for(var r=e.length,o=[],a=1;r>a;a++){var s=i(n(e[a],!1));s&&o.push(p(s))}for(o.sort(A),a=0;a=i[1]){var c=n[0]+(u-n[1])*(i[0]-n[0])/(i[1]-n[1]);s>=c&&c>l&&(l=c,r=n[0]=k?-1:1,F=r,S=1/0;for(o=r.next;o!==F;)f=o.p[0],h=o.p[1],d=s-f,d>=0&&f>=v&&(p=(A*f+w*h-x)*T,p>=0&&(m=(E*f+D*h+_)*T,m>=0&&k*T-p-m>=0&&(g=Math.abs(u-h)/d,S>g&&b(o,e)&&(r=o,S=g)))),o=o.next;return r}function f(e,t,r,n){var i=e;do i.z=i.z||d(i.p[0],i.p[1],t,r,n),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,h(i)}function h(e){for(var t,r,n,i,o,a,s,u,l=1;;){for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;l>t&&(s++,n=n.nextZ,n);t++);for(u=l;s>0||u>0&&n;)0===s?(i=n,n=n.nextZ,u--):0!==u&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--):(i=r,r=r.nextZ,s--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}if(o.nextZ=null,1>=a)return e;l*=2}}function d(e,t,r,n,i){return e=1e3*(e-r)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=1e3*(t-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function p(e){var t=e,r=e;do t.p[0]0?1:0>n?-1:0}function v(e,t){return e[0]===t[0]&&e[1]===t[1]}function y(e,t,r,n){return g(e,t,r)!==g(e,t,n)&&g(r,n,e)!==g(r,n,t)}function _(e,t,r){var n=e;do{var i=n.p,o=n.next.p;if(i!==t&&o!==t&&i!==r&&o!==r&&y(i,o,t,r))return!0;n=n.next}while(n!==e);return!1}function b(e,t){return-1===g(e.prev.p,e.p,e.next.p)?-1!==g(e.p,t.p,e.next.p)&&-1!==g(e.p,e.prev.p,t.p):-1===g(e.p,t.p,e.prev.p)||-1===g(e.p,e.next.p,t.p)}function x(e,t,r){var n=e,i=!1,o=(t[0]+r[0])/2,a=(t[1]+r[1])/2;do{var s=n.p,u=n.next.p;s[1]>a!=u[1]>a&&o<(u[0]-s[0])*(a-s[1])/(u[1]-s[1])+s[0]&&(i=!i),n=n.next}while(n!==e);return i}function A(e,t){return e.p[0]-t.p[0]}function w(e,t){var r=new D(e.p),n=new D(t.p),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,r}function E(e,t){var r=new D(e);return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function D(e){this.p=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null}t.exports=r},{}],136:[function(e,t){"use strict";function r(e,t,r,o,a,s,u,l){if(r/=t,o/=t,u>=r&&o>=l)return e;if(u>o||r>l)return null;for(var c=[],f=0;f=r&&o>=d)c.push(p);else if(!(h>o||r>d)){var v=1===g?n(m,r,o,a):i(m,r,o,a,s,3===g);v.length&&c.push({geometry:v,type:g,tags:e[f].tags||null,min:p.min,max:p.max})}}return c.length?c:null}function n(e,t,r,n){for(var i=[],o=0;o=t&&r>=s&&i.push(a)}return i}function i(e,t,r,n,i,a){for(var s=[],u=0;uc;c++)l=p||m[c],p=m[c+1],h=d||l[n],d=p[n],t>h?d>r?(_.push(i(l,p,t),i(l,p,r)),a||(_=o(s,_,g,v))):d>=t&&_.push(i(l,p,t)):h>r?t>d?(_.push(i(l,p,r),i(l,p,t)),a||(_=o(s,_,g,v))):r>=d&&_.push(i(l,p,r)):(_.push(l),t>d?(_.push(i(l,p,t)),a||(_=o(s,_,g,v))):d>r&&(_.push(i(l,p,r)),a||(_=o(s,_,g,v))));l=m[y-1],h=l[n],h>=t&&r>=h&&_.push(l),f=_[_.length-1],a&&f&&(_[0][0]!==f[0]||_[0][1]!==f[1])&&_.push(_[0]),o(s,_,g,v)}return s}function o(e,t,r,n){return t.length&&(t.area=r,t.dist=n,e.push(t)),[]}t.exports=r},{}],137:[function(e,t){"use strict";function r(e,t){var r=[];if("FeatureCollection"===e.type)for(var i=0;in?-1:n>1?1:n,[r,n,0]}function s(e){for(var t,r,n=0,i=0,o=0;o1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var s=0;a>s;s++){var u=o(i.geometry[0][s],t,e.z2,e.x,e.y);if(u[0]!==-r&&u[0]!==t+r||u[1]!==-r&&u[1]!==t+r)return!1}return!0}t.exports=r;var f=e("./convert"),h=e("./clip"),d=e("./wrap"),p=e("./tile");n.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},n.prototype.splitTile=function(e,t,r,n,i,o,l){for(var f=[e,t,r,n],d=this.options,m=d.debug;f.length;){n=f.pop(),r=f.pop(),t=f.pop(),e=f.pop();var g=1<1&&console.time("creation"),y=this.tiles[v]=p(e,g,r,n,_,t===d.maxZoom),this.tileCoords.push({z:t,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,y.numFeatures,y.numPoints,y.numSimplified),console.timeEnd("creation"));var b="z"+t;this.stats[b]=(this.stats[b]||0)+1,this.total++}if(y.source=e,d.solidChildren||!c(y,d.extent,d.buffer)){if(i){if(t===d.maxZoom||t===i)continue;var x=1<1&&console.time("clipping");var A,w,E,D,k,T,F=.5*d.buffer/d.extent,S=.5-F,C=.5+F,M=1+F;A=w=E=D=null,k=h(e,g,r-F,r+C,0,s,y.min[0],y.max[0]),T=h(e,g,r+S,r+M,0,s,y.min[0],y.max[0]),k&&(A=h(k,g,n-F,n+C,1,u,y.min[1],y.max[1]),w=h(k,g,n+S,n+M,1,u,y.min[1],y.max[1])),T&&(E=h(T,g,n-F,n+C,1,u,y.min[1],y.max[1]),D=h(T,g,n+S,n+M,1,u,y.min[1],y.max[1])),m>1&&console.timeEnd("clipping"),A&&f.push(A,t+1,2*r,2*n),w&&f.push(w,t+1,2*r,2*n+1),E&&f.push(E,t+1,2*r+1,2*n),D&&f.push(D,t+1,2*r+1,2*n+1)}}},n.prototype.getTile=function(e,t,r){var n=this.options,o=n.extent,s=n.debug,u=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var f,h=e,d=t,p=r;!f&&h>0;)h--,d=Math.floor(d/2),p=Math.floor(p/2),f=this.tiles[a(h,d,p)];if(!f)return null;if(s>1&&console.log("found parent tile z%d-%d-%d",h,d,p),f.source){if(c(f,o,n.buffer))return i(f,o);s>1&&console.time("drilling down"),this.splitTile(f.source,h,d,p,e,t,r),s>1&&console.timeEnd("drilling down")}return this.tiles[l]?i(this.tiles[l],o):null}},{"./clip":136,"./convert":137,"./tile":140,"./wrap":141}],139:[function(e,t){"use strict";function r(e,t){var r,i,o,a,s=t*t,u=e.length,l=0,c=u-1,f=[];for(e[l][2]=1,e[c][2]=1;c;){for(i=0,r=l+1;c>r;r++)o=n(e[r],e[l],e[c]),o>i&&(a=r,i=o);i>s?(e[a][2]=i,f.push(l),f.push(a),l=a):(c=f.pop(),l=f.pop())}}function n(e,t,r){var n=t[0],i=t[1],o=r[0],a=r[1],s=e[0],u=e[1],l=o-n,c=a-i;if(0!==l||0!==c){var f=((s-n)*l+(u-i)*c)/(l*l+c*c);f>1?(n=o,i=a):f>0&&(n+=l*f,i+=c*f)}return l=s-n,c=u-i,l*l+c*c}t.exports=r},{}],140:[function(e,t){"use strict";function r(e,t,r,i,o,a){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:t,transformed:!1,min:[2,1],max:[-1,0]},u=0;us.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function n(e,t,r,n){var i,o,a,s,u=t.geometry,l=t.type,c=[],f=r*r;if(1===l)for(i=0;if)&&(h.push(s),e.numSimplified++),e.numPoints++;c.push(h)}else e.numPoints+=a.length;c.length&&e.features.push({geometry:c,type:l,tags:t.tags||null})}t.exports=r},{}],141:[function(e,t){"use strict";function r(e,t,r){var i=e,a=o(e,1,-1-t,t,0,r,-1,2),s=o(e,1,1-t,2+t,0,r,-1,2);return(a||s)&&(i=o(e,1,-t,1+t,0,r,-1,2),a&&(i=n(a,1).concat(i)),s&&(i=i.concat(n(s,-1)))),i}function n(e,t){for(var r=[],n=0;n0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},a.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},a.cross=function(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},a.lerp=function(e,t,r,n){var i=t[0],o=t[1];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e},a.random=function(e,t){t=t||1;var r=2*n()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},a.transformMat2=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e},a.transformMat2d=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},a.transformMat3=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e},a.transformMat4=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e},a.forEach=function(){var e=a.create();return function(t,r,n,i,o,a){var s,u;for(r||(r=2),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],o(e,e,a),t[s]=e[0],t[s+1]=e[1];return t}}(),a.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},"undefined"!=typeof e&&(e.vec2=a);var s={};s.create=function(){var e=new r(3);return e[0]=0,e[1]=0,e[2]=0,e},s.clone=function(e){var t=new r(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},s.fromValues=function(e,t,n){var i=new r(3);return i[0]=e,i[1]=t,i[2]=n,i},s.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},s.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},s.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},s.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},s.sub=s.subtract,s.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e},s.mul=s.multiply,s.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},s.div=s.divide,s.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e +},s.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},s.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},s.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},s.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)},s.dist=s.distance,s.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i},s.sqrDist=s.squaredDistance,s.length=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)},s.len=s.length,s.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},s.sqrLen=s.squaredLength,s.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},s.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e},s.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},s.cross=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],u=r[2];return e[0]=i*u-o*s,e[1]=o*a-n*u,e[2]=n*s-i*a,e},s.lerp=function(e,t,r,n){var i=t[0],o=t[1],a=t[2];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=a+n*(r[2]-a),e},s.random=function(e,t){t=t||1;var r=2*n()*Math.PI,i=2*n()-1,o=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=i*t,e},s.transformMat4=function(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12],e[1]=r[1]*n+r[5]*i+r[9]*o+r[13],e[2]=r[2]*n+r[6]*i+r[10]*o+r[14],e},s.transformMat3=function(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e},s.transformQuat=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],u=r[2],l=r[3],c=l*n+s*o-u*i,f=l*i+u*n-a*o,h=l*o+a*i-s*n,d=-a*n-s*i-u*o;return e[0]=c*l+d*-a+f*-u-h*-s,e[1]=f*l+d*-s+h*-a-c*-u,e[2]=h*l+d*-u+c*-s-f*-a,e},s.rotateX=function(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},s.rotateY=function(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},s.rotateZ=function(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},s.forEach=function(){var e=s.create();return function(t,r,n,i,o,a){var s,u;for(r||(r=3),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],o(e,e,a),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}}(),s.str=function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},"undefined"!=typeof e&&(e.vec3=s);var u={};u.create=function(){var e=new r(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e},u.clone=function(e){var t=new r(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},u.fromValues=function(e,t,n,i){var o=new r(4);return o[0]=e,o[1]=t,o[2]=n,o[3]=i,o},u.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},u.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e},u.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},u.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e},u.sub=u.subtract,u.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},u.mul=u.multiply,u.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e},u.div=u.divide,u.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},u.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},u.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},u.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},u.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)},u.dist=u.distance,u.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o},u.sqrDist=u.squaredDistance,u.length=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)},u.len=u.length,u.squaredLength=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i},u.sqrLen=u.squaredLength,u.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},u.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e[3]=t[3]*a),e},u.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},u.lerp=function(e,t,r,n){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=a+n*(r[2]-a),e[3]=s+n*(r[3]-s),e},u.random=function(e,t){return t=t||1,e[0]=n(),e[1]=n(),e[2]=n(),e[3]=n(),u.normalize(e,e),u.scale(e,e,t),e},u.transformMat4=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,e},u.transformQuat=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],u=r[2],l=r[3],c=l*n+s*o-u*i,f=l*i+u*n-a*o,h=l*o+a*i-s*n,d=-a*n-s*i-u*o;return e[0]=c*l+d*-a+f*-u-h*-s,e[1]=f*l+d*-s+h*-a-c*-u,e[2]=h*l+d*-u+c*-s-f*-a,e},u.forEach=function(){var e=u.create();return function(t,r,n,i,o,a){var s,u;for(r||(r=4),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;u>s;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],o(e,e,a),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}(),u.str=function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},"undefined"!=typeof e&&(e.vec4=u);var l={};l.create=function(){var e=new r(4);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},l.clone=function(e){var t=new r(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},l.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},l.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},l.transpose=function(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e},l.invert=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r*o-i*n;return a?(a=1/a,e[0]=o*a,e[1]=-n*a,e[2]=-i*a,e[3]=r*a,e):null},l.adjoint=function(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e},l.determinant=function(e){return e[0]*e[3]-e[2]*e[1]},l.multiply=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*s+o*u,e[1]=i*s+a*u,e[2]=n*l+o*c,e[3]=i*l+a*c,e},l.mul=l.multiply,l.rotate=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=n*-s+o*u,e[3]=i*-s+a*u,e},l.scale=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=r[0],u=r[1];return e[0]=n*s,e[1]=i*s,e[2]=o*u,e[3]=a*u,e},l.str=function(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},l.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2))},l.LDU=function(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]},"undefined"!=typeof e&&(e.mat2=l);var c={};c.create=function(){var e=new r(6);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},c.clone=function(e){var t=new r(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},c.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},c.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},c.invert=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=r*o-n*i;return u?(u=1/u,e[0]=o*u,e[1]=-n*u,e[2]=-i*u,e[3]=r*u,e[4]=(i*s-o*a)*u,e[5]=(n*a-r*s)*u,e):null},c.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},c.multiply=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=r[0],c=r[1],f=r[2],h=r[3],d=r[4],p=r[5];return e[0]=n*l+o*c,e[1]=i*l+a*c,e[2]=n*f+o*h,e[3]=i*f+a*h,e[4]=n*d+o*p+s,e[5]=i*d+a*p+u,e},c.mul=c.multiply,c.rotate=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=Math.sin(r),c=Math.cos(r);return e[0]=n*c+o*l,e[1]=i*c+a*l,e[2]=n*-l+o*c,e[3]=i*-l+a*c,e[4]=s,e[5]=u,e},c.scale=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=r[0],c=r[1];return e[0]=n*l,e[1]=i*l,e[2]=o*c,e[3]=a*c,e[4]=s,e[5]=u,e},c.translate=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=r[0],c=r[1];return e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=n*l+o*c+s,e[5]=i*l+a*c+u,e},c.str=function(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"},c.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+1)},"undefined"!=typeof e&&(e.mat2d=c);var f={};f.create=function(){var e=new r(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},f.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},f.clone=function(e){var t=new r(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},f.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},f.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},f.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e},f.invert=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=c*a-s*l,h=-c*o+s*u,d=l*o-a*u,p=r*f+n*h+i*d;return p?(p=1/p,e[0]=f*p,e[1]=(-c*n+i*l)*p,e[2]=(s*n-i*a)*p,e[3]=h*p,e[4]=(c*r-i*u)*p,e[5]=(-s*r+i*o)*p,e[6]=d*p,e[7]=(-l*r+n*u)*p,e[8]=(a*r-n*o)*p,e):null},f.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8];return e[0]=a*c-s*l,e[1]=i*l-n*c,e[2]=n*s-i*a,e[3]=s*u-o*c,e[4]=r*c-i*u,e[5]=i*o-r*s,e[6]=o*l-a*u,e[7]=n*u-r*l,e[8]=r*a-n*o,e},f.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],l=e[8];return t*(l*o-a*u)+r*(-l*i+a*s)+n*(u*i-o*s)},f.multiply=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=r[0],d=r[1],p=r[2],m=r[3],g=r[4],v=r[5],y=r[6],_=r[7],b=r[8];return e[0]=h*n+d*a+p*l,e[1]=h*i+d*s+p*c,e[2]=h*o+d*u+p*f,e[3]=m*n+g*a+v*l,e[4]=m*i+g*s+v*c,e[5]=m*o+g*u+v*f,e[6]=y*n+_*a+b*l,e[7]=y*i+_*s+b*c,e[8]=y*o+_*u+b*f,e},f.mul=f.multiply,f.translate=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=r[0],d=r[1];return e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=u,e[6]=h*n+d*a+l,e[7]=h*i+d*s+c,e[8]=h*o+d*u+f,e},f.rotate=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=Math.sin(r),d=Math.cos(r);return e[0]=d*n+h*a,e[1]=d*i+h*s,e[2]=d*o+h*u,e[3]=d*a-h*n,e[4]=d*s-h*i,e[5]=d*u-h*o,e[6]=l,e[7]=c,e[8]=f,e},f.scale=function(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},f.fromMat2d=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},f.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r+r,s=n+n,u=i+i,l=r*a,c=n*a,f=n*s,h=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return e[0]=1-f-p,e[3]=c-v,e[6]=h+g,e[1]=c+v,e[4]=1-l-p,e[7]=d-m,e[2]=h-g,e[5]=d+m,e[8]=1-l-f,e},f.normalFromMat4=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,_=r*u-i*a,b=r*l-o*a,x=n*u-i*s,A=n*l-o*s,w=i*l-o*u,E=c*m-f*p,D=c*g-h*p,k=c*v-d*p,T=f*g-h*m,F=f*v-d*m,S=h*v-d*g,C=y*S-_*F+b*T+x*k-A*D+w*E;return C?(C=1/C,e[0]=(s*S-u*F+l*T)*C,e[1]=(u*k-a*S-l*D)*C,e[2]=(a*F-s*k+l*E)*C,e[3]=(i*F-n*S-o*T)*C,e[4]=(r*S-i*k+o*D)*C,e[5]=(n*k-r*F-o*E)*C,e[6]=(m*w-g*A+v*x)*C,e[7]=(g*b-p*w-v*_)*C,e[8]=(p*A-m*b+v*y)*C,e):null},f.str=function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},f.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2))},"undefined"!=typeof e&&(e.mat3=f);var h={};h.create=function(){var e=new r(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},h.clone=function(e){var t=new r(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},h.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},h.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},h.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},h.invert=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,_=r*u-i*a,b=r*l-o*a,x=n*u-i*s,A=n*l-o*s,w=i*l-o*u,E=c*m-f*p,D=c*g-h*p,k=c*v-d*p,T=f*g-h*m,F=f*v-d*m,S=h*v-d*g,C=y*S-_*F+b*T+x*k-A*D+w*E;return C?(C=1/C,e[0]=(s*S-u*F+l*T)*C,e[1]=(i*F-n*S-o*T)*C,e[2]=(m*w-g*A+v*x)*C,e[3]=(h*A-f*w-d*x)*C,e[4]=(u*k-a*S-l*D)*C,e[5]=(r*S-i*k+o*D)*C,e[6]=(g*b-p*w-v*_)*C,e[7]=(c*w-h*b+d*_)*C,e[8]=(a*F-s*k+l*E)*C,e[9]=(n*k-r*F-o*E)*C,e[10]=(p*A-m*b+v*y)*C,e[11]=(f*b-c*A-d*y)*C,e[12]=(s*D-a*T-u*E)*C,e[13]=(r*T-n*D+i*E)*C,e[14]=(m*_-p*x-g*y)*C,e[15]=(c*x-f*_+h*y)*C,e):null},h.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(h*v-d*g)-f*(u*v-l*g)+m*(u*d-l*h),e[1]=-(n*(h*v-d*g)-f*(i*v-o*g)+m*(i*d-o*h)),e[2]=n*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),e[3]=-(n*(u*d-l*h)-s*(i*d-o*h)+f*(i*l-o*u)),e[4]=-(a*(h*v-d*g)-c*(u*v-l*g)+p*(u*d-l*h)),e[5]=r*(h*v-d*g)-c*(i*v-o*g)+p*(i*d-o*h),e[6]=-(r*(u*v-l*g)-a*(i*v-o*g)+p*(i*l-o*u)),e[7]=r*(u*d-l*h)-a*(i*d-o*h)+c*(i*l-o*u),e[8]=a*(f*v-d*m)-c*(s*v-l*m)+p*(s*d-l*f),e[9]=-(r*(f*v-d*m)-c*(n*v-o*m)+p*(n*d-o*f)),e[10]=r*(s*v-l*m)-a*(n*v-o*m)+p*(n*l-o*s),e[11]=-(r*(s*d-l*f)-a*(n*d-o*f)+c*(n*l-o*s)),e[12]=-(a*(f*g-h*m)-c*(s*g-u*m)+p*(s*h-u*f)),e[13]=r*(f*g-h*m)-c*(n*g-i*m)+p*(n*h-i*f),e[14]=-(r*(s*g-u*m)-a*(n*g-i*m)+p*(n*u-i*s)),e[15]=r*(s*h-u*f)-a*(n*h-i*f)+c*(n*u-i*s),e},h.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=e[11],d=e[12],p=e[13],m=e[14],g=e[15],v=t*a-r*o,y=t*s-n*o,_=t*u-i*o,b=r*s-n*a,x=r*u-i*a,A=n*u-i*s,w=l*p-c*d,E=l*m-f*d,D=l*g-h*d,k=c*m-f*p,T=c*g-h*p,F=f*g-h*m;return v*F-y*T+_*k+b*D-x*E+A*w},h.multiply=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],_=r[0],b=r[1],x=r[2],A=r[3];return e[0]=_*n+b*s+x*f+A*m,e[1]=_*i+b*u+x*h+A*g,e[2]=_*o+b*l+x*d+A*v,e[3]=_*a+b*c+x*p+A*y,_=r[4],b=r[5],x=r[6],A=r[7],e[4]=_*n+b*s+x*f+A*m,e[5]=_*i+b*u+x*h+A*g,e[6]=_*o+b*l+x*d+A*v,e[7]=_*a+b*c+x*p+A*y,_=r[8],b=r[9],x=r[10],A=r[11],e[8]=_*n+b*s+x*f+A*m,e[9]=_*i+b*u+x*h+A*g,e[10]=_*o+b*l+x*d+A*v,e[11]=_*a+b*c+x*p+A*y,_=r[12],b=r[13],x=r[14],A=r[15],e[12]=_*n+b*s+x*f+A*m,e[13]=_*i+b*u+x*h+A*g,e[14]=_*o+b*l+x*d+A*v,e[15]=_*a+b*c+x*p+A*y,e},h.mul=h.multiply,h.translate=function(e,t,r){var n,i,o,a,s,u,l,c,f,h,d,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=u,e[6]=l,e[7]=c,e[8]=f,e[9]=h,e[10]=d,e[11]=p,e[12]=n*m+s*g+f*v+t[12],e[13]=i*m+u*g+h*v+t[13],e[14]=o*m+l*g+d*v+t[14],e[15]=a*m+c*g+p*v+t[15]),e},h.scale=function(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},h.rotate=function(e,r,n,i){var o,a,s,u,l,c,f,h,d,p,m,g,v,y,_,b,x,A,w,E,D,k,T,F,S=i[0],C=i[1],M=i[2],R=Math.sqrt(S*S+C*C+M*M);return Math.abs(R)a?(s.cross(e,t,i),s.length(e)<1e-6&&s.cross(e,r,i),s.normalize(e,e),d.setAxisAngle(n,e,Math.PI),n):a>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(s.cross(e,i,o),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=1+a,d.normalize(n,n))}}(),d.setAxes=function(){var e=f.create();return function(t,r,n,i){return e[0]=n[0],e[3]=n[1],e[6]=n[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],d.normalize(t,d.fromMat3(t,e))}}(),d.clone=u.clone,d.fromValues=u.fromValues,d.copy=u.copy,d.set=u.set,d.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},d.setAxisAngle=function(e,t,r){r=.5*r;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e},d.add=u.add,d.multiply=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*c+a*s+i*l-o*u,e[1]=i*c+a*u+o*s-n*l,e[2]=o*c+a*l+n*u-i*s,e[3]=a*c-n*s-i*u-o*l,e},d.mul=d.multiply,d.scale=u.scale,d.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=o*u-i*s,e[3]=a*u-n*s,e},d.rotateY=function(e,t,r){r*=.5;var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-o*s,e[1]=i*u+a*s,e[2]=o*u+n*s,e[3]=a*u-i*s,e},d.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=o*u+a*s,e[3]=a*u-o*s,e},d.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=-Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e},d.dot=u.dot,d.lerp=u.lerp,d.slerp=function(e,t,r,n){var i,o,a,s,u,l=t[0],c=t[1],f=t[2],h=t[3],d=r[0],p=r[1],m=r[2],g=r[3];return o=l*d+c*p+f*m+h*g,0>o&&(o=-o,d=-d,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,u=Math.sin(n*i)/a):(s=1-n,u=n),e[0]=s*l+u*d,e[1]=s*c+u*p,e[2]=s*f+u*m,e[3]=s*h+u*g,e},d.invert=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r*r+n*n+i*i+o*o,s=a?1/a:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=o*s,e},d.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},d.length=u.length,d.len=d.length,d.squaredLength=u.squaredLength,d.sqrLen=d.squaredLength,d.normalize=u.normalize,d.fromMat3=function(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[7]-t[5])*r,e[1]=(t[2]-t[6])*r,e[2]=(t[3]-t[1])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*o+o]-t[3*a+a]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r,e[a]=(t[3*a+i]+t[3*i+a])*r}return e},d.str=function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},"undefined"!=typeof e&&(e.quat=d)}(t.exports)}(this)},{}],143:[function(e,t){function r(e){e=String(e);for(var t,r=[];t=e.match(/ERROR\:([^\n]+)/);){e=e.slice(t.index+1);var n=t[1].trim(),i=n.split(":"),o=i.slice(2).join(":").trim(),a=parseInt(i[0],10),n=parseInt(i[1],10);r.push({message:o,file:a,line:n})}return r}t.exports=r},{}],144:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?0/0:1/0*(d?-1:1);a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*m}},{}],145:[function(e,t){t.exports=e("./lib/inherit")},{"./lib/inherit":146}],146:[function(e,t,r){!function(e){function n(e){var t=f(e);if(v)for(var r,n=0;r=b[n++];)e.hasOwnProperty(r)&&t.push(r);return t}function i(e,t,r){for(var i,o,a=n(r),u=0,l=a.length;l>u;)"__self"!==(i=a[u++])&&(o=r[i],t[i]=m(o)&&(!s||o.toString().indexOf(".__base")>-1)?function(r,n){var i=e[r]?e[r]:"__constructor"===r?t.__self.__parent:g,o=function(){var e=this.__base;this.__base=o.__base;var t=n.apply(this,arguments);return this.__base=e,t};return o.__base=i,o}(i,o):o)}function o(e,t){for(var r,n=1;r=e[n++];)t?m(r)?a.self(t,r.prototype,r):a.self(t,r):t=m(r)?a(e[0],r.prototype,r):a(e[0],r);return t||e[0]}function a(){var e=arguments,t=p(e[0]),r=t||m(e[0]),n=r?t?o(e[0]):e[0]:u,a=e[r?1:0]||{},s=e[r?2:1],l=a.__constructor||r&&n.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:r?function(){return n.apply(this,arguments)}:function(){};if(!r)return l.prototype=a,l.prototype.__self=l.prototype.constructor=l,h(l,s);h(l,n),l.__parent=n;var f=n.prototype,d=l.prototype=c(f);return d.__self=d.constructor=l,a&&i(f,d,a),s&&i(n,l,s),l}var s=function(){"_"}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,c=Object.create||function(e){var t=function(){};return t.prototype=e,new t},f=Object.keys||function(e){var t=[];for(var r in e)l.call(e,r)&&t.push(r);return t},h=function(e,t){for(var r in t)l.call(t,r)&&(e[r]=t[r]);return e},d=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===d.call(e)},m=function(e){return"[object Function]"===d.call(e)},g=function(){},v=!0,y={toString:""};for(var _ in y)y.hasOwnProperty(_)&&(v=!1);var b=v?["toString","valueOf"]:null;a.self=function(){var e=arguments,t=p(e[0]),r=t?o(e[0],e[0][0]):e[0],n=e[1],a=e[2],s=r.prototype;return n&&i(s,s,n),a&&i(r,r,a),r};var x=!0;"object"==typeof r&&(t.exports=a,x=!1),"object"==typeof modules&&(modules.define("inherit",function(e){e(a)}),x=!1),"function"==typeof define&&(define(function(e,t,r){r.exports=a}),x=!1),x&&(e.inherit=a)}(this)},{}],147:[function(e,t){var r=Array.isArray,n=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==n.call(e)}},{}],148:[function(e,t){"use strict";var r=e("./lib/js-yaml.js");t.exports=r},{"./lib/js-yaml.js":149}],149:[function(e,t){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var n=e("./js-yaml/loader"),i=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=n.load,t.exports.loadAll=n.loadAll,t.exports.safeLoad=n.safeLoad,t.exports.safeLoadAll=n.safeLoadAll,t.exports.dump=i.dump,t.exports.safeDump=i.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=r("scan"),t.exports.parse=r("parse"),t.exports.compose=r("compose"),t.exports.addConstructor=r("addConstructor")},{"./js-yaml/dumper":151,"./js-yaml/exception":152,"./js-yaml/loader":153,"./js-yaml/schema":155,"./js-yaml/schema/core":156,"./js-yaml/schema/default_full":157,"./js-yaml/schema/default_safe":158,"./js-yaml/schema/failsafe":159,"./js-yaml/schema/json":160,"./js-yaml/type":161}],150:[function(e,t){"use strict";function r(e){return"undefined"==typeof e||null===e}function n(e){return"object"==typeof e&&null!==e}function i(e){return Array.isArray(e)?e:r(e)?[]:[e]}function o(e,t){var r,n,i,o;if(t)for(o=Object.keys(t),r=0,n=o.length;n>r;r+=1)i=o[r],e[i]=t[i];return e}function a(e,t){var r,n="";for(r=0;t>r;r+=1)n+=e;return n}function s(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=r,t.exports.isObject=n,t.exports.toArray=i,t.exports.repeat=a,t.exports.isNegativeZero=s,t.exports.extend=o},{}],151:[function(e,t){"use strict";function r(e,t){var r,n,i,o,a,s,u;if(null===t)return{};for(r={},n=Object.keys(t),i=0,o=n.length;o>i;i+=1)a=n[i],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),u=e.compiledTypeMap[a],u&&S.call(u.styleAliases,s)&&(s=u.styleAliases[s]),r[a]=s;return r}function n(e){var t,r,n;if(t=e.toString(16).toUpperCase(),255>=e)r="x",n=2;else if(65535>=e)r="u",n=4;else{if(!(4294967295>=e))throw new D("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+E.repeat("0",n-t.length)+t}function i(e){this.schema=e.schema||k,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=E.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var r,n=E.repeat(" ",t),i=0,o=-1,a="",s=e.length;s>i;)o=e.indexOf("\n",i),-1===o?(r=e.slice(i),i=s):(r=e.slice(i,o+1),i=o+1),r.length&&"\n"!==r&&(a+=n),a+=r;return a}function a(e,t){return"\n"+E.repeat(" ",e.indent*t)}function s(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;n>r;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function u(e){this.source=e,this.result="",this.checkpoint=0}function l(e,t,r,n){var i,a,l,f,p,m,g,v,y,_,b,x,A,w,E,D,k,T,F,S,C;if(0===t.length)return void(e.dump="''");if(-1!==et.indexOf(t))return void(e.dump="'"+t+"'");for(i=!0,a=t.length?t.charCodeAt(0):0,l=j===a||j===t.charCodeAt(t.length-1),($===a||V===a||W===a||X===a)&&(i=!1),l?(i=!1,f=!1,p=!1):(f=!n,p=!n),m=!0,g=new u(t),v=!1,y=0,_=0,b=e.indent*r,x=e.lineWidth,-1===x&&(x=9007199254740991),40>b?x-=b:x=40,w=0;w0&&(k=t.charCodeAt(w-1),k===j&&(p=!1,f=!1)),f&&(T=w-y,y=w,T>_&&(_=T))),A!==I&&(m=!1),g.takeUpTo(w),g.escapeChar())}if(i&&s(e,t)&&(i=!1),F="",(f||p)&&(S=0,t.charCodeAt(t.length-1)===M&&(S+=1,t.charCodeAt(t.length-2)===M&&(S+=1)),0===S?F="-":2===S&&(F="+")),p&&x>_&&(f=!1),v||(p=!1),i)e.dump=t;else if(m)e.dump="'"+t+"'";else if(f)C=c(t,x),e.dump=">"+F+"\n"+o(C,b);else if(p)F||(t=t.replace(/\n$/,"")),e.dump="|"+F+"\n"+o(t,b);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function c(e,t){var r,n="",i=0,o=e.length,a=/\n+$/.exec(e);for(a&&(o=a.index+1);o>i;)r=e.indexOf("\n",i),r>o||-1===r?(n&&(n+="\n\n"),n+=f(e.slice(i,o),t),i=o):(n&&(n+="\n\n"),n+=f(e.slice(i,r),t),i=r+1);return a&&"\n"!==a[0]&&(n+=a[0]),n}function f(e,t){if(""===e)return e;for(var r,n,i,o=/[^\s] [^\s]/g,a="",s=0,u=0,l=o.exec(e);l;)r=l.index,r-u>t&&(n=s!==u?s:r,a&&(a+="\n"),i=e.slice(u,n),a+=i,u=n+1),s=r+1,l=o.exec(e); +return a&&(a+="\n"),a+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function h(e){return C!==e&&M!==e&&R!==e&&z!==e&&Y!==e&&H!==e&&Z!==e&&K!==e&&L!==e&&N!==e&&U!==e&&P!==e&&J!==e&&q!==e&&O!==e&&I!==e&&B!==e&&G!==e&&!Q[e]&&!d(e)}function d(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function p(e,t,r){var n,i,o="",a=e.tag;for(n=0,i=r.length;i>n;n+=1)_(e,t,r[n],!1,!1)&&(0!==n&&(o+=", "),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function m(e,t,r,n){var i,o,s="",u=e.tag;for(i=0,o=r.length;o>i;i+=1)_(e,t+1,r[i],!0,!0)&&(n&&0===i||(s+=a(e,t)),s+="- "+e.dump);e.tag=u,e.dump=s||"[]"}function g(e,t,r){var n,i,o,a,s,u="",l=e.tag,c=Object.keys(r);for(n=0,i=c.length;i>n;n+=1)s="",0!==n&&(s+=", "),o=c[n],a=r[o],_(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",_(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=l,e.dump="{"+u+"}"}function v(e,t,r,n){var i,o,s,u,l,c,f="",h=e.tag,d=Object.keys(r);if(e.sortKeys===!0)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new D("sortKeys must be a boolean or a function");for(i=0,o=d.length;o>i;i+=1)c="",n&&0===i||(c+=a(e,t)),s=d[i],u=r[s],_(e,t+1,s,!0,!0,!0)&&(l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,l&&(c+=e.dump&&M===e.dump.charCodeAt(0)?"?":"? "),c+=e.dump,l&&(c+=a(e,t)),_(e,t+1,u,!0,l)&&(c+=e.dump&&M===e.dump.charCodeAt(0)?":":": ",c+=e.dump,f+=c));e.tag=h,e.dump=f||"{}"}function y(e,t,r){var n,i,o,a,s,u;for(i=r?e.explicitTypes:e.implicitTypes,o=0,a=i.length;a>o;o+=1)if(s=i[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=r?s.tag:"?",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===F.call(s.represent))n=s.represent(t,u);else{if(!S.call(s.represent,u))throw new D("!<"+s.tag+'> tag resolver accepts not "'+u+'" style');n=s.represent[u](t,u)}e.dump=n}return!0}return!1}function _(e,t,r,n,i,o){e.tag=null,e.dump=r,y(e,r,!1)||y(e,r,!0);var a=F.call(e.dump);n&&(n=0>e.flowLevel||e.flowLevel>t);var s,u,c="[object Object]"===a||"[object Array]"===a;if(c&&(s=e.duplicates.indexOf(r),u=-1!==s),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(c&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)n&&0!==Object.keys(e.dump).length?(v(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(g(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)n&&0!==e.dump.length?(m(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(p(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new D("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&l(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b(e,t){var r,n,i=[],o=[];for(x(e,i,o),r=0,n=o.length;n>r;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function x(e,t,r){var n,i,o;if(null!==e&&"object"==typeof e)if(i=t.indexOf(e),-1!==i)-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;o>i;i+=1)x(e[i],t,r);else for(n=Object.keys(e),i=0,o=n.length;o>i;i+=1)x(e[n[i]],t,r)}function A(e,t){t=t||{};var r=new i(t);return b(e,r),_(r,0,e,!0,!0)?r.dump+"\n":""}function w(e,t){return A(e,E.extend({schema:T},t))}var E=e("./common"),D=e("./exception"),k=e("./schema/default_full"),T=e("./schema/default_safe"),F=Object.prototype.toString,S=Object.prototype.hasOwnProperty,C=9,M=10,R=13,j=32,P=33,I=34,L=35,B=37,N=38,O=39,U=42,z=44,$=45,G=58,q=62,V=63,W=64,Y=91,H=93,X=96,Z=123,J=124,K=125,Q={};Q[0]="\\0",Q[7]="\\a",Q[8]="\\b",Q[9]="\\t",Q[10]="\\n",Q[11]="\\v",Q[12]="\\f",Q[13]="\\r",Q[27]="\\e",Q[34]='\\"',Q[92]="\\\\",Q[133]="\\N",Q[160]="\\_",Q[8232]="\\L",Q[8233]="\\P";var et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(e){var t;if(e checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},u.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=Q[e]||n(e),this.result+=t,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=A,t.exports.safeDump=w},{"./common":150,"./exception":152,"./schema/default_full":157,"./schema/default_safe":158}],152:[function(e,t){"use strict";function r(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var n=e("inherit");n(r,Error),r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=r},{inherit:145}],153:[function(e,t){"use strict";function r(e){return 10===e||13===e}function n(e){return 9===e||32===e}function i(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function a(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function s(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?" ":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function c(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new U(t,new z(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function p(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function m(e,t,r,n){var i,o,a,s;if(r>t){if(s=e.input.slice(t,r),n)for(i=0,o=s.length;o>i;i+=1)a=s.charCodeAt(i),9===a||a>=32&&1114111>=a||d(e,"expected valid JSON character");else K.test(s)&&d(e,"the stream contains non-printable characters");e.result+=s}}function g(e,t,r){var n,i,o,a;for(O.isObject(r)||d(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;a>o;o+=1)i=n[o],q.call(t,i)||(t[i]=r[i])}function v(e,t,r,n,i){var o,a;if(n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(i))for(o=0,a=i.length;a>o;o+=1)g(e,t,i[o]);else g(e,t,i);else t[n]=i;return t}function y(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function _(e,t,i){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;n(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do a=e.input.charCodeAt(++e.position);while(10!==a&&13!==a&&0!==a);if(!r(a))break;for(y(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==i&&0!==o&&e.lineIndent1&&(e.result+=O.repeat("\n",t-1))}function A(e,t,a){var s,u,l,c,f,h,d,p,g,v=e.kind,y=e.result;if(g=e.input.charCodeAt(e.position),i(g)||o(g)||35===g||38===g||42===g||33===g||124===g||62===g||39===g||34===g||37===g||64===g||96===g)return!1;if((63===g||45===g)&&(u=e.input.charCodeAt(e.position+1),i(u)||a&&o(u)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,f=!1;0!==g;){if(58===g){if(u=e.input.charCodeAt(e.position+1),i(u)||a&&o(u))break}else if(35===g){if(s=e.input.charCodeAt(e.position-1),i(s))break}else{if(e.position===e.lineStart&&b(e)||a&&o(g))break;if(r(g)){if(h=e.line,d=e.lineStart,p=e.lineIndent,_(e,!1,-1),e.lineIndent>=t){f=!0,g=e.input.charCodeAt(e.position);continue}e.position=c,e.line=h,e.lineStart=d,e.lineIndent=p;break}}f&&(m(e,l,c,!1),x(e,e.line-h),l=c=e.position,f=!1),n(g)||(c=e.position+1),g=e.input.charCodeAt(++e.position)}return m(e,l,c,!1),e.result?!0:(e.kind=v,e.result=y,!1)}function w(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(m(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=o=e.position,e.position++}else r(n)?(m(e,i,o,!0),x(e,_(e,!1,t)),i=o=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function E(e,t){var n,i,o,u,l,f;if(f=e.input.charCodeAt(e.position),34!==f)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(f=e.input.charCodeAt(e.position));){if(34===f)return m(e,n,e.position,!0),e.position++,!0;if(92===f){if(m(e,n,e.position,!0),f=e.input.charCodeAt(++e.position),r(f))_(e,!1,t);else if(256>f&&nt[f])e.result+=it[f],e.position++;else if((l=s(f))>0){for(o=l,u=0;o>0;o--)f=e.input.charCodeAt(++e.position),(l=a(f))>=0?u=(u<<4)+l:d(e,"expected hexadecimal character");e.result+=c(u),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(f)?(m(e,n,i,!0),x(e,_(e,!1,t)),n=i=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function D(e,t){var r,n,o,a,s,u,l,c,f,h,p,m=!0,g=e.tag,y=e.anchor;if(p=e.input.charCodeAt(e.position),91===p)a=93,l=!1,n=[];else{if(123!==p)return!1;a=125,l=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(++e.position);0!==p;){if(_(e,!0,t),p=e.input.charCodeAt(e.position),p===a)return e.position++,e.tag=g,e.anchor=y,e.kind=l?"mapping":"sequence",e.result=n,!0;m||d(e,"missed comma between flow collection entries"),f=c=h=null,s=u=!1,63===p&&(o=e.input.charCodeAt(e.position+1),i(o)&&(s=u=!0,e.position++,_(e,!0,t))),r=e.line,R(e,t,V,!1,!0),f=e.tag,c=e.result,_(e,!0,t),p=e.input.charCodeAt(e.position),!u&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),_(e,!0,t),R(e,t,V,!1,!0),h=e.result),l?v(e,n,f,c,h):n.push(s?v(e,null,f,c,h):c),_(e,!0,t),p=e.input.charCodeAt(e.position),44===p?(m=!0,p=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function k(e,t){var i,o,a,s,l=X,c=!1,f=t,h=0,p=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)X===l?l=43===s?J:Z:d(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?d(e,"repeat of an indentation width identifier"):(f=t+a-1,c=!0)}if(n(s)){do s=e.input.charCodeAt(++e.position);while(n(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(y(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndentf&&(f=e.lineIndent),r(s))h++;else{if(e.lineIndentt)&&0!==o)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(R(e,t,H,!0,a)&&(g?p=e.result:m=e.result),g||(v(e,f,h,p,m),h=p=m=null),_(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndentu;u+=1)if(c=e.implicitTypes[u],c.resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else q.call(e.typeMap,e.tag)?(c=e.typeMap[e.tag],null!==e.result&&c.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||g}function j(e){var t,o,a,s,u=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(_(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!i(s);)s=e.input.charCodeAt(++e.position);for(o=e.input.slice(t,e.position),a=[],o.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;n(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!i(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&y(e),q.call(at,o)?at[o](e,o,a):p(e,'unknown document directive "'+o+'"')}return _(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,_(e,!0,-1)):l&&d(e,"directives end mark is expected"),R(e,e.lineIndent-1,H,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(u,e.position))&&p(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,_(e,!0,-1))):void(e.positionn;n+=1)t(o[n])}function L(e,t){var r=P(e,t);if(0===r.length)return void 0;if(1===r.length)return r[0];throw new U("expected a single document in the stream, but found more")}function B(e,t,r){I(e,t,O.extend({schema:$},r))}function N(e,t){return L(e,O.extend({schema:$},t))}for(var O=e("./common"),U=e("./exception"),z=e("./mark"),$=e("./schema/default_safe"),G=e("./schema/default_full"),q=Object.prototype.hasOwnProperty,V=1,W=2,Y=3,H=4,X=1,Z=2,J=3,K=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Q=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,tt=/^(?:!|!!|![a-z\-]+!)$/i,rt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,nt=new Array(256),it=new Array(256),ot=0;256>ot;ot++)nt[ot]=l(ot)?1:0,it[ot]=l(ot);var at={YAML:function(e,t,r){var n,i,o;null!==e.version&&d(e,"duplication of %YAML directive"),1!==r.length&&d(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),null===n&&d(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&d(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&p(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&d(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],tt.test(n)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),q.call(e.tagMap,n)&&d(e,'there is a previously declared suffix for "'+n+'" tag handle'),rt.test(i)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=i}};t.exports.loadAll=I,t.exports.load=L,t.exports.safeLoadAll=B,t.exports.safeLoad=N},{"./common":150,"./exception":152,"./mark":154,"./schema/default_full":157,"./schema/default_safe":158}],154:[function(e,t){"use strict";function r(e,t,r,n,i){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=i}var n=e("./common");r.prototype.getSnippet=function(e,t){var r,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){r=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),n.repeat(" ",e)+r+s+o+"\n"+n.repeat(" ",e+this.position-i+r.length)+"^"},r.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(r+=":\n"+t)),r},t.exports=r},{"./common":150}],155:[function(e,t){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,r){t.tag===e.tag&&i.push(r)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function n(){function e(e){n[e.tag]=e}var t,r,n={};for(t=0,r=arguments.length;r>t;t+=1)arguments[t].forEach(e);return n}function i(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=r(this,"implicit",[]),this.compiledExplicit=r(this,"explicit",[]),this.compiledTypeMap=n(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),a=e("./exception"),s=e("./type");i.DEFAULT=null,i.create=function(){var e,t;switch(arguments.length){case 1:e=i.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof i}))throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof s}))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new i({include:e,explicit:t})},t.exports=i},{"./common":150,"./exception":152,"./type":161}],156:[function(e,t){"use strict";var r=e("../schema");t.exports=new r({include:[e("./json")]})},{"../schema":155,"./json":160}],157:[function(e,t){"use strict";var r=e("../schema");t.exports=r.DEFAULT=new r({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":155,"../type/js/function":166,"../type/js/regexp":167,"../type/js/undefined":168,"./default_safe":158}],158:[function(e,t){"use strict";var r=e("../schema");t.exports=new r({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":155,"../type/binary":162,"../type/merge":170,"../type/omap":172,"../type/pairs":173,"../type/set":175,"../type/timestamp":177,"./core":156}],159:[function(e,t){"use strict";var r=e("../schema");t.exports=new r({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":155,"../type/map":169,"../type/seq":174,"../type/str":176}],160:[function(e,t){"use strict";var r=e("../schema");t.exports=new r({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":155,"../type/bool":163,"../type/float":164,"../type/int":165,"../type/null":171,"./failsafe":159}],161:[function(e,t){"use strict";function r(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function n(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=r(t.styleAliases||null),-1===a.indexOf(this.kind))throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var i=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=n},{"./exception":152}],162:[function(e,t){"use strict";function r(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=u;for(r=0;i>r;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(0>t)return!1;n+=6}return n%8===0}function n(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=u,s=0,l=[];for(t=0;i>t;t++)t%4===0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|o.indexOf(n.charAt(t));return r=i%4*6,0===r?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===r?(l.push(s>>10&255),l.push(s>>2&255)):12===r&&l.push(s>>4&255),a?new a(l):l}function i(e){var t,r,n="",i=0,o=e.length,a=u;for(t=0;o>t;t++)t%3===0&&t&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+e[t];return r=o%3,0===r?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function o(e){return a&&a.isBuffer(e)}var a=e("buffer").Buffer,s=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i})},{"../type":161,buffer:37}],163:[function(e,t){"use strict";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function n(e){return"true"===e||"True"===e||"TRUE"===e}function i(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:n,predicate:i,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":161}],164:[function(e,t){"use strict";function r(e){return null===e?!1:u.test(e)?!0:!1}function n(e){var t,r,n,i;return t=e.replace(/_/g,"").toLowerCase(),r="-"===t[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?0/0:0<=t.indexOf(":")?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,n=1,i.forEach(function(e){t+=e*n,n*=60}),r*t):r*parseFloat(t,10)}function i(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(e))return"-0.0";return r=e.toString(10),l.test(r)?r.replace("e",".e"):r}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||a.isNegativeZero(e))}var a=e("../common"),s=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;t.exports=new s("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i,defaultStyle:"lowercase"})},{"../common":150,"../type":161}],165:[function(e,t){"use strict";function r(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function n(e){return e>=48&&55>=e}function i(e){return e>=48&&57>=e}function o(e){if(null===e)return!1;var t,o=e.length,a=0,s=!1;if(!o)return!1;if(t=e[a],("-"===t||"+"===t)&&(t=e[++a]),"0"===t){if(a+1===o)return!0;if(t=e[++a],"b"===t){for(a++;o>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;o>a;a++)if(t=e[a],"_"!==t){if(!r(e.charCodeAt(a)))return!1;s=!0}return s}for(;o>a;a++)if(t=e[a],"_"!==t){if(!n(e.charCodeAt(a)))return!1;s=!0}return s}for(;o>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!i(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function a(e){var t,r,n=e,i=1,o=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),t=n[0],("-"===t||"+"===t)&&("-"===t&&(i=-1),n=n.slice(1),t=n[0]),"0"===n?0:"0"===t?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),n=0,r=1,o.forEach(function(e){n+=e*r,r*=60}),i*n):i*parseInt(n,10)}function s(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!u.isNegativeZero(e)}var u=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:s,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":150,"../type":161}],166:[function(e,t){"use strict";function r(e){if(null===e)return!1;try{var t="("+e+")",r=a.parse(t,{range:!0});return"Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type?!1:!0}catch(n){return!1}}function n(e){var t,r="("+e+")",n=a.parse(r,{range:!0}),i=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=n.body[0].expression.body.range,new Function(i,r.slice(t[0]+1,t[1]-1))}function i(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=e("esprima")}catch(s){"undefined"!=typeof window&&(a=window.esprima)}var u=e("../../type");t.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i})},{"../../type":161,esprima:178}],167:[function(e,t){"use strict";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1;t=t.slice(1,t.length-n.length-1)}try{return!0}catch(i){return!1}}function n(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)}function i(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i}) +},{"../../type":161}],168:[function(e,t){"use strict";function r(){return!0}function n(){return void 0}function i(){return""}function o(e){return"undefined"==typeof e}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i})},{"../../type":161}],169:[function(e,t){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":161}],170:[function(e,t){"use strict";function r(e){return"<<"===e||null===e}var n=e("../type");t.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},{"../type":161}],171:[function(e,t){"use strict";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function n(){return null}function i(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:n,predicate:i,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":161}],172:[function(e,t){"use strict";function r(e){if(null===e)return!0;var t,r,n,i,s,u=[],l=e;for(t=0,r=l.length;r>t;t+=1){if(n=l[t],s=!1,"[object Object]"!==a.call(n))return!1;for(i in n)if(o.call(n,i)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function n(e){return null!==e?e:[]}var i=e("../type"),o=Object.prototype.hasOwnProperty,a=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:n})},{"../type":161}],173:[function(e,t){"use strict";function r(e){if(null===e)return!0;var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;r>t;t+=1){if(n=s[t],"[object Object]"!==o.call(n))return!1;if(i=Object.keys(n),1!==i.length)return!1;a[t]=[i[0],n[i[0]]]}return!0}function n(e){if(null===e)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;r>t;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}var i=e("../type"),o=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n})},{"../type":161}],174:[function(e,t){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":161}],175:[function(e,t){"use strict";function r(e){if(null===e)return!0;var t,r=e;for(t in r)if(o.call(r,t)&&null!==r[t])return!1;return!0}function n(e){return null!==e?e:{}}var i=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n})},{"../type":161}],176:[function(e,t){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":161}],177:[function(e,t){"use strict";function r(e){return null===e?!1:null===a.exec(e)?!1:!0}function n(e){var t,r,n,i,o,s,u,l,c,f,h=0,d=null;if(t=a.exec(e),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(l=+t[10],c=+(t[11]||0),d=6e4*(60*l+c),"-"===t[9]&&(d=-d)),f=new Date(Date.UTC(r,n,i,o,s,u,h)),d&&f.setTime(f.getTime()-d),f}function i(e){return e.toISOString()}var o=e("../type"),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:n,instanceOf:Date,represent:i})},{"../type":161}],178:[function(e,t,r){!function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):t("undefined"!=typeof r?r:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function r(e){return e>=48&&57>=e}function n(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){var t="0"!==e,r="01234567".indexOf(e);return _n>un&&i(an[un])&&(t=!0,r=8*r+"01234567".indexOf(an[un++]),"0123".indexOf(e)>=0&&_n>un&&i(an[un])&&(r=8*r+"01234567".indexOf(an[un++]))),{code:r,octal:t}}function a(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function u(e){return 65536>e?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&on.NonAsciiIdentifierStart.test(u(e))}function c(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&on.NonAsciiIdentifierPart.test(u(e))}function f(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}}function h(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function m(e,r,n,i,o){var a;t("number"==typeof n,"Comment must have valid position"),xn.lastCommentStart=n,a={type:e,value:r},An.range&&(a.range=[n,i]),An.loc&&(a.loc=o),An.comments.push(a),An.attachComment&&(An.leadingComments.push(a),An.trailingComments.push(a)),An.tokenize&&(a.type=a.type+"Comment",An.delegate&&(a=An.delegate(a)),An.tokens.push(a))}function g(e){var t,r,n,i;for(t=un-e,r={start:{line:ln,column:un-cn-e}};_n>un;)if(n=an.charCodeAt(un),++un,s(n))return fn=!0,An.comments&&(i=an.slice(t+e,un-1),r.end={line:ln,column:un-cn-1},m("Line",i,t,un-1,r)),13===n&&10===an.charCodeAt(un)&&++un,++ln,void(cn=un);An.comments&&(i=an.slice(t+e,un),r.end={line:ln,column:un-cn},m("Line",i,t,un,r))}function v(){var e,t,r,n;for(An.comments&&(e=un-2,t={start:{line:ln,column:un-cn-2}});_n>un;)if(r=an.charCodeAt(un),s(r))13===r&&10===an.charCodeAt(un+1)&&++un,fn=!0,++ln,++un,cn=un;else if(42===r){if(47===an.charCodeAt(un+1))return++un,++un,void(An.comments&&(n=an.slice(e+2,un-2),t.end={line:ln,column:un-cn},m("Block",n,e,un,t)));++un}else++un;An.comments&&(t.end={line:ln,column:un-cn},n=an.slice(e+2,un),m("Block",n,e,un,t)),rt()}function y(){var e,t;for(fn=!1,t=0===un;_n>un;)if(e=an.charCodeAt(un),a(e))++un;else if(s(e))fn=!0,++un,13===e&&10===an.charCodeAt(un)&&++un,++ln,cn=un,t=!0;else if(47===e)if(e=an.charCodeAt(un+1),47===e)++un,++un,g(2),t=!0;else{if(42!==e)break;++un,++un,v()}else if(t&&45===e){if(45!==an.charCodeAt(un+1)||62!==an.charCodeAt(un+2))break;un+=3,g(3)}else{if(60!==e)break;if("!--"!==an.slice(un+1,un+4))break;++un,++un,++un,++un,g(4)}}function _(e){var t,r,i,o=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(_n>un&&n(an[un])))return"";i=an[un++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function b(){var e,t;for(e=an[un],t=0,"}"===e&&tt();_n>un&&(e=an[un++],n(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&tt(),u(t)}function x(e){var t,r,n;return t=an.charCodeAt(e),t>=55296&&56319>=t&&(n=an.charCodeAt(e+1),n>=56320&&57343>=n&&(r=t,t=1024*(r-55296)+n-56320+65536)),t}function A(){var e,t,r;for(e=x(un),r=u(e),un+=r.length,92===e&&(117!==an.charCodeAt(un)&&tt(),++un,"{"===an[un]?(++un,t=b()):(t=_("u"),e=t.charCodeAt(0),t&&"\\"!==t&&l(e)||tt()),r=t);_n>un&&(e=x(un),c(e));)t=u(e),r+=t,un+=t.length,92===e&&(r=r.substr(0,r.length-1),117!==an.charCodeAt(un)&&tt(),++un,"{"===an[un]?(++un,t=b()):(t=_("u"),e=t.charCodeAt(0),t&&"\\"!==t&&c(e)||tt()),r+=t);return r}function w(){var e,t;for(e=un++;_n>un;){if(t=an.charCodeAt(un),92===t)return un=e,A();if(t>=55296&&57343>t)return un=e,A();if(!c(t))break;++un}return an.slice(e,un)}function E(){var e,t,r;return e=un,t=92===an.charCodeAt(un)?A():w(),r=1===t.length?Kr.Identifier:p(t)?Kr.Keyword:"null"===t?Kr.NullLiteral:"true"===t||"false"===t?Kr.BooleanLiteral:Kr.Identifier,{type:r,value:t,lineNumber:ln,lineStart:cn,start:e,end:un}}function D(){var e,t;switch(e={type:Kr.Punctuator,value:"",lineNumber:ln,lineStart:cn,start:un,end:un},t=an[un]){case"(":An.tokenize&&(An.openParenToken=An.tokenValues.length),++un;break;case"{":An.tokenize&&(An.openCurlyToken=An.tokenValues.length),xn.curlyStack.push("{"),++un;break;case".":++un,"."===an[un]&&"."===an[un+1]&&(un+=2,t="...");break;case"}":++un,xn.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++un;break;default:t=an.substr(un,4),">>>="===t?un+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t?un+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t?un+=2:(t=an[un],"<>=!+-*%&|^/".indexOf(t)>=0&&++un)))}return un===e.start&&tt(),e.end=un,e.value=t,e}function k(e){for(var t="";_n>un&&n(an[un]);)t+=an[un++];return 0===t.length&&tt(),l(an.charCodeAt(un))&&tt(),{type:Kr.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ln,lineStart:cn,start:e,end:un}}function T(e){var t,n;for(n="";_n>un&&(t=an[un],"0"===t||"1"===t);)n+=an[un++];return 0===n.length&&tt(),_n>un&&(t=an.charCodeAt(un),(l(t)||r(t))&&tt()),{type:Kr.NumericLiteral,value:parseInt(n,2),lineNumber:ln,lineStart:cn,start:e,end:un}}function F(e,t){var n,o;for(i(e)?(o=!0,n="0"+an[un++]):(o=!1,++un,n="");_n>un&&i(an[un]);)n+=an[un++];return o||0!==n.length||tt(),(l(an.charCodeAt(un))||r(an.charCodeAt(un)))&&tt(),{type:Kr.NumericLiteral,value:parseInt(n,8),octal:o,lineNumber:ln,lineStart:cn,start:t,end:un}}function S(){var e,t;for(e=un+1;_n>e;++e){if(t=an[e],"8"===t||"9"===t)return!1;if(!i(t))return!0}return!0}function C(){var e,n,o;if(o=an[un],t(r(o.charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),n=un,e="","."!==o){if(e=an[un++],o=an[un],"0"===e){if("x"===o||"X"===o)return++un,k(n);if("b"===o||"B"===o)return++un,T(n);if("o"===o||"O"===o)return F(o,n);if(i(o)&&S())return F(o,n)}for(;r(an.charCodeAt(un));)e+=an[un++];o=an[un]}if("."===o){for(e+=an[un++];r(an.charCodeAt(un));)e+=an[un++];o=an[un]}if("e"===o||"E"===o)if(e+=an[un++],o=an[un],("+"===o||"-"===o)&&(e+=an[un++]),r(an.charCodeAt(un)))for(;r(an.charCodeAt(un));)e+=an[un++];else tt();return l(an.charCodeAt(un))&&tt(),{type:Kr.NumericLiteral,value:parseFloat(e),lineNumber:ln,lineStart:cn,start:n,end:un}}function M(){var e,r,n,a,u,l="",c=!1;for(e=an[un],t("'"===e||'"'===e,"String literal must starts with a quote"),r=un,++un;_n>un;){if(n=an[un++],n===e){e="";break}if("\\"===n)if(n=an[un++],n&&s(n.charCodeAt(0)))++ln,"\r"===n&&"\n"===an[un]&&++un,cn=un;else switch(n){case"u":case"x":if("{"===an[un])++un,l+=b();else{if(a=_(n),!a)throw tt();l+=a}break;case"n":l+="\n";break;case"r":l+="\r";break;case"t":l+=" ";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+=" ";break;case"8":case"9":l+=n,rt();break;default:i(n)?(u=o(n),c=u.octal||c,l+=String.fromCharCode(u.code)):l+=n}else{if(s(n.charCodeAt(0)))break;l+=n}}return""!==e&&tt(),{type:Kr.StringLiteral,value:l,octal:c,lineNumber:gn,lineStart:vn,start:r,end:un}}function R(){var e,t,n,o,a,u,l,c,f="";for(o=!1,u=!1,t=un,a="`"===an[un],n=2,++un;_n>un;){if(e=an[un++],"`"===e){n=1,u=!0,o=!0;break}if("$"===e){if("{"===an[un]){xn.curlyStack.push("${"),++un,o=!0;break}f+=e}else if("\\"===e)if(e=an[un++],s(e.charCodeAt(0)))++ln,"\r"===e&&"\n"===an[un]&&++un,cn=un;else switch(e){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"u":case"x":"{"===an[un]?(++un,f+=b()):(l=un,c=_(e),c?f+=c:(un=l,f+=e));break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+=" ";break;default:"0"===e?(r(an.charCodeAt(un))&&K(nn.TemplateOctalLiteral),f+="\x00"):i(e)?K(nn.TemplateOctalLiteral):f+=e}else s(e.charCodeAt(0))?(++ln,"\r"===e&&"\n"===an[un]&&++un,cn=un,f+="\n"):f+=e}return o||tt(),a||xn.curlyStack.pop(),{type:Kr.Template,value:{cooked:f,raw:an.slice(t+1,un-n)},head:a,tail:u,lineNumber:ln,lineStart:cn,start:t,end:un}}function j(e,t){var r="￿",n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&tt(null,nn.InvalidRegExp),65535>=i?String.fromCharCode(i):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(n)}catch(i){tt(null,nn.InvalidRegExp)}try{return new RegExp(e,t)}catch(o){return null}}function P(){var e,r,n,i,o;for(e=an[un],t("/"===e,"Regular expression literal must start with a slash"),r=an[un++],n=!1,i=!1;_n>un;)if(e=an[un++],r+=e,"\\"===e)e=an[un++],s(e.charCodeAt(0))&&tt(null,nn.UnterminatedRegExp),r+=e;else if(s(e.charCodeAt(0)))tt(null,nn.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){i=!0;break}"["===e&&(n=!0)}return i||tt(null,nn.UnterminatedRegExp),o=r.substr(1,r.length-2),{value:o,literal:r}}function I(){var e,t,r,n;for(t="",r="";_n>un&&(e=an[un],c(e.charCodeAt(0)));)if(++un,"\\"===e&&_n>un)if(e=an[un],"u"===e){if(++un,n=un,e=_("u"))for(r+=e,t+="\\u";un>n;++n)t+=an[n];else un=n,r+="u",t+="\\u";rt()}else t+="\\",rt();else r+=e,t+=e;return{value:r,literal:t}}function L(){var e,t,r,n;return yn=!0,bn=null,y(),e=un,t=P(),r=I(),n=j(t.value,r.value),yn=!1,An.tokenize?{type:Kr.RegularExpression,value:n,regex:{pattern:t.value,flags:r.value},lineNumber:ln,lineStart:cn,start:e,end:un}:{literal:t.literal+r.literal,value:n,regex:{pattern:t.value,flags:r.value},start:e,end:un}}function B(){var e,t,r,n;return y(),e=un,t={start:{line:ln,column:un-cn}},r=L(),t.end={line:ln,column:un-cn},An.tokenize||(An.tokens.length>0&&(n=An.tokens[An.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&An.tokens.pop()),An.tokens.push({type:"RegularExpression",value:r.literal,regex:r.regex,range:[e,un],loc:t})),r}function N(e){return e.type===Kr.Identifier||e.type===Kr.Keyword||e.type===Kr.BooleanLiteral||e.type===Kr.NullLiteral}function O(){function e(e){return e&&e.length>1&&e[0]>="a"&&e[0]<="z"}var t,r,n;switch(r=An.tokenValues[An.tokens.length-1],t=null!==r,r){case"this":case"]":t=!1;break;case")":n=An.tokenValues[An.openParenToken-1],t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":t=!1,e(An.tokenValues[An.openCurlyToken-3])?(n=An.tokenValues[An.openCurlyToken-4],t=n?en.indexOf(n)<0:!1):e(An.tokenValues[An.openCurlyToken-4])&&(n=An.tokenValues[An.openCurlyToken-5],t=n?en.indexOf(n)<0:!0)}return t?B():D()}function U(){var e,t;return un>=_n?{type:Kr.EOF,lineNumber:ln,lineStart:cn,start:un,end:un}:(e=an.charCodeAt(un),l(e)?(t=E(),sn&&h(t.value)&&(t.type=Kr.Keyword),t):40===e||41===e||59===e?D():39===e||34===e?M():46===e?r(an.charCodeAt(un+1))?C():D():r(e)?C():An.tokenize&&47===e?O():96===e||125===e&&"${"===xn.curlyStack[xn.curlyStack.length-1]?R():e>=55296&&57343>e&&(e=x(un),l(e))?E():D())}function z(){var e,t,r,n;return e={start:{line:ln,column:un-cn}},t=U(),e.end={line:ln,column:un-cn},t.type!==Kr.EOF&&(r=an.slice(t.start,t.end),n={type:Qr[t.type],value:r,range:[t.start,t.end],loc:e},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),An.tokenValues&&An.tokenValues.push("Punctuator"===n.type||"Keyword"===n.type?n.value:null),An.tokenize&&(An.range||delete n.range,An.loc||delete n.loc,An.delegate&&(n=An.delegate(n))),An.tokens.push(n)),t}function $(){var e;return yn=!0,hn=un,dn=ln,pn=cn,y(),e=bn,mn=un,gn=ln,vn=cn,bn="undefined"!=typeof An.tokens?z():U(),yn=!1,e}function G(){yn=!0,y(),hn=un,dn=ln,pn=cn,mn=un,gn=ln,vn=cn,bn="undefined"!=typeof An.tokens?z():U(),yn=!1}function q(){this.line=gn,this.column=mn-vn}function V(){this.start=new q,this.end=null}function W(e){this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function Y(){An.range&&(this.range=[mn,0]),An.loc&&(this.loc=new V)}function H(e){An.range&&(this.range=[e.start,0]),An.loc&&(this.loc=new W(e))}function X(e){var t,r;for(t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function ct(){return 59===an.charCodeAt(mn)||at(";")?void $():void(fn||(hn=mn,dn=gn,pn=vn,bn.type===Kr.EOF||at("}")||tt(bn)))}function ft(e){var t,r=wn,n=En,i=Dn;return wn=!0,En=!0,Dn=null,t=e(),null!==Dn&&tt(Dn),wn=r,En=n,Dn=i,t}function ht(e){var t,r=wn,n=En,i=Dn;return wn=!0,En=!0,Dn=null,t=e(),wn=wn&&r,En=En&&n,Dn=i||Dn,t}function dt(e,t){var r,n,i=new Y,o=[];for(nt("[");!at("]");)if(at(","))$(),o.push(null);else{if(at("...")){n=new Y,$(),e.push(bn),r=Qt(t),o.push(n.finishRestElement(r));break}o.push(vt(e,t)),at("]")||nt(",")}return nt("]"),i.finishArrayPattern(o)}function pt(e,t){var r,n,i,o=new Y,a=at("[");if(bn.type===Kr.Identifier){if(n=bn,r=Qt(),at("="))return e.push(n),$(),i=Ht(),o.finishProperty("init",r,!1,new H(n).finishAssignmentPattern(r,i),!1,!1);if(!at(":"))return e.push(n),o.finishProperty("init",r,!1,r,!1,!0)}else r=xt();return nt(":"),i=vt(e,t),o.finishProperty("init",r,a,i,!1,!1)}function mt(e,t){var r=new Y,n=[];for(nt("{");!at("}");)n.push(pt(e,t)),at("}")||nt(",");return $(),r.finishObjectPattern(n)}function gt(e,t){return at("[")?dt(e,t):at("{")?mt(e,t):(st("let")&&("const"===t||"let"===t)&&rt(bn,nn.UnexpectedToken),e.push(bn),Qt(t))}function vt(e,t){var r,n,i,o=bn;return r=gt(e,t),at("=")&&($(),n=xn.allowYield,xn.allowYield=!0,i=ft(Ht),xn.allowYield=n,r=new H(o).finishAssignmentPattern(r,i)),r}function yt(){var e,t=[],r=new Y;for(nt("[");!at("]");)at(",")?($(),t.push(null)):at("...")?(e=new Y,$(),e.finishSpreadElement(ht(Ht)),at("]")||(En=wn=!1,nt(",")),t.push(e)):(t.push(ht(Ht)),at("]")||nt(","));return $(),r.finishArrayExpression(t)}function _t(e,t,r){var n,i;return En=wn=!1,n=sn,i=ft(Tr),sn&&t.firstRestricted&&rt(t.firstRestricted,t.message),sn&&t.stricted&&rt(t.stricted,t.message),sn=n,e.finishFunctionExpression(null,t.params,t.defaults,i,r)}function bt(){var e,t,r=new Y,n=xn.allowYield;return xn.allowYield=!1,e=Cr(),xn.allowYield=n,xn.allowYield=!1,t=_t(r,e,!1),xn.allowYield=n,t}function xt(){var e,t,r=new Y;switch(e=$(),e.type){case Kr.StringLiteral:case Kr.NumericLiteral:return sn&&e.octal&&rt(e,nn.StrictOctalLiteral),r.finishLiteral(e);case Kr.Identifier:case Kr.BooleanLiteral:case Kr.NullLiteral:case Kr.Keyword:return r.finishIdentifier(e.value);case Kr.Punctuator:if("["===e.value)return t=ft(Ht),nt("]"),t}tt(e)}function At(){switch(bn.type){case Kr.Identifier:case Kr.StringLiteral:case Kr.BooleanLiteral:case Kr.NullLiteral:case Kr.NumericLiteral:case Kr.Keyword:return!0;case Kr.Punctuator:return"["===bn.value}return!1}function wt(e,t,r,n){var i,o,a,s,u=xn.allowYield;if(e.type===Kr.Identifier){if("get"===e.value&&At())return r=at("["),t=xt(),a=new Y,nt("("),nt(")"),xn.allowYield=!1,i=_t(a,{params:[],defaults:[],stricted:null,firstRestricted:null,message:null},!1),xn.allowYield=u,n.finishProperty("get",t,r,i,!1,!1);if("set"===e.value&&At())return r=at("["),t=xt(),a=new Y,nt("("),o={params:[],defaultCount:0,defaults:[],firstRestricted:null,paramSet:{}},at(")")?rt(bn):(xn.allowYield=!1,Sr(o),xn.allowYield=u,0===o.defaultCount&&(o.defaults=[])),nt(")"),xn.allowYield=!1,i=_t(a,o,!1),xn.allowYield=u,n.finishProperty("set",t,r,i,!1,!1)}else if(e.type===Kr.Punctuator&&"*"===e.value&&At())return r=at("["),t=xt(),a=new Y,xn.allowYield=!0,s=Cr(),xn.allowYield=u,xn.allowYield=!1,i=_t(a,s,!0),xn.allowYield=u,n.finishProperty("init",t,r,i,!0,!1);return t&&at("(")?(i=bt(),n.finishProperty("init",t,r,i,!0,!1)):null}function Et(e){var t,r,n,i,o,a=bn,s=new Y;return t=at("["),at("*")?$():r=xt(),(n=wt(a,r,t,s))?n:(r||tt(bn),t||(i=r.type===tn.Identifier&&"__proto__"===r.name||r.type===tn.Literal&&"__proto__"===r.value,e.value&&i&&Q(nn.DuplicateProtoProperty),e.value|=i),at(":")?($(),o=ht(Ht),s.finishProperty("init",r,t,o,!1,!1)):a.type===Kr.Identifier?at("=")?(Dn=bn,$(),o=ft(Ht),s.finishProperty("init",r,t,new H(a).finishAssignmentPattern(r,o),!1,!0)):s.finishProperty("init",r,t,r,!1,!0):void tt(bn))}function Dt(){var e=[],t={value:!1},r=new Y;for(nt("{");!at("}");)e.push(Et(t)),at("}")||it();return nt("}"),r.finishObjectExpression(e)}function kt(e){var t;switch(e.type){case tn.Identifier:case tn.MemberExpression:case tn.RestElement:case tn.AssignmentPattern:break;case tn.SpreadElement:e.type=tn.RestElement,kt(e.argument);break;case tn.ArrayExpression:for(e.type=tn.ArrayPattern,t=0;t")||nt("=>"),{type:rn.ArrowParameterPlaceHolder,params:[],rawParams:[]};if(r=bn,at("..."))return e=lr(i),nt(")"),at("=>")||nt("=>"),{type:rn.ArrowParameterPlaceHolder,params:[e]};if(wn=!0,e=ht(Ht),at(",")){for(En=!1,t=[e];_n>mn&&at(",");){if($(),at("...")){for(wn||tt(bn),t.push(lr(i)),nt(")"),at("=>")||nt("=>"),wn=!1,n=0;n")){if(e.type===tn.Identifier&&"yield"===e.name)return{type:rn.ArrowParameterPlaceHolder,params:[e]};if(wn||tt(bn),e.type===tn.SequenceExpression)for(n=0;nmn&&(at("...")?(e=new Y,$(),e.finishSpreadElement(ft(Ht))):e=ft(Ht),t.push(e),!at(")"));)it();return nt(")"),t}function Rt(){var e,t=new Y;return e=$(),N(e)||tt(e),t.finishIdentifier(e.value)}function jt(){return nt("."),Rt()}function Pt(){var e;return nt("["),e=ft(Xt),nt("]"),e}function It(){var e,t,r=new Y;if(ot("new"),at(".")){if($(),bn.type===Kr.Identifier&&"target"===bn.value&&xn.inFunctionBody)return $(),r.finishMetaProperty("new","target");tt(bn)}return e=ft(Bt),t=at("(")?Mt():[],En=wn=!1,r.finishNewExpression(e,t)}function Lt(){var e,t,r,n,i,o=xn.allowIn;for(i=bn,xn.allowIn=!0,st("super")&&xn.inFunctionBody?(t=new Y,$(),t=t.finishSuper(),at("(")||at(".")||at("[")||tt(bn)):t=ht(st("new")?It:Ct);;)if(at("."))wn=!1,En=!0,n=jt(),t=new H(i).finishMemberExpression(".",t,n);else if(at("("))wn=!1,En=!1,r=Mt(),t=new H(i).finishCallExpression(t,r);else if(at("["))wn=!1,En=!0,n=Pt(),t=new H(i).finishMemberExpression("[",t,n);else{if(bn.type!==Kr.Template||!bn.head)break;e=Ft(),t=new H(i).finishTaggedTemplateExpression(t,e)}return xn.allowIn=o,t}function Bt(){var e,r,n,i;for(t(xn.allowIn,"callee of new expression always allow in keyword."),i=bn,st("super")&&xn.inFunctionBody?(r=new Y,$(),r=r.finishSuper(),at("[")||at(".")||tt(bn)):r=ht(st("new")?It:Ct);;)if(at("["))wn=!1,En=!0,n=Pt(),r=new H(i).finishMemberExpression("[",r,n);else if(at("."))wn=!1,En=!0,n=jt(),r=new H(i).finishMemberExpression(".",r,n);else{if(bn.type!==Kr.Template||!bn.head)break;e=Ft(),r=new H(i).finishTaggedTemplateExpression(r,e)}return r}function Nt(){var e,t,r=bn;return e=ht(Lt),fn||bn.type!==Kr.Punctuator||(at("++")||at("--"))&&(sn&&e.type===tn.Identifier&&d(e.name)&&Q(nn.StrictLHSPostfix),En||Q(nn.InvalidLHSInAssignment),En=wn=!1,t=$(),e=new H(r).finishPostfixExpression(t.value,e)),e}function Ot(){var e,t,r;return bn.type!==Kr.Punctuator&&bn.type!==Kr.Keyword?t=Nt():at("++")||at("--")?(r=bn,e=$(),t=ht(Ot),sn&&t.type===tn.Identifier&&d(t.name)&&Q(nn.StrictLHSPrefix),En||Q(nn.InvalidLHSInAssignment),t=new H(r).finishUnaryExpression(e.value,t),En=wn=!1):at("+")||at("-")||at("~")||at("!")?(r=bn,e=$(),t=ht(Ot),t=new H(r).finishUnaryExpression(e.value,t),En=wn=!1):st("delete")||st("void")||st("typeof")?(r=bn,e=$(),t=ht(Ot),t=new H(r).finishUnaryExpression(e.value,t),sn&&"delete"===t.operator&&t.argument.type===tn.Identifier&&Q(nn.StrictDelete),En=wn=!1):t=Nt(),t}function Ut(e,t){var r=0;if(e.type!==Kr.Punctuator&&e.type!==Kr.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=t?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function zt(){var e,t,r,n,i,o,a,s,u,l;if(e=bn,u=ht(Ot),n=bn,i=Ut(n,xn.allowIn),0===i)return u;for(En=wn=!1,n.prec=i,$(),t=[e,bn],a=ft(Ot),o=[u,n,a];(i=Ut(bn,xn.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,u=o.pop(),t.pop(),r=new H(t[t.length-1]).finishBinaryExpression(s,u,a),o.push(r);n=$(),n.prec=i,o.push(n),t.push(bn),r=ft(Ot),o.push(r)}for(l=o.length-1,r=o[l],t.pop();l>1;)r=new H(t.pop()).finishBinaryExpression(o[l-1].value,o[l-2],r),l-=2;return r}function $t(){var e,t,r,n,i;return i=bn,e=ht(zt),at("?")&&($(),t=xn.allowIn,xn.allowIn=!0,r=ft(Ht),xn.allowIn=t,nt(":"),n=ft(Ht),e=new H(i).finishConditionalExpression(e,r,n),En=wn=!1),e}function Gt(){return at("{")?Tr():ft(Ht)}function qt(e,r){var n;switch(r.type){case tn.Identifier:Fr(e,r,r.name);break;case tn.RestElement:qt(e,r.argument);break;case tn.AssignmentPattern:qt(e,r.left);break;case tn.ArrayPattern:for(n=0;nt;t+=1)switch(n=i[t],n.type){case tn.AssignmentPattern:i[t]=n.left,n.right.type===tn.YieldExpression&&(n.right.argument&&tt(bn),n.right.type=tn.Identifier,n.right.name="yield",delete n.right.argument,delete n.right.delegate),o.push(n.right),++a,qt(s,n.left);break;default:qt(s,n),i[t]=n,o.push(null)}if(sn||!xn.allowYield)for(t=0,r=i.length;r>t;t+=1)n=i[t],n.type===tn.YieldExpression&&tt(bn);return s.message===nn.StrictParamDupe&&(u=sn?s.stricted:s.firstRestricted,tt(u,s.message)),0===a&&(o=[]),{params:i,defaults:o,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}function Wt(e,t){var r,n,i;return fn&&rt(bn),nt("=>"),r=sn,n=xn.allowYield,xn.allowYield=!0,i=Gt(),sn&&e.firstRestricted&&tt(e.firstRestricted,e.message),sn&&e.stricted&&rt(e.stricted,e.message),sn=r,xn.allowYield=n,t.finishArrowFunctionExpression(e.params,e.defaults,i,i.type!==tn.BlockStatement)}function Yt(){var e,t,r,n;return e=null,t=new Y,r=!1,ot("yield"),fn||(n=xn.allowYield,xn.allowYield=!1,r=at("*"),r?($(),e=Ht()):at(";")||at("}")||at(")")||bn.type===Kr.EOF||(e=Ht()),xn.allowYield=n),t.finishYieldExpression(e,r)}function Ht(){var e,t,r,n,i;return i=bn,e=bn,!xn.allowYield&&st("yield")?Yt():(t=$t(),t.type===rn.ArrowParameterPlaceHolder||at("=>")?(En=wn=!1,n=Vt(t),n?(Dn=null,Wt(n,new H(i))):t):(lt()&&(En||Q(nn.InvalidLHSInAssignment),sn&&t.type===tn.Identifier&&(d(t.name)&&rt(e,nn.StrictLHSAssignment),h(t.name)&&rt(e,nn.StrictReservedWord)),at("=")?kt(t):En=wn=!1,e=$(),r=ft(Ht),t=new H(i).finishAssignmentExpression(e.value,t,r),Dn=null),t))}function Xt(){var e,t,r=bn;if(e=ft(Ht),at(",")){for(t=[e];_n>mn&&at(",");)$(),t.push(ft(Ht));e=new H(r).finishSequenceExpression(t)}return e}function Zt(){if(bn.type===Kr.Keyword)switch(bn.value){case"export":return"module"!==xn.sourceType&&rt(bn,nn.IllegalExportDeclaration),zr();case"import":return"module"!==xn.sourceType&&rt(bn,nn.IllegalImportDeclaration),Wr();case"const":return ur({inFor:!1});case"function":return Mr(new Y);case"class":return Pr()}return st("let")&&sr()?ur({inFor:!1}):kr()}function Jt(){for(var e=[];_n>mn&&!at("}");)e.push(Zt());return e}function Kt(){var e,t=new Y;return nt("{"),e=Jt(),nt("}"),t.finishBlockStatement(e)}function Qt(e){var t,r=new Y;return t=$(),t.type===Kr.Keyword&&"yield"===t.value?(sn&&rt(t,nn.StrictReservedWord),xn.allowYield||tt(t)):t.type!==Kr.Identifier?sn&&t.type===Kr.Keyword&&h(t.value)?rt(t,nn.StrictReservedWord):(sn||"let"!==t.value||"var"!==e)&&tt(t):"module"===xn.sourceType&&t.type===Kr.Identifier&&"await"===t.value&&rt(t),r.finishIdentifier(t.value) +}function er(e){var t,r=null,n=new Y,i=[];return t=gt(i,"var"),sn&&d(t.name)&&Q(nn.StrictVarName),at("=")?($(),r=ft(Ht)):t.type===tn.Identifier||e.inFor||nt("="),n.finishVariableDeclarator(t,r)}function tr(e){var t,r;for(t={inFor:e.inFor},r=[er(t)];at(",");)$(),r.push(er(t));return r}function rr(e){var t;return ot("var"),t=tr({inFor:!1}),ct(),e.finishVariableDeclaration(t)}function nr(e,t){var r,n=null,i=new Y,o=[];return r=gt(o,e),sn&&r.type===tn.Identifier&&d(r.name)&&Q(nn.StrictVarName),"const"===e?st("in")||ut("of")||(nt("="),n=ft(Ht)):(!t.inFor&&r.type!==tn.Identifier||at("="))&&(nt("="),n=ft(Ht)),i.finishVariableDeclarator(r,n)}function ir(e,t){for(var r=[nr(e,t)];at(",");)$(),r.push(nr(e,t));return r}function or(){return{index:un,lineNumber:ln,lineStart:cn,hasLineTerminator:fn,lastIndex:hn,lastLineNumber:dn,lastLineStart:pn,startIndex:mn,startLineNumber:gn,startLineStart:vn,lookahead:bn,tokenCount:An.tokens?An.tokens.length:0}}function ar(e){un=e.index,ln=e.lineNumber,cn=e.lineStart,fn=e.hasLineTerminator,hn=e.lastIndex,dn=e.lastLineNumber,pn=e.lastLineStart,mn=e.startIndex,gn=e.startLineNumber,vn=e.startLineStart,bn=e.lookahead,An.tokens&&An.tokens.splice(e.tokenCount,An.tokens.length)}function sr(){var e,t;return t=or(),$(),e=bn.type===Kr.Identifier||at("[")||at("{")||st("let")||st("yield"),ar(t),e}function ur(e){var r,n,i=new Y;return r=$().value,t("let"===r||"const"===r,"Lexical declaration must be either let or const"),n=ir(r,e),ct(),i.finishLexicalDeclaration(n,r)}function lr(e){var t,r=new Y;return $(),at("{")&&K(nn.ObjectPatternAsRestParameter),e.push(bn),t=Qt(),at("=")&&K(nn.DefaultRestParameter),at(")")||K(nn.ParameterAfterRestParameter),r.finishRestElement(t)}function cr(e){return nt(";"),e.finishEmptyStatement()}function fr(e){var t=Xt();return ct(),e.finishExpressionStatement(t)}function hr(e){var t,r,n;return ot("if"),nt("("),t=Xt(),nt(")"),r=kr(),st("else")?($(),n=kr()):n=null,e.finishIfStatement(t,r,n)}function dr(e){var t,r,n;return ot("do"),n=xn.inIteration,xn.inIteration=!0,t=kr(),xn.inIteration=n,ot("while"),nt("("),r=Xt(),nt(")"),at(";")&&$(),e.finishDoWhileStatement(t,r)}function pr(e){var t,r,n;return ot("while"),nt("("),t=Xt(),nt(")"),n=xn.inIteration,xn.inIteration=!0,r=kr(),xn.inIteration=n,e.finishWhileStatement(t,r)}function mr(e){var t,r,n,i,o,a,s,u,l,c,f,h,d=xn.allowIn;if(t=o=a=null,r=!0,ot("for"),nt("("),at(";"))$();else if(st("var"))t=new Y,$(),xn.allowIn=!1,c=tr({inFor:!0}),xn.allowIn=d,1===c.length&&st("in")?(t=t.finishVariableDeclaration(c),$(),s=t,u=Xt(),t=null):1===c.length&&null===c[0].init&&ut("of")?(t=t.finishVariableDeclaration(c),$(),s=t,u=Ht(),t=null,r=!1):(t=t.finishVariableDeclaration(c),nt(";"));else if(st("const")||st("let"))t=new Y,l=$().value,sn||"in"!==bn.value?(xn.allowIn=!1,c=ir(l,{inFor:!0}),xn.allowIn=d,1===c.length&&null===c[0].init&&st("in")?(t=t.finishLexicalDeclaration(c,l),$(),s=t,u=Xt(),t=null):1===c.length&&null===c[0].init&&ut("of")?(t=t.finishLexicalDeclaration(c,l),$(),s=t,u=Ht(),t=null,r=!1):(ct(),t=t.finishLexicalDeclaration(c,l))):(t=t.finishIdentifier(l),$(),s=t,u=Xt(),t=null);else if(i=bn,xn.allowIn=!1,t=ht(Ht),xn.allowIn=d,st("in"))En||Q(nn.InvalidLHSInForIn),$(),kt(t),s=t,u=Xt(),t=null;else if(ut("of"))En||Q(nn.InvalidLHSInForLoop),$(),kt(t),s=t,u=Ht(),t=null,r=!1;else{if(at(",")){for(n=[t];at(",");)$(),n.push(ft(Ht));t=new H(i).finishSequenceExpression(n)}nt(";")}return"undefined"==typeof s&&(at(";")||(o=Xt()),nt(";"),at(")")||(a=Xt())),nt(")"),h=xn.inIteration,xn.inIteration=!0,f=ft(kr),xn.inIteration=h,"undefined"==typeof s?e.finishForStatement(t,o,a,f):r?e.finishForInStatement(s,u,f):e.finishForOfStatement(s,u,f)}function gr(e){var t,r=null;return ot("continue"),59===an.charCodeAt(mn)?($(),xn.inIteration||K(nn.IllegalContinue),e.finishContinueStatement(null)):fn?(xn.inIteration||K(nn.IllegalContinue),e.finishContinueStatement(null)):(bn.type===Kr.Identifier&&(r=Qt(),t="$"+r.name,Object.prototype.hasOwnProperty.call(xn.labelSet,t)||K(nn.UnknownLabel,r.name)),ct(),null!==r||xn.inIteration||K(nn.IllegalContinue),e.finishContinueStatement(r))}function vr(e){var t,r=null;return ot("break"),59===an.charCodeAt(hn)?($(),xn.inIteration||xn.inSwitch||K(nn.IllegalBreak),e.finishBreakStatement(null)):(fn?xn.inIteration||xn.inSwitch||K(nn.IllegalBreak):bn.type===Kr.Identifier&&(r=Qt(),t="$"+r.name,Object.prototype.hasOwnProperty.call(xn.labelSet,t)||K(nn.UnknownLabel,r.name)),ct(),null!==r||xn.inIteration||xn.inSwitch||K(nn.IllegalBreak),e.finishBreakStatement(r))}function yr(e){var t=null;return ot("return"),xn.inFunctionBody||Q(nn.IllegalReturn),32===an.charCodeAt(hn)&&l(an.charCodeAt(hn+1))?(t=Xt(),ct(),e.finishReturnStatement(t)):fn?e.finishReturnStatement(null):(at(";")||at("}")||bn.type===Kr.EOF||(t=Xt()),ct(),e.finishReturnStatement(t))}function _r(e){var t,r;return sn&&Q(nn.StrictModeWith),ot("with"),nt("("),t=Xt(),nt(")"),r=kr(),e.finishWithStatement(t,r)}function br(){var e,t,r=[],n=new Y;for(st("default")?($(),e=null):(ot("case"),e=Xt()),nt(":");_n>mn&&!(at("}")||st("default")||st("case"));)t=Zt(),r.push(t);return n.finishSwitchCase(e,r)}function xr(e){var t,r,n,i,o;if(ot("switch"),nt("("),t=Xt(),nt(")"),nt("{"),r=[],at("}"))return $(),e.finishSwitchStatement(t,r);for(i=xn.inSwitch,xn.inSwitch=!0,o=!1;_n>mn&&!at("}");)n=br(),null===n.test&&(o&&K(nn.MultipleDefaultsInSwitch),o=!0),r.push(n);return xn.inSwitch=i,nt("}"),e.finishSwitchStatement(t,r)}function Ar(e){var t;return ot("throw"),fn&&K(nn.NewlineAfterThrow),t=Xt(),ct(),e.finishThrowStatement(t)}function wr(){var e,t,r,n,i=[],o={},a=new Y;for(ot("catch"),nt("("),at(")")&&tt(bn),e=gt(i),r=0;rmn&&bn.type===Kr.StringLiteral&&(t=bn,e=Zt(),l.push(e),e.expression.type===tn.Literal);)r=an.slice(t.start+1,t.end-1),"use strict"===r?(sn=!0,n&&rt(n,nn.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(i=xn.labelSet,o=xn.inIteration,a=xn.inSwitch,s=xn.inFunctionBody,u=xn.parenthesizedCount,xn.labelSet={},xn.inIteration=!1,xn.inSwitch=!1,xn.inFunctionBody=!0,xn.parenthesizedCount=0;_n>mn&&!at("}");)l.push(Zt());return nt("}"),xn.labelSet=i,xn.inIteration=o,xn.inSwitch=a,xn.inFunctionBody=s,xn.parenthesizedCount=u,c.finishBlockStatement(l)}function Fr(e,t,r){var n="$"+r;sn?(d(r)&&(e.stricted=t,e.message=nn.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=nn.StrictParamDupe)):e.firstRestricted||(d(r)?(e.firstRestricted=t,e.message=nn.StrictParamName):h(r)?(e.firstRestricted=t,e.message=nn.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=nn.StrictParamDupe)),e.paramSet[n]=!0}function Sr(e){var t,r,n,i,o=[];if(t=bn,"..."===t.value)return r=lr(o),Fr(e,r.argument,r.argument.name),e.params.push(r),e.defaults.push(null),!1;for(r=vt(o),n=0;nmn&&Sr(t);)nt(",");return nt(")"),0===t.defaultCount&&(t.defaults=[]),{params:t.params,defaults:t.defaults,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}function Mr(e,t){var r,n,i,o,a,s,u,l,c,f=null,p=[],m=[];return c=xn.allowYield,ot("function"),l=at("*"),l&&$(),t&&at("(")||(n=bn,f=Qt(),sn?d(n.value)&&rt(n,nn.StrictFunctionName):d(n.value)?(a=n,s=nn.StrictFunctionName):h(n.value)&&(a=n,s=nn.StrictReservedWord)),xn.allowYield=!l,o=Cr(a),p=o.params,m=o.defaults,i=o.stricted,a=o.firstRestricted,o.message&&(s=o.message),u=sn,r=Tr(),sn&&a&&tt(a,s),sn&&i&&rt(i,s),sn=u,xn.allowYield=c,e.finishFunctionDeclaration(f,p,m,r,l)}function Rr(){var e,t,r,n,i,o,a,s,u,l=null,c=[],f=[],p=new Y;return u=xn.allowYield,ot("function"),s=at("*"),s&&$(),xn.allowYield=!s,at("(")||(e=bn,l=sn||s||!st("yield")?Qt():Rt(),sn?d(e.value)&&rt(e,nn.StrictFunctionName):d(e.value)?(r=e,n=nn.StrictFunctionName):h(e.value)&&(r=e,n=nn.StrictReservedWord)),i=Cr(r),c=i.params,f=i.defaults,t=i.stricted,r=i.firstRestricted,i.message&&(n=i.message),a=sn,o=Tr(),sn&&r&&tt(r,n),sn&&t&&rt(t,n),sn=a,xn.allowYield=u,p.finishFunctionExpression(l,c,f,o,s)}function jr(){var e,t,r,n,i,o,a,s=!1;for(e=new Y,nt("{"),n=[];!at("}");)at(";")?$():(i=new Y,t=bn,r=!1,o=at("["),at("*")?$():(a=xt(),"static"===a.name&&(At()||at("*"))&&(t=bn,r=!0,o=at("["),at("*")?$():a=xt())),i=wt(t,a,o,i),i?(i["static"]=r,"init"===i.kind&&(i.kind="method"),r?i.computed||"prototype"!==(i.key.name||i.key.value.toString())||tt(t,nn.StaticPrototype):i.computed||"constructor"!==(i.key.name||i.key.value.toString())||(("method"!==i.kind||!i.method||i.value.generator)&&tt(t,nn.ConstructorSpecialMethod),s?tt(t,nn.DuplicateConstructor):s=!0,i.kind="constructor"),i.type=tn.MethodDefinition,delete i.method,delete i.shorthand,n.push(i)):tt(bn));return $(),e.finishClassBody(n)}function Pr(e){var t,r=null,n=null,i=new Y,o=sn;return sn=!0,ot("class"),e&&bn.type!==Kr.Identifier||(r=Qt()),st("extends")&&($(),n=ft(Lt)),t=jr(),sn=o,i.finishClassDeclaration(r,n,t)}function Ir(){var e,t=null,r=null,n=new Y,i=sn;return sn=!0,ot("class"),bn.type===Kr.Identifier&&(t=Qt()),st("extends")&&($(),r=ft(Lt)),e=jr(),sn=i,n.finishClassExpression(t,r,e)}function Lr(){var e=new Y;return bn.type!==Kr.StringLiteral&&K(nn.InvalidModuleSpecifier),e.finishLiteral($())}function Br(){var e,t,r,n=new Y;return st("default")?(r=new Y,$(),t=r.finishIdentifier("default")):t=Qt(),ut("as")&&($(),e=Rt()),n.finishExportSpecifier(t,e)}function Nr(e){var t,r=null,n=null,i=[];if(bn.type===Kr.Keyword)switch(bn.value){case"let":case"const":return r=ur({inFor:!1}),e.finishExportNamedDeclaration(r,i,null);case"var":case"class":case"function":return r=Zt(),e.finishExportNamedDeclaration(r,i,null)}for(nt("{");!at("}")&&(t=t||st("default"),i.push(Br()),at("}")||(nt(","),!at("}"))););return nt("}"),ut("from")?($(),n=Lr(),ct()):t?K(bn.value?nn.UnexpectedToken:nn.MissingFromClause,bn.value):ct(),e.finishExportNamedDeclaration(r,i,n)}function Or(e){var t=null,r=null;return ot("default"),st("function")?(t=Mr(new Y,!0),e.finishExportDefaultDeclaration(t)):st("class")?(t=Pr(!0),e.finishExportDefaultDeclaration(t)):(ut("from")&&K(nn.UnexpectedToken,bn.value),r=at("{")?Dt():at("[")?yt():Ht(),ct(),e.finishExportDefaultDeclaration(r))}function Ur(e){var t;return nt("*"),ut("from")||K(bn.value?nn.UnexpectedToken:nn.MissingFromClause,bn.value),$(),t=Lr(),ct(),e.finishExportAllDeclaration(t)}function zr(){var e=new Y;return xn.inFunctionBody&&K(nn.IllegalExportDeclaration),ot("export"),st("default")?Or(e):at("*")?Ur(e):Nr(e)}function $r(){var e,t,r=new Y;return t=Rt(),ut("as")&&($(),e=Qt()),r.finishImportSpecifier(e,t)}function Gr(){var e=[];for(nt("{");!at("}")&&(e.push($r()),at("}")||(nt(","),!at("}"))););return nt("}"),e}function qr(){var e,t=new Y;return e=Rt(),t.finishImportDefaultSpecifier(e)}function Vr(){var e,t=new Y;return nt("*"),ut("as")||K(nn.NoAsAfterImportNamespace),$(),e=Rt(),t.finishImportNamespaceSpecifier(e)}function Wr(){var e,t=[],r=new Y;return xn.inFunctionBody&&K(nn.IllegalImportDeclaration),ot("import"),bn.type===Kr.StringLiteral?e=Lr():(at("{")?t=t.concat(Gr()):at("*")?t.push(Vr()):N(bn)&&!st("default")?(t.push(qr()),at(",")&&($(),at("*")?t.push(Vr()):at("{")?t=t.concat(Gr()):tt(bn))):tt($()),ut("from")||K(bn.value?nn.UnexpectedToken:nn.MissingFromClause,bn.value),$(),e=Lr()),ct(),r.finishImportDeclaration(t,e)}function Yr(){for(var e,t,r,n,i=[];_n>mn&&(t=bn,t.type===Kr.StringLiteral)&&(e=Zt(),i.push(e),e.expression.type===tn.Literal);)r=an.slice(t.start+1,t.end-1),"use strict"===r?(sn=!0,n&&rt(n,nn.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;_n>mn&&(e=Zt(),"undefined"!=typeof e);)i.push(e);return i}function Hr(){var e,t;return G(),t=new Y,e=Yr(),t.finishProgram(e,xn.sourceType)}function Xr(){var e,t,r,n=[];for(e=0;e0?1:0,cn=0,mn=un,gn=ln,vn=cn,_n=an.length,bn=null,xn={allowIn:!0,allowYield:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,curlyStack:[]},An={},t=t||{},t.tokens=!0,An.tokens=[],An.tokenValues=[],An.tokenize=!0,An.delegate=r,An.openParenToken=-1,An.openCurlyToken=-1,An.range="boolean"==typeof t.range&&t.range,An.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(An.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(An.errors=[]);try{if(G(),bn.type===Kr.EOF)return An.tokens;for($();bn.type!==Kr.EOF;)try{$()}catch(o){if(An.errors){X(o);break}throw o}i=An.tokens,"undefined"!=typeof An.errors&&(i.errors=An.errors)}catch(a){throw a}finally{An={}}return i}function Jr(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),an=e,un=0,ln=an.length>0?1:0,cn=0,mn=un,gn=ln,vn=cn,_n=an.length,bn=null,xn={allowIn:!0,allowYield:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,curlyStack:[],sourceType:"script"},sn=!1,An={},"undefined"!=typeof t&&(An.range="boolean"==typeof t.range&&t.range,An.loc="boolean"==typeof t.loc&&t.loc,An.attachComment="boolean"==typeof t.attachComment&&t.attachComment,An.loc&&null!==t.source&&void 0!==t.source&&(An.source=n(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(An.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(An.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(An.errors=[]),An.attachComment&&(An.range=!0,An.comments=[],An.bottomRightStack=[],An.trailingComments=[],An.leadingComments=[]),"module"===t.sourceType&&(xn.sourceType=t.sourceType,sn=!0));try{r=Hr(),"undefined"!=typeof An.comments&&(r.comments=An.comments),"undefined"!=typeof An.tokens&&(Xr(),r.tokens=An.tokens),"undefined"!=typeof An.errors&&(r.errors=An.errors)}catch(i){throw i}finally{An={}}return r}var Kr,Qr,en,tn,rn,nn,on,an,sn,un,ln,cn,fn,hn,dn,pn,mn,gn,vn,yn,_n,bn,xn,An,wn,En,Dn;Kr={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10},Qr={},Qr[Kr.BooleanLiteral]="Boolean",Qr[Kr.EOF]="",Qr[Kr.Identifier]="Identifier",Qr[Kr.Keyword]="Keyword",Qr[Kr.NullLiteral]="Null",Qr[Kr.NumericLiteral]="Numeric",Qr[Kr.Punctuator]="Punctuator",Qr[Kr.StringLiteral]="String",Qr[Kr.RegularExpression]="RegularExpression",Qr[Kr.Template]="Template",en=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tn={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},rn={ArrowParameterPlaceHolder:"ArrowParameterPlaceHolder"},nn={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",ObjectPatternAsRestParameter:"Unexpected token {",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0"},on={NonAsciiIdentifierStart:/[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\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\u19C1-\u19C7\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-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uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u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48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\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\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78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DD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\u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|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},H.prototype=Y.prototype={processComment:function(){var e,t,r,n,i,o,a=An.bottomRightStack,s=a[a.length-1]; +if(!(this.type===tn.Program&&this.body.length>0)){if(this.type===tn.BlockStatement&&0===this.body.length){for(t=[],i=An.leadingComments.length-1;i>=0;--i)o=An.leadingComments[i],this.range[1]>=o.range[1]&&(t.unshift(o),An.leadingComments.splice(i,1),An.trailingComments.splice(i,1));if(t.length)return void(this.innerComments=t)}if(An.trailingComments.length>0){for(n=[],i=An.trailingComments.length-1;i>=0;--i)o=An.trailingComments[i],o.range[0]>=this.range[1]&&(n.unshift(o),An.trailingComments.splice(i,1));An.trailingComments=[]}else s&&s.trailingComments&&s.trailingComments[0].range[0]>=this.range[1]&&(n=s.trailingComments,delete s.trailingComments);for(;s&&s.range[0]>=this.range[0];)e=a.pop(),s=a[a.length-1];if(e){if(e.leadingComments){for(r=[],i=e.leadingComments.length-1;i>=0;--i)o=e.leadingComments[i],o.range[1]<=this.range[0]&&(r.unshift(o),e.leadingComments.splice(i,1));e.leadingComments.length||(e.leadingComments=void 0)}}else if(An.leadingComments.length>0)for(r=[],i=An.leadingComments.length-1;i>=0;--i)o=An.leadingComments[i],o.range[1]<=this.range[0]&&(r.unshift(o),An.leadingComments.splice(i,1));r&&r.length>0&&(this.leadingComments=r),n&&n.length>0&&(this.trailingComments=n),a.push(this)}},finish:function(){An.range&&(this.range[1]=hn),An.loc&&(this.loc.end={line:dn,column:hn-pn},An.source&&(this.loc.source=An.source)),An.attachComment&&this.processComment()},finishArrayExpression:function(e){return this.type=tn.ArrayExpression,this.elements=e,this.finish(),this},finishArrayPattern:function(e){return this.type=tn.ArrayPattern,this.elements=e,this.finish(),this},finishArrowFunctionExpression:function(e,t,r,n){return this.type=tn.ArrowFunctionExpression,this.id=null,this.params=e,this.defaults=t,this.body=r,this.generator=!1,this.expression=n,this.finish(),this},finishAssignmentExpression:function(e,t,r){return this.type=tn.AssignmentExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishAssignmentPattern:function(e,t){return this.type=tn.AssignmentPattern,this.left=e,this.right=t,this.finish(),this},finishBinaryExpression:function(e,t,r){return this.type="||"===e||"&&"===e?tn.LogicalExpression:tn.BinaryExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishBlockStatement:function(e){return this.type=tn.BlockStatement,this.body=e,this.finish(),this},finishBreakStatement:function(e){return this.type=tn.BreakStatement,this.label=e,this.finish(),this},finishCallExpression:function(e,t){return this.type=tn.CallExpression,this.callee=e,this.arguments=t,this.finish(),this},finishCatchClause:function(e,t){return this.type=tn.CatchClause,this.param=e,this.body=t,this.finish(),this},finishClassBody:function(e){return this.type=tn.ClassBody,this.body=e,this.finish(),this},finishClassDeclaration:function(e,t,r){return this.type=tn.ClassDeclaration,this.id=e,this.superClass=t,this.body=r,this.finish(),this},finishClassExpression:function(e,t,r){return this.type=tn.ClassExpression,this.id=e,this.superClass=t,this.body=r,this.finish(),this},finishConditionalExpression:function(e,t,r){return this.type=tn.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r,this.finish(),this},finishContinueStatement:function(e){return this.type=tn.ContinueStatement,this.label=e,this.finish(),this},finishDebuggerStatement:function(){return this.type=tn.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(e,t){return this.type=tn.DoWhileStatement,this.body=e,this.test=t,this.finish(),this},finishEmptyStatement:function(){return this.type=tn.EmptyStatement,this.finish(),this},finishExpressionStatement:function(e){return this.type=tn.ExpressionStatement,this.expression=e,this.finish(),this},finishForStatement:function(e,t,r,n){return this.type=tn.ForStatement,this.init=e,this.test=t,this.update=r,this.body=n,this.finish(),this},finishForOfStatement:function(e,t,r){return this.type=tn.ForOfStatement,this.left=e,this.right=t,this.body=r,this.finish(),this},finishForInStatement:function(e,t,r){return this.type=tn.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1,this.finish(),this},finishFunctionDeclaration:function(e,t,r,n,i){return this.type=tn.FunctionDeclaration,this.id=e,this.params=t,this.defaults=r,this.body=n,this.generator=i,this.expression=!1,this.finish(),this},finishFunctionExpression:function(e,t,r,n,i){return this.type=tn.FunctionExpression,this.id=e,this.params=t,this.defaults=r,this.body=n,this.generator=i,this.expression=!1,this.finish(),this},finishIdentifier:function(e){return this.type=tn.Identifier,this.name=e,this.finish(),this},finishIfStatement:function(e,t,r){return this.type=tn.IfStatement,this.test=e,this.consequent=t,this.alternate=r,this.finish(),this},finishLabeledStatement:function(e,t){return this.type=tn.LabeledStatement,this.label=e,this.body=t,this.finish(),this},finishLiteral:function(e){return this.type=tn.Literal,this.value=e.value,this.raw=an.slice(e.start,e.end),e.regex&&(this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,r){return this.type=tn.MemberExpression,this.computed="["===e,this.object=t,this.property=r,this.finish(),this},finishMetaProperty:function(e,t){return this.type=tn.MetaProperty,this.meta=e,this.property=t,this.finish(),this},finishNewExpression:function(e,t){return this.type=tn.NewExpression,this.callee=e,this.arguments=t,this.finish(),this},finishObjectExpression:function(e){return this.type=tn.ObjectExpression,this.properties=e,this.finish(),this},finishObjectPattern:function(e){return this.type=tn.ObjectPattern,this.properties=e,this.finish(),this},finishPostfixExpression:function(e,t){return this.type=tn.UpdateExpression,this.operator=e,this.argument=t,this.prefix=!1,this.finish(),this},finishProgram:function(e,t){return this.type=tn.Program,this.body=e,this.sourceType=t,this.finish(),this},finishProperty:function(e,t,r,n,i,o){return this.type=tn.Property,this.key=t,this.computed=r,this.value=n,this.kind=e,this.method=i,this.shorthand=o,this.finish(),this},finishRestElement:function(e){return this.type=tn.RestElement,this.argument=e,this.finish(),this},finishReturnStatement:function(e){return this.type=tn.ReturnStatement,this.argument=e,this.finish(),this},finishSequenceExpression:function(e){return this.type=tn.SequenceExpression,this.expressions=e,this.finish(),this},finishSpreadElement:function(e){return this.type=tn.SpreadElement,this.argument=e,this.finish(),this},finishSwitchCase:function(e,t){return this.type=tn.SwitchCase,this.test=e,this.consequent=t,this.finish(),this},finishSuper:function(){return this.type=tn.Super,this.finish(),this},finishSwitchStatement:function(e,t){return this.type=tn.SwitchStatement,this.discriminant=e,this.cases=t,this.finish(),this},finishTaggedTemplateExpression:function(e,t){return this.type=tn.TaggedTemplateExpression,this.tag=e,this.quasi=t,this.finish(),this},finishTemplateElement:function(e,t){return this.type=tn.TemplateElement,this.value=e,this.tail=t,this.finish(),this},finishTemplateLiteral:function(e,t){return this.type=tn.TemplateLiteral,this.quasis=e,this.expressions=t,this.finish(),this},finishThisExpression:function(){return this.type=tn.ThisExpression,this.finish(),this},finishThrowStatement:function(e){return this.type=tn.ThrowStatement,this.argument=e,this.finish(),this},finishTryStatement:function(e,t,r){return this.type=tn.TryStatement,this.block=e,this.guardedHandlers=[],this.handlers=t?[t]:[],this.handler=t,this.finalizer=r,this.finish(),this},finishUnaryExpression:function(e,t){return this.type="++"===e||"--"===e?tn.UpdateExpression:tn.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(e){return this.type=tn.VariableDeclaration,this.declarations=e,this.kind="var",this.finish(),this},finishLexicalDeclaration:function(e,t){return this.type=tn.VariableDeclaration,this.declarations=e,this.kind=t,this.finish(),this},finishVariableDeclarator:function(e,t){return this.type=tn.VariableDeclarator,this.id=e,this.init=t,this.finish(),this},finishWhileStatement:function(e,t){return this.type=tn.WhileStatement,this.test=e,this.body=t,this.finish(),this},finishWithStatement:function(e,t){return this.type=tn.WithStatement,this.object=e,this.body=t,this.finish(),this},finishExportSpecifier:function(e,t){return this.type=tn.ExportSpecifier,this.exported=t||e,this.local=e,this.finish(),this},finishImportDefaultSpecifier:function(e){return this.type=tn.ImportDefaultSpecifier,this.local=e,this.finish(),this},finishImportNamespaceSpecifier:function(e){return this.type=tn.ImportNamespaceSpecifier,this.local=e,this.finish(),this},finishExportNamedDeclaration:function(e,t,r){return this.type=tn.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r,this.finish(),this},finishExportDefaultDeclaration:function(e){return this.type=tn.ExportDefaultDeclaration,this.declaration=e,this.finish(),this},finishExportAllDeclaration:function(e){return this.type=tn.ExportAllDeclaration,this.source=e,this.finish(),this},finishImportSpecifier:function(e,t){return this.type=tn.ImportSpecifier,this.local=e||t,this.imported=t,this.finish(),this},finishImportDeclaration:function(e,t){return this.type=tn.ImportDeclaration,this.specifiers=e,this.source=t,this.finish(),this},finishYieldExpression:function(e,t){return this.type=tn.YieldExpression,this.argument=e,this.delegate=t,this.finish(),this}},e.version="2.7.1",e.tokenize=Zr,e.parse=Jr,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in tn)tn.hasOwnProperty(e)&&(t[e]=tn[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})},{}],179:[function(e,t){!function(r,n){"object"==typeof t&&t.exports&&"function"==typeof e?t.exports=n():"function"==typeof define&&"object"==typeof define.amd?define(n):r.log=n()}(this,function(){function e(e){return typeof console===u?!1:void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):s}function t(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(n){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function r(e,t){return function(){typeof console!==u&&(n(t),a[e].apply(a,arguments))}}function n(e){for(var t=0;tt?s:a.methodFactory(r,e)}}function i(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage.loglevel=t)}catch(r){}try{window.document.cookie="loglevel="+t+";"}catch(r){}}function o(){var e;try{e=window.localStorage.loglevel}catch(t){}if(typeof e===u)try{e=/loglevel=([^;]+)/.exec(window.document.cookie)[1]}catch(t){}void 0===a.levels[e]&&(e="WARN"),a.setLevel(a.levels[e])}var a={},s=function(){},u="undefined",l=["trace","debug","info","warn","error"];a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=function(t,n){return e(t)||r(t,n)},a.setLevel=function(e){if("string"==typeof e&&void 0!==a.levels[e.toUpperCase()]&&(e=a.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;return i(e),n(e),typeof console===u&&e= "+this.values.min),i(t.join(" && "))}}}function v(e){var t=[];if("function"==typeof e)return t.push(i(e.toString()+"(context)")),t;if(Array.isArray(e))return t.push(d(null,e)),t;var r=Object.keys(e);return r.forEach(function(r){var n=e[r],i=typeof n;if("string"===i||"number"===i)t.push(u(r,n));else if("boolean"===i)t.push(m(r,n));else if(null==n)t.push(s(r,n));else if(b.indexOf(r)>=0)switch(r){case"not":t.push(c(r,n));break;case"any":t.push(d(r,n));break;case"all":t.push(p(r,n));break;case"none":t.push(f(r,n));break;default:throw new Error("Unhandled WhiteListed property: "+r)}else if(Array.isArray(n))t.push(l(r,n));else{if("object"!==i||null==n)throw new Error("Unknown Query sytnax: "+n);(n.max||n.min)&&t.push(g(r,n))}}),0===r.length?["true"]:t}function y(e){return i(e.join(" && "))}function _(e){return null==e?function(){return!0}:new Function("context","return "+y(v(e))+";")}var b=["not","any","all","none"];t.exports={match:_,filterToString:y,parseFilter:v}},{}],181:[function(e,t){"use strict";function r(e){var t;e&&e.length&&(t=e,e=t.length);var r=new Uint8Array(e||0);return t&&r.set(t),r.readUInt32LE=i.readUInt32LE,r.writeUInt32LE=i.writeUInt32LE,r.readInt32LE=i.readInt32LE,r.writeInt32LE=i.writeInt32LE,r.readFloatLE=i.readFloatLE,r.writeFloatLE=i.writeFloatLE,r.readDoubleLE=i.readDoubleLE,r.writeDoubleLE=i.writeDoubleLE,r.toString=i.toString,r.write=i.write,r.slice=i.slice,r.copy=i.copy,r._isBuffer=!0,r}function n(e){for(var t,r,n=e.length,i=[],o=0;n>o;o++){if(t=e.charCodeAt(o),t>55295&&57344>t){if(!r){t>56319||o+1===n?i.push(239,191,189):r=t;continue}if(56320>t){i.push(239,191,189),r=t;continue}t=r-55296<<10|t-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);128>t?i.push(t):2048>t?i.push(t>>6|192,63&t|128):65536>t?i.push(t>>12|224,t>>6&63|128,63&t|128):i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}return i}t.exports=r;var i,o,a,s=e("ieee754");i={readUInt32LE:function(e){return(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},writeUInt32LE:function(e,t){this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24},readInt32LE:function(e){return(this[e]|this[e+1]<<8|this[e+2]<<16)+(this[e+3]<<24)},readFloatLE:function(e){return s.read(this,e,!0,23,4)},readDoubleLE:function(e){return s.read(this,e,!0,52,8)},writeFloatLE:function(e,t){return s.write(this,e,t,!0,23,4)},writeDoubleLE:function(e,t){return s.write(this,e,t,!0,52,8)},toString:function(e,t,r){var n="",i="";t=t||0,r=Math.min(this.length,r||this.length);for(var o=t;r>o;o++){var a=this[o];127>=a?(n+=decodeURIComponent(i)+String.fromCharCode(a),i=""):i+="%"+a.toString(16)}return n+=decodeURIComponent(i)},write:function(e,t){for(var r=e===o?a:n(e),i=0;i>3,o=this.pos;e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=this.buf.readUInt32LE(this.pos);return this.pos+=4,e},readSFixed32:function(){var e=this.buf.readInt32LE(this.pos);return this.pos+=4,e},readFixed64:function(){var e=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*p;return this.pos+=8,e},readSFixed64:function(){var e=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*p;return this.pos+=8,e},readFloat:function(){var e=this.buf.readFloatLE(this.pos);return this.pos+=4,e},readDouble:function(){var e=this.buf.readDoubleLE(this.pos);return this.pos+=8,e},readVarint:function(){var e,t,r,n,i,o,a=this.buf;if(r=a[this.pos++],128>r)return r;if(r=127&r,n=a[this.pos++],128>n)return r|n<<7;if(n=(127&n)<<7,i=a[this.pos++],128>i)return r|n|i<<14;if(i=(127&i)<<14,o=a[this.pos++],128>o)return r|n|i|o<<21;if(e=r|n|i|(127&o)<<21,t=a[this.pos++],e+=268435456*(127&t),128>t)return e;if(t=a[this.pos++],e+=34359738368*(127&t),128>t)return e;if(t=a[this.pos++],e+=4398046511104*(127&t),128>t)return e;if(t=a[this.pos++],e+=562949953421312*(127&t),128>t)return e;if(t=a[this.pos++],e+=72057594037927940*(127&t),128>t)return e;if(t=a[this.pos++],e+=0x8000000000000000*(127&t),128>t)return e;throw new Error("Expected varint not more than 10 bytes")},readVarint64:function(){var e=this.pos,t=this.readVarint();if(g>t)return t;for(var r=this.pos-2;255===this.buf[r];)r--;e>r&&(r=e),t=0;for(var n=0;r-e+1>n;n++){var i=127&~this.buf[e+n];t+=4>n?i<<7*n:i*Math.pow(2,7*n)}return-t-1},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.buf.toString("utf8",this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.slice(this.pos,e);return this.pos=e,t},readPackedVarint:function(){for(var e=this.readVarint()+this.pos,t=[];this.pos127;);else if(t===n.Bytes)this.pos=this.readVarint()+this.pos;else if(t===n.Fixed32)this.pos+=4;else{if(t!==n.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t=e)this.realloc(1),this.buf[this.pos++]=e;else if(16383>=e)this.realloc(2),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127;else if(2097151>=e)this.realloc(3),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127|128,this.buf[this.pos++]=e>>>14&127;else if(268435455>=e)this.realloc(4),this.buf[this.pos++]=e>>>0&127|128,this.buf[this.pos++]=e>>>7&127|128,this.buf[this.pos++]=e>>>14&127|128,this.buf[this.pos++]=e>>>21&127;else{for(var t=this.pos;e>=128;)this.realloc(1),this.buf[this.pos++]=255&e|128,e/=128;if(this.realloc(1),this.buf[this.pos++]=0|e,this.pos-t>10)throw new Error("Given varint doesn't fit into 10 bytes")}},writeSVarint:function(e){this.writeVarint(0>e?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e);var t=d.byteLength(e);this.writeVarint(t),this.realloc(t),this.buf.write(e,this.pos),this.pos+=t},writeFloat:function(e){this.realloc(4),this.buf.writeFloatLE(e,this.pos),this.pos+=4},writeDouble:function(e){this.realloc(8),this.buf.writeDoubleLE(e,this.pos),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;t>r;r++)this.buf[this.pos++]=e[r]},writeMessage:function(e,t,r){this.writeTag(e,n.Bytes),this.pos++;var i=this.pos;t(r,this);var o=this.pos-i,a=127>=o?1:16383>=o?2:2097151>=o?3:268435455>=o?4:Math.ceil(Math.log(o)/(7*Math.LN2));if(a>1){this.realloc(a-1);for(var s=this.pos-1;s>=i;s--)this.buf[s+a-1]=this.buf[s]}this.pos=i-1,this.writeVarint(o),this.pos+=o},writePackedVarint:function(e,t){this.writeMessage(e,i,t)},writePackedSVarint:function(e,t){this.writeMessage(e,o,t)},writePackedBoolean:function(e,t){this.writeMessage(e,u,t)},writePackedFloat:function(e,t){this.writeMessage(e,a,t)},writePackedDouble:function(e,t){this.writeMessage(e,s,t)},writePackedFixed32:function(e,t){this.writeMessage(e,l,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,c,t)},writePackedFixed64:function(e,t){this.writeMessage(e,f,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,h,t)},writeBytesField:function(e,t){this.writeTag(e,n.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,n.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,n.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,n.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,n.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,n.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,n.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,n.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,n.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,n.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":181}],183:[function(e,t){"use strict";function r(e,t){this.x=e,this.y=t}t.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(e){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):e}},{}],184:[function(e,t){function r(){}var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var n=[];if(t){var i=document.createElement("div"),o=new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})});return o.observe(i,{attributes:!0}),function(e){n.length||i.setAttribute("yes","no"),n.push(e)}}return r?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],185:[function(e,t){"use stric";var r="\\/\\*",n="\\/\\*(?!\\*?\\!)",i="(.|[\\r\\n]|\\n)*?\\*\\/\\n?\\n?",o=/(^|[^\S\n])(?:\/\/)([\s\S]+?)$/gm,a=/(^|[^\S\n])(?:\/\/[^!])([\s\S]+?)$/gm,s=t.exports=function(e,t){return e?s.block(s.line(e,t),t):""};s.block=function(e,t){t=t||{};var o=new RegExp(r+i,"gm");return t.safe&&(o=new RegExp(n+i,"gm")),e?e.replace(o,""):""},s.line=function(e,t){t=t||{};var r=o;return t.safe&&(r=a),e?e.replace(r,""):""}},{}],186:[function(e,t){!function(){function e(e,t){function r(t){var r,n=e.arcs[0>t?~t:t],i=n[0];return e.transform?(r=[0,0],n.forEach(function(e){r[0]+=e[0],r[1]+=e[1]})):r=n[n.length-1],0>t?[r,i]:[i,r]}function n(e,t){for(var r in e){var n=e[r];delete t[n.start],delete n.start,delete n.end,n.forEach(function(e){i[0>e?~e:e]=1}),s.push(n)}}var i={},o={},a={},s=[],u=-1;return t.forEach(function(r,n){var i,o=e.arcs[0>r?~r:r];o.length<3&&!o[1][0]&&!o[1][1]&&(i=t[++u],t[u]=r,t[n]=i)}),t.forEach(function(e){var t,n,i=r(e),s=i[0],u=i[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=u,n=o[u]){delete o[n.start];var l=n===t?t:t.concat(n);o[l.start=t.start]=a[l.end=n.end]=l}else o[t.start]=a[t.end]=t;else if(t=o[u])if(delete o[t.start],t.unshift(e),t.start=s,n=a[s]){delete a[n.end];var c=n===t?t:n.concat(t);o[c.start=n.start]=a[c.end=t.end]=c}else o[t.start]=a[t.end]=t;else t=[e],o[t.start=s]=a[t.end=u]=t}),n(a,o),n(o,a),t.forEach(function(e){i[0>e?~e:e]||s.push([e])}),s}function r(t,r,n){function i(e){var t=0>e?~e:e;(c[t]||(c[t]=[])).push({i:e,g:l})}function o(e){e.forEach(i)}function a(e){e.forEach(o)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in f&&(l=e,f[e.type](e.arcs))}var u=[];if(arguments.length>1){var l,c=[],f={LineString:o,MultiLineString:a,Polygon:a,MultiPolygon:function(e){e.forEach(a)}};s(r),c.forEach(arguments.length<3?function(e){u.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&u.push(e[0].i)})}else for(var h=0,d=t.arcs.length;d>h;++h)u.push(h);return{type:"MultiLineString",arcs:e(t,u)}}function i(t,r){function i(e){e.forEach(function(t){t.forEach(function(t){(a[t=0>t?~t:t]||(a[t]=[])).push(e)})}),u.push(e)}function o(e){return h(s(t,{type:"Polygon",arcs:[e]}).coordinates[0])>0}var a={},u=[],l=[];return r.forEach(function(e){"Polygon"===e.type?i(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(i)}),u.forEach(function(e){if(!e._){var t=[],r=[e];for(e._=1,l.push(t);e=r.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){a[0>e?~e:e].forEach(function(e){e._||(e._=1,r.push(e))})})})}}),u.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:l.map(function(r){var i=[];if(r.forEach(function(e){e.forEach(function(e){e.forEach(function(e){a[0>e?~e:e].length<2&&i.push(e)})})}),i=e(t,i),(n=i.length)>1)for(var s,u=o(r[0][0]),l=0;n>l;++l)if(u===o(i[l])){s=i[0],i[0]=i[l],i[l]=s;break}return i})}}function o(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return a(e,t)})}:a(e,t)}function a(e,t){var r={type:"Feature",id:t.id,properties:t.properties||{},geometry:s(e,t)};return null==t.id&&delete r.id,r}function s(e,t){function r(e,t){t.length&&t.pop();for(var r,n=c[0>e?~e:e],i=0,o=n.length;o>i;++i)t.push(r=n[i].slice()),l(r,i);0>e&&u(t,o)}function n(e){return e=e.slice(),l(e,0),e}function i(e){for(var t=[],n=0,i=e.length;i>n;++n)r(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function o(e){for(var t=i(e);t.length<4;)t.push(t[0].slice());return t}function a(e){return e.map(o)}function s(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(s)}:t in f?{type:t,coordinates:f[t](e)}:null}var l=g(e.transform),c=e.arcs,f={Point:function(e){return n(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(n)},LineString:function(e){return i(e.arcs)},MultiLineString:function(e){return e.arcs.map(i)},Polygon:function(e){return a(e.arcs)},MultiPolygon:function(e){return e.arcs.map(a)}};return s(t)}function u(e,t){for(var r,n=e.length,i=n-t;i<--n;)r=e[i],e[i++]=e[n],e[n]=r}function l(e,t){for(var r=0,n=e.length;n>r;){var i=r+n>>>1;e[i]e&&(e=~e);var r=i[e];r?r.push(t):i[e]=[t]})}function r(e,r){e.forEach(function(e){t(e,r)})}function n(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){n(e,t)}):e.type in a&&a[e.type](e.arcs,t)}var i={},o=e.map(function(){return[]}),a={LineString:t,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach(function(e){r(e,t)})}};e.forEach(n);for(var s in i)for(var u=i[s],c=u.length,f=0;c>f;++f)for(var h=f+1;c>h;++h){var d,p=u[f],m=u[h];(d=o[p])[s=l(d,m)]!==m&&d.splice(s,0,m),(d=o[m])[s=l(d,p)]!==p&&d.splice(s,0,p)}return o}function f(e,t){function r(e){o.remove(e),e[1][2]=t(e),o.push(e)}var n=g(e.transform),i=v(e.transform),o=m();return t||(t=d),e.arcs.forEach(function(e){for(var a,s,u=[],l=0,c=0,f=e.length;f>c;++c)s=e[c],n(e[c]=[s[0],s[1],1/0],c);for(var c=1,f=e.length-1;f>c;++c)a=e.slice(c-1,c+2),a[1][2]=t(a),u.push(a),o.push(a);for(var c=0,f=u.length;f>c;++c)a=u[c],a.previous=u[c-1],a.next=u[c+1]; +for(;a=o.pop();){var h=a.previous,d=a.next;a[1][2]0;){var r=(t+1>>1)-1,i=n[r];if(p(e,i)>=0)break;n[i._=t]=i,n[e._=t=r]=e}}function t(e,t){for(;;){var r=t+1<<1,o=r-1,a=t,s=n[a];if(i>o&&p(n[o],s)<0&&(s=n[a=o]),i>r&&p(n[r],s)<0&&(s=n[a=r]),a===t)break;n[s._=t]=s,n[e._=t=a]=e}}var r={},n=[],i=0;return r.push=function(t){return e(n[t._=i]=t,i++),i},r.pop=function(){if(!(0>=i)){var e,r=n[0];return--i>0&&(e=n[i],t(n[e._=0]=e,0)),r}},r.remove=function(r){var o,a=r._;if(n[a]===r)return a!==--i&&(o=n[i],(p(o,r)<0?e:t)(n[o._=a]=o,a)),a},r}function g(e){if(!e)return y;var t,r,n=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=r=0),e[0]=(t+=e[0])*n+o,e[1]=(r+=e[1])*i+a}}function v(e){if(!e)return y;var t,r,n=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=r=0);var u=(e[0]-o)/n|0,l=(e[1]-a)/i|0;e[0]=u-t,e[1]=l-r,t=u,r=l}}function y(){}var _={version:"1.6.19",mesh:function(e){return s(e,r.apply(this,arguments))},meshArcs:r,merge:function(e){return s(e,i.apply(this,arguments))},mergeArcs:i,feature:o,neighbors:c,presimplify:f};"function"==typeof define&&define.amd?define(_):"object"==typeof t&&t.exports?t.exports=_:this.topojson=_}()},{}],187:[function(e,t,r){(function(t,n){"use strict";function i(e){if(e){var t=e.length||e.byteLength,r=y.log2(t);A[r].push(e)}}function o(e){i(e.buffer)}function a(e){var e=y.nextPow2(e),t=y.log2(e),r=A[t];return r.length>0?r.pop():new ArrayBuffer(e)}function s(e){return new Uint8Array(a(e),0,e)}function u(e){return new Uint16Array(a(2*e),0,e)}function l(e){return new Uint32Array(a(4*e),0,e)}function c(e){return new Int8Array(a(e),0,e)}function f(e){return new Int16Array(a(2*e),0,e)}function h(e){return new Int32Array(a(4*e),0,e)}function d(e){return new Float32Array(a(4*e),0,e)}function p(e){return new Float64Array(a(8*e),0,e)}function m(e){return b?new Uint8ClampedArray(a(e),0,e):s(e)}function g(e){return new DataView(a(e),0,e)}function v(e){e=y.nextPow2(e);var t=y.log2(e),r=w[t];return r.length>0?r.pop():new n(e)}var y=e("bit-twiddle"),_=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:_([32,0]),UINT16:_([32,0]),UINT32:_([32,0]),INT8:_([32,0]),INT16:_([32,0]),INT32:_([32,0]),FLOAT:_([32,0]),DOUBLE:_([32,0]),DATA:_([32,0]),UINT8C:_([32,0]),BUFFER:_([32,0])});var b="undefined"!=typeof Uint8ClampedArray,x=t.__TYPEDARRAY_POOL;x.UINT8C||(x.UINT8C=_([32,0])),x.BUFFER||(x.BUFFER=_([32,0]));var A=x.DATA,w=x.BUFFER;r.free=function(e){if(n.isBuffer(e))w[y.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|y.log2(t);A[r].push(e)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=o,r.freeArrayBuffer=i,r.freeBuffer=function(e){w[y.log2(e.length)].push(e)},r.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return a(e);switch(t){case"uint8":return s(e);case"uint16":return u(e);case"uint32":return l(e);case"int8":return c(e);case"int16":return f(e);case"int32":return h(e);case"float":case"float32":return d(e);case"double":case"float64":return p(e);case"uint8_clamped":return m(e);case"buffer":return v(e);case"data":case"dataview":return g(e);default:return null}return null},r.mallocArrayBuffer=a,r.mallocUint8=s,r.mallocUint16=u,r.mallocUint32=l,r.mallocInt8=c,r.mallocInt16=f,r.mallocInt32=h,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var e=0;32>e;++e)x.UINT8[e].length=0,x.UINT16[e].length=0,x.UINT32[e].length=0,x.INT8[e].length=0,x.INT16[e].length=0,x.INT32[e].length=0,x.FLOAT[e].length=0,x.DOUBLE[e].length=0,x.UINT8C[e].length=0,A[e].length=0,w[e].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":29,buffer:38,dup:134}],188:[function(e,t){t.exports.VectorTile=e("./lib/vectortile.js"),t.exports.VectorTileFeature=e("./lib/vectortilefeature.js"),t.exports.VectorTileLayer=e("./lib/vectortilelayer.js")},{"./lib/vectortile.js":189,"./lib/vectortilefeature.js":190,"./lib/vectortilelayer.js":191}],189:[function(e,t){"use strict";function r(e,t){this.layers=e.readFields(n,{},t)}function n(e,t,r){if(3===e){var n=new i(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var i=e("./vectortilelayer");t.exports=r},{"./vectortilelayer":191}],190:[function(e,t){"use strict";function r(e,t,r,i,o){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,e.readFields(n,this,t)}function n(e,t,r){1==e?t._id=r.readVarint():2==e?i(r,t):3==e?t.type=r.readVarint():4==e&&(t._geometry=r.pos)}function i(e,t){for(var r=e.readVarint()+e.pos;e.pos>3}if(i--,1===n||2===n)a+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&u.push(t),t=[]),t.push(new o(a,s));else{if(7!==n)throw new Error("unknown command "+n);t.push(t[0].clone())}}return t&&u.push(t),u},r.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;e.pos>3}if(n--,1===r||2===r)i+=e.readSVarint(),o+=e.readSVarint(),a>i&&(a=i),i>s&&(s=i),u>o&&(u=o),o>l&&(l=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,u,s,l]},r.prototype.toGeoJSON=function(e,t,n){for(var i=this.extent*Math.pow(2,n),o=this.extent*e,a=this.extent*t,s=this.loadGeometry(),u=r.types[this.type],l=0;l>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}var o=e("./vectortilefeature.js");t.exports=r,r.prototype.feature=function(e){if(0>e||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,t,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":190}],192:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/get")["default"],a=e("babel-runtime/helpers/inherits")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("./geo"),l=s(u),c=e("./utils/utils"),f=s(c),h=e("./gl/shader_program"),d=s(h),p=e("gl-matrix"),m=s(p),g=m["default"].mat4,v=m["default"].vec3,y=function(){function e(t,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,e),this.scene=r,this.position=n.position,this.zoom=n.zoom}return n(e,[{key:"update",value:function(){}},{key:"setupProgram",value:function(){}},{key:"updateScene",value:function(){if(this.position||this.zoom){var e={};this.position&&(e={lng:this.position[0],lat:this.position[1],zoom:this.position[2]}),this.zoom&&(e.zoom=this.zoom),this.scene.setView(e)}}}],[{key:"create",value:function(e,t,r){switch(r.type){case"isometric":return new b(e,t,r);case"flat":return new x(e,t,r);case"perspective":default:return new _(e,t,r)}}}]),e}();r["default"]=y;var _=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="perspective",this.focal_length=n.focal_length,this.fov=n.fov,this.focal_length||this.fov||(this.focal_length=[[16,2],[17,2.5],[18,3],[19,4],[20,6]]),this.vanishing_point=n.vanishing_point||[0,0],this.vanishing_point=this.vanishing_point.map(parseFloat),this.vanishing_point_skew=[],this.position_meters=null,this.viewMatrix=new Float64Array(16),this.projectionMatrix=new Float32Array(16),d["default"].replaceBlock("camera","\n uniform mat4 u_projection;\n uniform vec3 u_eye;\n uniform vec2 u_vanishing_point;\n\n void cameraProjection (inout vec4 position) {\n position = u_projection * position;\n }")}return a(t,e),n(t,[{key:"constrainCamera",value:function(e){var t=e.view_height,r=e.height,n=e.focal_length,i=e.fov;return r?(n=2*r/t,i=2*Math.atan(1/n)):(n?i=2*Math.atan(1/n):i&&(i=i*Math.PI/180,n=1/Math.tan(i/2)),r=t/2*n),{view_height:t,height:r,focal_length:n,fov:i}}},{key:"updateMatrices",value:function(){var e=this.scene.css_size.height*l["default"].metersPerPixel(this.scene.zoom),t=this.constrainCamera({view_height:e,focal_length:f["default"].interpolate(this.scene.zoom,this.focal_length),fov:f["default"].interpolate(this.scene.zoom,this.fov)}),r=t.height,n=t.fov,i=[this.scene.center_meters.x,this.scene.center_meters.y,r];this.position_meters=i,g.lookAt(this.viewMatrix,v.fromValues(i[0],i[1],0),v.fromValues(i[0],i[1],-1),v.fromValues(0,1,0)),g.perspective(this.projectionMatrix,n,this.scene.view_aspect,1,2*r),this.vanishing_point_skew[0]=this.vanishing_point[0]/this.scene.css_size.width,this.vanishing_point_skew[1]=this.vanishing_point[1]/this.scene.css_size.height,this.projectionMatrix[8]=-this.vanishing_point_skew[0],this.projectionMatrix[9]=-this.vanishing_point_skew[1],g.translate(this.projectionMatrix,this.projectionMatrix,v.fromValues(e/2*this.scene.view_aspect*-this.vanishing_point_skew[0],e/2*-this.vanishing_point_skew[1],0)),g.translate(this.projectionMatrix,this.projectionMatrix,v.fromValues(0,0,-r))}},{key:"update",value:function(){o(Object.getPrototypeOf(t.prototype),"update",this).call(this),this.updateMatrices()}},{key:"setupProgram",value:function(e){e.uniform("Matrix4fv","u_projection",!1,this.projectionMatrix),e.uniform("3f","u_eye",0,0,this.position_meters[2]),e.uniform("2fv","u_vanishing_point",this.vanishing_point_skew)}}]),t}(y),b=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="isometric",this.axis=n.axis||{x:0,y:1},2===this.axis.length&&(this.axis={x:this.axis[0],y:this.axis[1]}),this.position_meters=null,this.viewport_height=null,this.viewMatrix=new Float64Array(16),this.projectionMatrix=new Float32Array(16),d["default"].replaceBlock("camera","\n uniform mat4 u_projection;\n uniform vec3 u_eye;\n uniform vec2 u_vanishing_point;\n\n void cameraProjection (inout vec4 position) {\n position = u_projection * position;\n // position.xy += position.z * u_isometric_axis;\n\n // Reverse z for depth buffer so up is negative,\n // and scale down values so objects higher than one screen height will not get clipped\n // pull forward slightly to avoid going past far clipping plane\n position.z = -position.z / 100. + 1. - 0.001;\n }")}return a(t,e),n(t,[{key:"update",value:function(){o(Object.getPrototypeOf(t.prototype),"update",this).call(this),this.viewport_height=this.scene.css_size.height*l["default"].metersPerPixel(this.scene.zoom);var e=[this.scene.center_meters.x,this.scene.center_meters.y,this.viewport_height];this.position_meters=e,g.identity(this.viewMatrix),g.translate(this.viewMatrix,this.viewMatrix,v.fromValues(-e[0],-e[1],0)),g.identity(this.projectionMatrix),this.projectionMatrix[8]=this.axis.x/this.scene.view_aspect,this.projectionMatrix[9]=this.axis.y,g.scale(this.projectionMatrix,this.projectionMatrix,v.fromValues(2/this.scene.viewport_meters.x,2/this.scene.viewport_meters.y,2/this.scene.viewport_meters.y))}},{key:"setupProgram",value:function(e){e.uniform("Matrix4fv","u_projection",!1,this.projectionMatrix),e.uniform("3f","u_eye",0,0,this.viewport_height),e.uniform("2f","u_vanishing_point",0,0)}}]),t}(y),x=function(e){function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.type="flat"}return a(t,e),n(t,[{key:"update",value:function(){this.axis.x=0,this.axis.y=0,o(Object.getPrototypeOf(t.prototype),"update",this).call(this)}}]),t}(b);t.exports=r["default"]},{"./geo":193,"./gl/shader_program":199,"./utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":142}],193:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/sliced-to-array")["default"],i=e("babel-runtime/core-js/get-iterator")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o;r["default"]=o={},o.default_max_zoom=18,o.tile_size=256,o.half_circumference_meters=20037508.342789244,o.circumference_meters=2*o.half_circumference_meters,o.min_zoom_meters_per_pixel=o.circumference_meters/o.tile_size;var a=[];o.metersPerPixel=function(e){return a[e]=a[e]||o.min_zoom_meters_per_pixel/Math.pow(2,e),a[e]};var s=[];o.metersPerTile=function(e){return s[e]=s[e]||o.circumference_meters/Math.pow(2,e),s[e]},o.tile_scale=4096,o.units_per_pixel=o.tile_scale/o.tile_size;var u=[];o.unitsPerMeter=function(e){return u[e]=u[e]||o.tile_scale/(o.tile_size*o.metersPerPixel(e)),u[e]},o.metersForTile=function(e){return{x:e.x*o.circumference_meters/Math.pow(2,e.z)-o.half_circumference_meters,y:-(e.y*o.circumference_meters/Math.pow(2,e.z)-o.half_circumference_meters)}},o.tileForMeters=function(e,t){var r=n(e,2),i=r[0],a=r[1];return{x:Math.floor((i+o.half_circumference_meters)/(o.circumference_meters/Math.pow(2,t))),y:Math.floor((-a+o.half_circumference_meters)/(o.circumference_meters/Math.pow(2,t))),z:t}},o.wrapTile=function(e){var t=e.x,r=e.y,n=e.z,i=arguments.length<=1||void 0===arguments[1]?{x:!0,y:!1}:arguments[1],o=(1<180||-180>e)&&(e=((e+180)%360+360)%360-180),e},o.transformGeometry=function(e,t){null!=e&&("Point"===e.type?t(e.coordinates):"LineString"===e.type||"MultiPoint"===e.type?e.coordinates.forEach(t):"Polygon"===e.type||"MultiLineString"===e.type?e.coordinates.forEach(function(e){return e.forEach(t)}):"MultiPolygon"===e.type&&e.coordinates.forEach(function(e){e.forEach(function(e){return e.forEach(t)})}))},o.boxIntersect=function(e,t){return!(t.sw.x>e.ne.x||t.ne.xe.ne.y||t.ne.ya;a++){var s=e[0][a];s[0]r&&(r=s[0]),s[1]>i&&(i=s[1])}return[t,n,r,i]},o.geometryType=function(e){return"Polygon"===e||"MultiPolygon"===e?"polygon":"LineString"===e||"MultiLineString"===e?"line":"Point"===e||"MultiPoint"===e?"point":void 0},o.centroid=function(e){for(var t=e.length,r=[0,0],n=0;nn;n++){var i=e[n],o=e[n+1];t+=i[0]*o[1]-o[0]*i[1]}return t+=e[r-1][0]*e[0][1]-e[0][0]*e[r-1][1]},o.polygonArea=function(e){return Math.abs(o.signedPolygonAreaSum(e))/2},o.multiPolygonArea=function(e){for(var t=0,r=0;r0?"CW":"CCW"},o.enforceWinding=function(e,t){var r=void 0;if("Polygon"===e.type)r=[e.coordinates];else{if("MultiPolygon"!==e.type)return e;r=e.coordinates}for(var n=0;n=2&&u.length<=4?r.push({type:"vec"+u.length,method:u.length+"fv",name:o,value:u,key:s,uniforms:e}):u.length>4&&r.push({type:"float[]",method:"1fv",name:o+"[0]",value:u,key:s,uniforms:e});else if("string"==typeof u[0])for(a=0;a=2&&u[0].length<=4)for(a=0;a=2&&t.length<=4?r="vec"+t.length:(r="float",n=t.length):"string"==typeof t[0]?(r="sampler2D",n=t.length):Array.isArray(t[0])&&"number"==typeof t[0][0]?(t[0].length>=2&&t[0].length<=4&&(r="vec"+t[0].length),n=t[0].length):"object"==typeof t[0]&&(r="_type_"+o,n=t.length,a+=i.defineStruct(r,t[0],o)+"\n"):"boolean"==typeof t?r="bool":"string"==typeof t?r="sampler2D":"object"==typeof t&&(r="_type_"+o,a+=i.defineStruct(r,t,o)+"\n");var s="";return s+=r+" "+e,n&&(s+="["+n+"]"),s+=";\n",{variable:s,structs:a}},i.defineStruct=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],n="struct "+e+" {\n",o="";for(var a in t){var s=i.defineVariable(a,t[a],r);n+=" "+s.variable,o+=s.structs}return n+="};\n",n=o+n},i.defineUniform=function(e,t){var r=i.defineVariable(e,t);return r=r.structs+"uniform "+r.variable},i.isUniformDefined=function(e,t){var r=new RegExp("uniform[^;]+(?:{[\\s\\S]*})?[^;]*\\b"+e+"\\b","g");return t.match(r)?!0:!1},i.isSymbolReferenced=function(e,t){var r=new RegExp("\\b"+e+"\\b","g");return t.search(r)>=0?!0:!1},i.expandVec3=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=void 0;return r=Array.isArray(e)&&2===e.length?[].concat(n(e),[t]).map(parseFloat):[e,e,e].map(parseFloat),r&&r.every(function(e){return"number"==typeof e&&!isNaN(e)})?r:void 0},i.expandVec4=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=void 0;return r=Array.isArray(e)&&3===e.length?[].concat(n(e),[t]).map(parseFloat):[e,e,e,t].map(parseFloat),r&&r.every(function(e){return"number"==typeof e&&!isNaN(e)})?r:void 0},t.exports=r["default"]},{"babel-runtime/helpers/to-consumable-array":25}],198:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"];Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(t,r){i(this,e),r(t),this.value=t,this.setup=r}return n(e,[{key:"set",value:function(e){JSON.stringify(this.value)!==JSON.stringify(e)&&(this.setup(e),this.value=e)}}],[{key:"initialize",value:function(t){e.culling=new e({cull:!0,face:t.BACK},function(e){e.cull?(t.enable(t.CULL_FACE),t.cullFace(e.face)):t.disable(t.CULL_FACE)}),e.blending=new e({blend:!1,src:t.SRC_ALPHA,dst:t.ONE_MINUS_SRC_ALPHA,src_alpha:t.ONE,dst_alpha:t.ONE_MINUS_SRC_ALPHA},function(e){e.blend?(t.enable(t.BLEND),e.src_alpha&&e.dst_alpha?t.blendFuncSeparate(e.src,e.dst,e.src_alpha,e.dst_alpha):t.blendFunc(e.src,e.dst)):t.disable(t.BLEND)}),e.depth_write=new e({depth_write:!0},function(e){t.depthMask(e.depth_write)}),e.depth_test=new e({depth_test:!0,depth_func:t.LEQUAL},function(e){e.depth_test?(t.enable(t.DEPTH_TEST),t.depthFunc(e.depth_func)):t.disable(t.DEPTH_TEST)})}}]),e}();r["default"]=o,t.exports=r["default"]},{"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19}],199:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/to-consumable-array")["default"],a=e("babel-runtime/core-js/object/assign")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./glsl"),c=u(l),f=e("./texture"),h=u(f),d=e("./extensions"),p=u(d),m=e("loglevel"),g=u(m),v=e("strip-comments"),y=u(v),_=e("gl-shader-errors"),b=u(_),x=function(){function e(t,r,n,o){i(this,e),o=o||{},this.gl=t,this.program=null,this.compiled=!1,this.compiling=!1,this.error=null,this.defines=a({},o.defines||{}),this.blocks=a({},o.blocks||{}),this.block_scopes=a({},o.block_scopes||{}),this.extensions=o.extensions||[],this.dependent_uniforms=o.uniforms,this.uniforms={},this.attribs={},this.vertex_source=r,this.fragment_source=n,this.id=e.id++,e.programs[this.id]=this,this.name=o.name}return n(e,[{key:"destroy",value:function(){this.gl.useProgram(null),this.gl.deleteProgram(this.program),this.program=null,this.uniforms={},this.attribs={},delete e.programs[this.id],this.compiled=!1}},{key:"use",value:function(){this.compiled&&(e.current!==this&&this.gl.useProgram(this.program),e.current=this)}},{key:"compile",value:function(){if(this.compiling)throw new Error("ShaderProgram.compile(): skipping for "+this.id+" ("+this.name+") because already compiling");this.compiling=!0,this.compiled=!1,this.error=null,this.computed_vertex_source=this.vertex_source,this.computed_fragment_source=this.fragment_source;var t,r=this.checkExtensions(),n=this.buildDefineList(),i=this.buildShaderBlockList();for(var o in i){var a=i[o];if(a&&(!Array.isArray(a)||0!==a.length)){t=new RegExp("^\\s*#pragma\\s+tangram:\\s+"+o+"\\s*$","m");var u=this.computed_vertex_source.match(t),l=this.computed_fragment_source.match(t);if(null!=u||null!=l){var c="";a.forEach(function(e){var t=e.scope+", "+e.key+", "+e.num;c+="\n// tangram-block-start: "+t+"\n",c+=e.source,c+="\n// tangram-block-end: "+t+"\n"}),null!=u&&(this.computed_vertex_source=this.computed_vertex_source.replace(t,c)),null!=l&&(this.computed_fragment_source=this.computed_fragment_source.replace(t,c)),n["TANGRAM_BLOCK_"+o.replace(/[\s-]+/g,"_").toUpperCase()]=!0}}}t=new RegExp("^\\s*#pragma.*$","gm"),this.computed_vertex_source=this.computed_vertex_source.replace(t,""),this.computed_fragment_source=this.computed_fragment_source.replace(t,""),this.ensureUniforms(this.dependent_uniforms);var f=this.name?this.name+" / id "+this.id:"id "+this.id,h="// Program: "+f+"\n",d="",p=this.gl.getShaderPrecisionFormat(this.gl.FRAGMENT_SHADER,this.gl.HIGH_FLOAT);d=p&&p.precision>0?"precision highp float;\n":"precision mediump float;\n",n.TANGRAM_VERTEX_SHADER=!0,n.TANGRAM_FRAGMENT_SHADER=!1,this.computed_vertex_source=h+d+e.buildDefineString(n)+this.computed_vertex_source,n.TANGRAM_VERTEX_SHADER=!1,n.TANGRAM_FRAGMENT_SHADER=!0,this.computed_fragment_source=e.buildExtensionString(r)+h+d+e.buildDefineString(n)+this.computed_fragment_source;try{this.program=e.updateProgram(this.gl,this.program,this.computed_vertex_source,this.computed_fragment_source),this.compiled=!0,this.compiling=!1}catch(m){if(this.program=null,this.compiled=!1,this.compiling=!1,this.error=m,"vertex"===m.type||"fragment"===m.type){this.shader_errors=m.errors;var g=!0,v=!1,y=void 0;try{for(var _,b=s(this.shader_errors);!(g=(_=b.next()).done);g=!0){var x=_.value;x.type=m.type,x.block=this.block(m.type,x.line)}}catch(A){v=!0,y=A}finally{try{!g&&b["return"]&&b["return"]()}finally{if(v)throw y}}}throw new Error("ShaderProgram.compile(): program "+this.id+" ("+this.name+") error:",m)}this.use(),this.refreshUniforms(),this.refreshAttributes()}},{key:"buildDefineList",value:function(){var t,r={};for(t in e.defines)r[t]=e.defines[t];for(t in this.defines)r[t]=this.defines[t];return r}},{key:"buildShaderBlockList",value:function(){var t=void 0,r={};for(t in e.blocks)if(r[t]=[],Array.isArray(e.blocks[t])){var n;(n=r[t]).push.apply(n,o(e.blocks[t].map(function(e,r){return{key:t,source:e,num:r,scope:"ShaderProgram"}})))}else r[t]=[{key:t,source:e.blocks[t],num:0,scope:"ShaderProgram"}];for(t in this.blocks)if(r[t]=r[t]||[],Array.isArray(this.blocks[t]))for(var i=this.block_scopes&&this.block_scopes[t]||[],a=null,s=0,u=0;u0&&(this.computed_vertex_source=i.join("\n")+this.computed_vertex_source),o.length>0&&(this.computed_fragment_source=o.join("\n")+this.computed_fragment_source)}}},{key:"setUniforms",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];if(this.compiled){t&&(this.texture_unit=0);var r=c["default"].parseUniforms(e),n=!0,i=!1,o=void 0;try{for(var a,u=s(r);!(n=(a=u.next()).done);n=!0){var l=a.value;"sampler2D"===l.type?this.setTextureUniform(l.name,l.value):this.uniform(l.method,l.name,l.value)}}catch(f){i=!0,o=f}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}}}},{key:"saveUniforms",value:function(e){var t=e||this.uniforms;for(var r in t){var n=this.uniforms[r];n&&(n.saved_value=n.value)}this.saved_texture_unit=this.texture_unit||0}},{key:"restoreUniforms",value:function(e){var t=e||this.uniforms;for(var r in t){var n=this.uniforms[r];n&&n.saved_value&&(n.value=n.saved_value,this.updateUniform(r))}this.texture_unit=this.saved_texture_unit||0}},{key:"setTextureUniform",value:function(e,t){var r=h["default"].textures[t];null==r&&(r=h["default"].create(this.gl,t,{url:t})),r.bind(this.texture_unit),this.uniform("1i",e,this.texture_unit),this.texture_unit++}},{key:"uniform",value:function t(e,r){if(this.compiled){this.uniforms[r]=this.uniforms[r]||{};var t=this.uniforms[r];t.name=r,void 0===t.location&&(t.location=this.gl.getUniformLocation(this.program,r)),t.method="uniform"+e;for(var n=arguments.length,i=Array(n>2?n-2:0),o=2;n>o;o++)i[o-2]=arguments[o];t.value=i,this.updateUniform(r)}}},{key:"updateUniform",value:function(e){if(this.compiled){var t=this.uniforms[e];t&&null!=t.location&&(this.use(),this.gl[t.method].apply(this.gl,[t.location].concat(t.value)))}}},{key:"refreshUniforms",value:function(){if(this.compiled)for(var e in this.uniforms)this.uniforms[e].location=this.gl.getUniformLocation(this.program,e),this.updateUniform(e)}},{key:"refreshAttributes",value:function(){this.attribs={}}},{key:"attribute",value:function(e){if(this.compiled){var t=this.attribs[e]=this.attribs[e]||{};return null!=t.location?t:(t.name=e,t.location=this.gl.getAttribLocation(this.program,e),t)}}},{key:"source",value:function(e){return"vertex"===e?this.computed_vertex_source:"fragment"===e?this.computed_fragment_source:void 0}},{key:"lines",value:function(e){var t=this.source(e);return t?t.split("\n"):[]}},{key:"line",value:function(e,t){var r=this.lines(e);return r?r[t]:void 0}},{key:"block",value:function r(e,t){for(var n=this.lines(e),r=void 0,i=0;t>i&&i1?r={scope:a[1],name:a[2],num:a[3]}:(a=o.match(/\/\/ tangram-block-end: ([A-Za-z0-9_-]+), ([A-Za-z0-9_-]+), (\d+)/),a&&a.length>1&&(r=null)),r&&(r.line=null==r.line?-1:r.line+1,r.source=o)}return r}},{key:"checkExtensions",value:function(){var e=[],t=!0,r=!1,n=void 0; +try{for(var i,o=s(this.extensions);!(t=(i=o.next()).done);t=!0){var a=i.value,u=p["default"](this.gl,a),l="TANGRAM_EXTENSION_"+a;this.defines[l]=null!=u,u?e.push(a):g["default"].debug("Could not enable extension '"+a+"'")}}catch(c){r=!0,n=c}finally{try{!t&&o["return"]&&o["return"]()}finally{if(r)throw n}}return e}}]),e}();r["default"]=x,x.id=0,x.programs={},x.current=null,x.defines={},x.blocks={},x.buildDefineString=function(e){var t="";for(var r in e)e[r]!==!1&&(t+="boolean"==typeof e[r]&&e[r]===!0?"#define "+r+"\n":"number"==typeof e[r]&&Math.floor(e[r])===e[r]?"#define "+r+" "+e[r].toFixed(1)+"\n":"#define "+r+" "+e[r]+"\n");return t},x.buildExtensionString=function(e){e=e||[];var t="",r=!0,n=!1,i=void 0;try{for(var o,a=s(e);!(r=(o=a.next()).done);r=!0){var u=o.value;t+="#ifdef GL_"+u+"\n#extension GL_"+u+" : enable\n#endif\n"}}catch(l){n=!0,i=l}finally{try{!r&&a["return"]&&a["return"]()}finally{if(n)throw i}}return t},x.addBlock=function(e){var t;x.blocks[e]=x.blocks[e]||[];for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;r>i;i++)n[i-1]=arguments[i];(t=x.blocks[e]).push.apply(t,n)},x.removeBlock=function(e){x.blocks[e]=[]},x.replaceBlock=function(e){x.removeBlock(e);for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];x.addBlock.apply(x,[e].concat(r))},x.updateProgram=function(e,t,r,n){try{var i=x.createShader(e,r,e.VERTEX_SHADER),o=x.createShader(e,n,e.FRAGMENT_SHADER)}catch(a){throw g["default"].error(a.message),a}if(e.useProgram(null),null!=t)for(var s=e.getAttachedShaders(t),u=0;u0?(this.buffer=e.array_pool.pop(),this.buffer_length=this.buffer.byteLength,this.buffer_size=Math.floor(this.buffer_length/this.vertex_layout.stride),h.log("trace","VertexData: reused buffer of bytes "+this.buffer_length+", "+this.buffer_size+" vertices")):(this.buffer_size=n||500,this.buffer_length=this.vertex_layout.stride*this.buffer_size,this.buffer=new Uint8Array(this.buffer_length)),this.buffer_offset=0,this.components=[];var i=!0,u=!1,l=void 0;try{for(var c,f=s(this.vertex_layout.components);!(i=(c=f.next()).done);i=!0){var d=c.value;this.components.push([].concat(a(d)))}}catch(p){u=!0,l=p}finally{try{!i&&f["return"]&&f["return"]()}finally{if(u)throw l}}this.vertex_count=0,this.realloc_count=0,this.setBufferViews()}return i(e,[{key:"setBufferViews",value:function(){this.buffer_views={},this.buffer_views[f["default"].UNSIGNED_BYTE]=this.buffer;var e=!0,t=!1,r=void 0;try{for(var n,i=s(this.vertex_layout.attribs);!(e=(n=i.next()).done);e=!0){var o=n.value;if(null==this.buffer_views[o.type]){var a=d[o.type];this.buffer_views[o.type]=new a(this.buffer.buffer)}}}catch(u){t=!0,r=u}finally{try{!e&&i["return"]&&i["return"]()}finally{if(t)throw r}}var l=!0,c=!1,h=void 0;try{for(var p,m=s(this.components);!(l=(p=m.next()).done);l=!0){var g=p.value;g[1]=this.buffer_views[g[0]]}}catch(u){c=!0,h=u}finally{try{!l&&m["return"]&&m["return"]()}finally{if(c)throw h}}}},{key:"checkBufferSize",value:function(){if(this.buffer_offset+this.vertex_layout.stride>this.buffer_length){this.buffer_size=Math.floor(1.5*this.buffer_size),this.buffer_size-=this.buffer_size%4,this.buffer_length=this.vertex_layout.stride*this.buffer_size;var t=new Uint8Array(this.buffer_length);t.set(this.buffer),e.array_pool.push(this.buffer),this.buffer=t,this.setBufferViews(),this.realloc_count++}}},{key:"addVertex",value:function(e){this.checkBufferSize();for(var t=0,r=this.components.length,n=0;r>n;n++){var i=this.components[n];i[1][(this.buffer_offset>>i[2])+i[3]]=e[t++]}this.buffer_offset+=this.vertex_layout.stride,this.vertex_count++}},{key:"end",value:function(){return this.buffer=this.buffer.subarray(0,this.buffer_offset),h.log("trace","VertexData: "+this.buffer_size+" vertices total, realloc count "+this.realloc_count),this}}]),e}();r["default"]=p,p.array_pool=[],t.exports=r["default"]},{"../utils/utils":241,"./constants":194,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/define-property":20,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25}],205:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/core-js/get-iterator")["default"],a=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var s=e("./constants"),u=a(s),l=e("./vertex_data"),c=a(l),f=function(){function e(t){i(this,e),this.attribs=t,this.components=[],this.index={},this.stride=0;var r=0,n=!0,a=!1,s=void 0;try{for(var l,c=o(this.attribs);!(n=(l=c.next()).done);n=!0){var f=l.value;f.offset=this.stride,f.byte_size=f.size;var h=0;switch(f.type){case u["default"].FLOAT:case u["default"].INT:case u["default"].UNSIGNED_INT:f.byte_size*=4,h=2;break;case u["default"].SHORT:case u["default"].UNSIGNED_SHORT:f.byte_size*=2,h=1}this.stride+=f.byte_size,3&this.stride&&(this.stride+=4-(3&this.stride));var d=f.offset>>h;if(f.size>1)for(var p=0;p0&&s["default"]([this.aabb],n,function(e,o){return d["default"].trace("collision: broad phase collide",t.options.id,t,t.aabb,n[o]),0===t.obb.angle&&0===i[o].angle?(d["default"].trace("collision: skip narrow phase collide because neither is rotated",t.options.id,t,t.obb,i[o]),r=!0,!0):f["default"].intersect(t.obb,i[o])?(d["default"].trace("collision: narrow phase collide",t.options.id,t,t.obb,i[o]),r=!0,!0):void 0}),r}},{key:"add",value:function(e){e.aabb.push(this.aabb),e.obb.push(this.obb)}},{key:"inTileBounds",value:function(){var e=[this.aabb[0],this.aabb[1]],t=[this.aabb[2],this.aabb[3]];return l["default"].pointInTile(e)&&l["default"].pointInTile(t)?!0:!1}},{key:"discard",value:function(e){if(this.options.cull_from_tile){var t=this.inTileBounds();if(!t&&this.options.move_into_tile){if(!this.moveIntoTile())return!0}else if(!t)return!0}return this.occluded(e)}}]),e}();r["default"]=p,p.epsilon=.9999,t.exports=r["default"]},{"../utils/obb":239,"../utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"box-intersect":30,loglevel:179}],208:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/create-class")["default"],a=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("../vector"),l=s(u),c=e("./label"),f=s(c),h=e("../utils/obb"),d=s(h),p=function(e){function t(e,r,i){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i),this.segment_index=0,this.lines=r,this.update()}return i(t,e),o(t,[{key:"update",value:function(){var e=this.currentSegment();this.angle=this.computeAngle(),this.position=[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2],this.updateBBoxes()}},{key:"moveNextSegment",value:function(){return this.segment_index+1>=this.lines.length-1?!1:(this.segment_index++,this.update(),!0)}},{key:"computeAngle",value:function(){var e=this.currentSegment(),t=l["default"].sub(e[0],e[1]);t=l["default"].normalize(t);var r=Math.PI/2,n=Math.atan2(t[0],t[1])+r;return(n>r||-r>n)&&(n+=Math.PI),n%=2*Math.PI}},{key:"fitToSegment",value:function(){var e=this.currentSegment(),t=l["default"].sub(e[0],e[1]),r=l["default"].length(t),n=this.size[0]*this.options.units_per_pixel;if(n>r){var i=100*(1-r/n);return i=n}},{key:"currentSegment",value:function(){var e=this.lines[this.segment_index],t=this.lines[this.segment_index+1];return[e,t]}},{key:"updateBBoxes",value:function(){var e=this.options.units_per_pixel,t=(this.size[0]+2*this.options.buffer[0])*e*f["default"].epsilon,r=(this.size[1]+2*this.options.buffer[1])*e*f["default"].epsilon,n=l["default"].rot(this.options.offset,this.angle),i=[this.position[0]+n[0]*e,this.position[1]-n[1]*e];this.obb=new d["default"](i[0],i[1],-this.angle,t,r),this.aabb=this.obb.getExtent()}},{key:"moveIntoTile",value:function(){for(var e=!1,t=this.fitToSegment();(!e||!t)&&this.moveNextSegment();)e=this.inTileBounds(),t=this.fitToSegment();return e&&t}},{key:"discard",value:function(e){if(this.lines&&!this.fitToSegment())for(;!this.fitToSegment();)if(!this.moveNextSegment())return!0;return n(Object.getPrototypeOf(t.prototype),"discard",this).call(this,e)}}]),t}(f["default"]);r["default"]=p,t.exports=r["default"]},{"../utils/obb":239,"../vector":244,"./label":207,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23}],209:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/create-class")["default"],a=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var u=e("./label"),l=s(u),c=e("../geo"),f=s(c),h=e("../utils/obb"),d=s(h),p=e("../styles/points/point_anchor"),m=s(p),g=function(e){function t(e,r,i){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,r,i),this.position=[e[0],e[1]],this.update()}return i(t,e),o(t,[{key:"update",value:function(){this.options.offset=this.computeOffset(),this.updateBBoxes()}},{key:"computeOffset",value:function(){return m["default"].computeOffset(this.options.offset,this.size,this.options.anchor)}},{key:"updateBBoxes",value:function(){var e=(this.size[0]+2*this.options.buffer[0])*this.options.units_per_pixel*l["default"].epsilon,t=(this.size[1]+2*this.options.buffer[1])*this.options.units_per_pixel*l["default"].epsilon,r=[this.position[0]+this.options.offset[0]*this.options.units_per_pixel,this.position[1]-this.options.offset[1]*this.options.units_per_pixel];this.obb=new d["default"](r[0],r[1],0,e,t),this.aabb=this.obb.getExtent()}},{key:"moveIntoTile",value:function(){var e=!1;return this.aabb[0]<0&&(this.position[0]+=-this.aabb[0],e=!0),this.aabb[2]>=f["default"].tile_scale&&(this.position[0]-=this.aabb[2]-f["default"].tile_scale+1,e=!0),this.aabb[3]>0&&(this.position[1]-=this.aabb[3],e=!0),this.aabb[1]<=-f["default"].tile_scale&&(this.position[1]-=this.aabb[1]+f["default"].tile_scale-1,e=!0),e&&this.updateBBoxes(),this.inTileBounds()}}]),t}(l["default"]);r["default"]=g,t.exports=r["default"]},{"../geo":193,"../styles/points/point_anchor":225,"../utils/obb":239,"./label":207,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23}],210:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=e("../geo"),s=o(a),u=function(){function e(t,r,n){i(this,e),this.key=t,this.repeat_dist=r,this.repeat_dist_sq=this.repeat_dist*this.repeat_dist,this.max_repeat_dist_sq=n*n,this.one_per_group=this.repeat_dist_sq>=this.max_repeat_dist_sq?!0:!1,this.positions=[]}return n(e,[{key:"check",value:function(e){if(this.one_per_group){if(this.positions.length>0)return{dist_sq:this.max_repeat_dist_sq,repeat_dist_sq:this.repeat_dist_sq,one_per_group:this.one_per_group}}else for(var t=e.position,r=0;r0){var n={};for(var i in t)n[t[i].type]=!0;for(var o in n)e.types[o].inject();for(var i in t)t[i].inject(),r+="calculateLight("+i+", _eyeToPoint, _normal);\n"}else r="\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n light_accumulator_diffuse = vec4(1.);\n #endif\n ";var a="\n vec4 calculateLighting(in vec3 _eyeToPoint, in vec3 _normal, in vec4 _color) {\n\n // Do initial material calculations over normal, emission, ambient, diffuse and specular values\n calculateMaterial(_eyeToPoint,_normal);\n\n // Un roll the loop of individual ligths to calculate\n "+r+"\n\n // Final light intensity calculation\n vec4 color = vec4(0.0);\n\n #ifdef TANGRAM_MATERIAL_EMISSION\n color = material.emission;\n #endif\n\n #ifdef TANGRAM_MATERIAL_AMBIENT\n color += light_accumulator_ambient * _color * material.ambient;\n #else\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n color += light_accumulator_ambient * _color * material.diffuse;\n #endif\n #endif\n\n #ifdef TANGRAM_MATERIAL_DIFFUSE\n color += light_accumulator_diffuse * _color * material.diffuse;\n #endif\n\n #ifdef TANGRAM_MATERIAL_SPECULAR\n color += light_accumulator_specular * material.specular;\n #endif\n\n // Clamp final color\n color = clamp(color, 0.0, 1.0);\n\n return color;\n }";f["default"].addBlock(e.block,a)}}}]),e}();r["default"]=_,_.types={},_.block="lighting",_.enabled=!0;var b=function(e){function t(e,r){i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="ambient",this.struct_name="AmbientLight"}return a(t,e),n(t,[{key:"setupProgram",value:function(e){e.uniform("4fv","u_"+this.name+".ambient",this.ambient)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/ambientLight"])}}]),t}(_);_.types.ambient=b;var x=function(e){function t(e,r){i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="directional",this.struct_name="DirectionalLight",this.direction=(r.direction||[.2,.7,-.5]).map(parseFloat)}return a(t,e),n(t,[{key:"setupProgram",value:function(e){o(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_"+this.name+".direction",this.direction)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/directionalLight"])}}]),t}(_);_.types.directional=x;var A=function(e){function t(e,r){i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="point",this.struct_name="PointLight",this.position=r.position||[0,0,0],this.position_eye=[],this.origin=r.origin||"world",this.attenuation=isNaN(parseFloat(r.attenuation))?0:parseFloat(r.attenuation),this.radius=r.radius?Array.isArray(r.radius)&&2===r.radius.length?r.radius:[null,r.radius]:null}return a(t,e),n(t,[{key:"inject",value:function(){o(Object.getPrototypeOf(t.prototype),"inject",this).call(this),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT=0!==this.attenuation,f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS=null!=this.radius&&null!=this.radius[0],f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS=null!=this.radius}},{key:"update",value:function(){this.updateEyePosition()}},{key:"updateEyePosition",value:function(){if("world"===this.origin){var e=v["default"].latLngToMeters(this.position),t=s(e,2),r=t[0],n=t[1];this.position_eye[0]=r-this.scene.camera.position_meters[0],this.position_eye[1]=n-this.scene.camera.position_meters[1],this.position_eye[2]=y.StyleParser.convertUnits(this.position[2],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}),this.position_eye[2]=this.position_eye[2]-this.scene.camera.position_meters[2]}("ground"===this.origin||"camera"===this.origin)&&(this.position_eye=y.StyleParser.convertUnits(this.position,{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}),"ground"===this.origin&&(this.position_eye[2]=this.position_eye[2]-this.scene.camera.position_meters[2]))}},{key:"setupProgram",value:function(e){o(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("4f","u_"+this.name+".position",this.position_eye[0],this.position_eye[1],this.position_eye[2],1),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT&&e.uniform("1f","u_"+this.name+".attenuationExponent",this.attenuation),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS&&e.uniform("1f","u_"+this.name+".innerRadius",y.StyleParser.convertUnits(this.radius[0],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)})),f["default"].defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS&&e.uniform("1f","u_"+this.name+".outerRadius",y.StyleParser.convertUnits(this.radius[1],{zoom:this.scene.zoom,meters_per_pixel:v["default"].metersPerPixel(this.scene.zoom)}))}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/pointLight"])}}]),t}(_);_.types.point=A;var w=function(e){function t(e,r){i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this.type="spotlight",this.struct_name="SpotLight",this.direction=(r.direction||[0,0,-1]).map(parseFloat),this.exponent=r.exponent?parseFloat(r.exponent):.2,this.angle=r.angle?parseFloat(r.angle):20}return a(t,e),n(t,[{key:"setupProgram",value:function(e){o(Object.getPrototypeOf(t.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_"+this.name+".direction",this.direction),e.uniform("1f","u_"+this.name+".spotCosCutoff",Math.cos(3.14159*this.angle/180)),e.uniform("1f","u_"+this.name+".spotExponent",this.exponent)}}],[{key:"inject",value:function(){f["default"].addBlock(_.block,d["default"]["gl/shaders/spotLight"])}}]),t}(A);_.types.spotlight=w,t.exports=r["default"]},{"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/shader_sources":200,"./styles/style_parser":231,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],213:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=e("./gl/shader_sources"),s=o(a),u=e("./gl/glsl"),l=o(u),c=e("./styles/style_parser"),f=function(){function e(t){i(this,e),t=t||{};for(var r=["emission","ambient","diffuse","specular"],n=0;nn;n++)t[n]=arguments[n];r.apply(void 0,["Tangram "+u["default"].string+":"].concat(t))}}},{"../src/scene_worker":217,"./geo":193,"./gl/glsl":197,"./gl/shader_program":199,"./gl/texture":201,"./gl/vertex_data":204,"./labels/collision":206,"./leaflet_layer":211,"./light":212,"./material":213,"./selection":218,"./sources/data_source":219,"./sources/geojson":220,"./sources/mvt":221,"./sources/topojson":222,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile_manager":236,"./utils/utils":241,"./utils/version":242,"./utils/worker_broker":243,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":142,"js-yaml":148,loglevel:179}],215:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/sliced-to-array")["default"],a=e("babel-runtime/helpers/to-consumable-array")["default"],s=e("babel-runtime/core-js/promise")["default"],u=e("babel-runtime/core-js/object/assign")["default"],l=e("babel-runtime/core-js/object/keys")["default"],c=e("babel-runtime/core-js/get-iterator")["default"],f=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var h=e("./geo"),d=f(h),p=e("./utils/utils"),m=f(p),g=e("./utils/worker_broker"),v=f(g),y=e("./utils/subscribe"),_=f(y),b=e("./gl/context"),x=f(b),A=e("./gl/texture"),w=f(A),E=e("./gl/vao"),D=f(E),k=e("./styles/style"),T=e("./styles/style_manager"),F=e("./styles/style_parser"),S=e("./scene_loader"),C=f(S),M=e("./camera"),R=f(M),j=e("./light"),P=f(j),I=e("./tile_manager"),L=f(I),B=e("./sources/data_source"),N=f(B),O=e("./selection"),U=f(O),z=e("./gl/render_state"),$=f(z),G=e("./styles/polygons/polygons"),q=e("./styles/lines/lines"),V=e("./styles/points/points"),W=e("./styles/text/text"),Y=e("loglevel"),H=f(Y),X=e("gl-matrix"),Z=f(X);T.StyleManager.register(G.Polygons),T.StyleManager.register(q.Lines),T.StyleManager.register(V.Points),T.StyleManager.register(W.TextStyle);var J=Z["default"].mat4,K=Z["default"].mat3,Q=Z["default"].vec3,et=function(){function e(t,r){i(this,e),r=r||{},_["default"](this),this.initialized=!1,this.initializing=!1,this.sources={},this.tile_manager=L["default"],this.tile_manager.init(this),this.num_workers=r.numWorkers||2,this.continuous_zoom="boolean"==typeof r.continuousZoom?r.continuousZoom:!0,this.tile_simplification_level=0,this.allow_cross_domain_workers=r.allowCrossDomainWorkers===!1?!1:!0,this.worker_url=r.workerUrl,r.disableVertexArrayObjects===!0&&(D["default"].disabled=!0),m["default"].use_high_density_display=void 0!==r.highDensityDisplay?r.highDensityDisplay:!0,m["default"].updateDevicePixelRatio(),this.config=null,this.config_source=t,this.config_serialized=null,this.last_valid_config_source=null,this.styles=null,this.active_styles={},this.building=null,this.dirty=!0,this.animated=!1,this.preUpdate=r.preUpdate,this.postUpdate=r.postUpdate,this.render_loop=!r.disableRenderLoop,this.render_loop_active=!1,this.render_loop_stop=!1,this.render_count=0,this.last_render_count=0,this.render_count_changed=!1,this.frame=0,this.queue_screenshot=null,this.resetTime(),this.zoom=null,this.center=null,this.zooming=!1,this.preserve_tiles_within_zoom=1,this.panning=!1,this.container=r.container,this.camera=null,this.lights=null,this.background=null,this.modelMatrix=new Float64Array(16),this.modelMatrix32=new Float32Array(16),this.modelViewMatrix=new Float64Array(16),this.modelViewMatrix32=new Float32Array(16),this.normalMatrix=new Float64Array(9),this.normalMatrix32=new Float32Array(9),this.inverseNormalMatrix32=new Float32Array(9),this.selection=null,this.texture_listener=null,this.updating=0,this.generation=0,this.last_complete_generation=0,this.setupDebug(),this.logLevel=r.logLevel||"warn",H["default"].setLevel(this.logLevel)}return n(e,[{key:"load",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.initializing?s.resolve():(this.updating++,this.initialized=!1,this.initializing=!0,this.loadScene(t,r).then(function(){return e.createWorkers()}).then(function(){return e.createCanvas(),e.resetFeatureSelection(),e.texture_listener||(e.texture_listener={update:function(){return e.dirty=!0},warning:function(t){return e.trigger("warning",u({type:"textures"},t))}},w["default"].subscribe(e.texture_listener)),e.tile_manager.removeTiles(function(e){return!e.visible}),e.updateConfig({rebuild:!0})}).then(function(){e.updating--,e.initializing=!1,e.initialized=!0,e.last_valid_config_source=e.config_source,e.last_valid_config_path=e.config_path,e.render_loop!==!1&&e.setupRenderLoop(),e.requestRedraw()})["catch"](function(t){e.initializing=!1,e.updating=0;var r=void 0,n=void 0;if("YAMLException"===t.name?(r="yaml",n="Error parsing scene YAML"):n="Error initializing scene",e.trigger("error",{type:r,message:n,error:t,url:e.config_source}),n="Scene.load() failed to load "+e.config_source+": "+t.message,e.last_valid_config_source)return H["default"].warn(n,t),H["default"].info("Scene.load() reverting to last valid configuration"),e.load(e.last_valid_config_source,e.last_valid_config_path);throw H["default"].error(n,t),t}))}},{key:"reload",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.load(e,t)}},{key:"destroy",value:function(){this.initialized=!1,this.render_loop_stop=!0,this.unsubscribeAll(),w["default"].unsubscribe(this.texture_listener),this.texture_listener=null,this.canvas&&this.canvas.parentNode&&(this.canvas.parentNode.removeChild(this.canvas),this.canvas=null),this.container=null,this.selection&&this.selection.destroy(),this.gl&&(w["default"].destroy(this.gl),T.StyleManager.destroy(this.gl),this.styles={},this.gl=null),this.sources={},Array.isArray(this.workers)&&(this.workers.forEach(function(e){e.terminate()}),this.workers=null),this.tile_manager.destroy()}},{key:"createCanvas",value:function(){if(!this.canvas){this.container=this.container||document.body,this.canvas=document.createElement("canvas"),this.canvas.style.position="absolute",this.canvas.style.top=0,this.canvas.style.left=0,this.container.style.backgroundColor="transparent",this.container.appendChild(this.canvas);try{this.gl=x["default"].getContext(this.canvas,{alpha:!0,premultipliedAlpha:!0,device_pixel_ratio:m["default"].device_pixel_ratio})}catch(e){throw new Error("Couldn't create WebGL context. Your browser may not support WebGL, or it's turned off? Visit http://webglreport.com/ for more info.")}this.resizeMap(this.container.clientWidth,this.container.clientHeight),D["default"].init(this.gl),$["default"].initialize(this.gl)}}},{key:"getWorkerUrl",value:function(){var e=this.worker_url||m["default"].findCurrentURL("tangram.debug.js","tangram.min.js");if(!e)throw new Error("Can't load worker because couldn't find base URL that library was loaded from");if(this.allow_cross_domain_workers){var t="importScripts('"+e+"');";return m["default"].createObjectURL(new Blob([t],{type:"application/javascript"}))}return e}},{key:"createWorkers",value:function(){return this.workers?s.resolve():this.makeWorkers(this.getWorkerUrl())}},{key:"makeWorkers",value:function(e){var t=this,r=[];this.workers=[];for(var n=function(){o=new Worker(e),t.workers[i]=o,o.addEventListener("message",t.workerLogMessage.bind(t)),v["default"].addWorker(o),H["default"].debug("Scene.makeWorkers: initializing worker "+i);var n=i;r.push(v["default"].postMessage(o,"self.init",i,t.num_workers,m["default"].device_pixel_ratio).then(function(e){return H["default"].debug("Scene.makeWorkers: initialized worker "+e),e},function(e){return H["default"].error("Scene.makeWorkers: failed to initialize worker "+n+":",e),s.reject(e)}))},i=0;ie.preserve_tiles_within_zoom)return!0;var a=Math.pow(2,o),s={x:Math.floor(i.coords.x/a),y:Math.floor(i.coords.y/a)};return Math.abs(s.x-e.center_tile.x)-r[0]>t?(H["default"].trace("Scene: remove tile "+i.key+" (as "+s.x+"/"+s.y+"/"+n+") for being too far out of visible area ***"),!0):Math.abs(s.y-e.center_tile.y)-r[1]>t?(H["default"].trace("Scene: remove tile "+i.key+" (as "+s.x+"/"+s.y+"/"+n+") for being too far out of visible area ***"),!0):!1})}}},{key:"updateDevicePixelRatio",value:function(){var e=this;m["default"].updateDevicePixelRatio()&&v["default"].postMessage(this.workers,"self.updateDevicePixelRatio",m["default"].device_pixel_ratio).then(function(){return e.rebuild()}).then(function(){return e.resizeMap(e.css_size.width,e.css_size.height)})}},{key:"resizeMap",value:function(e,t){this.dirty=!0,this.css_size={width:e,height:t},this.device_size={width:Math.round(this.css_size.width*m["default"].device_pixel_ratio),height:Math.round(this.css_size.height*m["default"].device_pixel_ratio)},this.view_aspect=this.css_size.width/this.css_size.height,this.updateBounds(),this.canvas&&(this.canvas.style.width=this.css_size.width+"px",this.canvas.style.height=this.css_size.height+"px",this.canvas.width=this.device_size.width,this.canvas.height=this.device_size.height,this.gl&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.viewport(0,0,this.canvas.width,this.canvas.height)))}},{key:"requestRedraw",value:function(){this.dirty=!0}},{key:"immediateRedraw",value:function(){this.dirty=!0,this.update()}},{key:"renderLoop",value:function(){this.render_loop_active=!0,this.initialized&&this.update(),this.render_loop_stop?(this.render_loop_stop=!1,this.render_loop_active=!1):window.requestAnimationFrame(this.renderLoop.bind(this))}},{key:"setupRenderLoop",value:function(){var e=this;this.render_loop_active||setTimeout(function(){e.renderLoop()},0)}},{key:"update",value:function(){this.tile_manager.loadQueuedCoordinates();var e=!(this.dirty===!1||this.initialized===!1||this.updating>0||this.viewReady()===!1);return"function"==typeof this.preUpdate&&this.preUpdate(e),e?(this.dirty=!1,this.updateDevicePixelRatio(),this.render(),this.completeScreenshot(),this.updateViewComplete(),"function"==typeof this.postUpdate&&this.postUpdate(e),this.animated===!0&&(this.dirty=!0),this.frame++,H["default"].trace("Scene.render()"),!0):!1}},{key:"render",value:function(){var e=this,t=this.gl;if(this.center_meters){if(this.camera.update(),l(this.active_styles).forEach(function(t){return e.styles[t].update()}),l(this.lights).forEach(function(t){return e.lights[t].update()}),this.renderable_tiles=this.tile_manager.getRenderableTiles(),this.renderable_tiles_count=this.renderable_tiles.length,this.render_count=this.renderPass(),this.selection.pendingRequests()){if(this.panning)return void this.selection.clearPendingRequests();this.selection.bind(),this.renderPass("selection_program",{allow_blend:!1}),this.selection.read(),t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height)}return this.render_count_changed=!1,this.render_count!==this.last_render_count&&(this.render_count_changed=!0,this.getFeatureSelectionMapSize().then(function(t){H["default"].info("Scene: rendered "+e.render_count+" primitives ("+t+" features in selection map)")},function(){})),this.last_render_count=this.render_count,!0}}},{key:"renderPass",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?"program":arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.allow_blend;n=null==n?!0:n,this.clearFrame({clear_color:!0,clear_depth:!0});var i=l(this.active_styles).map(function(t){return e.styles[t]}).sort(k.Style.blendOrderSort),o=0,a=void 0,s=!0,f=!1,h=void 0;try{for(var d,p=c(i);!(s=(d=p.next()).done);s=!0){var m=d.value;if(m.blend!==a){var g=u({},k.Style.render_states[m.blend],{blend:n&&m.blend});this.setRenderState(g)}o+=this.renderStyle(m.name,t),a=m.blend}}catch(v){f=!0,h=v}finally{try{!s&&p["return"]&&p["return"]()}finally{if(f)throw h}}return o}},{key:"renderStyle",value:function(e,t){var r=!0,n=0,i=this.styles[e][t];if(!i||!i.compiled)return 0;for(var o in this.renderable_tiles){var a=this.renderable_tiles[o];if(null!=a.meshes[e]){if(r===!0){r=!1,i.use(),this.styles[e].setup(),i.uniform("2f","u_resolution",this.device_size.width,this.device_size.height),i.uniform("1f","u_time",this.animated?(+new Date-this.start_time)/1e3:0),i.uniform("3f","u_map_position",this.center_meters.x,this.center_meters.y,this.zoom),i.uniform("1f","u_meters_per_pixel",this.meters_per_pixel),i.uniform("1f","u_device_pixel_ratio",m["default"].device_pixel_ratio),this.camera.setupProgram(i);for(var s in this.lights)this.lights[s].setupProgram(i)}i.uniform("3f","u_tile_origin",a.min.x,a.min.y,a.style_zoom),J.identity(this.modelMatrix),J.translate(this.modelMatrix,this.modelMatrix,Q.fromValues(a.min.x,a.min.y,0)),J.scale(this.modelMatrix,this.modelMatrix,Q.fromValues(a.span.x/d["default"].tile_scale,-1*a.span.y/d["default"].tile_scale,1)),J.copy(this.modelMatrix32,this.modelMatrix),i.uniform("Matrix4fv","u_model",!1,this.modelMatrix32),J.multiply(this.modelViewMatrix32,this.camera.viewMatrix,this.modelMatrix),i.uniform("Matrix4fv","u_modelView",!1,this.modelViewMatrix32),K.normalFromMat4(this.normalMatrix32,this.modelViewMatrix32),K.invert(this.inverseNormalMatrix32,this.normalMatrix32),i.uniform("Matrix3fv","u_normalMatrix",!1,this.normalMatrix32),i.uniform("Matrix3fv","u_inverseNormalMatrix",!1,this.inverseNormalMatrix32),a.meshes[e].render(),n+=a.meshes[e].geometry_count}}return n}},{key:"clearFrame",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.clear_color,r=e.clear_depth;if(this.initialized){t=t===!1?!1:!0,r=r===!1?!1:!0;var n=this.gl;if(t&&n.clearColor.apply(n,a(this.background.color)),r&&n.depthMask(!0),t||r){var i=(t&&n.COLOR_BUFFER_BIT)|(r&&n.DEPTH_BUFFER_BIT);n.clear(i)}}}},{key:"setRenderState",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.depth_test,r=e.depth_write,n=e.cull_face,i=e.blend;if(this.initialized){t=t===!1?!1:!0,r=r===!1?!1:!0,n=n===!1?!1:!0,i=null!=i?i:!1;var o=this.gl;$["default"].depth_test.set({depth_test:t,depth_func:o.LEQUAL}),$["default"].depth_write.set({depth_write:r}),$["default"].culling.set({cull:n,face:o.BACK}),i?"opaque"===i?$["default"].blending.set({blend:!0,src:o.SRC_ALPHA,dst:o.ZERO}):"overlay"===i||"inlay"===i?$["default"].blending.set({blend:!0,src:o.SRC_ALPHA,dst:o.ONE_MINUS_SRC_ALPHA,src_alpha:o.ONE,dst_alpha:o.ONE_MINUS_SRC_ALPHA}):"add"===i?$["default"].blending.set({blend:!0,src:o.ONE,dst:o.ONE,src_alpha:o.ONE,dst_alpha:o.ONE_MINUS_SRC_ALPHA}):"multiply"===i&&$["default"].blending.set({blend:!0,src:o.ZERO,dst:o.SRC_COLOR,src_alpha:o.ONE,dst_alpha:o.ONE_MINUS_SRC_ALPHA}):$["default"].blending.set({blend:!1})}}},{key:"getFeatureAt",value:function(e){if(!this.initialized)return H["default"].debug("Scene.getFeatureAt() called before scene was initialized"),s.resolve();var t={x:e.x*m["default"].device_pixel_ratio/this.device_size.width,y:e.y*m["default"].device_pixel_ratio/this.device_size.height};return this.dirty=!0,this.selection.getFeatureAt(t)["catch"](function(e){return s.resolve(e) +})}},{key:"rebuild",value:function(e){return this.rebuildGeometry(e)}},{key:"rebuildGeometry",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.sync,n=void 0===r?!0:r;return new s(function(t,r){if(e.building)return e.building.queued&&e.building.queued.reject&&(H["default"].debug("Scene.rebuildGeometry: request superceded by a newer call"),e.building.queued.resolve(!1)),e.building.queued={resolve:t,reject:r},void H["default"].trace("Scene.rebuildGeometry(): queuing request");e.building={resolve:t,reject:r},e.debug.profile.geometry_build&&e._profile("rebuildGeometry"),n&&(e.syncConfigToWorker(),T.StyleManager.compile(e.updateActiveStyles(),e)),e.resetFeatureSelection(),e.resetTime();var i=[];e.tile_manager.forEachTile(function(t){t.visible?i.push(t):e.tile_manager.removeTile(t.key)}),e.tile_manager.buildTiles(i)}).then(function(){e.debug.profile.geometry_build&&e._profileEnd("rebuildGeometry")})}},{key:"tileManagerBuildDone",value:function(){if(this.building){H["default"].info("Scene: build geometry finished"),this.building.resolve&&this.building.resolve(!0);var e=this.building.queued;this.building=null,e&&(H["default"].debug("Scene: starting queued rebuildGeometry() request"),this.rebuildGeometry().then(e.resolve,e.reject))}}},{key:"loadScene",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.config_source=t||this.config_source,this.config_path=m["default"].pathForURL("string"==typeof this.config_source?r||this.config_source:r),C["default"].loadScene(this.config_source,this.config_path).then(function(t){return e.config=t,e.trigger("load",{config:e.config}),e.config})}},{key:"setDataSource",value:function(e,t){if(!e||!t||!t.type||!t.url&&!t.data)return void H["default"].error("No name provided or not a valid config:",e,t);var r=null==this.config.sources[e],n=this.config.sources[e]=u({},t);n.data&&"object"==typeof n.data&&(n.url=m["default"].createObjectURL(new Blob([JSON.stringify(n.data)])),delete n.data),r?this.updateConfig({rebuild:!0}):this.rebuild()}},{key:"loadDataSources",value:function(){for(var e in this.config.sources){var t=this.config.sources[e];try{if(this.sources[e]=N["default"].create(u({},t,{name:e})),!this.sources[e])throw{}}catch(r){delete this.sources[e];var n="Could not create data source: "+r.message;H["default"].warn("Scene: "+n,t),this.trigger("warning",{type:"sources",source:t,message:n})}}}},{key:"loadTextures",value:function(){return w["default"].createFromObject(this.gl,this.config.textures)}},{key:"updateStyles",value:function(){if(!this.initialized&&!this.initializing)throw new Error("Scene.updateStyles() called before scene was initialized");this.styles=T.StyleManager.build(this.config.styles,this);var e=!0,t=!1,r=void 0;try{for(var n,i=c(m["default"].values(this.styles));!(e=(n=i.next()).done);e=!0){var o=n.value;o.setGL(this.gl)}}catch(a){t=!0,r=a}finally{try{!e&&i["return"]&&i["return"]()}finally{if(t)throw r}}this.updateActiveStyles(),T.StyleManager.compile(l(this.active_styles),this),this.dirty=!0}},{key:"updateActiveStyles",value:function(){var e=this,t=l(this.active_styles||{});this.active_styles={};var r=!1,n=!0,i=!1,a=void 0;try{for(var s,u=c(m["default"].recurseValues(this.config.layers));!(n=(s=u.next()).done);n=!0){var f=s.value;if(f&&f.draw){var h=!0,d=!1,p=void 0;try{for(var g,v=c(m["default"].entries(f.draw));!(h=(g=v.next()).done);h=!0){var y=o(g.value,2),_=y[0],b=y[1];if(null!=b&&"object"==typeof b&&b.visible!==!1){var x=b.style||_,A=[x];b.outline&&b.outline.style&&A.push(b.outline.style),A=A.filter(function(t){return e.styles[t]}).forEach(function(t){var n=e.styles[t];n&&(e.active_styles[t]=!0,n.animated&&(r=!0))})}}}catch(w){d=!0,p=w}finally{try{!h&&v["return"]&&v["return"]()}finally{if(d)throw p}}}}}catch(w){i=!0,a=w}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return this.animated=void 0!==this.config.scene.animated?this.config.scene.animated:r,l(this.active_styles).filter(function(e){return-1===t.indexOf(e)})}},{key:"createCamera",value:function(){var e=this._active_camera;e&&(this.camera=R["default"].create(e,this,this.config.cameras[this._active_camera]),this.camera.updateScene())}},{key:"getActiveCamera",value:function(){return this._active_camera}},{key:"setActiveCamera",value:function(e){return this._active_camera=e,this.updateConfig(),this._active_camera}},{key:"createLights",value:function(){this.lights={};for(var e in this.config.lights)if(this.config.lights[e]&&"object"==typeof this.config.lights[e]){var t=this.config.lights[e];t.name=e.replace("-","_"),t.visible=t.visible===!1?!1:!0,t.visible&&(this.lights[t.name]=P["default"].create(this,t))}P["default"].inject(this.lights)}},{key:"setBackground",value:function(){var e=this.config.scene.background;this.background={},e&&e.color&&(this.background.color=F.StyleParser.parseColor(e.color)),this.background.color||(this.background.color=[0,0,0,0]),this.canvas.style.backgroundColor=1===this.background.color[3]?"rgba("+this.background.color.map(function(e){return Math.floor(255*e)}).join(", ")+")":"transparent"}},{key:"updateConfig",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.rebuild;return this.generation++,this.updating++,this.config.scene=this.config.scene||{},T.StyleManager.init(),this.createCamera(),this.createLights(),this.loadDataSources(),this.loadTextures(),this.setBackground(),this.updateBounds(),this.updateStyles(),this.syncConfigToWorker(),r?this.rebuildGeometry().then(function(){e.updating--,e.requestRedraw()}):(this.updating--,this.requestRedraw(),s.resolve())}},{key:"syncConfigToWorker",value:function(){this.config_serialized=m["default"].serializeWithFunctions(this.config),v["default"].postMessage(this.workers,"self.updateConfig",{config:this.config_serialized,generation:this.generation})}},{key:"resetFeatureSelection",value:function(){this.selection?this.workers&&v["default"].postMessage(this.workers,"self.resetFeatureSelection"):this.selection=new U["default"](this.gl,this.workers)}},{key:"getFeatureSelectionMapSize",value:function(){var e=this;return this.fetching_selection_map?s.reject():(this.fetching_selection_map=!0,v["default"].postMessage(this.workers,"self.getFeatureSelectionMapSize").then(function(t){return e.fetching_selection_map=!1,t.reduce(function(e,t){return e+t})}))}},{key:"resetTime",value:function(){this.start_time=+new Date}},{key:"updateViewComplete",value:function(){!this.render_count_changed&&this.generation===this.last_complete_generation||this.tile_manager.isLoadingVisibleTiles()||(this.last_complete_generation=this.generation,this.trigger("view_complete"))}},{key:"resetViewComplete",value:function(){this.last_complete_generation=null}},{key:"screenshot",value:function(){var e=this;return null!=this.queue_screenshot?this.queue_screenshot.promise:(this.requestRedraw(),this.queue_screenshot={},this.queue_screenshot.promise=new s(function(t,r){e.queue_screenshot.resolve=t,e.queue_screenshot.reject=r}),this.queue_screenshot.promise)}},{key:"completeScreenshot",value:function(){if(null!=this.queue_screenshot){for(var e=this.canvas.toDataURL("image/png"),t=atob(e.slice(22)),r=new Uint8Array(t.length),n=0;n0?E["default"].syncTexturesToWorker(t):a.resolve()},updateDevicePixelRatio:function(e){l["default"].device_pixel_ratio=e},profile:function(e){console.profile("worker "+self._worker_id+": "+e)},profileEnd:function(e){console.profileEnd("worker "+self._worker_id+": "+e)}}),f["default"].addTarget("self",self))},{"./gl/texture":201,"./selection":218,"./sources/data_source":219,"./styles/rule":228,"./styles/style_manager":230,"./styles/style_parser":231,"./tile":235,"./utils/merge":238,"./utils/utils":241,"./utils/worker_broker":243,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25}],218:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/core-js/promise")["default"],a=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var s=e("./gl/texture"),u=a(s),l=e("./utils/worker_broker"),c=a(l),f=e("loglevel"),h=a(f),d=function(){function e(t,r){i(this,e),this.gl=t,this.workers=r,this.init()}return n(e,[{key:"init",value:function(){this.requests={},this.feature=null,this.read_delay=5,this.read_delay_timer=null,this.pixel=new Uint8Array(4),this.pixel32=new Float32Array(this.pixel.buffer),this.fbo=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.fbo),this.fbo_size={width:256,height:256},this.fbo_size.aspect=this.fbo_size.width/this.fbo_size.height;var e=u["default"].create(this.gl,"selection_fbo",{filtering:"nearest"});e.setData(this.fbo_size.width,this.fbo_size.height,null,{filtering:"nearest"}),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,e.texture,0);var t=this.gl.createRenderbuffer();this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,t),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_COMPONENT16,this.fbo_size.width,this.fbo_size.height),this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,t),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null)}},{key:"destroy",value:function(){this.gl&&this.fbo&&(this.gl.deleteFramebuffer(this.fbo),this.fbo=null,this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null))}},{key:"bind",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.fbo),this.gl.viewport(0,0,this.fbo_size.width,this.fbo_size.height)}},{key:"getFeatureAt",value:function(e){var t=this;return new o(function(r,n){t.selection_request_id=t.selection_request_id+1||0,t.requests[t.selection_request_id]={type:"point",id:t.selection_request_id,point:e,resolve:r,reject:n}})}},{key:"pendingRequests",value:function(){return this.requests}},{key:"clearPendingRequests",value:function(){for(var e in this.requests){var t=this.requests[e];t.sent||(t.reject({request:t}),delete this.requests[e])}}},{key:"read",value:function(){var e=this;null!=this.read_delay_timer&&clearTimeout(this.read_delay_timer),this.read_delay_timer=setTimeout(function(){var t=e.gl;t.bindFramebuffer(t.FRAMEBUFFER,e.fbo);for(var r in e.requests){var n=e.requests[r];if(!n.sent&&"point"===n.type){t.readPixels(Math.floor(n.point.x*e.fbo_size.width),Math.floor((1-n.point.y)*e.fbo_size.height),1,1,t.RGBA,t.UNSIGNED_BYTE,e.pixel);var i=e.pixel[0]+(e.pixel[1]<<8)+(e.pixel[2]<<16)+(e.pixel[3]<<24)>>>0,o=e.pixel[3];255!==o?null!=e.workers[o]&&c["default"].postMessage(e.workers[o],"self.getFeatureSelection",{id:n.id,key:i}).then(function(t){e.finishRead(t)}):e.finishRead({id:n.id,feature:null}),n.sent=!0}}t.bindFramebuffer(t.FRAMEBUFFER,null)},this.read_delay)}},{key:"finishRead",value:function(e){var t=this.requests[e.id];if(!t)return void h["default"].error("FeatureSelection.finishRead(): could not find message",e);var r=e.feature,n=!1;(null!=r&&null==this.feature||null==r&&null!=this.feature||null!=r&&null!=this.feature&&JSON.stringify(r)!==JSON.stringify(this.feature))&&(n=!0),this.feature=r,t.resolve({feature:r,changed:n,request:t}),delete this.requests[e.id]}}],[{key:"makeEntry",value:function(e){this.map_entry++;var t=255&this.map_entry,r=this.map_entry>>8&255,n=this.map_entry>>16&255,i=this.map_prefix,o=t/255,a=r/255,s=n/255,u=i/255,l=t+(r<<8)+(n<<16)+(i<<24)>>>0;return this.map[l]={color:[o,a,s,u]},this.map_size++,this.tiles[e.key]=this.tiles[e.key]||[],this.tiles[e.key].push(l),this.map[l]}},{key:"makeColor",value:function(e,t){var r=this.makeEntry(t);return r.feature={id:e.id,properties:e.properties,tile:t.key},r.color}},{key:"reset",value:function(){this.tiles={},this.map={},this.map_size=0,this.map_entry=0}},{key:"clearTile",value:function(e){var t=this;Array.isArray(this.tiles[e])&&(this.tiles[e].forEach(function(e){return delete t.map[e]}),this.map_size-=this.tiles[e].length,delete this.tiles[e])}},{key:"getMapSize",value:function(){return this.map_size}},{key:"setPrefix",value:function(e){this.map_prefix=e}}]),e}();r["default"]=d,d.map={},d.tiles={},d.map_size=0,d.map_entry=0,d.map_prefix=0,d.defaultColor=[0,0,0,1],t.exports=r["default"]},{"./gl/texture":201,"./utils/worker_broker":243,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,loglevel:179}],219:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/create-class")["default"],i=e("babel-runtime/helpers/class-call-check")["default"],o=e("babel-runtime/helpers/get")["default"],a=e("babel-runtime/helpers/inherits")["default"],s=e("babel-runtime/helpers/sliced-to-array")["default"],u=e("babel-runtime/core-js/promise")["default"],l=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var c=e("../geo"),f=l(c),h=e("../utils/errors"),d=e("../utils/utils"),p=l(d),m=function(){function e(t){i(this,e),this.id=t.id,this.name=t.name,this.url=t.url,this.pad_scale=t.pad_scale||5e-4,this.default_winding=null,this.transform=t.transform,"function"==typeof this.transform&&this.transform.bind(this),this.extra_data=t.extra_data,"function"==typeof importScripts&&t.scripts&&t.scripts.forEach(function(e){try{importScripts(e),p["default"].log("info","DataSource: loaded library: "+e)}catch(t){p["default"].log("error","DataSource: failed to load library: "+e),p["default"].log("error",t)}}),this.max_zoom=t.max_zoom||f["default"].default_max_zoom}return n(e,[{key:"load",value:function(e){var t=this;return e.source_data={},e.source_data.layers={},e.pad_scale=this.pad_scale,this._load(e).then(function(e){for(var r in e.source_data.layers){var n=e.source_data.layers[r];n&&n.features&&n.features.forEach(function(e){f["default"].transformGeometry(e.geometry,function(e){e[1]=-e[1],t.pad_scale&&(e[0]=Math.round(e[0]*(1+t.pad_scale)-f["default"].tile_scale*t.pad_scale/2),e[1]=Math.round(e[1]*(1+t.pad_scale)-f["default"].tile_scale*t.pad_scale/2))}),t.updateDefaultWinding(e.geometry)})}e.default_winding=t.default_winding||"CCW"})}},{key:"_load",value:function(){throw new h.MethodNotImplemented("_load")}},{key:"updateDefaultWinding",value:function(e){return null==this.default_winding&&("Polygon"===e.type?this.default_winding=f["default"].ringWinding(e.coordinates[0]):"MultiPolygon"===e.type&&(this.default_winding=f["default"].ringWinding(e.coordinates[0][0]))),this.default_winding}}],[{key:"create",value:function(t){return e.types[t.type]?new e.types[t.type](t):void 0}},{key:"projectData",value:function(e){var t=+new Date;for(var r in e.layers)for(var n=e.layers[r].features.length,i=0;n>i;i++){var o=e.layers[r].features[i];f["default"].transformGeometry(o.geometry,function(e){var t=f["default"].latLngToMeters(e),r=s(t,2),n=r[0],i=r[1];e[0]=n,e[1]=i})}void 0!==e.debug&&(e.debug.projection=+new Date-t)}},{key:"scaleData",value:function(e,t){var r=t.coords.z,n=t.min,i=(t.max,f["default"].unitsPerMeter(r));for(var o in e.layers)for(var a=e.layers[o].features.length,s=0;a>s;s++){var u=e.layers[o].features[s];f["default"].transformGeometry(u.geometry,function(e){e[0]=(e[0]-n.x)*i,e[1]=(e[1]-n.y)*i*-1})}}},{key:"register",value:function(t,r){t&&r&&(e.types[r]=t)}}]),e}();r["default"]=m,m.types={};var g=function(e){function t(e){if(i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.response_type="",null==this.url)throw Error("Network data source must provide a `url` property")}return a(t,e),n(t,[{key:"_load",value:function(e){var t=this,r=this.formatUrl(e),n=e.source_data;return n.url=r,e.debug=e.debug||{},e.debug.network=+new Date,new u(function(i){n.error=null;var o=p["default"].io(r,6e4,t.response_type);n.request=o.request,o.then(function(r){e.debug.response_size=r.length||r.byteLength,e.debug.network=+new Date-e.debug.network,e.debug.parsing=+new Date,t.parseSourceData(e,n,r),e.debug.parsing=+new Date-e.debug.parsing,i(e)})["catch"](function(t){n.error=t.toString(),i(e)})})}},{key:"formatUrl",value:function(){throw new h.MethodNotImplemented("formatUrl")}},{key:"parseSourceData",value:function(){throw new h.MethodNotImplemented("parseSourceData")}}]),t}(m);r.NetworkSource=g;var v=function(e){function t(e){i(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.tiled=!0,this.url_hosts=null;var r=this.url.match(/{s:\[([^}+]+)\]}/);null!=r&&r.length>1&&(this.url_hosts=r[1].split(","),this.next_host=0)}return a(t,e),n(t,[{key:"formatUrl",value:function(e){var t=f["default"].wrapTile(e.coords,{x:!0}),r=this.url.replace("{x}",t.x).replace("{y}",t.y).replace("{z}",t.z);return null!=this.url_hosts&&(r=r.replace(/{s:\[([^}+]+)\]}/,this.url_hosts[this.next_host]),this.next_host=(this.next_host+1)%this.url_hosts.length),r}},{key:"urlHasTilePattern",value:function(e){return e&&e.search("{x}")>-1&&e.search("{y}")>-1&&e.search("{z}")>-1}}]),t}(g);r.NetworkTileSource=v},{"../geo":193,"../utils/errors":237,"../utils/utils":241,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],220:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/create-class")["default"],a=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./data_source"),c=u(l),f=e("./mvt"),h=e("../geo"),d=u(h),p=e("geojson-vt"),m=u(p),g=function(e){function t(e){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.tiled=!0,this.load_data=null,this.tile_indexes={},this.max_zoom=Math.max(this.max_zoom||0,15),this.pad_scale=0}return i(t,e),o(t,[{key:"_load",value:function(e){var r=this;return this.load_data||(this.load_data=n(Object.getPrototypeOf(t.prototype),"_load",this).call(this,{source_data:{layers:{}}}).then(function(e){var t=e.source_data.layers;for(var n in t)r.tile_indexes[n]=m["default"](t[n],{maxZoom:r.max_zoom,tolerance:3,extent:d["default"].tile_scale,buffer:0});return r.loaded=!0,e})),this.load_data.then(function(){for(var t in r.tile_indexes)e.source_data.layers[t]=r.getTileFeatures(e,t);return e})}},{key:"getTileFeatures",value:function(e,t){var r=d["default"].wrapTile(e.coords,{x:!0}),n=this.tile_indexes[t].getTile(r.z,r.x,r.y),i=void 0;if(n&&n.features){i={type:"FeatureCollection",features:[]};var o=!0,a=!1,u=void 0;try{for(var l,c=s(n.features);!(o=(l=c.next()).done);o=!0){var h=l.value,p={type:"Feature",geometry:{},properties:h.tags};if(1===h.type)p.geometry.coordinates=h.geometry.map(function(e){return[e[0],e[1]]}),p.geometry.type="MultiPoint";else{if(2!==h.type&&3!==h.type)continue;p.geometry.coordinates=h.geometry.map(function(e){return e.map(function(e){return[e[0],e[1]]})}),2===h.type?p.geometry.type="MultiLineString":p.geometry=f.MVTSource.decodeMultiPolygon(p.geometry)}i.features.push(p)}}catch(m){a=!0,u=m}finally{try{!o&&c["return"]&&c["return"]()}finally{if(a)throw u}}}return i}},{key:"formatUrl",value:function(){return this.url}},{key:"parseSourceData",value:function(e,t,r){t.layers=this.getLayers(JSON.parse(r))}},{key:"getLayers",value:function(e){return"Feature"===e.type||"FeatureCollection"===e.type?{_default:e}:e}}]),t}(l.NetworkSource);r.GeoJSONSource=g;var v=function(e){function t(e){return a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.urlHasTilePattern(this.url)?this:this instanceof t?new g(e):null}return i(t,e),o(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);this.prepareGeoJSON(n,e,t)}},{key:"prepareGeoJSON",value:function(e,t,r){"function"==typeof this.transform&&(e=this.transform(e,this.extra_data)),r.layers=g.prototype.getLayers(e);var n={coords:t.coords,min:d["default"].metersForTile(d["default"].wrapTile(t.coords,{x:!0}))};c["default"].projectData(r),c["default"].scaleData(r,n)}}]),t}(l.NetworkTileSource);r.GeoJSONTileSource=v,c["default"].register(v,"GeoJSON"),c["default"].register(v,"GeoJSONTiles")},{"../geo":193,"./data_source":219,"./mvt":221,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"geojson-vt":138}],221:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/create-class")["default"],a=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/get-iterator")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0}); +var l=e("./data_source"),c=u(l),f=e("../geo"),h=u(f),d=e("pbf"),p=u(d),m=e("vector-tile"),g=function(e){function t(e){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.response_type="arraybuffer"}return i(t,e),o(t,[{key:"parseSourceData",value:function(e,t,r){var n=new Uint8Array(r),i=new p["default"](n);t.data=new m.VectorTile(i),t.layers=this.toGeoJSON(t.data),delete t.data}},{key:"toGeoJSON",value:function(e){var r={};for(var n in e.layers){for(var i=e.layers[n],o={type:"FeatureCollection",features:[]},a=0;a0&&(t.push(r),r=[]),r.push(c)}}catch(d){o=!0,a=d}finally{try{!i&&l["return"]&&l["return"]()}finally{if(o)throw a}}return r.length>0&&t.push(r),1===t.length?(e.type="Polygon",e.coordinates=t[0]):(e.type="MultiPolygon",e.coordinates=t),e}}]),t}(l.NetworkTileSource);r.MVTSource=g,c["default"].register(g,"MVT")},{"../geo":193,"./data_source":219,"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,pbf:182,"vector-tile":188}],222:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/create-class")["default"],a=e("babel-runtime/helpers/class-call-check")["default"],s=e("babel-runtime/core-js/object/keys")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("./data_source"),c=u(l),f=e("./geojson"),h=e("topojson"),d=u(h),p=function(e){function t(){a(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),o(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);n=this.toGeoJSON(n),t.layers=this.getLayers(n)}},{key:"toGeoJSON",value:function(e){if(e.objects&&1===s(e.objects).length){var t=s(e.objects)[0];e=d["default"].feature(e,e.objects[t])}else{var r={};for(var n in e.objects)r[n]=d["default"].feature(e,e.objects[n]);e=r}return e}}]),t}(f.GeoJSONSource);r.TopoJSONSource=p;var m=function(e){function t(e){a(this,t);var r=n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e);return r!==this?new p(e):void 0}return i(t,e),o(t,[{key:"parseSourceData",value:function(e,t,r){var n=JSON.parse(r);n=p.prototype.toGeoJSON(n),this.prepareGeoJSON(n,e,t)}}]),t}(f.GeoJSONTileSource);r.TopoJSONTileSource=m,c["default"].register(m,"TopoJSON"),c["default"].register(m,"TopoJSONTiles")},{"./data_source":219,"./geojson":220,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,topojson:186}],223:[function(e,t,r){"use strict";function n(e,t,r,n){var i=n.halfWidth,o=n.vertices,a=n.scalingVecs,s=n.texcoords;a?(o.push(e),a.push(t)):o.push([e[0]+t[0]*i,e[1]+t[1]*i]),s&&s.push(r)}function i(e,t,r,i){i.texcoords?(n(e,t,[i.max_u,(1-r)*i.min_v+r*i.max_v],i),n(e,p["default"].neg(t),[i.min_u,(1-r)*i.min_v+r*i.max_v],i)):(n(e,t,null,i),n(e,p["default"].neg(t),null,i))}function o(e,t,r,i,o,a,s,c,f,h){if(!(1>f)){l(h);var d=p["default"].set(t),m=[0,0],g=p["default"].dot(t,i);if(-1>g&&(g=-1),g=Math.acos(g)/f,c||(g*=-1),h.texcoords)var v=p["default"].set(o),y=p["default"].div(p["default"].sub(s,o),f);n(e,r,a,h),n(e,d,o,h);for(var _=0;f>_;_++){if(m=p["default"].normalize(d),d=p["default"].rot(p["default"].normalize(d),g),4===f&&(0===_||_===f-2)){var b=2/(1+Math.abs(p["default"].dot(m,d)));d=p["default"].mult(d,b*b)}h.texcoords&&(v=p["default"].add(v,y)),n(e,d,v,h)}for(var x=0;f>x;x++)c?(u(x+2,h),u(0,h),u(x+1,h)):(u(x+1,h),u(0,h),u(x+2,h));h.vertices=[],h.scalingVecs&&(h.scalingVecs=[]),h.texcoords&&(h.texcoords=[])}}function a(e,t,r,i,a){var s=[p["default"].set(t[0]),p["default"].set(t[1]),p["default"].set(t[2])],u=p["default"].signed_area(e[0],e[1],e[2])>0,l=s[0],c=p["default"].neg(s[1]),f=s[2];if(a.texcoords)var h=[a.max_u,(1-r)*a.min_v+r*a.max_v],d=[a.min_u,(1-r)*a.min_v+r*a.max_v],m=[a.max_u,(1-r)*a.min_v+r*a.max_v];u?(n(e[1],l,h,a),n(e[1],c,d,a)):(l=p["default"].neg(s[0]),c=s[1],f=p["default"].neg(s[2]),a.texcoords&&(h=[a.min_u,(1-r)*a.min_v+r*a.max_v],d=[a.max_u,(1-r)*a.min_v+r*a.max_v],m=[a.min_u,(1-r)*a.min_v+r*a.max_v]),n(e[1],c,d,a),n(e[1],l,h,a)),o(e[1],l,c,f,h,d,m,u,i,a),u?(n(e[1],f,m,a),n(e[1],c,d,a)):(n(e[1],c,d,a),n(e[1],f,m,a))}function s(e,t,r,n,i){if(!(1>r)){var a,s,u;i.texcoords&&(n?(a=[i.min_u,i.min_v],u=[i.min_u+(i.max_u-i.min_u)/2,i.min_v],s=[i.max_u,i.min_v]):(a=[i.min_u,i.max_v],u=[i.min_u+(i.max_u-i.min_u)/2,i.max_v],s=[i.max_u,i.max_v])),o(e,p["default"].neg(t),[0,0],t,a,u,s,n,2*r,i)}}function u(e,t){var r=t.vertex_data,n=t.vertex_template,i=t.halfWidth,o=t.vertices,a=t.scaling_index,s=t.scaling_normalize,u=t.scalingVecs,l=t.texcoord_index,c=t.texcoords,f=t.texcoord_normalize;e>=o.length||(n[0]=o[e][0],n[1]=o[e][1],l&&(n[l+0]=c[e][0]*f,n[l+1]=c[e][1]*f),a&&(n[a+0]=u[e][0]*s,n[a+1]=u[e][1]*s,n[a+2]=i),r.addVertex(n))}function l(e){for(var t=0;tv;v++){var y=e[v];if(i)var _=g["default"].findBoundingBox(y),b=c(_,4),x=b[0],A=b[1],w=b[2],E=b[3],D=w-x,k=E-A,T=(d-l)/D,F=(p-f)/k;for(var S=h.triangulatePolygon(y),C=S.length,M=0;C>M;M++){var R=S[M];r[0]=R[0],r[1]=R[1],i&&(r[i+0]=((R[0]-x)*T+l)*a,r[i+1]=((R[1]-A)*F+f)*a),t.addVertex(r)}}},h.buildExtrudedPolygons=function(e,t,r,n,i,o,a,s,u){var l=u.remove_tile_edges,f=u.tile_edge_tolerance,d=u.texcoord_index,m=u.texcoord_scale,g=u.texcoord_normalize,v=u.winding,y=t+(n||0),_=t+r;if(o[2]=_,h.buildPolygons(e,i,o,{texcoord_index:d,texcoord_scale:m,texcoord_normalize:g}),d){g=g||1;var b=m||h.defaultUVs,x=c(b,4),A=x[0],w=x[1],E=x[2],D=x[3],k=[[A,D],[A,w],[E,w],[E,w],[E,D],[A,D]]}for(var T=e.length,F=0;T>F;F++)for(var S=e[F],C=0;CB)){var N=[0,0],O=[0,0],U=[0,0],z=[0,0],$=[0,0],G=[0,0],q=!1,V=!0;l(P);for(var W=0;B>W;W++){if(V=B>W+1,q)N=O,z=p["default"].normalize(p["default"].perp(N,L[W]));else if(0===W&&u===!0){var Y=!0;f&&h.outsideTile(L[W],L[B-2],d)&&(Y=!1),Y&&(N=L[B-2],z=p["default"].normalize(p["default"].perp(N,L[W])),q=!0)}if(O=L[W],V?U=L[W+1]:u===!0&&(U=L[1],V=!0),V&&(G=p["default"].normalize(p["default"].perp(O,U)),f&&h.outsideTile(O,U,d)))$=p["default"].normalize(p["default"].perp(N,O)),q&&(i(O,$,W/B,P),P.nPairs++,l(P)),q=!1;else{if(q)if(V){$=p["default"].normalize(p["default"].add(z,G));var H=2/(1+Math.abs(p["default"].dot(z,$)));$=p["default"].mult($,H*H)}else $=p["default"].normalize(p["default"].perp(N,O));else{if(!V)continue;G=p["default"].normalize(p["default"].perp(O,U)),$=G}(q||V)&&(0!==W||q||u||s(O,$,D,!0,P),0===k&&p["default"].lengthSq($)>T&&(k=b.bevel),0!==k&&q&&V?a([N,O,U],[z,$,G],W/B,k,P):i(O,$,W/(B-1),P),V&&P.nPairs++,q=!0)}}l(P),u||s(O,$,D,!1,P)}}},h.buildQuadsForPoints=function(e,t,r,n,i){var o=n.texcoord_index,a=n.position_index,s=n.shape_index,u=n.offset_index,l=i.quad,f=i.quad_scale,d=i.offset,p=i.angle,m=i.texcoord_scale,g=i.texcoord_normalize,v=l[0]/2,y=l[1]/2,_=[[-v,-y],[v,-y],[v,y],[-v,-y],[v,y],[-v,y]],b=void 0;if(o){g=g||1;var x=m||h.defaultUVs,A=c(x,4),w=A[0],E=A[1],D=A[2],k=A[3];b=[[w,E],[D,E],[D,k],[w,E],[D,k],[w,k]]}for(var T=e.length,F=0;T>F;F++)for(var S=e[F],C=0;6>C;C++)o&&(r[o+0]=b[C][0]*g,r[o+1]=b[C][1]*g),r[a+0]=S[0],r[a+1]=S[1],r[s+0]=_[C][0],r[s+1]=_[C][1],r[s+2]=p,r[s+3]=f,r[u+0]=d[0],r[u+1]=d[1],t.addVertex(r)},h.triangulatePolygon=function(e){return y["default"](e)},h.outsideTile=function(e,t,r){var n=h.tile_bounds[0],i=h.tile_bounds[1];return e[0]<=n.x+r&&t[0]<=n.x+r||e[0]>=i.x-r&&t[0]>=i.x-r||e[1]>=n.y-r&&t[1]>=n.y-r||e[1]<=i.y+r&&t[1]<=i.y+r?!0:!1},t.exports=r["default"]},{"../geo":193,"../vector":244,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24,earcut:135}],224:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/create")["default"],i=e("babel-runtime/core-js/object/assign")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=e("../style"),s=e("../style_parser"),u=e("../style_manager"),l=e("../../gl/constants"),c=o(l),f=e("../../gl/vertex_layout"),h=o(f),d=e("../builders"),p=o(d),m=e("../../geo"),g=o(m),v=e("../../utils/utils"),y=o(v),_=n(a.Style);r.Lines=_,i(_,{name:"lines",built_in:!0,vertex_shader_key:"styles/polygons/polygons_vertex",fragment_shader_key:"styles/polygons/polygons_fragment",selection:!0,init:function(){a.Style.init.apply(this,arguments);var e=[{name:"a_position",size:4,type:c["default"].SHORT,normalized:!0},{name:"a_extrude",size:4,type:c["default"].SHORT,normalized:!0},{name:"a_color",size:4,type:c["default"].UNSIGNED_BYTE,normalized:!0}];this.defines.TANGRAM_LAYER_ORDER=!0,this.defines.TANGRAM_EXTRUDE_LINES=!0,this.selection&&e.push({name:"a_selection_color",size:4,type:c["default"].UNSIGNED_BYTE,normalized:!0}),this.texcoords&&(this.defines.TANGRAM_TEXTURE_COORDS=!0,e.push({name:"a_texcoord",size:2,type:c["default"].UNSIGNED_SHORT,normalized:!0})),this.vertex_layout=new h["default"](e),this.outline_feature_style={},this.inline_feature_style=this.feature_style},calcWidth:function(e,t){return e&&s.StyleParser.cacheDistance(e,t)||0},calcWidthNextZoom:function(e,t){t.zoom++;var r=this.calcWidth(e,t);return t.zoom--,r},_parseFeature:function(e,t,r){var n=this.feature_style,i=this.calcWidth(t.width,r);if(!(0>i)){var o=this.calcWidthNextZoom(t.next_width,r);if(!(0===i&&0===o||0>o)&&(n.width=i*r.units_per_meter,n.next_width=2*o-i,n.next_width*=r.units_per_meter,n.next_width/=2,n.color=this.parseColor(t.color,r),n.color)){if(n.z=t.z&&s.StyleParser.cacheDistance(t.z||0,r)||s.StyleParser.defaults.z,n.height=e.properties.height||s.StyleParser.defaults.height,n.extrude=s.StyleParser.evalProp(t.extrude,r),n.extrude&&("number"==typeof n.extrude?n.height=n.extrude:Array.isArray(n.extrude)&&(n.height=n.extrude[1])),n.extrude&&n.height&&(n.z+=n.height),n.cap=t.cap,n.join=t.join,n.miter_limit=t.miter_limit,n.tile_edges=t.tile_edges,n.outline=n.outline||{width:{},next_width:{},preprocessed:!0},t.outline&&t.outline.color&&t.outline.width){var a=2*this.calcWidth(t.outline.width,r),u=2*this.calcWidthNextZoom(t.outline.next_width,r);0===a&&0===u||0>a||0>u?(n.outline.width.value=null,n.outline.next_width.value=null,n.outline.color=null):(n.outline.width.value=a+i,n.outline.next_width.value=u+o,n.outline.color=t.outline.color,n.outline.cap=t.outline.cap||t.cap,n.outline.join=t.outline.join||t.join,n.outline.miter_limit=t.outline.miter_limit||t.miter_limit,n.outline.style=t.outline.style||this.name,n.outline.order=t.outline.order?this.parseOrder(t.outline.order,r):n.order,n.outline.order>n.order&&(n.outline.order=n.order),n.outline.order-=.5)}else n.outline.width.value=null,n.outline.next_width.value=null,n.outline.color=null;return n}}},_preprocess:function(e){return e.color=s.StyleParser.colorCacheObject(e.color),e.width=s.StyleParser.cacheObject(e.width,s.StyleParser.cacheUnits),e.next_width=s.StyleParser.cacheObject(e.width,s.StyleParser.cacheUnits),e.z=s.StyleParser.cacheObject(e.z,s.StyleParser.cacheUnits),e.outline&&(e.outline.color=s.StyleParser.colorCacheObject(e.outline.color),e.outline.width=s.StyleParser.cacheObject(e.outline.width,s.StyleParser.cacheUnits),e.outline.next_width=s.StyleParser.cacheObject(e.outline.width,s.StyleParser.cacheUnits)),e},makeVertexTemplate:function(e){var t=0;return this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=e.z||0,this.vertex_template[t++]=e.order,this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=0,this.vertex_template[t++]=e.next_width,this.vertex_template[t++]=255*e.color[0],this.vertex_template[t++]=255*e.color[1],this.vertex_template[t++]=255*e.color[2],this.vertex_template[t++]=255*e.color[3],this.selection&&(this.vertex_template[t++]=255*e.selection_color[0],this.vertex_template[t++]=255*e.selection_color[1],this.vertex_template[t++]=255*e.selection_color[2],this.vertex_template[t++]=255*e.selection_color[3]),this.texcoords&&(this.vertex_template[t++]=0,this.vertex_template[t++]=0),this.vertex_template},buildLines:function(e,t,r,n,i){if(this.feature_style=this.outline_feature_style,t.outline&&null!=t.outline.color&&null!=t.outline.width.value){var o=u.StyleManager.styles[t.outline.style];o&&o.addFeature(n.feature,t.outline,n)}this.feature_style=this.inline_feature_style;var a=this.makeVertexTemplate(t);p["default"].buildPolylines(e,t.width,r,a,{cap:t.cap,join:t.join,miter_limit:t.miter_limit,scaling_index:this.vertex_layout.index.a_extrude,scaling_normalize:y["default"].scaleInt16(1,256),texcoord_index:this.vertex_layout.index.a_texcoord,texcoord_scale:this.texcoord_scale,texcoord_normalize:65535,closed_polygon:i&&i.closed_polygon,remove_tile_edges:!t.tile_edges&&i&&i.remove_tile_edges,tile_edge_tolerance:g["default"].tile_scale*n.tile.pad_scale*4})},buildPolygons:function(e,t,r,n){for(var i=0;i-1},isRightAnchor:function(e){return o.indexOf(e)>-1},isTopAnchor:function(e){return a.indexOf(e)>-1},isBottomAnchor:function(e){return s.indexOf(e)>-1}},t.exports=r["default"]},{}],226:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/create")["default"],i=e("babel-runtime/core-js/object/assign")["default"],o=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=e("../style"),s=e("../style_parser"),u=e("../../gl/constants"),l=o(u),c=e("../../gl/vertex_layout"),f=o(c),h=e("../builders"),d=o(h),p=e("../../gl/texture"),m=o(p),g=e("../../geo"),v=o(g),y=e("../../utils/utils"),_=o(y),b=e("../../vector"),x=o(b),A=e("../../labels/collision"),w=o(A),E=e("../../labels/label_point"),D=o(E),k=e("loglevel"),T=o(k),F=n(a.Style);r.Points=F,i(F,{name:"points",built_in:!0,selection:!0,blend:"overlay",init:function(){arguments.length<=0||void 0===arguments[0]?{}:arguments[0];a.Style.init.apply(this,arguments),this.vertex_shader_key="styles/points/points_vertex",this.fragment_shader_key="styles/points/points_fragment";var e=[{name:"a_position",size:4,type:l["default"].SHORT,normalized:!0},{name:"a_shape",size:4,type:l["default"].SHORT,normalized:!0},{name:"a_texcoord",size:2,type:l["default"].UNSIGNED_SHORT,normalized:!0},{name:"a_offset",size:2,type:l["default"].SHORT,normalized:!0},{name:"a_color",size:4,type:l["default"].UNSIGNED_BYTE,normalized:!0}];this.selection&&e.push({name:"a_selection_color",size:4,type:l["default"].UNSIGNED_BYTE,normalized:!0}),"overlay"!==this.blend&&(this.defines.TANGRAM_LAYER_ORDER=!0),this.vertex_layout=new f["default"](e),this.texture&&(this.defines.TANGRAM_POINT_TEXTURE=!0,this.shaders.uniforms=this.shaders.uniforms||{},this.shaders.uniforms.u_texture=this.texture),this.queues={}},reset:function(){this.queues={}},addFeature:function(e,t,r){var n=r.tile;if(t=this.preprocess(t)){var i={};if(i.color=this.parseColor(t.color,r),!i.color&&!this.texture)return null;var o=i.sprite=s.StyleParser.evalProp(t.sprite,r);if(i.sprite_default=t.sprite_default,this.texture&&m["default"].textures[this.texture]&&m["default"].textures[this.texture].sprites){if(!o&&!i.sprite_default)return;if(!m["default"].textures[this.texture].sprites[o]){if(!i.sprite_default)return void T["default"].warn("Style: in style '"+this.name+"', could not find sprite '"+o+"' for texture '"+this.texture+"'");if(o=i.sprite_default,!m["default"].textures[this.texture].sprites[o])return void T["default"].warn("Style: in style '"+this.name+"', could not find default sprite '"+o+"' for texture '"+this.texture+"'")}}else o&&(T["default"].warn("Style: in style '"+this.name+"', sprite '"+o+"' was specified, but texture '"+this.texture+"' has no sprites"),o=null);var a=void 0;this.texture&&o?(a=m["default"].getSpriteInfo(this.texture,o),i.texcoords=a.texcoords):i.texcoords=null,i.z=t.z&&s.StyleParser.cacheDistance(t.z,r)||s.StyleParser.defaults.z,i.size=t.size,i.size=i.size?s.StyleParser.cacheProperty(i.size,r):a?a.size:[16,16],i.size=[Math.min(i.size[0]||i.size,256),Math.min(i.size[1]||i.size,256)],i.angle=s.StyleParser.evalProp(t.angle,r)||0,i.centroid=null!=t.centroid?t.centroid:!0,this.computeLayout(i,e,t,r,n),this.tile_data[n.key]||this.startData(n.key),this.queues[n.key]||(this.queues[n.key]=[]),this.queues[n.key].push({feature:e,draw:t,context:r,style:i}),w["default"].addStyle(this.name,n.key)}},endData:function(e){var t=this,r=this.queues[e];this.queues[e]=[];var n=[];return r.forEach(function(e){for(var r=e.style,i=e.feature,o=i.geometry,a=t.buildLabelsFromGeometry(r.size,o,r),s=0;s>>0,o.priority=a,o},buildLabelsFromGeometry:function(e,t,r){var n=[];if("Point"===t.type)n.push(new D["default"](t.coordinates,e,r));else if("MultiPoint"===t.type)for(var i=t.coordinates,o=0;o1){for(var t=e[0],r=1;rn&&(n=e[o].length);if(0===n)return null;for(var a=function(n){return r=e.map(function(e){return e[n]&&e[n][t]}),0===r.length?"continue":(r.sort(function(e,t){return(e&&e.layer_name)>(t&&t.layer_name)?1:-1}),k["default"].apply(void 0,[i].concat(_(r))),void delete i.layer_name)},s=0;n>s;s++){{a(s)}}return i.visible===!1?null:i}function o(e){return C.indexOf(e)>-1}function a(e){return 0===x(e).length}function s(e,t){e.parent&&s(e.parent,t),t(e)}function u(e,t){e.rules&&e.rules.forEach(function(e){u(e,t)}),t(e)}function l(e){var t={},r={};for(var n in e)o(n)?t[n]=e[n]:r[n]=e[n];return[t,r]}function c(e){var t=[];if(e.parent){var r=e.parent.calculatedDraw||[];t.push.apply(t,_(r))}return t.push(e.draw),t}function f(e,t,r){var n={name:e,parent:r},i=l(t),o=b(i,2),s=o[0],u=o[1],c=a(u),h=void 0;h=c&&null!=r?j:P;var d=new h(A(n,s));if(r&&r.addRule(d),!c)for(var p in u){var m=u[p];if("object"!=typeof m||Array.isArray(m)){var g="Layer value must be an object: can't create layer '"+p+": "+JSON.stringify(m)+"'";g+=", under parent layer '"+d.full_name+"'.",E.Styles[d.name]&&(g+=" The parent '"+d.name+"' is also the name of a style, did you mean to create a 'draw' group",r&&(g+=" under '"+r.name+"'"),g+=" instead?"),S["default"].warn(g)}else f(p,m,d)}return d}function h(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=f(r,n))}return t}function d(e,t){return null==e.zooms||e.zooms[t.zoom]?"function"==typeof e.filter&&e.filter(t)||null==e.filter:!1}function p(e,t,r,n){var i=!1,o=!1;if(0!==t.length){for(var a=0;ar;r++)this.zooms[r]=!0;delete this.filter.$zoom}}},{key:"toJSON",value:function(){return{name:this.name,draw:this.draw}}}]),e}();R.id=0;var j=function(e){function t(e){var r=e.name,n=e.parent,i=e.draw,o=e.visible,a=e.filter,s=e.properties; +g(this,t),v(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,{name:r,parent:n,draw:i,visible:o,filter:a,properties:s})}return y(t,e),t}(R);r.RuleLeaf=j;var P=function(e){function t(e){var r=e.name,n=e.parent,i=e.draw,o=e.visible,a=e.rules,s=e.filter,u=e.properties;g(this,t),v(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,{name:r,parent:n,draw:i,visible:o,filter:s,properties:u}),this.rules=a||[]}return y(t,e),m(t,[{key:"addRule",value:function(e){this.rules.push(e)}},{key:"buildDrawGroups",value:function(e){var t=[],r=[];if(p(e,[this],t,r),t.length>0){var o=n(r);if(void 0===M[o]){for(var a=t.map(function(e){return e&&e.visible!==!1&&e.calculatedDraw}),s={},u=0;ua;++a){var s=t.length>a?t[a]:t;this.vertex_template[o+a+i]=s}},startData:function(e){return this.tile_data[e]={vertex_data:null,uniforms:null},this.tile_data[e]},endData:function(e){var t=this.tile_data[e];return t&&t.vertex_data&&(t.vertex_data.end(),t.vertex_data=t.vertex_data.buffer),this.tile_data[e]=null,n.resolve(t)},hasDataForTile:function(e){return null!=this.tile_data[e]},addFeature:function(e,t,r){var n=r.tile;if(n.generation===this.generation){this.tile_data[n.key]||this.startData(n.key);var i=this.parseFeature.apply(this,arguments);i&&(this.tile_data[n.key].vertex_data||(this.tile_data[n.key].vertex_data=this.vertex_layout.createVertexData()),this.buildGeometry(e.geometry,i,this.tile_data[n.key].vertex_data,r))}},buildGeometry:function(e,t,r,n){"Polygon"===e.type?this.buildPolygons([e.coordinates],t,r,n):"MultiPolygon"===e.type?this.buildPolygons(e.coordinates,t,r,n):"LineString"===e.type?this.buildLines([e.coordinates],t,r,n):"MultiLineString"===e.type?this.buildLines(e.coordinates,t,r,n):"Point"===e.type?this.buildPoints([e.coordinates],t,r,n):"MultiPoint"===e.type&&this.buildPoints(e.coordinates,t,r,n)},parseFeature:function(e,t,r){try{var n=this.feature_style;if(t=this.preprocess(t),!t)return;n.order=this.parseOrder(t.order,r);var i=!1;return n.interactive=t.interactive,this.selection&&(i=a.StyleParser.evalProp(n.interactive,r)),n.selection_color=i?u["default"].makeColor(e,r.tile):u["default"].defaultColor,n=this._parseFeature.apply(this,arguments)}catch(o){A["default"].error("Style.parseFeature: style parsing error",e,n,o)}},_parseFeature:function(){return this.feature_style},preprocess:function(e){if(!e.preprocessed){if(e=this._preprocess(e),!e)return;e.preprocessed=!0}return e},_preprocess:function(e){return e},parseOrder:function(e,t){return"number"!=typeof e?a.StyleParser.calculateOrder(e,t):e},parseColor:function(e,t){return e?a.StyleParser.cacheColor(e,t):this.shaders.blocks.color||this.shaders.blocks.filter?a.StyleParser.defaults.color:void 0},buildPolygons:function(){},buildLines:function(){},buildPoints:function(){},setGL:function(e){this.gl=e,this.max_texture_size=p["default"].getMaxTextureSize(this.gl)},makeMesh:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.uniforms;return new h["default"](this.gl,e,this.vertex_layout,{uniforms:r})},compile:function(){if(!this.gl)throw new Error("style.compile(): skipping for "+this.name+" because no GL context");if(this.compiling)throw new Error("style.compile(): skipping for "+this.name+" because style is already compiling");this.compiling=!0,this.compiled=!1;var e=this.buildDefineList();if(this.selection){var t=i({},e);t.TANGRAM_FEATURE_SELECTION=!0}var r=this.shaders&&this.shaders.blocks,n=this.shaders&&this.shaders.block_scopes,o=this.shaders&&this.shaders.uniforms,a=this.shaders&&this.shaders.extensions;"string"==typeof a&&(a=[a]);try{this.program=new c["default"](this.gl,b["default"][this.vertex_shader_key],b["default"][this.fragment_shader_key],{name:this.name,defines:e,uniforms:o,blocks:r,block_scopes:n,extensions:a}),this.program.compile(),this.selection?(this.selection_program=new c["default"](this.gl,b["default"][this.vertex_shader_key],b["default"]["gl/shaders/selection_fragment"],{name:this.name+" (selection)",defines:t,uniforms:o,blocks:r,block_scopes:n,extensions:a}),this.selection_program.compile()):this.selection_program=null}catch(s){throw this.compiling=!1,this.compiled=!1,new Error("style.compile(): style "+this.name+" error:",s)}this.compiling=!1,this.compiled=!0},addShaderBlock:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.shaders.blocks=this.shaders.blocks||{},this.shaders.blocks[e]=this.shaders.blocks[e]||[],this.shaders.blocks[e].push(t),this.shaders.block_scopes=this.shaders.block_scopes||{},this.shaders.block_scopes[e]=this.shaders.block_scopes[e]||[],this.shaders.block_scopes[e].push(r)},removeShaderBlock:function(e){this.shaders.blocks&&(this.shaders.blocks[e]=null)},replaceShaderBlock:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.removeShaderBlock(e),this.addShaderBlock(e,t,r)},buildDefineList:function(){var e={};if(null!=this.defines)for(var t in this.defines)e[t]=this.defines[t];if(null!=this.shaders&&null!=this.shaders.defines)for(t in this.shaders.defines)e[t]=this.shaders.defines[t];return e},setup:function(){this.setUniforms(),this.material.setupProgram(c["default"].current)},setUniforms:function(){var e=c["default"].current;e&&e.setUniforms(this.shaders&&this.shaders.uniforms,!0)},render_states:{opaque:{depth_test:!0,depth_write:!0},add:{depth_test:!0,depth_write:!1},multiply:{depth_test:!0,depth_write:!1},inlay:{depth_test:!0,depth_write:!1},overlay:{depth_test:!1,depth_write:!1}},default_blend_orders:{opaque:0,add:1,multiply:2,inlay:3,overlay:4},blendOrderSort:function(e,t){return"opaque"===e.blend||"opaque"===t.blend?"opaque"===e.blend&&"opaque"===t.blend?e.namet.blend_order?1:w.default_blend_orders[e.blend]w.default_blend_orders[t.blend]?1:e.name0&&(p.width=s.measureText(p.text).width,g=Math.max(g,Math.ceil(p.width)),m.push(p)),e&&(p=a({},d))}var o=this.applyTextTransform(e,r),s=this.context,u=this.text_buffer*l["default"].device_pixel_ratio,c=2*l["default"].device_pixel_ratio,f=this.px_size+c,h=void 0;h="number"==typeof n?o.split(" "):[o];for(var d={width:0,chars:0,text:""},p=a({},d),m=[],g=0,v=0;vn&&p.chars>0&&i(!0),p.chars+=b.length+1,p.text+=b+" ",y.length>1&&_r&&(r=a[0])}}var s=0,u=0,l=0;for(var n in e){var i=e[n];for(var o in i){var c=i[o],a=c.size.texture_size;u+a[1]l&&(l=u)):(s+=r,u=0,c.position=[s,u])}}return[s+r,l]}},{key:"applyTextTransform",value:function(e,t){return"capitalize"===t?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():e}}],[{key:"fontPixelSize",value:function(t){if(null!=t){t="string"==typeof t?t:String(t);var r=t.match(e.font_size_re)||[],n=o(r,3),i=n[1],a=n[2];return a=a||"px","em"===a?i*=16:"pt"===a?i/=.75:"%"===a&&(i/=6.25),i=parseFloat(i),i*=l["default"].device_pixel_ratio}}}]),e}();r["default"]=h,h.font_size_re=/((?:[0-9]*\.)?[0-9]+)\s*(px|pt|em|%)?/,t.exports=r["default"]},{"../../utils/utils":241,"../builders":223,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],233:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/to-consumable-array")["default"],i=e("babel-runtime/core-js/object/create")["default"],o=e("babel-runtime/core-js/object/assign")["default"],a=e("babel-runtime/core-js/object/keys")["default"],s=e("babel-runtime/core-js/promise")["default"],u=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var l=e("../../gl/texture"),c=u(l),f=e("../../utils/worker_broker"),h=u(f),d=e("../../utils/utils"),p=u(d),m=e("../../geo"),g=u(m),v=e("../style"),y=e("../points/points"),_=e("./canvas_text"),b=u(_),x=e("../../labels/collision"),A=u(x),w=e("../../labels/label_point"),E=u(w),D=e("../../labels/label_line"),k=u(D),T=e("./text_settings"),F=u(T),S=e("../style_parser"),C=e("loglevel"),M=u(C),R=i(y.Points);r.TextStyle=R,o(R,{name:"text","super":y.Points,built_in:!0,selection:!1,init:function(){this["super"].init.apply(this,arguments),this.main_thread_target="TextStyle-"+this.name,p["default"].isMainThread&&h["default"].addTarget(this.main_thread_target,this),this.defines.TANGRAM_POINT_TEXTURE=!0,this.defines.TANGRAM_UNMULTIPLY_ALPHA=!0,this.reset()},reset:function(){this["super"].reset.call(this),p["default"].isMainThread?this.canvas=new b["default"]:p["default"].isWorkerThread&&(this.texts={})},freeTile:function(e){delete this.texts[e]},finishTile:function(e){return this.freeTile(e),v.Style.endData.call(this,e)},addFeature:function(e,t,r){var n=r.tile;if(n.generation===this.generation&&(t=this.preprocess(t))){var i=this.parseTextSource(e,t,r);if(null!=i){var o=this.computeLayout({},e,t,r,n,i),a=F["default"].compute(e,t,r),s=F["default"].key(a);this.texts[n.key]=this.texts[n.key]||{},this.texts[n.key][s]=this.texts[n.key][s]||{},this.texts[n.key][s][i]||(this.texts[n.key][s][i]={text_settings:a,ref:0}),this.tile_data[n.key]||this.startData(n.key),this.queues[n.key]||(this.queues[n.key]=[]),this.queues[n.key].push({feature:e,draw:t,context:r,text:i,text_settings_key:s,layout:o}),A["default"].addStyle(this.name,n.key)}}},endData:function(e){var t=this,r=this.queues[e];return this.queues[e]=[],0===a(this.texts[e]||{}).length?s.resolve():h["default"].postMessage(this.main_thread_target+".calcTextSizes",e,this.texts[e]).then(function(n){if(!n)return A["default"].collide({},t.name,e),t.finishTile(e);t.texts[e]=n;var i=t.createLabels(e,r);return A["default"].collide(i,t.name,e).then(function(r){return 0===r.length?t.finishTile(e):(t.cullTextStyles(n,r),h["default"].postMessage(t.main_thread_target+".rasterizeTexts",e,n).then(function(n){var i=n.texts,o=n.texture;return i&&(t.texts[e]=i,r.forEach(function(r){var n=r.text_settings_key,i=t.texts[e]&&t.texts[e][n]&&t.texts[e][n][r.text],o=t.feature_style;o.label=r.label,o.size=i.size.logical_size,o.angle=p["default"].radToDeg(r.label.angle)||0,o.texcoords=i.texcoords,v.Style.addFeature.call(t,r.feature,r.draw,r.context)})),t.finishTile(e).then(function(e){return o&&e?(e.uniforms={u_texture:o},e.textures=[o],e):void 0})}))})})},createLabels:function(e,t){for(var r=[],n=0;nthis.coords.z&&(this.units_per_pixel/=Math.pow(2,this.style_zoom-this.coords.z)),this.meters_per_pixel=f["default"].metersPerPixel(this.coords.z),this.units_per_meter=f["default"].unitsPerMeter(this.coords.z),this.meshes={},this.textures=[]}return n(e,[{key:"freeResources",value:function(){if(this.meshes)for(var e in this.meshes)this.meshes[e].destroy();if(this.textures){var t=!0,r=!1,n=void 0;try{for(var i,o=s(this.textures);!(t=(i=o.next()).done);t=!0){var a=i.value,u=_["default"].textures[a];u&&u.destroy()}}catch(l){r=!0,n=l}finally{try{!t&&o["return"]&&o["return"]()}finally{if(r)throw n}}}this.meshes={},this.textures=[]}},{key:"destroy",value:function(){this.workerMessage("self.removeTile",this.key),this.freeResources(),this.worker=null}},{key:"buildAsMessage",value:function(){return{key:this.key,coord_key:this.coord_key,source:this.source.name,coords:this.coords,min:this.min,max:this.max,units_per_pixel:this.units_per_pixel,meters_per_pixel:this.meters_per_pixel,units_per_meter:this.units_per_meter,style_zoom:this.style_zoom,generation:this.generation,debug:this.debug}}},{key:"workerMessage",value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return v["default"].postMessage.apply(v["default"],[this.worker].concat(t))}},{key:"build",value:function(e){return this.generation=e,this.loaded||(this.loading=!0),this.workerMessage("self.buildTile",{tile:this.buildAsMessage()})["catch"](function(e){throw e})}},{key:"buildMeshes",value:function(e){if(!this.error){this.freeResources(),this.debug.geometries=0,this.debug.buffer_size=0;var t=this.mesh_data;if(t)for(var r in t){if(t[r].vertex_data){if(this.debug.buffer_size+=t[r].vertex_data.byteLength,!e[r]){x["default"].warn("Could not create mesh because style '"+r+"' not found, for tile "+this.key+", aborting tile"),this.meshes={};break}this.meshes[r]=e[r].makeMesh(t[r].vertex_data,t[r]),this.debug.geometries+=this.meshes[r].geometry_count}if(t[r].textures){var n;(n=this.textures).push.apply(n,o(t[r].textures))}}this.debug.geom_ratio=(this.debug.geometries/this.debug.features).toFixed(1),this.mesh_data=null,this.printDebug()}}},{key:"printDebug",value:function(){x["default"].debug("Tile: debug for "+this.key+": [ "+JSON.stringify(this.debug)+" ]")}},{key:"update",value:function(t){var r=this.coords;r.z!==t.center_tile.z&&(r=e.coordinateAtZoom(r,t.center_tile.z)),this.center_dist=Math.abs(t.center_tile.x-r.x)+Math.abs(t.center_tile.y-r.y)}},{key:"merge",value:function(e){for(var t in e)"key"!==t&&(this[t]=e[t]);return this}}],[{key:"create",value:function(t){return new e(t)}},{key:"coordKey",value:function(e){var t=e.x,r=e.y,n=e.z;return[t,r,n].join("/")}},{key:"key",value:function(t,r,n){return t=e.overZoomedCoordinate(t,r.max_zoom),t.y<0||t.y>=1<t.z){var n=e.coordinateAtZoom(r,t.z),i=n.x,o=n.y;return t.x===i&&t.y===o}return!1}},{key:"overZoomedCoordinate",value:function(t,r){var n=t.x,i=t.y,o=t.z;return void 0!==r&&o>r?e.coordinateAtZoom({x:n,y:i,z:o},r):{x:n,y:i,z:o}}},{key:"sort",value:function(e){return e.sort(function(e,t){var r=e.center_dist,n=t.center_dist;return n>r?-1:n===r?0:1})}},{key:"buildGeometry",value:function(t,r,n,i){t.debug.rendering=+new Date,t.debug.features=0;var o=t.source_data;m["default"].startTile(t.key);for(var a in r){var s=r[a];if(s&&s.data){if(s.data.source===t.source)for(var l=e.getDataForSource(o,s.data,a),c=0;cn?-1:i===n?0:1}),this.queued_coords.forEach(function(t){return e.loadCoordinate(t)}),this.queued_coords=[])},loadCoordinate:function(e){if(e.z===this.scene.center_tile.z){var t=!0,r=!1,i=void 0;try{for(var o,a=n(c["default"].values(this.scene.sources));!(t=(o=a.next()).done);t=!0){var s=o.value;if(s.tiled){var l=u["default"].key(e,s,this.scene.tile_zoom);if(l&&!this.hasTile(l)){var f=u["default"].create({source:s,coords:e,worker:this.scene.nextWorker(),style_zoom:this.scene.styleZoom(e.z)});this.keepTile(f),this.buildTile(f)}}}}catch(h){r=!0,i=h}finally{try{!t&&a["return"]&&a["return"]()}finally{if(r)throw i}}}},buildTiles:function(e){var t=this;u["default"].sort(e).forEach(function(e){return t.buildTile(e)}),this.checkBuildQueue()},buildTile:function(e){var t=this;this.tileBuildStart(e.key),this.updateVisibility(e),e.update(this.scene),e.build(this.scene.generation).then(function(e){return t.buildTileCompleted(e)})["catch"](function(){t.forgetTile(e.key),u["default"].abortBuild(e)})},buildTileCompleted:function(e){var t=e.tile;null==this.tiles[t.key]?(h["default"].trace("discarded tile "+t.key+" in TileManager.buildTileCompleted because previously removed"),u["default"].abortBuild(t),this.updateTilesForView()):t.generation!==this.scene.generation?(h["default"].debug("discarded tile "+t.key+" in TileManager.buildTileCompleted because built with "+("scene config gen "+t.generation+", current "+this.scene.generation)),this.forgetTile(t.key),u["default"].abortBuild(t),this.updateTilesForView()):(this.tiles[t.key]&&(t=this.tiles[t.key].merge(t)),this.updateVisibility(t),t.update(this.scene),t.buildMeshes(this.scene.styles),this.scene.requestRedraw()),this.tileBuildStop(t.key)},tileBuildStart:function(e){this.building_tiles=this.building_tiles||{},this.building_tiles[e]=!0,h["default"].trace("tileBuildStart for "+e+": "+i(this.building_tiles).length)},tileBuildStop:function(e){this.building_tiles&&(h["default"].trace("tileBuildStop for "+e+": "+i(this.building_tiles).length),delete this.building_tiles[e],this.checkBuildQueue())},checkBuildQueue:function(){this.building_tiles&&0!==i(this.building_tiles).length||(this.building_tiles=null,this.scene.tileManagerBuildDone())},getDebugSum:function(e,t){var r=0;for(var n in this.tiles)null==this.tiles[n].debug[e]||"function"==typeof t&&t(this.tiles[n])!==!0||(r+=this.tiles[n].debug[e]);return r},getDebugAverage:function(e,t){return this.getDebugSum(e,t)/i(this.tiles).length}},t.exports=r["default"]},{"./tile":235,"./utils/utils":241,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/keys":12,"babel-runtime/helpers/interop-require-default":23,loglevel:179}],237:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/get")["default"],i=e("babel-runtime/helpers/inherits")["default"],o=e("babel-runtime/helpers/class-call-check")["default"];Object.defineProperty(r,"__esModule",{value:!0});var a=function(e){function t(e){o(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.name="MethodNotImplemented",this.message="Method "+e+" must be implemented in subclass"}return i(t,e),t}(Error);r.MethodNotImplemented=a},{"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22}],238:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];for(var o=0;or;++r)t[0]=Math.min(this.quad[r][0],t[0]),t[1]=Math.min(this.quad[r][1],t[1]),t[2]=Math.max(this.quad[r][0],t[2]),t[3]=Math.max(this.quad[r][1],t[3]);return t}},{key:"perpAxes",value:function(){this.axes[0]=s["default"].normalize(s["default"].sub(this.quad[2],this.quad[3])),this.axes[1]=s["default"].normalize(s["default"].sub(this.quad[2],this.quad[1]))}},{key:"update",value:function(){var e=[Math.cos(this.angle),Math.sin(this.angle)],t=[-Math.sin(this.angle),Math.cos(this.angle)];e=s["default"].mult(e,this.dimension[0]/2),t=s["default"].mult(t,this.dimension[1]/2),this.quad[0]=s["default"].sub(s["default"].sub(this.centroid,e),t),this.quad[1]=s["default"].sub(s["default"].add(this.centroid,e),t),this.quad[2]=s["default"].add(s["default"].add(this.centroid,e),t),this.quad[3]=s["default"].add(s["default"].sub(this.centroid,e),t),this.perpAxes()}}],[{key:"projectToAxis",value:function(e,t){for(var r=1e6,n=r,i=-r,o=e.quad,a=0;4>a;++a){var u=s["default"].dot(o[a],t);n=Math.min(n,u),i=Math.max(i,u)}return[n,i]}},{key:"axisCollide",value:function(t,r,n){for(var i=0;2>i;++i){var o=e.projectToAxis(t,n[i]),a=e.projectToAxis(r,n[i]);if(a[0]>o[1]||a[1]1?o-1:0),u=1;o>u;u++)s[u-1]=arguments[u];for(var l,c=a(t);!(r=(l=c.next()).done);r=!0){var f=l.value;"function"==typeof f[e]&&f[e].apply(f,s)}}catch(h){n=!0,i=h}finally{try{!r&&c["return"]&&c["return"]()}finally{if(n)throw i}}}})}var i=e("babel-runtime/core-js/set")["default"],o=e("babel-runtime/core-js/object/assign")["default"],a=e("babel-runtime/core-js/get-iterator")["default"];Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=n,t.exports=r["default"]},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/set":15}],241:[function(_dereq_,module,exports){"use strict";var _Promise=_dereq_("babel-runtime/core-js/promise")["default"],_getIterator=_dereq_("babel-runtime/core-js/get-iterator")["default"],_Math$log2=_dereq_("babel-runtime/core-js/math/log2")["default"],_regeneratorRuntime=_dereq_("babel-runtime/regenerator")["default"],_Object$keys=_dereq_("babel-runtime/core-js/object/keys")["default"],_interopRequireDefault=_dereq_("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _loglevel=_dereq_("loglevel"),_loglevel2=_interopRequireDefault(_loglevel),_jsYaml=_dereq_("js-yaml"),_jsYaml2=_interopRequireDefault(_jsYaml),_geo=_dereq_("../geo"),_geo2=_interopRequireDefault(_geo),Utils;exports["default"]=Utils={},Utils.addBaseURL=function(e,t){if(e){if("//"===e.substr(0,2))e=window.location.protocol+e;else if(e.search(/^(http|https|data|blob):/)<0){var r,n="/"!==e[0];if(t?(r=document.createElement("a"),r.href=t):r=window.location,n){var i=r.href.match(/([^\#]+)/);i=i&&i.length>1?i[0]:"",e=i+e}else if(r.origin)e=r.origin+"/"+e;else{var o=e.match(/^((http|https|data|blob):\/\/[^\/]*\/)/);o=o&&o.length>1?o[0]:"",e=o+e}}return e}},Utils.pathForURL=function(e){return e&&-1===e.search(/^(data|blob):/)?e.substr(0,e.lastIndexOf("/")+1)||"./":"./"},Utils.cacheBusterForUrl=function(e){return e.search(/^(data|blob):/)>-1?e:e+=e.indexOf("?")>-1?"&"+ +new Date:"?"+ +new Date},Utils._createObjectURL=void 0,Utils.createObjectURL=function(e){return void 0===Utils._createObjectURL&&(Utils._createObjectURL=window.URL&&window.URL.createObjectURL||window.webkitURL&&window.webkitURL.createObjectURL,"function"!=typeof Utils._createObjectURL&&(Utils._createObjectURL=null,_loglevel2["default"].warn("window.URL.createObjectURL (or vendor prefix) not found, unable to create local blob URLs"))),Utils._createObjectURL?Utils._createObjectURL(e):e},Utils.io=function(e){var t=arguments.length<=1||void 0===arguments[1]?6e4:arguments[1],r=arguments.length<=2||void 0===arguments[2]?"text":arguments[2],n=arguments.length<=3||void 0===arguments[3]?"GET":arguments[3],i=(arguments.length<=4||void 0===arguments[4]?{}:arguments[4],new XMLHttpRequest),o=new _Promise(function(o,a){i.open(n,e,!0),i.timeout=t,i.responseType=r,i.onload=function(){200===i.status?o(["text","json"].indexOf(i.responseType)>-1?i.responseText:i.response):a(Error("Request error with a status of "+i.statusText))},i.onerror=function(e){a(Error("There was a network error"+e.toString()))},i.ontimeout=function(e){a(Error("timeout "+e.toString()))},i.send()});return Object.defineProperty(o,"request",{value:i}),o},Utils.parseResource=function(e){var t;try{t=_jsYaml2["default"].safeLoad(e)}catch(r){throw r}return t},Utils.loadResource=function(e){return new _Promise(function(t,r){"string"==typeof e?Utils.io(Utils.cacheBusterForUrl(e)).then(function(e){try{var n=Utils.parseResource(e);t(n)}catch(i){r(i)}},r):t(e)})},Utils.requestAnimationFramePolyfill=function(){"function"!=typeof window.requestAnimationFrame&&(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)})},Utils.serializeWithFunctions=function(e){var t=JSON.stringify(e,function(e,t){return"function"==typeof t?t.toString():t});return t},Utils.deserializeWithFunctions=function(e,t){var r=JSON.parse(e);return r=Utils.stringsToFunctions(r,t)},Utils.stringsToFunctions=function(e,t){if("string"==typeof e)e=Utils.stringToFunction(e,t);else if("object"==typeof e)for(var r in e)e[r]=Utils.stringsToFunctions(e[r],t);return e},Utils.stringToFunction=function(val,wrap){if(null!=val.match(/^\s*function\s*\w*\s*\([\s\S]*\)\s*\{[\s\S]*\}/m)){var f;try{return eval("function"==typeof wrap?"f = "+wrap(val):"f = "+val),f}catch(e){return val}}return val},Utils.log=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];e=e||"info",Utils.isWorkerThread?self.postMessage({type:"log",level:e,worker_id:self._worker_id,msg:r}):"function"==typeof _loglevel2["default"][e]&&_loglevel2["default"][e].apply(_loglevel2["default"],r)},Utils.use_high_density_display=!0,Utils.updateDevicePixelRatio=function(){var e=Utils.device_pixel_ratio;return Utils.device_pixel_ratio=Utils.use_high_density_display&&window.devicePixelRatio||1,Utils.device_pixel_ratio!==e},function(){try{void 0!==window.document&&(Utils.isWorkerThread=!1,Utils.isMainThread=!0,Utils.updateDevicePixelRatio())}catch(e){void 0!==self&&(Utils.isWorkerThread=!0,Utils.isMainThread=!1)}}(),Utils.findCurrentURL=function(){for(var e=document.currentScript,t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];if(e)return e.src;if(Array.isArray(r))for(var i=document.getElementsByTagName("script"),o=0;o-1)return i[o].src}}catch(h){s=!0,u=h}finally{try{!a&&c["return"]&&c["return"]()}finally{if(s)throw u}}}},Utils.isPowerOf2=function(e){return 0===(e&e-1)},Utils.nextPowerOf2=function(e){return Math.pow(2,Math.ceil(_Math$log2(e)))},Utils.interpolate=function(e,t,r){if(!Array.isArray(t)||!Array.isArray(t[0]))return t;if(t.length<1)return t;var n,i,o,a,s,u;if(e<=t[0][0])a=t[0][1],"function"==typeof r&&(a=r(a));else if(e>=t[t.length-1][0])a=t[t.length-1][1],"function"==typeof r&&(a=r(a));else for(var l=0;l=t[l][0]&&et&&Math.round(255*e)||e}).join(", ")+")"},Utils.pointInTile=function(e){return e[0]>=0&&e[1]>-_geo2["default"].tile_scale&&e[0]<_geo2["default"].tile_scale&&e[1]<=0},Utils.hashString=function(e){if(0===e.length)return 0;for(var t=0,r=0,n=e.length;n>r;r++){var i=e.charCodeAt(r);t=(t<<5)-t+i,t|=0}return t},Utils.debounce=function(e,t,r){var n=void 0;return function(){var i=this,o=arguments,a=function(){n=null,r||e.apply(i,o)},s=r&&!n;clearTimeout(n),n=setTimeout(a,t),s&&e.apply(i,o)}},module.exports=exports["default"]},{"../geo":193,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/math/log2":5,"babel-runtime/core-js/object/keys":12,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/regenerator":26,"js-yaml":148,loglevel:179}],242:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/define-properties")["default"]; +Object.defineProperty(r,"__esModule",{value:!0});var i;r["default"]=i=n({major:0,minor:5,patch:1,pre:!1},{string:{get:function(){return"v"+i.major+"."+i.minor+"."+i.patch},configurable:!0,enumerable:!0}}),t.exports=r["default"]},{"babel-runtime/core-js/object/define-properties":8}],243:[function(e,t,r){"use strict";function n(e){var t=[];"string"==typeof e&&(t=e.split("."),e=t.pop());for(var r=v,n=0;n2?r-2:0),i=2;r>i;i++)n[i-2]=arguments[i];if(Array.isArray(e))return l.all(e.map(function(e){var r;return(r=h).postMessage.apply(r,[e,t].concat(n))}));var o=new l(function(e,r){g[m]={method:t,message:n,resolve:e,reject:r}});return e.postMessage({type:"main_send",message_id:m,method:t,message:n}),m++,o};var e=0,t=new c;h.addWorker=function(r){t.set(r,e++),r.addEventListener("message",function(e){if("worker_reply"===e.data.type){var t=e.data.message_id;g[t]&&(e.data.error?g[t].reject(e.data.error):g[t].resolve(e.data.message),delete g[t])}}),r.addEventListener("message",function(e){var t=e.data.message_id;if("worker_send"===e.data.type&&null!=t){var i=n(e.data.method),o=u(i,2),c=o[0],f=o[1];if(!f)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because no object with that name is registered on main thread");var h="function"==typeof f[c]&&f[c];if(!h)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because object has no method with that name");var d,m;try{d=h.apply(f,e.data.message)}catch(g){m=g}var v=void 0;d instanceof l?d.then(function(e){v=a(e),r.postMessage({type:"main_reply",message_id:t,message:e},v.map(function(e){return e.object})),s(v),v.length>0&&p["default"].log("trace","'"+c+"' transferred "+v.length+" objects to worker thread")},function(e){r.postMessage({type:"main_reply",message_id:t,error:e instanceof Error?e.message+": "+e.stack:e})}):(v=a(d),r.postMessage({type:"main_reply",message_id:t,message:d,error:m instanceof Error?m.message+": "+m.stack:m},v.map(function(e){return e.object})),s(v),v.length>0&&p["default"].log("trace","'"+c+"' transferred "+v.length+" objects to worker thread"))}})},h.getMessages=function(){return g},h.getMessageId=function(){return m}}function o(){h.postMessage=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];var i=new l(function(t,n){g[m]={method:e,message:r,resolve:t,reject:n}});return self.postMessage({type:"worker_send",message_id:m,method:e,message:r}),m++,i},self.addEventListener("message",function(e){if("main_reply"===e.data.type){var t=e.data.message_id;g[t]&&(e.data.error?g[t].reject(e.data.error):g[t].resolve(e.data.message),delete g[t])}}),self.addEventListener("message",function(e){var t=e.data.message_id;if("main_send"===e.data.type&&null!=t){var r=n(e.data.method),i=u(r,2),o=i[0],c=i[1];if(!c)throw Error("Worker broker could not dispatch message type "+e.data.method+" on target "+e.data.target+" because no object with that name is registered on main thread");var f="function"==typeof c[o]&&c[o];if(!f)throw Error("Worker broker could not dispatch message type "+e.data.method+" because worker has no method with that name");var h,d;try{h=f.apply(c,e.data.message)}catch(m){d=m}var g=void 0;h instanceof l?h.then(function(e){g=a(e),self.postMessage({type:"worker_reply",message_id:t,message:e},g.map(function(e){return e.object})),s(g),g.length>0&&p["default"].log("trace","'"+o+"' transferred "+g.length+" objects to main thread")},function(e){self.postMessage({type:"worker_reply",message_id:t,error:e instanceof Error?e.message+": "+e.stack:e})}):(g=a(h),self.postMessage({type:"worker_reply",message_id:t,message:h,error:d instanceof Error?d.message+": "+d.stack:d},g.map(function(e){return e.object})),s(g),g.length>0&&p["default"].log("trace","'"+o+"' transferred "+g.length+" objects to main thread"))}})}function a(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(!e)return n;if(Array.isArray(e))e.forEach(function(t,r){return a(t,e,r,n)});else if("object"==typeof e)if(e instanceof ArrayBuffer)n.push({object:e,parent:t,property:r});else if(e.buffer instanceof ArrayBuffer)n.push({object:e.buffer,parent:t,property:r});else for(var i in e)a(e[i],e,i,n);return n}function s(e){Array.isArray(e)&&e.filter(function(e){return e.parent&&e.property}).forEach(function(e){return delete e.parent[e.property]})}var u=e("babel-runtime/helpers/sliced-to-array")["default"],l=e("babel-runtime/core-js/promise")["default"],c=e("babel-runtime/core-js/map")["default"],f=e("babel-runtime/helpers/interop-require-default")["default"];Object.defineProperty(r,"__esModule",{value:!0});var h,d=e("./utils"),p=f(d);r["default"]=h={};var m=0,g={},v={};h.addTarget=function(e,t){v[e]=t},p["default"].isMainThread&&i(),p["default"].isWorkerThread&&o(),t.exports=r["default"]},{"./utils":241,"babel-runtime/core-js/map":4,"babel-runtime/core-js/promise":14,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/sliced-to-array":24}],244:[function(e,t,r){"use strict";var n=e("babel-runtime/helpers/sliced-to-array")["default"];Object.defineProperty(r,"__esModule",{value:!0});var i;r["default"]=i={},i.set=function(e){for(var t=[],r=e.length,n=0;r>n;n++)t[n]=e[n];return t},i.neg=function(e){for(var t=[],r=e.length,n=0;r>n;n++)t[n]=-1*e[n];return t},i.add=function(e,t){for(var r=[],n=Math.min(e.length,t.length),i=0;n>i;i++)r[i]=e[i]+t[i];return r},i.sub=function(e,t){for(var r=[],n=Math.min(e.length,t.length),i=0;n>i;i++)r[i]=e[i]-t[i];return r},i.signed_area=function(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1])},i.mult=function(e,t){var r,n=[],i=e.length;if("number"==typeof t)for(r=0;i>r;r++)n[r]=e[r]*t;else for(i=Math.min(e.length,t.length),r=0;i>r;r++)n[r]=e[r]*t[r];return n},i.div=function(e,t){var r,n=[];if("number"==typeof t)for(r=0;rr;r++)n[r]=e[r]/t[r]}return n},i.perp=function(e,t){return[t[1]-e[1],e[0]-t[0]]},i.rot=function(e,t){var r=Math.cos(t),n=Math.sin(t);return[e[0]*r-e[1]*n,e[0]*n+e[1]*r]},i.angle=function(e){var t=n(e,2),r=t[0],i=t[1];return Math.atan2(i,r)},i.isEqual=function(e,t){for(var r=e.length,n=0;r>n;n++)if(e[n]!==t[n])return!1;return!0},i.lengthSq=function(e){return 2===e.length?e[0]*e[0]+e[1]*e[1]:e[0]*e[0]+e[1]*e[1]+e[2]*e[2]},i.length=function(e){return Math.sqrt(i.lengthSq(e))},i.normalize=function(e){var t;return 2===e.length?(t=e[0]*e[0]+e[1]*e[1],t=Math.sqrt(t),0!==t?[e[0]/t,e[1]/t]:[0,0]):(t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],t=Math.sqrt(t),0!==t?[e[0]/t,e[1]/t,e[2]/t]:[0,0,0])},i.cross=function(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]},i.dot=function(e,t){for(var r=0,n=Math.min(e.length,t.length),i=0;n>i;i++)r+=e[i]*t[i];return r},i.lineIntersection=function(e,t,r,n,i){i=i||.01;var o=e[1]-t[1],a=e[0]-t[0],s=r[1]-n[1],u=r[0]-n[0],l=e[0]*t[1]-e[1]*t[0],c=r[0]*n[1]-r[1]*n[0],f=a*s-o*u;return Math.abs(f)>i?[(l*u-a*c)/f,(l*s-o*c)/f]:null},t.exports=r["default"]},{"babel-runtime/helpers/sliced-to-array":24}]},{},[214]); \ No newline at end of file diff --git a/src/utils/version.js b/src/utils/version.js index ab1f5b93a..f384634de 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -3,6 +3,6 @@ export default version = { get string() { return `v${version.major}.${version.minor}.${version.patch}`; }, major: 0, minor: 5, - patch: 0, + patch: 1, pre: false };