astexplorer.app
Version:
https://astexplorer.net with ES Modules support and Hot Reloading
1 lines • 309 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[96],{"./node_modules/php-parser/dist/php-parser.js":function(module,exports,__webpack_require__){eval('/*!\n * \n * Package: php-parser\n * Parse PHP code from JS and returns its AST\n * Build: 6da88e7e7acbe4a154b4 - 3/27/2020\n * Copyright (C) 2020 Glayzzle (BSD-3-Clause)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com \n * \n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== \'undefined\' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: \'Module\' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, \'__esModule\', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === \'object\' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, \'default\', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != \'string\') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module[\'default\']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, \'a\', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = "";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 12);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Node = __webpack_require__(2);\n\nvar KIND = "statement";\n/**\n * Any statement.\n * @constructor Statement\n * @extends {Node}\n */\n\nmodule.exports = Node["extends"](KIND, function Statement(kind, docs, location) {\n Node.apply(this, [kind || KIND, docs, location]);\n});\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Node = __webpack_require__(2);\n\nvar KIND = "expression";\n/**\n * Any expression node. Since the left-hand side of an assignment may\n * be any expression in general, an expression can also be a pattern.\n * @constructor Expression\n * @extends {Node}\n */\n\nmodule.exports = Node["extends"](KIND, function Expression(kind, docs, location) {\n Node.apply(this, [kind || KIND, docs, location]);\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n/**\n * A generic AST node\n * @constructor Node\n * @property {Location|null} loc\n * @property {Comment[]} leadingComments\n * @property {Comment[]?} trailingComments\n * @property {String} kind\n */\n\nvar Node = function Node(kind, docs, location) {\n this.kind = kind;\n\n if (docs) {\n this.leadingComments = docs;\n }\n\n if (location) {\n this.loc = location;\n }\n};\n/**\n * Attach comments to current node\n * @param {*} docs\n */\n\n\nNode.prototype.setTrailingComments = function (docs) {\n this.trailingComments = docs;\n};\n/**\n * Destroying an unused node\n */\n\n\nNode.prototype.destroy = function (node) {\n if (!node) {\n throw new Error("Node already initialized, you must swap with another node");\n }\n\n if (this.leadingComments) {\n if (node.leadingComments) {\n node.leadingComments = Array.concat(this.leadingComments, node.leadingComments);\n } else {\n node.leadingComments = this.leadingComments;\n }\n }\n\n if (this.trailingComments) {\n if (node.trailingComments) {\n node.trailingComments = Array.concat(this.trailingComments, node.trailingComments);\n } else {\n node.trailingComments = this.trailingComments;\n }\n }\n\n return node;\n};\n/**\n * Includes current token position of the parser\n * @param {*} parser\n */\n\n\nNode.prototype.includeToken = function (parser) {\n if (this.loc) {\n if (this.loc.end) {\n this.loc.end.line = parser.lexer.yylloc.last_line;\n this.loc.end.column = parser.lexer.yylloc.last_column;\n this.loc.end.offset = parser.lexer.offset;\n }\n\n if (parser.ast.withSource) {\n this.loc.source = parser.lexer._input.substring(this.loc.start.offset, parser.lexer.offset);\n }\n }\n\n return this;\n};\n/**\n * Helper for extending the Node class\n * @param {String} type\n * @param {Function} constructor\n * @return {Function}\n */\n\n\nNode["extends"] = function (type, constructor) {\n constructor.prototype = Object.create(this.prototype);\n constructor["extends"] = this["extends"];\n constructor.prototype.constructor = constructor;\n constructor.kind = type;\n return constructor;\n};\n\nmodule.exports = Node;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Expression = __webpack_require__(1);\n\nvar KIND = "literal";\n/**\n * Defines an array structure\n * @constructor Literal\n * @extends {Expression}\n * @property {string} raw\n * @property {Node|string|number|boolean|null} value\n */\n\nmodule.exports = Expression["extends"](KIND, function Literal(kind, value, raw, docs, location) {\n Expression.apply(this, [kind || KIND, docs, location]);\n this.value = value;\n\n if (raw) {\n this.raw = raw;\n }\n});\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Expr = __webpack_require__(1);\n\nvar KIND = "operation";\n/**\n * Defines binary operations\n * @constructor Operation\n * @extends {Expression}\n */\n\nmodule.exports = Expr["extends"](KIND, function Operation(kind, docs, location) {\n Expr.apply(this, [kind || KIND, docs, location]);\n});\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Statement = __webpack_require__(0);\n\nvar KIND = "declaration";\nvar IS_UNDEFINED = "";\nvar IS_PUBLIC = "public";\nvar IS_PROTECTED = "protected";\nvar IS_PRIVATE = "private";\n/**\n * A declaration statement (function, class, interface...)\n * @constructor Declaration\n * @extends {Statement}\n * @property {Identifier|string} name\n */\n\nvar Declaration = Statement["extends"](KIND, function Declaration(kind, name, docs, location) {\n Statement.apply(this, [kind || KIND, docs, location]);\n this.name = name;\n});\n/**\n * Generic flags parser\n * @param {Integer[]} flags\n * @return {void}\n */\n\nDeclaration.prototype.parseFlags = function (flags) {\n this.isAbstract = flags[2] === 1;\n this.isFinal = flags[2] === 2;\n\n if (this.kind !== "class") {\n if (flags[0] === -1) {\n this.visibility = IS_UNDEFINED;\n } else if (flags[0] === null) {\n this.visibility = null;\n } else if (flags[0] === 0) {\n this.visibility = IS_PUBLIC;\n } else if (flags[0] === 1) {\n this.visibility = IS_PROTECTED;\n } else if (flags[0] === 2) {\n this.visibility = IS_PRIVATE;\n }\n\n this.isStatic = flags[1] === 1;\n }\n};\n\nmodule.exports = Declaration;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Node = __webpack_require__(2);\n\nvar KIND = "reference";\n/**\n * Defines a reference node\n * @constructor Reference\n * @extends {Node}\n */\n\nvar Reference = Node["extends"](KIND, function Reference(kind, docs, location) {\n Node.apply(this, [kind || KIND, docs, location]);\n});\nmodule.exports = Reference;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Statement = __webpack_require__(0);\n\nvar KIND = "block";\n/**\n * A block statement, i.e., a sequence of statements surrounded by braces.\n * @constructor Block\n * @extends {Statement}\n * @property {Node[]} children\n */\n\nmodule.exports = Statement["extends"](KIND, function Block(kind, children, docs, location) {\n Statement.apply(this, [kind || KIND, docs, location]);\n this.children = children.filter(Boolean);\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Expr = __webpack_require__(1);\n\nvar KIND = "lookup";\n/**\n * Lookup on an offset in the specified object\n * @constructor Lookup\n * @extends {Expression}\n * @property {Expression} what\n * @property {Expression} offset\n */\n\nmodule.exports = Expr["extends"](KIND, function Lookup(kind, what, offset, docs, location) {\n Expr.apply(this, [kind || KIND, docs, location]);\n this.what = what;\n this.offset = offset;\n});\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Node = __webpack_require__(2);\n/**\n * Abstract documentation node (ComentLine or CommentBlock)\n * @constructor Comment\n * @extends {Node}\n * @property {String} value\n */\n\n\nmodule.exports = Node["extends"]("comment", function Comment(kind, value, docs, location) {\n Node.apply(this, [kind, docs, location]);\n this.value = value;\n});\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Statement = __webpack_require__(0);\n\nvar KIND = "constantstatement";\n/**\n * Declares a constants into the current scope\n * @constructor ConstantStatement\n * @extends {Statement}\n * @property {Constant[]} constants\n */\n\nmodule.exports = Statement["extends"](KIND, function ConstantStatement(kind, constants, docs, location) {\n Statement.apply(this, [kind || KIND, docs, location]);\n this.constants = constants;\n});\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nvar Declaration = __webpack_require__(5);\n\nvar KIND = "function";\n/**\n * Defines a classic function\n * @constructor Function\n * @extends {Declaration}\n * @property {Parameter[]} arguments\n * @property {Identifier} type\n * @property {boolean} byref\n * @property {boolean} nullable\n * @property {Block|null} body\n */\n\nmodule.exports = Declaration["extends"](KIND, function _Function(name, args, byref, type, nullable, docs, location) {\n Declaration.apply(this, [KIND, name, docs, location]);\n this.arguments = args;\n this.byref = byref;\n this.type = type;\n this.nullable = nullable;\n this.body = null;\n});\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2020 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nvar lexer = __webpack_require__(13);\n\nvar parser = __webpack_require__(23);\n\nvar tokens = __webpack_require__(39);\n\nvar AST = __webpack_require__(40);\n/**\n * @private\n */\n\n\nfunction combine(src, to) {\n var keys = Object.keys(src);\n var i = keys.length;\n\n while (i--) {\n var k = keys[i];\n var val = src[k];\n\n if (val === null) {\n delete to[k];\n } else if (typeof val === "function") {\n to[k] = val.bind(to);\n } else if (Array.isArray(val)) {\n to[k] = Array.isArray(to[k]) ? to[k].concat(val) : val;\n } else if (_typeof(val) === "object") {\n to[k] = _typeof(to[k]) === "object" ? combine(val, to[k]) : val;\n } else {\n to[k] = val;\n }\n }\n\n return to;\n}\n/**\n * Initialise a new parser instance with the specified options\n *\n * @class\n * @tutorial Engine\n * @example\n * var parser = require(\'php-parser\');\n * var instance = new parser({\n * parser: {\n * extractDoc: true,\n * suppressErrors: true,\n * version: 704 // or \'7.4\'\n * },\n * ast: {\n * withPositions: true\n * },\n * lexer: {\n * short_tags: true,\n * asp_tags: true\n * }\n * });\n *\n * var evalAST = instance.parseEval(\'some php code\');\n * var codeAST = instance.parseCode(\'<?php some php code\', \'foo.php\');\n * var tokens = instance.tokenGetAll(\'<?php some php code\');\n *\n * @param {Object} options - List of options\n * @property {Lexer} lexer\n * @property {Parser} parser\n * @property {AST} ast\n * @property {Object} tokens\n */\n\n\nvar engine = function engine(options) {\n if (typeof this === "function") {\n return new this(options);\n }\n\n this.tokens = tokens;\n this.lexer = new lexer(this);\n this.ast = new AST();\n this.parser = new parser(this.lexer, this.ast);\n\n if (options && _typeof(options) === "object") {\n // disable php7 from lexer if already disabled from parser\n if (options.parser) {\n if (!options.lexer) {\n options.lexer = {};\n }\n\n if (options.parser.version) {\n if (typeof options.parser.version === "string") {\n var version = options.parser.version.split(".");\n version = parseInt(version[0]) * 100 + parseInt(version[1]);\n\n if (isNaN(version)) {\n throw new Error("Bad version number : " + options.parser.version);\n } else {\n options.parser.version = version;\n }\n } else if (typeof options.parser.version !== "number") {\n throw new Error("Expecting a number for version");\n }\n\n if (options.parser.version < 500 || options.parser.version > 704) {\n throw new Error("Can only handle versions between 5.x to 7.x");\n }\n }\n }\n\n combine(options, this); // same version flags based on parser options\n\n this.lexer.version = this.parser.version;\n }\n};\n/**\n * Check if the inpyt is a buffer or a string\n * @param {Buffer|String} buffer Input value that can be either a buffer or a string\n * @return {String} Returns the string from input\n */\n\n\nvar getStringBuffer = function getStringBuffer(buffer) {\n return typeof buffer.write === "function" ? buffer.toString() : buffer;\n};\n/**\n * Creates a new instance (Helper)\n * @param {Object} options\n * @return {Engine}\n * @private\n */\n\n\nengine.create = function (options) {\n return new engine(options);\n};\n/**\n * Evaluate the buffer\n * @private\n */\n\n\nengine.parseEval = function (buffer, options) {\n var self = new engine(options);\n return self.parseEval(buffer);\n};\n/**\n * Parse an evaluating mode string (no need to open php tags)\n * @param {String} buffer\n * @return {Program}\n */\n\n\nengine.prototype.parseEval = function (buffer) {\n this.lexer.mode_eval = true;\n this.lexer.all_tokens = false;\n buffer = getStringBuffer(buffer);\n return this.parser.parse(buffer, "eval");\n};\n/**\n * Static function that parse a php code with open/close tags\n * @private\n */\n\n\nengine.parseCode = function (buffer, filename, options) {\n if (_typeof(filename) === "object" && !options) {\n // retro-compatibility\n options = filename;\n filename = "unknown";\n }\n\n var self = new engine(options);\n return self.parseCode(buffer, filename);\n};\n/**\n * Function that parse a php code with open/close tags\n *\n * Sample code :\n * ```php\n * <?php $x = 1;\n * ```\n *\n * Usage :\n * ```js\n * var parser = require(\'php-parser\');\n * var phpParser = new parser({\n * // some options\n * });\n * var ast = phpParser.parseCode(\'...php code...\', \'foo.php\');\n * ```\n * @param {String} buffer - The code to be parsed\n * @param {String} filename - Filename\n * @return {Program}\n */\n\n\nengine.prototype.parseCode = function (buffer, filename) {\n this.lexer.mode_eval = false;\n this.lexer.all_tokens = false;\n buffer = getStringBuffer(buffer);\n return this.parser.parse(buffer, filename);\n};\n/**\n * Split the buffer into tokens\n * @private\n */\n\n\nengine.tokenGetAll = function (buffer, options) {\n var self = new engine(options);\n return self.tokenGetAll(buffer);\n};\n/**\n * Extract tokens from the specified buffer.\n * > Note that the output tokens are *STRICLY* similar to PHP function `token_get_all`\n * @param {String} buffer\n * @return {String[]} - Each item can be a string or an array with following informations [token_name, text, line_number]\n */\n\n\nengine.prototype.tokenGetAll = function (buffer) {\n this.lexer.mode_eval = false;\n this.lexer.all_tokens = true;\n buffer = getStringBuffer(buffer);\n var EOF = this.lexer.EOF;\n var names = this.tokens.values;\n this.lexer.setInput(buffer);\n var token = this.lexer.lex() || EOF;\n var result = [];\n\n while (token != EOF) {\n var entry = this.lexer.yytext;\n\n if (names.hasOwnProperty(token)) {\n entry = [names[token], entry, this.lexer.yylloc.first_line];\n }\n\n result.push(entry);\n token = this.lexer.lex() || EOF;\n }\n\n return result;\n}; // exports the function\n\n\nmodule.exports = engine; // makes libraries public\n\nmodule.exports.tokens = tokens;\nmodule.exports.lexer = lexer;\nmodule.exports.AST = AST;\nmodule.exports.parser = parser;\nmodule.exports.combine = combine; // allow the default export in index.d.ts\n\nmodule.exports["default"] = engine;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n/**\n * This is the php lexer. It will tokenize the string for helping the\n * parser to build the AST from its grammar.\n *\n * @class\n * @property {Integer} EOF\n * @property {Boolean} all_tokens defines if all tokens must be retrieved (used by token_get_all only)\n * @property {Boolean} comment_tokens extracts comments tokens\n * @property {Boolean} mode_eval enables the evald mode (ignore opening tags)\n * @property {Boolean} asp_tags disables by default asp tags mode\n * @property {Boolean} short_tags enables by default short tags mode\n * @property {Object} keywords List of php keyword\n * @property {Object} castKeywords List of php keywords for type casting\n */\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nvar lexer = function lexer(engine) {\n this.engine = engine;\n this.tok = this.engine.tokens.names;\n this.EOF = 1;\n this.debug = false;\n this.all_tokens = true;\n this.comment_tokens = false;\n this.mode_eval = false;\n this.asp_tags = false;\n this.short_tags = false;\n this.version = 704;\n this.yyprevcol = 0;\n this.keywords = {\n __class__: this.tok.T_CLASS_C,\n __trait__: this.tok.T_TRAIT_C,\n __function__: this.tok.T_FUNC_C,\n __method__: this.tok.T_METHOD_C,\n __line__: this.tok.T_LINE,\n __file__: this.tok.T_FILE,\n __dir__: this.tok.T_DIR,\n __namespace__: this.tok.T_NS_C,\n exit: this.tok.T_EXIT,\n die: this.tok.T_EXIT,\n "function": this.tok.T_FUNCTION,\n "const": this.tok.T_CONST,\n "return": this.tok.T_RETURN,\n "try": this.tok.T_TRY,\n "catch": this.tok.T_CATCH,\n "finally": this.tok.T_FINALLY,\n "throw": this.tok.T_THROW,\n "if": this.tok.T_IF,\n elseif: this.tok.T_ELSEIF,\n endif: this.tok.T_ENDIF,\n "else": this.tok.T_ELSE,\n "while": this.tok.T_WHILE,\n endwhile: this.tok.T_ENDWHILE,\n "do": this.tok.T_DO,\n "for": this.tok.T_FOR,\n endfor: this.tok.T_ENDFOR,\n foreach: this.tok.T_FOREACH,\n endforeach: this.tok.T_ENDFOREACH,\n declare: this.tok.T_DECLARE,\n enddeclare: this.tok.T_ENDDECLARE,\n "instanceof": this.tok.T_INSTANCEOF,\n as: this.tok.T_AS,\n "switch": this.tok.T_SWITCH,\n endswitch: this.tok.T_ENDSWITCH,\n "case": this.tok.T_CASE,\n "default": this.tok.T_DEFAULT,\n "break": this.tok.T_BREAK,\n "continue": this.tok.T_CONTINUE,\n "goto": this.tok.T_GOTO,\n echo: this.tok.T_ECHO,\n print: this.tok.T_PRINT,\n "class": this.tok.T_CLASS,\n "interface": this.tok.T_INTERFACE,\n trait: this.tok.T_TRAIT,\n "extends": this.tok.T_EXTENDS,\n "implements": this.tok.T_IMPLEMENTS,\n "new": this.tok.T_NEW,\n clone: this.tok.T_CLONE,\n "var": this.tok.T_VAR,\n eval: this.tok.T_EVAL,\n include: this.tok.T_INCLUDE,\n include_once: this.tok.T_INCLUDE_ONCE,\n require: this.tok.T_REQUIRE,\n require_once: this.tok.T_REQUIRE_ONCE,\n namespace: this.tok.T_NAMESPACE,\n use: this.tok.T_USE,\n insteadof: this.tok.T_INSTEADOF,\n global: this.tok.T_GLOBAL,\n isset: this.tok.T_ISSET,\n empty: this.tok.T_EMPTY,\n __halt_compiler: this.tok.T_HALT_COMPILER,\n "static": this.tok.T_STATIC,\n "abstract": this.tok.T_ABSTRACT,\n "final": this.tok.T_FINAL,\n "private": this.tok.T_PRIVATE,\n "protected": this.tok.T_PROTECTED,\n "public": this.tok.T_PUBLIC,\n unset: this.tok.T_UNSET,\n list: this.tok.T_LIST,\n array: this.tok.T_ARRAY,\n callable: this.tok.T_CALLABLE,\n or: this.tok.T_LOGICAL_OR,\n and: this.tok.T_LOGICAL_AND,\n xor: this.tok.T_LOGICAL_XOR\n };\n this.castKeywords = {\n "int": this.tok.T_INT_CAST,\n integer: this.tok.T_INT_CAST,\n real: this.tok.T_DOUBLE_CAST,\n "double": this.tok.T_DOUBLE_CAST,\n "float": this.tok.T_DOUBLE_CAST,\n string: this.tok.T_STRING_CAST,\n binary: this.tok.T_STRING_CAST,\n array: this.tok.T_ARRAY_CAST,\n object: this.tok.T_OBJECT_CAST,\n bool: this.tok.T_BOOL_CAST,\n "boolean": this.tok.T_BOOL_CAST,\n unset: this.tok.T_UNSET_CAST\n };\n};\n/**\n * Initialize the lexer with the specified input\n */\n\n\nlexer.prototype.setInput = function (input) {\n this._input = input;\n this.size = input.length;\n this.yylineno = 1;\n this.offset = 0;\n this.yyprevcol = 0;\n this.yytext = "";\n this.yylloc = {\n first_offset: 0,\n first_line: 1,\n first_column: 0,\n prev_offset: 0,\n prev_line: 1,\n prev_column: 0,\n last_line: 1,\n last_column: 0\n };\n this.tokens = [];\n\n if (this.version > 703) {\n this.keywords.fn = this.tok.T_FN;\n } else {\n delete this.keywords.fn;\n }\n\n this.done = this.offset >= this.size;\n\n if (!this.all_tokens && this.mode_eval) {\n this.conditionStack = ["INITIAL"];\n this.begin("ST_IN_SCRIPTING");\n } else {\n this.conditionStack = [];\n this.begin("INITIAL");\n } // https://github.com/php/php-src/blob/999e32b65a8a4bb59e27e538fa68ffae4b99d863/Zend/zend_language_scanner.h#L59\n // Used for heredoc and nowdoc\n\n\n this.heredoc_label = {\n label: "",\n length: 0,\n indentation: 0,\n indentation_uses_spaces: false,\n finished: false,\n\n /**\n * this used for parser to detemine the if current node segment is first encaps node.\n * if ture, the indentation will remove from the begining. and if false, the prev node\n * might be a variable \'}\' ,and the leading spaces should not be removed util meet the\n * first \\n\n */\n first_encaps_node: false,\n // for backward compatible\n toString: function toString() {\n this.label;\n }\n };\n return this;\n};\n/**\n * consumes and returns one char from the input\n */\n\n\nlexer.prototype.input = function () {\n var ch = this._input[this.offset];\n if (!ch) return "";\n this.yytext += ch;\n this.offset++;\n\n if (ch === "\\r" && this._input[this.offset] === "\\n") {\n this.yytext += "\\n";\n this.offset++;\n }\n\n if (ch === "\\n" || ch === "\\r") {\n this.yylloc.last_line = ++this.yylineno;\n this.yyprevcol = this.yylloc.last_column;\n this.yylloc.last_column = 0;\n } else {\n this.yylloc.last_column++;\n }\n\n return ch;\n};\n/**\n * revert eating specified size\n */\n\n\nlexer.prototype.unput = function (size) {\n if (size === 1) {\n // 1 char unput (most cases)\n this.offset--;\n\n if (this._input[this.offset] === "\\n" && this._input[this.offset - 1] === "\\r") {\n this.offset--;\n size++;\n }\n\n if (this._input[this.offset] === "\\r" || this._input[this.offset] === "\\n") {\n this.yylloc.last_line--;\n this.yylineno--;\n this.yylloc.last_column = this.yyprevcol;\n } else {\n this.yylloc.last_column--;\n }\n\n this.yytext = this.yytext.substring(0, this.yytext.length - size);\n } else if (size > 0) {\n this.offset -= size;\n\n if (size < this.yytext.length) {\n this.yytext = this.yytext.substring(0, this.yytext.length - size); // re-calculate position\n\n this.yylloc.last_line = this.yylloc.first_line;\n this.yylloc.last_column = this.yyprevcol = this.yylloc.first_column;\n\n for (var i = 0; i < this.yytext.length; i++) {\n var c = this.yytext[i];\n\n if (c === "\\r") {\n c = this.yytext[++i];\n this.yyprevcol = this.yylloc.last_column;\n this.yylloc.last_line++;\n this.yylloc.last_column = 0;\n\n if (c !== "\\n") {\n if (c === "\\r") {\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n }\n } else if (c === "\\n") {\n this.yyprevcol = this.yylloc.last_column;\n this.yylloc.last_line++;\n this.yylloc.last_column = 0;\n } else {\n this.yylloc.last_column++;\n }\n }\n\n this.yylineno = this.yylloc.last_line;\n } else {\n // reset full text\n this.yytext = "";\n this.yylloc.last_line = this.yylineno = this.yylloc.first_line;\n this.yylloc.last_column = this.yylloc.first_column;\n }\n }\n\n return this;\n}; // check if the text matches\n\n\nlexer.prototype.tryMatch = function (text) {\n return text === this.ahead(text.length);\n}; // check if the text matches\n\n\nlexer.prototype.tryMatchCaseless = function (text) {\n return text === this.ahead(text.length).toLowerCase();\n}; // look ahead\n\n\nlexer.prototype.ahead = function (size) {\n var text = this._input.substring(this.offset, this.offset + size);\n\n if (text[text.length - 1] === "\\r" && this._input[this.offset + size + 1] === "\\n") {\n text += "\\n";\n }\n\n return text;\n}; // consume the specified size\n\n\nlexer.prototype.consume = function (size) {\n for (var i = 0; i < size; i++) {\n var ch = this._input[this.offset];\n if (!ch) break;\n this.yytext += ch;\n this.offset++;\n\n if (ch === "\\r" && this._input[this.offset] === "\\n") {\n this.yytext += "\\n";\n this.offset++;\n i++;\n }\n\n if (ch === "\\n" || ch === "\\r") {\n this.yylloc.last_line = ++this.yylineno;\n this.yyprevcol = this.yylloc.last_column;\n this.yylloc.last_column = 0;\n } else {\n this.yylloc.last_column++;\n }\n }\n\n return this;\n};\n/**\n * Gets the current state\n */\n\n\nlexer.prototype.getState = function () {\n return {\n yytext: this.yytext,\n offset: this.offset,\n yylineno: this.yylineno,\n yyprevcol: this.yyprevcol,\n yylloc: {\n first_offset: this.yylloc.first_offset,\n first_line: this.yylloc.first_line,\n first_column: this.yylloc.first_column,\n last_line: this.yylloc.last_line,\n last_column: this.yylloc.last_column\n },\n heredoc_label: this.heredoc_label\n };\n};\n/**\n * Sets the current lexer state\n */\n\n\nlexer.prototype.setState = function (state) {\n this.yytext = state.yytext;\n this.offset = state.offset;\n this.yylineno = state.yylineno;\n this.yyprevcol = state.yyprevcol;\n this.yylloc = state.yylloc;\n\n if (state.heredoc_label) {\n this.heredoc_label = state.heredoc_label;\n }\n\n return this;\n}; // prepend next token\n\n\nlexer.prototype.appendToken = function (value, ahead) {\n this.tokens.push([value, ahead]);\n return this;\n}; // return next match that has a token\n\n\nlexer.prototype.lex = function () {\n this.yylloc.prev_offset = this.offset;\n this.yylloc.prev_line = this.yylloc.last_line;\n this.yylloc.prev_column = this.yylloc.last_column;\n var token = this.next() || this.lex();\n\n if (!this.all_tokens) {\n while (token === this.tok.T_WHITESPACE || // ignore white space\n !this.comment_tokens && (token === this.tok.T_COMMENT || // ignore single lines comments\n token === this.tok.T_DOC_COMMENT) || // ignore doc comments\n // ignore open tags\n token === this.tok.T_OPEN_TAG) {\n token = this.next() || this.lex();\n }\n\n if (token == this.tok.T_OPEN_TAG_WITH_ECHO) {\n // https://github.com/php/php-src/blob/7ff186434e82ee7be7c59d0db9a976641cf7b09c/Zend/zend_compile.c#L1683\n // open tag with echo statement\n return this.tok.T_ECHO;\n } else if (token === this.tok.T_CLOSE_TAG) {\n // https://github.com/php/php-src/blob/7ff186434e82ee7be7c59d0db9a976641cf7b09c/Zend/zend_compile.c#L1680\n return ";";\n /* implicit ; */\n }\n }\n\n if (!this.yylloc.prev_offset) {\n this.yylloc.prev_offset = this.yylloc.first_offset;\n this.yylloc.prev_line = this.yylloc.first_line;\n this.yylloc.prev_column = this.yylloc.first_column;\n }\n /*else if (this.yylloc.prev_offset === this.offset && this.offset !== this.size) {\n throw new Error(\'Infinite loop @ \' + this.offset + \' / \' + this.size);\n }*/\n\n\n return token;\n}; // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n\n\nlexer.prototype.begin = function (condition) {\n this.conditionStack.push(condition);\n this.curCondition = condition;\n this.stateCb = this["match" + condition];\n\n if (typeof this.stateCb !== "function") {\n throw new Error(\'Undefined condition state "\' + condition + \'"\');\n }\n\n return this;\n}; // pop the previously active lexer condition state off the condition stack\n\n\nlexer.prototype.popState = function () {\n var n = this.conditionStack.length - 1;\n var condition = n > 0 ? this.conditionStack.pop() : this.conditionStack[0];\n this.curCondition = this.conditionStack[this.conditionStack.length - 1];\n this.stateCb = this["match" + this.curCondition];\n\n if (typeof this.stateCb !== "function") {\n throw new Error(\'Undefined condition state "\' + this.curCondition + \'"\');\n }\n\n return condition;\n}; // return next match in input\n\n\nlexer.prototype.next = function () {\n var token;\n\n if (!this._input) {\n this.done = true;\n }\n\n this.yylloc.first_offset = this.offset;\n this.yylloc.first_line = this.yylloc.last_line;\n this.yylloc.first_column = this.yylloc.last_column;\n this.yytext = "";\n\n if (this.done) {\n this.yylloc.prev_offset = this.yylloc.first_offset;\n this.yylloc.prev_line = this.yylloc.first_line;\n this.yylloc.prev_column = this.yylloc.first_column;\n return this.EOF;\n }\n\n if (this.tokens.length > 0) {\n token = this.tokens.shift();\n\n if (_typeof(token[1]) === "object") {\n this.setState(token[1]);\n } else {\n this.consume(token[1]);\n }\n\n token = token[0];\n } else {\n token = this.stateCb.apply(this, []);\n }\n\n if (this.offset >= this.size && this.tokens.length === 0) {\n this.done = true;\n }\n\n if (this.debug) {\n var tName = token;\n\n if (typeof tName === "number") {\n tName = this.engine.tokens.values[tName];\n } else {\n tName = \'"\' + tName + \'"\';\n }\n\n var e = new Error(tName + "\\tfrom " + this.yylloc.first_line + "," + this.yylloc.first_column + "\\t - to " + this.yylloc.last_line + "," + this.yylloc.last_column + \'\\t"\' + this.yytext + \'"\'); // eslint-disable-next-line no-console\n\n console.error(e.stack);\n }\n\n return token;\n}; // extends the lexer with states\n\n\n[__webpack_require__(14), __webpack_require__(15), __webpack_require__(16), __webpack_require__(18), __webpack_require__(19), __webpack_require__(20), __webpack_require__(21), __webpack_require__(22)].forEach(function (ext) {\n for (var k in ext) {\n lexer.prototype[k] = ext[k];\n }\n});\nmodule.exports = lexer;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nmodule.exports = {\n /**\n * Reads a single line comment\n */\n T_COMMENT: function T_COMMENT() {\n while (this.offset < this.size) {\n var ch = this.input();\n\n if (ch === "\\n" || ch === "\\r") {\n return this.tok.T_COMMENT;\n } else if (ch === "?" && !this.aspTagMode && this._input[this.offset] === ">") {\n this.unput(1);\n return this.tok.T_COMMENT;\n } else if (ch === "%" && this.aspTagMode && this._input[this.offset] === ">") {\n this.unput(1);\n return this.tok.T_COMMENT;\n }\n }\n\n return this.tok.T_COMMENT;\n },\n\n /**\n * Behaviour : https://github.com/php/php-src/blob/master/Zend/zend_language_scanner.l#L1927\n */\n T_DOC_COMMENT: function T_DOC_COMMENT() {\n var ch = this.input();\n var token = this.tok.T_COMMENT;\n\n if (ch === "*") {\n // started with \'/*\' , check is next is \'*\'\n ch = this.input();\n\n if (this.is_WHITESPACE()) {\n // check if next is WHITESPACE\n token = this.tok.T_DOC_COMMENT;\n }\n\n if (ch === "/") {\n return token;\n } else {\n this.unput(1); // reset\n }\n }\n\n while (this.offset < this.size) {\n ch = this.input();\n\n if (ch === "*" && this._input[this.offset] === "/") {\n this.input();\n break;\n }\n }\n\n return token;\n }\n};\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n\nmodule.exports = {\n nextINITIAL: function nextINITIAL() {\n if (this.conditionStack.length > 1 && this.conditionStack[this.conditionStack.length - 1] === "INITIAL") {\n // Return to HEREDOC/ST_DOUBLE_QUOTES mode\n this.popState();\n } else {\n this.begin("ST_IN_SCRIPTING");\n }\n\n return this;\n },\n matchINITIAL: function matchINITIAL() {\n while (this.offset < this.size) {\n var ch = this.input();\n\n if (ch == "<") {\n ch = this.ahead(1);\n\n if (ch == "?") {\n if (this.tryMatch("?=")) {\n this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO, 3).nextINITIAL();\n break;\n } else if (this.tryMatchCaseless("?php")) {\n ch = this._input[this.offset + 4];\n\n if (ch === " " || ch === "\\t" || ch === "\\n" || ch === "\\r") {\n this.unput(1).appendToken(this.tok.T_OPEN_TAG, 6).nextINITIAL();\n break;\n }\n }\n\n if (this.short_tags) {\n this.unput(1).appendToken(this.tok.T_OPEN_TAG, 2).nextINITIAL();\n break;\n }\n } else if (this.asp_tags && ch == "%") {\n if (this.tryMatch("%=")) {\n this.aspTagMode = true;\n this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO, 3).nextINITIAL();\n break;\n } else {\n this.aspTagMode = true;\n this.unput(1).appendToken(this.tok.T_OPEN_TAG, 2).nextINITIAL();\n break;\n }\n }\n }\n }\n\n if (this.yytext.length > 0) {\n return this.tok.T_INLINE_HTML;\n } else {\n return false;\n }\n }\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n"use strict";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (C) 2018 Glayzzle (BSD3 License)\n * @authors https://github.com/glayzzle/php-parser/graphs/contributors\n * @url http://glayzzle.com\n */\n\n/* istanbul ignore else */\n\nvar MAX_LENGTH_OF_LONG = 10;\nvar long_min_digits = "2147483648";\n\nif (process.arch == "x64") {\n MAX_LENGTH_OF_LONG = 19;\n long_min_digits = "9223372036854775808";\n}\n\nmodule.exports = {\n consume_NUM: function consume_NUM() {\n var ch = this.yytext[0];\n var hasPoint = ch === ".";\n\n if (ch === "0") {\n ch = this.input(); // check if hexa\n\n if (ch === "x" || ch === "X") {\n ch = this.input();\n\n if (ch !== "_" && this.is_HEX()) {\n return this.consume_HNUM();\n } else {\n this.unput(ch ? 2 : 1);\n } // check binary notation\n\n } else if (ch === "b" || ch === "B") {\n ch = this.input();\n\n if (ch !== "_" && ch === "0" || ch === "1") {\n return this.consume_BNUM();\n } else {\n this.unput(ch ? 2 : 1);\n } // @fixme check octal notation ? not usefull\n\n } else if (!this.is_NUM()) {\n if (ch) this.unput(1);\n }\n }\n\n while (this.offset < this.size) {\n var prev = ch;\n ch = this.input();\n\n if (ch === "_") {\n if (prev === "_") {\n // restriction : next to underscore / 1__1;\n this.unput(2); // keep 1\n\n break;\n }\n\n if (prev === ".") {\n // next to decimal point "1._0"\n this.unput(1); // keep 1.\n\n break;\n }\n\n if (prev === "e" || prev === "E") {\n // next to e "1e_10"\n this.unput(2); // keep 1\n\n break;\n }\n } else if (ch === ".") {\n if (hasPoint) {\n // no multiple points "1.0.5"\n this.unput(1); // keep 1.0\n\n break;\n }\n\n if (prev === "_") {\n // next to decimal point "1_.0"\n this.unput(2); // keep 1\n\n break;\n }\n\n hasPoint = true;\n continue;\n } else if (ch === "e" || ch === "E") {\n if (prev === "_") {\n // next to e "1_e10"\n this.unput(1);\n break;\n }\n\n var undo = 2;\n ch = this.input();\n\n if (ch === "+" || ch === "-") {\n // 1e-5\n undo = 3;\n ch = this.input();\n }\n\n if (this.is_NUM_START()) {\n this.consume_LNUM();\n return this.tok.T_DNUMBER;\n }\n\n this.unput(ch ? undo : undo - 1); // keep only 1\n\n break;\n }\n\n if (!this.is_NUM()) {\n // example : 10.0a\n if (ch) this.unput(1); // keep 10.0\n\n break;\n }\n }\n\n if (hasPoint) {\n return this.tok.T_DNUMBER;\n } else if (this.yytext.length < MAX_LENGTH_OF_LONG - 1) {\n return this.tok.T_LNUMBER;\n } else {\n if (this.yytext.length < MAX_LENGTH_OF_LONG || this.yytext.length == MAX_LENGTH_OF_LONG && this.yytext < long_min_digits) {\n return this.tok.T_LNUMBER;\n }\n\n return this.tok.T_DNUMBER;\n }\n },\n // read hexa\n consume_HNUM: function consume_HNUM() {\n while (this.offset < this.size) {\n var ch = this.input();\n\n if (!this.is_HEX()) {\n if (ch) this.unput(1);\n break;\n }\n }\n\n return this.tok.T_LNUMBER;\n },\n // read a generic number\n consume_LNUM: function consume_LNUM() {\n while (this.offset < this.size) {\n var ch = this.input();\n\n if (!this.is_NUM()) {\n if (ch) this.unput(1);\n break;\n }\n }\n\n return this.tok.T_LNUMBER;\n },\n // read binary\n consume_BNUM: function consume_BNUM() {\n var ch;\n\n while (this.offset < this.size) {\n ch = this.input();\n\n if (ch !== "0" && ch !== "1" && ch !== "_") {\n if (ch) this.unput(1);\n break;\n }\n }\n\n return this.tok.T_LNUMBER;\n }\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don\'t break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn\'t define any globals. It\'s inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error(\'setTimeout has not been defined\');\n}\nfunction defaultClearTimeout () {\n throw new Error(\'clearTimeout has not been defined\');\n}\n(function () {\n try {\n if (typeof setTimeout === \'function\') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === \'function\') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn\'t available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn\'t trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it\'s a version of I.E. that must have the global object for \'this\', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn\'t available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn\'t trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it\'s a version of I.E. that must have the global object for \'this\', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = \'browser\';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = \'\'; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\npr