/* eslint-disable*/
module.exports = {
  name: "@yarnpkg/plugin-version",
  factory: function (require) {
                          var plugin =
  /******/ (function(modules) { // webpackBootstrap
  /******/ 	// The module cache
  /******/ 	var installedModules = {};
  /******/
  /******/ 	// The require function
  /******/ 	function __webpack_require__(moduleId) {
  /******/
  /******/ 		// Check if module is in cache
  /******/ 		if(installedModules[moduleId]) {
  /******/ 			return installedModules[moduleId].exports;
  /******/ 		}
  /******/ 		// Create a new module (and put it into the cache)
  /******/ 		var module = installedModules[moduleId] = {
  /******/ 			i: moduleId,
  /******/ 			l: false,
  /******/ 			exports: {}
  /******/ 		};
  /******/
  /******/ 		// Execute the module function
  /******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  /******/
  /******/ 		// Flag the module as loaded
  /******/ 		module.l = true;
  /******/
  /******/ 		// Return the exports of the module
  /******/ 		return module.exports;
  /******/ 	}
  /******/
  /******/
  /******/ 	// expose the modules object (__webpack_modules__)
  /******/ 	__webpack_require__.m = modules;
  /******/
  /******/ 	// expose the module cache
  /******/ 	__webpack_require__.c = installedModules;
  /******/
  /******/ 	// define getter function for harmony exports
  /******/ 	__webpack_require__.d = function(exports, name, getter) {
  /******/ 		if(!__webpack_require__.o(exports, name)) {
  /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
  /******/ 		}
  /******/ 	};
  /******/
  /******/ 	// define __esModule on exports
  /******/ 	__webpack_require__.r = function(exports) {
  /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  /******/ 		}
  /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
  /******/ 	};
  /******/
  /******/ 	// create a fake namespace object
  /******/ 	// mode & 1: value is a module id, require it
  /******/ 	// mode & 2: merge all properties of value into the ns
  /******/ 	// mode & 4: return value when already ns object
  /******/ 	// mode & 8|1: behave like require
  /******/ 	__webpack_require__.t = function(value, mode) {
  /******/ 		if(mode & 1) value = __webpack_require__(value);
  /******/ 		if(mode & 8) return value;
  /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  /******/ 		var ns = Object.create(null);
  /******/ 		__webpack_require__.r(ns);
  /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  /******/ 		return ns;
  /******/ 	};
  /******/
  /******/ 	// getDefaultExport function for compatibility with non-harmony modules
  /******/ 	__webpack_require__.n = function(module) {
  /******/ 		var getter = module && module.__esModule ?
  /******/ 			function getDefault() { return module['default']; } :
  /******/ 			function getModuleExports() { return module; };
  /******/ 		__webpack_require__.d(getter, 'a', getter);
  /******/ 		return getter;
  /******/ 	};
  /******/
  /******/ 	// Object.prototype.hasOwnProperty.call
  /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  /******/
  /******/ 	// __webpack_public_path__
  /******/ 	__webpack_require__.p = "";
  /******/
  /******/
  /******/ 	// Load entry module and return exports
  /******/ 	return __webpack_require__(__webpack_require__.s = 0);
  /******/ })
  /************************************************************************/
  /******/ ([
  /* 0 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __importDefault = this && this.__importDefault || function (mod) {
    return mod && mod.__esModule ? mod : {
      "default": mod
    };
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const core_1 = __webpack_require__(1);

  const apply_1 = __importDefault(__webpack_require__(2));

  const check_1 = __importDefault(__webpack_require__(9));

  const version_1 = __importDefault(__webpack_require__(99));

  const plugin = {
    configuration: {
      deferredVersionFolder: {
        description: `Folder where are stored the versioning files`,
        type: core_1.SettingsType.ABSOLUTE_PATH,
        default: `./.yarn/versions`
      },
      preferDeferredVersions: {
        description: `If true, running \`yarn version\` will assume the \`--deferred\` flag unless \`--immediate\` is set`,
        type: core_1.SettingsType.BOOLEAN,
        default: false
      }
    },
    commands: [apply_1.default, check_1.default, version_1.default]
  }; // eslint-disable-next-line arca/no-default-export

  exports.default = plugin;

  /***/ }),
  /* 1 */
  /***/ (function(module, exports) {

  module.exports = require("@yarnpkg/core");

  /***/ }),
  /* 2 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
    var c = arguments.length,
        r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
        d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
  };

  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const cli_1 = __webpack_require__(3);

  const core_1 = __webpack_require__(1);

  const core_2 = __webpack_require__(1);

  const clipanion_1 = __webpack_require__(4);

  const versionUtils = __importStar(__webpack_require__(5)); // eslint-disable-next-line arca/no-default-export


  class VersionApplyCommand extends cli_1.BaseCommand {
    constructor() {
      super(...arguments);
      this.all = false;
      this.json = false;
    }

    async execute() {
      const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
      const {
        project,
        workspace
      } = await core_2.Project.find(configuration, this.context.cwd);
      const cache = await core_1.Cache.find(configuration);
      if (!workspace) throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
      const applyReport = await core_2.StreamReport.start({
        configuration,
        json: this.json,
        stdout: this.context.stdout
      }, async report => {
        let releases = await versionUtils.resolveVersionFiles(project);

        if (!this.all) {
          const release = releases.get(workspace);
          if (typeof release === `undefined`) return;
          releases = new Map([[workspace, release]]);
        }

        await versionUtils.applyReleases(project, releases, {
          report
        });
        if (this.all) await versionUtils.clearVersionFiles(project);else await versionUtils.updateVersionFiles(project);
        await project.install({
          cache,
          report
        });
      });
      return applyReport.exitCode();
    }

  }

  VersionApplyCommand.usage = clipanion_1.Command.Usage({
    category: `Release-related commands`,
    description: `apply all the deferred version bumps at once`,
    details: `
        This command will apply the deferred version changes (scheduled via \`yarn version major|minor|patch\`) on the current workspace (or all of them if \`--all\`) is specified.

        It will also update the \`workspace:\` references across all your local workspaces so that they keep refering to the same workspace even after the version bump.

        If the \`--json\` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).
      `,
    examples: [[`Apply the version change to the local workspace`, `yarn version apply`], [`Apply the version change to all the workspaces in the local workspace`, `yarn version apply --all`]]
  });

  __decorate([clipanion_1.Command.Boolean(`--all`)], VersionApplyCommand.prototype, "all", void 0);

  __decorate([clipanion_1.Command.Boolean(`--json`)], VersionApplyCommand.prototype, "json", void 0);

  __decorate([clipanion_1.Command.Path(`version`, `apply`)], VersionApplyCommand.prototype, "execute", null);

  exports.default = VersionApplyCommand;

  /***/ }),
  /* 3 */
  /***/ (function(module, exports) {

  module.exports = require("@yarnpkg/cli");

  /***/ }),
  /* 4 */
  /***/ (function(module, exports) {

  module.exports = require("clipanion");

  /***/ }),
  /* 5 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __importDefault = this && this.__importDefault || function (mod) {
    return mod && mod.__esModule ? mod : {
      "default": mod
    };
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const core_1 = __webpack_require__(1);

  const fslib_1 = __webpack_require__(6);

  const parsers_1 = __webpack_require__(7);

  const clipanion_1 = __webpack_require__(4);

  const semver_1 = __importDefault(__webpack_require__(8)); // Basically we only support auto-upgrading the ranges that are very simple (^x.y.z, ~x.y.z, >=x.y.z, and of course x.y.z)


  const SUPPORTED_UPGRADE_REGEXP = /^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/;
  var Decision;

  (function (Decision) {
    Decision["UNDECIDED"] = "undecided";
    Decision["DECLINE"] = "decline";
    Decision["MAJOR"] = "major";
    Decision["MINOR"] = "minor";
    Decision["PATCH"] = "patch";
    Decision["PRERELEASE"] = "prerelease";
  })(Decision = exports.Decision || (exports.Decision = {}));

  ;

  async function fetchBase(root) {
    const candidateBases = [`master`, `origin/master`, `upstream/master`];
    const ancestorBases = [];

    for (const candidate of candidateBases) {
      const {
        code
      } = await core_1.execUtils.execvp(`git`, [`merge-base`, candidate, `HEAD`], {
        cwd: root
      });

      if (code === 0) {
        ancestorBases.push(candidate);
      }
    }

    if (ancestorBases.length === 0) throw new clipanion_1.UsageError(`No ancestor could be found between any of HEAD and ${candidateBases.join(`, `)}`);
    const {
      stdout: mergeBaseStdout
    } = await core_1.execUtils.execvp(`git`, [`merge-base`, `HEAD`, ...ancestorBases], {
      cwd: root,
      strict: true
    });
    const hash = mergeBaseStdout.trim();
    const {
      stdout: showStdout
    } = await core_1.execUtils.execvp(`git`, [`show`, `--quiet`, `--pretty=format:%s`, hash], {
      cwd: root,
      strict: true
    });
    const title = showStdout.trim();
    return {
      hash,
      title
    };
  }

  exports.fetchBase = fetchBase;

  async function fetchRoot(initialCwd) {
    // Note: We can't just use `git rev-parse --show-toplevel`, because on Windows
    // it may return long paths even when the cwd uses short paths, and we have no
    // way to detect it from Node (not even realpath).
    let match = null;
    let cwd;
    let nextCwd = initialCwd;

    do {
      cwd = nextCwd;
      if (await fslib_1.xfs.existsPromise(fslib_1.ppath.join(cwd, `.git`))) match = cwd;
      nextCwd = fslib_1.ppath.dirname(cwd);
    } while (match === null && nextCwd !== cwd);

    return match;
  }

  exports.fetchRoot = fetchRoot;

  async function fetchChangedFiles(root, {
    base
  }) {
    const {
      stdout: localStdout
    } = await core_1.execUtils.execvp(`git`, [`diff`, `--name-only`, `${base}`], {
      cwd: root,
      strict: true
    });
    const trackedFiles = localStdout.split(/\r\n|\r|\n/).filter(file => file.length > 0).map(file => fslib_1.ppath.resolve(root, fslib_1.npath.toPortablePath(file)));
    const {
      stdout: untrackedStdout
    } = await core_1.execUtils.execvp(`git`, [`ls-files`, `--others`, `--exclude-standard`], {
      cwd: root,
      strict: true
    });
    const untrackedFiles = untrackedStdout.split(/\r\n|\r|\n/).filter(file => file.length > 0).map(file => fslib_1.ppath.resolve(root, fslib_1.npath.toPortablePath(file)));
    return [...new Set([...trackedFiles, ...untrackedFiles].sort())];
  }

  exports.fetchChangedFiles = fetchChangedFiles;

  async function resolveVersionFiles(project) {
    const candidateReleases = new Map();
    const deferredVersionFolder = project.configuration.get(`deferredVersionFolder`);
    if (!fslib_1.xfs.existsSync(deferredVersionFolder)) return new Map();
    const deferredVersionFiles = await fslib_1.xfs.readdirPromise(deferredVersionFolder);

    for (const entry of deferredVersionFiles) {
      if (!entry.endsWith(`.yml`)) continue;
      const versionPath = fslib_1.ppath.join(deferredVersionFolder, entry);
      const versionContent = await fslib_1.xfs.readFilePromise(versionPath, `utf8`);
      const versionData = parsers_1.parseSyml(versionContent);

      for (const [identStr, decision] of Object.entries(versionData.releases || {})) {
        const ident = core_1.structUtils.parseIdent(identStr);
        const workspace = project.tryWorkspaceByIdent(ident);
        if (workspace === null) throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${fslib_1.ppath.basename(versionPath)} references ${identStr})`);
        if (workspace.manifest.version === null) throw new Error(`Assertion failed: Expected the workspace to have a version (${core_1.structUtils.prettyLocator(project.configuration, workspace.anchoredLocator)})`);
        const candidateRelease = candidateReleases.get(workspace);
        const suggestedRelease = applyStrategy(workspace.manifest.version, decision);
        if (suggestedRelease === null) throw new Error(`Assertion failed: Expected ${workspace.manifest.version} to support being bumped via strategy ${decision}`);
        const bestRelease = typeof candidateRelease !== `undefined` ? semver_1.default.gt(suggestedRelease, candidateRelease) ? suggestedRelease : candidateRelease : suggestedRelease;
        candidateReleases.set(workspace, bestRelease);
      }
    }

    return candidateReleases;
  }

  exports.resolveVersionFiles = resolveVersionFiles;

  async function clearVersionFiles(project) {
    const deferredVersionFolder = project.configuration.get(`deferredVersionFolder`);
    if (!fslib_1.xfs.existsSync(deferredVersionFolder)) return;
    await fslib_1.xfs.removePromise(deferredVersionFolder);
  }

  exports.clearVersionFiles = clearVersionFiles;

  async function updateVersionFiles(project) {
    const deferredVersionFolder = project.configuration.get(`deferredVersionFolder`);
    if (!fslib_1.xfs.existsSync(deferredVersionFolder)) return;
    const deferredVersionFiles = await fslib_1.xfs.readdirPromise(deferredVersionFolder);

    for (const entry of deferredVersionFiles) {
      if (!entry.endsWith(`.yml`)) continue;
      const versionPath = fslib_1.ppath.join(deferredVersionFolder, entry);
      const versionContent = await fslib_1.xfs.readFilePromise(versionPath, `utf8`);
      const versionData = parsers_1.parseSyml(versionContent);
      if (typeof versionData.releases === `undefined`) continue;

      for (const locatorStr of Object.keys(versionData.releases || {})) {
        const locator = core_1.structUtils.parseLocator(locatorStr);
        const workspace = project.tryWorkspaceByLocator(locator);

        if (workspace === null) {
          delete versionData.releases[locatorStr];
        }
      }

      await fslib_1.xfs.changeFilePromise(versionPath, parsers_1.stringifySyml(new parsers_1.stringifySyml.PreserveOrdering(versionData)));
    }
  }

  exports.updateVersionFiles = updateVersionFiles;

  async function openVersionFile(project, {
    allowEmpty = false
  } = {}) {
    const configuration = project.configuration;
    if (configuration.projectCwd === null) throw new clipanion_1.UsageError(`This command can only be run from within a Yarn project`);
    const root = await fetchRoot(configuration.projectCwd);
    const base = root !== null ? await fetchBase(root) : null;
    const changedFiles = root !== null ? await fetchChangedFiles(root, {
      base: base.hash
    }) : [];
    const deferredVersionFolder = configuration.get(`deferredVersionFolder`);
    const versionFiles = changedFiles.filter(p => fslib_1.ppath.contains(deferredVersionFolder, p) !== null);
    if (versionFiles.length > 1) throw new clipanion_1.UsageError(`Your current branch contains multiple versioning files; this isn't supported:\n- ${versionFiles.join(`\n- `)}`);
    const changedWorkspaces = new Set(changedFiles.map(file => project.getWorkspaceByFilePath(file)));
    if (versionFiles.length === 0 && changedWorkspaces.size === 0 && !allowEmpty) return null;
    const versionPath = versionFiles.length === 1 ? versionFiles[0] : fslib_1.ppath.join(deferredVersionFolder, `${core_1.hashUtils.makeHash(Math.random().toString()).slice(0, 8)}.yml`);
    const versionContent = fslib_1.xfs.existsSync(versionPath) ? await fslib_1.xfs.readFilePromise(versionPath, `utf8`) : `{}`;
    const versionData = parsers_1.parseSyml(versionContent);
    const releaseStore = new Map();

    for (const identStr of versionData.declined || []) {
      const ident = core_1.structUtils.parseIdent(identStr);
      const workspace = project.getWorkspaceByIdent(ident);
      releaseStore.set(workspace, Decision.DECLINE);
    }

    for (const [identStr, decision] of Object.entries(versionData.releases || {})) {
      const ident = core_1.structUtils.parseIdent(identStr);
      const workspace = project.getWorkspaceByIdent(ident);
      releaseStore.set(workspace, decision);
    }

    return {
      project,
      root,
      baseHash: base !== null ? base.hash : null,
      baseTitle: base !== null ? base.title : null,
      changedFiles: new Set(changedFiles),
      changedWorkspaces,
      releaseRoots: new Set([...changedWorkspaces].filter(workspace => workspace.manifest.version !== null)),
      releases: releaseStore,

      async saveAll() {
        const releases = {};
        const declined = [];
        const undecided = [];

        for (const workspace of project.workspaces) {
          // Let's assume that packages without versions don't need to see their version increased
          if (workspace.manifest.version === null) continue;
          const identStr = core_1.structUtils.stringifyIdent(workspace.locator);
          const decision = releaseStore.get(workspace);

          if (decision === Decision.DECLINE) {
            declined.push(identStr);
          } else if (typeof decision !== `undefined`) {
            releases[identStr] = decision;
          } else if (changedWorkspaces.has(workspace)) {
            undecided.push(identStr);
          }
        }

        await fslib_1.xfs.mkdirpPromise(fslib_1.ppath.dirname(versionPath));
        await fslib_1.xfs.changeFilePromise(versionPath, parsers_1.stringifySyml(new parsers_1.stringifySyml.PreserveOrdering({
          releases: Object.keys(releases).length > 0 ? releases : undefined,
          declined: declined.length > 0 ? declined : undefined,
          undecided: undecided.length > 0 ? undecided : undefined
        })));
      }

    };
  }

  exports.openVersionFile = openVersionFile;

  function requireMoreDecisions(versionFile) {
    if (getUndecidedWorkspaces(versionFile).size > 0) return true;
    if (getUndecidedDependentWorkspaces(versionFile).length > 0) return true;
    return false;
  }

  exports.requireMoreDecisions = requireMoreDecisions;

  function getUndecidedWorkspaces(versionFile) {
    const undecided = new Set();

    for (const workspace of versionFile.changedWorkspaces) {
      // Let's assume that packages without versions don't need to see their version increased
      if (workspace.manifest.version === null) continue;
      if (versionFile.releases.has(workspace)) continue;
      undecided.add(workspace);
    }

    return undecided;
  }

  exports.getUndecidedWorkspaces = getUndecidedWorkspaces;

  function getUndecidedDependentWorkspaces(versionFile, {
    include = new Set()
  } = {}) {
    const undecided = [];
    const bumpedWorkspaces = new Map(core_1.miscUtils.mapAndFilter([...versionFile.releases], ([workspace, decision]) => {
      if (decision === Decision.DECLINE) return core_1.miscUtils.mapAndFilter.skip;
      return [workspace.anchoredLocator.locatorHash, workspace];
    }));
    const declinedWorkspaces = new Map(core_1.miscUtils.mapAndFilter([...versionFile.releases], ([workspace, decision]) => {
      if (decision !== Decision.DECLINE) return core_1.miscUtils.mapAndFilter.skip;
      return [workspace.anchoredLocator.locatorHash, workspace];
    })); // Then we check which workspaces depend on packages that will be released again but have no release strategies themselves

    for (const workspace of versionFile.project.workspaces) {
      // We allow to overrule the following check because the interactive mode wants to keep displaying the previously-undecided packages even after they have been decided
      if (!include.has(workspace)) {
        // We don't need to run the check for packages that have already been decided
        if (declinedWorkspaces.has(workspace.anchoredLocator.locatorHash)) continue;

        if (bumpedWorkspaces.has(workspace.anchoredLocator.locatorHash)) {
          continue;
        }
      } // Let's assume that packages without versions don't need to see their version increased


      if (workspace.manifest.version === null) continue;

      for (const dependencyType of core_1.Manifest.hardDependencies) {
        for (const descriptor of workspace.manifest.getForScope(dependencyType).values()) {
          const matchingWorkspace = versionFile.project.tryWorkspaceByDescriptor(descriptor);
          if (matchingWorkspace === null) continue; // We only care about workspaces, and we only care about workspaces that will be bumped

          if (bumpedWorkspaces.has(matchingWorkspace.anchoredLocator.locatorHash)) {
            // Quick note: we don't want to check whether the workspace pointer
            // by `resolution` is private, because while it doesn't makes sense
            // to bump a private package because its dependencies changed, the
            // opposite isn't true: a (public) package might need to be bumped
            // because one of its dev dependencies is a (private) package whose
            // behavior sensibly changed.
            undecided.push([workspace, matchingWorkspace]);
          }
        }
      }
    }

    return undecided;
  }

  exports.getUndecidedDependentWorkspaces = getUndecidedDependentWorkspaces;

  function suggestStrategy(from, to) {
    const cleaned = semver_1.default.clean(to);

    for (const strategy of Object.values(Decision)) if (strategy !== Decision.UNDECIDED && strategy !== Decision.DECLINE) if (semver_1.default.inc(from, strategy) === cleaned) return strategy;

    return null;
  }

  exports.suggestStrategy = suggestStrategy;

  function applyStrategy(version, strategy) {
    if (semver_1.default.valid(strategy)) return strategy;
    if (version === null) throw new clipanion_1.UsageError(`Cannot apply the release strategy "${strategy}" unless the workspace already has a valid version`);
    if (!semver_1.default.valid(version)) throw new clipanion_1.UsageError(`Cannot apply the release strategy "${strategy}" on a non-semver version (${version})`);
    const nextVersion = semver_1.default.inc(version, strategy);
    if (nextVersion === null) throw new clipanion_1.UsageError(`Cannot apply the release strategy "${strategy}" on the specified version (${version})`);
    return nextVersion;
  }

  exports.applyStrategy = applyStrategy;

  function applyReleases(project, newVersions, {
    report
  }) {
    const allDependents = new Map(); // First we compute the reverse map to figure out which workspace is
    // depended upon by which other.
    //
    // Note that we need to do this before applying the new versions,
    // otherwise the `findWorkspacesByDescriptor` calls won't be able to
    // resolve the workspaces anymore (because the workspace versions will
    // have changed and won't match the outdated dependencies).

    for (const dependent of project.workspaces) {
      for (const set of core_1.Manifest.allDependencies) {
        for (const descriptor of dependent.manifest[set].values()) {
          const workspace = project.tryWorkspaceByDescriptor(descriptor);
          if (workspace === null) continue; // We only care about workspaces that depend on a workspace that will
          // receive a fresh update

          if (!newVersions.has(workspace)) continue;
          const dependents = core_1.miscUtils.getArrayWithDefault(allDependents, workspace);
          dependents.push([dependent, set, descriptor.identHash]);
        }
      }
    } // Now that we know which workspaces depend on which others, we can
    // proceed to update everything at once using our accumulated knowledge.


    for (const [workspace, newVersion] of newVersions) {
      const oldVersion = workspace.manifest.version;
      workspace.manifest.version = newVersion;
      const identString = workspace.manifest.name !== null ? core_1.structUtils.stringifyIdent(workspace.manifest.name) : null;
      report.reportInfo(core_1.MessageName.UNNAMED, `${core_1.structUtils.prettyLocator(project.configuration, workspace.anchoredLocator)}: Bumped to ${newVersion}`);
      report.reportJson({
        cwd: workspace.cwd,
        ident: identString,
        oldVersion,
        newVersion
      });
      const dependents = allDependents.get(workspace);
      if (typeof dependents === `undefined`) continue;

      for (const [dependent, set, identHash] of dependents) {
        const descriptor = dependent.manifest[set].get(identHash);
        if (typeof descriptor === `undefined`) throw new Error(`Assertion failed: The dependency should have existed`);
        let range = descriptor.range;
        let useWorkspaceProtocol = false;

        if (range.startsWith(core_1.WorkspaceResolver.protocol)) {
          range = range.slice(core_1.WorkspaceResolver.protocol.length);
          useWorkspaceProtocol = true; // Workspaces referenced through their path never get upgraded ("workspace:packages/yarnpkg-core")

          if (range === workspace.relativeCwd) {
            continue;
          }
        } // We can only auto-upgrade the basic semver ranges (we can't auto-upgrade ">=1.0.0 <2.0.0", for example)


        const parsed = range.match(SUPPORTED_UPGRADE_REGEXP);

        if (!parsed) {
          report.reportWarning(core_1.MessageName.UNNAMED, `Couldn't auto-upgrade range ${range} (in ${core_1.structUtils.prettyLocator(project.configuration, workspace.anchoredLocator)})`);
          continue;
        }

        let newRange = `${parsed[1]}${newVersion}`;
        if (useWorkspaceProtocol) newRange = `${core_1.WorkspaceResolver.protocol}${newRange}`;
        const newDescriptor = core_1.structUtils.makeDescriptor(descriptor, newRange);
        dependent.manifest[set].set(identHash, newDescriptor);
      }
    }
  }

  exports.applyReleases = applyReleases;

  /***/ }),
  /* 6 */
  /***/ (function(module, exports) {

  module.exports = require("@yarnpkg/fslib");

  /***/ }),
  /* 7 */
  /***/ (function(module, exports) {

  module.exports = require("@yarnpkg/parsers");

  /***/ }),
  /* 8 */
  /***/ (function(module, exports) {

  module.exports = require("semver");

  /***/ }),
  /* 9 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
    var c = arguments.length,
        r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
        d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
  };

  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  var __importDefault = this && this.__importDefault || function (mod) {
    return mod && mod.__esModule ? mod : {
      "default": mod
    };
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const cli_1 = __webpack_require__(3);

  const core_1 = __webpack_require__(1);

  const fslib_1 = __webpack_require__(6);

  const ScrollableItems_1 = __webpack_require__(10);

  const useFocusRequest_1 = __webpack_require__(95);

  const useListInput_1 = __webpack_require__(96);

  const renderForm_1 = __webpack_require__(97);

  const clipanion_1 = __webpack_require__(4);

  const ink_1 = __webpack_require__(11);

  const react_1 = __importStar(__webpack_require__(14));

  const semver_1 = __importDefault(__webpack_require__(8));

  const versionUtils = __importStar(__webpack_require__(5)); // eslint-disable-next-line arca/no-default-export


  class VersionApplyCommand extends clipanion_1.Command {
    async execute() {
      if (this.interactive) {
        return await this.executeInteractive();
      } else {
        return await this.executeStandard();
      }
    }

    async executeInteractive() {
      const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
      const {
        project,
        workspace
      } = await core_1.Project.find(configuration, this.context.cwd);
      if (!workspace) throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
      await project.restoreInstallState();
      const versionFile = await versionUtils.openVersionFile(project);
      if (versionFile === null || versionFile.releaseRoots.size === 0) return;
      if (versionFile.root === null) throw new clipanion_1.UsageError(`This command can only be run on Git repositories`);

      const Undecided = ({
        workspace,
        active,
        decision,
        setDecision
      }) => {
        const currentVersion = workspace.manifest.version;
        if (currentVersion === null) throw new Error(`Assertion failed: The version should have been set (${core_1.structUtils.prettyLocator(configuration, workspace.anchoredLocator)})`);
        const strategies = semver_1.default.prerelease(currentVersion) === null ? [versionUtils.Decision.UNDECIDED, versionUtils.Decision.DECLINE, versionUtils.Decision.PATCH, versionUtils.Decision.MINOR, versionUtils.Decision.MAJOR, versionUtils.Decision.PRERELEASE] : [versionUtils.Decision.UNDECIDED, versionUtils.Decision.DECLINE, versionUtils.Decision.PRERELEASE, versionUtils.Decision.MAJOR];
        useListInput_1.useListInput(decision, strategies, {
          active: active,
          minus: `left`,
          plus: `right`,
          set: setDecision
        });
        const nextVersion = decision === versionUtils.Decision.UNDECIDED ? react_1.default.createElement(ink_1.Color, {
          yellow: true
        }, currentVersion) : decision === versionUtils.Decision.DECLINE ? react_1.default.createElement(ink_1.Color, {
          green: true
        }, currentVersion) : react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement(ink_1.Color, {
          magenta: true
        }, currentVersion), " \u2192 ", react_1.default.createElement(ink_1.Color, {
          green: true
        }, semver_1.default.inc(currentVersion, decision)));
        return react_1.default.createElement(ink_1.Box, {
          flexDirection: `column`
        }, react_1.default.createElement(ink_1.Box, null, core_1.structUtils.prettyLocator(configuration, workspace.anchoredLocator), " - ", nextVersion), react_1.default.createElement(ink_1.Box, null, strategies.map(strategy => {
          if (strategy === decision) {
            return react_1.default.createElement(ink_1.Box, {
              key: strategy,
              paddingLeft: 2
            }, react_1.default.createElement(ink_1.Color, {
              green: true
            }, "\u25FC"), " ", strategy);
          } else {
            return react_1.default.createElement(ink_1.Box, {
              key: strategy,
              paddingLeft: 2
            }, react_1.default.createElement(ink_1.Color, {
              yellow: true
            }, "\u25FB"), " ", strategy);
          }
        })));
      };

      const getRelevancy = releases => {
        // Now, starting from all the workspaces that changed, we'll detect
        // which ones are affected by the choices that the user picked. By
        // doing this we'll "forget" all choices that aren't relevant any
        // longer (for example, imagine that the user decided to re-release
        // something, then its dependents, but then decided to not release
        // the original package anymore; then the dependents don't need to
        // released anymore)
        const relevantWorkspaces = new Set(versionFile.releaseRoots);
        const relevantReleases = new Map([...releases].filter(([workspace]) => {
          return relevantWorkspaces.has(workspace);
        }));

        while (true) {
          const undecidedDependentWorkspaces = versionUtils.getUndecidedDependentWorkspaces({
            project: versionFile.project,
            releases: relevantReleases
          });
          let hasNewDependents = false;

          if (undecidedDependentWorkspaces.length > 0) {
            for (const [workspace] of undecidedDependentWorkspaces) {
              if (!relevantWorkspaces.has(workspace)) {
                relevantWorkspaces.add(workspace);
                hasNewDependents = true;
                const release = releases.get(workspace);

                if (typeof release !== `undefined`) {
                  relevantReleases.set(workspace, release);
                }
              }
            }
          }

          if (!hasNewDependents) {
            break;
          }
        }

        return {
          relevantWorkspaces,
          relevantReleases
        };
      };

      const useReleases = () => {
        const [releases, setReleases] = react_1.useState(versionFile.releases);
        const setWorkspaceRelease = react_1.useCallback((workspace, decision) => {
          const copy = new Map(releases);
          if (decision !== versionUtils.Decision.UNDECIDED) copy.set(workspace, decision);else copy.delete(workspace);
          const {
            relevantReleases
          } = getRelevancy(copy);
          setReleases(relevantReleases);
        }, [releases, setReleases]);
        return [releases, setWorkspaceRelease];
      };

      const Stats = ({
        workspaces,
        releases
      }) => {
        const parts = [];
        parts.push(`${workspaces.size} total`);
        let releaseCount = 0;
        let remainingCount = 0;

        for (const workspace of workspaces) {
          const release = releases.get(workspace);

          if (typeof release === `undefined`) {
            remainingCount += 1;
          } else if (release !== versionUtils.Decision.DECLINE) {
            releaseCount += 1;
          }
        }

        parts.push(`${releaseCount} release${releaseCount === 1 ? `` : `s`}`);
        parts.push(`${remainingCount} remaining`);
        return react_1.default.createElement(ink_1.Color, {
          yellow: true
        }, parts.join(`, `));
      };

      const App = ({
        useSubmit
      }) => {
        const [releases, setWorkspaceRelease] = useReleases();
        useSubmit(releases);
        const {
          relevantWorkspaces
        } = getRelevancy(releases);
        const dependentWorkspaces = new Set([...relevantWorkspaces].filter(workspace => {
          return !versionFile.releaseRoots.has(workspace);
        }));
        const [focus, setFocus] = react_1.useState(0);
        const handleFocusRequest = react_1.useCallback(request => {
          switch (request) {
            case useFocusRequest_1.FocusRequest.BEFORE:
              {
                setFocus(focus - 1);
              }
              break;

            case useFocusRequest_1.FocusRequest.AFTER:
              {
                setFocus(focus + 1);
              }
              break;
          }
        }, [focus, setFocus]);
        return react_1.default.createElement(ink_1.Box, {
          width: 80,
          flexDirection: `column`
        }, react_1.default.createElement(ink_1.Box, {
          textWrap: `wrap`
        }, "The following files have been modified in your local checkout."), react_1.default.createElement(ink_1.Box, {
          flexDirection: `column`,
          marginTop: 1,
          paddingLeft: 2
        }, [...versionFile.changedFiles].map(file => react_1.default.createElement(ink_1.Box, {
          key: file
        }, react_1.default.createElement(ink_1.Color, {
          grey: true
        }, versionFile.root), "/", fslib_1.ppath.relative(versionFile.root, file)))), versionFile.releaseRoots.size > 0 && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement(ink_1.Box, {
          marginTop: 1,
          textWrap: `wrap`
        }, "Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):"), dependentWorkspaces.size > 3 ? react_1.default.createElement(ink_1.Box, {
          marginTop: 1
        }, react_1.default.createElement(Stats, {
          workspaces: versionFile.releaseRoots,
          releases: releases
        })) : null, react_1.default.createElement(ink_1.Box, {
          marginTop: 1,
          flexDirection: `column`
        }, react_1.default.createElement(ScrollableItems_1.ScrollableItems, {
          active: focus % 2 === 0,
          radius: 1,
          size: 2,
          onFocusRequest: handleFocusRequest
        }, [...versionFile.releaseRoots].map(workspace => {
          return react_1.default.createElement(Undecided, {
            key: workspace.cwd,
            workspace: workspace,
            decision: releases.get(workspace) || versionUtils.Decision.UNDECIDED,
            setDecision: decision => setWorkspaceRelease(workspace, decision)
          });
        })))), dependentWorkspaces.size > 0 && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement(ink_1.Box, {
          marginTop: 1,
          textWrap: `wrap`
        }, "The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:"), dependentWorkspaces.size > 5 ? react_1.default.createElement(ink_1.Box, {
          marginTop: 1
        }, react_1.default.createElement(Stats, {
          workspaces: dependentWorkspaces,
          releases: releases
        })) : null, react_1.default.createElement(ink_1.Box, {
          marginTop: 1,
          flexDirection: `column`
        }, react_1.default.createElement(ScrollableItems_1.ScrollableItems, {
          active: focus % 2 === 1,
          radius: 2,
          size: 2,
          onFocusRequest: handleFocusRequest
        }, [...dependentWorkspaces].map(workspace => {
          return react_1.default.createElement(Undecided, {
            key: workspace.cwd,
            workspace: workspace,
            decision: releases.get(workspace) || versionUtils.Decision.UNDECIDED,
            setDecision: decision => setWorkspaceRelease(workspace, decision)
          });
        })))));
      };

      const decisions = await renderForm_1.renderForm(App, {
        versionFile
      });
      if (typeof decisions === `undefined`) return 1;
      versionFile.releases.clear();

      for (const [workspace, decision] of decisions) versionFile.releases.set(workspace, decision);

      await versionFile.saveAll();
    }

    async executeStandard() {
      const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
      const {
        project,
        workspace
      } = await core_1.Project.find(configuration, this.context.cwd);
      if (!workspace) throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
      await project.restoreInstallState();
      const report = await core_1.StreamReport.start({
        configuration,
        stdout: this.context.stdout
      }, async report => {
        const versionFile = await versionUtils.openVersionFile(project);
        if (versionFile === null || versionFile.releaseRoots.size === 0) return;
        if (versionFile.root === null) throw new clipanion_1.UsageError(`This command can only be run on Git repositories`);
        report.reportInfo(core_1.MessageName.UNNAMED, `Your PR was started right after ${configuration.format(versionFile.baseHash.slice(0, 7), `yellow`)} ${configuration.format(versionFile.baseTitle, `magenta`)}`);

        if (versionFile.changedFiles.size > 0) {
          report.reportInfo(core_1.MessageName.UNNAMED, `You have changed the following files since then:`);
          report.reportSeparator();

          for (const file of versionFile.changedFiles) {
            report.reportInfo(null, `${configuration.format(versionFile.root, `gray`)}/${fslib_1.ppath.relative(versionFile.root, file)}`);
          }
        }

        let hasDiffErrors = false;
        let hasDepsErrors = false;
        const undecided = versionUtils.getUndecidedWorkspaces(versionFile);

        if (undecided.size > 0) {
          if (!hasDiffErrors) report.reportSeparator();

          for (const workspace of undecided) report.reportError(core_1.MessageName.UNNAMED, `${core_1.structUtils.prettyLocator(configuration, workspace.anchoredLocator)} has been modified but doesn't have a release strategy attached`);

          hasDiffErrors = true;
        }

        const undecidedDependents = versionUtils.getUndecidedDependentWorkspaces(versionFile); // Then we check which workspaces depend on packages that will be released again but have no release strategies themselves

        for (const [workspace, dependency] of undecidedDependents) {
          if (!hasDepsErrors) report.reportSeparator();
          report.reportError(core_1.MessageName.UNNAMED, `${core_1.structUtils.prettyLocator(configuration, workspace.anchoredLocator)} doesn't have a release strategy attached, but depends on ${core_1.structUtils.prettyWorkspace(configuration, dependency)} which is planned for release.`);
          hasDepsErrors = true;
        }

        if (hasDiffErrors || hasDepsErrors) {
          report.reportSeparator();
          report.reportInfo(core_1.MessageName.UNNAMED, `This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed).`);
          report.reportInfo(core_1.MessageName.UNNAMED, `To correct these errors, run \`yarn version check --interactive\` then follow the instructions.`);
        }
      });
      return report.exitCode();
    }

  }

  VersionApplyCommand.usage = clipanion_1.Command.Usage({
    category: `Release-related commands`,
    description: `check that all the relevant packages have been bumped`,
    details: `
        **Warning:** This command currently requires Git.

        This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.

        In the case of a bump, the check will also cover transitive packages - meaning that should \`Foo\` be bumped, a package \`Bar\` depending on \`Foo\` will require a decision as to whether \`Bar\` will need to be bumped. This check doesn't cross packages that have declined to bump.

        In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against \`master\`.
      `,
    examples: [[`Check whether the modified packages need a bump`, `yarn version check`]]
  });

  __decorate([clipanion_1.Command.Boolean(`-i,--interactive`)], VersionApplyCommand.prototype, "interactive", void 0);

  __decorate([clipanion_1.Command.Path(`version`, `check`)], VersionApplyCommand.prototype, "execute", null);

  exports.default = VersionApplyCommand;

  /***/ }),
  /* 10 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const ink_1 = __webpack_require__(11);

  const react_1 = __importStar(__webpack_require__(14));

  const useFocusRequest_1 = __webpack_require__(95);

  const useListInput_1 = __webpack_require__(96);

  exports.ScrollableItems = ({
    active = true,
    children = [],
    radius = 10,
    size = 1,
    onFocusRequest
  }) => {
    const getKey = child => {
      if (child.key === null) {
        throw new Error(`Expected all children to have a key`);
      } else {
        return child.key;
      }
    };

    const keys = react_1.default.Children.map(children, child => getKey(child));
    const initialKey = keys[0];
    const [activeKey, setActiveKey] = react_1.useState(initialKey);
    const activeIndex = keys.indexOf(activeKey);
    useFocusRequest_1.useFocusRequest({
      active,
      handler: onFocusRequest
    });
    useListInput_1.useListInput(activeKey, keys, {
      active,
      minus: `up`,
      plus: `down`,
      set: setActiveKey
    });
    let min = activeIndex - radius;
    let max = activeIndex + radius;

    if (max > keys.length) {
      min -= max - keys.length;
      max = keys.length;
    }

    if (min < 0) {
      max += -min;
      min = 0;
    }

    if (max >= keys.length) max = keys.length - 1;
    const rendered = [];

    for (let t = min; t <= max; ++t) {
      const key = keys[t];
      const activeItem = active && key === activeKey;
      rendered.push(react_1.default.createElement(ink_1.Box, {
        key: key,
        height: size
      }, react_1.default.createElement(ink_1.Box, {
        marginLeft: 2,
        marginRight: 2
      }, activeItem ? react_1.default.createElement(ink_1.Color, {
        cyan: true
      }, "\u25B6") : ` `), react_1.default.createElement(ink_1.Box, null, react_1.default.cloneElement(children[t], {
        active: activeItem
      }))));
    }

    return react_1.default.createElement(ink_1.Box, {
      flexDirection: `column`,
      width: `100%`,
      height: radius * size * 2 + size
    }, rendered);
  };

  /***/ }),
  /* 11 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  Object.defineProperty(exports, "render", {
    enumerable: true,
    get: function () {
      return _render.default;
    }
  });
  Object.defineProperty(exports, "Box", {
    enumerable: true,
    get: function () {
      return _Box.default;
    }
  });
  Object.defineProperty(exports, "Text", {
    enumerable: true,
    get: function () {
      return _Text.default;
    }
  });
  Object.defineProperty(exports, "Color", {
    enumerable: true,
    get: function () {
      return _Color.default;
    }
  });
  Object.defineProperty(exports, "AppContext", {
    enumerable: true,
    get: function () {
      return _AppContext.default;
    }
  });
  Object.defineProperty(exports, "StdinContext", {
    enumerable: true,
    get: function () {
      return _StdinContext.default;
    }
  });
  Object.defineProperty(exports, "StdoutContext", {
    enumerable: true,
    get: function () {
      return _StdoutContext.default;
    }
  });
  Object.defineProperty(exports, "Static", {
    enumerable: true,
    get: function () {
      return _Static.default;
    }
  });

  var _render = _interopRequireDefault(__webpack_require__(12));

  var _Box = _interopRequireDefault(__webpack_require__(84));

  var _Text = _interopRequireDefault(__webpack_require__(85));

  var _Color = _interopRequireDefault(__webpack_require__(92));

  var _AppContext = _interopRequireDefault(__webpack_require__(81));

  var _StdinContext = _interopRequireDefault(__webpack_require__(82));

  var _StdoutContext = _interopRequireDefault(__webpack_require__(83));

  var _Static = _interopRequireDefault(__webpack_require__(94));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  /***/ }),
  /* 12 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _instance = _interopRequireDefault(__webpack_require__(13));

  var _instances = _interopRequireDefault(__webpack_require__(76));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  var _default = (node, options = {}) => {
    // Stream was passed instead of `options` object
    if (typeof options.write === 'function') {
      options = {
        stdout: options,
        stdin: process.stdin
      };
    }

    options = _objectSpread({
      stdout: process.stdout,
      stdin: process.stdin,
      debug: false,
      exitOnCtrlC: true
    }, options);
    let instance;

    if (_instances.default.has(options.stdout)) {
      instance = _instances.default.get(options.stdout);
    } else {
      instance = new _instance.default(options);

      _instances.default.set(options.stdout, instance);
    }

    instance.render(node);
    return {
      rerender: instance.render,
      unmount: () => instance.unmount(),
      waitUntilExit: instance.waitUntilExit,
      cleanup: () => _instances.default.delete(options.stdout)
    };
  };

  exports.default = _default;

  /***/ }),
  /* 13 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  var _lodash = _interopRequireDefault(__webpack_require__(19));

  var _autoBind = _interopRequireDefault(__webpack_require__(20));

  var _logUpdate = _interopRequireDefault(__webpack_require__(21));

  var _isCi = _interopRequireDefault(__webpack_require__(43));

  var _signalExit = _interopRequireDefault(__webpack_require__(27));

  var _reconciler = _interopRequireDefault(__webpack_require__(46));

  var _renderer = _interopRequireDefault(__webpack_require__(56));

  var _dom = __webpack_require__(55);

  var _instances = _interopRequireDefault(__webpack_require__(76));

  var _App = _interopRequireDefault(__webpack_require__(77));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  class Instance {
    constructor(options) {
      (0, _autoBind.default)(this);
      this.options = options;
      this.rootNode = (0, _dom.createNode)('root');
      this.rootNode.onRender = this.onRender;
      this.renderer = (0, _renderer.default)({
        terminalWidth: options.stdout.columns
      });
      this.log = _logUpdate.default.create(options.stdout);
      this.throttledLog = options.debug ? this.log : (0, _lodash.default)(this.log, {
        leading: true,
        trailing: true
      }); // Ignore last render after unmounting a tree to prevent empty output before exit

      this.isUnmounted = false; // Store last output to only rerender when needed

      this.lastOutput = ''; // This variable is used only in debug mode to store full static output
      // so that it's rerendered every time, not just new static parts, like in non-debug mode

      this.fullStaticOutput = '';
      this.container = _reconciler.default.createContainer(this.rootNode, false, false);
      this.exitPromise = new Promise((resolve, reject) => {
        this.resolveExitPromise = resolve;
        this.rejectExitPromise = reject;
      }); // Unmount when process exits

      this.unsubscribeExit = (0, _signalExit.default)(this.unmount, {
        alwaysLast: false
      });
    }

    onRender() {
      if (this.isUnmounted) {
        return;
      }

      const {
        output,
        staticOutput
      } = this.renderer(this.rootNode); // If <Static> output isn't empty, it means new children have been added to it

      const hasStaticOutput = staticOutput && staticOutput !== '\n';

      if (this.options.debug) {
        if (hasStaticOutput) {
          this.fullStaticOutput += staticOutput;
        }

        this.options.stdout.write(this.fullStaticOutput + output);
        return;
      } // To ensure static output is cleanly rendered before main output, clear main output first


      if (hasStaticOutput) {
        if (!_isCi.default) {
          this.log.clear();
        }

        this.options.stdout.write(staticOutput);

        if (!_isCi.default) {
          this.log(output);
        }
      }

      if (output !== this.lastOutput) {
        if (!_isCi.default) {
          this.throttledLog(output);
        }

        this.lastOutput = output;
      }
    }

    render(node) {
      const tree = _react.default.createElement(_App.default, {
        stdin: this.options.stdin,
        stdout: this.options.stdout,
        exitOnCtrlC: this.options.exitOnCtrlC,
        onExit: this.unmount
      }, node);

      _reconciler.default.updateContainer(tree, this.container);
    }

    unmount(error) {
      if (this.isUnmounted) {
        return;
      }

      this.onRender();
      this.unsubscribeExit(); // CIs don't handle erasing ansi escapes well, so it's better to
      // only render last frame of non-static output

      if (_isCi.default) {
        this.options.stdout.write(this.lastOutput + '\n');
      } else if (!this.options.debug) {
        this.log.done();
      }

      this.isUnmounted = true;

      _reconciler.default.updateContainer(null, this.container);

      _instances.default.delete(this.options.stdout);

      if (error instanceof Error) {
        this.rejectExitPromise(error);
      } else {
        this.resolveExitPromise();
      }
    }

    waitUntilExit() {
      return this.exitPromise;
    }

  }

  exports.default = Instance;

  /***/ }),
  /* 14 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  if (false) {} else {
    module.exports = __webpack_require__(15);
  }


  /***/ }),
  /* 15 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /** @license React v16.8.4
   * react.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */





  if (true) {
    (function() {
  'use strict';

  var _assign = __webpack_require__(16);
  var checkPropTypes = __webpack_require__(17);

  // TODO: this is special because it gets imported during build.

  var ReactVersion = '16.8.4';

  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  // nor polyfill, then a plain number is used for performance.
  var hasSymbol = typeof Symbol === 'function' && Symbol.for;

  var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;

  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;

  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator';

  function getIteratorFn(maybeIterable) {
    if (maybeIterable === null || typeof maybeIterable !== 'object') {
      return null;
    }
    var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
    if (typeof maybeIterator === 'function') {
      return maybeIterator;
    }
    return null;
  }

  /**
   * Use invariant() to assert state which your program assumes to be true.
   *
   * Provide sprintf-style format (only %s is supported) and arguments
   * to provide information about what broke and what you were
   * expecting.
   *
   * The invariant message will be stripped in production, but the invariant
   * will remain to ensure logic does not differ in production.
   */

  var validateFormat = function () {};

  {
    validateFormat = function (format) {
      if (format === undefined) {
        throw new Error('invariant requires an error message argument');
      }
    };
  }

  function invariant(condition, format, a, b, c, d, e, f) {
    validateFormat(format);

    if (!condition) {
      var error = void 0;
      if (format === undefined) {
        error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
      } else {
        var args = [a, b, c, d, e, f];
        var argIndex = 0;
        error = new Error(format.replace(/%s/g, function () {
          return args[argIndex++];
        }));
        error.name = 'Invariant Violation';
      }

      error.framesToPop = 1; // we don't care about invariant's own frame
      throw error;
    }
  }

  // Relying on the `invariant()` implementation lets us
  // preserve the format and params in the www builds.

  /**
   * Forked from fbjs/warning:
   * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
   *
   * Only change is we use console.warn instead of console.error,
   * and do nothing when 'console' is not supported.
   * This really simplifies the code.
   * ---
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var lowPriorityWarning = function () {};

  {
    var printWarning = function (format) {
      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }

      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      if (typeof console !== 'undefined') {
        console.warn(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };

    lowPriorityWarning = function (condition, format) {
      if (format === undefined) {
        throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
      }
      if (!condition) {
        for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
          args[_key2 - 2] = arguments[_key2];
        }

        printWarning.apply(undefined, [format].concat(args));
      }
    };
  }

  var lowPriorityWarning$1 = lowPriorityWarning;

  /**
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var warningWithoutStack = function () {};

  {
    warningWithoutStack = function (condition, format) {
      for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        args[_key - 2] = arguments[_key];
      }

      if (format === undefined) {
        throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
      }
      if (args.length > 8) {
        // Check before the condition to catch violations early.
        throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
      }
      if (condition) {
        return;
      }
      if (typeof console !== 'undefined') {
        var argsWithFormat = args.map(function (item) {
          return '' + item;
        });
        argsWithFormat.unshift('Warning: ' + format);

        // We intentionally don't use spread (or .apply) directly because it
        // breaks IE9: https://github.com/facebook/react/issues/13610
        Function.prototype.apply.call(console.error, console, argsWithFormat);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        var argIndex = 0;
        var message = 'Warning: ' + format.replace(/%s/g, function () {
          return args[argIndex++];
        });
        throw new Error(message);
      } catch (x) {}
    };
  }

  var warningWithoutStack$1 = warningWithoutStack;

  var didWarnStateUpdateForUnmountedComponent = {};

  function warnNoop(publicInstance, callerName) {
    {
      var _constructor = publicInstance.constructor;
      var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
      var warningKey = componentName + '.' + callerName;
      if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
        return;
      }
      warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
      didWarnStateUpdateForUnmountedComponent[warningKey] = true;
    }
  }

  /**
   * This is the abstract API for an update queue.
   */
  var ReactNoopUpdateQueue = {
    /**
     * Checks whether or not this composite component is mounted.
     * @param {ReactClass} publicInstance The instance we want to test.
     * @return {boolean} True if mounted, false otherwise.
     * @protected
     * @final
     */
    isMounted: function (publicInstance) {
      return false;
    },

    /**
     * Forces an update. This should only be invoked when it is known with
     * certainty that we are **not** in a DOM transaction.
     *
     * You may want to call this when you know that some deeper aspect of the
     * component's state has changed but `setState` was not called.
     *
     * This will not invoke `shouldComponentUpdate`, but it will invoke
     * `componentWillUpdate` and `componentDidUpdate`.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {?function} callback Called after component is updated.
     * @param {?string} callerName name of the calling function in the public API.
     * @internal
     */
    enqueueForceUpdate: function (publicInstance, callback, callerName) {
      warnNoop(publicInstance, 'forceUpdate');
    },

    /**
     * Replaces all of the state. Always use this or `setState` to mutate state.
     * You should treat `this.state` as immutable.
     *
     * There is no guarantee that `this.state` will be immediately updated, so
     * accessing `this.state` after calling this method may return the old value.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {object} completeState Next state.
     * @param {?function} callback Called after component is updated.
     * @param {?string} callerName name of the calling function in the public API.
     * @internal
     */
    enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
      warnNoop(publicInstance, 'replaceState');
    },

    /**
     * Sets a subset of the state. This only exists because _pendingState is
     * internal. This provides a merging strategy that is not available to deep
     * properties which is confusing. TODO: Expose pendingState or don't use it
     * during the merge.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {object} partialState Next partial state to be merged with state.
     * @param {?function} callback Called after component is updated.
     * @param {?string} Name of the calling function in the public API.
     * @internal
     */
    enqueueSetState: function (publicInstance, partialState, callback, callerName) {
      warnNoop(publicInstance, 'setState');
    }
  };

  var emptyObject = {};
  {
    Object.freeze(emptyObject);
  }

  /**
   * Base class helpers for the updating state of a component.
   */
  function Component(props, context, updater) {
    this.props = props;
    this.context = context;
    // If a component has string refs, we will assign a different object later.
    this.refs = emptyObject;
    // We initialize the default updater but the real one gets injected by the
    // renderer.
    this.updater = updater || ReactNoopUpdateQueue;
  }

  Component.prototype.isReactComponent = {};

  /**
   * Sets a subset of the state. Always use this to mutate
   * state. You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * There is no guarantee that calls to `setState` will run synchronously,
   * as they may eventually be batched together.  You can provide an optional
   * callback that will be executed when the call to setState is actually
   * completed.
   *
   * When a function is provided to setState, it will be called at some point in
   * the future (not synchronously). It will be called with the up to date
   * component arguments (state, props, context). These values can be different
   * from this.* because your function may be called after receiveProps but before
   * shouldComponentUpdate, and this new state, props, and context will not yet be
   * assigned to this.
   *
   * @param {object|function} partialState Next partial state or function to
   *        produce next partial state to be merged with current state.
   * @param {?function} callback Called after state is updated.
   * @final
   * @protected
   */
  Component.prototype.setState = function (partialState, callback) {
    !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
    this.updater.enqueueSetState(this, partialState, callback, 'setState');
  };

  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {?function} callback Called after update is complete.
   * @final
   * @protected
   */
  Component.prototype.forceUpdate = function (callback) {
    this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
  };

  /**
   * Deprecated APIs. These APIs used to exist on classic React classes but since
   * we would like to deprecate them, we're not going to move them over to this
   * modern base class. Instead, we define a getter that warns if it's accessed.
   */
  {
    var deprecatedAPIs = {
      isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
      replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
    };
    var defineDeprecationWarning = function (methodName, info) {
      Object.defineProperty(Component.prototype, methodName, {
        get: function () {
          lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
          return undefined;
        }
      });
    };
    for (var fnName in deprecatedAPIs) {
      if (deprecatedAPIs.hasOwnProperty(fnName)) {
        defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
      }
    }
  }

  function ComponentDummy() {}
  ComponentDummy.prototype = Component.prototype;

  /**
   * Convenience component with default shallow equality check for sCU.
   */
  function PureComponent(props, context, updater) {
    this.props = props;
    this.context = context;
    // If a component has string refs, we will assign a different object later.
    this.refs = emptyObject;
    this.updater = updater || ReactNoopUpdateQueue;
  }

  var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
  pureComponentPrototype.constructor = PureComponent;
  // Avoid an extra prototype jump for these methods.
  _assign(pureComponentPrototype, Component.prototype);
  pureComponentPrototype.isPureReactComponent = true;

  // an immutable object with a single mutable value
  function createRef() {
    var refObject = {
      current: null
    };
    {
      Object.seal(refObject);
    }
    return refObject;
  }

  /**
   * Keeps track of the current dispatcher.
   */
  var ReactCurrentDispatcher = {
    /**
     * @internal
     * @type {ReactComponent}
     */
    current: null
  };

  /**
   * Keeps track of the current owner.
   *
   * The current owner is the component who should own any components that are
   * currently being constructed.
   */
  var ReactCurrentOwner = {
    /**
     * @internal
     * @type {ReactComponent}
     */
    current: null
  };

  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;

  var describeComponentFrame = function (name, source, ownerName) {
    var sourceInfo = '';
    if (source) {
      var path = source.fileName;
      var fileName = path.replace(BEFORE_SLASH_RE, '');
      {
        // In DEV, include code for a common special case:
        // prefer "folder/index.js" instead of just "index.js".
        if (/^index\./.test(fileName)) {
          var match = path.match(BEFORE_SLASH_RE);
          if (match) {
            var pathBeforeSlash = match[1];
            if (pathBeforeSlash) {
              var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
              fileName = folderName + '/' + fileName;
            }
          }
        }
      }
      sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
    } else if (ownerName) {
      sourceInfo = ' (created by ' + ownerName + ')';
    }
    return '\n    in ' + (name || 'Unknown') + sourceInfo;
  };

  var Resolved = 1;


  function refineResolvedLazyComponent(lazyComponent) {
    return lazyComponent._status === Resolved ? lazyComponent._result : null;
  }

  function getWrappedName(outerType, innerType, wrapperName) {
    var functionName = innerType.displayName || innerType.name || '';
    return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
  }

  function getComponentName(type) {
    if (type == null) {
      // Host root, text node or just invalid type.
      return null;
    }
    {
      if (typeof type.tag === 'number') {
        warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
      }
    }
    if (typeof type === 'function') {
      return type.displayName || type.name || null;
    }
    if (typeof type === 'string') {
      return type;
    }
    switch (type) {
      case REACT_CONCURRENT_MODE_TYPE:
        return 'ConcurrentMode';
      case REACT_FRAGMENT_TYPE:
        return 'Fragment';
      case REACT_PORTAL_TYPE:
        return 'Portal';
      case REACT_PROFILER_TYPE:
        return 'Profiler';
      case REACT_STRICT_MODE_TYPE:
        return 'StrictMode';
      case REACT_SUSPENSE_TYPE:
        return 'Suspense';
    }
    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_CONTEXT_TYPE:
          return 'Context.Consumer';
        case REACT_PROVIDER_TYPE:
          return 'Context.Provider';
        case REACT_FORWARD_REF_TYPE:
          return getWrappedName(type, type.render, 'ForwardRef');
        case REACT_MEMO_TYPE:
          return getComponentName(type.type);
        case REACT_LAZY_TYPE:
          {
            var thenable = type;
            var resolvedThenable = refineResolvedLazyComponent(thenable);
            if (resolvedThenable) {
              return getComponentName(resolvedThenable);
            }
          }
      }
    }
    return null;
  }

  var ReactDebugCurrentFrame = {};

  var currentlyValidatingElement = null;

  function setCurrentlyValidatingElement(element) {
    {
      currentlyValidatingElement = element;
    }
  }

  {
    // Stack implementation injected by the current renderer.
    ReactDebugCurrentFrame.getCurrentStack = null;

    ReactDebugCurrentFrame.getStackAddendum = function () {
      var stack = '';

      // Add an extra top frame while an element is being validated
      if (currentlyValidatingElement) {
        var name = getComponentName(currentlyValidatingElement.type);
        var owner = currentlyValidatingElement._owner;
        stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
      }

      // Delegate to the injected renderer-specific implementation
      var impl = ReactDebugCurrentFrame.getCurrentStack;
      if (impl) {
        stack += impl() || '';
      }

      return stack;
    };
  }

  var ReactSharedInternals = {
    ReactCurrentDispatcher: ReactCurrentDispatcher,
    ReactCurrentOwner: ReactCurrentOwner,
    // Used by renderers to avoid bundling object-assign twice in UMD bundles:
    assign: _assign
  };

  {
    _assign(ReactSharedInternals, {
      // These should not be included in production.
      ReactDebugCurrentFrame: ReactDebugCurrentFrame,
      // Shim for React DOM 16.0.0 which still destructured (but not used) this.
      // TODO: remove in React 17.0.
      ReactComponentTreeHook: {}
    });
  }

  /**
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var warning = warningWithoutStack$1;

  {
    warning = function (condition, format) {
      if (condition) {
        return;
      }
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();
      // eslint-disable-next-line react-internal/warning-and-invariant-args

      for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        args[_key - 2] = arguments[_key];
      }

      warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
    };
  }

  var warning$1 = warning;

  var hasOwnProperty = Object.prototype.hasOwnProperty;

  var RESERVED_PROPS = {
    key: true,
    ref: true,
    __self: true,
    __source: true
  };

  var specialPropKeyWarningShown = void 0;
  var specialPropRefWarningShown = void 0;

  function hasValidRef(config) {
    {
      if (hasOwnProperty.call(config, 'ref')) {
        var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
        if (getter && getter.isReactWarning) {
          return false;
        }
      }
    }
    return config.ref !== undefined;
  }

  function hasValidKey(config) {
    {
      if (hasOwnProperty.call(config, 'key')) {
        var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
        if (getter && getter.isReactWarning) {
          return false;
        }
      }
    }
    return config.key !== undefined;
  }

  function defineKeyPropWarningGetter(props, displayName) {
    var warnAboutAccessingKey = function () {
      if (!specialPropKeyWarningShown) {
        specialPropKeyWarningShown = true;
        warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
      }
    };
    warnAboutAccessingKey.isReactWarning = true;
    Object.defineProperty(props, 'key', {
      get: warnAboutAccessingKey,
      configurable: true
    });
  }

  function defineRefPropWarningGetter(props, displayName) {
    var warnAboutAccessingRef = function () {
      if (!specialPropRefWarningShown) {
        specialPropRefWarningShown = true;
        warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
      }
    };
    warnAboutAccessingRef.isReactWarning = true;
    Object.defineProperty(props, 'ref', {
      get: warnAboutAccessingRef,
      configurable: true
    });
  }

  /**
   * Factory method to create a new React element. This no longer adheres to
   * the class pattern, so do not use new to call it. Also, no instanceof check
   * will work. Instead test $$typeof field against Symbol.for('react.element') to check
   * if something is a React Element.
   *
   * @param {*} type
   * @param {*} key
   * @param {string|object} ref
   * @param {*} self A *temporary* helper to detect places where `this` is
   * different from the `owner` when React.createElement is called, so that we
   * can warn. We want to get rid of owner and replace string `ref`s with arrow
   * functions, and as long as `this` and owner are the same, there will be no
   * change in behavior.
   * @param {*} source An annotation object (added by a transpiler or otherwise)
   * indicating filename, line number, and/or other information.
   * @param {*} owner
   * @param {*} props
   * @internal
   */
  var ReactElement = function (type, key, ref, self, source, owner, props) {
    var element = {
      // This tag allows us to uniquely identify this as a React Element
      $$typeof: REACT_ELEMENT_TYPE,

      // Built-in properties that belong on the element
      type: type,
      key: key,
      ref: ref,
      props: props,

      // Record the component responsible for creating this element.
      _owner: owner
    };

    {
      // The validation flag is currently mutative. We put it on
      // an external backing store so that we can freeze the whole object.
      // This can be replaced with a WeakMap once they are implemented in
      // commonly used development environments.
      element._store = {};

      // To make comparing ReactElements easier for testing purposes, we make
      // the validation flag non-enumerable (where possible, which should
      // include every environment we run tests in), so the test framework
      // ignores it.
      Object.defineProperty(element._store, 'validated', {
        configurable: false,
        enumerable: false,
        writable: true,
        value: false
      });
      // self and source are DEV only properties.
      Object.defineProperty(element, '_self', {
        configurable: false,
        enumerable: false,
        writable: false,
        value: self
      });
      // Two elements created in two different places should be considered
      // equal for testing purposes and therefore we hide it from enumeration.
      Object.defineProperty(element, '_source', {
        configurable: false,
        enumerable: false,
        writable: false,
        value: source
      });
      if (Object.freeze) {
        Object.freeze(element.props);
        Object.freeze(element);
      }
    }

    return element;
  };

  /**
   * Create and return a new ReactElement of the given type.
   * See https://reactjs.org/docs/react-api.html#createelement
   */
  function createElement(type, config, children) {
    var propName = void 0;

    // Reserved names are extracted
    var props = {};

    var key = null;
    var ref = null;
    var self = null;
    var source = null;

    if (config != null) {
      if (hasValidRef(config)) {
        ref = config.ref;
      }
      if (hasValidKey(config)) {
        key = '' + config.key;
      }

      self = config.__self === undefined ? null : config.__self;
      source = config.__source === undefined ? null : config.__source;
      // Remaining properties are added to a new props object
      for (propName in config) {
        if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
          props[propName] = config[propName];
        }
      }
    }

    // Children can be more than one argument, and those are transferred onto
    // the newly allocated props object.
    var childrenLength = arguments.length - 2;
    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);
      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 2];
      }
      {
        if (Object.freeze) {
          Object.freeze(childArray);
        }
      }
      props.children = childArray;
    }

    // Resolve default props
    if (type && type.defaultProps) {
      var defaultProps = type.defaultProps;
      for (propName in defaultProps) {
        if (props[propName] === undefined) {
          props[propName] = defaultProps[propName];
        }
      }
    }
    {
      if (key || ref) {
        var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
        if (key) {
          defineKeyPropWarningGetter(props, displayName);
        }
        if (ref) {
          defineRefPropWarningGetter(props, displayName);
        }
      }
    }
    return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
  }

  /**
   * Return a function that produces ReactElements of a given type.
   * See https://reactjs.org/docs/react-api.html#createfactory
   */


  function cloneAndReplaceKey(oldElement, newKey) {
    var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);

    return newElement;
  }

  /**
   * Clone and return a new ReactElement using element as the starting point.
   * See https://reactjs.org/docs/react-api.html#cloneelement
   */
  function cloneElement(element, config, children) {
    !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;

    var propName = void 0;

    // Original props are copied
    var props = _assign({}, element.props);

    // Reserved names are extracted
    var key = element.key;
    var ref = element.ref;
    // Self is preserved since the owner is preserved.
    var self = element._self;
    // Source is preserved since cloneElement is unlikely to be targeted by a
    // transpiler, and the original source is probably a better indicator of the
    // true owner.
    var source = element._source;

    // Owner will be preserved, unless ref is overridden
    var owner = element._owner;

    if (config != null) {
      if (hasValidRef(config)) {
        // Silently steal the ref from the parent.
        ref = config.ref;
        owner = ReactCurrentOwner.current;
      }
      if (hasValidKey(config)) {
        key = '' + config.key;
      }

      // Remaining properties override existing props
      var defaultProps = void 0;
      if (element.type && element.type.defaultProps) {
        defaultProps = element.type.defaultProps;
      }
      for (propName in config) {
        if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
          if (config[propName] === undefined && defaultProps !== undefined) {
            // Resolve default props
            props[propName] = defaultProps[propName];
          } else {
            props[propName] = config[propName];
          }
        }
      }
    }

    // Children can be more than one argument, and those are transferred onto
    // the newly allocated props object.
    var childrenLength = arguments.length - 2;
    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);
      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 2];
      }
      props.children = childArray;
    }

    return ReactElement(element.type, key, ref, self, source, owner, props);
  }

  /**
   * Verifies the object is a ReactElement.
   * See https://reactjs.org/docs/react-api.html#isvalidelement
   * @param {?object} object
   * @return {boolean} True if `object` is a ReactElement.
   * @final
   */
  function isValidElement(object) {
    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  }

  var SEPARATOR = '.';
  var SUBSEPARATOR = ':';

  /**
   * Escape and wrap key so it is safe to use as a reactid
   *
   * @param {string} key to be escaped.
   * @return {string} the escaped key.
   */
  function escape(key) {
    var escapeRegex = /[=:]/g;
    var escaperLookup = {
      '=': '=0',
      ':': '=2'
    };
    var escapedString = ('' + key).replace(escapeRegex, function (match) {
      return escaperLookup[match];
    });

    return '$' + escapedString;
  }

  /**
   * TODO: Test that a single child and an array with one item have the same key
   * pattern.
   */

  var didWarnAboutMaps = false;

  var userProvidedKeyEscapeRegex = /\/+/g;
  function escapeUserProvidedKey(text) {
    return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
  }

  var POOL_SIZE = 10;
  var traverseContextPool = [];
  function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
    if (traverseContextPool.length) {
      var traverseContext = traverseContextPool.pop();
      traverseContext.result = mapResult;
      traverseContext.keyPrefix = keyPrefix;
      traverseContext.func = mapFunction;
      traverseContext.context = mapContext;
      traverseContext.count = 0;
      return traverseContext;
    } else {
      return {
        result: mapResult,
        keyPrefix: keyPrefix,
        func: mapFunction,
        context: mapContext,
        count: 0
      };
    }
  }

  function releaseTraverseContext(traverseContext) {
    traverseContext.result = null;
    traverseContext.keyPrefix = null;
    traverseContext.func = null;
    traverseContext.context = null;
    traverseContext.count = 0;
    if (traverseContextPool.length < POOL_SIZE) {
      traverseContextPool.push(traverseContext);
    }
  }

  /**
   * @param {?*} children Children tree container.
   * @param {!string} nameSoFar Name of the key path so far.
   * @param {!function} callback Callback to invoke with each child found.
   * @param {?*} traverseContext Used to pass information throughout the traversal
   * process.
   * @return {!number} The number of children in this subtree.
   */
  function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
    var type = typeof children;

    if (type === 'undefined' || type === 'boolean') {
      // All of the above are perceived as null.
      children = null;
    }

    var invokeCallback = false;

    if (children === null) {
      invokeCallback = true;
    } else {
      switch (type) {
        case 'string':
        case 'number':
          invokeCallback = true;
          break;
        case 'object':
          switch (children.$$typeof) {
            case REACT_ELEMENT_TYPE:
            case REACT_PORTAL_TYPE:
              invokeCallback = true;
          }
      }
    }

    if (invokeCallback) {
      callback(traverseContext, children,
      // If it's the only child, treat the name as if it was wrapped in an array
      // so that it's consistent if the number of children grows.
      nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
      return 1;
    }

    var child = void 0;
    var nextName = void 0;
    var subtreeCount = 0; // Count of children found in the current subtree.
    var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;

    if (Array.isArray(children)) {
      for (var i = 0; i < children.length; i++) {
        child = children[i];
        nextName = nextNamePrefix + getComponentKey(child, i);
        subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
      }
    } else {
      var iteratorFn = getIteratorFn(children);
      if (typeof iteratorFn === 'function') {
        {
          // Warn about using Maps as children
          if (iteratorFn === children.entries) {
            !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
            didWarnAboutMaps = true;
          }
        }

        var iterator = iteratorFn.call(children);
        var step = void 0;
        var ii = 0;
        while (!(step = iterator.next()).done) {
          child = step.value;
          nextName = nextNamePrefix + getComponentKey(child, ii++);
          subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
        }
      } else if (type === 'object') {
        var addendum = '';
        {
          addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
        }
        var childrenString = '' + children;
        invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
      }
    }

    return subtreeCount;
  }

  /**
   * Traverses children that are typically specified as `props.children`, but
   * might also be specified through attributes:
   *
   * - `traverseAllChildren(this.props.children, ...)`
   * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
   *
   * The `traverseContext` is an optional argument that is passed through the
   * entire traversal. It can be used to store accumulations or anything else that
   * the callback might find relevant.
   *
   * @param {?*} children Children tree object.
   * @param {!function} callback To invoke upon traversing each child.
   * @param {?*} traverseContext Context for traversal.
   * @return {!number} The number of children in this subtree.
   */
  function traverseAllChildren(children, callback, traverseContext) {
    if (children == null) {
      return 0;
    }

    return traverseAllChildrenImpl(children, '', callback, traverseContext);
  }

  /**
   * Generate a key string that identifies a component within a set.
   *
   * @param {*} component A component that could contain a manual key.
   * @param {number} index Index that is used if a manual key is not provided.
   * @return {string}
   */
  function getComponentKey(component, index) {
    // Do some typechecking here since we call this blindly. We want to ensure
    // that we don't block potential future ES APIs.
    if (typeof component === 'object' && component !== null && component.key != null) {
      // Explicit key
      return escape(component.key);
    }
    // Implicit key determined by the index in the set
    return index.toString(36);
  }

  function forEachSingleChild(bookKeeping, child, name) {
    var func = bookKeeping.func,
        context = bookKeeping.context;

    func.call(context, child, bookKeeping.count++);
  }

  /**
   * Iterates through children that are typically specified as `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
   *
   * The provided forEachFunc(child, index) will be called for each
   * leaf child.
   *
   * @param {?*} children Children tree container.
   * @param {function(*, int)} forEachFunc
   * @param {*} forEachContext Context for forEachContext.
   */
  function forEachChildren(children, forEachFunc, forEachContext) {
    if (children == null) {
      return children;
    }
    var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
    traverseAllChildren(children, forEachSingleChild, traverseContext);
    releaseTraverseContext(traverseContext);
  }

  function mapSingleChildIntoContext(bookKeeping, child, childKey) {
    var result = bookKeeping.result,
        keyPrefix = bookKeeping.keyPrefix,
        func = bookKeeping.func,
        context = bookKeeping.context;


    var mappedChild = func.call(context, child, bookKeeping.count++);
    if (Array.isArray(mappedChild)) {
      mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
        return c;
      });
    } else if (mappedChild != null) {
      if (isValidElement(mappedChild)) {
        mappedChild = cloneAndReplaceKey(mappedChild,
        // Keep both the (mapped) and old keys if they differ, just as
        // traverseAllChildren used to do for objects as children
        keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
      }
      result.push(mappedChild);
    }
  }

  function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
    var escapedPrefix = '';
    if (prefix != null) {
      escapedPrefix = escapeUserProvidedKey(prefix) + '/';
    }
    var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
    traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
    releaseTraverseContext(traverseContext);
  }

  /**
   * Maps children that are typically specified as `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenmap
   *
   * The provided mapFunction(child, key, index) will be called for each
   * leaf child.
   *
   * @param {?*} children Children tree container.
   * @param {function(*, int)} func The map function.
   * @param {*} context Context for mapFunction.
   * @return {object} Object containing the ordered map of results.
   */
  function mapChildren(children, func, context) {
    if (children == null) {
      return children;
    }
    var result = [];
    mapIntoWithKeyPrefixInternal(children, result, null, func, context);
    return result;
  }

  /**
   * Count the number of children that are typically specified as
   * `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrencount
   *
   * @param {?*} children Children tree container.
   * @return {number} The number of children.
   */
  function countChildren(children) {
    return traverseAllChildren(children, function () {
      return null;
    }, null);
  }

  /**
   * Flatten a children object (typically specified as `props.children`) and
   * return an array with appropriately re-keyed children.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
   */
  function toArray(children) {
    var result = [];
    mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
      return child;
    });
    return result;
  }

  /**
   * Returns the first child in a collection of children and verifies that there
   * is only one child in the collection.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenonly
   *
   * The current implementation of this function assumes that a single child gets
   * passed without a wrapper, but the purpose of this helper function is to
   * abstract away the particular structure of children.
   *
   * @param {?object} children Child collection structure.
   * @return {ReactElement} The first and only `ReactElement` contained in the
   * structure.
   */
  function onlyChild(children) {
    !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
    return children;
  }

  function createContext(defaultValue, calculateChangedBits) {
    if (calculateChangedBits === undefined) {
      calculateChangedBits = null;
    } else {
      {
        !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
      }
    }

    var context = {
      $$typeof: REACT_CONTEXT_TYPE,
      _calculateChangedBits: calculateChangedBits,
      // As a workaround to support multiple concurrent renderers, we categorize
      // some renderers as primary and others as secondary. We only expect
      // there to be two concurrent renderers at most: React Native (primary) and
      // Fabric (secondary); React DOM (primary) and React ART (secondary).
      // Secondary renderers store their context values on separate fields.
      _currentValue: defaultValue,
      _currentValue2: defaultValue,
      // Used to track how many concurrent renderers this context currently
      // supports within in a single renderer. Such as parallel server rendering.
      _threadCount: 0,
      // These are circular
      Provider: null,
      Consumer: null
    };

    context.Provider = {
      $$typeof: REACT_PROVIDER_TYPE,
      _context: context
    };

    var hasWarnedAboutUsingNestedContextConsumers = false;
    var hasWarnedAboutUsingConsumerProvider = false;

    {
      // A separate object, but proxies back to the original context object for
      // backwards compatibility. It has a different $$typeof, so we can properly
      // warn for the incorrect usage of Context as a Consumer.
      var Consumer = {
        $$typeof: REACT_CONTEXT_TYPE,
        _context: context,
        _calculateChangedBits: context._calculateChangedBits
      };
      // $FlowFixMe: Flow complains about not setting a value, which is intentional here
      Object.defineProperties(Consumer, {
        Provider: {
          get: function () {
            if (!hasWarnedAboutUsingConsumerProvider) {
              hasWarnedAboutUsingConsumerProvider = true;
              warning$1(false, 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
            }
            return context.Provider;
          },
          set: function (_Provider) {
            context.Provider = _Provider;
          }
        },
        _currentValue: {
          get: function () {
            return context._currentValue;
          },
          set: function (_currentValue) {
            context._currentValue = _currentValue;
          }
        },
        _currentValue2: {
          get: function () {
            return context._currentValue2;
          },
          set: function (_currentValue2) {
            context._currentValue2 = _currentValue2;
          }
        },
        _threadCount: {
          get: function () {
            return context._threadCount;
          },
          set: function (_threadCount) {
            context._threadCount = _threadCount;
          }
        },
        Consumer: {
          get: function () {
            if (!hasWarnedAboutUsingNestedContextConsumers) {
              hasWarnedAboutUsingNestedContextConsumers = true;
              warning$1(false, 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
            }
            return context.Consumer;
          }
        }
      });
      // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
      context.Consumer = Consumer;
    }

    {
      context._currentRenderer = null;
      context._currentRenderer2 = null;
    }

    return context;
  }

  function lazy(ctor) {
    var lazyType = {
      $$typeof: REACT_LAZY_TYPE,
      _ctor: ctor,
      // React uses these fields to store the result.
      _status: -1,
      _result: null
    };

    {
      // In production, this would just set it on the object.
      var defaultProps = void 0;
      var propTypes = void 0;
      Object.defineProperties(lazyType, {
        defaultProps: {
          configurable: true,
          get: function () {
            return defaultProps;
          },
          set: function (newDefaultProps) {
            warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
            defaultProps = newDefaultProps;
            // Match production behavior more closely:
            Object.defineProperty(lazyType, 'defaultProps', {
              enumerable: true
            });
          }
        },
        propTypes: {
          configurable: true,
          get: function () {
            return propTypes;
          },
          set: function (newPropTypes) {
            warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
            propTypes = newPropTypes;
            // Match production behavior more closely:
            Object.defineProperty(lazyType, 'propTypes', {
              enumerable: true
            });
          }
        }
      });
    }

    return lazyType;
  }

  function forwardRef(render) {
    {
      if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
        warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
      } else if (typeof render !== 'function') {
        warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
      } else {
        !(
        // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
        render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
      }

      if (render != null) {
        !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
      }
    }

    return {
      $$typeof: REACT_FORWARD_REF_TYPE,
      render: render
    };
  }

  function isValidElementType(type) {
    return typeof type === 'string' || typeof type === 'function' ||
    // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
    type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
  }

  function memo(type, compare) {
    {
      if (!isValidElementType(type)) {
        warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
      }
    }
    return {
      $$typeof: REACT_MEMO_TYPE,
      type: type,
      compare: compare === undefined ? null : compare
    };
  }

  function resolveDispatcher() {
    var dispatcher = ReactCurrentDispatcher.current;
    !(dispatcher !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)') : void 0;
    return dispatcher;
  }

  function useContext(Context, unstable_observedBits) {
    var dispatcher = resolveDispatcher();
    {
      !(unstable_observedBits === undefined) ? warning$1(false, 'useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '') : void 0;

      // TODO: add a more generic warning for invalid values.
      if (Context._context !== undefined) {
        var realContext = Context._context;
        // Don't deduplicate because this legitimately causes bugs
        // and nobody should be using this in existing code.
        if (realContext.Consumer === Context) {
          warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
        } else if (realContext.Provider === Context) {
          warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
        }
      }
    }
    return dispatcher.useContext(Context, unstable_observedBits);
  }

  function useState(initialState) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useState(initialState);
  }

  function useReducer(reducer, initialArg, init) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useReducer(reducer, initialArg, init);
  }

  function useRef(initialValue) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useRef(initialValue);
  }

  function useEffect(create, inputs) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useEffect(create, inputs);
  }

  function useLayoutEffect(create, inputs) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useLayoutEffect(create, inputs);
  }

  function useCallback(callback, inputs) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useCallback(callback, inputs);
  }

  function useMemo(create, inputs) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useMemo(create, inputs);
  }

  function useImperativeHandle(ref, create, inputs) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useImperativeHandle(ref, create, inputs);
  }

  function useDebugValue(value, formatterFn) {
    {
      var dispatcher = resolveDispatcher();
      return dispatcher.useDebugValue(value, formatterFn);
    }
  }

  /**
   * ReactElementValidator provides a wrapper around a element factory
   * which validates the props passed to the element. This is intended to be
   * used only in DEV and could be replaced by a static type checker for languages
   * that support it.
   */

  var propTypesMisspellWarningShown = void 0;

  {
    propTypesMisspellWarningShown = false;
  }

  function getDeclarationErrorAddendum() {
    if (ReactCurrentOwner.current) {
      var name = getComponentName(ReactCurrentOwner.current.type);
      if (name) {
        return '\n\nCheck the render method of `' + name + '`.';
      }
    }
    return '';
  }

  function getSourceInfoErrorAddendum(elementProps) {
    if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
      var source = elementProps.__source;
      var fileName = source.fileName.replace(/^.*[\\\/]/, '');
      var lineNumber = source.lineNumber;
      return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
    }
    return '';
  }

  /**
   * Warn if there's no key explicitly set on dynamic arrays of children or
   * object keys are not valid. This allows us to keep track of children between
   * updates.
   */
  var ownerHasKeyUseWarning = {};

  function getCurrentComponentErrorInfo(parentType) {
    var info = getDeclarationErrorAddendum();

    if (!info) {
      var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
      if (parentName) {
        info = '\n\nCheck the top-level render call using <' + parentName + '>.';
      }
    }
    return info;
  }

  /**
   * Warn if the element doesn't have an explicit key assigned to it.
   * This element is in an array. The array could grow and shrink or be
   * reordered. All children that haven't already been validated are required to
   * have a "key" property assigned to it. Error statuses are cached so a warning
   * will only be shown once.
   *
   * @internal
   * @param {ReactElement} element Element that requires a key.
   * @param {*} parentType element's parent's type.
   */
  function validateExplicitKey(element, parentType) {
    if (!element._store || element._store.validated || element.key != null) {
      return;
    }
    element._store.validated = true;

    var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
      return;
    }
    ownerHasKeyUseWarning[currentComponentErrorInfo] = true;

    // Usually the current owner is the offender, but if it accepts children as a
    // property, it may be the creator of the child that's responsible for
    // assigning it a key.
    var childOwner = '';
    if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
      // Give the component that originally created this child.
      childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
    }

    setCurrentlyValidatingElement(element);
    {
      warning$1(false, 'Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
    }
    setCurrentlyValidatingElement(null);
  }

  /**
   * Ensure that every element either is passed in a static location, in an
   * array with an explicit keys property defined, or in an object literal
   * with valid key property.
   *
   * @internal
   * @param {ReactNode} node Statically passed child of any type.
   * @param {*} parentType node's parent's type.
   */
  function validateChildKeys(node, parentType) {
    if (typeof node !== 'object') {
      return;
    }
    if (Array.isArray(node)) {
      for (var i = 0; i < node.length; i++) {
        var child = node[i];
        if (isValidElement(child)) {
          validateExplicitKey(child, parentType);
        }
      }
    } else if (isValidElement(node)) {
      // This element was passed in a valid location.
      if (node._store) {
        node._store.validated = true;
      }
    } else if (node) {
      var iteratorFn = getIteratorFn(node);
      if (typeof iteratorFn === 'function') {
        // Entry iterators used to provide implicit keys,
        // but now we print a separate warning for them later.
        if (iteratorFn !== node.entries) {
          var iterator = iteratorFn.call(node);
          var step = void 0;
          while (!(step = iterator.next()).done) {
            if (isValidElement(step.value)) {
              validateExplicitKey(step.value, parentType);
            }
          }
        }
      }
    }
  }

  /**
   * Given an element, validate that its props follow the propTypes definition,
   * provided by the type.
   *
   * @param {ReactElement} element
   */
  function validatePropTypes(element) {
    var type = element.type;
    if (type === null || type === undefined || typeof type === 'string') {
      return;
    }
    var name = getComponentName(type);
    var propTypes = void 0;
    if (typeof type === 'function') {
      propTypes = type.propTypes;
    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
    // Note: Memo only checks outer props here.
    // Inner props are checked in the reconciler.
    type.$$typeof === REACT_MEMO_TYPE)) {
      propTypes = type.propTypes;
    } else {
      return;
    }
    if (propTypes) {
      setCurrentlyValidatingElement(element);
      checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
      setCurrentlyValidatingElement(null);
    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
      propTypesMisspellWarningShown = true;
      warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
    }
    if (typeof type.getDefaultProps === 'function') {
      !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
    }
  }

  /**
   * Given a fragment, validate that it can only be provided with fragment props
   * @param {ReactElement} fragment
   */
  function validateFragmentProps(fragment) {
    setCurrentlyValidatingElement(fragment);

    var keys = Object.keys(fragment.props);
    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];
      if (key !== 'children' && key !== 'key') {
        warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
        break;
      }
    }

    if (fragment.ref !== null) {
      warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
    }

    setCurrentlyValidatingElement(null);
  }

  function createElementWithValidation(type, props, children) {
    var validType = isValidElementType(type);

    // We warn in this case but don't throw. We expect the element creation to
    // succeed and there will likely be errors in render.
    if (!validType) {
      var info = '';
      if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
        info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
      }

      var sourceInfo = getSourceInfoErrorAddendum(props);
      if (sourceInfo) {
        info += sourceInfo;
      } else {
        info += getDeclarationErrorAddendum();
      }

      var typeString = void 0;
      if (type === null) {
        typeString = 'null';
      } else if (Array.isArray(type)) {
        typeString = 'array';
      } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
        typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
        info = ' Did you accidentally export a JSX literal instead of a component?';
      } else {
        typeString = typeof type;
      }

      warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
    }

    var element = createElement.apply(this, arguments);

    // The result can be nullish if a mock or a custom function is used.
    // TODO: Drop this when these are no longer allowed as the type argument.
    if (element == null) {
      return element;
    }

    // Skip key warning if the type isn't valid since our key validation logic
    // doesn't expect a non-string/function type and can throw confusing errors.
    // We don't want exception behavior to differ between dev and prod.
    // (Rendering will throw with a helpful message and as soon as the type is
    // fixed, the key warnings will appear.)
    if (validType) {
      for (var i = 2; i < arguments.length; i++) {
        validateChildKeys(arguments[i], type);
      }
    }

    if (type === REACT_FRAGMENT_TYPE) {
      validateFragmentProps(element);
    } else {
      validatePropTypes(element);
    }

    return element;
  }

  function createFactoryWithValidation(type) {
    var validatedFactory = createElementWithValidation.bind(null, type);
    validatedFactory.type = type;
    // Legacy hook: remove it
    {
      Object.defineProperty(validatedFactory, 'type', {
        enumerable: false,
        get: function () {
          lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
          Object.defineProperty(this, 'type', {
            value: type
          });
          return type;
        }
      });
    }

    return validatedFactory;
  }

  function cloneElementWithValidation(element, props, children) {
    var newElement = cloneElement.apply(this, arguments);
    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], newElement.type);
    }
    validatePropTypes(newElement);
    return newElement;
  }

  // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:


  // In some cases, StrictMode should also double-render lifecycles.
  // This can be confusing for tests though,
  // And it can be bad for performance in production.
  // This feature flag can be used to control the behavior:


  // To preserve the "Pause on caught exceptions" behavior of the debugger, we
  // replay the begin phase of a failed component inside invokeGuardedCallback.


  // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:


  // Gather advanced timing metrics for Profiler subtrees.


  // Trace which interactions trigger each commit.


  // Only used in www builds.
   // TODO: true? Here it might just be false.

  // Only used in www builds.


  // Only used in www builds.


  // React Fire: prevent the value and checked attributes from syncing
  // with their related DOM properties


  // These APIs will no longer be "unstable" in the upcoming 16.7 release,
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
  var enableStableConcurrentModeAPIs = false;

  var React = {
    Children: {
      map: mapChildren,
      forEach: forEachChildren,
      count: countChildren,
      toArray: toArray,
      only: onlyChild
    },

    createRef: createRef,
    Component: Component,
    PureComponent: PureComponent,

    createContext: createContext,
    forwardRef: forwardRef,
    lazy: lazy,
    memo: memo,

    useCallback: useCallback,
    useContext: useContext,
    useEffect: useEffect,
    useImperativeHandle: useImperativeHandle,
    useDebugValue: useDebugValue,
    useLayoutEffect: useLayoutEffect,
    useMemo: useMemo,
    useReducer: useReducer,
    useRef: useRef,
    useState: useState,

    Fragment: REACT_FRAGMENT_TYPE,
    StrictMode: REACT_STRICT_MODE_TYPE,
    Suspense: REACT_SUSPENSE_TYPE,

    createElement: createElementWithValidation,
    cloneElement: cloneElementWithValidation,
    createFactory: createFactoryWithValidation,
    isValidElement: isValidElement,

    version: ReactVersion,

    unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,
    unstable_Profiler: REACT_PROFILER_TYPE,

    __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
  };

  // Note: some APIs are added with feature flags.
  // Make sure that stable builds for open source
  // don't modify the React object to avoid deopts.
  // Also let's not expose their names in stable builds.

  if (enableStableConcurrentModeAPIs) {
    React.ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
    React.Profiler = REACT_PROFILER_TYPE;
    React.unstable_ConcurrentMode = undefined;
    React.unstable_Profiler = undefined;
  }



  var React$2 = Object.freeze({
  	default: React
  });

  var React$3 = ( React$2 && React ) || React$2;

  // TODO: decide on the top-level export form.
  // This is hacky but makes it work with both Rollup and Jest.
  var react = React$3.default || React$3;

  module.exports = react;
    })();
  }


  /***/ }),
  /* 16 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */


  /* eslint-disable no-unused-vars */
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  var hasOwnProperty = Object.prototype.hasOwnProperty;
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;

  function toObject(val) {
  	if (val === null || val === undefined) {
  		throw new TypeError('Object.assign cannot be called with null or undefined');
  	}

  	return Object(val);
  }

  function shouldUseNative() {
  	try {
  		if (!Object.assign) {
  			return false;
  		}

  		// Detect buggy property enumeration order in older V8 versions.

  		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
  		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
  		test1[5] = 'de';
  		if (Object.getOwnPropertyNames(test1)[0] === '5') {
  			return false;
  		}

  		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
  		var test2 = {};
  		for (var i = 0; i < 10; i++) {
  			test2['_' + String.fromCharCode(i)] = i;
  		}
  		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  			return test2[n];
  		});
  		if (order2.join('') !== '0123456789') {
  			return false;
  		}

  		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
  		var test3 = {};
  		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  			test3[letter] = letter;
  		});
  		if (Object.keys(Object.assign({}, test3)).join('') !==
  				'abcdefghijklmnopqrst') {
  			return false;
  		}

  		return true;
  	} catch (err) {
  		// We don't expect any of the above to throw, but better to be safe.
  		return false;
  	}
  }

  module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  	var from;
  	var to = toObject(target);
  	var symbols;

  	for (var s = 1; s < arguments.length; s++) {
  		from = Object(arguments[s]);

  		for (var key in from) {
  			if (hasOwnProperty.call(from, key)) {
  				to[key] = from[key];
  			}
  		}

  		if (getOwnPropertySymbols) {
  			symbols = getOwnPropertySymbols(from);
  			for (var i = 0; i < symbols.length; i++) {
  				if (propIsEnumerable.call(from, symbols[i])) {
  					to[symbols[i]] = from[symbols[i]];
  				}
  			}
  		}
  	}

  	return to;
  };


  /***/ }),
  /* 17 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */



  var printWarning = function() {};

  if (true) {
    var ReactPropTypesSecret = __webpack_require__(18);
    var loggedTypeFailures = {};

    printWarning = function(text) {
      var message = 'Warning: ' + text;
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  }

  /**
   * Assert that the values match with the type specs.
   * Error messages are memorized and will only be shown once.
   *
   * @param {object} typeSpecs Map of name to a ReactPropType
   * @param {object} values Runtime values that need to be type-checked
   * @param {string} location e.g. "prop", "context", "child context"
   * @param {string} componentName Name of the component for error messages.
   * @param {?Function} getStack Returns the component stack.
   * @private
   */
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
    if (true) {
      for (var typeSpecName in typeSpecs) {
        if (typeSpecs.hasOwnProperty(typeSpecName)) {
          var error;
          // Prop type validation may throw. In case they do, we don't want to
          // fail the render phase where it didn't fail before. So we log it.
          // After these have been cleaned up, we'll let them throw.
          try {
            // This is intentionally an invariant that gets caught. It's the same
            // behavior as without this statement except with a better message.
            if (typeof typeSpecs[typeSpecName] !== 'function') {
              var err = Error(
                (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
                'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
              );
              err.name = 'Invariant Violation';
              throw err;
            }
            error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
          } catch (ex) {
            error = ex;
          }
          if (error && !(error instanceof Error)) {
            printWarning(
              (componentName || 'React class') + ': type specification of ' +
              location + ' `' + typeSpecName + '` is invalid; the type checker ' +
              'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
              'You may have forgotten to pass an argument to the type checker ' +
              'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
              'shape all require an argument).'
            )

          }
          if (error instanceof Error && !(error.message in loggedTypeFailures)) {
            // Only monitor this failure once because there tends to be a lot of the
            // same error.
            loggedTypeFailures[error.message] = true;

            var stack = getStack ? getStack() : '';

            printWarning(
              'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
            );
          }
        }
      }
    }
  }

  module.exports = checkPropTypes;


  /***/ }),
  /* 18 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */



  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

  module.exports = ReactPropTypesSecret;


  /***/ }),
  /* 19 */
  /***/ (function(module, exports) {

  /**
   * lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="npm" -o ./`
   * Copyright jQuery Foundation and other contributors <https://jquery.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */

  /** Used as the `TypeError` message for "Functions" methods. */
  var FUNC_ERROR_TEXT = 'Expected a function';

  /** Used as references for various `Number` constants. */
  var NAN = 0 / 0;

  /** `Object#toString` result references. */
  var symbolTag = '[object Symbol]';

  /** Used to match leading and trailing whitespace. */
  var reTrim = /^\s+|\s+$/g;

  /** Used to detect bad signed hexadecimal string values. */
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

  /** Used to detect binary string values. */
  var reIsBinary = /^0b[01]+$/i;

  /** Used to detect octal string values. */
  var reIsOctal = /^0o[0-7]+$/i;

  /** Built-in method references without a dependency on `root`. */
  var freeParseInt = parseInt;

  /** Detect free variable `global` from Node.js. */
  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

  /** Detect free variable `self`. */
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

  /** Used as a reference to the global object. */
  var root = freeGlobal || freeSelf || Function('return this')();

  /** Used for built-in method references. */
  var objectProto = Object.prototype;

  /**
   * Used to resolve the
   * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
   * of values.
   */
  var objectToString = objectProto.toString;

  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeMax = Math.max,
      nativeMin = Math.min;

  /**
   * Gets the timestamp of the number of milliseconds that have elapsed since
   * the Unix epoch (1 January 1970 00:00:00 UTC).
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Date
   * @returns {number} Returns the timestamp.
   * @example
   *
   * _.defer(function(stamp) {
   *   console.log(_.now() - stamp);
   * }, _.now());
   * // => Logs the number of milliseconds it took for the deferred invocation.
   */
  var now = function() {
    return root.Date.now();
  };

  /**
   * Creates a debounced function that delays invoking `func` until after `wait`
   * milliseconds have elapsed since the last time the debounced function was
   * invoked. The debounced function comes with a `cancel` method to cancel
   * delayed `func` invocations and a `flush` method to immediately invoke them.
   * Provide `options` to indicate whether `func` should be invoked on the
   * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
   * with the last arguments provided to the debounced function. Subsequent
   * calls to the debounced function return the result of the last `func`
   * invocation.
   *
   * **Note:** If `leading` and `trailing` options are `true`, `func` is
   * invoked on the trailing edge of the timeout only if the debounced function
   * is invoked more than once during the `wait` timeout.
   *
   * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
   * until to the next tick, similar to `setTimeout` with a timeout of `0`.
   *
   * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
   * for details over the differences between `_.debounce` and `_.throttle`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to debounce.
   * @param {number} [wait=0] The number of milliseconds to delay.
   * @param {Object} [options={}] The options object.
   * @param {boolean} [options.leading=false]
   *  Specify invoking on the leading edge of the timeout.
   * @param {number} [options.maxWait]
   *  The maximum time `func` is allowed to be delayed before it's invoked.
   * @param {boolean} [options.trailing=true]
   *  Specify invoking on the trailing edge of the timeout.
   * @returns {Function} Returns the new debounced function.
   * @example
   *
   * // Avoid costly calculations while the window size is in flux.
   * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
   *
   * // Invoke `sendMail` when clicked, debouncing subsequent calls.
   * jQuery(element).on('click', _.debounce(sendMail, 300, {
   *   'leading': true,
   *   'trailing': false
   * }));
   *
   * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
   * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
   * var source = new EventSource('/stream');
   * jQuery(source).on('message', debounced);
   *
   * // Cancel the trailing debounced invocation.
   * jQuery(window).on('popstate', debounced.cancel);
   */
  function debounce(func, wait, options) {
    var lastArgs,
        lastThis,
        maxWait,
        result,
        timerId,
        lastCallTime,
        lastInvokeTime = 0,
        leading = false,
        maxing = false,
        trailing = true;

    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    wait = toNumber(wait) || 0;
    if (isObject(options)) {
      leading = !!options.leading;
      maxing = 'maxWait' in options;
      maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
      trailing = 'trailing' in options ? !!options.trailing : trailing;
    }

    function invokeFunc(time) {
      var args = lastArgs,
          thisArg = lastThis;

      lastArgs = lastThis = undefined;
      lastInvokeTime = time;
      result = func.apply(thisArg, args);
      return result;
    }

    function leadingEdge(time) {
      // Reset any `maxWait` timer.
      lastInvokeTime = time;
      // Start the timer for the trailing edge.
      timerId = setTimeout(timerExpired, wait);
      // Invoke the leading edge.
      return leading ? invokeFunc(time) : result;
    }

    function remainingWait(time) {
      var timeSinceLastCall = time - lastCallTime,
          timeSinceLastInvoke = time - lastInvokeTime,
          result = wait - timeSinceLastCall;

      return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
    }

    function shouldInvoke(time) {
      var timeSinceLastCall = time - lastCallTime,
          timeSinceLastInvoke = time - lastInvokeTime;

      // Either this is the first call, activity has stopped and we're at the
      // trailing edge, the system time has gone backwards and we're treating
      // it as the trailing edge, or we've hit the `maxWait` limit.
      return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
        (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
    }

    function timerExpired() {
      var time = now();
      if (shouldInvoke(time)) {
        return trailingEdge(time);
      }
      // Restart the timer.
      timerId = setTimeout(timerExpired, remainingWait(time));
    }

    function trailingEdge(time) {
      timerId = undefined;

      // Only invoke if we have `lastArgs` which means `func` has been
      // debounced at least once.
      if (trailing && lastArgs) {
        return invokeFunc(time);
      }
      lastArgs = lastThis = undefined;
      return result;
    }

    function cancel() {
      if (timerId !== undefined) {
        clearTimeout(timerId);
      }
      lastInvokeTime = 0;
      lastArgs = lastCallTime = lastThis = timerId = undefined;
    }

    function flush() {
      return timerId === undefined ? result : trailingEdge(now());
    }

    function debounced() {
      var time = now(),
          isInvoking = shouldInvoke(time);

      lastArgs = arguments;
      lastThis = this;
      lastCallTime = time;

      if (isInvoking) {
        if (timerId === undefined) {
          return leadingEdge(lastCallTime);
        }
        if (maxing) {
          // Handle invocations in a tight loop.
          timerId = setTimeout(timerExpired, wait);
          return invokeFunc(lastCallTime);
        }
      }
      if (timerId === undefined) {
        timerId = setTimeout(timerExpired, wait);
      }
      return result;
    }
    debounced.cancel = cancel;
    debounced.flush = flush;
    return debounced;
  }

  /**
   * Creates a throttled function that only invokes `func` at most once per
   * every `wait` milliseconds. The throttled function comes with a `cancel`
   * method to cancel delayed `func` invocations and a `flush` method to
   * immediately invoke them. Provide `options` to indicate whether `func`
   * should be invoked on the leading and/or trailing edge of the `wait`
   * timeout. The `func` is invoked with the last arguments provided to the
   * throttled function. Subsequent calls to the throttled function return the
   * result of the last `func` invocation.
   *
   * **Note:** If `leading` and `trailing` options are `true`, `func` is
   * invoked on the trailing edge of the timeout only if the throttled function
   * is invoked more than once during the `wait` timeout.
   *
   * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
   * until to the next tick, similar to `setTimeout` with a timeout of `0`.
   *
   * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
   * for details over the differences between `_.throttle` and `_.debounce`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to throttle.
   * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
   * @param {Object} [options={}] The options object.
   * @param {boolean} [options.leading=true]
   *  Specify invoking on the leading edge of the timeout.
   * @param {boolean} [options.trailing=true]
   *  Specify invoking on the trailing edge of the timeout.
   * @returns {Function} Returns the new throttled function.
   * @example
   *
   * // Avoid excessively updating the position while scrolling.
   * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
   *
   * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
   * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
   * jQuery(element).on('click', throttled);
   *
   * // Cancel the trailing throttled invocation.
   * jQuery(window).on('popstate', throttled.cancel);
   */
  function throttle(func, wait, options) {
    var leading = true,
        trailing = true;

    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    if (isObject(options)) {
      leading = 'leading' in options ? !!options.leading : leading;
      trailing = 'trailing' in options ? !!options.trailing : trailing;
    }
    return debounce(func, wait, {
      'leading': leading,
      'maxWait': wait,
      'trailing': trailing
    });
  }

  /**
   * Checks if `value` is the
   * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
   * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an object, else `false`.
   * @example
   *
   * _.isObject({});
   * // => true
   *
   * _.isObject([1, 2, 3]);
   * // => true
   *
   * _.isObject(_.noop);
   * // => true
   *
   * _.isObject(null);
   * // => false
   */
  function isObject(value) {
    var type = typeof value;
    return !!value && (type == 'object' || type == 'function');
  }

  /**
   * Checks if `value` is object-like. A value is object-like if it's not `null`
   * and has a `typeof` result of "object".
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
   * @example
   *
   * _.isObjectLike({});
   * // => true
   *
   * _.isObjectLike([1, 2, 3]);
   * // => true
   *
   * _.isObjectLike(_.noop);
   * // => false
   *
   * _.isObjectLike(null);
   * // => false
   */
  function isObjectLike(value) {
    return !!value && typeof value == 'object';
  }

  /**
   * Checks if `value` is classified as a `Symbol` primitive or object.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
   * @example
   *
   * _.isSymbol(Symbol.iterator);
   * // => true
   *
   * _.isSymbol('abc');
   * // => false
   */
  function isSymbol(value) {
    return typeof value == 'symbol' ||
      (isObjectLike(value) && objectToString.call(value) == symbolTag);
  }

  /**
   * Converts `value` to a number.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to process.
   * @returns {number} Returns the number.
   * @example
   *
   * _.toNumber(3.2);
   * // => 3.2
   *
   * _.toNumber(Number.MIN_VALUE);
   * // => 5e-324
   *
   * _.toNumber(Infinity);
   * // => Infinity
   *
   * _.toNumber('3.2');
   * // => 3.2
   */
  function toNumber(value) {
    if (typeof value == 'number') {
      return value;
    }
    if (isSymbol(value)) {
      return NAN;
    }
    if (isObject(value)) {
      var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
      value = isObject(other) ? (other + '') : other;
    }
    if (typeof value != 'string') {
      return value === 0 ? value : +value;
    }
    value = value.replace(reTrim, '');
    var isBinary = reIsBinary.test(value);
    return (isBinary || reIsOctal.test(value))
      ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
      : (reIsBadHex.test(value) ? NAN : +value);
  }

  module.exports = throttle;


  /***/ }),
  /* 20 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  // Gets all non-builtin properties up the prototype chain
  const getAllProperties = object => {
  	const props = new Set();

  	do {
  		for (const key of Reflect.ownKeys(object)) {
  			props.add([object, key]);
  		}
  	} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);

  	return props;
  };

  module.exports = (self, options) => {
  	options = Object.assign({}, options);

  	const filter = key => {
  		const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);

  		if (options.include) {
  			return options.include.some(match);
  		}

  		if (options.exclude) {
  			return !options.exclude.some(match);
  		}

  		return true;
  	};

  	for (const [object, key] of getAllProperties(self.constructor.prototype)) {
  		if (key === 'constructor' || !filter(key)) {
  			continue;
  		}

  		const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
  		if (descriptor && typeof descriptor.value === 'function') {
  			self[key] = self[key].bind(self);
  		}
  	}

  	return self;
  };

  const excludedReactMethods = [
  	'componentWillMount',
  	'UNSAFE_componentWillMount',
  	'render',
  	'getSnapshotBeforeUpdate',
  	'componentDidMount',
  	'componentWillReceiveProps',
  	'UNSAFE_componentWillReceiveProps',
  	'shouldComponentUpdate',
  	'componentWillUpdate',
  	'UNSAFE_componentWillUpdate',
  	'componentDidUpdate',
  	'componentWillUnmount',
  	'componentDidCatch',
  	'setState',
  	'forceUpdate'
  ];

  module.exports.react = (self, options) => {
  	options = Object.assign({}, options);
  	options.exclude = (options.exclude || []).concat(excludedReactMethods);
  	return module.exports(self, options);
  };


  /***/ }),
  /* 21 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const ansiEscapes = __webpack_require__(22);
  const cliCursor = __webpack_require__(23);
  const wrapAnsi = __webpack_require__(31);

  const getWidth = stream => {
  	const {columns} = stream;

  	if (!columns) {
  		return 80;
  	}

  	// Windows appears to wrap a character early
  	// I hate Windows so much
  	if (process.platform === 'win32') {
  		return columns - 1;
  	}

  	return columns;
  };

  const main = (stream, options) => {
  	options = Object.assign({
  		showCursor: false
  	}, options);

  	let prevLineCount = 0;

  	const render = (...args) => {
  		if (!options.showCursor) {
  			cliCursor.hide();
  		}

  		let out = args.join(' ') + '\n';
  		out = wrapAnsi(out, getWidth(stream), {
  			trim: false,
  			hard: true,
  			wordWrap: false
  		});
  		stream.write(ansiEscapes.eraseLines(prevLineCount) + out);
  		prevLineCount = out.split('\n').length;
  	};

  	render.clear = () => {
  		stream.write(ansiEscapes.eraseLines(prevLineCount));
  		prevLineCount = 0;
  	};

  	render.done = () => {
  		prevLineCount = 0;

  		if (!options.showCursor) {
  			cliCursor.show();
  		}
  	};

  	return render;
  };

  module.exports = main(process.stdout);
  // TODO: Remove this for the next major release
  module.exports.default = module.exports;
  module.exports.stderr = main(process.stderr);
  module.exports.create = main;


  /***/ }),
  /* 22 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const x = module.exports;
  const ESC = '\u001B[';
  const OSC = '\u001B]';
  const BEL = '\u0007';
  const SEP = ';';
  const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';

  x.cursorTo = (x, y) => {
  	if (typeof x !== 'number') {
  		throw new TypeError('The `x` argument is required');
  	}

  	if (typeof y !== 'number') {
  		return ESC + (x + 1) + 'G';
  	}

  	return ESC + (y + 1) + ';' + (x + 1) + 'H';
  };

  x.cursorMove = (x, y) => {
  	if (typeof x !== 'number') {
  		throw new TypeError('The `x` argument is required');
  	}

  	let ret = '';

  	if (x < 0) {
  		ret += ESC + (-x) + 'D';
  	} else if (x > 0) {
  		ret += ESC + x + 'C';
  	}

  	if (y < 0) {
  		ret += ESC + (-y) + 'A';
  	} else if (y > 0) {
  		ret += ESC + y + 'B';
  	}

  	return ret;
  };

  x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
  x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
  x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
  x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';

  x.cursorLeft = ESC + 'G';
  x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
  x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
  x.cursorGetPosition = ESC + '6n';
  x.cursorNextLine = ESC + 'E';
  x.cursorPrevLine = ESC + 'F';
  x.cursorHide = ESC + '?25l';
  x.cursorShow = ESC + '?25h';

  x.eraseLines = count => {
  	let clear = '';

  	for (let i = 0; i < count; i++) {
  		clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
  	}

  	if (count) {
  		clear += x.cursorLeft;
  	}

  	return clear;
  };

  x.eraseEndLine = ESC + 'K';
  x.eraseStartLine = ESC + '1K';
  x.eraseLine = ESC + '2K';
  x.eraseDown = ESC + 'J';
  x.eraseUp = ESC + '1J';
  x.eraseScreen = ESC + '2J';
  x.scrollUp = ESC + 'S';
  x.scrollDown = ESC + 'T';

  x.clearScreen = '\u001Bc';

  x.clearTerminal = process.platform === 'win32' ?
  	`${x.eraseScreen}${ESC}0f` :
  	// 1. Erases the screen (Only done in case `2` is not supported)
  	// 2. Erases the whole screen including scrollback buffer
  	// 3. Moves cursor to the top-left position
  	// More info: https://www.real-world-systems.com/docs/ANSIcode.html
  	`${x.eraseScreen}${ESC}3J${ESC}H`;

  x.beep = BEL;

  x.link = (text, url) => {
  	return [
  		OSC,
  		'8',
  		SEP,
  		SEP,
  		url,
  		BEL,
  		text,
  		OSC,
  		'8',
  		SEP,
  		SEP,
  		BEL
  	].join('');
  };

  x.image = (buf, opts) => {
  	opts = opts || {};

  	let ret = OSC + '1337;File=inline=1';

  	if (opts.width) {
  		ret += `;width=${opts.width}`;
  	}

  	if (opts.height) {
  		ret += `;height=${opts.height}`;
  	}

  	if (opts.preserveAspectRatio === false) {
  		ret += ';preserveAspectRatio=0';
  	}

  	return ret + ':' + buf.toString('base64') + BEL;
  };

  x.iTerm = {};

  x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;


  /***/ }),
  /* 23 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const restoreCursor = __webpack_require__(24);

  let hidden = false;

  exports.show = stream => {
  	const s = stream || process.stderr;

  	if (!s.isTTY) {
  		return;
  	}

  	hidden = false;
  	s.write('\u001b[?25h');
  };

  exports.hide = stream => {
  	const s = stream || process.stderr;

  	if (!s.isTTY) {
  		return;
  	}

  	restoreCursor();
  	hidden = true;
  	s.write('\u001b[?25l');
  };

  exports.toggle = (force, stream) => {
  	if (force !== undefined) {
  		hidden = force;
  	}

  	if (hidden) {
  		exports.show(stream);
  	} else {
  		exports.hide(stream);
  	}
  };


  /***/ }),
  /* 24 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const onetime = __webpack_require__(25);
  const signalExit = __webpack_require__(27);

  module.exports = onetime(() => {
  	signalExit(() => {
  		process.stderr.write('\u001b[?25h');
  	}, {alwaysLast: true});
  });


  /***/ }),
  /* 25 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const mimicFn = __webpack_require__(26);

  module.exports = (fn, opts) => {
  	// TODO: Remove this in v3
  	if (opts === true) {
  		throw new TypeError('The second argument is now an options object');
  	}

  	if (typeof fn !== 'function') {
  		throw new TypeError('Expected a function');
  	}

  	opts = opts || {};

  	let ret;
  	let called = false;
  	const fnName = fn.displayName || fn.name || '<anonymous>';

  	const onetime = function () {
  		if (called) {
  			if (opts.throw === true) {
  				throw new Error(`Function \`${fnName}\` can only be called once`);
  			}

  			return ret;
  		}

  		called = true;
  		ret = fn.apply(this, arguments);
  		fn = null;

  		return ret;
  	};

  	mimicFn(onetime, fn);

  	return onetime;
  };


  /***/ }),
  /* 26 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  module.exports = (to, from) => {
  	// TODO: use `Reflect.ownKeys()` when targeting Node.js 6
  	for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
  		Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
  	}

  	return to;
  };


  /***/ }),
  /* 27 */
  /***/ (function(module, exports, __webpack_require__) {

  // Note: since nyc uses this module to output coverage, any lines
  // that are in the direct sync flow of nyc's outputCoverage are
  // ignored, since we can never get coverage for them.
  var assert = __webpack_require__(28)
  var signals = __webpack_require__(29)

  var EE = __webpack_require__(30)
  /* istanbul ignore if */
  if (typeof EE !== 'function') {
    EE = EE.EventEmitter
  }

  var emitter
  if (process.__signal_exit_emitter__) {
    emitter = process.__signal_exit_emitter__
  } else {
    emitter = process.__signal_exit_emitter__ = new EE()
    emitter.count = 0
    emitter.emitted = {}
  }

  // Because this emitter is a global, we have to check to see if a
  // previous version of this library failed to enable infinite listeners.
  // I know what you're about to say.  But literally everything about
  // signal-exit is a compromise with evil.  Get used to it.
  if (!emitter.infinite) {
    emitter.setMaxListeners(Infinity)
    emitter.infinite = true
  }

  module.exports = function (cb, opts) {
    assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')

    if (loaded === false) {
      load()
    }

    var ev = 'exit'
    if (opts && opts.alwaysLast) {
      ev = 'afterexit'
    }

    var remove = function () {
      emitter.removeListener(ev, cb)
      if (emitter.listeners('exit').length === 0 &&
          emitter.listeners('afterexit').length === 0) {
        unload()
      }
    }
    emitter.on(ev, cb)

    return remove
  }

  module.exports.unload = unload
  function unload () {
    if (!loaded) {
      return
    }
    loaded = false

    signals.forEach(function (sig) {
      try {
        process.removeListener(sig, sigListeners[sig])
      } catch (er) {}
    })
    process.emit = originalProcessEmit
    process.reallyExit = originalProcessReallyExit
    emitter.count -= 1
  }

  function emit (event, code, signal) {
    if (emitter.emitted[event]) {
      return
    }
    emitter.emitted[event] = true
    emitter.emit(event, code, signal)
  }

  // { <signal>: <listener fn>, ... }
  var sigListeners = {}
  signals.forEach(function (sig) {
    sigListeners[sig] = function listener () {
      // If there are no other listeners, an exit is coming!
      // Simplest way: remove us and then re-send the signal.
      // We know that this will kill the process, so we can
      // safely emit now.
      var listeners = process.listeners(sig)
      if (listeners.length === emitter.count) {
        unload()
        emit('exit', null, sig)
        /* istanbul ignore next */
        emit('afterexit', null, sig)
        /* istanbul ignore next */
        process.kill(process.pid, sig)
      }
    }
  })

  module.exports.signals = function () {
    return signals
  }

  module.exports.load = load

  var loaded = false

  function load () {
    if (loaded) {
      return
    }
    loaded = true

    // This is the number of onSignalExit's that are in play.
    // It's important so that we can count the correct number of
    // listeners on signals, and don't wait for the other one to
    // handle it instead of us.
    emitter.count += 1

    signals = signals.filter(function (sig) {
      try {
        process.on(sig, sigListeners[sig])
        return true
      } catch (er) {
        return false
      }
    })

    process.emit = processEmit
    process.reallyExit = processReallyExit
  }

  var originalProcessReallyExit = process.reallyExit
  function processReallyExit (code) {
    process.exitCode = code || 0
    emit('exit', process.exitCode, null)
    /* istanbul ignore next */
    emit('afterexit', process.exitCode, null)
    /* istanbul ignore next */
    originalProcessReallyExit.call(process, process.exitCode)
  }

  var originalProcessEmit = process.emit
  function processEmit (ev, arg) {
    if (ev === 'exit') {
      if (arg !== undefined) {
        process.exitCode = arg
      }
      var ret = originalProcessEmit.apply(this, arguments)
      emit('exit', process.exitCode, null)
      /* istanbul ignore next */
      emit('afterexit', process.exitCode, null)
      return ret
    } else {
      return originalProcessEmit.apply(this, arguments)
    }
  }


  /***/ }),
  /* 28 */
  /***/ (function(module, exports) {

  module.exports = require("assert");

  /***/ }),
  /* 29 */
  /***/ (function(module, exports) {

  // This is not the set of all possible signals.
  //
  // It IS, however, the set of all signals that trigger
  // an exit on either Linux or BSD systems.  Linux is a
  // superset of the signal names supported on BSD, and
  // the unknown signals just fail to register, so we can
  // catch that easily enough.
  //
  // Don't bother with SIGKILL.  It's uncatchable, which
  // means that we can't fire any callbacks anyway.
  //
  // If a user does happen to register a handler on a non-
  // fatal signal like SIGWINCH or something, and then
  // exit, it'll end up firing `process.emit('exit')`, so
  // the handler will be fired anyway.
  //
  // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
  // artificially, inherently leave the process in a
  // state from which it is not safe to try and enter JS
  // listeners.
  module.exports = [
    'SIGABRT',
    'SIGALRM',
    'SIGHUP',
    'SIGINT',
    'SIGTERM'
  ]

  if (process.platform !== 'win32') {
    module.exports.push(
      'SIGVTALRM',
      'SIGXCPU',
      'SIGXFSZ',
      'SIGUSR2',
      'SIGTRAP',
      'SIGSYS',
      'SIGQUIT',
      'SIGIOT'
      // should detect profiler and enable/disable accordingly.
      // see #21
      // 'SIGPROF'
    )
  }

  if (process.platform === 'linux') {
    module.exports.push(
      'SIGIO',
      'SIGPOLL',
      'SIGPWR',
      'SIGSTKFLT',
      'SIGUNUSED'
    )
  }


  /***/ }),
  /* 30 */
  /***/ (function(module, exports) {

  module.exports = require("events");

  /***/ }),
  /* 31 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const stringWidth = __webpack_require__(32);
  const stripAnsi = __webpack_require__(33);
  const ansiStyles = __webpack_require__(37);

  const ESCAPES = new Set([
  	'\u001B',
  	'\u009B'
  ]);

  const END_CODE = 39;

  const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`;

  // Calculate the length of words split on ' ', ignoring
  // the extra characters added by ansi escape codes
  const wordLengths = string => string.split(' ').map(character => stringWidth(character));

  // Wrap a long word across multiple rows
  // Ansi escape codes do not count towards length
  const wrapWord = (rows, word, columns) => {
  	const characters = [...word];

  	let insideEscape = false;
  	let visible = stringWidth(stripAnsi(rows[rows.length - 1]));

  	for (const [index, character] of characters.entries()) {
  		const characterLength = stringWidth(character);

  		if (visible + characterLength <= columns) {
  			rows[rows.length - 1] += character;
  		} else {
  			rows.push(character);
  			visible = 0;
  		}

  		if (ESCAPES.has(character)) {
  			insideEscape = true;
  		} else if (insideEscape && character === 'm') {
  			insideEscape = false;
  			continue;
  		}

  		if (insideEscape) {
  			continue;
  		}

  		visible += characterLength;

  		if (visible === columns && index < characters.length - 1) {
  			rows.push('');
  			visible = 0;
  		}
  	}

  	// It's possible that the last row we copy over is only
  	// ansi escape characters, handle this edge-case
  	if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
  		rows[rows.length - 2] += rows.pop();
  	}
  };

  // Trims spaces from a string ignoring invisible sequences
  const stringVisibleTrimSpacesRight = str => {
  	const words = str.split(' ');
  	let last = words.length;

  	while (last > 0) {
  		if (stringWidth(words[last - 1]) > 0) {
  			break;
  		}

  		last--;
  	}

  	if (last === words.length) {
  		return str;
  	}

  	return words.slice(0, last).join(' ') + words.slice(last).join('');
  };

  // The wrap-ansi module can be invoked
  // in either 'hard' or 'soft' wrap mode
  //
  // 'hard' will never allow a string to take up more
  // than columns characters
  //
  // 'soft' allows long words to expand past the column length
  const exec = (string, columns, options = {}) => {
  	if (options.trim !== false && string.trim() === '') {
  		return '';
  	}

  	let pre = '';
  	let ret = '';
  	let escapeCode;

  	const lengths = wordLengths(string);
  	let rows = [''];

  	for (const [index, word] of string.split(' ').entries()) {
  		if (options.trim !== false) {
  			rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
  		}

  		let rowLength = stringWidth(rows[rows.length - 1]);

  		if (index !== 0) {
  			if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
  				// If we start with a new word but the current row length equals the length of the columns, add a new row
  				rows.push('');
  				rowLength = 0;
  			}

  			if (rowLength > 0 || options.trim === false) {
  				rows[rows.length - 1] += ' ';
  				rowLength++;
  			}
  		}

  		// In 'hard' wrap mode, the length of a line is
  		// never allowed to extend past 'columns'
  		if (options.hard && lengths[index] > columns) {
  			const remainingColumns = (columns - rowLength);
  			const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
  			const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
  			if (breaksStartingNextLine < breaksStartingThisLine) {
  				rows.push('');
  			}

  			wrapWord(rows, word, columns);
  			continue;
  		}

  		if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
  			if (options.wordWrap === false && rowLength < columns) {
  				wrapWord(rows, word, columns);
  				continue;
  			}

  			rows.push('');
  		}

  		if (rowLength + lengths[index] > columns && options.wordWrap === false) {
  			wrapWord(rows, word, columns);
  			continue;
  		}

  		rows[rows.length - 1] += word;
  	}

  	if (options.trim !== false) {
  		rows = rows.map(stringVisibleTrimSpacesRight);
  	}

  	pre = rows.join('\n');

  	for (const [index, character] of [...pre].entries()) {
  		ret += character;

  		if (ESCAPES.has(character)) {
  			const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
  			escapeCode = code === END_CODE ? null : code;
  		}

  		const code = ansiStyles.codes.get(Number(escapeCode));

  		if (escapeCode && code) {
  			if (pre[index + 1] === '\n') {
  				ret += wrapAnsi(code);
  			} else if (character === '\n') {
  				ret += wrapAnsi(escapeCode);
  			}
  		}
  	}

  	return ret;
  };

  // For each newline, invoke the method separately
  module.exports = (string, columns, options) => {
  	return String(string)
  		.normalize()
  		.split('\n')
  		.map(line => exec(line, columns, options))
  		.join('\n');
  };


  /***/ }),
  /* 32 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const stripAnsi = __webpack_require__(33);
  const isFullwidthCodePoint = __webpack_require__(35);
  const emojiRegex = __webpack_require__(36)();

  module.exports = input => {
  	input = input.replace(emojiRegex, '  ');

  	if (typeof input !== 'string' || input.length === 0) {
  		return 0;
  	}

  	input = stripAnsi(input);

  	let width = 0;

  	for (let i = 0; i < input.length; i++) {
  		const code = input.codePointAt(i);

  		// Ignore control characters
  		if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
  			continue;
  		}

  		// Ignore combining characters
  		if (code >= 0x300 && code <= 0x36F) {
  			continue;
  		}

  		// Surrogates
  		if (code > 0xFFFF) {
  			i++;
  		}

  		width += isFullwidthCodePoint(code) ? 2 : 1;
  	}

  	return width;
  };


  /***/ }),
  /* 33 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const ansiRegex = __webpack_require__(34);

  module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;


  /***/ }),
  /* 34 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  module.exports = options => {
  	options = Object.assign({
  		onlyFirst: false
  	}, options);

  	const pattern = [
  		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
  		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
  	].join('|');

  	return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
  };


  /***/ }),
  /* 35 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  /* eslint-disable yoda */
  module.exports = x => {
  	if (Number.isNaN(x)) {
  		return false;
  	}

  	// code points are derived from:
  	// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
  	if (
  		x >= 0x1100 && (
  			x <= 0x115f ||  // Hangul Jamo
  			x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
  			x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
  			// CJK Radicals Supplement .. Enclosed CJK Letters and Months
  			(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
  			// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
  			(0x3250 <= x && x <= 0x4dbf) ||
  			// CJK Unified Ideographs .. Yi Radicals
  			(0x4e00 <= x && x <= 0xa4c6) ||
  			// Hangul Jamo Extended-A
  			(0xa960 <= x && x <= 0xa97c) ||
  			// Hangul Syllables
  			(0xac00 <= x && x <= 0xd7a3) ||
  			// CJK Compatibility Ideographs
  			(0xf900 <= x && x <= 0xfaff) ||
  			// Vertical Forms
  			(0xfe10 <= x && x <= 0xfe19) ||
  			// CJK Compatibility Forms .. Small Form Variants
  			(0xfe30 <= x && x <= 0xfe6b) ||
  			// Halfwidth and Fullwidth Forms
  			(0xff01 <= x && x <= 0xff60) ||
  			(0xffe0 <= x && x <= 0xffe6) ||
  			// Kana Supplement
  			(0x1b000 <= x && x <= 0x1b001) ||
  			// Enclosed Ideographic Supplement
  			(0x1f200 <= x && x <= 0x1f251) ||
  			// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
  			(0x20000 <= x && x <= 0x3fffd)
  		)
  	) {
  		return true;
  	}

  	return false;
  };


  /***/ }),
  /* 36 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  module.exports = function () {
    // https://mths.be/emoji
    return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;
  };


  /***/ }),
  /* 37 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /* WEBPACK VAR INJECTION */(function(module) {
  const colorConvert = __webpack_require__(39);

  const wrapAnsi16 = (fn, offset) => function () {
  	const code = fn.apply(colorConvert, arguments);
  	return `\u001B[${code + offset}m`;
  };

  const wrapAnsi256 = (fn, offset) => function () {
  	const code = fn.apply(colorConvert, arguments);
  	return `\u001B[${38 + offset};5;${code}m`;
  };

  const wrapAnsi16m = (fn, offset) => function () {
  	const rgb = fn.apply(colorConvert, arguments);
  	return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  };

  function assembleStyles() {
  	const codes = new Map();
  	const styles = {
  		modifier: {
  			reset: [0, 0],
  			// 21 isn't widely supported and 22 does the same thing
  			bold: [1, 22],
  			dim: [2, 22],
  			italic: [3, 23],
  			underline: [4, 24],
  			inverse: [7, 27],
  			hidden: [8, 28],
  			strikethrough: [9, 29]
  		},
  		color: {
  			black: [30, 39],
  			red: [31, 39],
  			green: [32, 39],
  			yellow: [33, 39],
  			blue: [34, 39],
  			magenta: [35, 39],
  			cyan: [36, 39],
  			white: [37, 39],
  			gray: [90, 39],

  			// Bright color
  			redBright: [91, 39],
  			greenBright: [92, 39],
  			yellowBright: [93, 39],
  			blueBright: [94, 39],
  			magentaBright: [95, 39],
  			cyanBright: [96, 39],
  			whiteBright: [97, 39]
  		},
  		bgColor: {
  			bgBlack: [40, 49],
  			bgRed: [41, 49],
  			bgGreen: [42, 49],
  			bgYellow: [43, 49],
  			bgBlue: [44, 49],
  			bgMagenta: [45, 49],
  			bgCyan: [46, 49],
  			bgWhite: [47, 49],

  			// Bright color
  			bgBlackBright: [100, 49],
  			bgRedBright: [101, 49],
  			bgGreenBright: [102, 49],
  			bgYellowBright: [103, 49],
  			bgBlueBright: [104, 49],
  			bgMagentaBright: [105, 49],
  			bgCyanBright: [106, 49],
  			bgWhiteBright: [107, 49]
  		}
  	};

  	// Fix humans
  	styles.color.grey = styles.color.gray;

  	for (const groupName of Object.keys(styles)) {
  		const group = styles[groupName];

  		for (const styleName of Object.keys(group)) {
  			const style = group[styleName];

  			styles[styleName] = {
  				open: `\u001B[${style[0]}m`,
  				close: `\u001B[${style[1]}m`
  			};

  			group[styleName] = styles[styleName];

  			codes.set(style[0], style[1]);
  		}

  		Object.defineProperty(styles, groupName, {
  			value: group,
  			enumerable: false
  		});

  		Object.defineProperty(styles, 'codes', {
  			value: codes,
  			enumerable: false
  		});
  	}

  	const ansi2ansi = n => n;
  	const rgb2rgb = (r, g, b) => [r, g, b];

  	styles.color.close = '\u001B[39m';
  	styles.bgColor.close = '\u001B[49m';

  	styles.color.ansi = {
  		ansi: wrapAnsi16(ansi2ansi, 0)
  	};
  	styles.color.ansi256 = {
  		ansi256: wrapAnsi256(ansi2ansi, 0)
  	};
  	styles.color.ansi16m = {
  		rgb: wrapAnsi16m(rgb2rgb, 0)
  	};

  	styles.bgColor.ansi = {
  		ansi: wrapAnsi16(ansi2ansi, 10)
  	};
  	styles.bgColor.ansi256 = {
  		ansi256: wrapAnsi256(ansi2ansi, 10)
  	};
  	styles.bgColor.ansi16m = {
  		rgb: wrapAnsi16m(rgb2rgb, 10)
  	};

  	for (let key of Object.keys(colorConvert)) {
  		if (typeof colorConvert[key] !== 'object') {
  			continue;
  		}

  		const suite = colorConvert[key];

  		if (key === 'ansi16') {
  			key = 'ansi';
  		}

  		if ('ansi16' in suite) {
  			styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  			styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  		}

  		if ('ansi256' in suite) {
  			styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  			styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  		}

  		if ('rgb' in suite) {
  			styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  			styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  		}
  	}

  	return styles;
  }

  // Make the export immutable
  Object.defineProperty(module, 'exports', {
  	enumerable: true,
  	get: assembleStyles
  });

  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(38)(module)))

  /***/ }),
  /* 38 */
  /***/ (function(module, exports) {

  module.exports = function(module) {
  	if (!module.webpackPolyfill) {
  		module.deprecate = function() {};
  		module.paths = [];
  		// module.parent = undefined by default
  		if (!module.children) module.children = [];
  		Object.defineProperty(module, "loaded", {
  			enumerable: true,
  			get: function() {
  				return module.l;
  			}
  		});
  		Object.defineProperty(module, "id", {
  			enumerable: true,
  			get: function() {
  				return module.i;
  			}
  		});
  		module.webpackPolyfill = 1;
  	}
  	return module;
  };


  /***/ }),
  /* 39 */
  /***/ (function(module, exports, __webpack_require__) {

  var conversions = __webpack_require__(40);
  var route = __webpack_require__(42);

  var convert = {};

  var models = Object.keys(conversions);

  function wrapRaw(fn) {
  	var wrappedFn = function (args) {
  		if (args === undefined || args === null) {
  			return args;
  		}

  		if (arguments.length > 1) {
  			args = Array.prototype.slice.call(arguments);
  		}

  		return fn(args);
  	};

  	// preserve .conversion property if there is one
  	if ('conversion' in fn) {
  		wrappedFn.conversion = fn.conversion;
  	}

  	return wrappedFn;
  }

  function wrapRounded(fn) {
  	var wrappedFn = function (args) {
  		if (args === undefined || args === null) {
  			return args;
  		}

  		if (arguments.length > 1) {
  			args = Array.prototype.slice.call(arguments);
  		}

  		var result = fn(args);

  		// we're assuming the result is an array here.
  		// see notice in conversions.js; don't use box types
  		// in conversion functions.
  		if (typeof result === 'object') {
  			for (var len = result.length, i = 0; i < len; i++) {
  				result[i] = Math.round(result[i]);
  			}
  		}

  		return result;
  	};

  	// preserve .conversion property if there is one
  	if ('conversion' in fn) {
  		wrappedFn.conversion = fn.conversion;
  	}

  	return wrappedFn;
  }

  models.forEach(function (fromModel) {
  	convert[fromModel] = {};

  	Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
  	Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});

  	var routes = route(fromModel);
  	var routeModels = Object.keys(routes);

  	routeModels.forEach(function (toModel) {
  		var fn = routes[toModel];

  		convert[fromModel][toModel] = wrapRounded(fn);
  		convert[fromModel][toModel].raw = wrapRaw(fn);
  	});
  });

  module.exports = convert;


  /***/ }),
  /* 40 */
  /***/ (function(module, exports, __webpack_require__) {

  /* MIT license */
  var cssKeywords = __webpack_require__(41);

  // NOTE: conversions should only return primitive values (i.e. arrays, or
  //       values that give correct `typeof` results).
  //       do not use box values types (i.e. Number(), String(), etc.)

  var reverseKeywords = {};
  for (var key in cssKeywords) {
  	if (cssKeywords.hasOwnProperty(key)) {
  		reverseKeywords[cssKeywords[key]] = key;
  	}
  }

  var convert = module.exports = {
  	rgb: {channels: 3, labels: 'rgb'},
  	hsl: {channels: 3, labels: 'hsl'},
  	hsv: {channels: 3, labels: 'hsv'},
  	hwb: {channels: 3, labels: 'hwb'},
  	cmyk: {channels: 4, labels: 'cmyk'},
  	xyz: {channels: 3, labels: 'xyz'},
  	lab: {channels: 3, labels: 'lab'},
  	lch: {channels: 3, labels: 'lch'},
  	hex: {channels: 1, labels: ['hex']},
  	keyword: {channels: 1, labels: ['keyword']},
  	ansi16: {channels: 1, labels: ['ansi16']},
  	ansi256: {channels: 1, labels: ['ansi256']},
  	hcg: {channels: 3, labels: ['h', 'c', 'g']},
  	apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
  	gray: {channels: 1, labels: ['gray']}
  };

  // hide .channels and .labels properties
  for (var model in convert) {
  	if (convert.hasOwnProperty(model)) {
  		if (!('channels' in convert[model])) {
  			throw new Error('missing channels property: ' + model);
  		}

  		if (!('labels' in convert[model])) {
  			throw new Error('missing channel labels property: ' + model);
  		}

  		if (convert[model].labels.length !== convert[model].channels) {
  			throw new Error('channel and label counts mismatch: ' + model);
  		}

  		var channels = convert[model].channels;
  		var labels = convert[model].labels;
  		delete convert[model].channels;
  		delete convert[model].labels;
  		Object.defineProperty(convert[model], 'channels', {value: channels});
  		Object.defineProperty(convert[model], 'labels', {value: labels});
  	}
  }

  convert.rgb.hsl = function (rgb) {
  	var r = rgb[0] / 255;
  	var g = rgb[1] / 255;
  	var b = rgb[2] / 255;
  	var min = Math.min(r, g, b);
  	var max = Math.max(r, g, b);
  	var delta = max - min;
  	var h;
  	var s;
  	var l;

  	if (max === min) {
  		h = 0;
  	} else if (r === max) {
  		h = (g - b) / delta;
  	} else if (g === max) {
  		h = 2 + (b - r) / delta;
  	} else if (b === max) {
  		h = 4 + (r - g) / delta;
  	}

  	h = Math.min(h * 60, 360);

  	if (h < 0) {
  		h += 360;
  	}

  	l = (min + max) / 2;

  	if (max === min) {
  		s = 0;
  	} else if (l <= 0.5) {
  		s = delta / (max + min);
  	} else {
  		s = delta / (2 - max - min);
  	}

  	return [h, s * 100, l * 100];
  };

  convert.rgb.hsv = function (rgb) {
  	var rdif;
  	var gdif;
  	var bdif;
  	var h;
  	var s;

  	var r = rgb[0] / 255;
  	var g = rgb[1] / 255;
  	var b = rgb[2] / 255;
  	var v = Math.max(r, g, b);
  	var diff = v - Math.min(r, g, b);
  	var diffc = function (c) {
  		return (v - c) / 6 / diff + 1 / 2;
  	};

  	if (diff === 0) {
  		h = s = 0;
  	} else {
  		s = diff / v;
  		rdif = diffc(r);
  		gdif = diffc(g);
  		bdif = diffc(b);

  		if (r === v) {
  			h = bdif - gdif;
  		} else if (g === v) {
  			h = (1 / 3) + rdif - bdif;
  		} else if (b === v) {
  			h = (2 / 3) + gdif - rdif;
  		}
  		if (h < 0) {
  			h += 1;
  		} else if (h > 1) {
  			h -= 1;
  		}
  	}

  	return [
  		h * 360,
  		s * 100,
  		v * 100
  	];
  };

  convert.rgb.hwb = function (rgb) {
  	var r = rgb[0];
  	var g = rgb[1];
  	var b = rgb[2];
  	var h = convert.rgb.hsl(rgb)[0];
  	var w = 1 / 255 * Math.min(r, Math.min(g, b));

  	b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));

  	return [h, w * 100, b * 100];
  };

  convert.rgb.cmyk = function (rgb) {
  	var r = rgb[0] / 255;
  	var g = rgb[1] / 255;
  	var b = rgb[2] / 255;
  	var c;
  	var m;
  	var y;
  	var k;

  	k = Math.min(1 - r, 1 - g, 1 - b);
  	c = (1 - r - k) / (1 - k) || 0;
  	m = (1 - g - k) / (1 - k) || 0;
  	y = (1 - b - k) / (1 - k) || 0;

  	return [c * 100, m * 100, y * 100, k * 100];
  };

  /**
   * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
   * */
  function comparativeDistance(x, y) {
  	return (
  		Math.pow(x[0] - y[0], 2) +
  		Math.pow(x[1] - y[1], 2) +
  		Math.pow(x[2] - y[2], 2)
  	);
  }

  convert.rgb.keyword = function (rgb) {
  	var reversed = reverseKeywords[rgb];
  	if (reversed) {
  		return reversed;
  	}

  	var currentClosestDistance = Infinity;
  	var currentClosestKeyword;

  	for (var keyword in cssKeywords) {
  		if (cssKeywords.hasOwnProperty(keyword)) {
  			var value = cssKeywords[keyword];

  			// Compute comparative distance
  			var distance = comparativeDistance(rgb, value);

  			// Check if its less, if so set as closest
  			if (distance < currentClosestDistance) {
  				currentClosestDistance = distance;
  				currentClosestKeyword = keyword;
  			}
  		}
  	}

  	return currentClosestKeyword;
  };

  convert.keyword.rgb = function (keyword) {
  	return cssKeywords[keyword];
  };

  convert.rgb.xyz = function (rgb) {
  	var r = rgb[0] / 255;
  	var g = rgb[1] / 255;
  	var b = rgb[2] / 255;

  	// assume sRGB
  	r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
  	g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
  	b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);

  	var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  	var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  	var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);

  	return [x * 100, y * 100, z * 100];
  };

  convert.rgb.lab = function (rgb) {
  	var xyz = convert.rgb.xyz(rgb);
  	var x = xyz[0];
  	var y = xyz[1];
  	var z = xyz[2];
  	var l;
  	var a;
  	var b;

  	x /= 95.047;
  	y /= 100;
  	z /= 108.883;

  	x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  	y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  	z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);

  	l = (116 * y) - 16;
  	a = 500 * (x - y);
  	b = 200 * (y - z);

  	return [l, a, b];
  };

  convert.hsl.rgb = function (hsl) {
  	var h = hsl[0] / 360;
  	var s = hsl[1] / 100;
  	var l = hsl[2] / 100;
  	var t1;
  	var t2;
  	var t3;
  	var rgb;
  	var val;

  	if (s === 0) {
  		val = l * 255;
  		return [val, val, val];
  	}

  	if (l < 0.5) {
  		t2 = l * (1 + s);
  	} else {
  		t2 = l + s - l * s;
  	}

  	t1 = 2 * l - t2;

  	rgb = [0, 0, 0];
  	for (var i = 0; i < 3; i++) {
  		t3 = h + 1 / 3 * -(i - 1);
  		if (t3 < 0) {
  			t3++;
  		}
  		if (t3 > 1) {
  			t3--;
  		}

  		if (6 * t3 < 1) {
  			val = t1 + (t2 - t1) * 6 * t3;
  		} else if (2 * t3 < 1) {
  			val = t2;
  		} else if (3 * t3 < 2) {
  			val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  		} else {
  			val = t1;
  		}

  		rgb[i] = val * 255;
  	}

  	return rgb;
  };

  convert.hsl.hsv = function (hsl) {
  	var h = hsl[0];
  	var s = hsl[1] / 100;
  	var l = hsl[2] / 100;
  	var smin = s;
  	var lmin = Math.max(l, 0.01);
  	var sv;
  	var v;

  	l *= 2;
  	s *= (l <= 1) ? l : 2 - l;
  	smin *= lmin <= 1 ? lmin : 2 - lmin;
  	v = (l + s) / 2;
  	sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);

  	return [h, sv * 100, v * 100];
  };

  convert.hsv.rgb = function (hsv) {
  	var h = hsv[0] / 60;
  	var s = hsv[1] / 100;
  	var v = hsv[2] / 100;
  	var hi = Math.floor(h) % 6;

  	var f = h - Math.floor(h);
  	var p = 255 * v * (1 - s);
  	var q = 255 * v * (1 - (s * f));
  	var t = 255 * v * (1 - (s * (1 - f)));
  	v *= 255;

  	switch (hi) {
  		case 0:
  			return [v, t, p];
  		case 1:
  			return [q, v, p];
  		case 2:
  			return [p, v, t];
  		case 3:
  			return [p, q, v];
  		case 4:
  			return [t, p, v];
  		case 5:
  			return [v, p, q];
  	}
  };

  convert.hsv.hsl = function (hsv) {
  	var h = hsv[0];
  	var s = hsv[1] / 100;
  	var v = hsv[2] / 100;
  	var vmin = Math.max(v, 0.01);
  	var lmin;
  	var sl;
  	var l;

  	l = (2 - s) * v;
  	lmin = (2 - s) * vmin;
  	sl = s * vmin;
  	sl /= (lmin <= 1) ? lmin : 2 - lmin;
  	sl = sl || 0;
  	l /= 2;

  	return [h, sl * 100, l * 100];
  };

  // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  convert.hwb.rgb = function (hwb) {
  	var h = hwb[0] / 360;
  	var wh = hwb[1] / 100;
  	var bl = hwb[2] / 100;
  	var ratio = wh + bl;
  	var i;
  	var v;
  	var f;
  	var n;

  	// wh + bl cant be > 1
  	if (ratio > 1) {
  		wh /= ratio;
  		bl /= ratio;
  	}

  	i = Math.floor(6 * h);
  	v = 1 - bl;
  	f = 6 * h - i;

  	if ((i & 0x01) !== 0) {
  		f = 1 - f;
  	}

  	n = wh + f * (v - wh); // linear interpolation

  	var r;
  	var g;
  	var b;
  	switch (i) {
  		default:
  		case 6:
  		case 0: r = v; g = n; b = wh; break;
  		case 1: r = n; g = v; b = wh; break;
  		case 2: r = wh; g = v; b = n; break;
  		case 3: r = wh; g = n; b = v; break;
  		case 4: r = n; g = wh; b = v; break;
  		case 5: r = v; g = wh; b = n; break;
  	}

  	return [r * 255, g * 255, b * 255];
  };

  convert.cmyk.rgb = function (cmyk) {
  	var c = cmyk[0] / 100;
  	var m = cmyk[1] / 100;
  	var y = cmyk[2] / 100;
  	var k = cmyk[3] / 100;
  	var r;
  	var g;
  	var b;

  	r = 1 - Math.min(1, c * (1 - k) + k);
  	g = 1 - Math.min(1, m * (1 - k) + k);
  	b = 1 - Math.min(1, y * (1 - k) + k);

  	return [r * 255, g * 255, b * 255];
  };

  convert.xyz.rgb = function (xyz) {
  	var x = xyz[0] / 100;
  	var y = xyz[1] / 100;
  	var z = xyz[2] / 100;
  	var r;
  	var g;
  	var b;

  	r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  	g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  	b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);

  	// assume sRGB
  	r = r > 0.0031308
  		? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
  		: r * 12.92;

  	g = g > 0.0031308
  		? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
  		: g * 12.92;

  	b = b > 0.0031308
  		? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
  		: b * 12.92;

  	r = Math.min(Math.max(0, r), 1);
  	g = Math.min(Math.max(0, g), 1);
  	b = Math.min(Math.max(0, b), 1);

  	return [r * 255, g * 255, b * 255];
  };

  convert.xyz.lab = function (xyz) {
  	var x = xyz[0];
  	var y = xyz[1];
  	var z = xyz[2];
  	var l;
  	var a;
  	var b;

  	x /= 95.047;
  	y /= 100;
  	z /= 108.883;

  	x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  	y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  	z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);

  	l = (116 * y) - 16;
  	a = 500 * (x - y);
  	b = 200 * (y - z);

  	return [l, a, b];
  };

  convert.lab.xyz = function (lab) {
  	var l = lab[0];
  	var a = lab[1];
  	var b = lab[2];
  	var x;
  	var y;
  	var z;

  	y = (l + 16) / 116;
  	x = a / 500 + y;
  	z = y - b / 200;

  	var y2 = Math.pow(y, 3);
  	var x2 = Math.pow(x, 3);
  	var z2 = Math.pow(z, 3);
  	y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  	x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  	z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;

  	x *= 95.047;
  	y *= 100;
  	z *= 108.883;

  	return [x, y, z];
  };

  convert.lab.lch = function (lab) {
  	var l = lab[0];
  	var a = lab[1];
  	var b = lab[2];
  	var hr;
  	var h;
  	var c;

  	hr = Math.atan2(b, a);
  	h = hr * 360 / 2 / Math.PI;

  	if (h < 0) {
  		h += 360;
  	}

  	c = Math.sqrt(a * a + b * b);

  	return [l, c, h];
  };

  convert.lch.lab = function (lch) {
  	var l = lch[0];
  	var c = lch[1];
  	var h = lch[2];
  	var a;
  	var b;
  	var hr;

  	hr = h / 360 * 2 * Math.PI;
  	a = c * Math.cos(hr);
  	b = c * Math.sin(hr);

  	return [l, a, b];
  };

  convert.rgb.ansi16 = function (args) {
  	var r = args[0];
  	var g = args[1];
  	var b = args[2];
  	var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization

  	value = Math.round(value / 50);

  	if (value === 0) {
  		return 30;
  	}

  	var ansi = 30
  		+ ((Math.round(b / 255) << 2)
  		| (Math.round(g / 255) << 1)
  		| Math.round(r / 255));

  	if (value === 2) {
  		ansi += 60;
  	}

  	return ansi;
  };

  convert.hsv.ansi16 = function (args) {
  	// optimization here; we already know the value and don't need to get
  	// it converted for us.
  	return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  };

  convert.rgb.ansi256 = function (args) {
  	var r = args[0];
  	var g = args[1];
  	var b = args[2];

  	// we use the extended greyscale palette here, with the exception of
  	// black and white. normal palette only has 4 greyscale shades.
  	if (r === g && g === b) {
  		if (r < 8) {
  			return 16;
  		}

  		if (r > 248) {
  			return 231;
  		}

  		return Math.round(((r - 8) / 247) * 24) + 232;
  	}

  	var ansi = 16
  		+ (36 * Math.round(r / 255 * 5))
  		+ (6 * Math.round(g / 255 * 5))
  		+ Math.round(b / 255 * 5);

  	return ansi;
  };

  convert.ansi16.rgb = function (args) {
  	var color = args % 10;

  	// handle greyscale
  	if (color === 0 || color === 7) {
  		if (args > 50) {
  			color += 3.5;
  		}

  		color = color / 10.5 * 255;

  		return [color, color, color];
  	}

  	var mult = (~~(args > 50) + 1) * 0.5;
  	var r = ((color & 1) * mult) * 255;
  	var g = (((color >> 1) & 1) * mult) * 255;
  	var b = (((color >> 2) & 1) * mult) * 255;

  	return [r, g, b];
  };

  convert.ansi256.rgb = function (args) {
  	// handle greyscale
  	if (args >= 232) {
  		var c = (args - 232) * 10 + 8;
  		return [c, c, c];
  	}

  	args -= 16;

  	var rem;
  	var r = Math.floor(args / 36) / 5 * 255;
  	var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  	var b = (rem % 6) / 5 * 255;

  	return [r, g, b];
  };

  convert.rgb.hex = function (args) {
  	var integer = ((Math.round(args[0]) & 0xFF) << 16)
  		+ ((Math.round(args[1]) & 0xFF) << 8)
  		+ (Math.round(args[2]) & 0xFF);

  	var string = integer.toString(16).toUpperCase();
  	return '000000'.substring(string.length) + string;
  };

  convert.hex.rgb = function (args) {
  	var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  	if (!match) {
  		return [0, 0, 0];
  	}

  	var colorString = match[0];

  	if (match[0].length === 3) {
  		colorString = colorString.split('').map(function (char) {
  			return char + char;
  		}).join('');
  	}

  	var integer = parseInt(colorString, 16);
  	var r = (integer >> 16) & 0xFF;
  	var g = (integer >> 8) & 0xFF;
  	var b = integer & 0xFF;

  	return [r, g, b];
  };

  convert.rgb.hcg = function (rgb) {
  	var r = rgb[0] / 255;
  	var g = rgb[1] / 255;
  	var b = rgb[2] / 255;
  	var max = Math.max(Math.max(r, g), b);
  	var min = Math.min(Math.min(r, g), b);
  	var chroma = (max - min);
  	var grayscale;
  	var hue;

  	if (chroma < 1) {
  		grayscale = min / (1 - chroma);
  	} else {
  		grayscale = 0;
  	}

  	if (chroma <= 0) {
  		hue = 0;
  	} else
  	if (max === r) {
  		hue = ((g - b) / chroma) % 6;
  	} else
  	if (max === g) {
  		hue = 2 + (b - r) / chroma;
  	} else {
  		hue = 4 + (r - g) / chroma + 4;
  	}

  	hue /= 6;
  	hue %= 1;

  	return [hue * 360, chroma * 100, grayscale * 100];
  };

  convert.hsl.hcg = function (hsl) {
  	var s = hsl[1] / 100;
  	var l = hsl[2] / 100;
  	var c = 1;
  	var f = 0;

  	if (l < 0.5) {
  		c = 2.0 * s * l;
  	} else {
  		c = 2.0 * s * (1.0 - l);
  	}

  	if (c < 1.0) {
  		f = (l - 0.5 * c) / (1.0 - c);
  	}

  	return [hsl[0], c * 100, f * 100];
  };

  convert.hsv.hcg = function (hsv) {
  	var s = hsv[1] / 100;
  	var v = hsv[2] / 100;

  	var c = s * v;
  	var f = 0;

  	if (c < 1.0) {
  		f = (v - c) / (1 - c);
  	}

  	return [hsv[0], c * 100, f * 100];
  };

  convert.hcg.rgb = function (hcg) {
  	var h = hcg[0] / 360;
  	var c = hcg[1] / 100;
  	var g = hcg[2] / 100;

  	if (c === 0.0) {
  		return [g * 255, g * 255, g * 255];
  	}

  	var pure = [0, 0, 0];
  	var hi = (h % 1) * 6;
  	var v = hi % 1;
  	var w = 1 - v;
  	var mg = 0;

  	switch (Math.floor(hi)) {
  		case 0:
  			pure[0] = 1; pure[1] = v; pure[2] = 0; break;
  		case 1:
  			pure[0] = w; pure[1] = 1; pure[2] = 0; break;
  		case 2:
  			pure[0] = 0; pure[1] = 1; pure[2] = v; break;
  		case 3:
  			pure[0] = 0; pure[1] = w; pure[2] = 1; break;
  		case 4:
  			pure[0] = v; pure[1] = 0; pure[2] = 1; break;
  		default:
  			pure[0] = 1; pure[1] = 0; pure[2] = w;
  	}

  	mg = (1.0 - c) * g;

  	return [
  		(c * pure[0] + mg) * 255,
  		(c * pure[1] + mg) * 255,
  		(c * pure[2] + mg) * 255
  	];
  };

  convert.hcg.hsv = function (hcg) {
  	var c = hcg[1] / 100;
  	var g = hcg[2] / 100;

  	var v = c + g * (1.0 - c);
  	var f = 0;

  	if (v > 0.0) {
  		f = c / v;
  	}

  	return [hcg[0], f * 100, v * 100];
  };

  convert.hcg.hsl = function (hcg) {
  	var c = hcg[1] / 100;
  	var g = hcg[2] / 100;

  	var l = g * (1.0 - c) + 0.5 * c;
  	var s = 0;

  	if (l > 0.0 && l < 0.5) {
  		s = c / (2 * l);
  	} else
  	if (l >= 0.5 && l < 1.0) {
  		s = c / (2 * (1 - l));
  	}

  	return [hcg[0], s * 100, l * 100];
  };

  convert.hcg.hwb = function (hcg) {
  	var c = hcg[1] / 100;
  	var g = hcg[2] / 100;
  	var v = c + g * (1.0 - c);
  	return [hcg[0], (v - c) * 100, (1 - v) * 100];
  };

  convert.hwb.hcg = function (hwb) {
  	var w = hwb[1] / 100;
  	var b = hwb[2] / 100;
  	var v = 1 - b;
  	var c = v - w;
  	var g = 0;

  	if (c < 1) {
  		g = (v - c) / (1 - c);
  	}

  	return [hwb[0], c * 100, g * 100];
  };

  convert.apple.rgb = function (apple) {
  	return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
  };

  convert.rgb.apple = function (rgb) {
  	return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
  };

  convert.gray.rgb = function (args) {
  	return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  };

  convert.gray.hsl = convert.gray.hsv = function (args) {
  	return [0, 0, args[0]];
  };

  convert.gray.hwb = function (gray) {
  	return [0, 100, gray[0]];
  };

  convert.gray.cmyk = function (gray) {
  	return [0, 0, 0, gray[0]];
  };

  convert.gray.lab = function (gray) {
  	return [gray[0], 0, 0];
  };

  convert.gray.hex = function (gray) {
  	var val = Math.round(gray[0] / 100 * 255) & 0xFF;
  	var integer = (val << 16) + (val << 8) + val;

  	var string = integer.toString(16).toUpperCase();
  	return '000000'.substring(string.length) + string;
  };

  convert.rgb.gray = function (rgb) {
  	var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  	return [val / 255 * 100];
  };


  /***/ }),
  /* 41 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  
  
  module.exports = {
  	"aliceblue": [240, 248, 255],
  	"antiquewhite": [250, 235, 215],
  	"aqua": [0, 255, 255],
  	"aquamarine": [127, 255, 212],
  	"azure": [240, 255, 255],
  	"beige": [245, 245, 220],
  	"bisque": [255, 228, 196],
  	"black": [0, 0, 0],
  	"blanchedalmond": [255, 235, 205],
  	"blue": [0, 0, 255],
  	"blueviolet": [138, 43, 226],
  	"brown": [165, 42, 42],
  	"burlywood": [222, 184, 135],
  	"cadetblue": [95, 158, 160],
  	"chartreuse": [127, 255, 0],
  	"chocolate": [210, 105, 30],
  	"coral": [255, 127, 80],
  	"cornflowerblue": [100, 149, 237],
  	"cornsilk": [255, 248, 220],
  	"crimson": [220, 20, 60],
  	"cyan": [0, 255, 255],
  	"darkblue": [0, 0, 139],
  	"darkcyan": [0, 139, 139],
  	"darkgoldenrod": [184, 134, 11],
  	"darkgray": [169, 169, 169],
  	"darkgreen": [0, 100, 0],
  	"darkgrey": [169, 169, 169],
  	"darkkhaki": [189, 183, 107],
  	"darkmagenta": [139, 0, 139],
  	"darkolivegreen": [85, 107, 47],
  	"darkorange": [255, 140, 0],
  	"darkorchid": [153, 50, 204],
  	"darkred": [139, 0, 0],
  	"darksalmon": [233, 150, 122],
  	"darkseagreen": [143, 188, 143],
  	"darkslateblue": [72, 61, 139],
  	"darkslategray": [47, 79, 79],
  	"darkslategrey": [47, 79, 79],
  	"darkturquoise": [0, 206, 209],
  	"darkviolet": [148, 0, 211],
  	"deeppink": [255, 20, 147],
  	"deepskyblue": [0, 191, 255],
  	"dimgray": [105, 105, 105],
  	"dimgrey": [105, 105, 105],
  	"dodgerblue": [30, 144, 255],
  	"firebrick": [178, 34, 34],
  	"floralwhite": [255, 250, 240],
  	"forestgreen": [34, 139, 34],
  	"fuchsia": [255, 0, 255],
  	"gainsboro": [220, 220, 220],
  	"ghostwhite": [248, 248, 255],
  	"gold": [255, 215, 0],
  	"goldenrod": [218, 165, 32],
  	"gray": [128, 128, 128],
  	"green": [0, 128, 0],
  	"greenyellow": [173, 255, 47],
  	"grey": [128, 128, 128],
  	"honeydew": [240, 255, 240],
  	"hotpink": [255, 105, 180],
  	"indianred": [205, 92, 92],
  	"indigo": [75, 0, 130],
  	"ivory": [255, 255, 240],
  	"khaki": [240, 230, 140],
  	"lavender": [230, 230, 250],
  	"lavenderblush": [255, 240, 245],
  	"lawngreen": [124, 252, 0],
  	"lemonchiffon": [255, 250, 205],
  	"lightblue": [173, 216, 230],
  	"lightcoral": [240, 128, 128],
  	"lightcyan": [224, 255, 255],
  	"lightgoldenrodyellow": [250, 250, 210],
  	"lightgray": [211, 211, 211],
  	"lightgreen": [144, 238, 144],
  	"lightgrey": [211, 211, 211],
  	"lightpink": [255, 182, 193],
  	"lightsalmon": [255, 160, 122],
  	"lightseagreen": [32, 178, 170],
  	"lightskyblue": [135, 206, 250],
  	"lightslategray": [119, 136, 153],
  	"lightslategrey": [119, 136, 153],
  	"lightsteelblue": [176, 196, 222],
  	"lightyellow": [255, 255, 224],
  	"lime": [0, 255, 0],
  	"limegreen": [50, 205, 50],
  	"linen": [250, 240, 230],
  	"magenta": [255, 0, 255],
  	"maroon": [128, 0, 0],
  	"mediumaquamarine": [102, 205, 170],
  	"mediumblue": [0, 0, 205],
  	"mediumorchid": [186, 85, 211],
  	"mediumpurple": [147, 112, 219],
  	"mediumseagreen": [60, 179, 113],
  	"mediumslateblue": [123, 104, 238],
  	"mediumspringgreen": [0, 250, 154],
  	"mediumturquoise": [72, 209, 204],
  	"mediumvioletred": [199, 21, 133],
  	"midnightblue": [25, 25, 112],
  	"mintcream": [245, 255, 250],
  	"mistyrose": [255, 228, 225],
  	"moccasin": [255, 228, 181],
  	"navajowhite": [255, 222, 173],
  	"navy": [0, 0, 128],
  	"oldlace": [253, 245, 230],
  	"olive": [128, 128, 0],
  	"olivedrab": [107, 142, 35],
  	"orange": [255, 165, 0],
  	"orangered": [255, 69, 0],
  	"orchid": [218, 112, 214],
  	"palegoldenrod": [238, 232, 170],
  	"palegreen": [152, 251, 152],
  	"paleturquoise": [175, 238, 238],
  	"palevioletred": [219, 112, 147],
  	"papayawhip": [255, 239, 213],
  	"peachpuff": [255, 218, 185],
  	"peru": [205, 133, 63],
  	"pink": [255, 192, 203],
  	"plum": [221, 160, 221],
  	"powderblue": [176, 224, 230],
  	"purple": [128, 0, 128],
  	"rebeccapurple": [102, 51, 153],
  	"red": [255, 0, 0],
  	"rosybrown": [188, 143, 143],
  	"royalblue": [65, 105, 225],
  	"saddlebrown": [139, 69, 19],
  	"salmon": [250, 128, 114],
  	"sandybrown": [244, 164, 96],
  	"seagreen": [46, 139, 87],
  	"seashell": [255, 245, 238],
  	"sienna": [160, 82, 45],
  	"silver": [192, 192, 192],
  	"skyblue": [135, 206, 235],
  	"slateblue": [106, 90, 205],
  	"slategray": [112, 128, 144],
  	"slategrey": [112, 128, 144],
  	"snow": [255, 250, 250],
  	"springgreen": [0, 255, 127],
  	"steelblue": [70, 130, 180],
  	"tan": [210, 180, 140],
  	"teal": [0, 128, 128],
  	"thistle": [216, 191, 216],
  	"tomato": [255, 99, 71],
  	"turquoise": [64, 224, 208],
  	"violet": [238, 130, 238],
  	"wheat": [245, 222, 179],
  	"white": [255, 255, 255],
  	"whitesmoke": [245, 245, 245],
  	"yellow": [255, 255, 0],
  	"yellowgreen": [154, 205, 50]
  };


  /***/ }),
  /* 42 */
  /***/ (function(module, exports, __webpack_require__) {

  var conversions = __webpack_require__(40);

  /*
  	this function routes a model to all other models.

  	all functions that are routed have a property `.conversion` attached
  	to the returned synthetic function. This property is an array
  	of strings, each with the steps in between the 'from' and 'to'
  	color models (inclusive).

  	conversions that are not possible simply are not included.
  */

  function buildGraph() {
  	var graph = {};
  	// https://jsperf.com/object-keys-vs-for-in-with-closure/3
  	var models = Object.keys(conversions);

  	for (var len = models.length, i = 0; i < len; i++) {
  		graph[models[i]] = {
  			// http://jsperf.com/1-vs-infinity
  			// micro-opt, but this is simple.
  			distance: -1,
  			parent: null
  		};
  	}

  	return graph;
  }

  // https://en.wikipedia.org/wiki/Breadth-first_search
  function deriveBFS(fromModel) {
  	var graph = buildGraph();
  	var queue = [fromModel]; // unshift -> queue -> pop

  	graph[fromModel].distance = 0;

  	while (queue.length) {
  		var current = queue.pop();
  		var adjacents = Object.keys(conversions[current]);

  		for (var len = adjacents.length, i = 0; i < len; i++) {
  			var adjacent = adjacents[i];
  			var node = graph[adjacent];

  			if (node.distance === -1) {
  				node.distance = graph[current].distance + 1;
  				node.parent = current;
  				queue.unshift(adjacent);
  			}
  		}
  	}

  	return graph;
  }

  function link(from, to) {
  	return function (args) {
  		return to(from(args));
  	};
  }

  function wrapConversion(toModel, graph) {
  	var path = [graph[toModel].parent, toModel];
  	var fn = conversions[graph[toModel].parent][toModel];

  	var cur = graph[toModel].parent;
  	while (graph[cur].parent) {
  		path.unshift(graph[cur].parent);
  		fn = link(conversions[graph[cur].parent][cur], fn);
  		cur = graph[cur].parent;
  	}

  	fn.conversion = path;
  	return fn;
  }

  module.exports = function (fromModel) {
  	var graph = deriveBFS(fromModel);
  	var conversion = {};

  	var models = Object.keys(graph);
  	for (var len = models.length, i = 0; i < len; i++) {
  		var toModel = models[i];
  		var node = graph[toModel];

  		if (node.parent === null) {
  			// no possible conversion, or this node is the source model.
  			continue;
  		}

  		conversion[toModel] = wrapConversion(toModel, graph);
  	}

  	return conversion;
  };



  /***/ }),
  /* 43 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  module.exports = __webpack_require__(44).isCI


  /***/ }),
  /* 44 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var vendors = __webpack_require__(45)

  var env = process.env

  // Used for testing only
  Object.defineProperty(exports, '_vendors', {
    value: vendors.map(function (v) { return v.constant })
  })

  exports.name = null
  exports.isPR = null

  vendors.forEach(function (vendor) {
    var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
    var isCI = envs.every(function (obj) {
      return checkEnv(obj)
    })

    exports[vendor.constant] = isCI

    if (isCI) {
      exports.name = vendor.name

      switch (typeof vendor.pr) {
        case 'string':
          // "pr": "CIRRUS_PR"
          exports.isPR = !!env[vendor.pr]
          break
        case 'object':
          if ('env' in vendor.pr) {
            // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
            exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
          } else if ('any' in vendor.pr) {
            // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
            exports.isPR = vendor.pr.any.some(function (key) {
              return !!env[key]
            })
          } else {
            // "pr": { "DRONE_BUILD_EVENT": "pull_request" }
            exports.isPR = checkEnv(vendor.pr)
          }
          break
        default:
          // PR detection not supported for this vendor
          exports.isPR = null
      }
    }
  })

  exports.isCI = !!(
    env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
    env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
    env.BUILD_NUMBER || // Jenkins, TeamCity
    env.RUN_ID || // TaskCluster, dsari
    exports.name ||
    false
  )

  function checkEnv (obj) {
    if (typeof obj === 'string') return !!env[obj]
    return Object.keys(obj).every(function (k) {
      return env[k] === obj[k]
    })
  }


  /***/ }),
  /* 45 */
  /***/ (function(module) {

  module.exports = JSON.parse("[{\"name\":\"AppVeyor\",\"constant\":\"APPVEYOR\",\"env\":\"APPVEYOR\",\"pr\":\"APPVEYOR_PULL_REQUEST_NUMBER\"},{\"name\":\"Azure Pipelines\",\"constant\":\"AZURE_PIPELINES\",\"env\":\"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\",\"pr\":\"SYSTEM_PULLREQUEST_PULLREQUESTID\"},{\"name\":\"Bamboo\",\"constant\":\"BAMBOO\",\"env\":\"bamboo_planKey\"},{\"name\":\"Bitbucket Pipelines\",\"constant\":\"BITBUCKET\",\"env\":\"BITBUCKET_COMMIT\",\"pr\":\"BITBUCKET_PR_ID\"},{\"name\":\"Bitrise\",\"constant\":\"BITRISE\",\"env\":\"BITRISE_IO\",\"pr\":\"BITRISE_PULL_REQUEST\"},{\"name\":\"Buddy\",\"constant\":\"BUDDY\",\"env\":\"BUDDY_WORKSPACE_ID\",\"pr\":\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{\"name\":\"Buildkite\",\"constant\":\"BUILDKITE\",\"env\":\"BUILDKITE\",\"pr\":{\"env\":\"BUILDKITE_PULL_REQUEST\",\"ne\":\"false\"}},{\"name\":\"CircleCI\",\"constant\":\"CIRCLE\",\"env\":\"CIRCLECI\",\"pr\":\"CIRCLE_PULL_REQUEST\"},{\"name\":\"Cirrus CI\",\"constant\":\"CIRRUS\",\"env\":\"CIRRUS_CI\",\"pr\":\"CIRRUS_PR\"},{\"name\":\"AWS CodeBuild\",\"constant\":\"CODEBUILD\",\"env\":\"CODEBUILD_BUILD_ARN\"},{\"name\":\"Codeship\",\"constant\":\"CODESHIP\",\"env\":{\"CI_NAME\":\"codeship\"}},{\"name\":\"Drone\",\"constant\":\"DRONE\",\"env\":\"DRONE\",\"pr\":{\"DRONE_BUILD_EVENT\":\"pull_request\"}},{\"name\":\"dsari\",\"constant\":\"DSARI\",\"env\":\"DSARI\"},{\"name\":\"GitLab CI\",\"constant\":\"GITLAB\",\"env\":\"GITLAB_CI\"},{\"name\":\"GoCD\",\"constant\":\"GOCD\",\"env\":\"GO_PIPELINE_LABEL\"},{\"name\":\"Hudson\",\"constant\":\"HUDSON\",\"env\":\"HUDSON_URL\"},{\"name\":\"Jenkins\",\"constant\":\"JENKINS\",\"env\":[\"JENKINS_URL\",\"BUILD_ID\"],\"pr\":{\"any\":[\"ghprbPullId\",\"CHANGE_ID\"]}},{\"name\":\"Magnum CI\",\"constant\":\"MAGNUM\",\"env\":\"MAGNUM\"},{\"name\":\"Netlify CI\",\"constant\":\"NETLIFY\",\"env\":\"NETLIFY_BUILD_BASE\",\"pr\":{\"env\":\"PULL_REQUEST\",\"ne\":\"false\"}},{\"name\":\"Sail CI\",\"constant\":\"SAIL\",\"env\":\"SAILCI\",\"pr\":\"SAIL_PULL_REQUEST_NUMBER\"},{\"name\":\"Semaphore\",\"constant\":\"SEMAPHORE\",\"env\":\"SEMAPHORE\",\"pr\":\"PULL_REQUEST_NUMBER\"},{\"name\":\"Shippable\",\"constant\":\"SHIPPABLE\",\"env\":\"SHIPPABLE\",\"pr\":{\"IS_PULL_REQUEST\":\"true\"}},{\"name\":\"Solano CI\",\"constant\":\"SOLANO\",\"env\":\"TDDIUM\",\"pr\":\"TDDIUM_PR_ID\"},{\"name\":\"Strider CD\",\"constant\":\"STRIDER\",\"env\":\"STRIDER\"},{\"name\":\"TaskCluster\",\"constant\":\"TASKCLUSTER\",\"env\":[\"TASK_ID\",\"RUN_ID\"]},{\"name\":\"TeamCity\",\"constant\":\"TEAMCITY\",\"env\":\"TEAMCITY_VERSION\"},{\"name\":\"Travis CI\",\"constant\":\"TRAVIS\",\"env\":\"TRAVIS\",\"pr\":{\"env\":\"TRAVIS_PULL_REQUEST\",\"ne\":\"false\"}}]");

  /***/ }),
  /* 46 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _scheduler = __webpack_require__(47);

  var _reactReconciler = _interopRequireDefault(__webpack_require__(49));

  var _dom = __webpack_require__(55);

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  const NO_CONTEXT = true;
  const hostConfig = {
    schedulePassiveEffects: _scheduler.unstable_scheduleCallback,
    cancelPassiveEffects: _scheduler.unstable_cancelCallback,
    now: Date.now,
    getRootHostContext: () => NO_CONTEXT,
    prepareForCommit: () => {},
    resetAfterCommit: rootNode => {
      rootNode.onRender();
    },
    getChildHostContext: () => NO_CONTEXT,
    shouldSetTextContent: (type, props) => {
      return typeof props.children === 'string' || typeof props.children === 'number';
    },
    createInstance: (type, newProps) => {
      const node = (0, _dom.createNode)(type);

      for (const [key, value] of Object.entries(newProps)) {
        if (key === 'children') {
          if (typeof value === 'string' || typeof value === 'number') {
            if (type === 'div') {
              // Text node must be wrapped in another node, so that text can be aligned within container
              const textElement = (0, _dom.createNode)('div');
              textElement.textContent = String(value);
              (0, _dom.appendChildNode)(node, textElement);
            }

            if (type === 'span') {
              node.textContent = String(value);
            }
          }
        } else if (key === 'style') {
          Object.assign(node.style, value);
        } else if (key === 'unstable__transformChildren') {
          node.unstable__transformChildren = value; // eslint-disable-line camelcase
        } else if (key === 'unstable__static') {
          node.unstable__static = true; // eslint-disable-line camelcase
        } else {
          (0, _dom.setAttribute)(node, key, value);
        }
      }

      return node;
    },
    createTextInstance: _dom.createTextNode,
    resetTextContent: node => {
      if (node.textContent) {
        node.textContent = '';
      }

      if (node.childNodes.length > 0) {
        for (const childNode of node.childNodes) {
          childNode.yogaNode.free();
          (0, _dom.removeChildNode)(node, childNode);
        }
      }
    },
    getPublicInstance: instance => instance,
    appendInitialChild: _dom.appendChildNode,
    appendChild: _dom.appendChildNode,
    insertBefore: _dom.insertBeforeNode,
    finalizeInitialChildren: () => {},
    supportsMutation: true,
    appendChildToContainer: _dom.appendChildNode,
    insertInContainerBefore: _dom.insertBeforeNode,
    removeChildFromContainer: _dom.removeChildNode,
    prepareUpdate: () => true,
    commitUpdate: (node, updatePayload, type, oldProps, newProps) => {
      for (const [key, value] of Object.entries(newProps)) {
        if (key === 'children') {
          if (typeof value === 'string' || typeof value === 'number') {
            if (type === 'div') {
              // Text node must be wrapped in another node, so that text can be aligned within container
              // If there's no such node, a new one must be created
              if (node.childNodes.length === 0) {
                const textElement = (0, _dom.createNode)('div');
                textElement.textContent = String(value);
                (0, _dom.appendChildNode)(node, textElement);
              } else {
                node.childNodes[0].textContent = String(value);
              }
            }

            if (type === 'span') {
              node.textContent = String(value);
            }
          }
        } else if (key === 'style') {
          Object.assign(node.style, value);
        } else if (key === 'unstable__transformChildren') {
          node.unstable__transformChildren = value; // eslint-disable-line camelcase
        } else if (key === 'unstable__static') {
          node.unstable__static = true; // eslint-disable-line camelcase
        } else {
          (0, _dom.setAttribute)(node, key, value);
        }
      }
    },
    commitTextUpdate: (node, oldText, newText) => {
      if (node.nodeName === '#text') {
        node.nodeValue = newText;
      } else {
        node.textContent = newText;
      }
    },
    removeChild: _dom.removeChildNode
  };

  var _default = (0, _reactReconciler.default)(hostConfig); // eslint-disable-line new-cap


  exports.default = _default;

  /***/ }),
  /* 47 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  if (false) {} else {
    module.exports = __webpack_require__(48);
  }


  /***/ }),
  /* 48 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /** @license React v0.13.4
   * scheduler.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */





  if (true) {
    (function() {
  'use strict';

  Object.defineProperty(exports, '__esModule', { value: true });

  var enableSchedulerDebugging = false;

  /* eslint-disable no-var */

  // TODO: Use symbols?
  var ImmediatePriority = 1;
  var UserBlockingPriority = 2;
  var NormalPriority = 3;
  var LowPriority = 4;
  var IdlePriority = 5;

  // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
  // Math.pow(2, 30) - 1
  // 0b111111111111111111111111111111
  var maxSigned31BitInt = 1073741823;

  // Times out immediately
  var IMMEDIATE_PRIORITY_TIMEOUT = -1;
  // Eventually times out
  var USER_BLOCKING_PRIORITY = 250;
  var NORMAL_PRIORITY_TIMEOUT = 5000;
  var LOW_PRIORITY_TIMEOUT = 10000;
  // Never times out
  var IDLE_PRIORITY = maxSigned31BitInt;

  // Callbacks are stored as a circular, doubly linked list.
  var firstCallbackNode = null;

  var currentDidTimeout = false;
  // Pausing the scheduler is useful for debugging.
  var isSchedulerPaused = false;

  var currentPriorityLevel = NormalPriority;
  var currentEventStartTime = -1;
  var currentExpirationTime = -1;

  // This is set when a callback is being executed, to prevent re-entrancy.
  var isExecutingCallback = false;

  var isHostCallbackScheduled = false;

  var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';

  function ensureHostCallbackIsScheduled() {
    if (isExecutingCallback) {
      // Don't schedule work yet; wait until the next time we yield.
      return;
    }
    // Schedule the host callback using the earliest expiration in the list.
    var expirationTime = firstCallbackNode.expirationTime;
    if (!isHostCallbackScheduled) {
      isHostCallbackScheduled = true;
    } else {
      // Cancel the existing host callback.
      cancelHostCallback();
    }
    requestHostCallback(flushWork, expirationTime);
  }

  function flushFirstCallback() {
    var flushedNode = firstCallbackNode;

    // Remove the node from the list before calling the callback. That way the
    // list is in a consistent state even if the callback throws.
    var next = firstCallbackNode.next;
    if (firstCallbackNode === next) {
      // This is the last callback in the list.
      firstCallbackNode = null;
      next = null;
    } else {
      var lastCallbackNode = firstCallbackNode.previous;
      firstCallbackNode = lastCallbackNode.next = next;
      next.previous = lastCallbackNode;
    }

    flushedNode.next = flushedNode.previous = null;

    // Now it's safe to call the callback.
    var callback = flushedNode.callback;
    var expirationTime = flushedNode.expirationTime;
    var priorityLevel = flushedNode.priorityLevel;
    var previousPriorityLevel = currentPriorityLevel;
    var previousExpirationTime = currentExpirationTime;
    currentPriorityLevel = priorityLevel;
    currentExpirationTime = expirationTime;
    var continuationCallback;
    try {
      continuationCallback = callback();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentExpirationTime = previousExpirationTime;
    }

    // A callback may return a continuation. The continuation should be scheduled
    // with the same priority and expiration as the just-finished callback.
    if (typeof continuationCallback === 'function') {
      var continuationNode = {
        callback: continuationCallback,
        priorityLevel: priorityLevel,
        expirationTime: expirationTime,
        next: null,
        previous: null
      };

      // Insert the new callback into the list, sorted by its expiration. This is
      // almost the same as the code in `scheduleCallback`, except the callback
      // is inserted into the list *before* callbacks of equal expiration instead
      // of after.
      if (firstCallbackNode === null) {
        // This is the first callback in the list.
        firstCallbackNode = continuationNode.next = continuationNode.previous = continuationNode;
      } else {
        var nextAfterContinuation = null;
        var node = firstCallbackNode;
        do {
          if (node.expirationTime >= expirationTime) {
            // This callback expires at or after the continuation. We will insert
            // the continuation *before* this callback.
            nextAfterContinuation = node;
            break;
          }
          node = node.next;
        } while (node !== firstCallbackNode);

        if (nextAfterContinuation === null) {
          // No equal or lower priority callback was found, which means the new
          // callback is the lowest priority callback in the list.
          nextAfterContinuation = firstCallbackNode;
        } else if (nextAfterContinuation === firstCallbackNode) {
          // The new callback is the highest priority callback in the list.
          firstCallbackNode = continuationNode;
          ensureHostCallbackIsScheduled();
        }

        var previous = nextAfterContinuation.previous;
        previous.next = nextAfterContinuation.previous = continuationNode;
        continuationNode.next = nextAfterContinuation;
        continuationNode.previous = previous;
      }
    }
  }

  function flushImmediateWork() {
    if (
    // Confirm we've exited the outer most event handler
    currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
      isExecutingCallback = true;
      try {
        do {
          flushFirstCallback();
        } while (
        // Keep flushing until there are no more immediate callbacks
        firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
      } finally {
        isExecutingCallback = false;
        if (firstCallbackNode !== null) {
          // There's still work remaining. Request another callback.
          ensureHostCallbackIsScheduled();
        } else {
          isHostCallbackScheduled = false;
        }
      }
    }
  }

  function flushWork(didTimeout) {
    // Exit right away if we're currently paused

    if (enableSchedulerDebugging && isSchedulerPaused) {
      return;
    }

    isExecutingCallback = true;
    var previousDidTimeout = currentDidTimeout;
    currentDidTimeout = didTimeout;
    try {
      if (didTimeout) {
        // Flush all the expired callbacks without yielding.
        while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {
          // TODO Wrap in feature flag
          // Read the current time. Flush all the callbacks that expire at or
          // earlier than that time. Then read the current time again and repeat.
          // This optimizes for as few performance.now calls as possible.
          var currentTime = exports.unstable_now();
          if (firstCallbackNode.expirationTime <= currentTime) {
            do {
              flushFirstCallback();
            } while (firstCallbackNode !== null && firstCallbackNode.expirationTime <= currentTime && !(enableSchedulerDebugging && isSchedulerPaused));
            continue;
          }
          break;
        }
      } else {
        // Keep flushing callbacks until we run out of time in the frame.
        if (firstCallbackNode !== null) {
          do {
            if (enableSchedulerDebugging && isSchedulerPaused) {
              break;
            }
            flushFirstCallback();
          } while (firstCallbackNode !== null && !shouldYieldToHost());
        }
      }
    } finally {
      isExecutingCallback = false;
      currentDidTimeout = previousDidTimeout;
      if (firstCallbackNode !== null) {
        // There's still work remaining. Request another callback.
        ensureHostCallbackIsScheduled();
      } else {
        isHostCallbackScheduled = false;
      }
      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_runWithPriority(priorityLevel, eventHandler) {
    switch (priorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
      case LowPriority:
      case IdlePriority:
        break;
      default:
        priorityLevel = NormalPriority;
    }

    var previousPriorityLevel = currentPriorityLevel;
    var previousEventStartTime = currentEventStartTime;
    currentPriorityLevel = priorityLevel;
    currentEventStartTime = exports.unstable_now();

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentEventStartTime = previousEventStartTime;

      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_next(eventHandler) {
    var priorityLevel = void 0;
    switch (currentPriorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
        // Shift down to normal priority
        priorityLevel = NormalPriority;
        break;
      default:
        // Anything lower than normal priority should remain at the current level.
        priorityLevel = currentPriorityLevel;
        break;
    }

    var previousPriorityLevel = currentPriorityLevel;
    var previousEventStartTime = currentEventStartTime;
    currentPriorityLevel = priorityLevel;
    currentEventStartTime = exports.unstable_now();

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentEventStartTime = previousEventStartTime;

      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_wrapCallback(callback) {
    var parentPriorityLevel = currentPriorityLevel;
    return function () {
      // This is a fork of runWithPriority, inlined for performance.
      var previousPriorityLevel = currentPriorityLevel;
      var previousEventStartTime = currentEventStartTime;
      currentPriorityLevel = parentPriorityLevel;
      currentEventStartTime = exports.unstable_now();

      try {
        return callback.apply(this, arguments);
      } finally {
        currentPriorityLevel = previousPriorityLevel;
        currentEventStartTime = previousEventStartTime;
        flushImmediateWork();
      }
    };
  }

  function unstable_scheduleCallback(callback, deprecated_options) {
    var startTime = currentEventStartTime !== -1 ? currentEventStartTime : exports.unstable_now();

    var expirationTime;
    if (typeof deprecated_options === 'object' && deprecated_options !== null && typeof deprecated_options.timeout === 'number') {
      // FIXME: Remove this branch once we lift expiration times out of React.
      expirationTime = startTime + deprecated_options.timeout;
    } else {
      switch (currentPriorityLevel) {
        case ImmediatePriority:
          expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;
          break;
        case UserBlockingPriority:
          expirationTime = startTime + USER_BLOCKING_PRIORITY;
          break;
        case IdlePriority:
          expirationTime = startTime + IDLE_PRIORITY;
          break;
        case LowPriority:
          expirationTime = startTime + LOW_PRIORITY_TIMEOUT;
          break;
        case NormalPriority:
        default:
          expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
      }
    }

    var newNode = {
      callback: callback,
      priorityLevel: currentPriorityLevel,
      expirationTime: expirationTime,
      next: null,
      previous: null
    };

    // Insert the new callback into the list, ordered first by expiration, then
    // by insertion. So the new callback is inserted any other callback with
    // equal expiration.
    if (firstCallbackNode === null) {
      // This is the first callback in the list.
      firstCallbackNode = newNode.next = newNode.previous = newNode;
      ensureHostCallbackIsScheduled();
    } else {
      var next = null;
      var node = firstCallbackNode;
      do {
        if (node.expirationTime > expirationTime) {
          // The new callback expires before this one.
          next = node;
          break;
        }
        node = node.next;
      } while (node !== firstCallbackNode);

      if (next === null) {
        // No callback with a later expiration was found, which means the new
        // callback has the latest expiration in the list.
        next = firstCallbackNode;
      } else if (next === firstCallbackNode) {
        // The new callback has the earliest expiration in the entire list.
        firstCallbackNode = newNode;
        ensureHostCallbackIsScheduled();
      }

      var previous = next.previous;
      previous.next = next.previous = newNode;
      newNode.next = next;
      newNode.previous = previous;
    }

    return newNode;
  }

  function unstable_pauseExecution() {
    isSchedulerPaused = true;
  }

  function unstable_continueExecution() {
    isSchedulerPaused = false;
    if (firstCallbackNode !== null) {
      ensureHostCallbackIsScheduled();
    }
  }

  function unstable_getFirstCallbackNode() {
    return firstCallbackNode;
  }

  function unstable_cancelCallback(callbackNode) {
    var next = callbackNode.next;
    if (next === null) {
      // Already cancelled.
      return;
    }

    if (next === callbackNode) {
      // This is the only scheduled callback. Clear the list.
      firstCallbackNode = null;
    } else {
      // Remove the callback from its position in the list.
      if (callbackNode === firstCallbackNode) {
        firstCallbackNode = next;
      }
      var previous = callbackNode.previous;
      previous.next = next;
      next.previous = previous;
    }

    callbackNode.next = callbackNode.previous = null;
  }

  function unstable_getCurrentPriorityLevel() {
    return currentPriorityLevel;
  }

  function unstable_shouldYield() {
    return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
  }

  // The remaining code is essentially a polyfill for requestIdleCallback. It
  // works by scheduling a requestAnimationFrame, storing the time for the start
  // of the frame, then scheduling a postMessage which gets scheduled after paint.
  // Within the postMessage handler do as much work as possible until time + frame
  // rate. By separating the idle call into a separate event tick we ensure that
  // layout, paint and other browser work is counted against the available time.
  // The frame rate is dynamically adjusted.

  // We capture a local reference to any global, in case it gets polyfilled after
  // this module is initially evaluated. We want to be using a
  // consistent implementation.
  var localDate = Date;

  // This initialization code may run even on server environments if a component
  // just imports ReactDOM (e.g. for findDOMNode). Some environments might not
  // have setTimeout or clearTimeout. However, we always expect them to be defined
  // on the client. https://github.com/facebook/react/pull/13088
  var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
  var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;

  // We don't expect either of these to necessarily be defined, but we will error
  // later if they are missing on the client.
  var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
  var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined;

  // requestAnimationFrame does not run when the tab is in the background. If
  // we're backgrounded we prefer for that work to happen so that the page
  // continues to load in the background. So we also schedule a 'setTimeout' as
  // a fallback.
  // TODO: Need a better heuristic for backgrounded work.
  var ANIMATION_FRAME_TIMEOUT = 100;
  var rAFID;
  var rAFTimeoutID;
  var requestAnimationFrameWithTimeout = function (callback) {
    // schedule rAF and also a setTimeout
    rAFID = localRequestAnimationFrame(function (timestamp) {
      // cancel the setTimeout
      localClearTimeout(rAFTimeoutID);
      callback(timestamp);
    });
    rAFTimeoutID = localSetTimeout(function () {
      // cancel the requestAnimationFrame
      localCancelAnimationFrame(rAFID);
      callback(exports.unstable_now());
    }, ANIMATION_FRAME_TIMEOUT);
  };

  if (hasNativePerformanceNow) {
    var Performance = performance;
    exports.unstable_now = function () {
      return Performance.now();
    };
  } else {
    exports.unstable_now = function () {
      return localDate.now();
    };
  }

  var requestHostCallback;
  var cancelHostCallback;
  var shouldYieldToHost;

  var globalValue = null;
  if (typeof window !== 'undefined') {
    globalValue = window;
  } else if (typeof global !== 'undefined') {
    globalValue = global;
  }

  if (globalValue && globalValue._schedMock) {
    // Dynamic injection, only for testing purposes.
    var globalImpl = globalValue._schedMock;
    requestHostCallback = globalImpl[0];
    cancelHostCallback = globalImpl[1];
    shouldYieldToHost = globalImpl[2];
    exports.unstable_now = globalImpl[3];
  } else if (
  // If Scheduler runs in a non-DOM environment, it falls back to a naive
  // implementation using setTimeout.
  typeof window === 'undefined' ||
  // Check if MessageChannel is supported, too.
  typeof MessageChannel !== 'function') {
    // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
    // fallback to a naive implementation.
    var _callback = null;
    var _flushCallback = function (didTimeout) {
      if (_callback !== null) {
        try {
          _callback(didTimeout);
        } finally {
          _callback = null;
        }
      }
    };
    requestHostCallback = function (cb, ms) {
      if (_callback !== null) {
        // Protect against re-entrancy.
        setTimeout(requestHostCallback, 0, cb);
      } else {
        _callback = cb;
        setTimeout(_flushCallback, 0, false);
      }
    };
    cancelHostCallback = function () {
      _callback = null;
    };
    shouldYieldToHost = function () {
      return false;
    };
  } else {
    if (typeof console !== 'undefined') {
      // TODO: Remove fb.me link
      if (typeof localRequestAnimationFrame !== 'function') {
        console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
      }
      if (typeof localCancelAnimationFrame !== 'function') {
        console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
      }
    }

    var scheduledHostCallback = null;
    var isMessageEventScheduled = false;
    var timeoutTime = -1;

    var isAnimationFrameScheduled = false;

    var isFlushingHostCallback = false;

    var frameDeadline = 0;
    // We start out assuming that we run at 30fps but then the heuristic tracking
    // will adjust this value to a faster fps if we get more frequent animation
    // frames.
    var previousFrameTime = 33;
    var activeFrameTime = 33;

    shouldYieldToHost = function () {
      return frameDeadline <= exports.unstable_now();
    };

    // We use the postMessage trick to defer idle work until after the repaint.
    var channel = new MessageChannel();
    var port = channel.port2;
    channel.port1.onmessage = function (event) {
      isMessageEventScheduled = false;

      var prevScheduledCallback = scheduledHostCallback;
      var prevTimeoutTime = timeoutTime;
      scheduledHostCallback = null;
      timeoutTime = -1;

      var currentTime = exports.unstable_now();

      var didTimeout = false;
      if (frameDeadline - currentTime <= 0) {
        // There's no time left in this idle period. Check if the callback has
        // a timeout and whether it's been exceeded.
        if (prevTimeoutTime !== -1 && prevTimeoutTime <= currentTime) {
          // Exceeded the timeout. Invoke the callback even though there's no
          // time left.
          didTimeout = true;
        } else {
          // No timeout.
          if (!isAnimationFrameScheduled) {
            // Schedule another animation callback so we retry later.
            isAnimationFrameScheduled = true;
            requestAnimationFrameWithTimeout(animationTick);
          }
          // Exit without invoking the callback.
          scheduledHostCallback = prevScheduledCallback;
          timeoutTime = prevTimeoutTime;
          return;
        }
      }

      if (prevScheduledCallback !== null) {
        isFlushingHostCallback = true;
        try {
          prevScheduledCallback(didTimeout);
        } finally {
          isFlushingHostCallback = false;
        }
      }
    };

    var animationTick = function (rafTime) {
      if (scheduledHostCallback !== null) {
        // Eagerly schedule the next animation callback at the beginning of the
        // frame. If the scheduler queue is not empty at the end of the frame, it
        // will continue flushing inside that callback. If the queue *is* empty,
        // then it will exit immediately. Posting the callback at the start of the
        // frame ensures it's fired within the earliest possible frame. If we
        // waited until the end of the frame to post the callback, we risk the
        // browser skipping a frame and not firing the callback until the frame
        // after that.
        requestAnimationFrameWithTimeout(animationTick);
      } else {
        // No pending work. Exit.
        isAnimationFrameScheduled = false;
        return;
      }

      var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
      if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
        if (nextFrameTime < 8) {
          // Defensive coding. We don't support higher frame rates than 120hz.
          // If the calculated frame time gets lower than 8, it is probably a bug.
          nextFrameTime = 8;
        }
        // If one frame goes long, then the next one can be short to catch up.
        // If two frames are short in a row, then that's an indication that we
        // actually have a higher frame rate than what we're currently optimizing.
        // We adjust our heuristic dynamically accordingly. For example, if we're
        // running on 120hz display or 90hz VR display.
        // Take the max of the two in case one of them was an anomaly due to
        // missed frame deadlines.
        activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
      } else {
        previousFrameTime = nextFrameTime;
      }
      frameDeadline = rafTime + activeFrameTime;
      if (!isMessageEventScheduled) {
        isMessageEventScheduled = true;
        port.postMessage(undefined);
      }
    };

    requestHostCallback = function (callback, absoluteTimeout) {
      scheduledHostCallback = callback;
      timeoutTime = absoluteTimeout;
      if (isFlushingHostCallback || absoluteTimeout < 0) {
        // Don't wait for the next frame. Continue working ASAP, in a new event.
        port.postMessage(undefined);
      } else if (!isAnimationFrameScheduled) {
        // If rAF didn't already schedule one, we need to schedule a frame.
        // TODO: If this rAF doesn't materialize because the browser throttles, we
        // might want to still have setTimeout trigger rIC as a backup to ensure
        // that we keep performing work.
        isAnimationFrameScheduled = true;
        requestAnimationFrameWithTimeout(animationTick);
      }
    };

    cancelHostCallback = function () {
      scheduledHostCallback = null;
      isMessageEventScheduled = false;
      timeoutTime = -1;
    };
  }

  exports.unstable_ImmediatePriority = ImmediatePriority;
  exports.unstable_UserBlockingPriority = UserBlockingPriority;
  exports.unstable_NormalPriority = NormalPriority;
  exports.unstable_IdlePriority = IdlePriority;
  exports.unstable_LowPriority = LowPriority;
  exports.unstable_runWithPriority = unstable_runWithPriority;
  exports.unstable_next = unstable_next;
  exports.unstable_scheduleCallback = unstable_scheduleCallback;
  exports.unstable_cancelCallback = unstable_cancelCallback;
  exports.unstable_wrapCallback = unstable_wrapCallback;
  exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
  exports.unstable_shouldYield = unstable_shouldYield;
  exports.unstable_continueExecution = unstable_continueExecution;
  exports.unstable_pauseExecution = unstable_pauseExecution;
  exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
    })();
  }


  /***/ }),
  /* 49 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  if (false) {} else {
    module.exports = __webpack_require__(50);
  }


  /***/ }),
  /* 50 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /** @license React v0.20.4
   * react-reconciler.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */



  if (true) {
    module.exports = function $$$reconciler($$$hostConfig) {
  'use strict';

  var _assign = __webpack_require__(16);
  var React = __webpack_require__(14);
  var checkPropTypes = __webpack_require__(17);
  var tracing = __webpack_require__(51);
  var scheduler = __webpack_require__(53);

  /**
   * Use invariant() to assert state which your program assumes to be true.
   *
   * Provide sprintf-style format (only %s is supported) and arguments
   * to provide information about what broke and what you were
   * expecting.
   *
   * The invariant message will be stripped in production, but the invariant
   * will remain to ensure logic does not differ in production.
   */

  var validateFormat = function () {};

  {
    validateFormat = function (format) {
      if (format === undefined) {
        throw new Error('invariant requires an error message argument');
      }
    };
  }

  function invariant(condition, format, a, b, c, d, e, f) {
    validateFormat(format);

    if (!condition) {
      var error = void 0;
      if (format === undefined) {
        error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
      } else {
        var args = [a, b, c, d, e, f];
        var argIndex = 0;
        error = new Error(format.replace(/%s/g, function () {
          return args[argIndex++];
        }));
        error.name = 'Invariant Violation';
      }

      error.framesToPop = 1; // we don't care about invariant's own frame
      throw error;
    }
  }

  // Relying on the `invariant()` implementation lets us
  // preserve the format and params in the www builds.

  /**
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var warningWithoutStack = function () {};

  {
    warningWithoutStack = function (condition, format) {
      for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        args[_key - 2] = arguments[_key];
      }

      if (format === undefined) {
        throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
      }
      if (args.length > 8) {
        // Check before the condition to catch violations early.
        throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
      }
      if (condition) {
        return;
      }
      if (typeof console !== 'undefined') {
        var argsWithFormat = args.map(function (item) {
          return '' + item;
        });
        argsWithFormat.unshift('Warning: ' + format);

        // We intentionally don't use spread (or .apply) directly because it
        // breaks IE9: https://github.com/facebook/react/issues/13610
        Function.prototype.apply.call(console.error, console, argsWithFormat);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        var argIndex = 0;
        var message = 'Warning: ' + format.replace(/%s/g, function () {
          return args[argIndex++];
        });
        throw new Error(message);
      } catch (x) {}
    };
  }

  var warningWithoutStack$1 = warningWithoutStack;

  /**
   * `ReactInstanceMap` maintains a mapping from a public facing stateful
   * instance (key) and the internal representation (value). This allows public
   * methods to accept the user facing instance as an argument and map them back
   * to internal methods.
   *
   * Note that this module is currently shared and assumed to be stateless.
   * If this becomes an actual Map, that will break.
   */

  /**
   * This API should be called `delete` but we'd have to make sure to always
   * transform these to strings for IE support. When this transform is fully
   * supported we can rename it.
   */


  function get(key) {
    return key._reactInternalFiber;
  }



  function set(key, value) {
    key._reactInternalFiber = value;
  }

  var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

  // Prevent newer renderers from RTE when used with older react package versions.
  // Current owner and dispatcher used to share the same ref,
  // but PR #14548 split them out to better support the react-debug-tools package.
  if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
    ReactSharedInternals.ReactCurrentDispatcher = {
      current: null
    };
  }

  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  // nor polyfill, then a plain number is used for performance.
  var hasSymbol = typeof Symbol === 'function' && Symbol.for;

  var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;

  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;

  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator';

  function getIteratorFn(maybeIterable) {
    if (maybeIterable === null || typeof maybeIterable !== 'object') {
      return null;
    }
    var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
    if (typeof maybeIterator === 'function') {
      return maybeIterator;
    }
    return null;
  }

  var Pending = 0;
  var Resolved = 1;
  var Rejected = 2;

  function refineResolvedLazyComponent(lazyComponent) {
    return lazyComponent._status === Resolved ? lazyComponent._result : null;
  }

  function getWrappedName(outerType, innerType, wrapperName) {
    var functionName = innerType.displayName || innerType.name || '';
    return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
  }

  function getComponentName(type) {
    if (type == null) {
      // Host root, text node or just invalid type.
      return null;
    }
    {
      if (typeof type.tag === 'number') {
        warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
      }
    }
    if (typeof type === 'function') {
      return type.displayName || type.name || null;
    }
    if (typeof type === 'string') {
      return type;
    }
    switch (type) {
      case REACT_CONCURRENT_MODE_TYPE:
        return 'ConcurrentMode';
      case REACT_FRAGMENT_TYPE:
        return 'Fragment';
      case REACT_PORTAL_TYPE:
        return 'Portal';
      case REACT_PROFILER_TYPE:
        return 'Profiler';
      case REACT_STRICT_MODE_TYPE:
        return 'StrictMode';
      case REACT_SUSPENSE_TYPE:
        return 'Suspense';
    }
    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_CONTEXT_TYPE:
          return 'Context.Consumer';
        case REACT_PROVIDER_TYPE:
          return 'Context.Provider';
        case REACT_FORWARD_REF_TYPE:
          return getWrappedName(type, type.render, 'ForwardRef');
        case REACT_MEMO_TYPE:
          return getComponentName(type.type);
        case REACT_LAZY_TYPE:
          {
            var thenable = type;
            var resolvedThenable = refineResolvedLazyComponent(thenable);
            if (resolvedThenable) {
              return getComponentName(resolvedThenable);
            }
          }
      }
    }
    return null;
  }

  var FunctionComponent = 0;
  var ClassComponent = 1;
  var IndeterminateComponent = 2; // Before we know whether it is function or class
  var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
  var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
  var HostComponent = 5;
  var HostText = 6;
  var Fragment = 7;
  var Mode = 8;
  var ContextConsumer = 9;
  var ContextProvider = 10;
  var ForwardRef = 11;
  var Profiler = 12;
  var SuspenseComponent = 13;
  var MemoComponent = 14;
  var SimpleMemoComponent = 15;
  var LazyComponent = 16;
  var IncompleteClassComponent = 17;
  var DehydratedSuspenseComponent = 18;

  // Don't change these two values. They're used by React Dev Tools.
  var NoEffect = /*              */0;
  var PerformedWork = /*         */1;

  // You can change the rest (and add more).
  var Placement = /*             */2;
  var Update = /*                */4;
  var PlacementAndUpdate = /*    */6;
  var Deletion = /*              */8;
  var ContentReset = /*          */16;
  var Callback = /*              */32;
  var DidCapture = /*            */64;
  var Ref = /*                   */128;
  var Snapshot = /*              */256;
  var Passive = /*               */512;

  // Passive & Update & Callback & Ref & Snapshot
  var LifecycleEffectMask = /*   */932;

  // Union of all host effects
  var HostEffectMask = /*        */1023;

  var Incomplete = /*            */1024;
  var ShouldCapture = /*         */2048;

  var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;

  var MOUNTING = 1;
  var MOUNTED = 2;
  var UNMOUNTED = 3;

  function isFiberMountedImpl(fiber) {
    var node = fiber;
    if (!fiber.alternate) {
      // If there is no alternate, this might be a new tree that isn't inserted
      // yet. If it is, then it will have a pending insertion effect on it.
      if ((node.effectTag & Placement) !== NoEffect) {
        return MOUNTING;
      }
      while (node.return) {
        node = node.return;
        if ((node.effectTag & Placement) !== NoEffect) {
          return MOUNTING;
        }
      }
    } else {
      while (node.return) {
        node = node.return;
      }
    }
    if (node.tag === HostRoot) {
      // TODO: Check if this was a nested HostRoot when used with
      // renderContainerIntoSubtree.
      return MOUNTED;
    }
    // If we didn't hit the root, that means that we're in an disconnected tree
    // that has been unmounted.
    return UNMOUNTED;
  }

  function isFiberMounted(fiber) {
    return isFiberMountedImpl(fiber) === MOUNTED;
  }

  function isMounted(component) {
    {
      var owner = ReactCurrentOwner.current;
      if (owner !== null && owner.tag === ClassComponent) {
        var ownerFiber = owner;
        var instance = ownerFiber.stateNode;
        !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;
        instance._warnedAboutRefsInRender = true;
      }
    }

    var fiber = get(component);
    if (!fiber) {
      return false;
    }
    return isFiberMountedImpl(fiber) === MOUNTED;
  }

  function assertIsMounted(fiber) {
    !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
  }

  function findCurrentFiberUsingSlowPath(fiber) {
    var alternate = fiber.alternate;
    if (!alternate) {
      // If there is no alternate, then we only need to check if it is mounted.
      var state = isFiberMountedImpl(fiber);
      !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
      if (state === MOUNTING) {
        return null;
      }
      return fiber;
    }
    // If we have two possible branches, we'll walk backwards up to the root
    // to see what path the root points to. On the way we may hit one of the
    // special cases and we'll deal with them.
    var a = fiber;
    var b = alternate;
    while (true) {
      var parentA = a.return;
      var parentB = parentA ? parentA.alternate : null;
      if (!parentA || !parentB) {
        // We're at the root.
        break;
      }

      // If both copies of the parent fiber point to the same child, we can
      // assume that the child is current. This happens when we bailout on low
      // priority: the bailed out fiber's child reuses the current child.
      if (parentA.child === parentB.child) {
        var child = parentA.child;
        while (child) {
          if (child === a) {
            // We've determined that A is the current branch.
            assertIsMounted(parentA);
            return fiber;
          }
          if (child === b) {
            // We've determined that B is the current branch.
            assertIsMounted(parentA);
            return alternate;
          }
          child = child.sibling;
        }
        // We should never have an alternate for any mounting node. So the only
        // way this could possibly happen is if this was unmounted, if at all.
        invariant(false, 'Unable to find node on an unmounted component.');
      }

      if (a.return !== b.return) {
        // The return pointer of A and the return pointer of B point to different
        // fibers. We assume that return pointers never criss-cross, so A must
        // belong to the child set of A.return, and B must belong to the child
        // set of B.return.
        a = parentA;
        b = parentB;
      } else {
        // The return pointers point to the same fiber. We'll have to use the
        // default, slow path: scan the child sets of each parent alternate to see
        // which child belongs to which set.
        //
        // Search parent A's child set
        var didFindChild = false;
        var _child = parentA.child;
        while (_child) {
          if (_child === a) {
            didFindChild = true;
            a = parentA;
            b = parentB;
            break;
          }
          if (_child === b) {
            didFindChild = true;
            b = parentA;
            a = parentB;
            break;
          }
          _child = _child.sibling;
        }
        if (!didFindChild) {
          // Search parent B's child set
          _child = parentB.child;
          while (_child) {
            if (_child === a) {
              didFindChild = true;
              a = parentB;
              b = parentA;
              break;
            }
            if (_child === b) {
              didFindChild = true;
              b = parentB;
              a = parentA;
              break;
            }
            _child = _child.sibling;
          }
          !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;
        }
      }

      !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    }
    // If the root is not a host container, we're in a disconnected tree. I.e.
    // unmounted.
    !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
    if (a.stateNode.current === a) {
      // We've determined that A is the current branch.
      return fiber;
    }
    // Otherwise B has to be current branch.
    return alternate;
  }

  function findCurrentHostFiber(parent) {
    var currentParent = findCurrentFiberUsingSlowPath(parent);
    if (!currentParent) {
      return null;
    }

    // Next we'll drill down this component to find the first HostComponent/Text.
    var node = currentParent;
    while (true) {
      if (node.tag === HostComponent || node.tag === HostText) {
        return node;
      } else if (node.child) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === currentParent) {
        return null;
      }
      while (!node.sibling) {
        if (!node.return || node.return === currentParent) {
          return null;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
    // Flow needs the return null here, but ESLint complains about it.
    // eslint-disable-next-line no-unreachable
    return null;
  }

  function findCurrentHostFiberWithNoPortals(parent) {
    var currentParent = findCurrentFiberUsingSlowPath(parent);
    if (!currentParent) {
      return null;
    }

    // Next we'll drill down this component to find the first HostComponent/Text.
    var node = currentParent;
    while (true) {
      if (node.tag === HostComponent || node.tag === HostText) {
        return node;
      } else if (node.child && node.tag !== HostPortal) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === currentParent) {
        return null;
      }
      while (!node.sibling) {
        if (!node.return || node.return === currentParent) {
          return null;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
    // Flow needs the return null here, but ESLint complains about it.
    // eslint-disable-next-line no-unreachable
    return null;
  }

  // eslint-disable-line no-undef

  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // This is a host config that's used for the `react-reconciler` package on npm.
  // It is only used by third-party renderers.
  //
  // Its API lets you pass the host config as an argument.
  // However, inside the `react-reconciler` we treat host config as a module.
  // This file is a shim between two worlds.
  //
  // It works because the `react-reconciler` bundle is wrapped in something like:
  //
  // module.exports = function ($$$config) {
  //   /* reconciler code */
  // }
  //
  // So `$$$config` looks like a global variable, but it's
  // really an argument to a top-level wrapping function.

  var getPublicInstance = $$$hostConfig.getPublicInstance; // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef
  // eslint-disable-line no-undef

  var getRootHostContext = $$$hostConfig.getRootHostContext;
  var getChildHostContext = $$$hostConfig.getChildHostContext;
  var prepareForCommit = $$$hostConfig.prepareForCommit;
  var resetAfterCommit = $$$hostConfig.resetAfterCommit;
  var createInstance = $$$hostConfig.createInstance;
  var appendInitialChild = $$$hostConfig.appendInitialChild;
  var finalizeInitialChildren = $$$hostConfig.finalizeInitialChildren;
  var prepareUpdate = $$$hostConfig.prepareUpdate;
  var shouldSetTextContent = $$$hostConfig.shouldSetTextContent;
  var shouldDeprioritizeSubtree = $$$hostConfig.shouldDeprioritizeSubtree;
  var createTextInstance = $$$hostConfig.createTextInstance;
  var scheduleDeferredCallback = $$$hostConfig.scheduleDeferredCallback;
  var cancelDeferredCallback = $$$hostConfig.cancelDeferredCallback;
  var shouldYield = $$$hostConfig.shouldYield;
  var scheduleTimeout = $$$hostConfig.setTimeout;
  var cancelTimeout = $$$hostConfig.clearTimeout;
  var noTimeout = $$$hostConfig.noTimeout;
  var schedulePassiveEffects = $$$hostConfig.schedulePassiveEffects;
  var cancelPassiveEffects = $$$hostConfig.cancelPassiveEffects;
  var now = $$$hostConfig.now;
  var isPrimaryRenderer = $$$hostConfig.isPrimaryRenderer;
  var supportsMutation = $$$hostConfig.supportsMutation;
  var supportsPersistence = $$$hostConfig.supportsPersistence;
  var supportsHydration = $$$hostConfig.supportsHydration;

  // -------------------
  //      Mutation
  //     (optional)
  // -------------------
  var appendChild = $$$hostConfig.appendChild;
  var appendChildToContainer = $$$hostConfig.appendChildToContainer;
  var commitTextUpdate = $$$hostConfig.commitTextUpdate;
  var commitMount = $$$hostConfig.commitMount;
  var commitUpdate = $$$hostConfig.commitUpdate;
  var insertBefore = $$$hostConfig.insertBefore;
  var insertInContainerBefore = $$$hostConfig.insertInContainerBefore;
  var removeChild = $$$hostConfig.removeChild;
  var removeChildFromContainer = $$$hostConfig.removeChildFromContainer;
  var resetTextContent = $$$hostConfig.resetTextContent;
  var hideInstance = $$$hostConfig.hideInstance;
  var hideTextInstance = $$$hostConfig.hideTextInstance;
  var unhideInstance = $$$hostConfig.unhideInstance;
  var unhideTextInstance = $$$hostConfig.unhideTextInstance;

  // -------------------
  //     Persistence
  //     (optional)
  // -------------------
  var cloneInstance = $$$hostConfig.cloneInstance;
  var createContainerChildSet = $$$hostConfig.createContainerChildSet;
  var appendChildToContainerChildSet = $$$hostConfig.appendChildToContainerChildSet;
  var finalizeContainerChildren = $$$hostConfig.finalizeContainerChildren;
  var replaceContainerChildren = $$$hostConfig.replaceContainerChildren;
  var cloneHiddenInstance = $$$hostConfig.cloneHiddenInstance;
  var cloneUnhiddenInstance = $$$hostConfig.cloneUnhiddenInstance;
  var createHiddenTextInstance = $$$hostConfig.createHiddenTextInstance;

  // -------------------
  //     Hydration
  //     (optional)
  // -------------------
  var canHydrateInstance = $$$hostConfig.canHydrateInstance;
  var canHydrateTextInstance = $$$hostConfig.canHydrateTextInstance;
  var canHydrateSuspenseInstance = $$$hostConfig.canHydrateSuspenseInstance;
  var getNextHydratableSibling = $$$hostConfig.getNextHydratableSibling;
  var getFirstHydratableChild = $$$hostConfig.getFirstHydratableChild;
  var hydrateInstance = $$$hostConfig.hydrateInstance;
  var hydrateTextInstance = $$$hostConfig.hydrateTextInstance;
  var getNextHydratableInstanceAfterSuspenseInstance = $$$hostConfig.getNextHydratableInstanceAfterSuspenseInstance;
  var clearSuspenseBoundary = $$$hostConfig.clearSuspenseBoundary;
  var clearSuspenseBoundaryFromContainer = $$$hostConfig.clearSuspenseBoundaryFromContainer;
  var didNotMatchHydratedContainerTextInstance = $$$hostConfig.didNotMatchHydratedContainerTextInstance;
  var didNotMatchHydratedTextInstance = $$$hostConfig.didNotMatchHydratedTextInstance;
  var didNotHydrateContainerInstance = $$$hostConfig.didNotHydrateContainerInstance;
  var didNotHydrateInstance = $$$hostConfig.didNotHydrateInstance;
  var didNotFindHydratableContainerInstance = $$$hostConfig.didNotFindHydratableContainerInstance;
  var didNotFindHydratableContainerTextInstance = $$$hostConfig.didNotFindHydratableContainerTextInstance;
  var didNotFindHydratableContainerSuspenseInstance = $$$hostConfig.didNotFindHydratableContainerSuspenseInstance;
  var didNotFindHydratableInstance = $$$hostConfig.didNotFindHydratableInstance;
  var didNotFindHydratableTextInstance = $$$hostConfig.didNotFindHydratableTextInstance;
  var didNotFindHydratableSuspenseInstance = $$$hostConfig.didNotFindHydratableSuspenseInstance;

  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;

  var describeComponentFrame = function (name, source, ownerName) {
    var sourceInfo = '';
    if (source) {
      var path = source.fileName;
      var fileName = path.replace(BEFORE_SLASH_RE, '');
      {
        // In DEV, include code for a common special case:
        // prefer "folder/index.js" instead of just "index.js".
        if (/^index\./.test(fileName)) {
          var match = path.match(BEFORE_SLASH_RE);
          if (match) {
            var pathBeforeSlash = match[1];
            if (pathBeforeSlash) {
              var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
              fileName = folderName + '/' + fileName;
            }
          }
        }
      }
      sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
    } else if (ownerName) {
      sourceInfo = ' (created by ' + ownerName + ')';
    }
    return '\n    in ' + (name || 'Unknown') + sourceInfo;
  };

  var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;

  function describeFiber(fiber) {
    switch (fiber.tag) {
      case HostRoot:
      case HostPortal:
      case HostText:
      case Fragment:
      case ContextProvider:
      case ContextConsumer:
        return '';
      default:
        var owner = fiber._debugOwner;
        var source = fiber._debugSource;
        var name = getComponentName(fiber.type);
        var ownerName = null;
        if (owner) {
          ownerName = getComponentName(owner.type);
        }
        return describeComponentFrame(name, source, ownerName);
    }
  }

  function getStackByFiberInDevAndProd(workInProgress) {
    var info = '';
    var node = workInProgress;
    do {
      info += describeFiber(node);
      node = node.return;
    } while (node);
    return info;
  }

  var current = null;
  var phase = null;

  function getCurrentFiberOwnerNameInDevOrNull() {
    {
      if (current === null) {
        return null;
      }
      var owner = current._debugOwner;
      if (owner !== null && typeof owner !== 'undefined') {
        return getComponentName(owner.type);
      }
    }
    return null;
  }

  function getCurrentFiberStackInDev() {
    {
      if (current === null) {
        return '';
      }
      // Safe because if current fiber exists, we are reconciling,
      // and it is guaranteed to be the work-in-progress version.
      return getStackByFiberInDevAndProd(current);
    }
    return '';
  }

  function resetCurrentFiber() {
    {
      ReactDebugCurrentFrame.getCurrentStack = null;
      current = null;
      phase = null;
    }
  }

  function setCurrentFiber(fiber) {
    {
      ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
      current = fiber;
      phase = null;
    }
  }

  function setCurrentPhase(lifeCyclePhase) {
    {
      phase = lifeCyclePhase;
    }
  }

  var enableUserTimingAPI = true;

  // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
  var debugRenderPhaseSideEffects = false;

  // In some cases, StrictMode should also double-render lifecycles.
  // This can be confusing for tests though,
  // And it can be bad for performance in production.
  // This feature flag can be used to control the behavior:
  var debugRenderPhaseSideEffectsForStrictMode = true;

  // To preserve the "Pause on caught exceptions" behavior of the debugger, we
  // replay the begin phase of a failed component inside invokeGuardedCallback.
  var replayFailedUnitOfWorkWithInvokeGuardedCallback = true;

  // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
  var warnAboutDeprecatedLifecycles = false;

  // Gather advanced timing metrics for Profiler subtrees.
  var enableProfilerTimer = true;

  // Trace which interactions trigger each commit.
  var enableSchedulerTracing = true;

  // Only used in www builds.
  var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.

  // Only used in www builds.


  // Only used in www builds.


  // React Fire: prevent the value and checked attributes from syncing
  // with their related DOM properties


  // These APIs will no longer be "unstable" in the upcoming 16.7 release,
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.

  // Prefix measurements so that it's possible to filter them.
  // Longer prefixes are hard to read in DevTools.
  var reactEmoji = '\u269B';
  var warningEmoji = '\u26D4';
  var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';

  // Keep track of current fiber so that we know the path to unwind on pause.
  // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
  var currentFiber = null;
  // If we're in the middle of user code, which fiber and method is it?
  // Reusing `currentFiber` would be confusing for this because user code fiber
  // can change during commit phase too, but we don't need to unwind it (since
  // lifecycles in the commit phase don't resemble a tree).
  var currentPhase = null;
  var currentPhaseFiber = null;
  // Did lifecycle hook schedule an update? This is often a performance problem,
  // so we will keep track of it, and include it in the report.
  // Track commits caused by cascading updates.
  var isCommitting = false;
  var hasScheduledUpdateInCurrentCommit = false;
  var hasScheduledUpdateInCurrentPhase = false;
  var commitCountInCurrentWorkLoop = 0;
  var effectCountInCurrentCommit = 0;
  var isWaitingForCallback = false;
  // During commits, we only show a measurement once per method name
  // to avoid stretch the commit phase with measurement overhead.
  var labelsInCurrentCommit = new Set();

  var formatMarkName = function (markName) {
    return reactEmoji + ' ' + markName;
  };

  var formatLabel = function (label, warning) {
    var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' ';
    var suffix = warning ? ' Warning: ' + warning : '';
    return '' + prefix + label + suffix;
  };

  var beginMark = function (markName) {
    performance.mark(formatMarkName(markName));
  };

  var clearMark = function (markName) {
    performance.clearMarks(formatMarkName(markName));
  };

  var endMark = function (label, markName, warning) {
    var formattedMarkName = formatMarkName(markName);
    var formattedLabel = formatLabel(label, warning);
    try {
      performance.measure(formattedLabel, formattedMarkName);
    } catch (err) {}
    // If previous mark was missing for some reason, this will throw.
    // This could only happen if React crashed in an unexpected place earlier.
    // Don't pile on with more errors.

    // Clear marks immediately to avoid growing buffer.
    performance.clearMarks(formattedMarkName);
    performance.clearMeasures(formattedLabel);
  };

  var getFiberMarkName = function (label, debugID) {
    return label + ' (#' + debugID + ')';
  };

  var getFiberLabel = function (componentName, isMounted, phase) {
    if (phase === null) {
      // These are composite component total time measurements.
      return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';
    } else {
      // Composite component methods.
      return componentName + '.' + phase;
    }
  };

  var beginFiberMark = function (fiber, phase) {
    var componentName = getComponentName(fiber.type) || 'Unknown';
    var debugID = fiber._debugID;
    var isMounted = fiber.alternate !== null;
    var label = getFiberLabel(componentName, isMounted, phase);

    if (isCommitting && labelsInCurrentCommit.has(label)) {
      // During the commit phase, we don't show duplicate labels because
      // there is a fixed overhead for every measurement, and we don't
      // want to stretch the commit phase beyond necessary.
      return false;
    }
    labelsInCurrentCommit.add(label);

    var markName = getFiberMarkName(label, debugID);
    beginMark(markName);
    return true;
  };

  var clearFiberMark = function (fiber, phase) {
    var componentName = getComponentName(fiber.type) || 'Unknown';
    var debugID = fiber._debugID;
    var isMounted = fiber.alternate !== null;
    var label = getFiberLabel(componentName, isMounted, phase);
    var markName = getFiberMarkName(label, debugID);
    clearMark(markName);
  };

  var endFiberMark = function (fiber, phase, warning) {
    var componentName = getComponentName(fiber.type) || 'Unknown';
    var debugID = fiber._debugID;
    var isMounted = fiber.alternate !== null;
    var label = getFiberLabel(componentName, isMounted, phase);
    var markName = getFiberMarkName(label, debugID);
    endMark(label, markName, warning);
  };

  var shouldIgnoreFiber = function (fiber) {
    // Host components should be skipped in the timeline.
    // We could check typeof fiber.type, but does this work with RN?
    switch (fiber.tag) {
      case HostRoot:
      case HostComponent:
      case HostText:
      case HostPortal:
      case Fragment:
      case ContextProvider:
      case ContextConsumer:
      case Mode:
        return true;
      default:
        return false;
    }
  };

  var clearPendingPhaseMeasurement = function () {
    if (currentPhase !== null && currentPhaseFiber !== null) {
      clearFiberMark(currentPhaseFiber, currentPhase);
    }
    currentPhaseFiber = null;
    currentPhase = null;
    hasScheduledUpdateInCurrentPhase = false;
  };

  var pauseTimers = function () {
    // Stops all currently active measurements so that they can be resumed
    // if we continue in a later deferred loop from the same unit of work.
    var fiber = currentFiber;
    while (fiber) {
      if (fiber._debugIsCurrentlyTiming) {
        endFiberMark(fiber, null, null);
      }
      fiber = fiber.return;
    }
  };

  var resumeTimersRecursively = function (fiber) {
    if (fiber.return !== null) {
      resumeTimersRecursively(fiber.return);
    }
    if (fiber._debugIsCurrentlyTiming) {
      beginFiberMark(fiber, null);
    }
  };

  var resumeTimers = function () {
    // Resumes all measurements that were active during the last deferred loop.
    if (currentFiber !== null) {
      resumeTimersRecursively(currentFiber);
    }
  };

  function recordEffect() {
    if (enableUserTimingAPI) {
      effectCountInCurrentCommit++;
    }
  }

  function recordScheduleUpdate() {
    if (enableUserTimingAPI) {
      if (isCommitting) {
        hasScheduledUpdateInCurrentCommit = true;
      }
      if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
        hasScheduledUpdateInCurrentPhase = true;
      }
    }
  }

  function startRequestCallbackTimer() {
    if (enableUserTimingAPI) {
      if (supportsUserTiming && !isWaitingForCallback) {
        isWaitingForCallback = true;
        beginMark('(Waiting for async callback...)');
      }
    }
  }

  function stopRequestCallbackTimer(didExpire, expirationTime) {
    if (enableUserTimingAPI) {
      if (supportsUserTiming) {
        isWaitingForCallback = false;
        var warning = didExpire ? 'React was blocked by main thread' : null;
        endMark('(Waiting for async callback... will force flush in ' + expirationTime + ' ms)', '(Waiting for async callback...)', warning);
      }
    }
  }

  function startWorkTimer(fiber) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
        return;
      }
      // If we pause, this is the fiber to unwind from.
      currentFiber = fiber;
      if (!beginFiberMark(fiber, null)) {
        return;
      }
      fiber._debugIsCurrentlyTiming = true;
    }
  }

  function cancelWorkTimer(fiber) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
        return;
      }
      // Remember we shouldn't complete measurement for this fiber.
      // Otherwise flamechart will be deep even for small updates.
      fiber._debugIsCurrentlyTiming = false;
      clearFiberMark(fiber, null);
    }
  }

  function stopWorkTimer(fiber) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
        return;
      }
      // If we pause, its parent is the fiber to unwind from.
      currentFiber = fiber.return;
      if (!fiber._debugIsCurrentlyTiming) {
        return;
      }
      fiber._debugIsCurrentlyTiming = false;
      endFiberMark(fiber, null, null);
    }
  }

  function stopFailedWorkTimer(fiber) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
        return;
      }
      // If we pause, its parent is the fiber to unwind from.
      currentFiber = fiber.return;
      if (!fiber._debugIsCurrentlyTiming) {
        return;
      }
      fiber._debugIsCurrentlyTiming = false;
      var warning = fiber.tag === SuspenseComponent || fiber.tag === DehydratedSuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
      endFiberMark(fiber, null, warning);
    }
  }

  function startPhaseTimer(fiber, phase) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      clearPendingPhaseMeasurement();
      if (!beginFiberMark(fiber, phase)) {
        return;
      }
      currentPhaseFiber = fiber;
      currentPhase = phase;
    }
  }

  function stopPhaseTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      if (currentPhase !== null && currentPhaseFiber !== null) {
        var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
        endFiberMark(currentPhaseFiber, currentPhase, warning);
      }
      currentPhase = null;
      currentPhaseFiber = null;
    }
  }

  function startWorkLoopTimer(nextUnitOfWork) {
    if (enableUserTimingAPI) {
      currentFiber = nextUnitOfWork;
      if (!supportsUserTiming) {
        return;
      }
      commitCountInCurrentWorkLoop = 0;
      // This is top level call.
      // Any other measurements are performed within.
      beginMark('(React Tree Reconciliation)');
      // Resume any measurements that were in progress during the last loop.
      resumeTimers();
    }
  }

  function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      var warning = null;
      if (interruptedBy !== null) {
        if (interruptedBy.tag === HostRoot) {
          warning = 'A top-level update interrupted the previous render';
        } else {
          var componentName = getComponentName(interruptedBy.type) || 'Unknown';
          warning = 'An update to ' + componentName + ' interrupted the previous render';
        }
      } else if (commitCountInCurrentWorkLoop > 1) {
        warning = 'There were cascading updates';
      }
      commitCountInCurrentWorkLoop = 0;
      var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)';
      // Pause any measurements until the next loop.
      pauseTimers();
      endMark(label, '(React Tree Reconciliation)', warning);
    }
  }

  function startCommitTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      isCommitting = true;
      hasScheduledUpdateInCurrentCommit = false;
      labelsInCurrentCommit.clear();
      beginMark('(Committing Changes)');
    }
  }

  function stopCommitTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }

      var warning = null;
      if (hasScheduledUpdateInCurrentCommit) {
        warning = 'Lifecycle hook scheduled a cascading update';
      } else if (commitCountInCurrentWorkLoop > 0) {
        warning = 'Caused by a cascading update in earlier commit';
      }
      hasScheduledUpdateInCurrentCommit = false;
      commitCountInCurrentWorkLoop++;
      isCommitting = false;
      labelsInCurrentCommit.clear();

      endMark('(Committing Changes)', '(Committing Changes)', warning);
    }
  }

  function startCommitSnapshotEffectsTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      effectCountInCurrentCommit = 0;
      beginMark('(Committing Snapshot Effects)');
    }
  }

  function stopCommitSnapshotEffectsTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      var count = effectCountInCurrentCommit;
      effectCountInCurrentCommit = 0;
      endMark('(Committing Snapshot Effects: ' + count + ' Total)', '(Committing Snapshot Effects)', null);
    }
  }

  function startCommitHostEffectsTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      effectCountInCurrentCommit = 0;
      beginMark('(Committing Host Effects)');
    }
  }

  function stopCommitHostEffectsTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      var count = effectCountInCurrentCommit;
      effectCountInCurrentCommit = 0;
      endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
    }
  }

  function startCommitLifeCyclesTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      effectCountInCurrentCommit = 0;
      beginMark('(Calling Lifecycle Methods)');
    }
  }

  function stopCommitLifeCyclesTimer() {
    if (enableUserTimingAPI) {
      if (!supportsUserTiming) {
        return;
      }
      var count = effectCountInCurrentCommit;
      effectCountInCurrentCommit = 0;
      endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
    }
  }

  var valueStack = [];

  var fiberStack = void 0;

  {
    fiberStack = [];
  }

  var index = -1;

  function createCursor(defaultValue) {
    return {
      current: defaultValue
    };
  }

  function pop(cursor, fiber) {
    if (index < 0) {
      {
        warningWithoutStack$1(false, 'Unexpected pop.');
      }
      return;
    }

    {
      if (fiber !== fiberStack[index]) {
        warningWithoutStack$1(false, 'Unexpected Fiber popped.');
      }
    }

    cursor.current = valueStack[index];

    valueStack[index] = null;

    {
      fiberStack[index] = null;
    }

    index--;
  }

  function push(cursor, value, fiber) {
    index++;

    valueStack[index] = cursor.current;

    {
      fiberStack[index] = fiber;
    }

    cursor.current = value;
  }

  function checkThatStackIsEmpty() {
    {
      if (index !== -1) {
        warningWithoutStack$1(false, 'Expected an empty stack. Something was not reset properly.');
      }
    }
  }

  function resetStackAfterFatalErrorInDev() {
    {
      index = -1;
      valueStack.length = 0;
      fiberStack.length = 0;
    }
  }

  var warnedAboutMissingGetChildContext = void 0;

  {
    warnedAboutMissingGetChildContext = {};
  }

  var emptyContextObject = {};
  {
    Object.freeze(emptyContextObject);
  }

  // A cursor to the current merged context object on the stack.
  var contextStackCursor = createCursor(emptyContextObject);
  // A cursor to a boolean indicating whether the context has changed.
  var didPerformWorkStackCursor = createCursor(false);
  // Keep track of the previous context object that was on the stack.
  // We use this to get access to the parent context after we have already
  // pushed the next context provider, and now need to merge their contexts.
  var previousContext = emptyContextObject;

  function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
    if (didPushOwnContextIfProvider && isContextProvider(Component)) {
      // If the fiber is a context provider itself, when we read its context
      // we may have already pushed its own child context on the stack. A context
      // provider should not "see" its own child context. Therefore we read the
      // previous (parent) context instead for a context provider.
      return previousContext;
    }
    return contextStackCursor.current;
  }

  function cacheContext(workInProgress, unmaskedContext, maskedContext) {
    var instance = workInProgress.stateNode;
    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
  }

  function getMaskedContext(workInProgress, unmaskedContext) {
    var type = workInProgress.type;
    var contextTypes = type.contextTypes;
    if (!contextTypes) {
      return emptyContextObject;
    }

    // Avoid recreating masked context unless unmasked context has changed.
    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
    // This may trigger infinite loops if componentWillReceiveProps calls setState.
    var instance = workInProgress.stateNode;
    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
      return instance.__reactInternalMemoizedMaskedChildContext;
    }

    var context = {};
    for (var key in contextTypes) {
      context[key] = unmaskedContext[key];
    }

    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
    }

    // Cache unmasked context so we can avoid recreating masked context unless necessary.
    // Context is created before the class component is instantiated so check for instance.
    if (instance) {
      cacheContext(workInProgress, unmaskedContext, context);
    }

    return context;
  }

  function hasContextChanged() {
    return didPerformWorkStackCursor.current;
  }

  function isContextProvider(type) {
    var childContextTypes = type.childContextTypes;
    return childContextTypes !== null && childContextTypes !== undefined;
  }

  function popContext(fiber) {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }

  function popTopLevelContextObject(fiber) {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }

  function pushTopLevelContextObject(fiber, context, didChange) {
    !(contextStackCursor.current === emptyContextObject) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    push(contextStackCursor, context, fiber);
    push(didPerformWorkStackCursor, didChange, fiber);
  }

  function processChildContext(fiber, type, parentContext) {
    var instance = fiber.stateNode;
    var childContextTypes = type.childContextTypes;

    // TODO (bvaughn) Replace this behavior with an invariant() in the future.
    // It has only been added in Fiber to match the (unintentional) behavior in Stack.
    if (typeof instance.getChildContext !== 'function') {
      {
        var componentName = getComponentName(type) || 'Unknown';

        if (!warnedAboutMissingGetChildContext[componentName]) {
          warnedAboutMissingGetChildContext[componentName] = true;
          warningWithoutStack$1(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
        }
      }
      return parentContext;
    }

    var childContext = void 0;
    {
      setCurrentPhase('getChildContext');
    }
    startPhaseTimer(fiber, 'getChildContext');
    childContext = instance.getChildContext();
    stopPhaseTimer();
    {
      setCurrentPhase(null);
    }
    for (var contextKey in childContext) {
      !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(type) || 'Unknown', contextKey) : void 0;
    }
    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(childContextTypes, childContext, 'child context', name,
      // In practice, there is one case in which we won't get a stack. It's when
      // somebody calls unstable_renderSubtreeIntoContainer() and we process
      // context from the parent component instance. The stack will be missing
      // because it's outside of the reconciliation, and so the pointer has not
      // been set. This is rare and doesn't matter. We'll also remove that API.
      getCurrentFiberStackInDev);
    }

    return _assign({}, parentContext, childContext);
  }

  function pushContextProvider(workInProgress) {
    var instance = workInProgress.stateNode;
    // We push the context as early as possible to ensure stack integrity.
    // If the instance does not exist yet, we will push null at first,
    // and replace it on the stack later when invalidating the context.
    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;

    // Remember the parent context so we can merge with it later.
    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
    previousContext = contextStackCursor.current;
    push(contextStackCursor, memoizedMergedChildContext, workInProgress);
    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);

    return true;
  }

  function invalidateContextProvider(workInProgress, type, didChange) {
    var instance = workInProgress.stateNode;
    !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    if (didChange) {
      // Merge parent and own context.
      // Skip this if we're not updating due to sCU.
      // This avoids unnecessarily recomputing memoized values.
      var mergedContext = processChildContext(workInProgress, type, previousContext);
      instance.__reactInternalMemoizedMergedChildContext = mergedContext;

      // Replace the old (or empty) context with the new one.
      // It is important to unwind the context in the reverse order.
      pop(didPerformWorkStackCursor, workInProgress);
      pop(contextStackCursor, workInProgress);
      // Now push the new context and mark that it has changed.
      push(contextStackCursor, mergedContext, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    } else {
      pop(didPerformWorkStackCursor, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    }
  }

  function findCurrentUnmaskedContext(fiber) {
    // Currently this is only used with renderSubtreeIntoContainer; not sure if it
    // makes sense elsewhere
    !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    var node = fiber;
    do {
      switch (node.tag) {
        case HostRoot:
          return node.stateNode.context;
        case ClassComponent:
          {
            var Component = node.type;
            if (isContextProvider(Component)) {
              return node.stateNode.__reactInternalMemoizedMergedChildContext;
            }
            break;
          }
      }
      node = node.return;
    } while (node !== null);
    invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.');
  }

  var onCommitFiberRoot = null;
  var onCommitFiberUnmount = null;
  var hasLoggedError = false;

  function catchErrors(fn) {
    return function (arg) {
      try {
        return fn(arg);
      } catch (err) {
        if ( true && !hasLoggedError) {
          hasLoggedError = true;
          warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
        }
      }
    };
  }

  var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';

  function injectInternals(internals) {
    if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
      // No DevTools
      return false;
    }
    var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
    if (hook.isDisabled) {
      // This isn't a real property on the hook, but it can be set to opt out
      // of DevTools integration and associated warnings and logs.
      // https://github.com/facebook/react/issues/3877
      return true;
    }
    if (!hook.supportsFiber) {
      {
        warningWithoutStack$1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
      }
      // DevTools exists, even though it doesn't support Fiber.
      return true;
    }
    try {
      var rendererID = hook.inject(internals);
      // We have successfully injected, so now it is safe to set up hooks.
      onCommitFiberRoot = catchErrors(function (root) {
        return hook.onCommitFiberRoot(rendererID, root);
      });
      onCommitFiberUnmount = catchErrors(function (fiber) {
        return hook.onCommitFiberUnmount(rendererID, fiber);
      });
    } catch (err) {
      // Catch all errors because it is unsafe to throw during initialization.
      {
        warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err);
      }
    }
    // DevTools exists
    return true;
  }

  function onCommitRoot(root) {
    if (typeof onCommitFiberRoot === 'function') {
      onCommitFiberRoot(root);
    }
  }

  function onCommitUnmount(fiber) {
    if (typeof onCommitFiberUnmount === 'function') {
      onCommitFiberUnmount(fiber);
    }
  }

  // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
  // Math.pow(2, 30) - 1
  // 0b111111111111111111111111111111
  var maxSigned31BitInt = 1073741823;

  var NoWork = 0;
  var Never = 1;
  var Sync = maxSigned31BitInt;

  var UNIT_SIZE = 10;
  var MAGIC_NUMBER_OFFSET = maxSigned31BitInt - 1;

  // 1 unit of expiration time represents 10ms.
  function msToExpirationTime(ms) {
    // Always add an offset so that we don't clash with the magic number for NoWork.
    return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
  }

  function expirationTimeToMs(expirationTime) {
    return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
  }

  function ceiling(num, precision) {
    return ((num / precision | 0) + 1) * precision;
  }

  function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
    return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
  }

  var LOW_PRIORITY_EXPIRATION = 5000;
  var LOW_PRIORITY_BATCH_SIZE = 250;

  function computeAsyncExpiration(currentTime) {
    return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
  }

  // We intentionally set a higher expiration time for interactive updates in
  // dev than in production.
  //
  // If the main thread is being blocked so long that you hit the expiration,
  // it's a problem that could be solved with better scheduling.
  //
  // People will be more likely to notice this and fix it with the long
  // expiration time in development.
  //
  // In production we opt for better UX at the risk of masking scheduling
  // problems, by expiring fast.
  var HIGH_PRIORITY_EXPIRATION = 500;
  var HIGH_PRIORITY_BATCH_SIZE = 100;

  function computeInteractiveExpiration(currentTime) {
    return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
  }

  var NoContext = 0;
  var ConcurrentMode = 1;
  var StrictMode = 2;
  var ProfileMode = 4;

  var hasBadMapPolyfill = void 0;

  {
    hasBadMapPolyfill = false;
    try {
      var nonExtensibleObject = Object.preventExtensions({});
      var testMap = new Map([[nonExtensibleObject, null]]);
      var testSet = new Set([nonExtensibleObject]);
      // This is necessary for Rollup to not consider these unused.
      // https://github.com/rollup/rollup/issues/1771
      // TODO: we can remove these if Rollup fixes the bug.
      testMap.set(0, 0);
      testSet.add(0);
    } catch (e) {
      // TODO: Consider warning about bad polyfills
      hasBadMapPolyfill = true;
    }
  }

  // A Fiber is work on a Component that needs to be done or was done. There can
  // be more than one per component.


  var debugCounter = void 0;

  {
    debugCounter = 1;
  }

  function FiberNode(tag, pendingProps, key, mode) {
    // Instance
    this.tag = tag;
    this.key = key;
    this.elementType = null;
    this.type = null;
    this.stateNode = null;

    // Fiber
    this.return = null;
    this.child = null;
    this.sibling = null;
    this.index = 0;

    this.ref = null;

    this.pendingProps = pendingProps;
    this.memoizedProps = null;
    this.updateQueue = null;
    this.memoizedState = null;
    this.contextDependencies = null;

    this.mode = mode;

    // Effects
    this.effectTag = NoEffect;
    this.nextEffect = null;

    this.firstEffect = null;
    this.lastEffect = null;

    this.expirationTime = NoWork;
    this.childExpirationTime = NoWork;

    this.alternate = null;

    if (enableProfilerTimer) {
      // Note: The following is done to avoid a v8 performance cliff.
      //
      // Initializing the fields below to smis and later updating them with
      // double values will cause Fibers to end up having separate shapes.
      // This behavior/bug has something to do with Object.preventExtension().
      // Fortunately this only impacts DEV builds.
      // Unfortunately it makes React unusably slow for some applications.
      // To work around this, initialize the fields below with doubles.
      //
      // Learn more about this here:
      // https://github.com/facebook/react/issues/14365
      // https://bugs.chromium.org/p/v8/issues/detail?id=8538
      this.actualDuration = Number.NaN;
      this.actualStartTime = Number.NaN;
      this.selfBaseDuration = Number.NaN;
      this.treeBaseDuration = Number.NaN;

      // It's okay to replace the initial doubles with smis after initialization.
      // This won't trigger the performance cliff mentioned above,
      // and it simplifies other profiler code (including DevTools).
      this.actualDuration = 0;
      this.actualStartTime = -1;
      this.selfBaseDuration = 0;
      this.treeBaseDuration = 0;
    }

    {
      this._debugID = debugCounter++;
      this._debugSource = null;
      this._debugOwner = null;
      this._debugIsCurrentlyTiming = false;
      this._debugHookTypes = null;
      if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
        Object.preventExtensions(this);
      }
    }
  }

  // This is a constructor function, rather than a POJO constructor, still
  // please ensure we do the following:
  // 1) Nobody should add any instance methods on this. Instance methods can be
  //    more difficult to predict when they get optimized and they are almost
  //    never inlined properly in static compilers.
  // 2) Nobody should rely on `instanceof Fiber` for type testing. We should
  //    always know when it is a fiber.
  // 3) We might want to experiment with using numeric keys since they are easier
  //    to optimize in a non-JIT environment.
  // 4) We can easily go from a constructor to a createFiber object literal if that
  //    is faster.
  // 5) It should be easy to port this to a C struct and keep a C implementation
  //    compatible.
  var createFiber = function (tag, pendingProps, key, mode) {
    // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
    return new FiberNode(tag, pendingProps, key, mode);
  };

  function shouldConstruct(Component) {
    var prototype = Component.prototype;
    return !!(prototype && prototype.isReactComponent);
  }

  function isSimpleFunctionComponent(type) {
    return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
  }

  function resolveLazyComponentTag(Component) {
    if (typeof Component === 'function') {
      return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
    } else if (Component !== undefined && Component !== null) {
      var $$typeof = Component.$$typeof;
      if ($$typeof === REACT_FORWARD_REF_TYPE) {
        return ForwardRef;
      }
      if ($$typeof === REACT_MEMO_TYPE) {
        return MemoComponent;
      }
    }
    return IndeterminateComponent;
  }

  // This is used to create an alternate fiber to do work on.
  function createWorkInProgress(current, pendingProps, expirationTime) {
    var workInProgress = current.alternate;
    if (workInProgress === null) {
      // We use a double buffering pooling technique because we know that we'll
      // only ever need at most two versions of a tree. We pool the "other" unused
      // node that we're free to reuse. This is lazily created to avoid allocating
      // extra objects for things that are never updated. It also allow us to
      // reclaim the extra memory if needed.
      workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
      workInProgress.elementType = current.elementType;
      workInProgress.type = current.type;
      workInProgress.stateNode = current.stateNode;

      {
        // DEV-only fields
        workInProgress._debugID = current._debugID;
        workInProgress._debugSource = current._debugSource;
        workInProgress._debugOwner = current._debugOwner;
        workInProgress._debugHookTypes = current._debugHookTypes;
      }

      workInProgress.alternate = current;
      current.alternate = workInProgress;
    } else {
      workInProgress.pendingProps = pendingProps;

      // We already have an alternate.
      // Reset the effect tag.
      workInProgress.effectTag = NoEffect;

      // The effect list is no longer valid.
      workInProgress.nextEffect = null;
      workInProgress.firstEffect = null;
      workInProgress.lastEffect = null;

      if (enableProfilerTimer) {
        // We intentionally reset, rather than copy, actualDuration & actualStartTime.
        // This prevents time from endlessly accumulating in new commits.
        // This has the downside of resetting values for different priority renders,
        // But works for yielding (the common case) and should support resuming.
        workInProgress.actualDuration = 0;
        workInProgress.actualStartTime = -1;
      }
    }

    workInProgress.childExpirationTime = current.childExpirationTime;
    workInProgress.expirationTime = current.expirationTime;

    workInProgress.child = current.child;
    workInProgress.memoizedProps = current.memoizedProps;
    workInProgress.memoizedState = current.memoizedState;
    workInProgress.updateQueue = current.updateQueue;
    workInProgress.contextDependencies = current.contextDependencies;

    // These will be overridden during the parent's reconciliation
    workInProgress.sibling = current.sibling;
    workInProgress.index = current.index;
    workInProgress.ref = current.ref;

    if (enableProfilerTimer) {
      workInProgress.selfBaseDuration = current.selfBaseDuration;
      workInProgress.treeBaseDuration = current.treeBaseDuration;
    }

    return workInProgress;
  }

  function createHostRootFiber(isConcurrent) {
    var mode = isConcurrent ? ConcurrentMode | StrictMode : NoContext;

    if (enableProfilerTimer && isDevToolsPresent) {
      // Always collect profile timings when DevTools are present.
      // This enables DevTools to start capturing timing at any point–
      // Without some nodes in the tree having empty base times.
      mode |= ProfileMode;
    }

    return createFiber(HostRoot, null, null, mode);
  }

  function createFiberFromTypeAndProps(type, // React$ElementType
  key, pendingProps, owner, mode, expirationTime) {
    var fiber = void 0;

    var fiberTag = IndeterminateComponent;
    // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
    var resolvedType = type;
    if (typeof type === 'function') {
      if (shouldConstruct(type)) {
        fiberTag = ClassComponent;
      }
    } else if (typeof type === 'string') {
      fiberTag = HostComponent;
    } else {
      getTag: switch (type) {
        case REACT_FRAGMENT_TYPE:
          return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
        case REACT_CONCURRENT_MODE_TYPE:
          return createFiberFromMode(pendingProps, mode | ConcurrentMode | StrictMode, expirationTime, key);
        case REACT_STRICT_MODE_TYPE:
          return createFiberFromMode(pendingProps, mode | StrictMode, expirationTime, key);
        case REACT_PROFILER_TYPE:
          return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
        case REACT_SUSPENSE_TYPE:
          return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
        default:
          {
            if (typeof type === 'object' && type !== null) {
              switch (type.$$typeof) {
                case REACT_PROVIDER_TYPE:
                  fiberTag = ContextProvider;
                  break getTag;
                case REACT_CONTEXT_TYPE:
                  // This is a consumer
                  fiberTag = ContextConsumer;
                  break getTag;
                case REACT_FORWARD_REF_TYPE:
                  fiberTag = ForwardRef;
                  break getTag;
                case REACT_MEMO_TYPE:
                  fiberTag = MemoComponent;
                  break getTag;
                case REACT_LAZY_TYPE:
                  fiberTag = LazyComponent;
                  resolvedType = null;
                  break getTag;
              }
            }
            var info = '';
            {
              if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
                info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
              }
              var ownerName = owner ? getComponentName(owner.type) : null;
              if (ownerName) {
                info += '\n\nCheck the render method of `' + ownerName + '`.';
              }
            }
            invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
          }
      }
    }

    fiber = createFiber(fiberTag, pendingProps, key, mode);
    fiber.elementType = type;
    fiber.type = resolvedType;
    fiber.expirationTime = expirationTime;

    return fiber;
  }

  function createFiberFromElement(element, mode, expirationTime) {
    var owner = null;
    {
      owner = element._owner;
    }
    var type = element.type;
    var key = element.key;
    var pendingProps = element.props;
    var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
    {
      fiber._debugSource = element._source;
      fiber._debugOwner = element._owner;
    }
    return fiber;
  }

  function createFiberFromFragment(elements, mode, expirationTime, key) {
    var fiber = createFiber(Fragment, elements, key, mode);
    fiber.expirationTime = expirationTime;
    return fiber;
  }

  function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
    {
      if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
        warningWithoutStack$1(false, 'Profiler must specify an "id" string and "onRender" function as props');
      }
    }

    var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
    // TODO: The Profiler fiber shouldn't have a type. It has a tag.
    fiber.elementType = REACT_PROFILER_TYPE;
    fiber.type = REACT_PROFILER_TYPE;
    fiber.expirationTime = expirationTime;

    return fiber;
  }

  function createFiberFromMode(pendingProps, mode, expirationTime, key) {
    var fiber = createFiber(Mode, pendingProps, key, mode);

    // TODO: The Mode fiber shouldn't have a type. It has a tag.
    var type = (mode & ConcurrentMode) === NoContext ? REACT_STRICT_MODE_TYPE : REACT_CONCURRENT_MODE_TYPE;
    fiber.elementType = type;
    fiber.type = type;

    fiber.expirationTime = expirationTime;
    return fiber;
  }

  function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
    var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);

    // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
    var type = REACT_SUSPENSE_TYPE;
    fiber.elementType = type;
    fiber.type = type;

    fiber.expirationTime = expirationTime;
    return fiber;
  }

  function createFiberFromText(content, mode, expirationTime) {
    var fiber = createFiber(HostText, content, null, mode);
    fiber.expirationTime = expirationTime;
    return fiber;
  }

  function createFiberFromHostInstanceForDeletion() {
    var fiber = createFiber(HostComponent, null, null, NoContext);
    // TODO: These should not need a type.
    fiber.elementType = 'DELETED';
    fiber.type = 'DELETED';
    return fiber;
  }

  function createFiberFromPortal(portal, mode, expirationTime) {
    var pendingProps = portal.children !== null ? portal.children : [];
    var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
    fiber.expirationTime = expirationTime;
    fiber.stateNode = {
      containerInfo: portal.containerInfo,
      pendingChildren: null, // Used by persistent updates
      implementation: portal.implementation
    };
    return fiber;
  }

  // Used for stashing WIP properties to replay failed work in DEV.
  function assignFiberPropertiesInDEV(target, source) {
    if (target === null) {
      // This Fiber's initial properties will always be overwritten.
      // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
      target = createFiber(IndeterminateComponent, null, null, NoContext);
    }

    // This is intentionally written as a list of all properties.
    // We tried to use Object.assign() instead but this is called in
    // the hottest path, and Object.assign() was too slow:
    // https://github.com/facebook/react/issues/12502
    // This code is DEV-only so size is not a concern.

    target.tag = source.tag;
    target.key = source.key;
    target.elementType = source.elementType;
    target.type = source.type;
    target.stateNode = source.stateNode;
    target.return = source.return;
    target.child = source.child;
    target.sibling = source.sibling;
    target.index = source.index;
    target.ref = source.ref;
    target.pendingProps = source.pendingProps;
    target.memoizedProps = source.memoizedProps;
    target.updateQueue = source.updateQueue;
    target.memoizedState = source.memoizedState;
    target.contextDependencies = source.contextDependencies;
    target.mode = source.mode;
    target.effectTag = source.effectTag;
    target.nextEffect = source.nextEffect;
    target.firstEffect = source.firstEffect;
    target.lastEffect = source.lastEffect;
    target.expirationTime = source.expirationTime;
    target.childExpirationTime = source.childExpirationTime;
    target.alternate = source.alternate;
    if (enableProfilerTimer) {
      target.actualDuration = source.actualDuration;
      target.actualStartTime = source.actualStartTime;
      target.selfBaseDuration = source.selfBaseDuration;
      target.treeBaseDuration = source.treeBaseDuration;
    }
    target._debugID = source._debugID;
    target._debugSource = source._debugSource;
    target._debugOwner = source._debugOwner;
    target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
    target._debugHookTypes = source._debugHookTypes;
    return target;
  }

  // TODO: This should be lifted into the renderer.


  // The following attributes are only used by interaction tracing builds.
  // They enable interactions to be associated with their async work,
  // And expose interaction metadata to the React DevTools Profiler plugin.
  // Note that these attributes are only defined when the enableSchedulerTracing flag is enabled.


  // Exported FiberRoot type includes all properties,
  // To avoid requiring potentially error-prone :any casts throughout the project.
  // Profiling properties are only safe to access in profiling builds (when enableSchedulerTracing is true).
  // The types are defined separately within this file to ensure they stay in sync.
  // (We don't have to use an inline :any cast when enableSchedulerTracing is disabled.)


  function createFiberRoot(containerInfo, isConcurrent, hydrate) {
    // Cyclic construction. This cheats the type system right now because
    // stateNode is any.
    var uninitializedFiber = createHostRootFiber(isConcurrent);

    var root = void 0;
    if (enableSchedulerTracing) {
      root = {
        current: uninitializedFiber,
        containerInfo: containerInfo,
        pendingChildren: null,

        earliestPendingTime: NoWork,
        latestPendingTime: NoWork,
        earliestSuspendedTime: NoWork,
        latestSuspendedTime: NoWork,
        latestPingedTime: NoWork,

        pingCache: null,

        didError: false,

        pendingCommitExpirationTime: NoWork,
        finishedWork: null,
        timeoutHandle: noTimeout,
        context: null,
        pendingContext: null,
        hydrate: hydrate,
        nextExpirationTimeToWorkOn: NoWork,
        expirationTime: NoWork,
        firstBatch: null,
        nextScheduledRoot: null,

        interactionThreadID: tracing.unstable_getThreadID(),
        memoizedInteractions: new Set(),
        pendingInteractionMap: new Map()
      };
    } else {
      root = {
        current: uninitializedFiber,
        containerInfo: containerInfo,
        pendingChildren: null,

        pingCache: null,

        earliestPendingTime: NoWork,
        latestPendingTime: NoWork,
        earliestSuspendedTime: NoWork,
        latestSuspendedTime: NoWork,
        latestPingedTime: NoWork,

        didError: false,

        pendingCommitExpirationTime: NoWork,
        finishedWork: null,
        timeoutHandle: noTimeout,
        context: null,
        pendingContext: null,
        hydrate: hydrate,
        nextExpirationTimeToWorkOn: NoWork,
        expirationTime: NoWork,
        firstBatch: null,
        nextScheduledRoot: null
      };
    }

    uninitializedFiber.stateNode = root;

    // The reason for the way the Flow types are structured in this file,
    // Is to avoid needing :any casts everywhere interaction tracing fields are used.
    // Unfortunately that requires an :any cast for non-interaction tracing capable builds.
    // $FlowFixMe Remove this :any cast and replace it with something better.
    return root;
  }

  var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
    var funcArgs = Array.prototype.slice.call(arguments, 3);
    try {
      func.apply(context, funcArgs);
    } catch (error) {
      this.onError(error);
    }
  };

  {
    // In DEV mode, we swap out invokeGuardedCallback for a special version
    // that plays more nicely with the browser's DevTools. The idea is to preserve
    // "Pause on exceptions" behavior. Because React wraps all user-provided
    // functions in invokeGuardedCallback, and the production version of
    // invokeGuardedCallback uses a try-catch, all user exceptions are treated
    // like caught exceptions, and the DevTools won't pause unless the developer
    // takes the extra step of enabling pause on caught exceptions. This is
    // unintuitive, though, because even though React has caught the error, from
    // the developer's perspective, the error is uncaught.
    //
    // To preserve the expected "Pause on exceptions" behavior, we don't use a
    // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
    // DOM node, and call the user-provided callback from inside an event handler
    // for that fake event. If the callback throws, the error is "captured" using
    // a global event handler. But because the error happens in a different
    // event loop context, it does not interrupt the normal program flow.
    // Effectively, this gives us try-catch behavior without actually using
    // try-catch. Neat!

    // Check that the browser supports the APIs we need to implement our special
    // DEV version of invokeGuardedCallback
    if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
      var fakeNode = document.createElement('react');

      var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
        // If document doesn't exist we know for sure we will crash in this method
        // when we call document.createEvent(). However this can cause confusing
        // errors: https://github.com/facebookincubator/create-react-app/issues/3482
        // So we preemptively throw with a better message instead.
        !(typeof document !== 'undefined') ? invariant(false, 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.') : void 0;
        var evt = document.createEvent('Event');

        // Keeps track of whether the user-provided callback threw an error. We
        // set this to true at the beginning, then set it to false right after
        // calling the function. If the function errors, `didError` will never be
        // set to false. This strategy works even if the browser is flaky and
        // fails to call our global error handler, because it doesn't rely on
        // the error event at all.
        var didError = true;

        // Keeps track of the value of window.event so that we can reset it
        // during the callback to let user code access window.event in the
        // browsers that support it.
        var windowEvent = window.event;

        // Keeps track of the descriptor of window.event to restore it after event
        // dispatching: https://github.com/facebook/react/issues/13688
        var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');

        // Create an event handler for our fake event. We will synchronously
        // dispatch our fake event using `dispatchEvent`. Inside the handler, we
        // call the user-provided callback.
        var funcArgs = Array.prototype.slice.call(arguments, 3);
        function callCallback() {
          // We immediately remove the callback from event listeners so that
          // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
          // nested call would trigger the fake event handlers of any call higher
          // in the stack.
          fakeNode.removeEventListener(evtType, callCallback, false);

          // We check for window.hasOwnProperty('event') to prevent the
          // window.event assignment in both IE <= 10 as they throw an error
          // "Member not found" in strict mode, and in Firefox which does not
          // support window.event.
          if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
            window.event = windowEvent;
          }

          func.apply(context, funcArgs);
          didError = false;
        }

        // Create a global error event handler. We use this to capture the value
        // that was thrown. It's possible that this error handler will fire more
        // than once; for example, if non-React code also calls `dispatchEvent`
        // and a handler for that event throws. We should be resilient to most of
        // those cases. Even if our error event handler fires more than once, the
        // last error event is always used. If the callback actually does error,
        // we know that the last error event is the correct one, because it's not
        // possible for anything else to have happened in between our callback
        // erroring and the code that follows the `dispatchEvent` call below. If
        // the callback doesn't error, but the error event was fired, we know to
        // ignore it because `didError` will be false, as described above.
        var error = void 0;
        // Use this to track whether the error event is ever called.
        var didSetError = false;
        var isCrossOriginError = false;

        function handleWindowError(event) {
          error = event.error;
          didSetError = true;
          if (error === null && event.colno === 0 && event.lineno === 0) {
            isCrossOriginError = true;
          }
          if (event.defaultPrevented) {
            // Some other error handler has prevented default.
            // Browsers silence the error report if this happens.
            // We'll remember this to later decide whether to log it or not.
            if (error != null && typeof error === 'object') {
              try {
                error._suppressLogging = true;
              } catch (inner) {
                // Ignore.
              }
            }
          }
        }

        // Create a fake event type.
        var evtType = 'react-' + (name ? name : 'invokeguardedcallback');

        // Attach our event handlers
        window.addEventListener('error', handleWindowError);
        fakeNode.addEventListener(evtType, callCallback, false);

        // Synchronously dispatch our fake event. If the user-provided function
        // errors, it will trigger our global error handler.
        evt.initEvent(evtType, false, false);
        fakeNode.dispatchEvent(evt);

        if (windowEventDescriptor) {
          Object.defineProperty(window, 'event', windowEventDescriptor);
        }

        if (didError) {
          if (!didSetError) {
            // The callback errored, but the error event never fired.
            error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
          } else if (isCrossOriginError) {
            error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
          }
          this.onError(error);
        }

        // Remove our event listeners
        window.removeEventListener('error', handleWindowError);
      };

      invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
    }
  }

  var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;

  // Used by Fiber to simulate a try-catch.
  var hasError = false;
  var caughtError = null;

  var reporter = {
    onError: function (error) {
      hasError = true;
      caughtError = error;
    }
  };

  /**
   * Call a function while guarding against errors that happens within it.
   * Returns an error if it throws, otherwise null.
   *
   * In production, this is implemented using a try-catch. The reason we don't
   * use a try-catch directly is so that we can swap out a different
   * implementation in DEV mode.
   *
   * @param {String} name of the guard to use for logging or debugging
   * @param {Function} func The function to invoke
   * @param {*} context The context to use when calling the function
   * @param {...*} args Arguments for function
   */
  function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
    hasError = false;
    caughtError = null;
    invokeGuardedCallbackImpl$1.apply(reporter, arguments);
  }

  /**
   * Same as invokeGuardedCallback, but instead of returning an error, it stores
   * it in a global so it can be rethrown by `rethrowCaughtError` later.
   * TODO: See if caughtError and rethrowError can be unified.
   *
   * @param {String} name of the guard to use for logging or debugging
   * @param {Function} func The function to invoke
   * @param {*} context The context to use when calling the function
   * @param {...*} args Arguments for function
   */


  /**
   * During execution of guarded functions we will capture the first error which
   * we will rethrow to be handled by the top level error handler.
   */


  function hasCaughtError() {
    return hasError;
  }

  function clearCaughtError() {
    if (hasError) {
      var error = caughtError;
      hasError = false;
      caughtError = null;
      return error;
    } else {
      invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
    }
  }

  /**
   * Forked from fbjs/warning:
   * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
   *
   * Only change is we use console.warn instead of console.error,
   * and do nothing when 'console' is not supported.
   * This really simplifies the code.
   * ---
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var lowPriorityWarning = function () {};

  {
    var printWarning = function (format) {
      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }

      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      if (typeof console !== 'undefined') {
        console.warn(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };

    lowPriorityWarning = function (condition, format) {
      if (format === undefined) {
        throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
      }
      if (!condition) {
        for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
          args[_key2 - 2] = arguments[_key2];
        }

        printWarning.apply(undefined, [format].concat(args));
      }
    };
  }

  var lowPriorityWarning$1 = lowPriorityWarning;

  var ReactStrictModeWarnings = {
    discardPendingWarnings: function () {},
    flushPendingDeprecationWarnings: function () {},
    flushPendingUnsafeLifecycleWarnings: function () {},
    recordDeprecationWarnings: function (fiber, instance) {},
    recordUnsafeLifecycleWarnings: function (fiber, instance) {},
    recordLegacyContextWarning: function (fiber, instance) {},
    flushLegacyContextWarning: function () {}
  };

  {
    var LIFECYCLE_SUGGESTIONS = {
      UNSAFE_componentWillMount: 'componentDidMount',
      UNSAFE_componentWillReceiveProps: 'static getDerivedStateFromProps',
      UNSAFE_componentWillUpdate: 'componentDidUpdate'
    };

    var pendingComponentWillMountWarnings = [];
    var pendingComponentWillReceivePropsWarnings = [];
    var pendingComponentWillUpdateWarnings = [];
    var pendingUnsafeLifecycleWarnings = new Map();
    var pendingLegacyContextWarning = new Map();

    // Tracks components we have already warned about.
    var didWarnAboutDeprecatedLifecycles = new Set();
    var didWarnAboutUnsafeLifecycles = new Set();
    var didWarnAboutLegacyContext = new Set();

    var setToSortedString = function (set) {
      var array = [];
      set.forEach(function (value) {
        array.push(value);
      });
      return array.sort().join(', ');
    };

    ReactStrictModeWarnings.discardPendingWarnings = function () {
      pendingComponentWillMountWarnings = [];
      pendingComponentWillReceivePropsWarnings = [];
      pendingComponentWillUpdateWarnings = [];
      pendingUnsafeLifecycleWarnings = new Map();
      pendingLegacyContextWarning = new Map();
    };

    ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
      pendingUnsafeLifecycleWarnings.forEach(function (lifecycleWarningsMap, strictRoot) {
        var lifecyclesWarningMessages = [];

        Object.keys(lifecycleWarningsMap).forEach(function (lifecycle) {
          var lifecycleWarnings = lifecycleWarningsMap[lifecycle];
          if (lifecycleWarnings.length > 0) {
            var componentNames = new Set();
            lifecycleWarnings.forEach(function (fiber) {
              componentNames.add(getComponentName(fiber.type) || 'Component');
              didWarnAboutUnsafeLifecycles.add(fiber.type);
            });

            var formatted = lifecycle.replace('UNSAFE_', '');
            var suggestion = LIFECYCLE_SUGGESTIONS[lifecycle];
            var sortedComponentNames = setToSortedString(componentNames);

            lifecyclesWarningMessages.push(formatted + ': Please update the following components to use ' + (suggestion + ' instead: ' + sortedComponentNames));
          }
        });

        if (lifecyclesWarningMessages.length > 0) {
          var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);

          warningWithoutStack$1(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMessages.join('\n\n'));
        }
      });

      pendingUnsafeLifecycleWarnings = new Map();
    };

    var findStrictRoot = function (fiber) {
      var maybeStrictRoot = null;

      var node = fiber;
      while (node !== null) {
        if (node.mode & StrictMode) {
          maybeStrictRoot = node;
        }
        node = node.return;
      }

      return maybeStrictRoot;
    };

    ReactStrictModeWarnings.flushPendingDeprecationWarnings = function () {
      if (pendingComponentWillMountWarnings.length > 0) {
        var uniqueNames = new Set();
        pendingComponentWillMountWarnings.forEach(function (fiber) {
          uniqueNames.add(getComponentName(fiber.type) || 'Component');
          didWarnAboutDeprecatedLifecycles.add(fiber.type);
        });

        var sortedNames = setToSortedString(uniqueNames);

        lowPriorityWarning$1(false, 'componentWillMount is deprecated and will be removed in the next major version. ' + 'Use componentDidMount instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillMount.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', sortedNames);

        pendingComponentWillMountWarnings = [];
      }

      if (pendingComponentWillReceivePropsWarnings.length > 0) {
        var _uniqueNames = new Set();
        pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
          _uniqueNames.add(getComponentName(fiber.type) || 'Component');
          didWarnAboutDeprecatedLifecycles.add(fiber.type);
        });

        var _sortedNames = setToSortedString(_uniqueNames);

        lowPriorityWarning$1(false, 'componentWillReceiveProps is deprecated and will be removed in the next major version. ' + 'Use static getDerivedStateFromProps instead.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames);

        pendingComponentWillReceivePropsWarnings = [];
      }

      if (pendingComponentWillUpdateWarnings.length > 0) {
        var _uniqueNames2 = new Set();
        pendingComponentWillUpdateWarnings.forEach(function (fiber) {
          _uniqueNames2.add(getComponentName(fiber.type) || 'Component');
          didWarnAboutDeprecatedLifecycles.add(fiber.type);
        });

        var _sortedNames2 = setToSortedString(_uniqueNames2);

        lowPriorityWarning$1(false, 'componentWillUpdate is deprecated and will be removed in the next major version. ' + 'Use componentDidUpdate instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillUpdate.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames2);

        pendingComponentWillUpdateWarnings = [];
      }
    };

    ReactStrictModeWarnings.recordDeprecationWarnings = function (fiber, instance) {
      // Dedup strategy: Warn once per component.
      if (didWarnAboutDeprecatedLifecycles.has(fiber.type)) {
        return;
      }

      // Don't warn about react-lifecycles-compat polyfilled components.
      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
        pendingComponentWillMountWarnings.push(fiber);
      }
      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
        pendingComponentWillReceivePropsWarnings.push(fiber);
      }
      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
        pendingComponentWillUpdateWarnings.push(fiber);
      }
    };

    ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
      var strictRoot = findStrictRoot(fiber);
      if (strictRoot === null) {
        warningWithoutStack$1(false, 'Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
        return;
      }

      // Dedup strategy: Warn once per component.
      // This is difficult to track any other way since component names
      // are often vague and are likely to collide between 3rd party libraries.
      // An expand property is probably okay to use here since it's DEV-only,
      // and will only be set in the event of serious warnings.
      if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
        return;
      }

      var warningsForRoot = void 0;
      if (!pendingUnsafeLifecycleWarnings.has(strictRoot)) {
        warningsForRoot = {
          UNSAFE_componentWillMount: [],
          UNSAFE_componentWillReceiveProps: [],
          UNSAFE_componentWillUpdate: []
        };

        pendingUnsafeLifecycleWarnings.set(strictRoot, warningsForRoot);
      } else {
        warningsForRoot = pendingUnsafeLifecycleWarnings.get(strictRoot);
      }

      var unsafeLifecycles = [];
      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillMount === 'function') {
        unsafeLifecycles.push('UNSAFE_componentWillMount');
      }
      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
        unsafeLifecycles.push('UNSAFE_componentWillReceiveProps');
      }
      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillUpdate === 'function') {
        unsafeLifecycles.push('UNSAFE_componentWillUpdate');
      }

      if (unsafeLifecycles.length > 0) {
        unsafeLifecycles.forEach(function (lifecycle) {
          warningsForRoot[lifecycle].push(fiber);
        });
      }
    };

    ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
      var strictRoot = findStrictRoot(fiber);
      if (strictRoot === null) {
        warningWithoutStack$1(false, 'Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
        return;
      }

      // Dedup strategy: Warn once per component.
      if (didWarnAboutLegacyContext.has(fiber.type)) {
        return;
      }

      var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);

      if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
        if (warningsForRoot === undefined) {
          warningsForRoot = [];
          pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
        }
        warningsForRoot.push(fiber);
      }
    };

    ReactStrictModeWarnings.flushLegacyContextWarning = function () {
      pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
        var uniqueNames = new Set();
        fiberArray.forEach(function (fiber) {
          uniqueNames.add(getComponentName(fiber.type) || 'Component');
          didWarnAboutLegacyContext.add(fiber.type);
        });

        var sortedNames = setToSortedString(uniqueNames);
        var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);

        warningWithoutStack$1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
      });
    };
  }

  // This lets us hook into Fiber to debug what it's doing.
  // See https://github.com/facebook/react/pull/8033.
  // This is not part of the public API, not even for React DevTools.
  // You may only inject a debugTool if you work on React Fiber itself.
  var ReactFiberInstrumentation = {
    debugTool: null
  };

  var ReactFiberInstrumentation_1 = ReactFiberInstrumentation;

  // TODO: Offscreen updates should never suspend. However, a promise that
  // suspended inside an offscreen subtree should be able to ping at the priority
  // of the outer render.

  function markPendingPriorityLevel(root, expirationTime) {
    // If there's a gap between completing a failed root and retrying it,
    // additional updates may be scheduled. Clear `didError`, in case the update
    // is sufficient to fix the error.
    root.didError = false;

    // Update the latest and earliest pending times
    var earliestPendingTime = root.earliestPendingTime;
    if (earliestPendingTime === NoWork) {
      // No other pending updates.
      root.earliestPendingTime = root.latestPendingTime = expirationTime;
    } else {
      if (earliestPendingTime < expirationTime) {
        // This is the earliest pending update.
        root.earliestPendingTime = expirationTime;
      } else {
        var latestPendingTime = root.latestPendingTime;
        if (latestPendingTime > expirationTime) {
          // This is the latest pending update
          root.latestPendingTime = expirationTime;
        }
      }
    }
    findNextExpirationTimeToWorkOn(expirationTime, root);
  }

  function markCommittedPriorityLevels(root, earliestRemainingTime) {
    root.didError = false;

    if (earliestRemainingTime === NoWork) {
      // Fast path. There's no remaining work. Clear everything.
      root.earliestPendingTime = NoWork;
      root.latestPendingTime = NoWork;
      root.earliestSuspendedTime = NoWork;
      root.latestSuspendedTime = NoWork;
      root.latestPingedTime = NoWork;
      findNextExpirationTimeToWorkOn(NoWork, root);
      return;
    }

    if (earliestRemainingTime < root.latestPingedTime) {
      root.latestPingedTime = NoWork;
    }

    // Let's see if the previous latest known pending level was just flushed.
    var latestPendingTime = root.latestPendingTime;
    if (latestPendingTime !== NoWork) {
      if (latestPendingTime > earliestRemainingTime) {
        // We've flushed all the known pending levels.
        root.earliestPendingTime = root.latestPendingTime = NoWork;
      } else {
        var earliestPendingTime = root.earliestPendingTime;
        if (earliestPendingTime > earliestRemainingTime) {
          // We've flushed the earliest known pending level. Set this to the
          // latest pending time.
          root.earliestPendingTime = root.latestPendingTime;
        }
      }
    }

    // Now let's handle the earliest remaining level in the whole tree. We need to
    // decide whether to treat it as a pending level or as suspended. Check
    // it falls within the range of known suspended levels.

    var earliestSuspendedTime = root.earliestSuspendedTime;
    if (earliestSuspendedTime === NoWork) {
      // There's no suspended work. Treat the earliest remaining level as a
      // pending level.
      markPendingPriorityLevel(root, earliestRemainingTime);
      findNextExpirationTimeToWorkOn(NoWork, root);
      return;
    }

    var latestSuspendedTime = root.latestSuspendedTime;
    if (earliestRemainingTime < latestSuspendedTime) {
      // The earliest remaining level is later than all the suspended work. That
      // means we've flushed all the suspended work.
      root.earliestSuspendedTime = NoWork;
      root.latestSuspendedTime = NoWork;
      root.latestPingedTime = NoWork;

      // There's no suspended work. Treat the earliest remaining level as a
      // pending level.
      markPendingPriorityLevel(root, earliestRemainingTime);
      findNextExpirationTimeToWorkOn(NoWork, root);
      return;
    }

    if (earliestRemainingTime > earliestSuspendedTime) {
      // The earliest remaining time is earlier than all the suspended work.
      // Treat it as a pending update.
      markPendingPriorityLevel(root, earliestRemainingTime);
      findNextExpirationTimeToWorkOn(NoWork, root);
      return;
    }

    // The earliest remaining time falls within the range of known suspended
    // levels. We should treat this as suspended work.
    findNextExpirationTimeToWorkOn(NoWork, root);
  }

  function hasLowerPriorityWork(root, erroredExpirationTime) {
    var latestPendingTime = root.latestPendingTime;
    var latestSuspendedTime = root.latestSuspendedTime;
    var latestPingedTime = root.latestPingedTime;
    return latestPendingTime !== NoWork && latestPendingTime < erroredExpirationTime || latestSuspendedTime !== NoWork && latestSuspendedTime < erroredExpirationTime || latestPingedTime !== NoWork && latestPingedTime < erroredExpirationTime;
  }

  function isPriorityLevelSuspended(root, expirationTime) {
    var earliestSuspendedTime = root.earliestSuspendedTime;
    var latestSuspendedTime = root.latestSuspendedTime;
    return earliestSuspendedTime !== NoWork && expirationTime <= earliestSuspendedTime && expirationTime >= latestSuspendedTime;
  }

  function markSuspendedPriorityLevel(root, suspendedTime) {
    root.didError = false;
    clearPing(root, suspendedTime);

    // First, check the known pending levels and update them if needed.
    var earliestPendingTime = root.earliestPendingTime;
    var latestPendingTime = root.latestPendingTime;
    if (earliestPendingTime === suspendedTime) {
      if (latestPendingTime === suspendedTime) {
        // Both known pending levels were suspended. Clear them.
        root.earliestPendingTime = root.latestPendingTime = NoWork;
      } else {
        // The earliest pending level was suspended. Clear by setting it to the
        // latest pending level.
        root.earliestPendingTime = latestPendingTime;
      }
    } else if (latestPendingTime === suspendedTime) {
      // The latest pending level was suspended. Clear by setting it to the
      // latest pending level.
      root.latestPendingTime = earliestPendingTime;
    }

    // Finally, update the known suspended levels.
    var earliestSuspendedTime = root.earliestSuspendedTime;
    var latestSuspendedTime = root.latestSuspendedTime;
    if (earliestSuspendedTime === NoWork) {
      // No other suspended levels.
      root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
    } else {
      if (earliestSuspendedTime < suspendedTime) {
        // This is the earliest suspended level.
        root.earliestSuspendedTime = suspendedTime;
      } else if (latestSuspendedTime > suspendedTime) {
        // This is the latest suspended level
        root.latestSuspendedTime = suspendedTime;
      }
    }

    findNextExpirationTimeToWorkOn(suspendedTime, root);
  }

  function markPingedPriorityLevel(root, pingedTime) {
    root.didError = false;

    // TODO: When we add back resuming, we need to ensure the progressed work
    // is thrown out and not reused during the restarted render. One way to
    // invalidate the progressed work is to restart at expirationTime + 1.
    var latestPingedTime = root.latestPingedTime;
    if (latestPingedTime === NoWork || latestPingedTime > pingedTime) {
      root.latestPingedTime = pingedTime;
    }
    findNextExpirationTimeToWorkOn(pingedTime, root);
  }

  function clearPing(root, completedTime) {
    var latestPingedTime = root.latestPingedTime;
    if (latestPingedTime >= completedTime) {
      root.latestPingedTime = NoWork;
    }
  }

  function findEarliestOutstandingPriorityLevel(root, renderExpirationTime) {
    var earliestExpirationTime = renderExpirationTime;

    var earliestPendingTime = root.earliestPendingTime;
    var earliestSuspendedTime = root.earliestSuspendedTime;
    if (earliestPendingTime > earliestExpirationTime) {
      earliestExpirationTime = earliestPendingTime;
    }
    if (earliestSuspendedTime > earliestExpirationTime) {
      earliestExpirationTime = earliestSuspendedTime;
    }
    return earliestExpirationTime;
  }

  function didExpireAtExpirationTime(root, currentTime) {
    var expirationTime = root.expirationTime;
    if (expirationTime !== NoWork && currentTime <= expirationTime) {
      // The root has expired. Flush all work up to the current time.
      root.nextExpirationTimeToWorkOn = currentTime;
    }
  }

  function findNextExpirationTimeToWorkOn(completedExpirationTime, root) {
    var earliestSuspendedTime = root.earliestSuspendedTime;
    var latestSuspendedTime = root.latestSuspendedTime;
    var earliestPendingTime = root.earliestPendingTime;
    var latestPingedTime = root.latestPingedTime;

    // Work on the earliest pending time. Failing that, work on the latest
    // pinged time.
    var nextExpirationTimeToWorkOn = earliestPendingTime !== NoWork ? earliestPendingTime : latestPingedTime;

    // If there is no pending or pinged work, check if there's suspended work
    // that's lower priority than what we just completed.
    if (nextExpirationTimeToWorkOn === NoWork && (completedExpirationTime === NoWork || latestSuspendedTime < completedExpirationTime)) {
      // The lowest priority suspended work is the work most likely to be
      // committed next. Let's start rendering it again, so that if it times out,
      // it's ready to commit.
      nextExpirationTimeToWorkOn = latestSuspendedTime;
    }

    var expirationTime = nextExpirationTimeToWorkOn;
    if (expirationTime !== NoWork && earliestSuspendedTime > expirationTime) {
      // Expire using the earliest known expiration time.
      expirationTime = earliestSuspendedTime;
    }

    root.nextExpirationTimeToWorkOn = nextExpirationTimeToWorkOn;
    root.expirationTime = expirationTime;
  }

  /**
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */

  var warning = warningWithoutStack$1;

  {
    warning = function (condition, format) {
      if (condition) {
        return;
      }
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();
      // eslint-disable-next-line react-internal/warning-and-invariant-args

      for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        args[_key - 2] = arguments[_key];
      }

      warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
    };
  }

  var warning$1 = warning;

  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  function is(x, y) {
    return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
    ;
  }

  var hasOwnProperty = Object.prototype.hasOwnProperty;

  /**
   * Performs equality by iterating through keys on an object and returning false
   * when any key has values which are not strictly equal between the arguments.
   * Returns true when the values of all keys are strictly equal.
   */
  function shallowEqual(objA, objB) {
    if (is(objA, objB)) {
      return true;
    }

    if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
      return false;
    }

    var keysA = Object.keys(objA);
    var keysB = Object.keys(objB);

    if (keysA.length !== keysB.length) {
      return false;
    }

    // Test for A's keys different from B.
    for (var i = 0; i < keysA.length; i++) {
      if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
        return false;
      }
    }

    return true;
  }

  function resolveDefaultProps(Component, baseProps) {
    if (Component && Component.defaultProps) {
      // Resolve default props. Taken from ReactElement
      var props = _assign({}, baseProps);
      var defaultProps = Component.defaultProps;
      for (var propName in defaultProps) {
        if (props[propName] === undefined) {
          props[propName] = defaultProps[propName];
        }
      }
      return props;
    }
    return baseProps;
  }

  function readLazyComponentType(lazyComponent) {
    var status = lazyComponent._status;
    var result = lazyComponent._result;
    switch (status) {
      case Resolved:
        {
          var Component = result;
          return Component;
        }
      case Rejected:
        {
          var error = result;
          throw error;
        }
      case Pending:
        {
          var thenable = result;
          throw thenable;
        }
      default:
        {
          lazyComponent._status = Pending;
          var ctor = lazyComponent._ctor;
          var _thenable = ctor();
          _thenable.then(function (moduleObject) {
            if (lazyComponent._status === Pending) {
              var defaultExport = moduleObject.default;
              {
                if (defaultExport === undefined) {
                  warning$1(false, 'lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
                }
              }
              lazyComponent._status = Resolved;
              lazyComponent._result = defaultExport;
            }
          }, function (error) {
            if (lazyComponent._status === Pending) {
              lazyComponent._status = Rejected;
              lazyComponent._result = error;
            }
          });
          // Handle synchronous thenables.
          switch (lazyComponent._status) {
            case Resolved:
              return lazyComponent._result;
            case Rejected:
              throw lazyComponent._result;
          }
          lazyComponent._result = _thenable;
          throw _thenable;
        }
    }
  }

  var fakeInternalInstance = {};
  var isArray$1 = Array.isArray;

  // React.Component uses a shared frozen object by default.
  // We'll use it to determine whether we need to initialize legacy refs.
  var emptyRefsObject = new React.Component().refs;

  var didWarnAboutStateAssignmentForComponent = void 0;
  var didWarnAboutUninitializedState = void 0;
  var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = void 0;
  var didWarnAboutLegacyLifecyclesAndDerivedState = void 0;
  var didWarnAboutUndefinedDerivedState = void 0;
  var warnOnUndefinedDerivedState = void 0;
  var warnOnInvalidCallback = void 0;
  var didWarnAboutDirectlyAssigningPropsToState = void 0;
  var didWarnAboutContextTypeAndContextTypes = void 0;
  var didWarnAboutInvalidateContextType = void 0;

  {
    didWarnAboutStateAssignmentForComponent = new Set();
    didWarnAboutUninitializedState = new Set();
    didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
    didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
    didWarnAboutDirectlyAssigningPropsToState = new Set();
    didWarnAboutUndefinedDerivedState = new Set();
    didWarnAboutContextTypeAndContextTypes = new Set();
    didWarnAboutInvalidateContextType = new Set();

    var didWarnOnInvalidCallback = new Set();

    warnOnInvalidCallback = function (callback, callerName) {
      if (callback === null || typeof callback === 'function') {
        return;
      }
      var key = callerName + '_' + callback;
      if (!didWarnOnInvalidCallback.has(key)) {
        didWarnOnInvalidCallback.add(key);
        warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
      }
    };

    warnOnUndefinedDerivedState = function (type, partialState) {
      if (partialState === undefined) {
        var componentName = getComponentName(type) || 'Component';
        if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
          didWarnAboutUndefinedDerivedState.add(componentName);
          warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
        }
      }
    };

    // This is so gross but it's at least non-critical and can be removed if
    // it causes problems. This is meant to give a nicer error message for
    // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
    // ...)) which otherwise throws a "_processChildContext is not a function"
    // exception.
    Object.defineProperty(fakeInternalInstance, '_processChildContext', {
      enumerable: false,
      value: function () {
        invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
      }
    });
    Object.freeze(fakeInternalInstance);
  }

  function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
    var prevState = workInProgress.memoizedState;

    {
      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        // Invoke the function an extra time to help detect side-effects.
        getDerivedStateFromProps(nextProps, prevState);
      }
    }

    var partialState = getDerivedStateFromProps(nextProps, prevState);

    {
      warnOnUndefinedDerivedState(ctor, partialState);
    }
    // Merge the partial state and the previous state.
    var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
    workInProgress.memoizedState = memoizedState;

    // Once the update queue is empty, persist the derived state onto the
    // base state.
    var updateQueue = workInProgress.updateQueue;
    if (updateQueue !== null && workInProgress.expirationTime === NoWork) {
      updateQueue.baseState = memoizedState;
    }
  }

  var classComponentUpdater = {
    isMounted: isMounted,
    enqueueSetState: function (inst, payload, callback) {
      var fiber = get(inst);
      var currentTime = requestCurrentTime();
      var expirationTime = computeExpirationForFiber(currentTime, fiber);

      var update = createUpdate(expirationTime);
      update.payload = payload;
      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'setState');
        }
        update.callback = callback;
      }

      flushPassiveEffects();
      enqueueUpdate(fiber, update);
      scheduleWork(fiber, expirationTime);
    },
    enqueueReplaceState: function (inst, payload, callback) {
      var fiber = get(inst);
      var currentTime = requestCurrentTime();
      var expirationTime = computeExpirationForFiber(currentTime, fiber);

      var update = createUpdate(expirationTime);
      update.tag = ReplaceState;
      update.payload = payload;

      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'replaceState');
        }
        update.callback = callback;
      }

      flushPassiveEffects();
      enqueueUpdate(fiber, update);
      scheduleWork(fiber, expirationTime);
    },
    enqueueForceUpdate: function (inst, callback) {
      var fiber = get(inst);
      var currentTime = requestCurrentTime();
      var expirationTime = computeExpirationForFiber(currentTime, fiber);

      var update = createUpdate(expirationTime);
      update.tag = ForceUpdate;

      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'forceUpdate');
        }
        update.callback = callback;
      }

      flushPassiveEffects();
      enqueueUpdate(fiber, update);
      scheduleWork(fiber, expirationTime);
    }
  };

  function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
    var instance = workInProgress.stateNode;
    if (typeof instance.shouldComponentUpdate === 'function') {
      startPhaseTimer(workInProgress, 'shouldComponentUpdate');
      var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
      stopPhaseTimer();

      {
        !(shouldUpdate !== undefined) ? warningWithoutStack$1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component') : void 0;
      }

      return shouldUpdate;
    }

    if (ctor.prototype && ctor.prototype.isPureReactComponent) {
      return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
    }

    return true;
  }

  function checkClassInstance(workInProgress, ctor, newProps) {
    var instance = workInProgress.stateNode;
    {
      var name = getComponentName(ctor) || 'Component';
      var renderPresent = instance.render;

      if (!renderPresent) {
        if (ctor.prototype && typeof ctor.prototype.render === 'function') {
          warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
        } else {
          warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
        }
      }

      var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
      !noGetInitialStateOnES6 ? warningWithoutStack$1(false, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name) : void 0;
      var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
      !noGetDefaultPropsOnES6 ? warningWithoutStack$1(false, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name) : void 0;
      var noInstancePropTypes = !instance.propTypes;
      !noInstancePropTypes ? warningWithoutStack$1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
      var noInstanceContextType = !instance.contextType;
      !noInstanceContextType ? warningWithoutStack$1(false, 'contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name) : void 0;
      var noInstanceContextTypes = !instance.contextTypes;
      !noInstanceContextTypes ? warningWithoutStack$1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;

      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
        didWarnAboutContextTypeAndContextTypes.add(ctor);
        warningWithoutStack$1(false, '%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
      }

      var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
      !noComponentShouldUpdate ? warningWithoutStack$1(false, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name) : void 0;
      if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
        warningWithoutStack$1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
      }
      var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
      !noComponentDidUnmount ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
      var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
      !noComponentDidReceiveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name) : void 0;
      var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
      !noComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
      var noUnsafeComponentWillRecieveProps = typeof instance.UNSAFE_componentWillRecieveProps !== 'function';
      !noUnsafeComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
      var hasMutatedProps = instance.props !== newProps;
      !(instance.props === undefined || !hasMutatedProps) ? warningWithoutStack$1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
      var noInstanceDefaultProps = !instance.defaultProps;
      !noInstanceDefaultProps ? warningWithoutStack$1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;

      if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
        didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
        warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
      }

      var noInstanceGetDerivedStateFromProps = typeof instance.getDerivedStateFromProps !== 'function';
      !noInstanceGetDerivedStateFromProps ? warningWithoutStack$1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
      var noInstanceGetDerivedStateFromCatch = typeof instance.getDerivedStateFromError !== 'function';
      !noInstanceGetDerivedStateFromCatch ? warningWithoutStack$1(false, '%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
      var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function';
      !noStaticGetSnapshotBeforeUpdate ? warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
      var _state = instance.state;
      if (_state && (typeof _state !== 'object' || isArray$1(_state))) {
        warningWithoutStack$1(false, '%s.state: must be set to an object or null', name);
      }
      if (typeof instance.getChildContext === 'function') {
        !(typeof ctor.childContextTypes === 'object') ? warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
      }
    }
  }

  function adoptClassInstance(workInProgress, instance) {
    instance.updater = classComponentUpdater;
    workInProgress.stateNode = instance;
    // The instance needs access to the fiber so that it can schedule updates
    set(instance, workInProgress);
    {
      instance._reactInternalInstance = fakeInternalInstance;
    }
  }

  function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) {
    var isLegacyContextConsumer = false;
    var unmaskedContext = emptyContextObject;
    var context = null;
    var contextType = ctor.contextType;

    {
      if ('contextType' in ctor) {
        var isValid =
        // Allow null for conditional declaration
        contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>

        if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
          didWarnAboutInvalidateContextType.add(ctor);

          var addendum = '';
          if (contextType === undefined) {
            addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
          } else if (typeof contextType !== 'object') {
            addendum = ' However, it is set to a ' + typeof contextType + '.';
          } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
            addendum = ' Did you accidentally pass the Context.Provider instead?';
          } else if (contextType._context !== undefined) {
            // <Context.Consumer>
            addendum = ' Did you accidentally pass the Context.Consumer instead?';
          } else {
            addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
          }
          warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
        }
      }
    }

    if (typeof contextType === 'object' && contextType !== null) {
      context = readContext(contextType);
    } else {
      unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      var contextTypes = ctor.contextTypes;
      isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
      context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
    }

    // Instantiate twice to help detect side-effects.
    {
      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        new ctor(props, context); // eslint-disable-line no-new
      }
    }

    var instance = new ctor(props, context);
    var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
    adoptClassInstance(workInProgress, instance);

    {
      if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
        var componentName = getComponentName(ctor) || 'Component';
        if (!didWarnAboutUninitializedState.has(componentName)) {
          didWarnAboutUninitializedState.add(componentName);
          warningWithoutStack$1(false, '`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
        }
      }

      // If new component APIs are defined, "unsafe" lifecycles won't be called.
      // Warn about these lifecycles if they are present.
      // Don't warn about react-lifecycles-compat polyfilled methods though.
      if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
        var foundWillMountName = null;
        var foundWillReceivePropsName = null;
        var foundWillUpdateName = null;
        if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
          foundWillMountName = 'componentWillMount';
        } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
          foundWillMountName = 'UNSAFE_componentWillMount';
        }
        if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
          foundWillReceivePropsName = 'componentWillReceiveProps';
        } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
          foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
        }
        if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
          foundWillUpdateName = 'componentWillUpdate';
        } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
          foundWillUpdateName = 'UNSAFE_componentWillUpdate';
        }
        if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
          var _componentName = getComponentName(ctor) || 'Component';
          var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
          if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
            didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
            warningWithoutStack$1(false, 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n  ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n  ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n  ' + foundWillUpdateName : '');
          }
        }
      }
    }

    // Cache unmasked context so we can avoid recreating masked context unless necessary.
    // ReactFiberContext usually updates this cache but can't for newly-created instances.
    if (isLegacyContextConsumer) {
      cacheContext(workInProgress, unmaskedContext, context);
    }

    return instance;
  }

  function callComponentWillMount(workInProgress, instance) {
    startPhaseTimer(workInProgress, 'componentWillMount');
    var oldState = instance.state;

    if (typeof instance.componentWillMount === 'function') {
      instance.componentWillMount();
    }
    if (typeof instance.UNSAFE_componentWillMount === 'function') {
      instance.UNSAFE_componentWillMount();
    }

    stopPhaseTimer();

    if (oldState !== instance.state) {
      {
        warningWithoutStack$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
      }
      classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
    }
  }

  function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
    var oldState = instance.state;
    startPhaseTimer(workInProgress, 'componentWillReceiveProps');
    if (typeof instance.componentWillReceiveProps === 'function') {
      instance.componentWillReceiveProps(newProps, nextContext);
    }
    if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
      instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
    }
    stopPhaseTimer();

    if (instance.state !== oldState) {
      {
        var componentName = getComponentName(workInProgress.type) || 'Component';
        if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
          didWarnAboutStateAssignmentForComponent.add(componentName);
          warningWithoutStack$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
        }
      }
      classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
    }
  }

  // Invokes the mount life-cycles on a previously never rendered instance.
  function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
    {
      checkClassInstance(workInProgress, ctor, newProps);
    }

    var instance = workInProgress.stateNode;
    instance.props = newProps;
    instance.state = workInProgress.memoizedState;
    instance.refs = emptyRefsObject;

    var contextType = ctor.contextType;
    if (typeof contextType === 'object' && contextType !== null) {
      instance.context = readContext(contextType);
    } else {
      var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      instance.context = getMaskedContext(workInProgress, unmaskedContext);
    }

    {
      if (instance.state === newProps) {
        var componentName = getComponentName(ctor) || 'Component';
        if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
          didWarnAboutDirectlyAssigningPropsToState.add(componentName);
          warningWithoutStack$1(false, '%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
        }
      }

      if (workInProgress.mode & StrictMode) {
        ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);

        ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
      }

      if (warnAboutDeprecatedLifecycles) {
        ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress, instance);
      }
    }

    var updateQueue = workInProgress.updateQueue;
    if (updateQueue !== null) {
      processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
      instance.state = workInProgress.memoizedState;
    }

    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      instance.state = workInProgress.memoizedState;
    }

    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
      callComponentWillMount(workInProgress, instance);
      // If we had additional state updates during this life-cycle, let's
      // process them now.
      updateQueue = workInProgress.updateQueue;
      if (updateQueue !== null) {
        processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
        instance.state = workInProgress.memoizedState;
      }
    }

    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }
  }

  function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
    var instance = workInProgress.stateNode;

    var oldProps = workInProgress.memoizedProps;
    instance.props = oldProps;

    var oldContext = instance.context;
    var contextType = ctor.contextType;
    var nextContext = void 0;
    if (typeof contextType === 'object' && contextType !== null) {
      nextContext = readContext(contextType);
    } else {
      var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
    }

    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
    var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';

    // Note: During these life-cycles, instance.props/instance.state are what
    // ever the previously attempted to render - not the "current". However,
    // during componentDidUpdate we pass the "current" props.

    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
      if (oldProps !== newProps || oldContext !== nextContext) {
        callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
      }
    }

    resetHasForceUpdateBeforeProcessing();

    var oldState = workInProgress.memoizedState;
    var newState = instance.state = oldState;
    var updateQueue = workInProgress.updateQueue;
    if (updateQueue !== null) {
      processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
      newState = workInProgress.memoizedState;
    }
    if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidMount === 'function') {
        workInProgress.effectTag |= Update;
      }
      return false;
    }

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      newState = workInProgress.memoizedState;
    }

    var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

    if (shouldUpdate) {
      // In order to support react-lifecycles-compat polyfilled components,
      // Unsafe lifecycles should not be invoked for components using the new APIs.
      if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
        startPhaseTimer(workInProgress, 'componentWillMount');
        if (typeof instance.componentWillMount === 'function') {
          instance.componentWillMount();
        }
        if (typeof instance.UNSAFE_componentWillMount === 'function') {
          instance.UNSAFE_componentWillMount();
        }
        stopPhaseTimer();
      }
      if (typeof instance.componentDidMount === 'function') {
        workInProgress.effectTag |= Update;
      }
    } else {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidMount === 'function') {
        workInProgress.effectTag |= Update;
      }

      // If shouldComponentUpdate returned false, we should still update the
      // memoized state to indicate that this work can be reused.
      workInProgress.memoizedProps = newProps;
      workInProgress.memoizedState = newState;
    }

    // Update the existing instance's state, props, and context pointers even
    // if shouldComponentUpdate returns false.
    instance.props = newProps;
    instance.state = newState;
    instance.context = nextContext;

    return shouldUpdate;
  }

  // Invokes the update life-cycles and returns false if it shouldn't rerender.
  function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
    var instance = workInProgress.stateNode;

    var oldProps = workInProgress.memoizedProps;
    instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);

    var oldContext = instance.context;
    var contextType = ctor.contextType;
    var nextContext = void 0;
    if (typeof contextType === 'object' && contextType !== null) {
      nextContext = readContext(contextType);
    } else {
      var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
    }

    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
    var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';

    // Note: During these life-cycles, instance.props/instance.state are what
    // ever the previously attempted to render - not the "current". However,
    // during componentDidUpdate we pass the "current" props.

    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
      if (oldProps !== newProps || oldContext !== nextContext) {
        callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
      }
    }

    resetHasForceUpdateBeforeProcessing();

    var oldState = workInProgress.memoizedState;
    var newState = instance.state = oldState;
    var updateQueue = workInProgress.updateQueue;
    if (updateQueue !== null) {
      processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
      newState = workInProgress.memoizedState;
    }

    if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidUpdate === 'function') {
        if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.effectTag |= Update;
        }
      }
      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.effectTag |= Snapshot;
        }
      }
      return false;
    }

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      newState = workInProgress.memoizedState;
    }

    var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

    if (shouldUpdate) {
      // In order to support react-lifecycles-compat polyfilled components,
      // Unsafe lifecycles should not be invoked for components using the new APIs.
      if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
        startPhaseTimer(workInProgress, 'componentWillUpdate');
        if (typeof instance.componentWillUpdate === 'function') {
          instance.componentWillUpdate(newProps, newState, nextContext);
        }
        if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
          instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
        }
        stopPhaseTimer();
      }
      if (typeof instance.componentDidUpdate === 'function') {
        workInProgress.effectTag |= Update;
      }
      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        workInProgress.effectTag |= Snapshot;
      }
    } else {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidUpdate === 'function') {
        if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.effectTag |= Update;
        }
      }
      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.effectTag |= Snapshot;
        }
      }

      // If shouldComponentUpdate returned false, we should still update the
      // memoized props/state to indicate that this work can be reused.
      workInProgress.memoizedProps = newProps;
      workInProgress.memoizedState = newState;
    }

    // Update the existing instance's state, props, and context pointers even
    // if shouldComponentUpdate returns false.
    instance.props = newProps;
    instance.state = newState;
    instance.context = nextContext;

    return shouldUpdate;
  }

  var didWarnAboutMaps = void 0;
  var didWarnAboutGenerators = void 0;
  var didWarnAboutStringRefInStrictMode = void 0;
  var ownerHasKeyUseWarning = void 0;
  var ownerHasFunctionTypeWarning = void 0;
  var warnForMissingKey = function (child) {};

  {
    didWarnAboutMaps = false;
    didWarnAboutGenerators = false;
    didWarnAboutStringRefInStrictMode = {};

    /**
     * Warn if there's no key explicitly set on dynamic arrays of children or
     * object keys are not valid. This allows us to keep track of children between
     * updates.
     */
    ownerHasKeyUseWarning = {};
    ownerHasFunctionTypeWarning = {};

    warnForMissingKey = function (child) {
      if (child === null || typeof child !== 'object') {
        return;
      }
      if (!child._store || child._store.validated || child.key != null) {
        return;
      }
      !(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;
      child._store.validated = true;

      var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
      if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
        return;
      }
      ownerHasKeyUseWarning[currentComponentErrorInfo] = true;

      warning$1(false, 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
    };
  }

  var isArray = Array.isArray;

  function coerceRef(returnFiber, current$$1, element) {
    var mixedRef = element.ref;
    if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
      {
        if (returnFiber.mode & StrictMode) {
          var componentName = getComponentName(returnFiber.type) || 'Component';
          if (!didWarnAboutStringRefInStrictMode[componentName]) {
            warningWithoutStack$1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackByFiberInDevAndProd(returnFiber));
            didWarnAboutStringRefInStrictMode[componentName] = true;
          }
        }
      }

      if (element._owner) {
        var owner = element._owner;
        var inst = void 0;
        if (owner) {
          var ownerFiber = owner;
          !(ownerFiber.tag === ClassComponent) ? invariant(false, 'Function components cannot have refs. Did you mean to use React.forwardRef()?') : void 0;
          inst = ownerFiber.stateNode;
        }
        !inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;
        var stringRef = '' + mixedRef;
        // Check if previous string ref matches new string ref
        if (current$$1 !== null && current$$1.ref !== null && typeof current$$1.ref === 'function' && current$$1.ref._stringRef === stringRef) {
          return current$$1.ref;
        }
        var ref = function (value) {
          var refs = inst.refs;
          if (refs === emptyRefsObject) {
            // This is a lazy pooled frozen object, so we need to initialize.
            refs = inst.refs = {};
          }
          if (value === null) {
            delete refs[stringRef];
          } else {
            refs[stringRef] = value;
          }
        };
        ref._stringRef = stringRef;
        return ref;
      } else {
        !(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.') : void 0;
        !element._owner ? invariant(false, 'Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.', mixedRef) : void 0;
      }
    }
    return mixedRef;
  }

  function throwOnInvalidObjectType(returnFiber, newChild) {
    if (returnFiber.type !== 'textarea') {
      var addendum = '';
      {
        addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
      }
      invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
    }
  }

  function warnOnFunctionType() {
    var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();

    if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
      return;
    }
    ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;

    warning$1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
  }

  // This wrapper function exists because I expect to clone the code in each path
  // to be able to optimize each path individually by branching early. This needs
  // a compiler or we can do it manually. Helpers that don't need this branching
  // live outside of this function.
  function ChildReconciler(shouldTrackSideEffects) {
    function deleteChild(returnFiber, childToDelete) {
      if (!shouldTrackSideEffects) {
        // Noop.
        return;
      }
      // Deletions are added in reversed order so we add it to the front.
      // At this point, the return fiber's effect list is empty except for
      // deletions, so we can just append the deletion to the list. The remaining
      // effects aren't added until the complete phase. Once we implement
      // resuming, this may not be true.
      var last = returnFiber.lastEffect;
      if (last !== null) {
        last.nextEffect = childToDelete;
        returnFiber.lastEffect = childToDelete;
      } else {
        returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
      }
      childToDelete.nextEffect = null;
      childToDelete.effectTag = Deletion;
    }

    function deleteRemainingChildren(returnFiber, currentFirstChild) {
      if (!shouldTrackSideEffects) {
        // Noop.
        return null;
      }

      // TODO: For the shouldClone case, this could be micro-optimized a bit by
      // assuming that after the first child we've already added everything.
      var childToDelete = currentFirstChild;
      while (childToDelete !== null) {
        deleteChild(returnFiber, childToDelete);
        childToDelete = childToDelete.sibling;
      }
      return null;
    }

    function mapRemainingChildren(returnFiber, currentFirstChild) {
      // Add the remaining children to a temporary map so that we can find them by
      // keys quickly. Implicit (null) keys get added to this set with their index
      var existingChildren = new Map();

      var existingChild = currentFirstChild;
      while (existingChild !== null) {
        if (existingChild.key !== null) {
          existingChildren.set(existingChild.key, existingChild);
        } else {
          existingChildren.set(existingChild.index, existingChild);
        }
        existingChild = existingChild.sibling;
      }
      return existingChildren;
    }

    function useFiber(fiber, pendingProps, expirationTime) {
      // We currently set sibling to null and index to 0 here because it is easy
      // to forget to do before returning it. E.g. for the single child case.
      var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
      clone.index = 0;
      clone.sibling = null;
      return clone;
    }

    function placeChild(newFiber, lastPlacedIndex, newIndex) {
      newFiber.index = newIndex;
      if (!shouldTrackSideEffects) {
        // Noop.
        return lastPlacedIndex;
      }
      var current$$1 = newFiber.alternate;
      if (current$$1 !== null) {
        var oldIndex = current$$1.index;
        if (oldIndex < lastPlacedIndex) {
          // This is a move.
          newFiber.effectTag = Placement;
          return lastPlacedIndex;
        } else {
          // This item can stay in place.
          return oldIndex;
        }
      } else {
        // This is an insertion.
        newFiber.effectTag = Placement;
        return lastPlacedIndex;
      }
    }

    function placeSingleChild(newFiber) {
      // This is simpler for the single child case. We only need to do a
      // placement for inserting new children.
      if (shouldTrackSideEffects && newFiber.alternate === null) {
        newFiber.effectTag = Placement;
      }
      return newFiber;
    }

    function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
      if (current$$1 === null || current$$1.tag !== HostText) {
        // Insert
        var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current$$1, textContent, expirationTime);
        existing.return = returnFiber;
        return existing;
      }
    }

    function updateElement(returnFiber, current$$1, element, expirationTime) {
      if (current$$1 !== null && current$$1.elementType === element.type) {
        // Move based on index
        var existing = useFiber(current$$1, element.props, expirationTime);
        existing.ref = coerceRef(returnFiber, current$$1, element);
        existing.return = returnFiber;
        {
          existing._debugSource = element._source;
          existing._debugOwner = element._owner;
        }
        return existing;
      } else {
        // Insert
        var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
        created.ref = coerceRef(returnFiber, current$$1, element);
        created.return = returnFiber;
        return created;
      }
    }

    function updatePortal(returnFiber, current$$1, portal, expirationTime) {
      if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {
        // Insert
        var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current$$1, portal.children || [], expirationTime);
        existing.return = returnFiber;
        return existing;
      }
    }

    function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
      if (current$$1 === null || current$$1.tag !== Fragment) {
        // Insert
        var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current$$1, fragment, expirationTime);
        existing.return = returnFiber;
        return existing;
      }
    }

    function createChild(returnFiber, newChild, expirationTime) {
      if (typeof newChild === 'string' || typeof newChild === 'number') {
        // Text nodes don't have keys. If the previous node is implicitly keyed
        // we can continue to replace it without aborting even if it is not a text
        // node.
        var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
        created.return = returnFiber;
        return created;
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
              _created.ref = coerceRef(returnFiber, null, newChild);
              _created.return = returnFiber;
              return _created;
            }
          case REACT_PORTAL_TYPE:
            {
              var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
              _created2.return = returnFiber;
              return _created2;
            }
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
          _created3.return = returnFiber;
          return _created3;
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType();
        }
      }

      return null;
    }

    function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
      // Update the fiber if the keys match, otherwise return null.

      var key = oldFiber !== null ? oldFiber.key : null;

      if (typeof newChild === 'string' || typeof newChild === 'number') {
        // Text nodes don't have keys. If the previous node is implicitly keyed
        // we can continue to replace it without aborting even if it is not a text
        // node.
        if (key !== null) {
          return null;
        }
        return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              if (newChild.key === key) {
                if (newChild.type === REACT_FRAGMENT_TYPE) {
                  return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
                }
                return updateElement(returnFiber, oldFiber, newChild, expirationTime);
              } else {
                return null;
              }
            }
          case REACT_PORTAL_TYPE:
            {
              if (newChild.key === key) {
                return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
              } else {
                return null;
              }
            }
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          if (key !== null) {
            return null;
          }

          return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType();
        }
      }

      return null;
    }

    function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
      if (typeof newChild === 'string' || typeof newChild === 'number') {
        // Text nodes don't have keys, so we neither have to check the old nor
        // new node for the key. If both are text nodes, they match.
        var matchedFiber = existingChildren.get(newIdx) || null;
        return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
              if (newChild.type === REACT_FRAGMENT_TYPE) {
                return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
              }
              return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
            }
          case REACT_PORTAL_TYPE:
            {
              var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
              return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
            }
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          var _matchedFiber3 = existingChildren.get(newIdx) || null;
          return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType();
        }
      }

      return null;
    }

    /**
     * Warns if there is a duplicate or missing key
     */
    function warnOnInvalidKey(child, knownKeys) {
      {
        if (typeof child !== 'object' || child === null) {
          return knownKeys;
        }
        switch (child.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_PORTAL_TYPE:
            warnForMissingKey(child);
            var key = child.key;
            if (typeof key !== 'string') {
              break;
            }
            if (knownKeys === null) {
              knownKeys = new Set();
              knownKeys.add(key);
              break;
            }
            if (!knownKeys.has(key)) {
              knownKeys.add(key);
              break;
            }
            warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
            break;
          default:
            break;
        }
      }
      return knownKeys;
    }

    function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
      // This algorithm can't optimize by searching from both ends since we
      // don't have backpointers on fibers. I'm trying to see how far we can get
      // with that model. If it ends up not being worth the tradeoffs, we can
      // add it later.

      // Even with a two ended optimization, we'd want to optimize for the case
      // where there are few changes and brute force the comparison instead of
      // going for the Map. It'd like to explore hitting that path first in
      // forward-only mode and only go for the Map once we notice that we need
      // lots of look ahead. This doesn't handle reversal as well as two ended
      // search but that's unusual. Besides, for the two ended optimization to
      // work on Iterables, we'd need to copy the whole set.

      // In this first iteration, we'll just live with hitting the bad case
      // (adding everything to a Map) in for every insert/move.

      // If you change this code, also update reconcileChildrenIterator() which
      // uses the same algorithm.

      {
        // First, validate keys.
        var knownKeys = null;
        for (var i = 0; i < newChildren.length; i++) {
          var child = newChildren[i];
          knownKeys = warnOnInvalidKey(child, knownKeys);
        }
      }

      var resultingFirstChild = null;
      var previousNewFiber = null;

      var oldFiber = currentFirstChild;
      var lastPlacedIndex = 0;
      var newIdx = 0;
      var nextOldFiber = null;
      for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
        if (oldFiber.index > newIdx) {
          nextOldFiber = oldFiber;
          oldFiber = null;
        } else {
          nextOldFiber = oldFiber.sibling;
        }
        var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
        if (newFiber === null) {
          // TODO: This breaks on empty slots like null children. That's
          // unfortunate because it triggers the slow path all the time. We need
          // a better way to communicate whether this was a miss or null,
          // boolean, undefined, etc.
          if (oldFiber === null) {
            oldFiber = nextOldFiber;
          }
          break;
        }
        if (shouldTrackSideEffects) {
          if (oldFiber && newFiber.alternate === null) {
            // We matched the slot, but we didn't reuse the existing fiber, so we
            // need to delete the existing child.
            deleteChild(returnFiber, oldFiber);
          }
        }
        lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = newFiber;
        } else {
          // TODO: Defer siblings if we're not at the right index for this slot.
          // I.e. if we had null values before, then we want to defer this
          // for each null value. However, we also don't want to call updateSlot
          // with the previous one.
          previousNewFiber.sibling = newFiber;
        }
        previousNewFiber = newFiber;
        oldFiber = nextOldFiber;
      }

      if (newIdx === newChildren.length) {
        // We've reached the end of the new children. We can delete the rest.
        deleteRemainingChildren(returnFiber, oldFiber);
        return resultingFirstChild;
      }

      if (oldFiber === null) {
        // If we don't have any more existing children we can choose a fast path
        // since the rest will all be insertions.
        for (; newIdx < newChildren.length; newIdx++) {
          var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
          if (!_newFiber) {
            continue;
          }
          lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
          if (previousNewFiber === null) {
            // TODO: Move out of the loop. This only happens for the first run.
            resultingFirstChild = _newFiber;
          } else {
            previousNewFiber.sibling = _newFiber;
          }
          previousNewFiber = _newFiber;
        }
        return resultingFirstChild;
      }

      // Add all children to a key map for quick lookups.
      var existingChildren = mapRemainingChildren(returnFiber, oldFiber);

      // Keep scanning and use the map to restore deleted items as moves.
      for (; newIdx < newChildren.length; newIdx++) {
        var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
        if (_newFiber2) {
          if (shouldTrackSideEffects) {
            if (_newFiber2.alternate !== null) {
              // The new fiber is a work in progress, but if there exists a
              // current, that means that we reused the fiber. We need to delete
              // it from the child list so that we don't add it to the deletion
              // list.
              existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
            }
          }
          lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
          if (previousNewFiber === null) {
            resultingFirstChild = _newFiber2;
          } else {
            previousNewFiber.sibling = _newFiber2;
          }
          previousNewFiber = _newFiber2;
        }
      }

      if (shouldTrackSideEffects) {
        // Any existing children that weren't consumed above were deleted. We need
        // to add them to the deletion list.
        existingChildren.forEach(function (child) {
          return deleteChild(returnFiber, child);
        });
      }

      return resultingFirstChild;
    }

    function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
      // This is the same implementation as reconcileChildrenArray(),
      // but using the iterator instead.

      var iteratorFn = getIteratorFn(newChildrenIterable);
      !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;

      {
        // We don't support rendering Generators because it's a mutation.
        // See https://github.com/facebook/react/issues/12995
        if (typeof Symbol === 'function' &&
        // $FlowFixMe Flow doesn't know about toStringTag
        newChildrenIterable[Symbol.toStringTag] === 'Generator') {
          !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;
          didWarnAboutGenerators = true;
        }

        // Warn about using Maps as children
        if (newChildrenIterable.entries === iteratorFn) {
          !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
          didWarnAboutMaps = true;
        }

        // First, validate keys.
        // We'll get a different iterator later for the main pass.
        var _newChildren = iteratorFn.call(newChildrenIterable);
        if (_newChildren) {
          var knownKeys = null;
          var _step = _newChildren.next();
          for (; !_step.done; _step = _newChildren.next()) {
            var child = _step.value;
            knownKeys = warnOnInvalidKey(child, knownKeys);
          }
        }
      }

      var newChildren = iteratorFn.call(newChildrenIterable);
      !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;

      var resultingFirstChild = null;
      var previousNewFiber = null;

      var oldFiber = currentFirstChild;
      var lastPlacedIndex = 0;
      var newIdx = 0;
      var nextOldFiber = null;

      var step = newChildren.next();
      for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
        if (oldFiber.index > newIdx) {
          nextOldFiber = oldFiber;
          oldFiber = null;
        } else {
          nextOldFiber = oldFiber.sibling;
        }
        var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
        if (newFiber === null) {
          // TODO: This breaks on empty slots like null children. That's
          // unfortunate because it triggers the slow path all the time. We need
          // a better way to communicate whether this was a miss or null,
          // boolean, undefined, etc.
          if (!oldFiber) {
            oldFiber = nextOldFiber;
          }
          break;
        }
        if (shouldTrackSideEffects) {
          if (oldFiber && newFiber.alternate === null) {
            // We matched the slot, but we didn't reuse the existing fiber, so we
            // need to delete the existing child.
            deleteChild(returnFiber, oldFiber);
          }
        }
        lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = newFiber;
        } else {
          // TODO: Defer siblings if we're not at the right index for this slot.
          // I.e. if we had null values before, then we want to defer this
          // for each null value. However, we also don't want to call updateSlot
          // with the previous one.
          previousNewFiber.sibling = newFiber;
        }
        previousNewFiber = newFiber;
        oldFiber = nextOldFiber;
      }

      if (step.done) {
        // We've reached the end of the new children. We can delete the rest.
        deleteRemainingChildren(returnFiber, oldFiber);
        return resultingFirstChild;
      }

      if (oldFiber === null) {
        // If we don't have any more existing children we can choose a fast path
        // since the rest will all be insertions.
        for (; !step.done; newIdx++, step = newChildren.next()) {
          var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
          if (_newFiber3 === null) {
            continue;
          }
          lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
          if (previousNewFiber === null) {
            // TODO: Move out of the loop. This only happens for the first run.
            resultingFirstChild = _newFiber3;
          } else {
            previousNewFiber.sibling = _newFiber3;
          }
          previousNewFiber = _newFiber3;
        }
        return resultingFirstChild;
      }

      // Add all children to a key map for quick lookups.
      var existingChildren = mapRemainingChildren(returnFiber, oldFiber);

      // Keep scanning and use the map to restore deleted items as moves.
      for (; !step.done; newIdx++, step = newChildren.next()) {
        var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
        if (_newFiber4 !== null) {
          if (shouldTrackSideEffects) {
            if (_newFiber4.alternate !== null) {
              // The new fiber is a work in progress, but if there exists a
              // current, that means that we reused the fiber. We need to delete
              // it from the child list so that we don't add it to the deletion
              // list.
              existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
            }
          }
          lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
          if (previousNewFiber === null) {
            resultingFirstChild = _newFiber4;
          } else {
            previousNewFiber.sibling = _newFiber4;
          }
          previousNewFiber = _newFiber4;
        }
      }

      if (shouldTrackSideEffects) {
        // Any existing children that weren't consumed above were deleted. We need
        // to add them to the deletion list.
        existingChildren.forEach(function (child) {
          return deleteChild(returnFiber, child);
        });
      }

      return resultingFirstChild;
    }

    function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
      // There's no need to check for keys on text nodes since we don't have a
      // way to define them.
      if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
        // We already have an existing node so let's just update it and delete
        // the rest.
        deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
        var existing = useFiber(currentFirstChild, textContent, expirationTime);
        existing.return = returnFiber;
        return existing;
      }
      // The existing first child is not a text node so we need to create one
      // and delete the existing ones.
      deleteRemainingChildren(returnFiber, currentFirstChild);
      var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    }

    function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
      var key = element.key;
      var child = currentFirstChild;
      while (child !== null) {
        // TODO: If key === null and child.key === null, then this only applies to
        // the first item in the list.
        if (child.key === key) {
          if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {
            deleteRemainingChildren(returnFiber, child.sibling);
            var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);
            existing.ref = coerceRef(returnFiber, child, element);
            existing.return = returnFiber;
            {
              existing._debugSource = element._source;
              existing._debugOwner = element._owner;
            }
            return existing;
          } else {
            deleteRemainingChildren(returnFiber, child);
            break;
          }
        } else {
          deleteChild(returnFiber, child);
        }
        child = child.sibling;
      }

      if (element.type === REACT_FRAGMENT_TYPE) {
        var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
        created.return = returnFiber;
        return created;
      } else {
        var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
        _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
        _created4.return = returnFiber;
        return _created4;
      }
    }

    function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
      var key = portal.key;
      var child = currentFirstChild;
      while (child !== null) {
        // TODO: If key === null and child.key === null, then this only applies to
        // the first item in the list.
        if (child.key === key) {
          if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
            deleteRemainingChildren(returnFiber, child.sibling);
            var existing = useFiber(child, portal.children || [], expirationTime);
            existing.return = returnFiber;
            return existing;
          } else {
            deleteRemainingChildren(returnFiber, child);
            break;
          }
        } else {
          deleteChild(returnFiber, child);
        }
        child = child.sibling;
      }

      var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    }

    // This API will tag the children with the side-effect of the reconciliation
    // itself. They will be added to the side-effect list as we pass through the
    // children and the parent.
    function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
      // This function is not recursive.
      // If the top level item is an array, we treat it as a set of children,
      // not as a fragment. Nested arrays on the other hand will be treated as
      // fragment nodes. Recursion happens at the normal flow.

      // Handle top level unkeyed fragments as if they were arrays.
      // This leads to an ambiguity between <>{[...]}</> and <>...</>.
      // We treat the ambiguous cases above the same.
      var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
      if (isUnkeyedTopLevelFragment) {
        newChild = newChild.props.children;
      }

      // Handle object types
      var isObject = typeof newChild === 'object' && newChild !== null;

      if (isObject) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
          case REACT_PORTAL_TYPE:
            return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
        }
      }

      if (typeof newChild === 'string' || typeof newChild === 'number') {
        return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
      }

      if (isArray(newChild)) {
        return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
      }

      if (getIteratorFn(newChild)) {
        return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
      }

      if (isObject) {
        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType();
        }
      }
      if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
        // If the new child is undefined, and the return fiber is a composite
        // component, throw an error. If Fiber return types are disabled,
        // we already threw above.
        switch (returnFiber.tag) {
          case ClassComponent:
            {
              {
                var instance = returnFiber.stateNode;
                if (instance.render._isMockFunction) {
                  // We allow auto-mocks to proceed as if they're returning null.
                  break;
                }
              }
            }
          // Intentionally fall through to the next case, which handles both
          // functions and classes
          // eslint-disable-next-lined no-fallthrough
          case FunctionComponent:
            {
              var Component = returnFiber.type;
              invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');
            }
        }
      }

      // Remaining cases are all treated as empty.
      return deleteRemainingChildren(returnFiber, currentFirstChild);
    }

    return reconcileChildFibers;
  }

  var reconcileChildFibers = ChildReconciler(true);
  var mountChildFibers = ChildReconciler(false);

  function cloneChildFibers(current$$1, workInProgress) {
    !(current$$1 === null || workInProgress.child === current$$1.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;

    if (workInProgress.child === null) {
      return;
    }

    var currentChild = workInProgress.child;
    var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
    workInProgress.child = newChild;

    newChild.return = workInProgress;
    while (currentChild.sibling !== null) {
      currentChild = currentChild.sibling;
      newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
      newChild.return = workInProgress;
    }
    newChild.sibling = null;
  }

  var NO_CONTEXT = {};

  var contextStackCursor$1 = createCursor(NO_CONTEXT);
  var contextFiberStackCursor = createCursor(NO_CONTEXT);
  var rootInstanceStackCursor = createCursor(NO_CONTEXT);

  function requiredContext(c) {
    !(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    return c;
  }

  function getRootHostContainer() {
    var rootInstance = requiredContext(rootInstanceStackCursor.current);
    return rootInstance;
  }

  function pushHostContainer(fiber, nextRootInstance) {
    // Push current root instance onto the stack;
    // This allows us to reset root when portals are popped.
    push(rootInstanceStackCursor, nextRootInstance, fiber);
    // Track the context and the Fiber that provided it.
    // This enables us to pop only Fibers that provide unique contexts.
    push(contextFiberStackCursor, fiber, fiber);

    // Finally, we need to push the host context to the stack.
    // However, we can't just call getRootHostContext() and push it because
    // we'd have a different number of entries on the stack depending on
    // whether getRootHostContext() throws somewhere in renderer code or not.
    // So we push an empty value first. This lets us safely unwind on errors.
    push(contextStackCursor$1, NO_CONTEXT, fiber);
    var nextRootContext = getRootHostContext(nextRootInstance);
    // Now that we know this function doesn't throw, replace it.
    pop(contextStackCursor$1, fiber);
    push(contextStackCursor$1, nextRootContext, fiber);
  }

  function popHostContainer(fiber) {
    pop(contextStackCursor$1, fiber);
    pop(contextFiberStackCursor, fiber);
    pop(rootInstanceStackCursor, fiber);
  }

  function getHostContext() {
    var context = requiredContext(contextStackCursor$1.current);
    return context;
  }

  function pushHostContext(fiber) {
    var rootInstance = requiredContext(rootInstanceStackCursor.current);
    var context = requiredContext(contextStackCursor$1.current);
    var nextContext = getChildHostContext(context, fiber.type, rootInstance);

    // Don't push this Fiber's context unless it's unique.
    if (context === nextContext) {
      return;
    }

    // Track the context and the Fiber that provided it.
    // This enables us to pop only Fibers that provide unique contexts.
    push(contextFiberStackCursor, fiber, fiber);
    push(contextStackCursor$1, nextContext, fiber);
  }

  function popHostContext(fiber) {
    // Do not pop unless this Fiber provided the current context.
    // pushHostContext() only pushes Fibers that provide unique contexts.
    if (contextFiberStackCursor.current !== fiber) {
      return;
    }

    pop(contextStackCursor$1, fiber);
    pop(contextFiberStackCursor, fiber);
  }

  var NoEffect$1 = /*             */0;
  var UnmountSnapshot = /*      */2;
  var UnmountMutation = /*      */4;
  var MountMutation = /*        */8;
  var UnmountLayout = /*        */16;
  var MountLayout = /*          */32;
  var MountPassive = /*         */64;
  var UnmountPassive = /*       */128;

  var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;


  var didWarnAboutMismatchedHooksForComponent = void 0;
  {
    didWarnAboutMismatchedHooksForComponent = new Set();
  }

  // These are set right before calling the component.
  var renderExpirationTime = NoWork;
  // The work-in-progress fiber. I've named it differently to distinguish it from
  // the work-in-progress hook.
  var currentlyRenderingFiber$1 = null;

  // Hooks are stored as a linked list on the fiber's memoizedState field. The
  // current hook list is the list that belongs to the current fiber. The
  // work-in-progress hook list is a new list that will be added to the
  // work-in-progress fiber.
  var currentHook = null;
  var nextCurrentHook = null;
  var firstWorkInProgressHook = null;
  var workInProgressHook = null;
  var nextWorkInProgressHook = null;

  var remainingExpirationTime = NoWork;
  var componentUpdateQueue = null;
  var sideEffectTag = 0;

  // Updates scheduled during render will trigger an immediate re-render at the
  // end of the current pass. We can't store these updates on the normal queue,
  // because if the work is aborted, they should be discarded. Because this is
  // a relatively rare case, we also don't want to add an additional field to
  // either the hook or queue object types. So we store them in a lazily create
  // map of queue -> render-phase updates, which are discarded once the component
  // completes without re-rendering.

  // Whether an update was scheduled during the currently executing render pass.
  var didScheduleRenderPhaseUpdate = false;
  // Lazily created map of render-phase updates
  var renderPhaseUpdates = null;
  // Counter to prevent infinite loops.
  var numberOfReRenders = 0;
  var RE_RENDER_LIMIT = 25;

  // In DEV, this is the name of the currently executing primitive hook
  var currentHookNameInDev = null;

  // In DEV, this list ensures that hooks are called in the same order between renders.
  // The list stores the order of hooks used during the initial render (mount).
  // Subsequent renders (updates) reference this list.
  var hookTypesDev = null;
  var hookTypesUpdateIndexDev = -1;

  function mountHookTypesDev() {
    {
      var hookName = currentHookNameInDev;

      if (hookTypesDev === null) {
        hookTypesDev = [hookName];
      } else {
        hookTypesDev.push(hookName);
      }
    }
  }

  function updateHookTypesDev() {
    {
      var hookName = currentHookNameInDev;

      if (hookTypesDev !== null) {
        hookTypesUpdateIndexDev++;
        if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
          warnOnHookMismatchInDev(hookName);
        }
      }
    }
  }

  function warnOnHookMismatchInDev(currentHookName) {
    {
      var componentName = getComponentName(currentlyRenderingFiber$1.type);
      if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
        didWarnAboutMismatchedHooksForComponent.add(componentName);

        if (hookTypesDev !== null) {
          var table = '';

          var secondColumnStart = 30;

          for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
            var oldHookName = hookTypesDev[i];
            var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;

            var row = i + 1 + '. ' + oldHookName;

            // Extra space so second column lines up
            // lol @ IE not supporting String#repeat
            while (row.length < secondColumnStart) {
              row += ' ';
            }

            row += newHookName + '\n';

            table += row;
          }

          warning$1(false, 'React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
        }
      }
    }
  }

  function throwInvalidHookError() {
    invariant(false, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.');
  }

  function areHookInputsEqual(nextDeps, prevDeps) {
    if (prevDeps === null) {
      {
        warning$1(false, '%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
      }
      return false;
    }

    {
      // Don't bother comparing lengths in prod because these arrays should be
      // passed inline.
      if (nextDeps.length !== prevDeps.length) {
        warning$1(false, 'The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, '[' + nextDeps.join(', ') + ']', '[' + prevDeps.join(', ') + ']');
      }
    }
    for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
      if (is(nextDeps[i], prevDeps[i])) {
        continue;
      }
      return false;
    }
    return true;
  }

  function renderWithHooks(current, workInProgress, Component, props, refOrContext, nextRenderExpirationTime) {
    renderExpirationTime = nextRenderExpirationTime;
    currentlyRenderingFiber$1 = workInProgress;
    nextCurrentHook = current !== null ? current.memoizedState : null;

    {
      hookTypesDev = current !== null ? current._debugHookTypes : null;
      hookTypesUpdateIndexDev = -1;
    }

    // The following should have already been reset
    // currentHook = null;
    // workInProgressHook = null;

    // remainingExpirationTime = NoWork;
    // componentUpdateQueue = null;

    // didScheduleRenderPhaseUpdate = false;
    // renderPhaseUpdates = null;
    // numberOfReRenders = 0;
    // sideEffectTag = 0;

    // TODO Warn if no hooks are used at all during mount, then some are used during update.
    // Currently we will identify the update render as a mount because nextCurrentHook === null.
    // This is tricky because it's valid for certain types of components (e.g. React.lazy)

    // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used.
    // Non-stateful hooks (e.g. context) don't get added to memoizedState,
    // so nextCurrentHook would be null during updates and mounts.
    {
      if (nextCurrentHook !== null) {
        ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
      } else if (hookTypesDev !== null) {
        // This dispatcher handles an edge case where a component is updating,
        // but no stateful hooks have been used.
        // We want to match the production code behavior (which will use HooksDispatcherOnMount),
        // but with the extra DEV validation to ensure hooks ordering hasn't changed.
        // This dispatcher does that.
        ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
      } else {
        ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
      }
    }

    var children = Component(props, refOrContext);

    if (didScheduleRenderPhaseUpdate) {
      do {
        didScheduleRenderPhaseUpdate = false;
        numberOfReRenders += 1;

        // Start over from the beginning of the list
        nextCurrentHook = current !== null ? current.memoizedState : null;
        nextWorkInProgressHook = firstWorkInProgressHook;

        currentHook = null;
        workInProgressHook = null;
        componentUpdateQueue = null;

        {
          // Also validate hook order for cascading updates.
          hookTypesUpdateIndexDev = -1;
        }

        ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;

        children = Component(props, refOrContext);
      } while (didScheduleRenderPhaseUpdate);

      renderPhaseUpdates = null;
      numberOfReRenders = 0;
    }

    // We can assume the previous dispatcher is always this one, since we set it
    // at the beginning of the render phase and there's no re-entrancy.
    ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

    var renderedWork = currentlyRenderingFiber$1;

    renderedWork.memoizedState = firstWorkInProgressHook;
    renderedWork.expirationTime = remainingExpirationTime;
    renderedWork.updateQueue = componentUpdateQueue;
    renderedWork.effectTag |= sideEffectTag;

    {
      renderedWork._debugHookTypes = hookTypesDev;
    }

    // This check uses currentHook so that it works the same in DEV and prod bundles.
    // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
    var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;

    renderExpirationTime = NoWork;
    currentlyRenderingFiber$1 = null;

    currentHook = null;
    nextCurrentHook = null;
    firstWorkInProgressHook = null;
    workInProgressHook = null;
    nextWorkInProgressHook = null;

    {
      currentHookNameInDev = null;
      hookTypesDev = null;
      hookTypesUpdateIndexDev = -1;
    }

    remainingExpirationTime = NoWork;
    componentUpdateQueue = null;
    sideEffectTag = 0;

    // These were reset above
    // didScheduleRenderPhaseUpdate = false;
    // renderPhaseUpdates = null;
    // numberOfReRenders = 0;

    !!didRenderTooFewHooks ? invariant(false, 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.') : void 0;

    return children;
  }

  function bailoutHooks(current, workInProgress, expirationTime) {
    workInProgress.updateQueue = current.updateQueue;
    workInProgress.effectTag &= ~(Passive | Update);
    if (current.expirationTime <= expirationTime) {
      current.expirationTime = NoWork;
    }
  }

  function resetHooks() {
    // We can assume the previous dispatcher is always this one, since we set it
    // at the beginning of the render phase and there's no re-entrancy.
    ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

    // This is used to reset the state of this module when a component throws.
    // It's also called inside mountIndeterminateComponent if we determine the
    // component is a module-style component.
    renderExpirationTime = NoWork;
    currentlyRenderingFiber$1 = null;

    currentHook = null;
    nextCurrentHook = null;
    firstWorkInProgressHook = null;
    workInProgressHook = null;
    nextWorkInProgressHook = null;

    {
      hookTypesDev = null;
      hookTypesUpdateIndexDev = -1;

      currentHookNameInDev = null;
    }

    remainingExpirationTime = NoWork;
    componentUpdateQueue = null;
    sideEffectTag = 0;

    didScheduleRenderPhaseUpdate = false;
    renderPhaseUpdates = null;
    numberOfReRenders = 0;
  }

  function mountWorkInProgressHook() {
    var hook = {
      memoizedState: null,

      baseState: null,
      queue: null,
      baseUpdate: null,

      next: null
    };

    if (workInProgressHook === null) {
      // This is the first hook in the list
      firstWorkInProgressHook = workInProgressHook = hook;
    } else {
      // Append to the end of the list
      workInProgressHook = workInProgressHook.next = hook;
    }
    return workInProgressHook;
  }

  function updateWorkInProgressHook() {
    // This function is used both for updates and for re-renders triggered by a
    // render phase update. It assumes there is either a current hook we can
    // clone, or a work-in-progress hook from a previous render pass that we can
    // use as a base. When we reach the end of the base list, we must switch to
    // the dispatcher used for mounts.
    if (nextWorkInProgressHook !== null) {
      // There's already a work-in-progress. Reuse it.
      workInProgressHook = nextWorkInProgressHook;
      nextWorkInProgressHook = workInProgressHook.next;

      currentHook = nextCurrentHook;
      nextCurrentHook = currentHook !== null ? currentHook.next : null;
    } else {
      // Clone from the current hook.
      !(nextCurrentHook !== null) ? invariant(false, 'Rendered more hooks than during the previous render.') : void 0;
      currentHook = nextCurrentHook;

      var newHook = {
        memoizedState: currentHook.memoizedState,

        baseState: currentHook.baseState,
        queue: currentHook.queue,
        baseUpdate: currentHook.baseUpdate,

        next: null
      };

      if (workInProgressHook === null) {
        // This is the first hook in the list.
        workInProgressHook = firstWorkInProgressHook = newHook;
      } else {
        // Append to the end of the list.
        workInProgressHook = workInProgressHook.next = newHook;
      }
      nextCurrentHook = currentHook.next;
    }
    return workInProgressHook;
  }

  function createFunctionComponentUpdateQueue() {
    return {
      lastEffect: null
    };
  }

  function basicStateReducer(state, action) {
    return typeof action === 'function' ? action(state) : action;
  }

  function mountReducer(reducer, initialArg, init) {
    var hook = mountWorkInProgressHook();
    var initialState = void 0;
    if (init !== undefined) {
      initialState = init(initialArg);
    } else {
      initialState = initialArg;
    }
    hook.memoizedState = hook.baseState = initialState;
    var queue = hook.queue = {
      last: null,
      dispatch: null,
      lastRenderedReducer: reducer,
      lastRenderedState: initialState
    };
    var dispatch = queue.dispatch = dispatchAction.bind(null,
    // Flow doesn't know this is non-null, but we do.
    currentlyRenderingFiber$1, queue);
    return [hook.memoizedState, dispatch];
  }

  function updateReducer(reducer, initialArg, init) {
    var hook = updateWorkInProgressHook();
    var queue = hook.queue;
    !(queue !== null) ? invariant(false, 'Should have a queue. This is likely a bug in React. Please file an issue.') : void 0;

    queue.lastRenderedReducer = reducer;

    if (numberOfReRenders > 0) {
      // This is a re-render. Apply the new render phase updates to the previous
      var _dispatch = queue.dispatch;
      if (renderPhaseUpdates !== null) {
        // Render phase updates are stored in a map of queue -> linked list
        var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
        if (firstRenderPhaseUpdate !== undefined) {
          renderPhaseUpdates.delete(queue);
          var newState = hook.memoizedState;
          var update = firstRenderPhaseUpdate;
          do {
            // Process this render phase update. We don't have to check the
            // priority because it will always be the same as the current
            // render's.
            var _action = update.action;
            newState = reducer(newState, _action);
            update = update.next;
          } while (update !== null);

          // Mark that the fiber performed work, but only if the new state is
          // different from the current state.
          if (!is(newState, hook.memoizedState)) {
            markWorkInProgressReceivedUpdate();
          }

          hook.memoizedState = newState;
          // Don't persist the state accumlated from the render phase updates to
          // the base state unless the queue is empty.
          // TODO: Not sure if this is the desired semantics, but it's what we
          // do for gDSFP. I can't remember why.
          if (hook.baseUpdate === queue.last) {
            hook.baseState = newState;
          }

          queue.lastRenderedState = newState;

          return [newState, _dispatch];
        }
      }
      return [hook.memoizedState, _dispatch];
    }

    // The last update in the entire queue
    var last = queue.last;
    // The last update that is part of the base state.
    var baseUpdate = hook.baseUpdate;
    var baseState = hook.baseState;

    // Find the first unprocessed update.
    var first = void 0;
    if (baseUpdate !== null) {
      if (last !== null) {
        // For the first update, the queue is a circular linked list where
        // `queue.last.next = queue.first`. Once the first update commits, and
        // the `baseUpdate` is no longer empty, we can unravel the list.
        last.next = null;
      }
      first = baseUpdate.next;
    } else {
      first = last !== null ? last.next : null;
    }
    if (first !== null) {
      var _newState = baseState;
      var newBaseState = null;
      var newBaseUpdate = null;
      var prevUpdate = baseUpdate;
      var _update = first;
      var didSkip = false;
      do {
        var updateExpirationTime = _update.expirationTime;
        if (updateExpirationTime < renderExpirationTime) {
          // Priority is insufficient. Skip this update. If this is the first
          // skipped update, the previous update/state is the new base
          // update/state.
          if (!didSkip) {
            didSkip = true;
            newBaseUpdate = prevUpdate;
            newBaseState = _newState;
          }
          // Update the remaining priority in the queue.
          if (updateExpirationTime > remainingExpirationTime) {
            remainingExpirationTime = updateExpirationTime;
          }
        } else {
          // Process this update.
          if (_update.eagerReducer === reducer) {
            // If this update was processed eagerly, and its reducer matches the
            // current reducer, we can use the eagerly computed state.
            _newState = _update.eagerState;
          } else {
            var _action2 = _update.action;
            _newState = reducer(_newState, _action2);
          }
        }
        prevUpdate = _update;
        _update = _update.next;
      } while (_update !== null && _update !== first);

      if (!didSkip) {
        newBaseUpdate = prevUpdate;
        newBaseState = _newState;
      }

      // Mark that the fiber performed work, but only if the new state is
      // different from the current state.
      if (!is(_newState, hook.memoizedState)) {
        markWorkInProgressReceivedUpdate();
      }

      hook.memoizedState = _newState;
      hook.baseUpdate = newBaseUpdate;
      hook.baseState = newBaseState;

      queue.lastRenderedState = _newState;
    }

    var dispatch = queue.dispatch;
    return [hook.memoizedState, dispatch];
  }

  function mountState(initialState) {
    var hook = mountWorkInProgressHook();
    if (typeof initialState === 'function') {
      initialState = initialState();
    }
    hook.memoizedState = hook.baseState = initialState;
    var queue = hook.queue = {
      last: null,
      dispatch: null,
      lastRenderedReducer: basicStateReducer,
      lastRenderedState: initialState
    };
    var dispatch = queue.dispatch = dispatchAction.bind(null,
    // Flow doesn't know this is non-null, but we do.
    currentlyRenderingFiber$1, queue);
    return [hook.memoizedState, dispatch];
  }

  function updateState(initialState) {
    return updateReducer(basicStateReducer, initialState);
  }

  function pushEffect(tag, create, destroy, deps) {
    var effect = {
      tag: tag,
      create: create,
      destroy: destroy,
      deps: deps,
      // Circular
      next: null
    };
    if (componentUpdateQueue === null) {
      componentUpdateQueue = createFunctionComponentUpdateQueue();
      componentUpdateQueue.lastEffect = effect.next = effect;
    } else {
      var _lastEffect = componentUpdateQueue.lastEffect;
      if (_lastEffect === null) {
        componentUpdateQueue.lastEffect = effect.next = effect;
      } else {
        var firstEffect = _lastEffect.next;
        _lastEffect.next = effect;
        effect.next = firstEffect;
        componentUpdateQueue.lastEffect = effect;
      }
    }
    return effect;
  }

  function mountRef(initialValue) {
    var hook = mountWorkInProgressHook();
    var ref = { current: initialValue };
    {
      Object.seal(ref);
    }
    hook.memoizedState = ref;
    return ref;
  }

  function updateRef(initialValue) {
    var hook = updateWorkInProgressHook();
    return hook.memoizedState;
  }

  function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    sideEffectTag |= fiberEffectTag;
    hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps);
  }

  function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var destroy = undefined;

    if (currentHook !== null) {
      var prevEffect = currentHook.memoizedState;
      destroy = prevEffect.destroy;
      if (nextDeps !== null) {
        var prevDeps = prevEffect.deps;
        if (areHookInputsEqual(nextDeps, prevDeps)) {
          pushEffect(NoEffect$1, create, destroy, nextDeps);
          return;
        }
      }
    }

    sideEffectTag |= fiberEffectTag;
    hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps);
  }

  function mountEffect(create, deps) {
    return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps);
  }

  function updateEffect(create, deps) {
    return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps);
  }

  function mountLayoutEffect(create, deps) {
    return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps);
  }

  function updateLayoutEffect(create, deps) {
    return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps);
  }

  function imperativeHandleEffect(create, ref) {
    if (typeof ref === 'function') {
      var refCallback = ref;
      var _inst = create();
      refCallback(_inst);
      return function () {
        refCallback(null);
      };
    } else if (ref !== null && ref !== undefined) {
      var refObject = ref;
      {
        !refObject.hasOwnProperty('current') ? warning$1(false, 'Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}') : void 0;
      }
      var _inst2 = create();
      refObject.current = _inst2;
      return function () {
        refObject.current = null;
      };
    }
  }

  function mountImperativeHandle(ref, create, deps) {
    {
      !(typeof create === 'function') ? warning$1(false, 'Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null') : void 0;
    }

    // TODO: If deps are provided, should we skip comparing the ref itself?
    var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;

    return mountEffectImpl(Update, UnmountMutation | MountLayout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  }

  function updateImperativeHandle(ref, create, deps) {
    {
      !(typeof create === 'function') ? warning$1(false, 'Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null') : void 0;
    }

    // TODO: If deps are provided, should we skip comparing the ref itself?
    var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;

    return updateEffectImpl(Update, UnmountMutation | MountLayout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  }

  function mountDebugValue(value, formatterFn) {
    // This hook is normally a no-op.
    // The react-debug-hooks package injects its own implementation
    // so that e.g. DevTools can display custom hook values.
  }

  var updateDebugValue = mountDebugValue;

  function mountCallback(callback, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    hook.memoizedState = [callback, nextDeps];
    return callback;
  }

  function updateCallback(callback, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var prevState = hook.memoizedState;
    if (prevState !== null) {
      if (nextDeps !== null) {
        var prevDeps = prevState[1];
        if (areHookInputsEqual(nextDeps, prevDeps)) {
          return prevState[0];
        }
      }
    }
    hook.memoizedState = [callback, nextDeps];
    return callback;
  }

  function mountMemo(nextCreate, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var nextValue = nextCreate();
    hook.memoizedState = [nextValue, nextDeps];
    return nextValue;
  }

  function updateMemo(nextCreate, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var prevState = hook.memoizedState;
    if (prevState !== null) {
      // Assume these are defined. If they're not, areHookInputsEqual will warn.
      if (nextDeps !== null) {
        var prevDeps = prevState[1];
        if (areHookInputsEqual(nextDeps, prevDeps)) {
          return prevState[0];
        }
      }
    }
    var nextValue = nextCreate();
    hook.memoizedState = [nextValue, nextDeps];
    return nextValue;
  }

  // in a test-like environment, we want to warn if dispatchAction()
  // is called outside of a batchedUpdates/TestUtils.act(...) call.
  var shouldWarnForUnbatchedSetState = false;

  {
    // jest isn't a 'global', it's just exposed to tests via a wrapped function
    // further, this isn't a test file, so flow doesn't recognize the symbol. So...
    // $FlowExpectedError - because requirements don't give a damn about your type sigs.
    if ('undefined' !== typeof jest) {
      shouldWarnForUnbatchedSetState = true;
    }
  }

  function dispatchAction(fiber, queue, action) {
    !(numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0;

    {
      !(arguments.length <= 3) ? warning$1(false, "State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().') : void 0;
    }

    var alternate = fiber.alternate;
    if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
      // This is a render phase update. Stash it in a lazily-created map of
      // queue -> linked list of updates. After this render pass, we'll restart
      // and apply the stashed updates on top of the work-in-progress hook.
      didScheduleRenderPhaseUpdate = true;
      var update = {
        expirationTime: renderExpirationTime,
        action: action,
        eagerReducer: null,
        eagerState: null,
        next: null
      };
      if (renderPhaseUpdates === null) {
        renderPhaseUpdates = new Map();
      }
      var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
      if (firstRenderPhaseUpdate === undefined) {
        renderPhaseUpdates.set(queue, update);
      } else {
        // Append the update to the end of the list.
        var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
        while (lastRenderPhaseUpdate.next !== null) {
          lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
        }
        lastRenderPhaseUpdate.next = update;
      }
    } else {
      flushPassiveEffects();

      var currentTime = requestCurrentTime();
      var _expirationTime = computeExpirationForFiber(currentTime, fiber);

      var _update2 = {
        expirationTime: _expirationTime,
        action: action,
        eagerReducer: null,
        eagerState: null,
        next: null
      };

      // Append the update to the end of the list.
      var _last = queue.last;
      if (_last === null) {
        // This is the first update. Create a circular list.
        _update2.next = _update2;
      } else {
        var first = _last.next;
        if (first !== null) {
          // Still circular.
          _update2.next = first;
        }
        _last.next = _update2;
      }
      queue.last = _update2;

      if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
        // The queue is currently empty, which means we can eagerly compute the
        // next state before entering the render phase. If the new state is the
        // same as the current state, we may be able to bail out entirely.
        var _lastRenderedReducer = queue.lastRenderedReducer;
        if (_lastRenderedReducer !== null) {
          var prevDispatcher = void 0;
          {
            prevDispatcher = ReactCurrentDispatcher$1.current;
            ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
          }
          try {
            var currentState = queue.lastRenderedState;
            var _eagerState = _lastRenderedReducer(currentState, action);
            // Stash the eagerly computed state, and the reducer used to compute
            // it, on the update object. If the reducer hasn't changed by the
            // time we enter the render phase, then the eager state can be used
            // without calling the reducer again.
            _update2.eagerReducer = _lastRenderedReducer;
            _update2.eagerState = _eagerState;
            if (is(_eagerState, currentState)) {
              // Fast path. We can bail out without scheduling React to re-render.
              // It's still possible that we'll need to rebase this update later,
              // if the component re-renders for a different reason and by that
              // time the reducer has changed.
              return;
            }
          } catch (error) {
            // Suppress the error. It will throw again in the render phase.
          } finally {
            {
              ReactCurrentDispatcher$1.current = prevDispatcher;
            }
          }
        }
      }
      {
        if (shouldWarnForUnbatchedSetState === true) {
          warnIfNotCurrentlyBatchingInDev(fiber);
        }
      }
      scheduleWork(fiber, _expirationTime);
    }
  }

  var ContextOnlyDispatcher = {
    readContext: readContext,

    useCallback: throwInvalidHookError,
    useContext: throwInvalidHookError,
    useEffect: throwInvalidHookError,
    useImperativeHandle: throwInvalidHookError,
    useLayoutEffect: throwInvalidHookError,
    useMemo: throwInvalidHookError,
    useReducer: throwInvalidHookError,
    useRef: throwInvalidHookError,
    useState: throwInvalidHookError,
    useDebugValue: throwInvalidHookError
  };

  var HooksDispatcherOnMountInDEV = null;
  var HooksDispatcherOnMountWithHookTypesInDEV = null;
  var HooksDispatcherOnUpdateInDEV = null;
  var InvalidNestedHooksDispatcherOnMountInDEV = null;
  var InvalidNestedHooksDispatcherOnUpdateInDEV = null;

  {
    var warnInvalidContextAccess = function () {
      warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
    };

    var warnInvalidHookAccess = function () {
      warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
    };

    HooksDispatcherOnMountInDEV = {
      readContext: function (context, observedBits) {
        return readContext(context, observedBits);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        mountHookTypesDev();
        return mountCallback(callback, deps);
      },
      useContext: function (context, observedBits) {
        currentHookNameInDev = 'useContext';
        mountHookTypesDev();
        return readContext(context, observedBits);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        mountHookTypesDev();
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        mountHookTypesDev();
        return mountImperativeHandle(ref, create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        mountHookTypesDev();
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        mountHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        mountHookTypesDev();
        return mountDebugValue(value, formatterFn);
      }
    };

    HooksDispatcherOnMountWithHookTypesInDEV = {
      readContext: function (context, observedBits) {
        return readContext(context, observedBits);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        updateHookTypesDev();
        return mountCallback(callback, deps);
      },
      useContext: function (context, observedBits) {
        currentHookNameInDev = 'useContext';
        updateHookTypesDev();
        return readContext(context, observedBits);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        updateHookTypesDev();
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        updateHookTypesDev();
        return mountImperativeHandle(ref, create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        updateHookTypesDev();
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        updateHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        updateHookTypesDev();
        return mountDebugValue(value, formatterFn);
      }
    };

    HooksDispatcherOnUpdateInDEV = {
      readContext: function (context, observedBits) {
        return readContext(context, observedBits);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context, observedBits) {
        currentHookNameInDev = 'useContext';
        updateHookTypesDev();
        return readContext(context, observedBits);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        updateHookTypesDev();
        return updateRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        updateHookTypesDev();
        return updateDebugValue(value, formatterFn);
      }
    };

    InvalidNestedHooksDispatcherOnMountInDEV = {
      readContext: function (context, observedBits) {
        warnInvalidContextAccess();
        return readContext(context, observedBits);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountCallback(callback, deps);
      },
      useContext: function (context, observedBits) {
        currentHookNameInDev = 'useContext';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return readContext(context, observedBits);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountImperativeHandle(ref, create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountDebugValue(value, formatterFn);
      }
    };

    InvalidNestedHooksDispatcherOnUpdateInDEV = {
      readContext: function (context, observedBits) {
        warnInvalidContextAccess();
        return readContext(context, observedBits);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context, observedBits) {
        currentHookNameInDev = 'useContext';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return readContext(context, observedBits);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        try {
          return updateState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateDebugValue(value, formatterFn);
      }
    };
  }

  var commitTime = 0;
  var profilerStartTime = -1;

  function getCommitTime() {
    return commitTime;
  }

  function recordCommitTime() {
    if (!enableProfilerTimer) {
      return;
    }
    commitTime = now();
  }

  function startProfilerTimer(fiber) {
    if (!enableProfilerTimer) {
      return;
    }

    profilerStartTime = now();

    if (fiber.actualStartTime < 0) {
      fiber.actualStartTime = now();
    }
  }

  function stopProfilerTimerIfRunning(fiber) {
    if (!enableProfilerTimer) {
      return;
    }
    profilerStartTime = -1;
  }

  function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
    if (!enableProfilerTimer) {
      return;
    }

    if (profilerStartTime >= 0) {
      var elapsedTime = now() - profilerStartTime;
      fiber.actualDuration += elapsedTime;
      if (overrideBaseTime) {
        fiber.selfBaseDuration = elapsedTime;
      }
      profilerStartTime = -1;
    }
  }

  // The deepest Fiber on the stack involved in a hydration context.
  // This may have been an insertion or a hydration.
  var hydrationParentFiber = null;
  var nextHydratableInstance = null;
  var isHydrating = false;

  function enterHydrationState(fiber) {
    if (!supportsHydration) {
      return false;
    }

    var parentInstance = fiber.stateNode.containerInfo;
    nextHydratableInstance = getFirstHydratableChild(parentInstance);
    hydrationParentFiber = fiber;
    isHydrating = true;
    return true;
  }

  function reenterHydrationStateFromDehydratedSuspenseInstance(fiber) {
    if (!supportsHydration) {
      return false;
    }

    var suspenseInstance = fiber.stateNode;
    nextHydratableInstance = getNextHydratableSibling(suspenseInstance);
    popToNextHostParent(fiber);
    isHydrating = true;
    return true;
  }

  function deleteHydratableInstance(returnFiber, instance) {
    {
      switch (returnFiber.tag) {
        case HostRoot:
          didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
          break;
        case HostComponent:
          didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
          break;
      }
    }

    var childToDelete = createFiberFromHostInstanceForDeletion();
    childToDelete.stateNode = instance;
    childToDelete.return = returnFiber;
    childToDelete.effectTag = Deletion;

    // This might seem like it belongs on progressedFirstDeletion. However,
    // these children are not part of the reconciliation list of children.
    // Even if we abort and rereconcile the children, that will try to hydrate
    // again and the nodes are still in the host tree so these will be
    // recreated.
    if (returnFiber.lastEffect !== null) {
      returnFiber.lastEffect.nextEffect = childToDelete;
      returnFiber.lastEffect = childToDelete;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
    }
  }

  function insertNonHydratedInstance(returnFiber, fiber) {
    fiber.effectTag |= Placement;
    {
      switch (returnFiber.tag) {
        case HostRoot:
          {
            var parentContainer = returnFiber.stateNode.containerInfo;
            switch (fiber.tag) {
              case HostComponent:
                var type = fiber.type;
                var props = fiber.pendingProps;
                didNotFindHydratableContainerInstance(parentContainer, type, props);
                break;
              case HostText:
                var text = fiber.pendingProps;
                didNotFindHydratableContainerTextInstance(parentContainer, text);
                break;
              case SuspenseComponent:
                didNotFindHydratableContainerSuspenseInstance(parentContainer);
                break;
            }
            break;
          }
        case HostComponent:
          {
            var parentType = returnFiber.type;
            var parentProps = returnFiber.memoizedProps;
            var parentInstance = returnFiber.stateNode;
            switch (fiber.tag) {
              case HostComponent:
                var _type = fiber.type;
                var _props = fiber.pendingProps;
                didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props);
                break;
              case HostText:
                var _text = fiber.pendingProps;
                didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
                break;
              case SuspenseComponent:
                didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance);
                break;
            }
            break;
          }
        default:
          return;
      }
    }
  }

  function tryHydrate(fiber, nextInstance) {
    switch (fiber.tag) {
      case HostComponent:
        {
          var type = fiber.type;
          var props = fiber.pendingProps;
          var instance = canHydrateInstance(nextInstance, type, props);
          if (instance !== null) {
            fiber.stateNode = instance;
            return true;
          }
          return false;
        }
      case HostText:
        {
          var text = fiber.pendingProps;
          var textInstance = canHydrateTextInstance(nextInstance, text);
          if (textInstance !== null) {
            fiber.stateNode = textInstance;
            return true;
          }
          return false;
        }
      case SuspenseComponent:
        {
          if (enableSuspenseServerRenderer) {
            var suspenseInstance = canHydrateSuspenseInstance(nextInstance);
            if (suspenseInstance !== null) {
              // Downgrade the tag to a dehydrated component until we've hydrated it.
              fiber.tag = DehydratedSuspenseComponent;
              fiber.stateNode = suspenseInstance;
              return true;
            }
          }
          return false;
        }
      default:
        return false;
    }
  }

  function tryToClaimNextHydratableInstance(fiber) {
    if (!isHydrating) {
      return;
    }
    var nextInstance = nextHydratableInstance;
    if (!nextInstance) {
      // Nothing to hydrate. Make it an insertion.
      insertNonHydratedInstance(hydrationParentFiber, fiber);
      isHydrating = false;
      hydrationParentFiber = fiber;
      return;
    }
    var firstAttemptedInstance = nextInstance;
    if (!tryHydrate(fiber, nextInstance)) {
      // If we can't hydrate this instance let's try the next one.
      // We use this as a heuristic. It's based on intuition and not data so it
      // might be flawed or unnecessary.
      nextInstance = getNextHydratableSibling(firstAttemptedInstance);
      if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
        // Nothing to hydrate. Make it an insertion.
        insertNonHydratedInstance(hydrationParentFiber, fiber);
        isHydrating = false;
        hydrationParentFiber = fiber;
        return;
      }
      // We matched the next one, we'll now assume that the first one was
      // superfluous and we'll delete it. Since we can't eagerly delete it
      // we'll have to schedule a deletion. To do that, this node needs a dummy
      // fiber associated with it.
      deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
    }
    hydrationParentFiber = fiber;
    nextHydratableInstance = getFirstHydratableChild(nextInstance);
  }

  function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
    if (!supportsHydration) {
      invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
    }

    var instance = fiber.stateNode;
    var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
    // TODO: Type this specific to this type of component.
    fiber.updateQueue = updatePayload;
    // If the update payload indicates that there is a change or if there
    // is a new ref we mark this as an update.
    if (updatePayload !== null) {
      return true;
    }
    return false;
  }

  function prepareToHydrateHostTextInstance(fiber) {
    if (!supportsHydration) {
      invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
    }

    var textInstance = fiber.stateNode;
    var textContent = fiber.memoizedProps;
    var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
    {
      if (shouldUpdate) {
        // We assume that prepareToHydrateHostTextInstance is called in a context where the
        // hydration parent is the parent host component of this host text.
        var returnFiber = hydrationParentFiber;
        if (returnFiber !== null) {
          switch (returnFiber.tag) {
            case HostRoot:
              {
                var parentContainer = returnFiber.stateNode.containerInfo;
                didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
                break;
              }
            case HostComponent:
              {
                var parentType = returnFiber.type;
                var parentProps = returnFiber.memoizedProps;
                var parentInstance = returnFiber.stateNode;
                didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
                break;
              }
          }
        }
      }
    }
    return shouldUpdate;
  }

  function skipPastDehydratedSuspenseInstance(fiber) {
    if (!supportsHydration) {
      invariant(false, 'Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
    }
    var suspenseInstance = fiber.stateNode;
    !suspenseInstance ? invariant(false, 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
  }

  function popToNextHostParent(fiber) {
    var parent = fiber.return;
    while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== DehydratedSuspenseComponent) {
      parent = parent.return;
    }
    hydrationParentFiber = parent;
  }

  function popHydrationState(fiber) {
    if (!supportsHydration) {
      return false;
    }
    if (fiber !== hydrationParentFiber) {
      // We're deeper than the current hydration context, inside an inserted
      // tree.
      return false;
    }
    if (!isHydrating) {
      // If we're not currently hydrating but we're in a hydration context, then
      // we were an insertion and now need to pop up reenter hydration of our
      // siblings.
      popToNextHostParent(fiber);
      isHydrating = true;
      return false;
    }

    var type = fiber.type;

    // If we have any remaining hydratable nodes, we need to delete them now.
    // We only do this deeper than head and body since they tend to have random
    // other nodes in them. We also ignore components with pure text content in
    // side of them.
    // TODO: Better heuristic.
    if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
      var nextInstance = nextHydratableInstance;
      while (nextInstance) {
        deleteHydratableInstance(fiber, nextInstance);
        nextInstance = getNextHydratableSibling(nextInstance);
      }
    }

    popToNextHostParent(fiber);
    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
    return true;
  }

  function resetHydrationState() {
    if (!supportsHydration) {
      return;
    }

    hydrationParentFiber = null;
    nextHydratableInstance = null;
    isHydrating = false;
  }

  var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner;

  var didReceiveUpdate = false;

  var didWarnAboutBadClass = void 0;
  var didWarnAboutContextTypeOnFunctionComponent = void 0;
  var didWarnAboutGetDerivedStateOnFunctionComponent = void 0;
  var didWarnAboutFunctionRefs = void 0;
  var didWarnAboutReassigningProps = void 0;

  {
    didWarnAboutBadClass = {};
    didWarnAboutContextTypeOnFunctionComponent = {};
    didWarnAboutGetDerivedStateOnFunctionComponent = {};
    didWarnAboutFunctionRefs = {};
    didWarnAboutReassigningProps = false;
  }

  function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
    if (current$$1 === null) {
      // If this is a fresh new component that hasn't been rendered yet, we
      // won't update its child set by applying minimal side-effects. Instead,
      // we will add them all to the child before it gets rendered. That means
      // we can optimize this reconciliation pass by not tracking side-effects.
      workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
    } else {
      // If the current child is the same as the work in progress, it means that
      // we haven't yet started any work on these children. Therefore, we use
      // the clone algorithm to create a copy of all the current children.

      // If we had any progressed work already, that is invalid at this point so
      // let's throw it out.
      workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
    }
  }

  function forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime) {
    // This function is fork of reconcileChildren. It's used in cases where we
    // want to reconcile without matching against the existing set. This has the
    // effect of all current children being unmounted; even if the type and key
    // are the same, the old child is unmounted and a new child is created.
    //
    // To do this, we're going to go through the reconcile algorithm twice. In
    // the first pass, we schedule a deletion for all the current children by
    // passing null.
    workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime);
    // In the second pass, we mount the new children. The trick here is that we
    // pass null in place of where we usually pass the current child set. This has
    // the effect of remounting all children regardless of whether their their
    // identity matches.
    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  }

  function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
    // TODO: current can be non-null here even if the component
    // hasn't yet mounted. This happens after the first render suspends.
    // We'll need to figure out if this is fine or can cause issues.

    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;
        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentName(Component), getCurrentFiberStackInDev);
        }
      }
    }

    var render = Component.render;
    var ref = workInProgress.ref;

    // The rest is a fork of updateFunctionComponent
    var nextChildren = void 0;
    prepareToReadContext(workInProgress, renderExpirationTime);
    {
      ReactCurrentOwner$2.current = workInProgress;
      setCurrentPhase('render');
      nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        // Only double-render components with Hooks
        if (workInProgress.memoizedState !== null) {
          nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
        }
      }
      setCurrentPhase(null);
    }

    if (current$$1 !== null && !didReceiveUpdate) {
      bailoutHooks(current$$1, workInProgress, renderExpirationTime);
      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }

    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function updateMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
    if (current$$1 === null) {
      var type = Component.type;
      if (isSimpleFunctionComponent(type) && Component.compare === null &&
      // SimpleMemoComponent codepath doesn't resolve outer props either.
      Component.defaultProps === undefined) {
        // If this is a plain function component without default props,
        // and with only the default shallow comparison, we upgrade it
        // to a SimpleMemoComponent to allow fast path updates.
        workInProgress.tag = SimpleMemoComponent;
        workInProgress.type = type;
        {
          validateFunctionComponentInDev(workInProgress, type);
        }
        return updateSimpleMemoComponent(current$$1, workInProgress, type, nextProps, updateExpirationTime, renderExpirationTime);
      }
      {
        var innerPropTypes = type.propTypes;
        if (innerPropTypes) {
          // Inner memo component props aren't currently validated in createElement.
          // We could move it there, but we'd still need this for lazy code path.
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentName(type), getCurrentFiberStackInDev);
        }
      }
      var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
      child.ref = workInProgress.ref;
      child.return = workInProgress;
      workInProgress.child = child;
      return child;
    }
    {
      var _type = Component.type;
      var _innerPropTypes = _type.propTypes;
      if (_innerPropTypes) {
        // Inner memo component props aren't currently validated in createElement.
        // We could move it there, but we'd still need this for lazy code path.
        checkPropTypes(_innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(_type), getCurrentFiberStackInDev);
      }
    }
    var currentChild = current$$1.child; // This is always exactly one child
    if (updateExpirationTime < renderExpirationTime) {
      // This will be the props with resolved defaultProps,
      // unlike current.memoizedProps which will be the unresolved ones.
      var prevProps = currentChild.memoizedProps;
      // Default to shallow comparison
      var compare = Component.compare;
      compare = compare !== null ? compare : shallowEqual;
      if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) {
        return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
      }
    }
    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;
    var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime);
    newChild.ref = workInProgress.ref;
    newChild.return = workInProgress;
    workInProgress.child = newChild;
    return newChild;
  }

  function updateSimpleMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
    // TODO: current can be non-null here even if the component
    // hasn't yet mounted. This happens when the inner render suspends.
    // We'll need to figure out if this is fine or can cause issues.

    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var outerMemoType = workInProgress.elementType;
        if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
          // We warn when you define propTypes on lazy()
          // so let's just skip over it to find memo() outer wrapper.
          // Inner props for memo are validated later.
          outerMemoType = refineResolvedLazyComponent(outerMemoType);
        }
        var outerPropTypes = outerMemoType && outerMemoType.propTypes;
        if (outerPropTypes) {
          checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
          'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
        }
        // Inner propTypes will be validated in the function component path.
      }
    }
    if (current$$1 !== null) {
      var prevProps = current$$1.memoizedProps;
      if (shallowEqual(prevProps, nextProps) && current$$1.ref === workInProgress.ref) {
        didReceiveUpdate = false;
        if (updateExpirationTime < renderExpirationTime) {
          return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
        }
      }
    }
    return updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
  }

  function updateFragment(current$$1, workInProgress, renderExpirationTime) {
    var nextChildren = workInProgress.pendingProps;
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function updateMode(current$$1, workInProgress, renderExpirationTime) {
    var nextChildren = workInProgress.pendingProps.children;
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function updateProfiler(current$$1, workInProgress, renderExpirationTime) {
    if (enableProfilerTimer) {
      workInProgress.effectTag |= Update;
    }
    var nextProps = workInProgress.pendingProps;
    var nextChildren = nextProps.children;
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function markRef(current$$1, workInProgress) {
    var ref = workInProgress.ref;
    if (current$$1 === null && ref !== null || current$$1 !== null && current$$1.ref !== ref) {
      // Schedule a Ref effect
      workInProgress.effectTag |= Ref;
    }
  }

  function updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;
        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentName(Component), getCurrentFiberStackInDev);
        }
      }
    }

    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
    var context = getMaskedContext(workInProgress, unmaskedContext);

    var nextChildren = void 0;
    prepareToReadContext(workInProgress, renderExpirationTime);
    {
      ReactCurrentOwner$2.current = workInProgress;
      setCurrentPhase('render');
      nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        // Only double-render components with Hooks
        if (workInProgress.memoizedState !== null) {
          nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
        }
      }
      setCurrentPhase(null);
    }

    if (current$$1 !== null && !didReceiveUpdate) {
      bailoutHooks(current$$1, workInProgress, renderExpirationTime);
      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }

    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;
        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentName(Component), getCurrentFiberStackInDev);
        }
      }
    }

    // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.
    var hasContext = void 0;
    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }
    prepareToReadContext(workInProgress, renderExpirationTime);

    var instance = workInProgress.stateNode;
    var shouldUpdate = void 0;
    if (instance === null) {
      if (current$$1 !== null) {
        // An class component without an instance only mounts if it suspended
        // inside a non- concurrent tree, in an inconsistent state. We want to
        // tree it like a new mount, even though an empty version of it already
        // committed. Disconnect the alternate pointers.
        current$$1.alternate = null;
        workInProgress.alternate = null;
        // Since this is conceptually a new fiber, schedule a Placement effect
        workInProgress.effectTag |= Placement;
      }
      // In the initial pass we might need to construct the instance.
      constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
      mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
      shouldUpdate = true;
    } else if (current$$1 === null) {
      // In a resume, we'll already have an instance we can reuse.
      shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
    } else {
      shouldUpdate = updateClassInstance(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
    }
    var nextUnitOfWork = finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
    {
      var inst = workInProgress.stateNode;
      if (inst.props !== nextProps) {
        !didWarnAboutReassigningProps ? warning$1(false, 'It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component') : void 0;
        didWarnAboutReassigningProps = true;
      }
    }
    return nextUnitOfWork;
  }

  function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
    // Refs should update even if shouldComponentUpdate returns false
    markRef(current$$1, workInProgress);

    var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;

    if (!shouldUpdate && !didCaptureError) {
      // Context providers should defer to sCU for rendering
      if (hasContext) {
        invalidateContextProvider(workInProgress, Component, false);
      }

      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }

    var instance = workInProgress.stateNode;

    // Rerender
    ReactCurrentOwner$2.current = workInProgress;
    var nextChildren = void 0;
    if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
      // If we captured an error, but getDerivedStateFrom catch is not defined,
      // unmount all the children. componentDidCatch will schedule an update to
      // re-render a fallback. This is temporary until we migrate everyone to
      // the new API.
      // TODO: Warn in a future release.
      nextChildren = null;

      if (enableProfilerTimer) {
        stopProfilerTimerIfRunning(workInProgress);
      }
    } else {
      {
        setCurrentPhase('render');
        nextChildren = instance.render();
        if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
          instance.render();
        }
        setCurrentPhase(null);
      }
    }

    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;
    if (current$$1 !== null && didCaptureError) {
      // If we're recovering from an error, reconcile without reusing any of
      // the existing children. Conceptually, the normal children and the children
      // that are shown on error are two different sets, so we shouldn't reuse
      // normal children even if their identities match.
      forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime);
    } else {
      reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    }

    // Memoize state using the values we just used to render.
    // TODO: Restructure so we never read values from the instance.
    workInProgress.memoizedState = instance.state;

    // The context might have changed so we need to recalculate it.
    if (hasContext) {
      invalidateContextProvider(workInProgress, Component, true);
    }

    return workInProgress.child;
  }

  function pushHostRootContext(workInProgress) {
    var root = workInProgress.stateNode;
    if (root.pendingContext) {
      pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
    } else if (root.context) {
      // Should always be set
      pushTopLevelContextObject(workInProgress, root.context, false);
    }
    pushHostContainer(workInProgress, root.containerInfo);
  }

  function updateHostRoot(current$$1, workInProgress, renderExpirationTime) {
    pushHostRootContext(workInProgress);
    var updateQueue = workInProgress.updateQueue;
    !(updateQueue !== null) ? invariant(false, 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    var nextProps = workInProgress.pendingProps;
    var prevState = workInProgress.memoizedState;
    var prevChildren = prevState !== null ? prevState.element : null;
    processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
    var nextState = workInProgress.memoizedState;
    // Caution: React DevTools currently depends on this property
    // being called "element".
    var nextChildren = nextState.element;
    if (nextChildren === prevChildren) {
      // If the state is the same as before, that's a bailout because we had
      // no work that expires at this time.
      resetHydrationState();
      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }
    var root = workInProgress.stateNode;
    if ((current$$1 === null || current$$1.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
      // If we don't have any current children this might be the first pass.
      // We always try to hydrate. If this isn't a hydration pass there won't
      // be any children to hydrate which is effectively the same thing as
      // not hydrating.

      // This is a bit of a hack. We track the host root as a placement to
      // know that we're currently in a mounting state. That way isMounted
      // works as expected. We must reset this before committing.
      // TODO: Delete this when we delete isMounted and findDOMNode.
      workInProgress.effectTag |= Placement;

      // Ensure that children mount into this root without tracking
      // side-effects. This ensures that we don't store Placement effects on
      // nodes that will be hydrated.
      workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
    } else {
      // Otherwise reset hydration state in case we aborted and resumed another
      // root.
      reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
      resetHydrationState();
    }
    return workInProgress.child;
  }

  function updateHostComponent(current$$1, workInProgress, renderExpirationTime) {
    pushHostContext(workInProgress);

    if (current$$1 === null) {
      tryToClaimNextHydratableInstance(workInProgress);
    }

    var type = workInProgress.type;
    var nextProps = workInProgress.pendingProps;
    var prevProps = current$$1 !== null ? current$$1.memoizedProps : null;

    var nextChildren = nextProps.children;
    var isDirectTextChild = shouldSetTextContent(type, nextProps);

    if (isDirectTextChild) {
      // We special case a direct text child of a host node. This is a common
      // case. We won't handle it as a reified child. We will instead handle
      // this in the host environment that also have access to this prop. That
      // avoids allocating another HostText fiber and traversing it.
      nextChildren = null;
    } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
      // If we're switching from a direct text child to a normal child, or to
      // empty, we need to schedule the text content to be reset.
      workInProgress.effectTag |= ContentReset;
    }

    markRef(current$$1, workInProgress);

    // Check the host config to see if the children are offscreen/hidden.
    if (renderExpirationTime !== Never && workInProgress.mode & ConcurrentMode && shouldDeprioritizeSubtree(type, nextProps)) {
      // Schedule this fiber to re-render at offscreen priority. Then bailout.
      workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
      return null;
    }

    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function updateHostText(current$$1, workInProgress) {
    if (current$$1 === null) {
      tryToClaimNextHydratableInstance(workInProgress);
    }
    // Nothing to do here. This is terminal. We'll do the completion step
    // immediately after.
    return null;
  }

  function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
    if (_current !== null) {
      // An lazy component only mounts if it suspended inside a non-
      // concurrent tree, in an inconsistent state. We want to treat it like
      // a new mount, even though an empty version of it already committed.
      // Disconnect the alternate pointers.
      _current.alternate = null;
      workInProgress.alternate = null;
      // Since this is conceptually a new fiber, schedule a Placement effect
      workInProgress.effectTag |= Placement;
    }

    var props = workInProgress.pendingProps;
    // We can't start a User Timing measurement with correct label yet.
    // Cancel and resume right after we know the tag.
    cancelWorkTimer(workInProgress);
    var Component = readLazyComponentType(elementType);
    // Store the unwrapped component in the type.
    workInProgress.type = Component;
    var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
    startWorkTimer(workInProgress);
    var resolvedProps = resolveDefaultProps(Component, props);
    var child = void 0;
    switch (resolvedTag) {
      case FunctionComponent:
        {
          {
            validateFunctionComponentInDev(workInProgress, Component);
          }
          child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
          break;
        }
      case ClassComponent:
        {
          child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
          break;
        }
      case ForwardRef:
        {
          child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
          break;
        }
      case MemoComponent:
        {
          {
            if (workInProgress.type !== workInProgress.elementType) {
              var outerPropTypes = Component.propTypes;
              if (outerPropTypes) {
                checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
                'prop', getComponentName(Component), getCurrentFiberStackInDev);
              }
            }
          }
          child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
          updateExpirationTime, renderExpirationTime);
          break;
        }
      default:
        {
          var hint = '';
          {
            if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
              hint = ' Did you wrap a component in React.lazy() more than once?';
            }
          }
          // This message intentionally doesn't mention ForwardRef or MemoComponent
          // because the fact that it's a separate type of work is an
          // implementation detail.
          invariant(false, 'Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s', Component, hint);
        }
    }
    return child;
  }

  function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
    if (_current !== null) {
      // An incomplete component only mounts if it suspended inside a non-
      // concurrent tree, in an inconsistent state. We want to treat it like
      // a new mount, even though an empty version of it already committed.
      // Disconnect the alternate pointers.
      _current.alternate = null;
      workInProgress.alternate = null;
      // Since this is conceptually a new fiber, schedule a Placement effect
      workInProgress.effectTag |= Placement;
    }

    // Promote the fiber to a class and try rendering again.
    workInProgress.tag = ClassComponent;

    // The rest of this function is a fork of `updateClassComponent`

    // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.
    var hasContext = void 0;
    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }
    prepareToReadContext(workInProgress, renderExpirationTime);

    constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
    mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);

    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
  }

  function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
    if (_current !== null) {
      // An indeterminate component only mounts if it suspended inside a non-
      // concurrent tree, in an inconsistent state. We want to treat it like
      // a new mount, even though an empty version of it already committed.
      // Disconnect the alternate pointers.
      _current.alternate = null;
      workInProgress.alternate = null;
      // Since this is conceptually a new fiber, schedule a Placement effect
      workInProgress.effectTag |= Placement;
    }

    var props = workInProgress.pendingProps;
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
    var context = getMaskedContext(workInProgress, unmaskedContext);

    prepareToReadContext(workInProgress, renderExpirationTime);

    var value = void 0;

    {
      if (Component.prototype && typeof Component.prototype.render === 'function') {
        var componentName = getComponentName(Component) || 'Unknown';

        if (!didWarnAboutBadClass[componentName]) {
          warningWithoutStack$1(false, "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
          didWarnAboutBadClass[componentName] = true;
        }
      }

      if (workInProgress.mode & StrictMode) {
        ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
      }

      ReactCurrentOwner$2.current = workInProgress;
      value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
    }
    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;

    if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
      // Proceed under the assumption that this is a class instance
      workInProgress.tag = ClassComponent;

      // Throw out any hooks that were used.
      resetHooks();

      // Push context providers early to prevent context stack mismatches.
      // During mounting we don't know the child context yet as the instance doesn't exist.
      // We will invalidate the child context in finishClassComponent() right after rendering.
      var hasContext = false;
      if (isContextProvider(Component)) {
        hasContext = true;
        pushContextProvider(workInProgress);
      } else {
        hasContext = false;
      }

      workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;

      var getDerivedStateFromProps = Component.getDerivedStateFromProps;
      if (typeof getDerivedStateFromProps === 'function') {
        applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
      }

      adoptClassInstance(workInProgress, value);
      mountClassInstance(workInProgress, Component, props, renderExpirationTime);
      return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
    } else {
      // Proceed under the assumption that this is a function component
      workInProgress.tag = FunctionComponent;
      {
        if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
          // Only double-render components with Hooks
          if (workInProgress.memoizedState !== null) {
            value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
          }
        }
      }
      reconcileChildren(null, workInProgress, value, renderExpirationTime);
      {
        validateFunctionComponentInDev(workInProgress, Component);
      }
      return workInProgress.child;
    }
  }

  function validateFunctionComponentInDev(workInProgress, Component) {
    if (Component) {
      !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component') : void 0;
    }
    if (workInProgress.ref !== null) {
      var info = '';
      var ownerName = getCurrentFiberOwnerNameInDevOrNull();
      if (ownerName) {
        info += '\n\nCheck the render method of `' + ownerName + '`.';
      }

      var warningKey = ownerName || workInProgress._debugID || '';
      var debugSource = workInProgress._debugSource;
      if (debugSource) {
        warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
      }
      if (!didWarnAboutFunctionRefs[warningKey]) {
        didWarnAboutFunctionRefs[warningKey] = true;
        warning$1(false, 'Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
      }
    }

    if (typeof Component.getDerivedStateFromProps === 'function') {
      var componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutGetDerivedStateOnFunctionComponent[componentName]) {
        warningWithoutStack$1(false, '%s: Function components do not support getDerivedStateFromProps.', componentName);
        didWarnAboutGetDerivedStateOnFunctionComponent[componentName] = true;
      }
    }

    if (typeof Component.contextType === 'object' && Component.contextType !== null) {
      var _componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName]) {
        warningWithoutStack$1(false, '%s: Function components do not support contextType.', _componentName);
        didWarnAboutContextTypeOnFunctionComponent[_componentName] = true;
      }
    }
  }

  function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
    var mode = workInProgress.mode;
    var nextProps = workInProgress.pendingProps;

    // We should attempt to render the primary children unless this boundary
    // already suspended during this render (`alreadyCaptured` is true).
    var nextState = workInProgress.memoizedState;

    var nextDidTimeout = void 0;
    if ((workInProgress.effectTag & DidCapture) === NoEffect) {
      // This is the first attempt.
      nextState = null;
      nextDidTimeout = false;
    } else {
      // Something in this boundary's subtree already suspended. Switch to
      // rendering the fallback children.
      nextState = {
        timedOutAt: nextState !== null ? nextState.timedOutAt : NoWork
      };
      nextDidTimeout = true;
      workInProgress.effectTag &= ~DidCapture;
    }

    // This next part is a bit confusing. If the children timeout, we switch to
    // showing the fallback children in place of the "primary" children.
    // However, we don't want to delete the primary children because then their
    // state will be lost (both the React state and the host state, e.g.
    // uncontrolled form inputs). Instead we keep them mounted and hide them.
    // Both the fallback children AND the primary children are rendered at the
    // same time. Once the primary children are un-suspended, we can delete
    // the fallback children — don't need to preserve their state.
    //
    // The two sets of children are siblings in the host environment, but
    // semantically, for purposes of reconciliation, they are two separate sets.
    // So we store them using two fragment fibers.
    //
    // However, we want to avoid allocating extra fibers for every placeholder.
    // They're only necessary when the children time out, because that's the
    // only time when both sets are mounted.
    //
    // So, the extra fragment fibers are only used if the children time out.
    // Otherwise, we render the primary children directly. This requires some
    // custom reconciliation logic to preserve the state of the primary
    // children. It's essentially a very basic form of re-parenting.

    // `child` points to the child fiber. In the normal case, this is the first
    // fiber of the primary children set. In the timed-out case, it's a
    // a fragment fiber containing the primary children.
    var child = void 0;
    // `next` points to the next fiber React should render. In the normal case,
    // it's the same as `child`: the first fiber of the primary children set.
    // In the timed-out case, it's a fragment fiber containing the *fallback*
    // children -- we skip over the primary children entirely.
    var next = void 0;
    if (current$$1 === null) {
      if (enableSuspenseServerRenderer) {
        // If we're currently hydrating, try to hydrate this boundary.
        // But only if this has a fallback.
        if (nextProps.fallback !== undefined) {
          tryToClaimNextHydratableInstance(workInProgress);
          // This could've changed the tag if this was a dehydrated suspense component.
          if (workInProgress.tag === DehydratedSuspenseComponent) {
            return updateDehydratedSuspenseComponent(null, workInProgress, renderExpirationTime);
          }
        }
      }

      // This is the initial mount. This branch is pretty simple because there's
      // no previous state that needs to be preserved.
      if (nextDidTimeout) {
        // Mount separate fragments for primary and fallback children.
        var nextFallbackChildren = nextProps.fallback;
        var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);

        if ((workInProgress.mode & ConcurrentMode) === NoContext) {
          // Outside of concurrent mode, we commit the effects from the
          var progressedState = workInProgress.memoizedState;
          var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
          primaryChildFragment.child = progressedPrimaryChild;
        }

        var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
        primaryChildFragment.sibling = fallbackChildFragment;
        child = primaryChildFragment;
        // Skip the primary children, and continue working on the
        // fallback children.
        next = fallbackChildFragment;
        child.return = next.return = workInProgress;
      } else {
        // Mount the primary children without an intermediate fragment fiber.
        var nextPrimaryChildren = nextProps.children;
        child = next = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
      }
    } else {
      // This is an update. This branch is more complicated because we need to
      // ensure the state of the primary children is preserved.
      var prevState = current$$1.memoizedState;
      var prevDidTimeout = prevState !== null;
      if (prevDidTimeout) {
        // The current tree already timed out. That means each child set is
        var currentPrimaryChildFragment = current$$1.child;
        var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
        if (nextDidTimeout) {
          // Still timed out. Reuse the current primary children by cloning
          // its fragment. We're going to skip over these entirely.
          var _nextFallbackChildren = nextProps.fallback;
          var _primaryChildFragment = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps, NoWork);

          if ((workInProgress.mode & ConcurrentMode) === NoContext) {
            // Outside of concurrent mode, we commit the effects from the
            var _progressedState = workInProgress.memoizedState;
            var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
            if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
              _primaryChildFragment.child = _progressedPrimaryChild;
            }
          }

          // Because primaryChildFragment is a new fiber that we're inserting as the
          // parent of a new tree, we need to set its treeBaseDuration.
          if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
            // treeBaseDuration is the sum of all the child tree base durations.
            var treeBaseDuration = 0;
            var hiddenChild = _primaryChildFragment.child;
            while (hiddenChild !== null) {
              treeBaseDuration += hiddenChild.treeBaseDuration;
              hiddenChild = hiddenChild.sibling;
            }
            _primaryChildFragment.treeBaseDuration = treeBaseDuration;
          }

          // Clone the fallback child fragment, too. These we'll continue
          // working on.
          var _fallbackChildFragment = _primaryChildFragment.sibling = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren, currentFallbackChildFragment.expirationTime);
          child = _primaryChildFragment;
          _primaryChildFragment.childExpirationTime = NoWork;
          // Skip the primary children, and continue working on the
          // fallback children.
          next = _fallbackChildFragment;
          child.return = next.return = workInProgress;
        } else {
          // No longer suspended. Switch back to showing the primary children,
          // and remove the intermediate fragment fiber.
          var _nextPrimaryChildren = nextProps.children;
          var currentPrimaryChild = currentPrimaryChildFragment.child;
          var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime);

          // If this render doesn't suspend, we need to delete the fallback
          // children. Wait until the complete phase, after we've confirmed the
          // fallback is no longer needed.
          // TODO: Would it be better to store the fallback fragment on
          // the stateNode?

          // Continue rendering the children, like we normally do.
          child = next = primaryChild;
        }
      } else {
        // The current tree has not already timed out. That means the primary
        // children are not wrapped in a fragment fiber.
        var _currentPrimaryChild = current$$1.child;
        if (nextDidTimeout) {
          // Timed out. Wrap the children in a fragment fiber to keep them
          // separate from the fallback children.
          var _nextFallbackChildren2 = nextProps.fallback;
          var _primaryChildFragment2 = createFiberFromFragment(
          // It shouldn't matter what the pending props are because we aren't
          // going to render this fragment.
          null, mode, NoWork, null);
          _primaryChildFragment2.child = _currentPrimaryChild;

          // Even though we're creating a new fiber, there are no new children,
          // because we're reusing an already mounted tree. So we don't need to
          // schedule a placement.
          // primaryChildFragment.effectTag |= Placement;

          if ((workInProgress.mode & ConcurrentMode) === NoContext) {
            // Outside of concurrent mode, we commit the effects from the
            var _progressedState2 = workInProgress.memoizedState;
            var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
            _primaryChildFragment2.child = _progressedPrimaryChild2;
          }

          // Because primaryChildFragment is a new fiber that we're inserting as the
          // parent of a new tree, we need to set its treeBaseDuration.
          if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
            // treeBaseDuration is the sum of all the child tree base durations.
            var _treeBaseDuration = 0;
            var _hiddenChild = _primaryChildFragment2.child;
            while (_hiddenChild !== null) {
              _treeBaseDuration += _hiddenChild.treeBaseDuration;
              _hiddenChild = _hiddenChild.sibling;
            }
            _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
          }

          // Create a fragment from the fallback children, too.
          var _fallbackChildFragment2 = _primaryChildFragment2.sibling = createFiberFromFragment(_nextFallbackChildren2, mode, renderExpirationTime, null);
          _fallbackChildFragment2.effectTag |= Placement;
          child = _primaryChildFragment2;
          _primaryChildFragment2.childExpirationTime = NoWork;
          // Skip the primary children, and continue working on the
          // fallback children.
          next = _fallbackChildFragment2;
          child.return = next.return = workInProgress;
        } else {
          // Still haven't timed out.  Continue rendering the children, like we
          // normally do.
          var _nextPrimaryChildren2 = nextProps.children;
          next = child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
        }
      }
      workInProgress.stateNode = current$$1.stateNode;
    }

    workInProgress.memoizedState = nextState;
    workInProgress.child = child;
    return next;
  }

  function updateDehydratedSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
    if (current$$1 === null) {
      // During the first pass, we'll bail out and not drill into the children.
      // Instead, we'll leave the content in place and try to hydrate it later.
      workInProgress.expirationTime = Never;
      return null;
    }
    // We use childExpirationTime to indicate that a child might depend on context, so if
    // any context has changed, we need to treat is as if the input might have changed.
    var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime;
    if (didReceiveUpdate || hasContextChanged$$1) {
      // This boundary has changed since the first render. This means that we are now unable to
      // hydrate it. We might still be able to hydrate it using an earlier expiration time but
      // during this render we can't. Instead, we're going to delete the whole subtree and
      // instead inject a new real Suspense boundary to take its place, which may render content
      // or fallback. The real Suspense boundary will suspend for a while so we have some time
      // to ensure it can produce real content, but all state and pending events will be lost.

      // Detach from the current dehydrated boundary.
      current$$1.alternate = null;
      workInProgress.alternate = null;

      // Insert a deletion in the effect list.
      var returnFiber = workInProgress.return;
      !(returnFiber !== null) ? invariant(false, 'Suspense boundaries are never on the root. This is probably a bug in React.') : void 0;
      var last = returnFiber.lastEffect;
      if (last !== null) {
        last.nextEffect = current$$1;
        returnFiber.lastEffect = current$$1;
      } else {
        returnFiber.firstEffect = returnFiber.lastEffect = current$$1;
      }
      current$$1.nextEffect = null;
      current$$1.effectTag = Deletion;

      // Upgrade this work in progress to a real Suspense component.
      workInProgress.tag = SuspenseComponent;
      workInProgress.stateNode = null;
      workInProgress.memoizedState = null;
      // This is now an insertion.
      workInProgress.effectTag |= Placement;
      // Retry as a real Suspense component.
      return updateSuspenseComponent(null, workInProgress, renderExpirationTime);
    }
    if ((workInProgress.effectTag & DidCapture) === NoEffect) {
      // This is the first attempt.
      reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress);
      var nextProps = workInProgress.pendingProps;
      var nextChildren = nextProps.children;
      workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
      return workInProgress.child;
    } else {
      // Something suspended. Leave the existing children in place.
      // TODO: In non-concurrent mode, should we commit the nodes we have hydrated so far?
      workInProgress.child = null;
      return null;
    }
  }

  function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) {
    pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
    var nextChildren = workInProgress.pendingProps;
    if (current$$1 === null) {
      // Portals are special because we don't append the children during mount
      // but at commit. Therefore we need to track insertions which the normal
      // flow doesn't do during mount. This doesn't happen at the root because
      // the root always starts with a "current" with a null child.
      // TODO: Consider unifying this with how the root works.
      workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
    } else {
      reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    }
    return workInProgress.child;
  }

  function updateContextProvider(current$$1, workInProgress, renderExpirationTime) {
    var providerType = workInProgress.type;
    var context = providerType._context;

    var newProps = workInProgress.pendingProps;
    var oldProps = workInProgress.memoizedProps;

    var newValue = newProps.value;

    {
      var providerPropTypes = workInProgress.type.propTypes;

      if (providerPropTypes) {
        checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
      }
    }

    pushProvider(workInProgress, newValue);

    if (oldProps !== null) {
      var oldValue = oldProps.value;
      var changedBits = calculateChangedBits(context, newValue, oldValue);
      if (changedBits === 0) {
        // No change. Bailout early if children are the same.
        if (oldProps.children === newProps.children && !hasContextChanged()) {
          return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
        }
      } else {
        // The context value changed. Search for matching consumers and schedule
        // them to update.
        propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
      }
    }

    var newChildren = newProps.children;
    reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
    return workInProgress.child;
  }

  var hasWarnedAboutUsingContextAsConsumer = false;

  function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) {
    var context = workInProgress.type;
    // The logic below for Context differs depending on PROD or DEV mode. In
    // DEV mode, we create a separate object for Context.Consumer that acts
    // like a proxy to Context. This proxy object adds unnecessary code in PROD
    // so we use the old behaviour (Context.Consumer references Context) to
    // reduce size and overhead. The separate object references context via
    // a property called "_context", which also gives us the ability to check
    // in DEV mode if this property exists or not and warn if it does not.
    {
      if (context._context === undefined) {
        // This may be because it's a Context (rather than a Consumer).
        // Or it may be because it's older React where they're the same thing.
        // We only want to warn if we're sure it's a new React.
        if (context !== context.Consumer) {
          if (!hasWarnedAboutUsingContextAsConsumer) {
            hasWarnedAboutUsingContextAsConsumer = true;
            warning$1(false, 'Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
          }
        }
      } else {
        context = context._context;
      }
    }
    var newProps = workInProgress.pendingProps;
    var render = newProps.children;

    {
      !(typeof render === 'function') ? warningWithoutStack$1(false, 'A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.') : void 0;
    }

    prepareToReadContext(workInProgress, renderExpirationTime);
    var newValue = readContext(context, newProps.unstable_observedBits);
    var newChildren = void 0;
    {
      ReactCurrentOwner$2.current = workInProgress;
      setCurrentPhase('render');
      newChildren = render(newValue);
      setCurrentPhase(null);
    }

    // React DevTools reads this flag.
    workInProgress.effectTag |= PerformedWork;
    reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
    return workInProgress.child;
  }

  function markWorkInProgressReceivedUpdate() {
    didReceiveUpdate = true;
  }

  function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
    cancelWorkTimer(workInProgress);

    if (current$$1 !== null) {
      // Reuse previous context list
      workInProgress.contextDependencies = current$$1.contextDependencies;
    }

    if (enableProfilerTimer) {
      // Don't update "base" render times for bailouts.
      stopProfilerTimerIfRunning(workInProgress);
    }

    // Check if the children have any pending work.
    var childExpirationTime = workInProgress.childExpirationTime;
    if (childExpirationTime < renderExpirationTime) {
      // The children don't have any work either. We can skip them.
      // TODO: Once we add back resuming, we should check if the children are
      // a work-in-progress set. If so, we need to transfer their effects.
      return null;
    } else {
      // This fiber doesn't have work, but its subtree does. Clone the child
      // fibers and continue.
      cloneChildFibers(current$$1, workInProgress);
      return workInProgress.child;
    }
  }

  function beginWork(current$$1, workInProgress, renderExpirationTime) {
    var updateExpirationTime = workInProgress.expirationTime;

    if (current$$1 !== null) {
      var oldProps = current$$1.memoizedProps;
      var newProps = workInProgress.pendingProps;

      if (oldProps !== newProps || hasContextChanged()) {
        // If props or context changed, mark the fiber as having performed work.
        // This may be unset if the props are determined to be equal later (memo).
        didReceiveUpdate = true;
      } else if (updateExpirationTime < renderExpirationTime) {
        didReceiveUpdate = false;
        // This fiber does not have any pending work. Bailout without entering
        // the begin phase. There's still some bookkeeping we that needs to be done
        // in this optimized path, mostly pushing stuff onto the stack.
        switch (workInProgress.tag) {
          case HostRoot:
            pushHostRootContext(workInProgress);
            resetHydrationState();
            break;
          case HostComponent:
            pushHostContext(workInProgress);
            break;
          case ClassComponent:
            {
              var Component = workInProgress.type;
              if (isContextProvider(Component)) {
                pushContextProvider(workInProgress);
              }
              break;
            }
          case HostPortal:
            pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
            break;
          case ContextProvider:
            {
              var newValue = workInProgress.memoizedProps.value;
              pushProvider(workInProgress, newValue);
              break;
            }
          case Profiler:
            if (enableProfilerTimer) {
              workInProgress.effectTag |= Update;
            }
            break;
          case SuspenseComponent:
            {
              var state = workInProgress.memoizedState;
              var didTimeout = state !== null;
              if (didTimeout) {
                // If this boundary is currently timed out, we need to decide
                // whether to retry the primary children, or to skip over it and
                // go straight to the fallback. Check the priority of the primary
                var primaryChildFragment = workInProgress.child;
                var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
                if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
                  // The primary children have pending work. Use the normal path
                  // to attempt to render the primary children again.
                  return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
                } else {
                  // The primary children do not have pending work with sufficient
                  // priority. Bailout.
                  var child = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
                  if (child !== null) {
                    // The fallback children have pending work. Skip over the
                    // primary children and work on the fallback.
                    return child.sibling;
                  } else {
                    return null;
                  }
                }
              }
              break;
            }
          case DehydratedSuspenseComponent:
            {
              if (enableSuspenseServerRenderer) {
                // We know that this component will suspend again because if it has
                // been unsuspended it has committed as a regular Suspense component.
                // If it needs to be retried, it should have work scheduled on it.
                workInProgress.effectTag |= DidCapture;
                break;
              }
            }
        }
        return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
      }
    } else {
      didReceiveUpdate = false;
    }

    // Before entering the begin phase, clear the expiration time.
    workInProgress.expirationTime = NoWork;

    switch (workInProgress.tag) {
      case IndeterminateComponent:
        {
          var elementType = workInProgress.elementType;
          return mountIndeterminateComponent(current$$1, workInProgress, elementType, renderExpirationTime);
        }
      case LazyComponent:
        {
          var _elementType = workInProgress.elementType;
          return mountLazyComponent(current$$1, workInProgress, _elementType, updateExpirationTime, renderExpirationTime);
        }
      case FunctionComponent:
        {
          var _Component = workInProgress.type;
          var unresolvedProps = workInProgress.pendingProps;
          var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
          return updateFunctionComponent(current$$1, workInProgress, _Component, resolvedProps, renderExpirationTime);
        }
      case ClassComponent:
        {
          var _Component2 = workInProgress.type;
          var _unresolvedProps = workInProgress.pendingProps;
          var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
          return updateClassComponent(current$$1, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
        }
      case HostRoot:
        return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
      case HostComponent:
        return updateHostComponent(current$$1, workInProgress, renderExpirationTime);
      case HostText:
        return updateHostText(current$$1, workInProgress);
      case SuspenseComponent:
        return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
      case HostPortal:
        return updatePortalComponent(current$$1, workInProgress, renderExpirationTime);
      case ForwardRef:
        {
          var type = workInProgress.type;
          var _unresolvedProps2 = workInProgress.pendingProps;
          var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
          return updateForwardRef(current$$1, workInProgress, type, _resolvedProps2, renderExpirationTime);
        }
      case Fragment:
        return updateFragment(current$$1, workInProgress, renderExpirationTime);
      case Mode:
        return updateMode(current$$1, workInProgress, renderExpirationTime);
      case Profiler:
        return updateProfiler(current$$1, workInProgress, renderExpirationTime);
      case ContextProvider:
        return updateContextProvider(current$$1, workInProgress, renderExpirationTime);
      case ContextConsumer:
        return updateContextConsumer(current$$1, workInProgress, renderExpirationTime);
      case MemoComponent:
        {
          var _type2 = workInProgress.type;
          var _unresolvedProps3 = workInProgress.pendingProps;
          // Resolve outer props first, then resolve inner props.
          var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
          {
            if (workInProgress.type !== workInProgress.elementType) {
              var outerPropTypes = _type2.propTypes;
              if (outerPropTypes) {
                checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
                'prop', getComponentName(_type2), getCurrentFiberStackInDev);
              }
            }
          }
          _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
          return updateMemoComponent(current$$1, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
        }
      case SimpleMemoComponent:
        {
          return updateSimpleMemoComponent(current$$1, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
        }
      case IncompleteClassComponent:
        {
          var _Component3 = workInProgress.type;
          var _unresolvedProps4 = workInProgress.pendingProps;
          var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
          return mountIncompleteClassComponent(current$$1, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
        }
      case DehydratedSuspenseComponent:
        {
          if (enableSuspenseServerRenderer) {
            return updateDehydratedSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
          }
          break;
        }
    }
    invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
  }

  var valueCursor = createCursor(null);

  var rendererSigil = void 0;
  {
    // Use this to detect multiple renderers using the same context
    rendererSigil = {};
  }

  var currentlyRenderingFiber = null;
  var lastContextDependency = null;
  var lastContextWithAllBitsObserved = null;

  var isDisallowedContextReadInDEV = false;

  function resetContextDependences() {
    // This is called right before React yields execution, to ensure `readContext`
    // cannot be called outside the render phase.
    currentlyRenderingFiber = null;
    lastContextDependency = null;
    lastContextWithAllBitsObserved = null;
    {
      isDisallowedContextReadInDEV = false;
    }
  }

  function enterDisallowedContextReadInDEV() {
    {
      isDisallowedContextReadInDEV = true;
    }
  }

  function exitDisallowedContextReadInDEV() {
    {
      isDisallowedContextReadInDEV = false;
    }
  }

  function pushProvider(providerFiber, nextValue) {
    var context = providerFiber.type._context;

    if (isPrimaryRenderer) {
      push(valueCursor, context._currentValue, providerFiber);

      context._currentValue = nextValue;
      {
        !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
        context._currentRenderer = rendererSigil;
      }
    } else {
      push(valueCursor, context._currentValue2, providerFiber);

      context._currentValue2 = nextValue;
      {
        !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
        context._currentRenderer2 = rendererSigil;
      }
    }
  }

  function popProvider(providerFiber) {
    var currentValue = valueCursor.current;

    pop(valueCursor, providerFiber);

    var context = providerFiber.type._context;
    if (isPrimaryRenderer) {
      context._currentValue = currentValue;
    } else {
      context._currentValue2 = currentValue;
    }
  }

  function calculateChangedBits(context, newValue, oldValue) {
    if (is(oldValue, newValue)) {
      // No change
      return 0;
    } else {
      var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : maxSigned31BitInt;

      {
        !((changedBits & maxSigned31BitInt) === changedBits) ? warning$1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
      }
      return changedBits | 0;
    }
  }

  function scheduleWorkOnParentPath(parent, renderExpirationTime) {
    // Update the child expiration time of all the ancestors, including
    // the alternates.
    var node = parent;
    while (node !== null) {
      var alternate = node.alternate;
      if (node.childExpirationTime < renderExpirationTime) {
        node.childExpirationTime = renderExpirationTime;
        if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
          alternate.childExpirationTime = renderExpirationTime;
        }
      } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
        alternate.childExpirationTime = renderExpirationTime;
      } else {
        // Neither alternate was updated, which means the rest of the
        // ancestor path already has sufficient priority.
        break;
      }
      node = node.return;
    }
  }

  function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
    var fiber = workInProgress.child;
    if (fiber !== null) {
      // Set the return pointer of the child to the work-in-progress fiber.
      fiber.return = workInProgress;
    }
    while (fiber !== null) {
      var nextFiber = void 0;

      // Visit this fiber.
      var list = fiber.contextDependencies;
      if (list !== null) {
        nextFiber = fiber.child;

        var dependency = list.first;
        while (dependency !== null) {
          // Check if the context matches.
          if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
            // Match! Schedule an update on this fiber.

            if (fiber.tag === ClassComponent) {
              // Schedule a force update on the work-in-progress.
              var update = createUpdate(renderExpirationTime);
              update.tag = ForceUpdate;
              // TODO: Because we don't have a work-in-progress, this will add the
              // update to the current fiber, too, which means it will persist even if
              // this render is thrown away. Since it's a race condition, not sure it's
              // worth fixing.
              enqueueUpdate(fiber, update);
            }

            if (fiber.expirationTime < renderExpirationTime) {
              fiber.expirationTime = renderExpirationTime;
            }
            var alternate = fiber.alternate;
            if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
              alternate.expirationTime = renderExpirationTime;
            }

            scheduleWorkOnParentPath(fiber.return, renderExpirationTime);

            // Mark the expiration time on the list, too.
            if (list.expirationTime < renderExpirationTime) {
              list.expirationTime = renderExpirationTime;
            }

            // Since we already found a match, we can stop traversing the
            // dependency list.
            break;
          }
          dependency = dependency.next;
        }
      } else if (fiber.tag === ContextProvider) {
        // Don't scan deeper if this is a matching provider
        nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
      } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedSuspenseComponent) {
        // If a dehydrated suspense component is in this subtree, we don't know
        // if it will have any context consumers in it. The best we can do is
        // mark it as having updates on its children.
        if (fiber.expirationTime < renderExpirationTime) {
          fiber.expirationTime = renderExpirationTime;
        }
        var _alternate = fiber.alternate;
        if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) {
          _alternate.expirationTime = renderExpirationTime;
        }
        // This is intentionally passing this fiber as the parent
        // because we want to schedule this fiber as having work
        // on its children. We'll use the childExpirationTime on
        // this fiber to indicate that a context has changed.
        scheduleWorkOnParentPath(fiber, renderExpirationTime);
        nextFiber = fiber.sibling;
      } else {
        // Traverse down.
        nextFiber = fiber.child;
      }

      if (nextFiber !== null) {
        // Set the return pointer of the child to the work-in-progress fiber.
        nextFiber.return = fiber;
      } else {
        // No child. Traverse to next sibling.
        nextFiber = fiber;
        while (nextFiber !== null) {
          if (nextFiber === workInProgress) {
            // We're back to the root of this subtree. Exit.
            nextFiber = null;
            break;
          }
          var sibling = nextFiber.sibling;
          if (sibling !== null) {
            // Set the return pointer of the sibling to the work-in-progress fiber.
            sibling.return = nextFiber.return;
            nextFiber = sibling;
            break;
          }
          // No more siblings. Traverse up.
          nextFiber = nextFiber.return;
        }
      }
      fiber = nextFiber;
    }
  }

  function prepareToReadContext(workInProgress, renderExpirationTime) {
    currentlyRenderingFiber = workInProgress;
    lastContextDependency = null;
    lastContextWithAllBitsObserved = null;

    var currentDependencies = workInProgress.contextDependencies;
    if (currentDependencies !== null && currentDependencies.expirationTime >= renderExpirationTime) {
      // Context list has a pending update. Mark that this fiber performed work.
      markWorkInProgressReceivedUpdate();
    }

    // Reset the work-in-progress list
    workInProgress.contextDependencies = null;
  }

  function readContext(context, observedBits) {
    {
      // This warning would fire if you read context inside a Hook like useMemo.
      // Unlike the class check below, it's not enforced in production for perf.
      !!isDisallowedContextReadInDEV ? warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().') : void 0;
    }

    if (lastContextWithAllBitsObserved === context) {
      // Nothing to do. We already observe everything in this context.
    } else if (observedBits === false || observedBits === 0) {
      // Do not observe any updates.
    } else {
      var resolvedObservedBits = void 0; // Avoid deopting on observable arguments or heterogeneous types.
      if (typeof observedBits !== 'number' || observedBits === maxSigned31BitInt) {
        // Observe all updates.
        lastContextWithAllBitsObserved = context;
        resolvedObservedBits = maxSigned31BitInt;
      } else {
        resolvedObservedBits = observedBits;
      }

      var contextItem = {
        context: context,
        observedBits: resolvedObservedBits,
        next: null
      };

      if (lastContextDependency === null) {
        !(currentlyRenderingFiber !== null) ? invariant(false, 'Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().') : void 0;

        // This is the first dependency for this component. Create a new list.
        lastContextDependency = contextItem;
        currentlyRenderingFiber.contextDependencies = {
          first: contextItem,
          expirationTime: NoWork
        };
      } else {
        // Append a new context item.
        lastContextDependency = lastContextDependency.next = contextItem;
      }
    }
    return isPrimaryRenderer ? context._currentValue : context._currentValue2;
  }

  // UpdateQueue is a linked list of prioritized updates.
  //
  // Like fibers, update queues come in pairs: a current queue, which represents
  // the visible state of the screen, and a work-in-progress queue, which can be
  // mutated and processed asynchronously before it is committed — a form of
  // double buffering. If a work-in-progress render is discarded before finishing,
  // we create a new work-in-progress by cloning the current queue.
  //
  // Both queues share a persistent, singly-linked list structure. To schedule an
  // update, we append it to the end of both queues. Each queue maintains a
  // pointer to first update in the persistent list that hasn't been processed.
  // The work-in-progress pointer always has a position equal to or greater than
  // the current queue, since we always work on that one. The current queue's
  // pointer is only updated during the commit phase, when we swap in the
  // work-in-progress.
  //
  // For example:
  //
  //   Current pointer:           A - B - C - D - E - F
  //   Work-in-progress pointer:              D - E - F
  //                                          ^
  //                                          The work-in-progress queue has
  //                                          processed more updates than current.
  //
  // The reason we append to both queues is because otherwise we might drop
  // updates without ever processing them. For example, if we only add updates to
  // the work-in-progress queue, some updates could be lost whenever a work-in
  // -progress render restarts by cloning from current. Similarly, if we only add
  // updates to the current queue, the updates will be lost whenever an already
  // in-progress queue commits and swaps with the current queue. However, by
  // adding to both queues, we guarantee that the update will be part of the next
  // work-in-progress. (And because the work-in-progress queue becomes the
  // current queue once it commits, there's no danger of applying the same
  // update twice.)
  //
  // Prioritization
  // --------------
  //
  // Updates are not sorted by priority, but by insertion; new updates are always
  // appended to the end of the list.
  //
  // The priority is still important, though. When processing the update queue
  // during the render phase, only the updates with sufficient priority are
  // included in the result. If we skip an update because it has insufficient
  // priority, it remains in the queue to be processed later, during a lower
  // priority render. Crucially, all updates subsequent to a skipped update also
  // remain in the queue *regardless of their priority*. That means high priority
  // updates are sometimes processed twice, at two separate priorities. We also
  // keep track of a base state, that represents the state before the first
  // update in the queue is applied.
  //
  // For example:
  //
  //   Given a base state of '', and the following queue of updates
  //
  //     A1 - B2 - C1 - D2
  //
  //   where the number indicates the priority, and the update is applied to the
  //   previous state by appending a letter, React will process these updates as
  //   two separate renders, one per distinct priority level:
  //
  //   First render, at priority 1:
  //     Base state: ''
  //     Updates: [A1, C1]
  //     Result state: 'AC'
  //
  //   Second render, at priority 2:
  //     Base state: 'A'            <-  The base state does not include C1,
  //                                    because B2 was skipped.
  //     Updates: [B2, C1, D2]      <-  C1 was rebased on top of B2
  //     Result state: 'ABCD'
  //
  // Because we process updates in insertion order, and rebase high priority
  // updates when preceding updates are skipped, the final result is deterministic
  // regardless of priority. Intermediate state may vary according to system
  // resources, but the final state is always the same.

  var UpdateState = 0;
  var ReplaceState = 1;
  var ForceUpdate = 2;
  var CaptureUpdate = 3;

  // Global state that is reset at the beginning of calling `processUpdateQueue`.
  // It should only be read right after calling `processUpdateQueue`, via
  // `checkHasForceUpdateAfterProcessing`.
  var hasForceUpdate = false;

  var didWarnUpdateInsideUpdate = void 0;
  var currentlyProcessingQueue = void 0;
  var resetCurrentlyProcessingQueue = void 0;
  {
    didWarnUpdateInsideUpdate = false;
    currentlyProcessingQueue = null;
    resetCurrentlyProcessingQueue = function () {
      currentlyProcessingQueue = null;
    };
  }

  function createUpdateQueue(baseState) {
    var queue = {
      baseState: baseState,
      firstUpdate: null,
      lastUpdate: null,
      firstCapturedUpdate: null,
      lastCapturedUpdate: null,
      firstEffect: null,
      lastEffect: null,
      firstCapturedEffect: null,
      lastCapturedEffect: null
    };
    return queue;
  }

  function cloneUpdateQueue(currentQueue) {
    var queue = {
      baseState: currentQueue.baseState,
      firstUpdate: currentQueue.firstUpdate,
      lastUpdate: currentQueue.lastUpdate,

      // TODO: With resuming, if we bail out and resuse the child tree, we should
      // keep these effects.
      firstCapturedUpdate: null,
      lastCapturedUpdate: null,

      firstEffect: null,
      lastEffect: null,

      firstCapturedEffect: null,
      lastCapturedEffect: null
    };
    return queue;
  }

  function createUpdate(expirationTime) {
    return {
      expirationTime: expirationTime,

      tag: UpdateState,
      payload: null,
      callback: null,

      next: null,
      nextEffect: null
    };
  }

  function appendUpdateToQueue(queue, update) {
    // Append the update to the end of the list.
    if (queue.lastUpdate === null) {
      // Queue is empty
      queue.firstUpdate = queue.lastUpdate = update;
    } else {
      queue.lastUpdate.next = update;
      queue.lastUpdate = update;
    }
  }

  function enqueueUpdate(fiber, update) {
    // Update queues are created lazily.
    var alternate = fiber.alternate;
    var queue1 = void 0;
    var queue2 = void 0;
    if (alternate === null) {
      // There's only one fiber.
      queue1 = fiber.updateQueue;
      queue2 = null;
      if (queue1 === null) {
        queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
      }
    } else {
      // There are two owners.
      queue1 = fiber.updateQueue;
      queue2 = alternate.updateQueue;
      if (queue1 === null) {
        if (queue2 === null) {
          // Neither fiber has an update queue. Create new ones.
          queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
          queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState);
        } else {
          // Only one fiber has an update queue. Clone to create a new one.
          queue1 = fiber.updateQueue = cloneUpdateQueue(queue2);
        }
      } else {
        if (queue2 === null) {
          // Only one fiber has an update queue. Clone to create a new one.
          queue2 = alternate.updateQueue = cloneUpdateQueue(queue1);
        } else {
          // Both owners have an update queue.
        }
      }
    }
    if (queue2 === null || queue1 === queue2) {
      // There's only a single queue.
      appendUpdateToQueue(queue1, update);
    } else {
      // There are two queues. We need to append the update to both queues,
      // while accounting for the persistent structure of the list — we don't
      // want the same update to be added multiple times.
      if (queue1.lastUpdate === null || queue2.lastUpdate === null) {
        // One of the queues is not empty. We must add the update to both queues.
        appendUpdateToQueue(queue1, update);
        appendUpdateToQueue(queue2, update);
      } else {
        // Both queues are non-empty. The last update is the same in both lists,
        // because of structural sharing. So, only append to one of the lists.
        appendUpdateToQueue(queue1, update);
        // But we still need to update the `lastUpdate` pointer of queue2.
        queue2.lastUpdate = update;
      }
    }

    {
      if (fiber.tag === ClassComponent && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
        warningWithoutStack$1(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
        didWarnUpdateInsideUpdate = true;
      }
    }
  }

  function enqueueCapturedUpdate(workInProgress, update) {
    // Captured updates go into a separate list, and only on the work-in-
    // progress queue.
    var workInProgressQueue = workInProgress.updateQueue;
    if (workInProgressQueue === null) {
      workInProgressQueue = workInProgress.updateQueue = createUpdateQueue(workInProgress.memoizedState);
    } else {
      // TODO: I put this here rather than createWorkInProgress so that we don't
      // clone the queue unnecessarily. There's probably a better way to
      // structure this.
      workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
    }

    // Append the update to the end of the list.
    if (workInProgressQueue.lastCapturedUpdate === null) {
      // This is the first render phase update
      workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update;
    } else {
      workInProgressQueue.lastCapturedUpdate.next = update;
      workInProgressQueue.lastCapturedUpdate = update;
    }
  }

  function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
    var current = workInProgress.alternate;
    if (current !== null) {
      // If the work-in-progress queue is equal to the current queue,
      // we need to clone it first.
      if (queue === current.updateQueue) {
        queue = workInProgress.updateQueue = cloneUpdateQueue(queue);
      }
    }
    return queue;
  }

  function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
    switch (update.tag) {
      case ReplaceState:
        {
          var _payload = update.payload;
          if (typeof _payload === 'function') {
            // Updater function
            {
              enterDisallowedContextReadInDEV();
              if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
                _payload.call(instance, prevState, nextProps);
              }
            }
            var nextState = _payload.call(instance, prevState, nextProps);
            {
              exitDisallowedContextReadInDEV();
            }
            return nextState;
          }
          // State object
          return _payload;
        }
      case CaptureUpdate:
        {
          workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
        }
      // Intentional fallthrough
      case UpdateState:
        {
          var _payload2 = update.payload;
          var partialState = void 0;
          if (typeof _payload2 === 'function') {
            // Updater function
            {
              enterDisallowedContextReadInDEV();
              if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
                _payload2.call(instance, prevState, nextProps);
              }
            }
            partialState = _payload2.call(instance, prevState, nextProps);
            {
              exitDisallowedContextReadInDEV();
            }
          } else {
            // Partial state object
            partialState = _payload2;
          }
          if (partialState === null || partialState === undefined) {
            // Null and undefined are treated as no-ops.
            return prevState;
          }
          // Merge the partial state and the previous state.
          return _assign({}, prevState, partialState);
        }
      case ForceUpdate:
        {
          hasForceUpdate = true;
          return prevState;
        }
    }
    return prevState;
  }

  function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) {
    hasForceUpdate = false;

    queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);

    {
      currentlyProcessingQueue = queue;
    }

    // These values may change as we process the queue.
    var newBaseState = queue.baseState;
    var newFirstUpdate = null;
    var newExpirationTime = NoWork;

    // Iterate through the list of updates to compute the result.
    var update = queue.firstUpdate;
    var resultState = newBaseState;
    while (update !== null) {
      var updateExpirationTime = update.expirationTime;
      if (updateExpirationTime < renderExpirationTime) {
        // This update does not have sufficient priority. Skip it.
        if (newFirstUpdate === null) {
          // This is the first skipped update. It will be the first update in
          // the new list.
          newFirstUpdate = update;
          // Since this is the first update that was skipped, the current result
          // is the new base state.
          newBaseState = resultState;
        }
        // Since this update will remain in the list, update the remaining
        // expiration time.
        if (newExpirationTime < updateExpirationTime) {
          newExpirationTime = updateExpirationTime;
        }
      } else {
        // This update does have sufficient priority. Process it and compute
        // a new result.
        resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
        var _callback = update.callback;
        if (_callback !== null) {
          workInProgress.effectTag |= Callback;
          // Set this to null, in case it was mutated during an aborted render.
          update.nextEffect = null;
          if (queue.lastEffect === null) {
            queue.firstEffect = queue.lastEffect = update;
          } else {
            queue.lastEffect.nextEffect = update;
            queue.lastEffect = update;
          }
        }
      }
      // Continue to the next update.
      update = update.next;
    }

    // Separately, iterate though the list of captured updates.
    var newFirstCapturedUpdate = null;
    update = queue.firstCapturedUpdate;
    while (update !== null) {
      var _updateExpirationTime = update.expirationTime;
      if (_updateExpirationTime < renderExpirationTime) {
        // This update does not have sufficient priority. Skip it.
        if (newFirstCapturedUpdate === null) {
          // This is the first skipped captured update. It will be the first
          // update in the new list.
          newFirstCapturedUpdate = update;
          // If this is the first update that was skipped, the current result is
          // the new base state.
          if (newFirstUpdate === null) {
            newBaseState = resultState;
          }
        }
        // Since this update will remain in the list, update the remaining
        // expiration time.
        if (newExpirationTime < _updateExpirationTime) {
          newExpirationTime = _updateExpirationTime;
        }
      } else {
        // This update does have sufficient priority. Process it and compute
        // a new result.
        resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
        var _callback2 = update.callback;
        if (_callback2 !== null) {
          workInProgress.effectTag |= Callback;
          // Set this to null, in case it was mutated during an aborted render.
          update.nextEffect = null;
          if (queue.lastCapturedEffect === null) {
            queue.firstCapturedEffect = queue.lastCapturedEffect = update;
          } else {
            queue.lastCapturedEffect.nextEffect = update;
            queue.lastCapturedEffect = update;
          }
        }
      }
      update = update.next;
    }

    if (newFirstUpdate === null) {
      queue.lastUpdate = null;
    }
    if (newFirstCapturedUpdate === null) {
      queue.lastCapturedUpdate = null;
    } else {
      workInProgress.effectTag |= Callback;
    }
    if (newFirstUpdate === null && newFirstCapturedUpdate === null) {
      // We processed every update, without skipping. That means the new base
      // state is the same as the result state.
      newBaseState = resultState;
    }

    queue.baseState = newBaseState;
    queue.firstUpdate = newFirstUpdate;
    queue.firstCapturedUpdate = newFirstCapturedUpdate;

    // Set the remaining expiration time to be whatever is remaining in the queue.
    // This should be fine because the only two other things that contribute to
    // expiration time are props and context. We're already in the middle of the
    // begin phase by the time we start processing the queue, so we've already
    // dealt with the props. Context in components that specify
    // shouldComponentUpdate is tricky; but we'll have to account for
    // that regardless.
    workInProgress.expirationTime = newExpirationTime;
    workInProgress.memoizedState = resultState;

    {
      currentlyProcessingQueue = null;
    }
  }

  function callCallback(callback, context) {
    !(typeof callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', callback) : void 0;
    callback.call(context);
  }

  function resetHasForceUpdateBeforeProcessing() {
    hasForceUpdate = false;
  }

  function checkHasForceUpdateAfterProcessing() {
    return hasForceUpdate;
  }

  function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) {
    // If the finished render included captured updates, and there are still
    // lower priority updates left over, we need to keep the captured updates
    // in the queue so that they are rebased and not dropped once we process the
    // queue again at the lower priority.
    if (finishedQueue.firstCapturedUpdate !== null) {
      // Join the captured update list to the end of the normal list.
      if (finishedQueue.lastUpdate !== null) {
        finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate;
        finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate;
      }
      // Clear the list of captured updates.
      finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null;
    }

    // Commit the effects
    commitUpdateEffects(finishedQueue.firstEffect, instance);
    finishedQueue.firstEffect = finishedQueue.lastEffect = null;

    commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
    finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
  }

  function commitUpdateEffects(effect, instance) {
    while (effect !== null) {
      var _callback3 = effect.callback;
      if (_callback3 !== null) {
        effect.callback = null;
        callCallback(_callback3, instance);
      }
      effect = effect.nextEffect;
    }
  }

  function createCapturedValue(value, source) {
    // If the value is an error, call this function immediately after it is thrown
    // so the stack is accurate.
    return {
      value: value,
      source: source,
      stack: getStackByFiberInDevAndProd(source)
    };
  }

  function markUpdate(workInProgress) {
    // Tag the fiber with an update effect. This turns a Placement into
    // a PlacementAndUpdate.
    workInProgress.effectTag |= Update;
  }

  function markRef$1(workInProgress) {
    workInProgress.effectTag |= Ref;
  }

  var appendAllChildren = void 0;
  var updateHostContainer = void 0;
  var updateHostComponent$1 = void 0;
  var updateHostText$1 = void 0;
  if (supportsMutation) {
    // Mutation mode

    appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
      // We only have the top Fiber that was created but we need recurse down its
      // children to find all the terminal nodes.
      var node = workInProgress.child;
      while (node !== null) {
        if (node.tag === HostComponent || node.tag === HostText) {
          appendInitialChild(parent, node.stateNode);
        } else if (node.tag === HostPortal) {
          // If we have a portal child, then we don't want to traverse
          // down its children. Instead, we'll get insertions from each child in
          // the portal directly.
        } else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }
        if (node === workInProgress) {
          return;
        }
        while (node.sibling === null) {
          if (node.return === null || node.return === workInProgress) {
            return;
          }
          node = node.return;
        }
        node.sibling.return = node.return;
        node = node.sibling;
      }
    };

    updateHostContainer = function (workInProgress) {
      // Noop
    };
    updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
      // If we have an alternate, that means this is an update and we need to
      // schedule a side-effect to do the updates.
      var oldProps = current.memoizedProps;
      if (oldProps === newProps) {
        // In mutation mode, this is sufficient for a bailout because
        // we won't touch this node even if children changed.
        return;
      }

      // If we get updated because one of our children updated, we don't
      // have newProps so we'll have to reuse them.
      // TODO: Split the update API as separate for the props vs. children.
      // Even better would be if children weren't special cased at all tho.
      var instance = workInProgress.stateNode;
      var currentHostContext = getHostContext();
      // TODO: Experiencing an error where oldProps is null. Suggests a host
      // component is hitting the resume path. Figure out why. Possibly
      // related to `hidden`.
      var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
      // TODO: Type this specific to this type of component.
      workInProgress.updateQueue = updatePayload;
      // If the update payload indicates that there is a change or if there
      // is a new ref we mark this as an update. All the work is done in commitWork.
      if (updatePayload) {
        markUpdate(workInProgress);
      }
    };
    updateHostText$1 = function (current, workInProgress, oldText, newText) {
      // If the text differs, mark it as an update. All the work in done in commitWork.
      if (oldText !== newText) {
        markUpdate(workInProgress);
      }
    };
  } else if (supportsPersistence) {
    // Persistent host tree mode

    appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
      // We only have the top Fiber that was created but we need recurse down its
      // children to find all the terminal nodes.
      var node = workInProgress.child;
      while (node !== null) {
        // eslint-disable-next-line no-labels
        branches: if (node.tag === HostComponent) {
          var instance = node.stateNode;
          if (needsVisibilityToggle) {
            var props = node.memoizedProps;
            var type = node.type;
            if (isHidden) {
              // This child is inside a timed out tree. Hide it.
              instance = cloneHiddenInstance(instance, type, props, node);
            } else {
              // This child was previously inside a timed out tree. If it was not
              // updated during this render, it may need to be unhidden. Clone
              // again to be sure.
              instance = cloneUnhiddenInstance(instance, type, props, node);
            }
            node.stateNode = instance;
          }
          appendInitialChild(parent, instance);
        } else if (node.tag === HostText) {
          var _instance = node.stateNode;
          if (needsVisibilityToggle) {
            var text = node.memoizedProps;
            var rootContainerInstance = getRootHostContainer();
            var currentHostContext = getHostContext();
            if (isHidden) {
              _instance = createHiddenTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
            } else {
              _instance = createTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
            }
            node.stateNode = _instance;
          }
          appendInitialChild(parent, _instance);
        } else if (node.tag === HostPortal) {
          // If we have a portal child, then we don't want to traverse
          // down its children. Instead, we'll get insertions from each child in
          // the portal directly.
        } else if (node.tag === SuspenseComponent) {
          var current = node.alternate;
          if (current !== null) {
            var oldState = current.memoizedState;
            var newState = node.memoizedState;
            var oldIsHidden = oldState !== null;
            var newIsHidden = newState !== null;
            if (oldIsHidden !== newIsHidden) {
              // The placeholder either just timed out or switched back to the normal
              // children after having previously timed out. Toggle the visibility of
              // the direct host children.
              var primaryChildParent = newIsHidden ? node.child : node;
              if (primaryChildParent !== null) {
                appendAllChildren(parent, primaryChildParent, true, newIsHidden);
              }
              // eslint-disable-next-line no-labels
              break branches;
            }
          }
          if (node.child !== null) {
            // Continue traversing like normal
            node.child.return = node;
            node = node.child;
            continue;
          }
        } else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }
        // $FlowFixMe This is correct but Flow is confused by the labeled break.
        node = node;
        if (node === workInProgress) {
          return;
        }
        while (node.sibling === null) {
          if (node.return === null || node.return === workInProgress) {
            return;
          }
          node = node.return;
        }
        node.sibling.return = node.return;
        node = node.sibling;
      }
    };

    // An unfortunate fork of appendAllChildren because we have two different parent types.
    var appendAllChildrenToContainer = function (containerChildSet, workInProgress, needsVisibilityToggle, isHidden) {
      // We only have the top Fiber that was created but we need recurse down its
      // children to find all the terminal nodes.
      var node = workInProgress.child;
      while (node !== null) {
        // eslint-disable-next-line no-labels
        branches: if (node.tag === HostComponent) {
          var instance = node.stateNode;
          if (needsVisibilityToggle) {
            var props = node.memoizedProps;
            var type = node.type;
            if (isHidden) {
              // This child is inside a timed out tree. Hide it.
              instance = cloneHiddenInstance(instance, type, props, node);
            } else {
              // This child was previously inside a timed out tree. If it was not
              // updated during this render, it may need to be unhidden. Clone
              // again to be sure.
              instance = cloneUnhiddenInstance(instance, type, props, node);
            }
            node.stateNode = instance;
          }
          appendChildToContainerChildSet(containerChildSet, instance);
        } else if (node.tag === HostText) {
          var _instance2 = node.stateNode;
          if (needsVisibilityToggle) {
            var text = node.memoizedProps;
            var rootContainerInstance = getRootHostContainer();
            var currentHostContext = getHostContext();
            if (isHidden) {
              _instance2 = createHiddenTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
            } else {
              _instance2 = createTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
            }
            node.stateNode = _instance2;
          }
          appendChildToContainerChildSet(containerChildSet, _instance2);
        } else if (node.tag === HostPortal) {
          // If we have a portal child, then we don't want to traverse
          // down its children. Instead, we'll get insertions from each child in
          // the portal directly.
        } else if (node.tag === SuspenseComponent) {
          var current = node.alternate;
          if (current !== null) {
            var oldState = current.memoizedState;
            var newState = node.memoizedState;
            var oldIsHidden = oldState !== null;
            var newIsHidden = newState !== null;
            if (oldIsHidden !== newIsHidden) {
              // The placeholder either just timed out or switched back to the normal
              // children after having previously timed out. Toggle the visibility of
              // the direct host children.
              var primaryChildParent = newIsHidden ? node.child : node;
              if (primaryChildParent !== null) {
                appendAllChildrenToContainer(containerChildSet, primaryChildParent, true, newIsHidden);
              }
              // eslint-disable-next-line no-labels
              break branches;
            }
          }
          if (node.child !== null) {
            // Continue traversing like normal
            node.child.return = node;
            node = node.child;
            continue;
          }
        } else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }
        // $FlowFixMe This is correct but Flow is confused by the labeled break.
        node = node;
        if (node === workInProgress) {
          return;
        }
        while (node.sibling === null) {
          if (node.return === null || node.return === workInProgress) {
            return;
          }
          node = node.return;
        }
        node.sibling.return = node.return;
        node = node.sibling;
      }
    };
    updateHostContainer = function (workInProgress) {
      var portalOrRoot = workInProgress.stateNode;
      var childrenUnchanged = workInProgress.firstEffect === null;
      if (childrenUnchanged) {
        // No changes, just reuse the existing instance.
      } else {
        var container = portalOrRoot.containerInfo;
        var newChildSet = createContainerChildSet(container);
        // If children might have changed, we have to add them all to the set.
        appendAllChildrenToContainer(newChildSet, workInProgress, false, false);
        portalOrRoot.pendingChildren = newChildSet;
        // Schedule an update on the container to swap out the container.
        markUpdate(workInProgress);
        finalizeContainerChildren(container, newChildSet);
      }
    };
    updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
      var currentInstance = current.stateNode;
      var oldProps = current.memoizedProps;
      // If there are no effects associated with this node, then none of our children had any updates.
      // This guarantees that we can reuse all of them.
      var childrenUnchanged = workInProgress.firstEffect === null;
      if (childrenUnchanged && oldProps === newProps) {
        // No changes, just reuse the existing instance.
        // Note that this might release a previous clone.
        workInProgress.stateNode = currentInstance;
        return;
      }
      var recyclableInstance = workInProgress.stateNode;
      var currentHostContext = getHostContext();
      var updatePayload = null;
      if (oldProps !== newProps) {
        updatePayload = prepareUpdate(recyclableInstance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
      }
      if (childrenUnchanged && updatePayload === null) {
        // No changes, just reuse the existing instance.
        // Note that this might release a previous clone.
        workInProgress.stateNode = currentInstance;
        return;
      }
      var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);
      if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance, currentHostContext)) {
        markUpdate(workInProgress);
      }
      workInProgress.stateNode = newInstance;
      if (childrenUnchanged) {
        // If there are no other effects in this tree, we need to flag this node as having one.
        // Even though we're not going to use it for anything.
        // Otherwise parents won't know that there are new children to propagate upwards.
        markUpdate(workInProgress);
      } else {
        // If children might have changed, we have to add them all to the set.
        appendAllChildren(newInstance, workInProgress, false, false);
      }
    };
    updateHostText$1 = function (current, workInProgress, oldText, newText) {
      if (oldText !== newText) {
        // If the text content differs, we'll create a new text instance for it.
        var rootContainerInstance = getRootHostContainer();
        var currentHostContext = getHostContext();
        workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);
        // We'll have to mark it as having an effect, even though we won't use the effect for anything.
        // This lets the parents know that at least one of their children has changed.
        markUpdate(workInProgress);
      }
    };
  } else {
    // No host operations
    updateHostContainer = function (workInProgress) {
      // Noop
    };
    updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
      // Noop
    };
    updateHostText$1 = function (current, workInProgress, oldText, newText) {
      // Noop
    };
  }

  function completeWork(current, workInProgress, renderExpirationTime) {
    var newProps = workInProgress.pendingProps;

    switch (workInProgress.tag) {
      case IndeterminateComponent:
        break;
      case LazyComponent:
        break;
      case SimpleMemoComponent:
      case FunctionComponent:
        break;
      case ClassComponent:
        {
          var Component = workInProgress.type;
          if (isContextProvider(Component)) {
            popContext(workInProgress);
          }
          break;
        }
      case HostRoot:
        {
          popHostContainer(workInProgress);
          popTopLevelContextObject(workInProgress);
          var fiberRoot = workInProgress.stateNode;
          if (fiberRoot.pendingContext) {
            fiberRoot.context = fiberRoot.pendingContext;
            fiberRoot.pendingContext = null;
          }
          if (current === null || current.child === null) {
            // If we hydrated, pop so that we can delete any remaining children
            // that weren't hydrated.
            popHydrationState(workInProgress);
            // This resets the hacky state to fix isMounted before committing.
            // TODO: Delete this when we delete isMounted and findDOMNode.
            workInProgress.effectTag &= ~Placement;
          }
          updateHostContainer(workInProgress);
          break;
        }
      case HostComponent:
        {
          popHostContext(workInProgress);
          var rootContainerInstance = getRootHostContainer();
          var type = workInProgress.type;
          if (current !== null && workInProgress.stateNode != null) {
            updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);

            if (current.ref !== workInProgress.ref) {
              markRef$1(workInProgress);
            }
          } else {
            if (!newProps) {
              !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
              // This can happen when we abort work.
              break;
            }

            var currentHostContext = getHostContext();
            // TODO: Move createInstance to beginWork and keep it on a context
            // "stack" as the parent. Then append children as we go in beginWork
            // or completeWork depending on we want to add then top->down or
            // bottom->up. Top->down is faster in IE11.
            var wasHydrated = popHydrationState(workInProgress);
            if (wasHydrated) {
              // TODO: Move this and createInstance step into the beginPhase
              // to consolidate.
              if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
                // If changes to the hydrated node needs to be applied at the
                // commit-phase we mark this as such.
                markUpdate(workInProgress);
              }
            } else {
              var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);

              appendAllChildren(instance, workInProgress, false, false);

              // Certain renderers require commit-time effects for initial mount.
              // (eg DOM renderer supports auto-focus for certain elements).
              // Make sure such renderers get scheduled for later work.
              if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance, currentHostContext)) {
                markUpdate(workInProgress);
              }
              workInProgress.stateNode = instance;
            }

            if (workInProgress.ref !== null) {
              // If there is a ref on a host node we need to schedule a callback
              markRef$1(workInProgress);
            }
          }
          break;
        }
      case HostText:
        {
          var newText = newProps;
          if (current && workInProgress.stateNode != null) {
            var oldText = current.memoizedProps;
            // If we have an alternate, that means this is an update and we need
            // to schedule a side-effect to do the updates.
            updateHostText$1(current, workInProgress, oldText, newText);
          } else {
            if (typeof newText !== 'string') {
              !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
              // This can happen when we abort work.
            }
            var _rootContainerInstance = getRootHostContainer();
            var _currentHostContext = getHostContext();
            var _wasHydrated = popHydrationState(workInProgress);
            if (_wasHydrated) {
              if (prepareToHydrateHostTextInstance(workInProgress)) {
                markUpdate(workInProgress);
              }
            } else {
              workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
            }
          }
          break;
        }
      case ForwardRef:
        break;
      case SuspenseComponent:
        {
          var nextState = workInProgress.memoizedState;
          if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
            // Something suspended. Re-render with the fallback children.
            workInProgress.expirationTime = renderExpirationTime;
            // Do not reset the effect list.
            return workInProgress;
          }

          var nextDidTimeout = nextState !== null;
          var prevDidTimeout = current !== null && current.memoizedState !== null;

          if (current !== null && !nextDidTimeout && prevDidTimeout) {
            // We just switched from the fallback to the normal children. Delete
            // the fallback.
            // TODO: Would it be better to store the fallback fragment on
            var currentFallbackChild = current.child.sibling;
            if (currentFallbackChild !== null) {
              // Deletions go at the beginning of the return fiber's effect list
              var first = workInProgress.firstEffect;
              if (first !== null) {
                workInProgress.firstEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = first;
              } else {
                workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = null;
              }
              currentFallbackChild.effectTag = Deletion;
            }
          }

          if (nextDidTimeout || prevDidTimeout) {
            // If the children are hidden, or if they were previous hidden, schedule
            // an effect to toggle their visibility. This is also used to attach a
            // retry listener to the promise.
            workInProgress.effectTag |= Update;
          }
          break;
        }
      case Fragment:
        break;
      case Mode:
        break;
      case Profiler:
        break;
      case HostPortal:
        popHostContainer(workInProgress);
        updateHostContainer(workInProgress);
        break;
      case ContextProvider:
        // Pop provider fiber
        popProvider(workInProgress);
        break;
      case ContextConsumer:
        break;
      case MemoComponent:
        break;
      case IncompleteClassComponent:
        {
          // Same as class component case. I put it down here so that the tags are
          // sequential to ensure this switch is compiled to a jump table.
          var _Component = workInProgress.type;
          if (isContextProvider(_Component)) {
            popContext(workInProgress);
          }
          break;
        }
      case DehydratedSuspenseComponent:
        {
          if (enableSuspenseServerRenderer) {
            if (current === null) {
              var _wasHydrated2 = popHydrationState(workInProgress);
              !_wasHydrated2 ? invariant(false, 'A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.') : void 0;
              skipPastDehydratedSuspenseInstance(workInProgress);
            } else if ((workInProgress.effectTag & DidCapture) === NoEffect) {
              // This boundary did not suspend so it's now hydrated.
              // To handle any future suspense cases, we're going to now upgrade it
              // to a Suspense component. We detach it from the existing current fiber.
              current.alternate = null;
              workInProgress.alternate = null;
              workInProgress.tag = SuspenseComponent;
              workInProgress.memoizedState = null;
              workInProgress.stateNode = null;
            }
          }
          break;
        }
      default:
        invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
    }

    return null;
  }

  function shouldCaptureSuspense(workInProgress) {
    // In order to capture, the Suspense component must have a fallback prop.
    if (workInProgress.memoizedProps.fallback === undefined) {
      return false;
    }
    // If it was the primary children that just suspended, capture and render the
    // fallback. Otherwise, don't capture and bubble to the next boundary.
    var nextState = workInProgress.memoizedState;
    return nextState === null;
  }

  // This module is forked in different environments.
  // By default, return `true` to log errors to the console.
  // Forks can return `false` if this isn't desirable.
  function showErrorDialog(capturedError) {
    return true;
  }

  function logCapturedError(capturedError) {
    var logError = showErrorDialog(capturedError);

    // Allow injected showErrorDialog() to prevent default console.error logging.
    // This enables renderers like ReactNative to better manage redbox behavior.
    if (logError === false) {
      return;
    }

    var error = capturedError.error;
    {
      var componentName = capturedError.componentName,
          componentStack = capturedError.componentStack,
          errorBoundaryName = capturedError.errorBoundaryName,
          errorBoundaryFound = capturedError.errorBoundaryFound,
          willRetry = capturedError.willRetry;

      // Browsers support silencing uncaught errors by calling
      // `preventDefault()` in window `error` handler.
      // We record this information as an expando on the error.

      if (error != null && error._suppressLogging) {
        if (errorBoundaryFound && willRetry) {
          // The error is recoverable and was silenced.
          // Ignore it and don't print the stack addendum.
          // This is handy for testing error boundaries without noise.
          return;
        }
        // The error is fatal. Since the silencing might have
        // been accidental, we'll surface it anyway.
        // However, the browser would have silenced the original error
        // so we'll print it first, and then print the stack addendum.
        console.error(error);
        // For a more detailed description of this block, see:
        // https://github.com/facebook/react/pull/13384
      }

      var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:';

      var errorBoundaryMessage = void 0;
      // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
      if (errorBoundaryFound && errorBoundaryName) {
        if (willRetry) {
          errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.');
        } else {
          errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\n' + 'Recreating the tree from scratch failed so React will unmount the tree.';
        }
      } else {
        errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
      }
      var combinedMessage = '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage);

      // In development, we provide our own message with just the component stack.
      // We don't include the original error message and JS stack because the browser
      // has already printed it. Even if the application swallows the error, it is still
      // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
      console.error(combinedMessage);
    }
  }

  var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
  {
    didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
  }

  var PossiblyWeakSet$1 = typeof WeakSet === 'function' ? WeakSet : Set;

  function logError(boundary, errorInfo) {
    var source = errorInfo.source;
    var stack = errorInfo.stack;
    if (stack === null && source !== null) {
      stack = getStackByFiberInDevAndProd(source);
    }

    var capturedError = {
      componentName: source !== null ? getComponentName(source.type) : null,
      componentStack: stack !== null ? stack : '',
      error: errorInfo.value,
      errorBoundary: null,
      errorBoundaryName: null,
      errorBoundaryFound: false,
      willRetry: false
    };

    if (boundary !== null && boundary.tag === ClassComponent) {
      capturedError.errorBoundary = boundary.stateNode;
      capturedError.errorBoundaryName = getComponentName(boundary.type);
      capturedError.errorBoundaryFound = true;
      capturedError.willRetry = true;
    }

    try {
      logCapturedError(capturedError);
    } catch (e) {
      // This method must not throw, or React internal state will get messed up.
      // If console.error is overridden, or logCapturedError() shows a dialog that throws,
      // we want to report this error outside of the normal stack as a last resort.
      // https://github.com/facebook/react/issues/13188
      setTimeout(function () {
        throw e;
      });
    }
  }

  var callComponentWillUnmountWithTimer = function (current$$1, instance) {
    startPhaseTimer(current$$1, 'componentWillUnmount');
    instance.props = current$$1.memoizedProps;
    instance.state = current$$1.memoizedState;
    instance.componentWillUnmount();
    stopPhaseTimer();
  };

  // Capture errors so they don't interrupt unmounting.
  function safelyCallComponentWillUnmount(current$$1, instance) {
    {
      invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);
      if (hasCaughtError()) {
        var unmountError = clearCaughtError();
        captureCommitPhaseError(current$$1, unmountError);
      }
    }
  }

  function safelyDetachRef(current$$1) {
    var ref = current$$1.ref;
    if (ref !== null) {
      if (typeof ref === 'function') {
        {
          invokeGuardedCallback(null, ref, null, null);
          if (hasCaughtError()) {
            var refError = clearCaughtError();
            captureCommitPhaseError(current$$1, refError);
          }
        }
      } else {
        ref.current = null;
      }
    }
  }

  function safelyCallDestroy(current$$1, destroy) {
    {
      invokeGuardedCallback(null, destroy, null);
      if (hasCaughtError()) {
        var error = clearCaughtError();
        captureCommitPhaseError(current$$1, error);
      }
    }
  }

  function commitBeforeMutationLifeCycles(current$$1, finishedWork) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork);
          return;
        }
      case ClassComponent:
        {
          if (finishedWork.effectTag & Snapshot) {
            if (current$$1 !== null) {
              var prevProps = current$$1.memoizedProps;
              var prevState = current$$1.memoizedState;
              startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
              var instance = finishedWork.stateNode;
              // We could update instance props and state here,
              // but instead we rely on them being set during last render.
              // TODO: revisit this when we implement resuming.
              {
                if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                  !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                  !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                }
              }
              var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
              {
                var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
                if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
                  didWarnSet.add(finishedWork.type);
                  warningWithoutStack$1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
                }
              }
              instance.__reactInternalSnapshotBeforeUpdate = snapshot;
              stopPhaseTimer();
            }
          }
          return;
        }
      case HostRoot:
      case HostComponent:
      case HostText:
      case HostPortal:
      case IncompleteClassComponent:
        // Nothing to do for these component types
        return;
      default:
        {
          invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
        }
    }
  }

  function commitHookEffectList(unmountTag, mountTag, finishedWork) {
    var updateQueue = finishedWork.updateQueue;
    var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
    if (lastEffect !== null) {
      var firstEffect = lastEffect.next;
      var effect = firstEffect;
      do {
        if ((effect.tag & unmountTag) !== NoEffect$1) {
          // Unmount
          var destroy = effect.destroy;
          effect.destroy = undefined;
          if (destroy !== undefined) {
            destroy();
          }
        }
        if ((effect.tag & mountTag) !== NoEffect$1) {
          // Mount
          var create = effect.create;
          effect.destroy = create();

          {
            var _destroy = effect.destroy;
            if (_destroy !== undefined && typeof _destroy !== 'function') {
              var addendum = void 0;
              if (_destroy === null) {
                addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
              } else if (typeof _destroy.then === 'function') {
                addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + '  async function fetchData() {\n' + '    // You can await here\n' + '    const response = await MyAPI.getData(someId);\n' + '    // ...\n' + '  }\n' + '  fetchData();\n' + '}, [someId]); // Or [] if effect doesn\'t need props or state\n\n' + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
              } else {
                addendum = ' You returned: ' + _destroy;
              }
              warningWithoutStack$1(false, 'An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
            }
          }
        }
        effect = effect.next;
      } while (effect !== firstEffect);
    }
  }

  function commitPassiveHookEffects(finishedWork) {
    commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork);
    commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
  }

  function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          commitHookEffectList(UnmountLayout, MountLayout, finishedWork);
          break;
        }
      case ClassComponent:
        {
          var instance = finishedWork.stateNode;
          if (finishedWork.effectTag & Update) {
            if (current$$1 === null) {
              startPhaseTimer(finishedWork, 'componentDidMount');
              // We could update instance props and state here,
              // but instead we rely on them being set during last render.
              // TODO: revisit this when we implement resuming.
              {
                if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                  !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                  !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                }
              }
              instance.componentDidMount();
              stopPhaseTimer();
            } else {
              var prevProps = finishedWork.elementType === finishedWork.type ? current$$1.memoizedProps : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps);
              var prevState = current$$1.memoizedState;
              startPhaseTimer(finishedWork, 'componentDidUpdate');
              // We could update instance props and state here,
              // but instead we rely on them being set during last render.
              // TODO: revisit this when we implement resuming.
              {
                if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                  !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                  !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                }
              }
              instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
              stopPhaseTimer();
            }
          }
          var updateQueue = finishedWork.updateQueue;
          if (updateQueue !== null) {
            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
              }
            }
            // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.
            commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime);
          }
          return;
        }
      case HostRoot:
        {
          var _updateQueue = finishedWork.updateQueue;
          if (_updateQueue !== null) {
            var _instance = null;
            if (finishedWork.child !== null) {
              switch (finishedWork.child.tag) {
                case HostComponent:
                  _instance = getPublicInstance(finishedWork.child.stateNode);
                  break;
                case ClassComponent:
                  _instance = finishedWork.child.stateNode;
                  break;
              }
            }
            commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime);
          }
          return;
        }
      case HostComponent:
        {
          var _instance2 = finishedWork.stateNode;

          // Renderers may schedule work to be done after host components are mounted
          // (eg DOM renderer may schedule auto-focus for inputs and form controls).
          // These effects should only be committed when components are first mounted,
          // aka when there is no current/alternate.
          if (current$$1 === null && finishedWork.effectTag & Update) {
            var type = finishedWork.type;
            var props = finishedWork.memoizedProps;
            commitMount(_instance2, type, props, finishedWork);
          }

          return;
        }
      case HostText:
        {
          // We have no life-cycles associated with text.
          return;
        }
      case HostPortal:
        {
          // We have no life-cycles associated with portals.
          return;
        }
      case Profiler:
        {
          if (enableProfilerTimer) {
            var onRender = finishedWork.memoizedProps.onRender;

            if (enableSchedulerTracing) {
              onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
            } else {
              onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime());
            }
          }
          return;
        }
      case SuspenseComponent:
        break;
      case IncompleteClassComponent:
        break;
      default:
        {
          invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
        }
    }
  }

  function hideOrUnhideAllChildren(finishedWork, isHidden) {
    if (supportsMutation) {
      // We only have the top Fiber that was inserted but we need to recurse down its
      var node = finishedWork;
      while (true) {
        if (node.tag === HostComponent) {
          var instance = node.stateNode;
          if (isHidden) {
            hideInstance(instance);
          } else {
            unhideInstance(node.stateNode, node.memoizedProps);
          }
        } else if (node.tag === HostText) {
          var _instance3 = node.stateNode;
          if (isHidden) {
            hideTextInstance(_instance3);
          } else {
            unhideTextInstance(_instance3, node.memoizedProps);
          }
        } else if (node.tag === SuspenseComponent && node.memoizedState !== null) {
          // Found a nested Suspense component that timed out. Skip over the
          var fallbackChildFragment = node.child.sibling;
          fallbackChildFragment.return = node;
          node = fallbackChildFragment;
          continue;
        } else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }
        if (node === finishedWork) {
          return;
        }
        while (node.sibling === null) {
          if (node.return === null || node.return === finishedWork) {
            return;
          }
          node = node.return;
        }
        node.sibling.return = node.return;
        node = node.sibling;
      }
    }
  }

  function commitAttachRef(finishedWork) {
    var ref = finishedWork.ref;
    if (ref !== null) {
      var instance = finishedWork.stateNode;
      var instanceToUse = void 0;
      switch (finishedWork.tag) {
        case HostComponent:
          instanceToUse = getPublicInstance(instance);
          break;
        default:
          instanceToUse = instance;
      }
      if (typeof ref === 'function') {
        ref(instanceToUse);
      } else {
        {
          if (!ref.hasOwnProperty('current')) {
            warningWithoutStack$1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
          }
        }

        ref.current = instanceToUse;
      }
    }
  }

  function commitDetachRef(current$$1) {
    var currentRef = current$$1.ref;
    if (currentRef !== null) {
      if (typeof currentRef === 'function') {
        currentRef(null);
      } else {
        currentRef.current = null;
      }
    }
  }

  // User-originating errors (lifecycles and refs) should not interrupt
  // deletion, so don't let them throw. Host-originating errors should
  // interrupt deletion, so it's okay
  function commitUnmount(current$$1) {
    onCommitUnmount(current$$1);

    switch (current$$1.tag) {
      case FunctionComponent:
      case ForwardRef:
      case MemoComponent:
      case SimpleMemoComponent:
        {
          var updateQueue = current$$1.updateQueue;
          if (updateQueue !== null) {
            var lastEffect = updateQueue.lastEffect;
            if (lastEffect !== null) {
              var firstEffect = lastEffect.next;
              var effect = firstEffect;
              do {
                var destroy = effect.destroy;
                if (destroy !== undefined) {
                  safelyCallDestroy(current$$1, destroy);
                }
                effect = effect.next;
              } while (effect !== firstEffect);
            }
          }
          break;
        }
      case ClassComponent:
        {
          safelyDetachRef(current$$1);
          var instance = current$$1.stateNode;
          if (typeof instance.componentWillUnmount === 'function') {
            safelyCallComponentWillUnmount(current$$1, instance);
          }
          return;
        }
      case HostComponent:
        {
          safelyDetachRef(current$$1);
          return;
        }
      case HostPortal:
        {
          // TODO: this is recursive.
          // We are also not using this parent because
          // the portal will get pushed immediately.
          if (supportsMutation) {
            unmountHostComponents(current$$1);
          } else if (supportsPersistence) {
            emptyPortalContainer(current$$1);
          }
          return;
        }
    }
  }

  function commitNestedUnmounts(root) {
    // While we're inside a removed host node we don't want to call
    // removeChild on the inner nodes because they're removed by the top
    // call anyway. We also want to call componentWillUnmount on all
    // composites before this host node is removed from the tree. Therefore
    var node = root;
    while (true) {
      commitUnmount(node);
      // Visit children because they may contain more composite or host nodes.
      // Skip portals because commitUnmount() currently visits them recursively.
      if (node.child !== null && (
      // If we use mutation we drill down into portals using commitUnmount above.
      // If we don't use mutation we drill down into portals here instead.
      !supportsMutation || node.tag !== HostPortal)) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === root) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === root) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  }

  function detachFiber(current$$1) {
    // Cut off the return pointers to disconnect it from the tree. Ideally, we
    // should clear the child pointer of the parent alternate to let this
    // get GC:ed but we don't know which for sure which parent is the current
    // one so we'll settle for GC:ing the subtree of this child. This child
    // itself will be GC:ed when the parent updates the next time.
    current$$1.return = null;
    current$$1.child = null;
    current$$1.memoizedState = null;
    current$$1.updateQueue = null;
    var alternate = current$$1.alternate;
    if (alternate !== null) {
      alternate.return = null;
      alternate.child = null;
      alternate.memoizedState = null;
      alternate.updateQueue = null;
    }
  }

  function emptyPortalContainer(current$$1) {
    if (!supportsPersistence) {
      return;
    }

    var portal = current$$1.stateNode;
    var containerInfo = portal.containerInfo;

    var emptyChildSet = createContainerChildSet(containerInfo);
    replaceContainerChildren(containerInfo, emptyChildSet);
  }

  function commitContainer(finishedWork) {
    if (!supportsPersistence) {
      return;
    }

    switch (finishedWork.tag) {
      case ClassComponent:
        {
          return;
        }
      case HostComponent:
        {
          return;
        }
      case HostText:
        {
          return;
        }
      case HostRoot:
      case HostPortal:
        {
          var portalOrRoot = finishedWork.stateNode;
          var containerInfo = portalOrRoot.containerInfo,
              _pendingChildren = portalOrRoot.pendingChildren;

          replaceContainerChildren(containerInfo, _pendingChildren);
          return;
        }
      default:
        {
          invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
        }
    }
  }

  function getHostParentFiber(fiber) {
    var parent = fiber.return;
    while (parent !== null) {
      if (isHostParent(parent)) {
        return parent;
      }
      parent = parent.return;
    }
    invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
  }

  function isHostParent(fiber) {
    return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
  }

  function getHostSibling(fiber) {
    // We're going to search forward into the tree until we find a sibling host
    // node. Unfortunately, if multiple insertions are done in a row we have to
    // search past them. This leads to exponential search for the next sibling.
    var node = fiber;
    siblings: while (true) {
      // If we didn't find anything, let's try the next sibling.
      while (node.sibling === null) {
        if (node.return === null || isHostParent(node.return)) {
          // If we pop out of the root or hit the parent the fiber we are the
          // last sibling.
          return null;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
      while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedSuspenseComponent) {
        // If it is not host node and, we might have a host node inside it.
        // Try to search down until we find one.
        if (node.effectTag & Placement) {
          // If we don't have a child, try the siblings instead.
          continue siblings;
        }
        // If we don't have a child, try the siblings instead.
        // We also skip portals because they are not part of this host tree.
        if (node.child === null || node.tag === HostPortal) {
          continue siblings;
        } else {
          node.child.return = node;
          node = node.child;
        }
      }
      // Check if this host node is stable or about to be placed.
      if (!(node.effectTag & Placement)) {
        // Found it!
        return node.stateNode;
      }
    }
  }

  function commitPlacement(finishedWork) {
    if (!supportsMutation) {
      return;
    }

    // Recursively insert all host nodes into the parent.
    var parentFiber = getHostParentFiber(finishedWork);

    // Note: these two variables *must* always be updated together.
    var parent = void 0;
    var isContainer = void 0;

    switch (parentFiber.tag) {
      case HostComponent:
        parent = parentFiber.stateNode;
        isContainer = false;
        break;
      case HostRoot:
        parent = parentFiber.stateNode.containerInfo;
        isContainer = true;
        break;
      case HostPortal:
        parent = parentFiber.stateNode.containerInfo;
        isContainer = true;
        break;
      default:
        invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
    }
    if (parentFiber.effectTag & ContentReset) {
      // Reset the text content of the parent before doing any insertions
      resetTextContent(parent);
      // Clear ContentReset from the effect tag
      parentFiber.effectTag &= ~ContentReset;
    }

    var before = getHostSibling(finishedWork);
    // We only have the top Fiber that was inserted but we need to recurse down its
    // children to find all the terminal nodes.
    var node = finishedWork;
    while (true) {
      if (node.tag === HostComponent || node.tag === HostText) {
        if (before) {
          if (isContainer) {
            insertInContainerBefore(parent, node.stateNode, before);
          } else {
            insertBefore(parent, node.stateNode, before);
          }
        } else {
          if (isContainer) {
            appendChildToContainer(parent, node.stateNode);
          } else {
            appendChild(parent, node.stateNode);
          }
        }
      } else if (node.tag === HostPortal) {
        // If the insertion itself is a portal, then we don't want to traverse
        // down its children. Instead, we'll get insertions from each child in
        // the portal directly.
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === finishedWork) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === finishedWork) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  }

  function unmountHostComponents(current$$1) {
    // We only have the top Fiber that was deleted but we need to recurse down its
    var node = current$$1;

    // Each iteration, currentParent is populated with node's host parent if not
    // currentParentIsValid.
    var currentParentIsValid = false;

    // Note: these two variables *must* always be updated together.
    var currentParent = void 0;
    var currentParentIsContainer = void 0;

    while (true) {
      if (!currentParentIsValid) {
        var parent = node.return;
        findParent: while (true) {
          !(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
          switch (parent.tag) {
            case HostComponent:
              currentParent = parent.stateNode;
              currentParentIsContainer = false;
              break findParent;
            case HostRoot:
              currentParent = parent.stateNode.containerInfo;
              currentParentIsContainer = true;
              break findParent;
            case HostPortal:
              currentParent = parent.stateNode.containerInfo;
              currentParentIsContainer = true;
              break findParent;
          }
          parent = parent.return;
        }
        currentParentIsValid = true;
      }

      if (node.tag === HostComponent || node.tag === HostText) {
        commitNestedUnmounts(node);
        // After all the children have unmounted, it is now safe to remove the
        // node from the tree.
        if (currentParentIsContainer) {
          removeChildFromContainer(currentParent, node.stateNode);
        } else {
          removeChild(currentParent, node.stateNode);
        }
        // Don't visit children because we already visited them.
      } else if (enableSuspenseServerRenderer && node.tag === DehydratedSuspenseComponent) {
        // Delete the dehydrated suspense boundary and all of its content.
        if (currentParentIsContainer) {
          clearSuspenseBoundaryFromContainer(currentParent, node.stateNode);
        } else {
          clearSuspenseBoundary(currentParent, node.stateNode);
        }
      } else if (node.tag === HostPortal) {
        if (node.child !== null) {
          // When we go into a portal, it becomes the parent to remove from.
          // We will reassign it back when we pop the portal on the way up.
          currentParent = node.stateNode.containerInfo;
          currentParentIsContainer = true;
          // Visit children because portals might contain host components.
          node.child.return = node;
          node = node.child;
          continue;
        }
      } else {
        commitUnmount(node);
        // Visit children because we may find more host components below.
        if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }
      }
      if (node === current$$1) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === current$$1) {
          return;
        }
        node = node.return;
        if (node.tag === HostPortal) {
          // When we go out of the portal, we need to restore the parent.
          // Since we don't keep a stack of them, we will search for it.
          currentParentIsValid = false;
        }
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  }

  function commitDeletion(current$$1) {
    if (supportsMutation) {
      // Recursively delete all host nodes from the parent.
      // Detach refs and call componentWillUnmount() on the whole subtree.
      unmountHostComponents(current$$1);
    } else {
      // Detach refs and call componentWillUnmount() on the whole subtree.
      commitNestedUnmounts(current$$1);
    }
    detachFiber(current$$1);
  }

  function commitWork(current$$1, finishedWork) {
    if (!supportsMutation) {
      switch (finishedWork.tag) {
        case FunctionComponent:
        case ForwardRef:
        case MemoComponent:
        case SimpleMemoComponent:
          {
            // Note: We currently never use MountMutation, but useLayout uses
            // UnmountMutation.
            commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
            return;
          }
      }

      commitContainer(finishedWork);
      return;
    }

    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case MemoComponent:
      case SimpleMemoComponent:
        {
          // Note: We currently never use MountMutation, but useLayout uses
          // UnmountMutation.
          commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
          return;
        }
      case ClassComponent:
        {
          return;
        }
      case HostComponent:
        {
          var instance = finishedWork.stateNode;
          if (instance != null) {
            // Commit the work prepared earlier.
            var newProps = finishedWork.memoizedProps;
            // For hydration we reuse the update path but we treat the oldProps
            // as the newProps. The updatePayload will contain the real change in
            // this case.
            var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps;
            var type = finishedWork.type;
            // TODO: Type the updateQueue to be specific to host components.
            var updatePayload = finishedWork.updateQueue;
            finishedWork.updateQueue = null;
            if (updatePayload !== null) {
              commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork);
            }
          }
          return;
        }
      case HostText:
        {
          !(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;
          var textInstance = finishedWork.stateNode;
          var newText = finishedWork.memoizedProps;
          // For hydration we reuse the update path but we treat the oldProps
          // as the newProps. The updatePayload will contain the real change in
          // this case.
          var oldText = current$$1 !== null ? current$$1.memoizedProps : newText;
          commitTextUpdate(textInstance, oldText, newText);
          return;
        }
      case HostRoot:
        {
          return;
        }
      case Profiler:
        {
          return;
        }
      case SuspenseComponent:
        {
          var newState = finishedWork.memoizedState;

          var newDidTimeout = void 0;
          var primaryChildParent = finishedWork;
          if (newState === null) {
            newDidTimeout = false;
          } else {
            newDidTimeout = true;
            primaryChildParent = finishedWork.child;
            if (newState.timedOutAt === NoWork) {
              // If the children had not already timed out, record the time.
              // This is used to compute the elapsed time during subsequent
              // attempts to render the children.
              newState.timedOutAt = requestCurrentTime();
            }
          }

          if (primaryChildParent !== null) {
            hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
          }

          // If this boundary just timed out, then it will have a set of thenables.
          // For each thenable, attach a listener so that when it resolves, React
          // attempts to re-render the boundary in the primary (pre-timeout) state.
          var thenables = finishedWork.updateQueue;
          if (thenables !== null) {
            finishedWork.updateQueue = null;
            var retryCache = finishedWork.stateNode;
            if (retryCache === null) {
              retryCache = finishedWork.stateNode = new PossiblyWeakSet$1();
            }
            thenables.forEach(function (thenable) {
              // Memoize using the boundary fiber to prevent redundant listeners.
              var retry = retryTimedOutBoundary.bind(null, finishedWork, thenable);
              if (enableSchedulerTracing) {
                retry = tracing.unstable_wrap(retry);
              }
              if (!retryCache.has(thenable)) {
                retryCache.add(thenable);
                thenable.then(retry, retry);
              }
            });
          }

          return;
        }
      case IncompleteClassComponent:
        {
          return;
        }
      default:
        {
          invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
        }
    }
  }

  function commitResetTextContent(current$$1) {
    if (!supportsMutation) {
      return;
    }
    resetTextContent(current$$1.stateNode);
  }

  var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;

  function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
    var update = createUpdate(expirationTime);
    // Unmount the root by rendering null.
    update.tag = CaptureUpdate;
    // Caution: React DevTools currently depends on this property
    // being called "element".
    update.payload = { element: null };
    var error = errorInfo.value;
    update.callback = function () {
      onUncaughtError(error);
      logError(fiber, errorInfo);
    };
    return update;
  }

  function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
    var update = createUpdate(expirationTime);
    update.tag = CaptureUpdate;
    var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
    if (typeof getDerivedStateFromError === 'function') {
      var error = errorInfo.value;
      update.payload = function () {
        return getDerivedStateFromError(error);
      };
    }

    var inst = fiber.stateNode;
    if (inst !== null && typeof inst.componentDidCatch === 'function') {
      update.callback = function callback() {
        if (typeof getDerivedStateFromError !== 'function') {
          // To preserve the preexisting retry behavior of error boundaries,
          // we keep track of which ones already failed during this batch.
          // This gets reset before we yield back to the browser.
          // TODO: Warn in strict mode if getDerivedStateFromError is
          // not defined.
          markLegacyErrorBoundaryAsFailed(this);
        }
        var error = errorInfo.value;
        var stack = errorInfo.stack;
        logError(fiber, errorInfo);
        this.componentDidCatch(error, {
          componentStack: stack !== null ? stack : ''
        });
        {
          if (typeof getDerivedStateFromError !== 'function') {
            // If componentDidCatch is the only error boundary method defined,
            // then it needs to call setState to recover from errors.
            // If no state update is scheduled then the boundary will swallow the error.
            !(fiber.expirationTime === Sync) ? warningWithoutStack$1(false, '%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown') : void 0;
          }
        }
      };
    }
    return update;
  }

  function attachPingListener(root, renderExpirationTime, thenable) {
    // Attach a listener to the promise to "ping" the root and retry. But
    // only if one does not already exist for the current render expiration
    // time (which acts like a "thread ID" here).
    var pingCache = root.pingCache;
    var threadIDs = void 0;
    if (pingCache === null) {
      pingCache = root.pingCache = new PossiblyWeakMap();
      threadIDs = new Set();
      pingCache.set(thenable, threadIDs);
    } else {
      threadIDs = pingCache.get(thenable);
      if (threadIDs === undefined) {
        threadIDs = new Set();
        pingCache.set(thenable, threadIDs);
      }
    }
    if (!threadIDs.has(renderExpirationTime)) {
      // Memoize using the thread ID to prevent redundant listeners.
      threadIDs.add(renderExpirationTime);
      var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
      if (enableSchedulerTracing) {
        ping = tracing.unstable_wrap(ping);
      }
      thenable.then(ping, ping);
    }
  }

  function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
    // The source fiber did not complete.
    sourceFiber.effectTag |= Incomplete;
    // Its effect list is no longer valid.
    sourceFiber.firstEffect = sourceFiber.lastEffect = null;

    if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
      // This is a thenable.
      var thenable = value;

      // Find the earliest timeout threshold of all the placeholders in the
      // ancestor path. We could avoid this traversal by storing the thresholds on
      // the stack, but we choose not to because we only hit this path if we're
      // IO-bound (i.e. if something suspends). Whereas the stack is used even in
      // the non-IO- bound case.
      var _workInProgress = returnFiber;
      var earliestTimeoutMs = -1;
      var startTimeMs = -1;
      do {
        if (_workInProgress.tag === SuspenseComponent) {
          var current$$1 = _workInProgress.alternate;
          if (current$$1 !== null) {
            var currentState = current$$1.memoizedState;
            if (currentState !== null) {
              // Reached a boundary that already timed out. Do not search
              // any further.
              var timedOutAt = currentState.timedOutAt;
              startTimeMs = expirationTimeToMs(timedOutAt);
              // Do not search any further.
              break;
            }
          }
          var timeoutPropMs = _workInProgress.pendingProps.maxDuration;
          if (typeof timeoutPropMs === 'number') {
            if (timeoutPropMs <= 0) {
              earliestTimeoutMs = 0;
            } else if (earliestTimeoutMs === -1 || timeoutPropMs < earliestTimeoutMs) {
              earliestTimeoutMs = timeoutPropMs;
            }
          }
        }
        // If there is a DehydratedSuspenseComponent we don't have to do anything because
        // if something suspends inside it, we will simply leave that as dehydrated. It
        // will never timeout.
        _workInProgress = _workInProgress.return;
      } while (_workInProgress !== null);

      // Schedule the nearest Suspense to re-render the timed out view.
      _workInProgress = returnFiber;
      do {
        if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress)) {
          // Found the nearest boundary.

          // Stash the promise on the boundary fiber. If the boundary times out, we'll
          var thenables = _workInProgress.updateQueue;
          if (thenables === null) {
            var updateQueue = new Set();
            updateQueue.add(thenable);
            _workInProgress.updateQueue = updateQueue;
          } else {
            thenables.add(thenable);
          }

          // If the boundary is outside of concurrent mode, we should *not*
          // suspend the commit. Pretend as if the suspended component rendered
          // null and keep rendering. In the commit phase, we'll schedule a
          // subsequent synchronous update to re-render the Suspense.
          //
          // Note: It doesn't matter whether the component that suspended was
          // inside a concurrent mode tree. If the Suspense is outside of it, we
          // should *not* suspend the commit.
          if ((_workInProgress.mode & ConcurrentMode) === NoEffect) {
            _workInProgress.effectTag |= DidCapture;

            // We're going to commit this fiber even though it didn't complete.
            // But we shouldn't call any lifecycle methods or callbacks. Remove
            // all lifecycle effect tags.
            sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);

            if (sourceFiber.tag === ClassComponent) {
              var currentSourceFiber = sourceFiber.alternate;
              if (currentSourceFiber === null) {
                // This is a new mount. Change the tag so it's not mistaken for a
                // completed class component. For example, we should not call
                // componentWillUnmount if it is deleted.
                sourceFiber.tag = IncompleteClassComponent;
              } else {
                // When we try rendering again, we should not reuse the current fiber,
                // since it's known to be in an inconsistent state. Use a force updte to
                // prevent a bail out.
                var update = createUpdate(Sync);
                update.tag = ForceUpdate;
                enqueueUpdate(sourceFiber, update);
              }
            }

            // The source fiber did not complete. Mark it with Sync priority to
            // indicate that it still has pending work.
            sourceFiber.expirationTime = Sync;

            // Exit without suspending.
            return;
          }

          // Confirmed that the boundary is in a concurrent mode tree. Continue
          // with the normal suspend path.

          attachPingListener(root, renderExpirationTime, thenable);

          var absoluteTimeoutMs = void 0;
          if (earliestTimeoutMs === -1) {
            // If no explicit threshold is given, default to an arbitrarily large
            // value. The actual size doesn't matter because the threshold for the
            // whole tree will be clamped to the expiration time.
            absoluteTimeoutMs = maxSigned31BitInt;
          } else {
            if (startTimeMs === -1) {
              // This suspend happened outside of any already timed-out
              // placeholders. We don't know exactly when the update was
              // scheduled, but we can infer an approximate start time from the
              // expiration time. First, find the earliest uncommitted expiration
              // time in the tree, including work that is suspended. Then subtract
              // the offset used to compute an async update's expiration time.
              // This will cause high priority (interactive) work to expire
              // earlier than necessary, but we can account for this by adjusting
              // for the Just Noticeable Difference.
              var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, renderExpirationTime);
              var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
              startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
            }
            absoluteTimeoutMs = startTimeMs + earliestTimeoutMs;
          }

          // Mark the earliest timeout in the suspended fiber's ancestor path.
          // After completing the root, we'll take the largest of all the
          // suspended fiber's timeouts and use it to compute a timeout for the
          // whole tree.
          renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime);

          _workInProgress.effectTag |= ShouldCapture;
          _workInProgress.expirationTime = renderExpirationTime;
          return;
        } else if (enableSuspenseServerRenderer && _workInProgress.tag === DehydratedSuspenseComponent) {
          attachPingListener(root, renderExpirationTime, thenable);

          // Since we already have a current fiber, we can eagerly add a retry listener.
          var retryCache = _workInProgress.memoizedState;
          if (retryCache === null) {
            retryCache = _workInProgress.memoizedState = new PossiblyWeakSet();
            var _current = _workInProgress.alternate;
            !_current ? invariant(false, 'A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.') : void 0;
            _current.memoizedState = retryCache;
          }
          // Memoize using the boundary fiber to prevent redundant listeners.
          if (!retryCache.has(thenable)) {
            retryCache.add(thenable);
            var retry = retryTimedOutBoundary.bind(null, _workInProgress, thenable);
            if (enableSchedulerTracing) {
              retry = tracing.unstable_wrap(retry);
            }
            thenable.then(retry, retry);
          }
          _workInProgress.effectTag |= ShouldCapture;
          _workInProgress.expirationTime = renderExpirationTime;
          return;
        }
        // This boundary already captured during this render. Continue to the next
        // boundary.
        _workInProgress = _workInProgress.return;
      } while (_workInProgress !== null);
      // No boundary was found. Fallthrough to error mode.
      // TODO: Use invariant so the message is stripped in prod?
      value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
    }

    // We didn't find a boundary that could handle this type of exception. Start
    // over and traverse parent path again, this time treating the exception
    // as an error.
    renderDidError();
    value = createCapturedValue(value, sourceFiber);
    var workInProgress = returnFiber;
    do {
      switch (workInProgress.tag) {
        case HostRoot:
          {
            var _errorInfo = value;
            workInProgress.effectTag |= ShouldCapture;
            workInProgress.expirationTime = renderExpirationTime;
            var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
            enqueueCapturedUpdate(workInProgress, _update);
            return;
          }
        case ClassComponent:
          // Capture and retry
          var errorInfo = value;
          var ctor = workInProgress.type;
          var instance = workInProgress.stateNode;
          if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
            workInProgress.effectTag |= ShouldCapture;
            workInProgress.expirationTime = renderExpirationTime;
            // Schedule the error boundary to re-render using updated state
            var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
            enqueueCapturedUpdate(workInProgress, _update2);
            return;
          }
          break;
        default:
          break;
      }
      workInProgress = workInProgress.return;
    } while (workInProgress !== null);
  }

  function unwindWork(workInProgress, renderExpirationTime) {
    switch (workInProgress.tag) {
      case ClassComponent:
        {
          var Component = workInProgress.type;
          if (isContextProvider(Component)) {
            popContext(workInProgress);
          }
          var effectTag = workInProgress.effectTag;
          if (effectTag & ShouldCapture) {
            workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
            return workInProgress;
          }
          return null;
        }
      case HostRoot:
        {
          popHostContainer(workInProgress);
          popTopLevelContextObject(workInProgress);
          var _effectTag = workInProgress.effectTag;
          !((_effectTag & DidCapture) === NoEffect) ? invariant(false, 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.') : void 0;
          workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
          return workInProgress;
        }
      case HostComponent:
        {
          // TODO: popHydrationState
          popHostContext(workInProgress);
          return null;
        }
      case SuspenseComponent:
        {
          var _effectTag2 = workInProgress.effectTag;
          if (_effectTag2 & ShouldCapture) {
            workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
            // Captured a suspense effect. Re-render the boundary.
            return workInProgress;
          }
          return null;
        }
      case DehydratedSuspenseComponent:
        {
          if (enableSuspenseServerRenderer) {
            // TODO: popHydrationState
            var _effectTag3 = workInProgress.effectTag;
            if (_effectTag3 & ShouldCapture) {
              workInProgress.effectTag = _effectTag3 & ~ShouldCapture | DidCapture;
              // Captured a suspense effect. Re-render the boundary.
              return workInProgress;
            }
          }
          return null;
        }
      case HostPortal:
        popHostContainer(workInProgress);
        return null;
      case ContextProvider:
        popProvider(workInProgress);
        return null;
      default:
        return null;
    }
  }

  function unwindInterruptedWork(interruptedWork) {
    switch (interruptedWork.tag) {
      case ClassComponent:
        {
          var childContextTypes = interruptedWork.type.childContextTypes;
          if (childContextTypes !== null && childContextTypes !== undefined) {
            popContext(interruptedWork);
          }
          break;
        }
      case HostRoot:
        {
          popHostContainer(interruptedWork);
          popTopLevelContextObject(interruptedWork);
          break;
        }
      case HostComponent:
        {
          popHostContext(interruptedWork);
          break;
        }
      case HostPortal:
        popHostContainer(interruptedWork);
        break;
      case ContextProvider:
        popProvider(interruptedWork);
        break;
      default:
        break;
    }
  }

  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;


  var didWarnAboutStateTransition = void 0;
  var didWarnSetStateChildContext = void 0;
  var warnAboutUpdateOnUnmounted = void 0;
  var warnAboutInvalidUpdates = void 0;

  if (enableSchedulerTracing) {
    // Provide explicit error message when production+profiling bundle of e.g. react-dom
    // is used with production (non-profiling) bundle of scheduler/tracing
    !(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null) ? invariant(false, 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling') : void 0;
  }

  {
    didWarnAboutStateTransition = false;
    didWarnSetStateChildContext = false;
    var didWarnStateUpdateForUnmountedComponent = {};

    warnAboutUpdateOnUnmounted = function (fiber, isClass) {
      // We show the whole stack but dedupe on the top component's name because
      // the problematic code almost always lies inside that component.
      var componentName = getComponentName(fiber.type) || 'ReactComponent';
      if (didWarnStateUpdateForUnmountedComponent[componentName]) {
        return;
      }
      warningWithoutStack$1(false, "Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', isClass ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
      didWarnStateUpdateForUnmountedComponent[componentName] = true;
    };

    warnAboutInvalidUpdates = function (instance) {
      switch (phase) {
        case 'getChildContext':
          if (didWarnSetStateChildContext) {
            return;
          }
          warningWithoutStack$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
          didWarnSetStateChildContext = true;
          break;
        case 'render':
          if (didWarnAboutStateTransition) {
            return;
          }
          warningWithoutStack$1(false, 'Cannot update during an existing state transition (such as within ' + '`render`). Render methods should be a pure function of props and state.');
          didWarnAboutStateTransition = true;
          break;
      }
    };
  }

  // Used to ensure computeUniqueAsyncExpiration is monotonically decreasing.
  var lastUniqueAsyncExpiration = Sync - 1;

  var isWorking = false;

  // The next work in progress fiber that we're currently working on.
  var nextUnitOfWork = null;
  var nextRoot = null;
  // The time at which we're currently rendering work.
  var nextRenderExpirationTime = NoWork;
  var nextLatestAbsoluteTimeoutMs = -1;
  var nextRenderDidError = false;

  // The next fiber with an effect that we're currently committing.
  var nextEffect = null;

  var isCommitting$1 = false;
  var rootWithPendingPassiveEffects = null;
  var passiveEffectCallbackHandle = null;
  var passiveEffectCallback = null;

  var legacyErrorBoundariesThatAlreadyFailed = null;

  // Used for performance tracking.
  var interruptedBy = null;

  var stashedWorkInProgressProperties = void 0;
  var replayUnitOfWork = void 0;
  var mayReplayFailedUnitOfWork = void 0;
  var isReplayingFailedUnitOfWork = void 0;
  var originalReplayError = void 0;
  var rethrowOriginalError = void 0;
  if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
    stashedWorkInProgressProperties = null;
    mayReplayFailedUnitOfWork = true;
    isReplayingFailedUnitOfWork = false;
    originalReplayError = null;
    replayUnitOfWork = function (failedUnitOfWork, thrownValue, isYieldy) {
      if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {
        // Don't replay promises. Treat everything else like an error.
        // TODO: Need to figure out a different strategy if/when we add
        // support for catching other types.
        return;
      }

      // Restore the original state of the work-in-progress
      if (stashedWorkInProgressProperties === null) {
        // This should never happen. Don't throw because this code is DEV-only.
        warningWithoutStack$1(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
        return;
      }
      assignFiberPropertiesInDEV(failedUnitOfWork, stashedWorkInProgressProperties);

      switch (failedUnitOfWork.tag) {
        case HostRoot:
          popHostContainer(failedUnitOfWork);
          popTopLevelContextObject(failedUnitOfWork);
          break;
        case HostComponent:
          popHostContext(failedUnitOfWork);
          break;
        case ClassComponent:
          {
            var Component = failedUnitOfWork.type;
            if (isContextProvider(Component)) {
              popContext(failedUnitOfWork);
            }
            break;
          }
        case HostPortal:
          popHostContainer(failedUnitOfWork);
          break;
        case ContextProvider:
          popProvider(failedUnitOfWork);
          break;
      }
      // Replay the begin phase.
      isReplayingFailedUnitOfWork = true;
      originalReplayError = thrownValue;
      invokeGuardedCallback(null, workLoop, null, isYieldy);
      isReplayingFailedUnitOfWork = false;
      originalReplayError = null;
      if (hasCaughtError()) {
        var replayError = clearCaughtError();
        if (replayError != null && thrownValue != null) {
          try {
            // Reading the expando property is intentionally
            // inside `try` because it might be a getter or Proxy.
            if (replayError._suppressLogging) {
              // Also suppress logging for the original error.
              thrownValue._suppressLogging = true;
            }
          } catch (inner) {
            // Ignore.
          }
        }
      } else {
        // If the begin phase did not fail the second time, set this pointer
        // back to the original value.
        nextUnitOfWork = failedUnitOfWork;
      }
    };
    rethrowOriginalError = function () {
      throw originalReplayError;
    };
  }

  function resetStack() {
    if (nextUnitOfWork !== null) {
      var interruptedWork = nextUnitOfWork.return;
      while (interruptedWork !== null) {
        unwindInterruptedWork(interruptedWork);
        interruptedWork = interruptedWork.return;
      }
    }

    {
      ReactStrictModeWarnings.discardPendingWarnings();
      checkThatStackIsEmpty();
    }

    nextRoot = null;
    nextRenderExpirationTime = NoWork;
    nextLatestAbsoluteTimeoutMs = -1;
    nextRenderDidError = false;
    nextUnitOfWork = null;
  }

  function commitAllHostEffects() {
    while (nextEffect !== null) {
      {
        setCurrentFiber(nextEffect);
      }
      recordEffect();

      var effectTag = nextEffect.effectTag;

      if (effectTag & ContentReset) {
        commitResetTextContent(nextEffect);
      }

      if (effectTag & Ref) {
        var current$$1 = nextEffect.alternate;
        if (current$$1 !== null) {
          commitDetachRef(current$$1);
        }
      }

      // The following switch statement is only concerned about placement,
      // updates, and deletions. To avoid needing to add a case for every
      // possible bitmap value, we remove the secondary effects from the
      // effect tag and switch on that value.
      var primaryEffectTag = effectTag & (Placement | Update | Deletion);
      switch (primaryEffectTag) {
        case Placement:
          {
            commitPlacement(nextEffect);
            // Clear the "placement" from effect tag so that we know that this is inserted, before
            // any life-cycles like componentDidMount gets called.
            // TODO: findDOMNode doesn't rely on this any more but isMounted
            // does and isMounted is deprecated anyway so we should be able
            // to kill this.
            nextEffect.effectTag &= ~Placement;
            break;
          }
        case PlacementAndUpdate:
          {
            // Placement
            commitPlacement(nextEffect);
            // Clear the "placement" from effect tag so that we know that this is inserted, before
            // any life-cycles like componentDidMount gets called.
            nextEffect.effectTag &= ~Placement;

            // Update
            var _current = nextEffect.alternate;
            commitWork(_current, nextEffect);
            break;
          }
        case Update:
          {
            var _current2 = nextEffect.alternate;
            commitWork(_current2, nextEffect);
            break;
          }
        case Deletion:
          {
            commitDeletion(nextEffect);
            break;
          }
      }
      nextEffect = nextEffect.nextEffect;
    }

    {
      resetCurrentFiber();
    }
  }

  function commitBeforeMutationLifecycles() {
    while (nextEffect !== null) {
      {
        setCurrentFiber(nextEffect);
      }

      var effectTag = nextEffect.effectTag;
      if (effectTag & Snapshot) {
        recordEffect();
        var current$$1 = nextEffect.alternate;
        commitBeforeMutationLifeCycles(current$$1, nextEffect);
      }

      nextEffect = nextEffect.nextEffect;
    }

    {
      resetCurrentFiber();
    }
  }

  function commitAllLifeCycles(finishedRoot, committedExpirationTime) {
    {
      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
      ReactStrictModeWarnings.flushLegacyContextWarning();

      if (warnAboutDeprecatedLifecycles) {
        ReactStrictModeWarnings.flushPendingDeprecationWarnings();
      }
    }
    while (nextEffect !== null) {
      {
        setCurrentFiber(nextEffect);
      }
      var effectTag = nextEffect.effectTag;

      if (effectTag & (Update | Callback)) {
        recordEffect();
        var current$$1 = nextEffect.alternate;
        commitLifeCycles(finishedRoot, current$$1, nextEffect, committedExpirationTime);
      }

      if (effectTag & Ref) {
        recordEffect();
        commitAttachRef(nextEffect);
      }

      if (effectTag & Passive) {
        rootWithPendingPassiveEffects = finishedRoot;
      }

      nextEffect = nextEffect.nextEffect;
    }
    {
      resetCurrentFiber();
    }
  }

  function commitPassiveEffects(root, firstEffect) {
    rootWithPendingPassiveEffects = null;
    passiveEffectCallbackHandle = null;
    passiveEffectCallback = null;

    // Set this to true to prevent re-entrancy
    var previousIsRendering = isRendering;
    isRendering = true;

    var effect = firstEffect;
    do {
      {
        setCurrentFiber(effect);
      }

      if (effect.effectTag & Passive) {
        var didError = false;
        var error = void 0;
        {
          invokeGuardedCallback(null, commitPassiveHookEffects, null, effect);
          if (hasCaughtError()) {
            didError = true;
            error = clearCaughtError();
          }
        }
        if (didError) {
          captureCommitPhaseError(effect, error);
        }
      }
      effect = effect.nextEffect;
    } while (effect !== null);
    {
      resetCurrentFiber();
    }

    isRendering = previousIsRendering;

    // Check if work was scheduled by one of the effects
    var rootExpirationTime = root.expirationTime;
    if (rootExpirationTime !== NoWork) {
      requestWork(root, rootExpirationTime);
    }
    // Flush any sync work that was scheduled by effects
    if (!isBatchingUpdates && !isRendering) {
      performSyncWork();
    }
  }

  function isAlreadyFailedLegacyErrorBoundary(instance) {
    return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
  }

  function markLegacyErrorBoundaryAsFailed(instance) {
    if (legacyErrorBoundariesThatAlreadyFailed === null) {
      legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
    } else {
      legacyErrorBoundariesThatAlreadyFailed.add(instance);
    }
  }

  function flushPassiveEffects() {
    if (passiveEffectCallbackHandle !== null) {
      cancelPassiveEffects(passiveEffectCallbackHandle);
    }
    if (passiveEffectCallback !== null) {
      // We call the scheduled callback instead of commitPassiveEffects directly
      // to ensure tracing works correctly.
      passiveEffectCallback();
    }
  }

  function commitRoot(root, finishedWork) {
    isWorking = true;
    isCommitting$1 = true;
    startCommitTimer();

    !(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    var committedExpirationTime = root.pendingCommitExpirationTime;
    !(committedExpirationTime !== NoWork) ? invariant(false, 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    root.pendingCommitExpirationTime = NoWork;

    // Update the pending priority levels to account for the work that we are
    // about to commit. This needs to happen before calling the lifecycles, since
    // they may schedule additional updates.
    var updateExpirationTimeBeforeCommit = finishedWork.expirationTime;
    var childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
    var earliestRemainingTimeBeforeCommit = childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
    markCommittedPriorityLevels(root, earliestRemainingTimeBeforeCommit);

    var prevInteractions = null;
    if (enableSchedulerTracing) {
      // Restore any pending interactions at this point,
      // So that cascading work triggered during the render phase will be accounted for.
      prevInteractions = tracing.__interactionsRef.current;
      tracing.__interactionsRef.current = root.memoizedInteractions;
    }

    // Reset this to null before calling lifecycles
    ReactCurrentOwner$1.current = null;

    var firstEffect = void 0;
    if (finishedWork.effectTag > PerformedWork) {
      // A fiber's effect list consists only of its children, not itself. So if
      // the root has an effect, we need to add it to the end of the list. The
      // resulting list is the set that would belong to the root's parent, if
      // it had one; that is, all the effects in the tree including the root.
      if (finishedWork.lastEffect !== null) {
        finishedWork.lastEffect.nextEffect = finishedWork;
        firstEffect = finishedWork.firstEffect;
      } else {
        firstEffect = finishedWork;
      }
    } else {
      // There is no effect on the root.
      firstEffect = finishedWork.firstEffect;
    }

    prepareForCommit(root.containerInfo);

    // Invoke instances of getSnapshotBeforeUpdate before mutation.
    nextEffect = firstEffect;
    startCommitSnapshotEffectsTimer();
    while (nextEffect !== null) {
      var didError = false;
      var error = void 0;
      {
        invokeGuardedCallback(null, commitBeforeMutationLifecycles, null);
        if (hasCaughtError()) {
          didError = true;
          error = clearCaughtError();
        }
      }
      if (didError) {
        !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
        captureCommitPhaseError(nextEffect, error);
        // Clean-up
        if (nextEffect !== null) {
          nextEffect = nextEffect.nextEffect;
        }
      }
    }
    stopCommitSnapshotEffectsTimer();

    if (enableProfilerTimer) {
      // Mark the current commit time to be shared by all Profilers in this batch.
      // This enables them to be grouped later.
      recordCommitTime();
    }

    // Commit all the side-effects within a tree. We'll do this in two passes.
    // The first pass performs all the host insertions, updates, deletions and
    // ref unmounts.
    nextEffect = firstEffect;
    startCommitHostEffectsTimer();
    while (nextEffect !== null) {
      var _didError = false;
      var _error = void 0;
      {
        invokeGuardedCallback(null, commitAllHostEffects, null);
        if (hasCaughtError()) {
          _didError = true;
          _error = clearCaughtError();
        }
      }
      if (_didError) {
        !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
        captureCommitPhaseError(nextEffect, _error);
        // Clean-up
        if (nextEffect !== null) {
          nextEffect = nextEffect.nextEffect;
        }
      }
    }
    stopCommitHostEffectsTimer();

    resetAfterCommit(root.containerInfo);

    // The work-in-progress tree is now the current tree. This must come after
    // the first pass of the commit phase, so that the previous tree is still
    // current during componentWillUnmount, but before the second pass, so that
    // the finished work is current during componentDidMount/Update.
    root.current = finishedWork;

    // In the second pass we'll perform all life-cycles and ref callbacks.
    // Life-cycles happen as a separate pass so that all placements, updates,
    // and deletions in the entire tree have already been invoked.
    // This pass also triggers any renderer-specific initial effects.
    nextEffect = firstEffect;
    startCommitLifeCyclesTimer();
    while (nextEffect !== null) {
      var _didError2 = false;
      var _error2 = void 0;
      {
        invokeGuardedCallback(null, commitAllLifeCycles, null, root, committedExpirationTime);
        if (hasCaughtError()) {
          _didError2 = true;
          _error2 = clearCaughtError();
        }
      }
      if (_didError2) {
        !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
        captureCommitPhaseError(nextEffect, _error2);
        if (nextEffect !== null) {
          nextEffect = nextEffect.nextEffect;
        }
      }
    }

    if (firstEffect !== null && rootWithPendingPassiveEffects !== null) {
      // This commit included a passive effect. These do not need to fire until
      // after the next paint. Schedule an callback to fire them in an async
      // event. To ensure serial execution, the callback will be flushed early if
      // we enter rootWithPendingPassiveEffects commit phase before then.
      var callback = commitPassiveEffects.bind(null, root, firstEffect);
      if (enableSchedulerTracing) {
        // TODO: Avoid this extra callback by mutating the tracing ref directly,
        // like we do at the beginning of commitRoot. I've opted not to do that
        // here because that code is still in flux.
        callback = tracing.unstable_wrap(callback);
      }
      passiveEffectCallbackHandle = scheduler.unstable_runWithPriority(scheduler.unstable_NormalPriority, function () {
        return schedulePassiveEffects(callback);
      });
      passiveEffectCallback = callback;
    }

    isCommitting$1 = false;
    isWorking = false;
    stopCommitLifeCyclesTimer();
    stopCommitTimer();
    onCommitRoot(finishedWork.stateNode);
    if ( true && ReactFiberInstrumentation_1.debugTool) {
      ReactFiberInstrumentation_1.debugTool.onCommitWork(finishedWork);
    }

    var updateExpirationTimeAfterCommit = finishedWork.expirationTime;
    var childExpirationTimeAfterCommit = finishedWork.childExpirationTime;
    var earliestRemainingTimeAfterCommit = childExpirationTimeAfterCommit > updateExpirationTimeAfterCommit ? childExpirationTimeAfterCommit : updateExpirationTimeAfterCommit;
    if (earliestRemainingTimeAfterCommit === NoWork) {
      // If there's no remaining work, we can clear the set of already failed
      // error boundaries.
      legacyErrorBoundariesThatAlreadyFailed = null;
    }
    onCommit(root, earliestRemainingTimeAfterCommit);

    if (enableSchedulerTracing) {
      tracing.__interactionsRef.current = prevInteractions;

      var subscriber = void 0;

      try {
        subscriber = tracing.__subscriberRef.current;
        if (subscriber !== null && root.memoizedInteractions.size > 0) {
          var threadID = computeThreadID(committedExpirationTime, root.interactionThreadID);
          subscriber.onWorkStopped(root.memoizedInteractions, threadID);
        }
      } catch (error) {
        // It's not safe for commitRoot() to throw.
        // Store the error for now and we'll re-throw in finishRendering().
        if (!hasUnhandledError) {
          hasUnhandledError = true;
          unhandledError = error;
        }
      } finally {
        // Clear completed interactions from the pending Map.
        // Unless the render was suspended or cascading work was scheduled,
        // In which case– leave pending interactions until the subsequent render.
        var pendingInteractionMap = root.pendingInteractionMap;
        pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
          // Only decrement the pending interaction count if we're done.
          // If there's still work at the current priority,
          // That indicates that we are waiting for suspense data.
          if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
            pendingInteractionMap.delete(scheduledExpirationTime);

            scheduledInteractions.forEach(function (interaction) {
              interaction.__count--;

              if (subscriber !== null && interaction.__count === 0) {
                try {
                  subscriber.onInteractionScheduledWorkCompleted(interaction);
                } catch (error) {
                  // It's not safe for commitRoot() to throw.
                  // Store the error for now and we'll re-throw in finishRendering().
                  if (!hasUnhandledError) {
                    hasUnhandledError = true;
                    unhandledError = error;
                  }
                }
              }
            });
          }
        });
      }
    }
  }

  function resetChildExpirationTime(workInProgress, renderTime) {
    if (renderTime !== Never && workInProgress.childExpirationTime === Never) {
      // The children of this component are hidden. Don't bubble their
      // expiration times.
      return;
    }

    var newChildExpirationTime = NoWork;

    // Bubble up the earliest expiration time.
    if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
      // We're in profiling mode.
      // Let's use this same traversal to update the render durations.
      var actualDuration = workInProgress.actualDuration;
      var treeBaseDuration = workInProgress.selfBaseDuration;

      // When a fiber is cloned, its actualDuration is reset to 0.
      // This value will only be updated if work is done on the fiber (i.e. it doesn't bailout).
      // When work is done, it should bubble to the parent's actualDuration.
      // If the fiber has not been cloned though, (meaning no work was done),
      // Then this value will reflect the amount of time spent working on a previous render.
      // In that case it should not bubble.
      // We determine whether it was cloned by comparing the child pointer.
      var shouldBubbleActualDurations = workInProgress.alternate === null || workInProgress.child !== workInProgress.alternate.child;

      var child = workInProgress.child;
      while (child !== null) {
        var childUpdateExpirationTime = child.expirationTime;
        var childChildExpirationTime = child.childExpirationTime;
        if (childUpdateExpirationTime > newChildExpirationTime) {
          newChildExpirationTime = childUpdateExpirationTime;
        }
        if (childChildExpirationTime > newChildExpirationTime) {
          newChildExpirationTime = childChildExpirationTime;
        }
        if (shouldBubbleActualDurations) {
          actualDuration += child.actualDuration;
        }
        treeBaseDuration += child.treeBaseDuration;
        child = child.sibling;
      }
      workInProgress.actualDuration = actualDuration;
      workInProgress.treeBaseDuration = treeBaseDuration;
    } else {
      var _child = workInProgress.child;
      while (_child !== null) {
        var _childUpdateExpirationTime = _child.expirationTime;
        var _childChildExpirationTime = _child.childExpirationTime;
        if (_childUpdateExpirationTime > newChildExpirationTime) {
          newChildExpirationTime = _childUpdateExpirationTime;
        }
        if (_childChildExpirationTime > newChildExpirationTime) {
          newChildExpirationTime = _childChildExpirationTime;
        }
        _child = _child.sibling;
      }
    }

    workInProgress.childExpirationTime = newChildExpirationTime;
  }

  function completeUnitOfWork(workInProgress) {
    // Attempt to complete the current unit of work, then move to the
    // next sibling. If there are no more siblings, return to the
    // parent fiber.
    while (true) {
      // The current, flushed, state of this fiber is the alternate.
      // Ideally nothing should rely on this, but relying on it here
      // means that we don't need an additional field on the work in
      // progress.
      var current$$1 = workInProgress.alternate;
      {
        setCurrentFiber(workInProgress);
      }

      var returnFiber = workInProgress.return;
      var siblingFiber = workInProgress.sibling;

      if ((workInProgress.effectTag & Incomplete) === NoEffect) {
        if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
          // Don't replay if it fails during completion phase.
          mayReplayFailedUnitOfWork = false;
        }
        // This fiber completed.
        // Remember we're completing this unit so we can find a boundary if it fails.
        nextUnitOfWork = workInProgress;
        if (enableProfilerTimer) {
          if (workInProgress.mode & ProfileMode) {
            startProfilerTimer(workInProgress);
          }
          nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
          if (workInProgress.mode & ProfileMode) {
            // Update render duration assuming we didn't error.
            stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
          }
        } else {
          nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
        }
        if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
          // We're out of completion phase so replaying is fine now.
          mayReplayFailedUnitOfWork = true;
        }
        stopWorkTimer(workInProgress);
        resetChildExpirationTime(workInProgress, nextRenderExpirationTime);
        {
          resetCurrentFiber();
        }

        if (nextUnitOfWork !== null) {
          // Completing this fiber spawned new work. Work on that next.
          return nextUnitOfWork;
        }

        if (returnFiber !== null &&
        // Do not append effects to parents if a sibling failed to complete
        (returnFiber.effectTag & Incomplete) === NoEffect) {
          // Append all the effects of the subtree and this fiber onto the effect
          // list of the parent. The completion order of the children affects the
          // side-effect order.
          if (returnFiber.firstEffect === null) {
            returnFiber.firstEffect = workInProgress.firstEffect;
          }
          if (workInProgress.lastEffect !== null) {
            if (returnFiber.lastEffect !== null) {
              returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
            }
            returnFiber.lastEffect = workInProgress.lastEffect;
          }

          // If this fiber had side-effects, we append it AFTER the children's
          // side-effects. We can perform certain side-effects earlier if
          // needed, by doing multiple passes over the effect list. We don't want
          // to schedule our own side-effect on our own list because if end up
          // reusing children we'll schedule this effect onto itself since we're
          // at the end.
          var effectTag = workInProgress.effectTag;
          // Skip both NoWork and PerformedWork tags when creating the effect list.
          // PerformedWork effect is read by React DevTools but shouldn't be committed.
          if (effectTag > PerformedWork) {
            if (returnFiber.lastEffect !== null) {
              returnFiber.lastEffect.nextEffect = workInProgress;
            } else {
              returnFiber.firstEffect = workInProgress;
            }
            returnFiber.lastEffect = workInProgress;
          }
        }

        if ( true && ReactFiberInstrumentation_1.debugTool) {
          ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
        }

        if (siblingFiber !== null) {
          // If there is more work to do in this returnFiber, do that next.
          return siblingFiber;
        } else if (returnFiber !== null) {
          // If there's no more work in this returnFiber. Complete the returnFiber.
          workInProgress = returnFiber;
          continue;
        } else {
          // We've reached the root.
          return null;
        }
      } else {
        if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
          // Record the render duration for the fiber that errored.
          stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);

          // Include the time spent working on failed children before continuing.
          var actualDuration = workInProgress.actualDuration;
          var child = workInProgress.child;
          while (child !== null) {
            actualDuration += child.actualDuration;
            child = child.sibling;
          }
          workInProgress.actualDuration = actualDuration;
        }

        // This fiber did not complete because something threw. Pop values off
        // the stack without entering the complete phase. If this is a boundary,
        // capture values if possible.
        var next = unwindWork(workInProgress, nextRenderExpirationTime);
        // Because this fiber did not complete, don't reset its expiration time.
        if (workInProgress.effectTag & DidCapture) {
          // Restarting an error boundary
          stopFailedWorkTimer(workInProgress);
        } else {
          stopWorkTimer(workInProgress);
        }

        {
          resetCurrentFiber();
        }

        if (next !== null) {
          stopWorkTimer(workInProgress);
          if ( true && ReactFiberInstrumentation_1.debugTool) {
            ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
          }

          // If completing this work spawned new work, do that next. We'll come
          // back here again.
          // Since we're restarting, remove anything that is not a host effect
          // from the effect tag.
          next.effectTag &= HostEffectMask;
          return next;
        }

        if (returnFiber !== null) {
          // Mark the parent fiber as incomplete and clear its effect list.
          returnFiber.firstEffect = returnFiber.lastEffect = null;
          returnFiber.effectTag |= Incomplete;
        }

        if ( true && ReactFiberInstrumentation_1.debugTool) {
          ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
        }

        if (siblingFiber !== null) {
          // If there is more work to do in this returnFiber, do that next.
          return siblingFiber;
        } else if (returnFiber !== null) {
          // If there's no more work in this returnFiber. Complete the returnFiber.
          workInProgress = returnFiber;
          continue;
        } else {
          return null;
        }
      }
    }

    // Without this explicit null return Flow complains of invalid return type
    // TODO Remove the above while(true) loop
    // eslint-disable-next-line no-unreachable
    return null;
  }

  function performUnitOfWork(workInProgress) {
    // The current, flushed, state of this fiber is the alternate.
    // Ideally nothing should rely on this, but relying on it here
    // means that we don't need an additional field on the work in
    // progress.
    var current$$1 = workInProgress.alternate;

    // See if beginning this work spawns more work.
    startWorkTimer(workInProgress);
    {
      setCurrentFiber(workInProgress);
    }

    if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
      stashedWorkInProgressProperties = assignFiberPropertiesInDEV(stashedWorkInProgressProperties, workInProgress);
    }

    var next = void 0;
    if (enableProfilerTimer) {
      if (workInProgress.mode & ProfileMode) {
        startProfilerTimer(workInProgress);
      }

      next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
      workInProgress.memoizedProps = workInProgress.pendingProps;

      if (workInProgress.mode & ProfileMode) {
        // Record the render duration assuming we didn't bailout (or error).
        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
      }
    } else {
      next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
      workInProgress.memoizedProps = workInProgress.pendingProps;
    }

    {
      resetCurrentFiber();
      if (isReplayingFailedUnitOfWork) {
        // Currently replaying a failed unit of work. This should be unreachable,
        // because the render phase is meant to be idempotent, and it should
        // have thrown again. Since it didn't, rethrow the original error, so
        // React's internal stack is not misaligned.
        rethrowOriginalError();
      }
    }
    if ( true && ReactFiberInstrumentation_1.debugTool) {
      ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);
    }

    if (next === null) {
      // If this doesn't spawn new work, complete the current work.
      next = completeUnitOfWork(workInProgress);
    }

    ReactCurrentOwner$1.current = null;

    return next;
  }

  function workLoop(isYieldy) {
    if (!isYieldy) {
      // Flush work without yielding
      while (nextUnitOfWork !== null) {
        nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
      }
    } else {
      // Flush asynchronous work until there's a higher priority event
      while (nextUnitOfWork !== null && !shouldYieldToRenderer()) {
        nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
      }
    }
  }

  function renderRoot(root, isYieldy) {
    !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    flushPassiveEffects();

    isWorking = true;
    var previousDispatcher = ReactCurrentDispatcher.current;
    ReactCurrentDispatcher.current = ContextOnlyDispatcher;

    var expirationTime = root.nextExpirationTimeToWorkOn;

    // Check if we're starting from a fresh stack, or if we're resuming from
    // previously yielded work.
    if (expirationTime !== nextRenderExpirationTime || root !== nextRoot || nextUnitOfWork === null) {
      // Reset the stack and start working from the root.
      resetStack();
      nextRoot = root;
      nextRenderExpirationTime = expirationTime;
      nextUnitOfWork = createWorkInProgress(nextRoot.current, null, nextRenderExpirationTime);
      root.pendingCommitExpirationTime = NoWork;

      if (enableSchedulerTracing) {
        // Determine which interactions this batch of work currently includes,
        // So that we can accurately attribute time spent working on it,
        var interactions = new Set();
        root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
          if (scheduledExpirationTime >= expirationTime) {
            scheduledInteractions.forEach(function (interaction) {
              return interactions.add(interaction);
            });
          }
        });

        // Store the current set of interactions on the FiberRoot for a few reasons:
        // We can re-use it in hot functions like renderRoot() without having to recalculate it.
        // We will also use it in commitWork() to pass to any Profiler onRender() hooks.
        // This also provides DevTools with a way to access it when the onCommitRoot() hook is called.
        root.memoizedInteractions = interactions;

        if (interactions.size > 0) {
          var subscriber = tracing.__subscriberRef.current;
          if (subscriber !== null) {
            var threadID = computeThreadID(expirationTime, root.interactionThreadID);
            try {
              subscriber.onWorkStarted(interactions, threadID);
            } catch (error) {
              // Work thrown by an interaction tracing subscriber should be rethrown,
              // But only once it's safe (to avoid leaving the scheduler in an invalid state).
              // Store the error for now and we'll re-throw in finishRendering().
              if (!hasUnhandledError) {
                hasUnhandledError = true;
                unhandledError = error;
              }
            }
          }
        }
      }
    }

    var prevInteractions = null;
    if (enableSchedulerTracing) {
      // We're about to start new traced work.
      // Restore pending interactions so cascading work triggered during the render phase will be accounted for.
      prevInteractions = tracing.__interactionsRef.current;
      tracing.__interactionsRef.current = root.memoizedInteractions;
    }

    var didFatal = false;

    startWorkLoopTimer(nextUnitOfWork);

    do {
      try {
        workLoop(isYieldy);
      } catch (thrownValue) {
        resetContextDependences();
        resetHooks();

        // Reset in case completion throws.
        // This is only used in DEV and when replaying is on.
        var mayReplay = void 0;
        if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
          mayReplay = mayReplayFailedUnitOfWork;
          mayReplayFailedUnitOfWork = true;
        }

        if (nextUnitOfWork === null) {
          // This is a fatal error.
          didFatal = true;
          onUncaughtError(thrownValue);
        } else {
          if (enableProfilerTimer && nextUnitOfWork.mode & ProfileMode) {
            // Record the time spent rendering before an error was thrown.
            // This avoids inaccurate Profiler durations in the case of a suspended render.
            stopProfilerTimerIfRunningAndRecordDelta(nextUnitOfWork, true);
          }

          {
            // Reset global debug state
            // We assume this is defined in DEV
            resetCurrentlyProcessingQueue();
          }

          if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
            if (mayReplay) {
              var failedUnitOfWork = nextUnitOfWork;
              replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy);
            }
          }

          // TODO: we already know this isn't true in some cases.
          // At least this shows a nicer error message until we figure out the cause.
          // https://github.com/facebook/react/issues/12449#issuecomment-386727431
          !(nextUnitOfWork !== null) ? invariant(false, 'Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.') : void 0;

          var sourceFiber = nextUnitOfWork;
          var returnFiber = sourceFiber.return;
          if (returnFiber === null) {
            // This is the root. The root could capture its own errors. However,
            // we don't know if it errors before or after we pushed the host
            // context. This information is needed to avoid a stack mismatch.
            // Because we're not sure, treat this as a fatal error. We could track
            // which phase it fails in, but doesn't seem worth it. At least
            // for now.
            didFatal = true;
            onUncaughtError(thrownValue);
          } else {
            throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderExpirationTime);
            nextUnitOfWork = completeUnitOfWork(sourceFiber);
            continue;
          }
        }
      }
      break;
    } while (true);

    if (enableSchedulerTracing) {
      // Traced work is done for now; restore the previous interactions.
      tracing.__interactionsRef.current = prevInteractions;
    }

    // We're done performing work. Time to clean up.
    isWorking = false;
    ReactCurrentDispatcher.current = previousDispatcher;
    resetContextDependences();
    resetHooks();

    // Yield back to main thread.
    if (didFatal) {
      var _didCompleteRoot = false;
      stopWorkLoopTimer(interruptedBy, _didCompleteRoot);
      interruptedBy = null;
      // There was a fatal error.
      {
        resetStackAfterFatalErrorInDev();
      }
      // `nextRoot` points to the in-progress root. A non-null value indicates
      // that we're in the middle of an async render. Set it to null to indicate
      // there's no more work to be done in the current batch.
      nextRoot = null;
      onFatal(root);
      return;
    }

    if (nextUnitOfWork !== null) {
      // There's still remaining async work in this tree, but we ran out of time
      // in the current frame. Yield back to the renderer. Unless we're
      // interrupted by a higher priority update, we'll continue later from where
      // we left off.
      var _didCompleteRoot2 = false;
      stopWorkLoopTimer(interruptedBy, _didCompleteRoot2);
      interruptedBy = null;
      onYield(root);
      return;
    }

    // We completed the whole tree.
    var didCompleteRoot = true;
    stopWorkLoopTimer(interruptedBy, didCompleteRoot);
    var rootWorkInProgress = root.current.alternate;
    !(rootWorkInProgress !== null) ? invariant(false, 'Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    // `nextRoot` points to the in-progress root. A non-null value indicates
    // that we're in the middle of an async render. Set it to null to indicate
    // there's no more work to be done in the current batch.
    nextRoot = null;
    interruptedBy = null;

    if (nextRenderDidError) {
      // There was an error
      if (hasLowerPriorityWork(root, expirationTime)) {
        // There's lower priority work. If so, it may have the effect of fixing
        // the exception that was just thrown. Exit without committing. This is
        // similar to a suspend, but without a timeout because we're not waiting
        // for a promise to resolve. React will restart at the lower
        // priority level.
        markSuspendedPriorityLevel(root, expirationTime);
        var suspendedExpirationTime = expirationTime;
        var rootExpirationTime = root.expirationTime;
        onSuspend(root, rootWorkInProgress, suspendedExpirationTime, rootExpirationTime, -1 // Indicates no timeout
        );
        return;
      } else if (
      // There's no lower priority work, but we're rendering asynchronously.
      // Synchronously attempt to render the same level one more time. This is
      // similar to a suspend, but without a timeout because we're not waiting
      // for a promise to resolve.
      !root.didError && isYieldy) {
        root.didError = true;
        var _suspendedExpirationTime = root.nextExpirationTimeToWorkOn = expirationTime;
        var _rootExpirationTime = root.expirationTime = Sync;
        onSuspend(root, rootWorkInProgress, _suspendedExpirationTime, _rootExpirationTime, -1 // Indicates no timeout
        );
        return;
      }
    }

    if (isYieldy && nextLatestAbsoluteTimeoutMs !== -1) {
      // The tree was suspended.
      var _suspendedExpirationTime2 = expirationTime;
      markSuspendedPriorityLevel(root, _suspendedExpirationTime2);

      // Find the earliest uncommitted expiration time in the tree, including
      // work that is suspended. The timeout threshold cannot be longer than
      // the overall expiration.
      var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, expirationTime);
      var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
      if (earliestExpirationTimeMs < nextLatestAbsoluteTimeoutMs) {
        nextLatestAbsoluteTimeoutMs = earliestExpirationTimeMs;
      }

      // Subtract the current time from the absolute timeout to get the number
      // of milliseconds until the timeout. In other words, convert an absolute
      // timestamp to a relative time. This is the value that is passed
      // to `setTimeout`.
      var currentTimeMs = expirationTimeToMs(requestCurrentTime());
      var msUntilTimeout = nextLatestAbsoluteTimeoutMs - currentTimeMs;
      msUntilTimeout = msUntilTimeout < 0 ? 0 : msUntilTimeout;

      // TODO: Account for the Just Noticeable Difference

      var _rootExpirationTime2 = root.expirationTime;
      onSuspend(root, rootWorkInProgress, _suspendedExpirationTime2, _rootExpirationTime2, msUntilTimeout);
      return;
    }

    // Ready to commit.
    onComplete(root, rootWorkInProgress, expirationTime);
  }

  function captureCommitPhaseError(sourceFiber, value) {
    var expirationTime = Sync;
    var fiber = sourceFiber.return;
    while (fiber !== null) {
      switch (fiber.tag) {
        case ClassComponent:
          var ctor = fiber.type;
          var instance = fiber.stateNode;
          if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
            var errorInfo = createCapturedValue(value, sourceFiber);
            var update = createClassErrorUpdate(fiber, errorInfo, expirationTime);
            enqueueUpdate(fiber, update);
            scheduleWork(fiber, expirationTime);
            return;
          }
          break;
        case HostRoot:
          {
            var _errorInfo = createCapturedValue(value, sourceFiber);
            var _update = createRootErrorUpdate(fiber, _errorInfo, expirationTime);
            enqueueUpdate(fiber, _update);
            scheduleWork(fiber, expirationTime);
            return;
          }
      }
      fiber = fiber.return;
    }

    if (sourceFiber.tag === HostRoot) {
      // Error was thrown at the root. There is no parent, so the root
      // itself should capture it.
      var rootFiber = sourceFiber;
      var _errorInfo2 = createCapturedValue(value, rootFiber);
      var _update2 = createRootErrorUpdate(rootFiber, _errorInfo2, expirationTime);
      enqueueUpdate(rootFiber, _update2);
      scheduleWork(rootFiber, expirationTime);
    }
  }

  function computeThreadID(expirationTime, interactionThreadID) {
    // Interaction threads are unique per root and expiration time.
    return expirationTime * 1000 + interactionThreadID;
  }

  // Creates a unique async expiration time.
  function computeUniqueAsyncExpiration() {
    var currentTime = requestCurrentTime();
    var result = computeAsyncExpiration(currentTime);
    if (result >= lastUniqueAsyncExpiration) {
      // Since we assume the current time monotonically increases, we only hit
      // this branch when computeUniqueAsyncExpiration is fired multiple times
      // within a 200ms window (or whatever the async bucket size is).
      result = lastUniqueAsyncExpiration - 1;
    }
    lastUniqueAsyncExpiration = result;
    return lastUniqueAsyncExpiration;
  }

  function computeExpirationForFiber(currentTime, fiber) {
    var priorityLevel = scheduler.unstable_getCurrentPriorityLevel();

    var expirationTime = void 0;
    if ((fiber.mode & ConcurrentMode) === NoContext) {
      // Outside of concurrent mode, updates are always synchronous.
      expirationTime = Sync;
    } else if (isWorking && !isCommitting$1) {
      // During render phase, updates expire during as the current render.
      expirationTime = nextRenderExpirationTime;
    } else {
      switch (priorityLevel) {
        case scheduler.unstable_ImmediatePriority:
          expirationTime = Sync;
          break;
        case scheduler.unstable_UserBlockingPriority:
          expirationTime = computeInteractiveExpiration(currentTime);
          break;
        case scheduler.unstable_NormalPriority:
          // This is a normal, concurrent update
          expirationTime = computeAsyncExpiration(currentTime);
          break;
        case scheduler.unstable_LowPriority:
        case scheduler.unstable_IdlePriority:
          expirationTime = Never;
          break;
        default:
          invariant(false, 'Unknown priority level. This error is likely caused by a bug in React. Please file an issue.');
      }

      // If we're in the middle of rendering a tree, do not update at the same
      // expiration time that is already rendering.
      if (nextRoot !== null && expirationTime === nextRenderExpirationTime) {
        expirationTime -= 1;
      }
    }

    // Keep track of the lowest pending interactive expiration time. This
    // allows us to synchronously flush all interactive updates
    // when needed.
    // TODO: Move this to renderer?
    if (priorityLevel === scheduler.unstable_UserBlockingPriority && (lowestPriorityPendingInteractiveExpirationTime === NoWork || expirationTime < lowestPriorityPendingInteractiveExpirationTime)) {
      lowestPriorityPendingInteractiveExpirationTime = expirationTime;
    }

    return expirationTime;
  }

  function renderDidSuspend(root, absoluteTimeoutMs, suspendedTime) {
    // Schedule the timeout.
    if (absoluteTimeoutMs >= 0 && nextLatestAbsoluteTimeoutMs < absoluteTimeoutMs) {
      nextLatestAbsoluteTimeoutMs = absoluteTimeoutMs;
    }
  }

  function renderDidError() {
    nextRenderDidError = true;
  }

  function pingSuspendedRoot(root, thenable, pingTime) {
    // A promise that previously suspended React from committing has resolved.
    // If React is still suspended, try again at the previous level (pingTime).

    var pingCache = root.pingCache;
    if (pingCache !== null) {
      // The thenable resolved, so we no longer need to memoize, because it will
      // never be thrown again.
      pingCache.delete(thenable);
    }

    if (nextRoot !== null && nextRenderExpirationTime === pingTime) {
      // Received a ping at the same priority level at which we're currently
      // rendering. Restart from the root.
      nextRoot = null;
    } else {
      // Confirm that the root is still suspended at this level. Otherwise exit.
      if (isPriorityLevelSuspended(root, pingTime)) {
        // Ping at the original level
        markPingedPriorityLevel(root, pingTime);
        var rootExpirationTime = root.expirationTime;
        if (rootExpirationTime !== NoWork) {
          requestWork(root, rootExpirationTime);
        }
      }
    }
  }

  function retryTimedOutBoundary(boundaryFiber, thenable) {
    // The boundary fiber (a Suspense component) previously timed out and was
    // rendered in its fallback state. One of the promises that suspended it has
    // resolved, which means at least part of the tree was likely unblocked. Try
    var retryCache = void 0;
    if (enableSuspenseServerRenderer) {
      switch (boundaryFiber.tag) {
        case SuspenseComponent:
          retryCache = boundaryFiber.stateNode;
          break;
        case DehydratedSuspenseComponent:
          retryCache = boundaryFiber.memoizedState;
          break;
        default:
          invariant(false, 'Pinged unknown suspense boundary type. This is probably a bug in React.');
      }
    } else {
      retryCache = boundaryFiber.stateNode;
    }
    if (retryCache !== null) {
      // The thenable resolved, so we no longer need to memoize, because it will
      // never be thrown again.
      retryCache.delete(thenable);
    }

    var currentTime = requestCurrentTime();
    var retryTime = computeExpirationForFiber(currentTime, boundaryFiber);
    var root = scheduleWorkToRoot(boundaryFiber, retryTime);
    if (root !== null) {
      markPendingPriorityLevel(root, retryTime);
      var rootExpirationTime = root.expirationTime;
      if (rootExpirationTime !== NoWork) {
        requestWork(root, rootExpirationTime);
      }
    }
  }

  function scheduleWorkToRoot(fiber, expirationTime) {
    recordScheduleUpdate();

    {
      if (fiber.tag === ClassComponent) {
        var instance = fiber.stateNode;
        warnAboutInvalidUpdates(instance);
      }
    }

    // Update the source fiber's expiration time
    if (fiber.expirationTime < expirationTime) {
      fiber.expirationTime = expirationTime;
    }
    var alternate = fiber.alternate;
    if (alternate !== null && alternate.expirationTime < expirationTime) {
      alternate.expirationTime = expirationTime;
    }
    // Walk the parent path to the root and update the child expiration time.
    var node = fiber.return;
    var root = null;
    if (node === null && fiber.tag === HostRoot) {
      root = fiber.stateNode;
    } else {
      while (node !== null) {
        alternate = node.alternate;
        if (node.childExpirationTime < expirationTime) {
          node.childExpirationTime = expirationTime;
          if (alternate !== null && alternate.childExpirationTime < expirationTime) {
            alternate.childExpirationTime = expirationTime;
          }
        } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
          alternate.childExpirationTime = expirationTime;
        }
        if (node.return === null && node.tag === HostRoot) {
          root = node.stateNode;
          break;
        }
        node = node.return;
      }
    }

    if (enableSchedulerTracing) {
      if (root !== null) {
        var interactions = tracing.__interactionsRef.current;
        if (interactions.size > 0) {
          var pendingInteractionMap = root.pendingInteractionMap;
          var pendingInteractions = pendingInteractionMap.get(expirationTime);
          if (pendingInteractions != null) {
            interactions.forEach(function (interaction) {
              if (!pendingInteractions.has(interaction)) {
                // Update the pending async work count for previously unscheduled interaction.
                interaction.__count++;
              }

              pendingInteractions.add(interaction);
            });
          } else {
            pendingInteractionMap.set(expirationTime, new Set(interactions));

            // Update the pending async work count for the current interactions.
            interactions.forEach(function (interaction) {
              interaction.__count++;
            });
          }

          var subscriber = tracing.__subscriberRef.current;
          if (subscriber !== null) {
            var threadID = computeThreadID(expirationTime, root.interactionThreadID);
            subscriber.onWorkScheduled(interactions, threadID);
          }
        }
      }
    }
    return root;
  }

  function warnIfNotCurrentlyBatchingInDev(fiber) {
    {
      if (isRendering === false && isBatchingUpdates === false) {
        warningWithoutStack$1(false, 'An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see in the browser." + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
      }
    }
  }

  function scheduleWork(fiber, expirationTime) {
    var root = scheduleWorkToRoot(fiber, expirationTime);
    if (root === null) {
      {
        switch (fiber.tag) {
          case ClassComponent:
            warnAboutUpdateOnUnmounted(fiber, true);
            break;
          case FunctionComponent:
          case ForwardRef:
          case MemoComponent:
          case SimpleMemoComponent:
            warnAboutUpdateOnUnmounted(fiber, false);
            break;
        }
      }
      return;
    }

    if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime > nextRenderExpirationTime) {
      // This is an interruption. (Used for performance tracking.)
      interruptedBy = fiber;
      resetStack();
    }
    markPendingPriorityLevel(root, expirationTime);
    if (
    // If we're in the render phase, we don't need to schedule this root
    // for an update, because we'll do it before we exit...
    !isWorking || isCommitting$1 ||
    // ...unless this is a different root than the one we're rendering.
    nextRoot !== root) {
      var rootExpirationTime = root.expirationTime;
      requestWork(root, rootExpirationTime);
    }
    if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
      // Reset this back to zero so subsequent updates don't throw.
      nestedUpdateCount = 0;
      invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
    }
  }

  function syncUpdates(fn, a, b, c, d) {
    return scheduler.unstable_runWithPriority(scheduler.unstable_ImmediatePriority, function () {
      return fn(a, b, c, d);
    });
  }

  // TODO: Everything below this is written as if it has been lifted to the
  // renderers. I'll do this in a follow-up.

  // Linked-list of roots
  var firstScheduledRoot = null;
  var lastScheduledRoot = null;

  var callbackExpirationTime = NoWork;
  var callbackID = void 0;
  var isRendering = false;
  var nextFlushedRoot = null;
  var nextFlushedExpirationTime = NoWork;
  var lowestPriorityPendingInteractiveExpirationTime = NoWork;
  var hasUnhandledError = false;
  var unhandledError = null;

  var isBatchingUpdates = false;
  var isUnbatchingUpdates = false;

  var completedBatches = null;

  var originalStartTimeMs = now();
  var currentRendererTime = msToExpirationTime(originalStartTimeMs);
  var currentSchedulerTime = currentRendererTime;

  // Use these to prevent an infinite loop of nested updates
  var NESTED_UPDATE_LIMIT = 50;
  var nestedUpdateCount = 0;
  var lastCommittedRootDuringThisBatch = null;

  function recomputeCurrentRendererTime() {
    var currentTimeMs = now() - originalStartTimeMs;
    currentRendererTime = msToExpirationTime(currentTimeMs);
  }

  function scheduleCallbackWithExpirationTime(root, expirationTime) {
    if (callbackExpirationTime !== NoWork) {
      // A callback is already scheduled. Check its expiration time (timeout).
      if (expirationTime < callbackExpirationTime) {
        // Existing callback has sufficient timeout. Exit.
        return;
      } else {
        if (callbackID !== null) {
          // Existing callback has insufficient timeout. Cancel and schedule a
          // new one.
          cancelDeferredCallback(callbackID);
        }
      }
      // The request callback timer is already running. Don't start a new one.
    } else {
      startRequestCallbackTimer();
    }

    callbackExpirationTime = expirationTime;
    var currentMs = now() - originalStartTimeMs;
    var expirationTimeMs = expirationTimeToMs(expirationTime);
    var timeout = expirationTimeMs - currentMs;
    callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });
  }

  // For every call to renderRoot, one of onFatal, onComplete, onSuspend, and
  // onYield is called upon exiting. We use these in lieu of returning a tuple.
  // I've also chosen not to inline them into renderRoot because these will
  // eventually be lifted into the renderer.
  function onFatal(root) {
    root.finishedWork = null;
  }

  function onComplete(root, finishedWork, expirationTime) {
    root.pendingCommitExpirationTime = expirationTime;
    root.finishedWork = finishedWork;
  }

  function onSuspend(root, finishedWork, suspendedExpirationTime, rootExpirationTime, msUntilTimeout) {
    root.expirationTime = rootExpirationTime;
    if (msUntilTimeout === 0 && !shouldYieldToRenderer()) {
      // Don't wait an additional tick. Commit the tree immediately.
      root.pendingCommitExpirationTime = suspendedExpirationTime;
      root.finishedWork = finishedWork;
    } else if (msUntilTimeout > 0) {
      // Wait `msUntilTimeout` milliseconds before committing.
      root.timeoutHandle = scheduleTimeout(onTimeout.bind(null, root, finishedWork, suspendedExpirationTime), msUntilTimeout);
    }
  }

  function onYield(root) {
    root.finishedWork = null;
  }

  function onTimeout(root, finishedWork, suspendedExpirationTime) {
    // The root timed out. Commit it.
    root.pendingCommitExpirationTime = suspendedExpirationTime;
    root.finishedWork = finishedWork;
    // Read the current time before entering the commit phase. We can be
    // certain this won't cause tearing related to batching of event updates
    // because we're at the top of a timer event.
    recomputeCurrentRendererTime();
    currentSchedulerTime = currentRendererTime;
    flushRoot(root, suspendedExpirationTime);
  }

  function onCommit(root, expirationTime) {
    root.expirationTime = expirationTime;
    root.finishedWork = null;
  }

  function requestCurrentTime() {
    // requestCurrentTime is called by the scheduler to compute an expiration
    // time.
    //
    // Expiration times are computed by adding to the current time (the start
    // time). However, if two updates are scheduled within the same event, we
    // should treat their start times as simultaneous, even if the actual clock
    // time has advanced between the first and second call.

    // In other words, because expiration times determine how updates are batched,
    // we want all updates of like priority that occur within the same event to
    // receive the same expiration time. Otherwise we get tearing.
    //
    // We keep track of two separate times: the current "renderer" time and the
    // current "scheduler" time. The renderer time can be updated whenever; it
    // only exists to minimize the calls performance.now.
    //
    // But the scheduler time can only be updated if there's no pending work, or
    // if we know for certain that we're not in the middle of an event.

    if (isRendering) {
      // We're already rendering. Return the most recently read time.
      return currentSchedulerTime;
    }
    // Check if there's pending work.
    findHighestPriorityRoot();
    if (nextFlushedExpirationTime === NoWork || nextFlushedExpirationTime === Never) {
      // If there's no pending work, or if the pending work is offscreen, we can
      // read the current time without risk of tearing.
      recomputeCurrentRendererTime();
      currentSchedulerTime = currentRendererTime;
      return currentSchedulerTime;
    }
    // There's already pending work. We might be in the middle of a browser
    // event. If we were to read the current time, it could cause multiple updates
    // within the same event to receive different expiration times, leading to
    // tearing. Return the last read time. During the next idle callback, the
    // time will be updated.
    return currentSchedulerTime;
  }

  // requestWork is called by the scheduler whenever a root receives an update.
  // It's up to the renderer to call renderRoot at some point in the future.
  function requestWork(root, expirationTime) {
    addRootToSchedule(root, expirationTime);
    if (isRendering) {
      // Prevent reentrancy. Remaining work will be scheduled at the end of
      // the currently rendering batch.
      return;
    }

    if (isBatchingUpdates) {
      // Flush work at the end of the batch.
      if (isUnbatchingUpdates) {
        // ...unless we're inside unbatchedUpdates, in which case we should
        // flush it now.
        nextFlushedRoot = root;
        nextFlushedExpirationTime = Sync;
        performWorkOnRoot(root, Sync, false);
      }
      return;
    }

    // TODO: Get rid of Sync and use current time?
    if (expirationTime === Sync) {
      performSyncWork();
    } else {
      scheduleCallbackWithExpirationTime(root, expirationTime);
    }
  }

  function addRootToSchedule(root, expirationTime) {
    // Add the root to the schedule.
    // Check if this root is already part of the schedule.
    if (root.nextScheduledRoot === null) {
      // This root is not already scheduled. Add it.
      root.expirationTime = expirationTime;
      if (lastScheduledRoot === null) {
        firstScheduledRoot = lastScheduledRoot = root;
        root.nextScheduledRoot = root;
      } else {
        lastScheduledRoot.nextScheduledRoot = root;
        lastScheduledRoot = root;
        lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
      }
    } else {
      // This root is already scheduled, but its priority may have increased.
      var remainingExpirationTime = root.expirationTime;
      if (expirationTime > remainingExpirationTime) {
        // Update the priority.
        root.expirationTime = expirationTime;
      }
    }
  }

  function findHighestPriorityRoot() {
    var highestPriorityWork = NoWork;
    var highestPriorityRoot = null;
    if (lastScheduledRoot !== null) {
      var previousScheduledRoot = lastScheduledRoot;
      var root = firstScheduledRoot;
      while (root !== null) {
        var remainingExpirationTime = root.expirationTime;
        if (remainingExpirationTime === NoWork) {
          // This root no longer has work. Remove it from the scheduler.

          // TODO: This check is redudant, but Flow is confused by the branch
          // below where we set lastScheduledRoot to null, even though we break
          // from the loop right after.
          !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
          if (root === root.nextScheduledRoot) {
            // This is the only root in the list.
            root.nextScheduledRoot = null;
            firstScheduledRoot = lastScheduledRoot = null;
            break;
          } else if (root === firstScheduledRoot) {
            // This is the first root in the list.
            var next = root.nextScheduledRoot;
            firstScheduledRoot = next;
            lastScheduledRoot.nextScheduledRoot = next;
            root.nextScheduledRoot = null;
          } else if (root === lastScheduledRoot) {
            // This is the last root in the list.
            lastScheduledRoot = previousScheduledRoot;
            lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
            root.nextScheduledRoot = null;
            break;
          } else {
            previousScheduledRoot.nextScheduledRoot = root.nextScheduledRoot;
            root.nextScheduledRoot = null;
          }
          root = previousScheduledRoot.nextScheduledRoot;
        } else {
          if (remainingExpirationTime > highestPriorityWork) {
            // Update the priority, if it's higher
            highestPriorityWork = remainingExpirationTime;
            highestPriorityRoot = root;
          }
          if (root === lastScheduledRoot) {
            break;
          }
          if (highestPriorityWork === Sync) {
            // Sync is highest priority by definition so
            // we can stop searching.
            break;
          }
          previousScheduledRoot = root;
          root = root.nextScheduledRoot;
        }
      }
    }

    nextFlushedRoot = highestPriorityRoot;
    nextFlushedExpirationTime = highestPriorityWork;
  }

  // TODO: This wrapper exists because many of the older tests (the ones that use
  // flushDeferredPri) rely on the number of times `shouldYield` is called. We
  // should get rid of it.
  var didYield = false;
  function shouldYieldToRenderer() {
    if (didYield) {
      return true;
    }
    if (shouldYield()) {
      didYield = true;
      return true;
    }
    return false;
  }

  function performAsyncWork() {
    try {
      if (!shouldYieldToRenderer()) {
        // The callback timed out. That means at least one update has expired.
        // Iterate through the root schedule. If they contain expired work, set
        // the next render expiration time to the current time. This has the effect
        // of flushing all expired work in a single batch, instead of flushing each
        // level one at a time.
        if (firstScheduledRoot !== null) {
          recomputeCurrentRendererTime();
          var root = firstScheduledRoot;
          do {
            didExpireAtExpirationTime(root, currentRendererTime);
            // The root schedule is circular, so this is never null.
            root = root.nextScheduledRoot;
          } while (root !== firstScheduledRoot);
        }
      }
      performWork(NoWork, true);
    } finally {
      didYield = false;
    }
  }

  function performSyncWork() {
    performWork(Sync, false);
  }

  function performWork(minExpirationTime, isYieldy) {
    // Keep working on roots until there's no more work, or until there's a higher
    // priority event.
    findHighestPriorityRoot();

    if (isYieldy) {
      recomputeCurrentRendererTime();
      currentSchedulerTime = currentRendererTime;

      if (enableUserTimingAPI) {
        var didExpire = nextFlushedExpirationTime > currentRendererTime;
        var timeout = expirationTimeToMs(nextFlushedExpirationTime);
        stopRequestCallbackTimer(didExpire, timeout);
      }

      while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime && !(didYield && currentRendererTime > nextFlushedExpirationTime)) {
        performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, currentRendererTime > nextFlushedExpirationTime);
        findHighestPriorityRoot();
        recomputeCurrentRendererTime();
        currentSchedulerTime = currentRendererTime;
      }
    } else {
      while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime) {
        performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false);
        findHighestPriorityRoot();
      }
    }

    // We're done flushing work. Either we ran out of time in this callback,
    // or there's no more work left with sufficient priority.

    // If we're inside a callback, set this to false since we just completed it.
    if (isYieldy) {
      callbackExpirationTime = NoWork;
      callbackID = null;
    }
    // If there's work left over, schedule a new callback.
    if (nextFlushedExpirationTime !== NoWork) {
      scheduleCallbackWithExpirationTime(nextFlushedRoot, nextFlushedExpirationTime);
    }

    // Clean-up.
    finishRendering();
  }

  function flushRoot(root, expirationTime) {
    !!isRendering ? invariant(false, 'work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.') : void 0;
    // Perform work on root as if the given expiration time is the current time.
    // This has the effect of synchronously flushing all work up to and
    // including the given time.
    nextFlushedRoot = root;
    nextFlushedExpirationTime = expirationTime;
    performWorkOnRoot(root, expirationTime, false);
    // Flush any sync work that was scheduled by lifecycles
    performSyncWork();
  }

  function finishRendering() {
    nestedUpdateCount = 0;
    lastCommittedRootDuringThisBatch = null;

    if (completedBatches !== null) {
      var batches = completedBatches;
      completedBatches = null;
      for (var i = 0; i < batches.length; i++) {
        var batch = batches[i];
        try {
          batch._onComplete();
        } catch (error) {
          if (!hasUnhandledError) {
            hasUnhandledError = true;
            unhandledError = error;
          }
        }
      }
    }

    if (hasUnhandledError) {
      var error = unhandledError;
      unhandledError = null;
      hasUnhandledError = false;
      throw error;
    }
  }

  function performWorkOnRoot(root, expirationTime, isYieldy) {
    !!isRendering ? invariant(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;

    isRendering = true;

    // Check if this is async work or sync/expired work.
    if (!isYieldy) {
      // Flush work without yielding.
      // TODO: Non-yieldy work does not necessarily imply expired work. A renderer
      // may want to perform some work without yielding, but also without
      // requiring the root to complete (by triggering placeholders).

      var finishedWork = root.finishedWork;
      if (finishedWork !== null) {
        // This root is already complete. We can commit it.
        completeRoot(root, finishedWork, expirationTime);
      } else {
        root.finishedWork = null;
        // If this root previously suspended, clear its existing timeout, since
        // we're about to try rendering again.
        var timeoutHandle = root.timeoutHandle;
        if (timeoutHandle !== noTimeout) {
          root.timeoutHandle = noTimeout;
          // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
          cancelTimeout(timeoutHandle);
        }
        renderRoot(root, isYieldy);
        finishedWork = root.finishedWork;
        if (finishedWork !== null) {
          // We've completed the root. Commit it.
          completeRoot(root, finishedWork, expirationTime);
        }
      }
    } else {
      // Flush async work.
      var _finishedWork = root.finishedWork;
      if (_finishedWork !== null) {
        // This root is already complete. We can commit it.
        completeRoot(root, _finishedWork, expirationTime);
      } else {
        root.finishedWork = null;
        // If this root previously suspended, clear its existing timeout, since
        // we're about to try rendering again.
        var _timeoutHandle = root.timeoutHandle;
        if (_timeoutHandle !== noTimeout) {
          root.timeoutHandle = noTimeout;
          // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
          cancelTimeout(_timeoutHandle);
        }
        renderRoot(root, isYieldy);
        _finishedWork = root.finishedWork;
        if (_finishedWork !== null) {
          // We've completed the root. Check the if we should yield one more time
          // before committing.
          if (!shouldYieldToRenderer()) {
            // Still time left. Commit the root.
            completeRoot(root, _finishedWork, expirationTime);
          } else {
            // There's no time left. Mark this root as complete. We'll come
            // back and commit it later.
            root.finishedWork = _finishedWork;
          }
        }
      }
    }

    isRendering = false;
  }

  function completeRoot(root, finishedWork, expirationTime) {
    // Check if there's a batch that matches this expiration time.
    var firstBatch = root.firstBatch;
    if (firstBatch !== null && firstBatch._expirationTime >= expirationTime) {
      if (completedBatches === null) {
        completedBatches = [firstBatch];
      } else {
        completedBatches.push(firstBatch);
      }
      if (firstBatch._defer) {
        // This root is blocked from committing by a batch. Unschedule it until
        // we receive another update.
        root.finishedWork = finishedWork;
        root.expirationTime = NoWork;
        return;
      }
    }

    // Commit the root.
    root.finishedWork = null;

    // Check if this is a nested update (a sync update scheduled during the
    // commit phase).
    if (root === lastCommittedRootDuringThisBatch) {
      // If the next root is the same as the previous root, this is a nested
      // update. To prevent an infinite loop, increment the nested update count.
      nestedUpdateCount++;
    } else {
      // Reset whenever we switch roots.
      lastCommittedRootDuringThisBatch = root;
      nestedUpdateCount = 0;
    }
    scheduler.unstable_runWithPriority(scheduler.unstable_ImmediatePriority, function () {
      commitRoot(root, finishedWork);
    });
  }

  function onUncaughtError(error) {
    !(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
    // Unschedule this root so we don't work on it again until there's
    // another update.
    nextFlushedRoot.expirationTime = NoWork;
    if (!hasUnhandledError) {
      hasUnhandledError = true;
      unhandledError = error;
    }
  }

  // TODO: Batching should be implemented at the renderer level, not inside
  // the reconciler.
  function batchedUpdates(fn, a) {
    var previousIsBatchingUpdates = isBatchingUpdates;
    isBatchingUpdates = true;
    try {
      return fn(a);
    } finally {
      isBatchingUpdates = previousIsBatchingUpdates;
      if (!isBatchingUpdates && !isRendering) {
        performSyncWork();
      }
    }
  }

  // TODO: Batching should be implemented at the renderer level, not inside
  // the reconciler.
  function unbatchedUpdates(fn, a) {
    if (isBatchingUpdates && !isUnbatchingUpdates) {
      isUnbatchingUpdates = true;
      try {
        return fn(a);
      } finally {
        isUnbatchingUpdates = false;
      }
    }
    return fn(a);
  }

  // TODO: Batching should be implemented at the renderer level, not within
  // the reconciler.
  function flushSync(fn, a) {
    !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
    var previousIsBatchingUpdates = isBatchingUpdates;
    isBatchingUpdates = true;
    try {
      return syncUpdates(fn, a);
    } finally {
      isBatchingUpdates = previousIsBatchingUpdates;
      performSyncWork();
    }
  }

  function interactiveUpdates(fn, a, b) {
    // If there are any pending interactive updates, synchronously flush them.
    // This needs to happen before we read any handlers, because the effect of
    // the previous event may influence which handlers are called during
    // this event.
    if (!isBatchingUpdates && !isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
      // Synchronously flush pending interactive updates.
      performWork(lowestPriorityPendingInteractiveExpirationTime, false);
      lowestPriorityPendingInteractiveExpirationTime = NoWork;
    }
    var previousIsBatchingUpdates = isBatchingUpdates;
    isBatchingUpdates = true;
    try {
      return scheduler.unstable_runWithPriority(scheduler.unstable_UserBlockingPriority, function () {
        return fn(a, b);
      });
    } finally {
      isBatchingUpdates = previousIsBatchingUpdates;
      if (!isBatchingUpdates && !isRendering) {
        performSyncWork();
      }
    }
  }

  function flushInteractiveUpdates() {
    if (!isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
      // Synchronously flush pending interactive updates.
      performWork(lowestPriorityPendingInteractiveExpirationTime, false);
      lowestPriorityPendingInteractiveExpirationTime = NoWork;
    }
  }

  function flushControlled(fn) {
    var previousIsBatchingUpdates = isBatchingUpdates;
    isBatchingUpdates = true;
    try {
      syncUpdates(fn);
    } finally {
      isBatchingUpdates = previousIsBatchingUpdates;
      if (!isBatchingUpdates && !isRendering) {
        performSyncWork();
      }
    }
  }

  // 0 is PROD, 1 is DEV.
  // Might add PROFILE later.


  var didWarnAboutNestedUpdates = void 0;
  var didWarnAboutFindNodeInStrictMode = void 0;

  {
    didWarnAboutNestedUpdates = false;
    didWarnAboutFindNodeInStrictMode = {};
  }

  function getContextForSubtree(parentComponent) {
    if (!parentComponent) {
      return emptyContextObject;
    }

    var fiber = get(parentComponent);
    var parentContext = findCurrentUnmaskedContext(fiber);

    if (fiber.tag === ClassComponent) {
      var Component = fiber.type;
      if (isContextProvider(Component)) {
        return processChildContext(fiber, Component, parentContext);
      }
    }

    return parentContext;
  }

  function scheduleRootUpdate(current$$1, element, expirationTime, callback) {
    {
      if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
        didWarnAboutNestedUpdates = true;
        warningWithoutStack$1(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
      }
    }

    var update = createUpdate(expirationTime);
    // Caution: React DevTools currently depends on this property
    // being called "element".
    update.payload = { element: element };

    callback = callback === undefined ? null : callback;
    if (callback !== null) {
      !(typeof callback === 'function') ? warningWithoutStack$1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
      update.callback = callback;
    }

    flushPassiveEffects();
    enqueueUpdate(current$$1, update);
    scheduleWork(current$$1, expirationTime);

    return expirationTime;
  }

  function updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback) {
    // TODO: If this is a nested container, this won't be the root.
    var current$$1 = container.current;

    {
      if (ReactFiberInstrumentation_1.debugTool) {
        if (current$$1.alternate === null) {
          ReactFiberInstrumentation_1.debugTool.onMountContainer(container);
        } else if (element === null) {
          ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);
        } else {
          ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);
        }
      }
    }

    var context = getContextForSubtree(parentComponent);
    if (container.context === null) {
      container.context = context;
    } else {
      container.pendingContext = context;
    }

    return scheduleRootUpdate(current$$1, element, expirationTime, callback);
  }

  function findHostInstance(component) {
    var fiber = get(component);
    if (fiber === undefined) {
      if (typeof component.render === 'function') {
        invariant(false, 'Unable to find node on an unmounted component.');
      } else {
        invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
      }
    }
    var hostFiber = findCurrentHostFiber(fiber);
    if (hostFiber === null) {
      return null;
    }
    return hostFiber.stateNode;
  }

  function findHostInstanceWithWarning(component, methodName) {
    {
      var fiber = get(component);
      if (fiber === undefined) {
        if (typeof component.render === 'function') {
          invariant(false, 'Unable to find node on an unmounted component.');
        } else {
          invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
        }
      }
      var hostFiber = findCurrentHostFiber(fiber);
      if (hostFiber === null) {
        return null;
      }
      if (hostFiber.mode & StrictMode) {
        var componentName = getComponentName(fiber.type) || 'Component';
        if (!didWarnAboutFindNodeInStrictMode[componentName]) {
          didWarnAboutFindNodeInStrictMode[componentName] = true;
          if (fiber.mode & StrictMode) {
            warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
          } else {
            warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
          }
        }
      }
      return hostFiber.stateNode;
    }
    return findHostInstance(component);
  }

  function createContainer(containerInfo, isConcurrent, hydrate) {
    return createFiberRoot(containerInfo, isConcurrent, hydrate);
  }

  function updateContainer(element, container, parentComponent, callback) {
    var current$$1 = container.current;
    var currentTime = requestCurrentTime();
    var expirationTime = computeExpirationForFiber(currentTime, current$$1);
    return updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback);
  }

  function getPublicRootInstance(container) {
    var containerFiber = container.current;
    if (!containerFiber.child) {
      return null;
    }
    switch (containerFiber.child.tag) {
      case HostComponent:
        return getPublicInstance(containerFiber.child.stateNode);
      default:
        return containerFiber.child.stateNode;
    }
  }

  function findHostInstanceWithNoPortals(fiber) {
    var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
    if (hostFiber === null) {
      return null;
    }
    return hostFiber.stateNode;
  }

  var overrideProps = null;

  {
    var copyWithSetImpl = function (obj, path, idx, value) {
      if (idx >= path.length) {
        return value;
      }
      var key = path[idx];
      var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
      // $FlowFixMe number or string is fine here
      updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
      return updated;
    };

    var copyWithSet = function (obj, path, value) {
      return copyWithSetImpl(obj, path, 0, value);
    };

    // Support DevTools props for function components, forwardRef, memo, host components, etc.
    overrideProps = function (fiber, path, value) {
      flushPassiveEffects();
      fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
      if (fiber.alternate) {
        fiber.alternate.pendingProps = fiber.pendingProps;
      }
      scheduleWork(fiber, Sync);
    };
  }

  function injectIntoDevTools(devToolsConfig) {
    var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
    var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;


    return injectInternals(_assign({}, devToolsConfig, {
      overrideProps: overrideProps,
      currentDispatcherRef: ReactCurrentDispatcher,
      findHostInstanceByFiber: function (fiber) {
        var hostFiber = findCurrentHostFiber(fiber);
        if (hostFiber === null) {
          return null;
        }
        return hostFiber.stateNode;
      },
      findFiberByHostInstance: function (instance) {
        if (!findFiberByHostInstance) {
          // Might not be implemented by the renderer.
          return null;
        }
        return findFiberByHostInstance(instance);
      }
    }));
  }

  var ReactFiberReconciler = Object.freeze({
  	updateContainerAtExpirationTime: updateContainerAtExpirationTime,
  	createContainer: createContainer,
  	updateContainer: updateContainer,
  	flushRoot: flushRoot,
  	requestWork: requestWork,
  	computeUniqueAsyncExpiration: computeUniqueAsyncExpiration,
  	batchedUpdates: batchedUpdates,
  	unbatchedUpdates: unbatchedUpdates,
  	deferredUpdates: scheduler.unstable_next,
  	syncUpdates: syncUpdates,
  	interactiveUpdates: interactiveUpdates,
  	flushInteractiveUpdates: flushInteractiveUpdates,
  	flushControlled: flushControlled,
  	flushSync: flushSync,
  	getPublicRootInstance: getPublicRootInstance,
  	findHostInstance: findHostInstance,
  	findHostInstanceWithWarning: findHostInstanceWithWarning,
  	findHostInstanceWithNoPortals: findHostInstanceWithNoPortals,
  	injectIntoDevTools: injectIntoDevTools
  });

  // This entry point is intentionally not typed. It exists only for third-party
  // renderers. The renderers we ship (such as React DOM) instead import a named
  // "inline" entry point (for example, `react-reconciler/inline.dom`). It uses
  // the same code, but the Flow configuration redirects the host config to its
  // real implementation so we can check it against exact intended host types.
  //
  // Only one renderer (the one you passed to `yarn flow <renderer>`) is fully
  // type-checked at any given time. The Flow config maps the
  // `react-reconciler/inline.<renderer>` import (which is *not* Flow typed) to
  // `react-reconciler/inline-typed` (which *is*) for the current renderer.
  // On CI, we run Flow checks for each renderer separately.





  // TODO: decide on the top-level export form.
  // This is hacky but makes it work with both Rollup and Jest.
  var reactReconciler = ReactFiberReconciler.default || ReactFiberReconciler;

  module.exports = reactReconciler;
      var $$$renderer = module.exports;
      module.exports = $$$reconciler;
      return $$$renderer;
    };
  }


  /***/ }),
  /* 51 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  if (false) {} else {
    module.exports = __webpack_require__(52);
  }


  /***/ }),
  /* 52 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /** @license React v0.13.6
   * scheduler-tracing.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */





  if (true) {
    (function() {
  'use strict';

  Object.defineProperty(exports, '__esModule', { value: true });

  // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:


  // In some cases, StrictMode should also double-render lifecycles.
  // This can be confusing for tests though,
  // And it can be bad for performance in production.
  // This feature flag can be used to control the behavior:


  // To preserve the "Pause on caught exceptions" behavior of the debugger, we
  // replay the begin phase of a failed component inside invokeGuardedCallback.


  // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:


  // Gather advanced timing metrics for Profiler subtrees.


  // Trace which interactions trigger each commit.
  var enableSchedulerTracing = true;

  // Only used in www builds.
   // TODO: true? Here it might just be false.

  // Only used in www builds.


  // Only used in www builds.


  // React Fire: prevent the value and checked attributes from syncing
  // with their related DOM properties


  // These APIs will no longer be "unstable" in the upcoming 16.7 release,
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.

  var DEFAULT_THREAD_ID = 0;

  // Counters used to generate unique IDs.
  var interactionIDCounter = 0;
  var threadIDCounter = 0;

  // Set of currently traced interactions.
  // Interactions "stack"–
  // Meaning that newly traced interactions are appended to the previously active set.
  // When an interaction goes out of scope, the previous set (if any) is restored.
  exports.__interactionsRef = null;

  // Listener(s) to notify when interactions begin and end.
  exports.__subscriberRef = null;

  if (enableSchedulerTracing) {
    exports.__interactionsRef = {
      current: new Set()
    };
    exports.__subscriberRef = {
      current: null
    };
  }

  function unstable_clear(callback) {
    if (!enableSchedulerTracing) {
      return callback();
    }

    var prevInteractions = exports.__interactionsRef.current;
    exports.__interactionsRef.current = new Set();

    try {
      return callback();
    } finally {
      exports.__interactionsRef.current = prevInteractions;
    }
  }

  function unstable_getCurrent() {
    if (!enableSchedulerTracing) {
      return null;
    } else {
      return exports.__interactionsRef.current;
    }
  }

  function unstable_getThreadID() {
    return ++threadIDCounter;
  }

  function unstable_trace(name, timestamp, callback) {
    var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;

    if (!enableSchedulerTracing) {
      return callback();
    }

    var interaction = {
      __count: 1,
      id: interactionIDCounter++,
      name: name,
      timestamp: timestamp
    };

    var prevInteractions = exports.__interactionsRef.current;

    // Traced interactions should stack/accumulate.
    // To do that, clone the current interactions.
    // The previous set will be restored upon completion.
    var interactions = new Set(prevInteractions);
    interactions.add(interaction);
    exports.__interactionsRef.current = interactions;

    var subscriber = exports.__subscriberRef.current;
    var returnValue = void 0;

    try {
      if (subscriber !== null) {
        subscriber.onInteractionTraced(interaction);
      }
    } finally {
      try {
        if (subscriber !== null) {
          subscriber.onWorkStarted(interactions, threadID);
        }
      } finally {
        try {
          returnValue = callback();
        } finally {
          exports.__interactionsRef.current = prevInteractions;

          try {
            if (subscriber !== null) {
              subscriber.onWorkStopped(interactions, threadID);
            }
          } finally {
            interaction.__count--;

            // If no async work was scheduled for this interaction,
            // Notify subscribers that it's completed.
            if (subscriber !== null && interaction.__count === 0) {
              subscriber.onInteractionScheduledWorkCompleted(interaction);
            }
          }
        }
      }
    }

    return returnValue;
  }

  function unstable_wrap(callback) {
    var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;

    if (!enableSchedulerTracing) {
      return callback;
    }

    var wrappedInteractions = exports.__interactionsRef.current;

    var subscriber = exports.__subscriberRef.current;
    if (subscriber !== null) {
      subscriber.onWorkScheduled(wrappedInteractions, threadID);
    }

    // Update the pending async work count for the current interactions.
    // Update after calling subscribers in case of error.
    wrappedInteractions.forEach(function (interaction) {
      interaction.__count++;
    });

    var hasRun = false;

    function wrapped() {
      var prevInteractions = exports.__interactionsRef.current;
      exports.__interactionsRef.current = wrappedInteractions;

      subscriber = exports.__subscriberRef.current;

      try {
        var returnValue = void 0;

        try {
          if (subscriber !== null) {
            subscriber.onWorkStarted(wrappedInteractions, threadID);
          }
        } finally {
          try {
            returnValue = callback.apply(undefined, arguments);
          } finally {
            exports.__interactionsRef.current = prevInteractions;

            if (subscriber !== null) {
              subscriber.onWorkStopped(wrappedInteractions, threadID);
            }
          }
        }

        return returnValue;
      } finally {
        if (!hasRun) {
          // We only expect a wrapped function to be executed once,
          // But in the event that it's executed more than once–
          // Only decrement the outstanding interaction counts once.
          hasRun = true;

          // Update pending async counts for all wrapped interactions.
          // If this was the last scheduled async work for any of them,
          // Mark them as completed.
          wrappedInteractions.forEach(function (interaction) {
            interaction.__count--;

            if (subscriber !== null && interaction.__count === 0) {
              subscriber.onInteractionScheduledWorkCompleted(interaction);
            }
          });
        }
      }
    }

    wrapped.cancel = function cancel() {
      subscriber = exports.__subscriberRef.current;

      try {
        if (subscriber !== null) {
          subscriber.onWorkCanceled(wrappedInteractions, threadID);
        }
      } finally {
        // Update pending async counts for all wrapped interactions.
        // If this was the last scheduled async work for any of them,
        // Mark them as completed.
        wrappedInteractions.forEach(function (interaction) {
          interaction.__count--;

          if (subscriber && interaction.__count === 0) {
            subscriber.onInteractionScheduledWorkCompleted(interaction);
          }
        });
      }
    };

    return wrapped;
  }

  var subscribers = null;
  if (enableSchedulerTracing) {
    subscribers = new Set();
  }

  function unstable_subscribe(subscriber) {
    if (enableSchedulerTracing) {
      subscribers.add(subscriber);

      if (subscribers.size === 1) {
        exports.__subscriberRef.current = {
          onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
          onInteractionTraced: onInteractionTraced,
          onWorkCanceled: onWorkCanceled,
          onWorkScheduled: onWorkScheduled,
          onWorkStarted: onWorkStarted,
          onWorkStopped: onWorkStopped
        };
      }
    }
  }

  function unstable_unsubscribe(subscriber) {
    if (enableSchedulerTracing) {
      subscribers.delete(subscriber);

      if (subscribers.size === 0) {
        exports.__subscriberRef.current = null;
      }
    }
  }

  function onInteractionTraced(interaction) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onInteractionTraced(interaction);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  function onInteractionScheduledWorkCompleted(interaction) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onInteractionScheduledWorkCompleted(interaction);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  function onWorkScheduled(interactions, threadID) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onWorkScheduled(interactions, threadID);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  function onWorkStarted(interactions, threadID) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onWorkStarted(interactions, threadID);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  function onWorkStopped(interactions, threadID) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onWorkStopped(interactions, threadID);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  function onWorkCanceled(interactions, threadID) {
    var didCatchError = false;
    var caughtError = null;

    subscribers.forEach(function (subscriber) {
      try {
        subscriber.onWorkCanceled(interactions, threadID);
      } catch (error) {
        if (!didCatchError) {
          didCatchError = true;
          caughtError = error;
        }
      }
    });

    if (didCatchError) {
      throw caughtError;
    }
  }

  exports.unstable_clear = unstable_clear;
  exports.unstable_getCurrent = unstable_getCurrent;
  exports.unstable_getThreadID = unstable_getThreadID;
  exports.unstable_trace = unstable_trace;
  exports.unstable_wrap = unstable_wrap;
  exports.unstable_subscribe = unstable_subscribe;
  exports.unstable_unsubscribe = unstable_unsubscribe;
    })();
  }


  /***/ }),
  /* 53 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  if (false) {} else {
    module.exports = __webpack_require__(54);
  }


  /***/ }),
  /* 54 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /** @license React v0.13.6
   * scheduler.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */





  if (true) {
    (function() {
  'use strict';

  Object.defineProperty(exports, '__esModule', { value: true });

  var enableSchedulerDebugging = false;

  /* eslint-disable no-var */

  // TODO: Use symbols?
  var ImmediatePriority = 1;
  var UserBlockingPriority = 2;
  var NormalPriority = 3;
  var LowPriority = 4;
  var IdlePriority = 5;

  // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
  // Math.pow(2, 30) - 1
  // 0b111111111111111111111111111111
  var maxSigned31BitInt = 1073741823;

  // Times out immediately
  var IMMEDIATE_PRIORITY_TIMEOUT = -1;
  // Eventually times out
  var USER_BLOCKING_PRIORITY = 250;
  var NORMAL_PRIORITY_TIMEOUT = 5000;
  var LOW_PRIORITY_TIMEOUT = 10000;
  // Never times out
  var IDLE_PRIORITY = maxSigned31BitInt;

  // Callbacks are stored as a circular, doubly linked list.
  var firstCallbackNode = null;

  var currentDidTimeout = false;
  // Pausing the scheduler is useful for debugging.
  var isSchedulerPaused = false;

  var currentPriorityLevel = NormalPriority;
  var currentEventStartTime = -1;
  var currentExpirationTime = -1;

  // This is set when a callback is being executed, to prevent re-entrancy.
  var isExecutingCallback = false;

  var isHostCallbackScheduled = false;

  var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';

  function ensureHostCallbackIsScheduled() {
    if (isExecutingCallback) {
      // Don't schedule work yet; wait until the next time we yield.
      return;
    }
    // Schedule the host callback using the earliest expiration in the list.
    var expirationTime = firstCallbackNode.expirationTime;
    if (!isHostCallbackScheduled) {
      isHostCallbackScheduled = true;
    } else {
      // Cancel the existing host callback.
      cancelHostCallback();
    }
    requestHostCallback(flushWork, expirationTime);
  }

  function flushFirstCallback() {
    var flushedNode = firstCallbackNode;

    // Remove the node from the list before calling the callback. That way the
    // list is in a consistent state even if the callback throws.
    var next = firstCallbackNode.next;
    if (firstCallbackNode === next) {
      // This is the last callback in the list.
      firstCallbackNode = null;
      next = null;
    } else {
      var lastCallbackNode = firstCallbackNode.previous;
      firstCallbackNode = lastCallbackNode.next = next;
      next.previous = lastCallbackNode;
    }

    flushedNode.next = flushedNode.previous = null;

    // Now it's safe to call the callback.
    var callback = flushedNode.callback;
    var expirationTime = flushedNode.expirationTime;
    var priorityLevel = flushedNode.priorityLevel;
    var previousPriorityLevel = currentPriorityLevel;
    var previousExpirationTime = currentExpirationTime;
    currentPriorityLevel = priorityLevel;
    currentExpirationTime = expirationTime;
    var continuationCallback;
    try {
      continuationCallback = callback();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentExpirationTime = previousExpirationTime;
    }

    // A callback may return a continuation. The continuation should be scheduled
    // with the same priority and expiration as the just-finished callback.
    if (typeof continuationCallback === 'function') {
      var continuationNode = {
        callback: continuationCallback,
        priorityLevel: priorityLevel,
        expirationTime: expirationTime,
        next: null,
        previous: null
      };

      // Insert the new callback into the list, sorted by its expiration. This is
      // almost the same as the code in `scheduleCallback`, except the callback
      // is inserted into the list *before* callbacks of equal expiration instead
      // of after.
      if (firstCallbackNode === null) {
        // This is the first callback in the list.
        firstCallbackNode = continuationNode.next = continuationNode.previous = continuationNode;
      } else {
        var nextAfterContinuation = null;
        var node = firstCallbackNode;
        do {
          if (node.expirationTime >= expirationTime) {
            // This callback expires at or after the continuation. We will insert
            // the continuation *before* this callback.
            nextAfterContinuation = node;
            break;
          }
          node = node.next;
        } while (node !== firstCallbackNode);

        if (nextAfterContinuation === null) {
          // No equal or lower priority callback was found, which means the new
          // callback is the lowest priority callback in the list.
          nextAfterContinuation = firstCallbackNode;
        } else if (nextAfterContinuation === firstCallbackNode) {
          // The new callback is the highest priority callback in the list.
          firstCallbackNode = continuationNode;
          ensureHostCallbackIsScheduled();
        }

        var previous = nextAfterContinuation.previous;
        previous.next = nextAfterContinuation.previous = continuationNode;
        continuationNode.next = nextAfterContinuation;
        continuationNode.previous = previous;
      }
    }
  }

  function flushImmediateWork() {
    if (
    // Confirm we've exited the outer most event handler
    currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
      isExecutingCallback = true;
      try {
        do {
          flushFirstCallback();
        } while (
        // Keep flushing until there are no more immediate callbacks
        firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
      } finally {
        isExecutingCallback = false;
        if (firstCallbackNode !== null) {
          // There's still work remaining. Request another callback.
          ensureHostCallbackIsScheduled();
        } else {
          isHostCallbackScheduled = false;
        }
      }
    }
  }

  function flushWork(didTimeout) {
    // Exit right away if we're currently paused

    if (enableSchedulerDebugging && isSchedulerPaused) {
      return;
    }

    isExecutingCallback = true;
    var previousDidTimeout = currentDidTimeout;
    currentDidTimeout = didTimeout;
    try {
      if (didTimeout) {
        // Flush all the expired callbacks without yielding.
        while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {
          // TODO Wrap in feature flag
          // Read the current time. Flush all the callbacks that expire at or
          // earlier than that time. Then read the current time again and repeat.
          // This optimizes for as few performance.now calls as possible.
          var currentTime = exports.unstable_now();
          if (firstCallbackNode.expirationTime <= currentTime) {
            do {
              flushFirstCallback();
            } while (firstCallbackNode !== null && firstCallbackNode.expirationTime <= currentTime && !(enableSchedulerDebugging && isSchedulerPaused));
            continue;
          }
          break;
        }
      } else {
        // Keep flushing callbacks until we run out of time in the frame.
        if (firstCallbackNode !== null) {
          do {
            if (enableSchedulerDebugging && isSchedulerPaused) {
              break;
            }
            flushFirstCallback();
          } while (firstCallbackNode !== null && !shouldYieldToHost());
        }
      }
    } finally {
      isExecutingCallback = false;
      currentDidTimeout = previousDidTimeout;
      if (firstCallbackNode !== null) {
        // There's still work remaining. Request another callback.
        ensureHostCallbackIsScheduled();
      } else {
        isHostCallbackScheduled = false;
      }
      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_runWithPriority(priorityLevel, eventHandler) {
    switch (priorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
      case LowPriority:
      case IdlePriority:
        break;
      default:
        priorityLevel = NormalPriority;
    }

    var previousPriorityLevel = currentPriorityLevel;
    var previousEventStartTime = currentEventStartTime;
    currentPriorityLevel = priorityLevel;
    currentEventStartTime = exports.unstable_now();

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentEventStartTime = previousEventStartTime;

      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_next(eventHandler) {
    var priorityLevel = void 0;
    switch (currentPriorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
        // Shift down to normal priority
        priorityLevel = NormalPriority;
        break;
      default:
        // Anything lower than normal priority should remain at the current level.
        priorityLevel = currentPriorityLevel;
        break;
    }

    var previousPriorityLevel = currentPriorityLevel;
    var previousEventStartTime = currentEventStartTime;
    currentPriorityLevel = priorityLevel;
    currentEventStartTime = exports.unstable_now();

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
      currentEventStartTime = previousEventStartTime;

      // Before exiting, flush all the immediate work that was scheduled.
      flushImmediateWork();
    }
  }

  function unstable_wrapCallback(callback) {
    var parentPriorityLevel = currentPriorityLevel;
    return function () {
      // This is a fork of runWithPriority, inlined for performance.
      var previousPriorityLevel = currentPriorityLevel;
      var previousEventStartTime = currentEventStartTime;
      currentPriorityLevel = parentPriorityLevel;
      currentEventStartTime = exports.unstable_now();

      try {
        return callback.apply(this, arguments);
      } finally {
        currentPriorityLevel = previousPriorityLevel;
        currentEventStartTime = previousEventStartTime;
        flushImmediateWork();
      }
    };
  }

  function unstable_scheduleCallback(callback, deprecated_options) {
    var startTime = currentEventStartTime !== -1 ? currentEventStartTime : exports.unstable_now();

    var expirationTime;
    if (typeof deprecated_options === 'object' && deprecated_options !== null && typeof deprecated_options.timeout === 'number') {
      // FIXME: Remove this branch once we lift expiration times out of React.
      expirationTime = startTime + deprecated_options.timeout;
    } else {
      switch (currentPriorityLevel) {
        case ImmediatePriority:
          expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;
          break;
        case UserBlockingPriority:
          expirationTime = startTime + USER_BLOCKING_PRIORITY;
          break;
        case IdlePriority:
          expirationTime = startTime + IDLE_PRIORITY;
          break;
        case LowPriority:
          expirationTime = startTime + LOW_PRIORITY_TIMEOUT;
          break;
        case NormalPriority:
        default:
          expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
      }
    }

    var newNode = {
      callback: callback,
      priorityLevel: currentPriorityLevel,
      expirationTime: expirationTime,
      next: null,
      previous: null
    };

    // Insert the new callback into the list, ordered first by expiration, then
    // by insertion. So the new callback is inserted any other callback with
    // equal expiration.
    if (firstCallbackNode === null) {
      // This is the first callback in the list.
      firstCallbackNode = newNode.next = newNode.previous = newNode;
      ensureHostCallbackIsScheduled();
    } else {
      var next = null;
      var node = firstCallbackNode;
      do {
        if (node.expirationTime > expirationTime) {
          // The new callback expires before this one.
          next = node;
          break;
        }
        node = node.next;
      } while (node !== firstCallbackNode);

      if (next === null) {
        // No callback with a later expiration was found, which means the new
        // callback has the latest expiration in the list.
        next = firstCallbackNode;
      } else if (next === firstCallbackNode) {
        // The new callback has the earliest expiration in the entire list.
        firstCallbackNode = newNode;
        ensureHostCallbackIsScheduled();
      }

      var previous = next.previous;
      previous.next = next.previous = newNode;
      newNode.next = next;
      newNode.previous = previous;
    }

    return newNode;
  }

  function unstable_pauseExecution() {
    isSchedulerPaused = true;
  }

  function unstable_continueExecution() {
    isSchedulerPaused = false;
    if (firstCallbackNode !== null) {
      ensureHostCallbackIsScheduled();
    }
  }

  function unstable_getFirstCallbackNode() {
    return firstCallbackNode;
  }

  function unstable_cancelCallback(callbackNode) {
    var next = callbackNode.next;
    if (next === null) {
      // Already cancelled.
      return;
    }

    if (next === callbackNode) {
      // This is the only scheduled callback. Clear the list.
      firstCallbackNode = null;
    } else {
      // Remove the callback from its position in the list.
      if (callbackNode === firstCallbackNode) {
        firstCallbackNode = next;
      }
      var previous = callbackNode.previous;
      previous.next = next;
      next.previous = previous;
    }

    callbackNode.next = callbackNode.previous = null;
  }

  function unstable_getCurrentPriorityLevel() {
    return currentPriorityLevel;
  }

  function unstable_shouldYield() {
    return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
  }

  // The remaining code is essentially a polyfill for requestIdleCallback. It
  // works by scheduling a requestAnimationFrame, storing the time for the start
  // of the frame, then scheduling a postMessage which gets scheduled after paint.
  // Within the postMessage handler do as much work as possible until time + frame
  // rate. By separating the idle call into a separate event tick we ensure that
  // layout, paint and other browser work is counted against the available time.
  // The frame rate is dynamically adjusted.

  // We capture a local reference to any global, in case it gets polyfilled after
  // this module is initially evaluated. We want to be using a
  // consistent implementation.
  var localDate = Date;

  // This initialization code may run even on server environments if a component
  // just imports ReactDOM (e.g. for findDOMNode). Some environments might not
  // have setTimeout or clearTimeout. However, we always expect them to be defined
  // on the client. https://github.com/facebook/react/pull/13088
  var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
  var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;

  // We don't expect either of these to necessarily be defined, but we will error
  // later if they are missing on the client.
  var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
  var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined;

  // requestAnimationFrame does not run when the tab is in the background. If
  // we're backgrounded we prefer for that work to happen so that the page
  // continues to load in the background. So we also schedule a 'setTimeout' as
  // a fallback.
  // TODO: Need a better heuristic for backgrounded work.
  var ANIMATION_FRAME_TIMEOUT = 100;
  var rAFID;
  var rAFTimeoutID;
  var requestAnimationFrameWithTimeout = function (callback) {
    // schedule rAF and also a setTimeout
    rAFID = localRequestAnimationFrame(function (timestamp) {
      // cancel the setTimeout
      localClearTimeout(rAFTimeoutID);
      callback(timestamp);
    });
    rAFTimeoutID = localSetTimeout(function () {
      // cancel the requestAnimationFrame
      localCancelAnimationFrame(rAFID);
      callback(exports.unstable_now());
    }, ANIMATION_FRAME_TIMEOUT);
  };

  if (hasNativePerformanceNow) {
    var Performance = performance;
    exports.unstable_now = function () {
      return Performance.now();
    };
  } else {
    exports.unstable_now = function () {
      return localDate.now();
    };
  }

  var requestHostCallback;
  var cancelHostCallback;
  var shouldYieldToHost;

  var globalValue = null;
  if (typeof window !== 'undefined') {
    globalValue = window;
  } else if (typeof global !== 'undefined') {
    globalValue = global;
  }

  if (globalValue && globalValue._schedMock) {
    // Dynamic injection, only for testing purposes.
    var globalImpl = globalValue._schedMock;
    requestHostCallback = globalImpl[0];
    cancelHostCallback = globalImpl[1];
    shouldYieldToHost = globalImpl[2];
    exports.unstable_now = globalImpl[3];
  } else if (
  // If Scheduler runs in a non-DOM environment, it falls back to a naive
  // implementation using setTimeout.
  typeof window === 'undefined' ||
  // Check if MessageChannel is supported, too.
  typeof MessageChannel !== 'function') {
    // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
    // fallback to a naive implementation.
    var _callback = null;
    var _flushCallback = function (didTimeout) {
      if (_callback !== null) {
        try {
          _callback(didTimeout);
        } finally {
          _callback = null;
        }
      }
    };
    requestHostCallback = function (cb, ms) {
      if (_callback !== null) {
        // Protect against re-entrancy.
        setTimeout(requestHostCallback, 0, cb);
      } else {
        _callback = cb;
        setTimeout(_flushCallback, 0, false);
      }
    };
    cancelHostCallback = function () {
      _callback = null;
    };
    shouldYieldToHost = function () {
      return false;
    };
  } else {
    if (typeof console !== 'undefined') {
      // TODO: Remove fb.me link
      if (typeof localRequestAnimationFrame !== 'function') {
        console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
      }
      if (typeof localCancelAnimationFrame !== 'function') {
        console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
      }
    }

    var scheduledHostCallback = null;
    var isMessageEventScheduled = false;
    var timeoutTime = -1;

    var isAnimationFrameScheduled = false;

    var isFlushingHostCallback = false;

    var frameDeadline = 0;
    // We start out assuming that we run at 30fps but then the heuristic tracking
    // will adjust this value to a faster fps if we get more frequent animation
    // frames.
    var previousFrameTime = 33;
    var activeFrameTime = 33;

    shouldYieldToHost = function () {
      return frameDeadline <= exports.unstable_now();
    };

    // We use the postMessage trick to defer idle work until after the repaint.
    var channel = new MessageChannel();
    var port = channel.port2;
    channel.port1.onmessage = function (event) {
      isMessageEventScheduled = false;

      var prevScheduledCallback = scheduledHostCallback;
      var prevTimeoutTime = timeoutTime;
      scheduledHostCallback = null;
      timeoutTime = -1;

      var currentTime = exports.unstable_now();

      var didTimeout = false;
      if (frameDeadline - currentTime <= 0) {
        // There's no time left in this idle period. Check if the callback has
        // a timeout and whether it's been exceeded.
        if (prevTimeoutTime !== -1 && prevTimeoutTime <= currentTime) {
          // Exceeded the timeout. Invoke the callback even though there's no
          // time left.
          didTimeout = true;
        } else {
          // No timeout.
          if (!isAnimationFrameScheduled) {
            // Schedule another animation callback so we retry later.
            isAnimationFrameScheduled = true;
            requestAnimationFrameWithTimeout(animationTick);
          }
          // Exit without invoking the callback.
          scheduledHostCallback = prevScheduledCallback;
          timeoutTime = prevTimeoutTime;
          return;
        }
      }

      if (prevScheduledCallback !== null) {
        isFlushingHostCallback = true;
        try {
          prevScheduledCallback(didTimeout);
        } finally {
          isFlushingHostCallback = false;
        }
      }
    };

    var animationTick = function (rafTime) {
      if (scheduledHostCallback !== null) {
        // Eagerly schedule the next animation callback at the beginning of the
        // frame. If the scheduler queue is not empty at the end of the frame, it
        // will continue flushing inside that callback. If the queue *is* empty,
        // then it will exit immediately. Posting the callback at the start of the
        // frame ensures it's fired within the earliest possible frame. If we
        // waited until the end of the frame to post the callback, we risk the
        // browser skipping a frame and not firing the callback until the frame
        // after that.
        requestAnimationFrameWithTimeout(animationTick);
      } else {
        // No pending work. Exit.
        isAnimationFrameScheduled = false;
        return;
      }

      var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
      if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
        if (nextFrameTime < 8) {
          // Defensive coding. We don't support higher frame rates than 120hz.
          // If the calculated frame time gets lower than 8, it is probably a bug.
          nextFrameTime = 8;
        }
        // If one frame goes long, then the next one can be short to catch up.
        // If two frames are short in a row, then that's an indication that we
        // actually have a higher frame rate than what we're currently optimizing.
        // We adjust our heuristic dynamically accordingly. For example, if we're
        // running on 120hz display or 90hz VR display.
        // Take the max of the two in case one of them was an anomaly due to
        // missed frame deadlines.
        activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
      } else {
        previousFrameTime = nextFrameTime;
      }
      frameDeadline = rafTime + activeFrameTime;
      if (!isMessageEventScheduled) {
        isMessageEventScheduled = true;
        port.postMessage(undefined);
      }
    };

    requestHostCallback = function (callback, absoluteTimeout) {
      scheduledHostCallback = callback;
      timeoutTime = absoluteTimeout;
      if (isFlushingHostCallback || absoluteTimeout < 0) {
        // Don't wait for the next frame. Continue working ASAP, in a new event.
        port.postMessage(undefined);
      } else if (!isAnimationFrameScheduled) {
        // If rAF didn't already schedule one, we need to schedule a frame.
        // TODO: If this rAF doesn't materialize because the browser throttles, we
        // might want to still have setTimeout trigger rIC as a backup to ensure
        // that we keep performing work.
        isAnimationFrameScheduled = true;
        requestAnimationFrameWithTimeout(animationTick);
      }
    };

    cancelHostCallback = function () {
      scheduledHostCallback = null;
      isMessageEventScheduled = false;
      timeoutTime = -1;
    };
  }

  exports.unstable_ImmediatePriority = ImmediatePriority;
  exports.unstable_UserBlockingPriority = UserBlockingPriority;
  exports.unstable_NormalPriority = NormalPriority;
  exports.unstable_IdlePriority = IdlePriority;
  exports.unstable_LowPriority = LowPriority;
  exports.unstable_runWithPriority = unstable_runWithPriority;
  exports.unstable_next = unstable_next;
  exports.unstable_scheduleCallback = unstable_scheduleCallback;
  exports.unstable_cancelCallback = unstable_cancelCallback;
  exports.unstable_wrapCallback = unstable_wrapCallback;
  exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
  exports.unstable_shouldYield = unstable_shouldYield;
  exports.unstable_continueExecution = unstable_continueExecution;
  exports.unstable_pauseExecution = unstable_pauseExecution;
  exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
    })();
  }


  /***/ }),
  /* 55 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.createTextNode = exports.setAttribute = exports.removeChildNode = exports.insertBeforeNode = exports.appendStaticNode = exports.appendChildNode = exports.createNode = void 0;

  // Helper utilities implementing some common DOM methods to simplify reconciliation code
  const createNode = tagName => ({
    nodeName: tagName.toUpperCase(),
    style: {},
    attributes: {},
    childNodes: [],
    parentNode: null
  });

  exports.createNode = createNode;

  const appendChildNode = (node, childNode) => {
    if (childNode.parentNode) {
      removeChildNode(childNode.parentNode, childNode);
    }

    childNode.parentNode = node;
    node.childNodes.push(childNode);
  }; // Same as `appendChildNode`, but without removing child node from parent node


  exports.appendChildNode = appendChildNode;

  const appendStaticNode = (node, childNode) => {
    node.childNodes.push(childNode);
  };

  exports.appendStaticNode = appendStaticNode;

  const insertBeforeNode = (node, newChildNode, beforeChildNode) => {
    if (newChildNode.parentNode) {
      removeChildNode(newChildNode.parentNode, newChildNode);
    }

    newChildNode.parentNode = node;
    const index = node.childNodes.indexOf(beforeChildNode);

    if (index >= 0) {
      node.childNodes.splice(index, 0, newChildNode);
      return;
    }

    node.childNodes.push(newChildNode);
  };

  exports.insertBeforeNode = insertBeforeNode;

  const removeChildNode = (node, removeNode) => {
    removeNode.parentNode = null;
    const index = node.childNodes.indexOf(removeNode);

    if (index >= 0) {
      node.childNodes.splice(index, 1);
    }
  };

  exports.removeChildNode = removeChildNode;

  const setAttribute = (node, key, value) => {
    node.attributes[key] = value;
  };

  exports.setAttribute = setAttribute;

  const createTextNode = text => ({
    nodeName: '#text',
    nodeValue: text
  });

  exports.createTextNode = createTextNode;

  /***/ }),
  /* 56 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _yogaLayoutPrebuilt = _interopRequireDefault(__webpack_require__(57));

  var _output = _interopRequireDefault(__webpack_require__(61));

  var _dom = __webpack_require__(55);

  var _buildLayout = _interopRequireDefault(__webpack_require__(67));

  var _renderNodeToOutput = _interopRequireDefault(__webpack_require__(72));

  var _measureText = _interopRequireDefault(__webpack_require__(69));

  var _wrapText = _interopRequireDefault(__webpack_require__(73));

  var _getMaxWidth = _interopRequireDefault(__webpack_require__(75));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  // Since we need to know the width of text container to wrap text, we have to calculate layout twice
  // This function is executed after first layout calculation to reassign width and height of text nodes
  const calculateWrappedText = node => {
    if (node.textContent && typeof node.parentNode.style.textWrap === 'string') {
      const {
        yogaNode
      } = node;
      const parentYogaNode = node.parentNode.yogaNode;
      const maxWidth = (0, _getMaxWidth.default)(parentYogaNode);
      const currentWidth = yogaNode.getComputedWidth();

      if (currentWidth > maxWidth) {
        const {
          textWrap
        } = node.parentNode.style;
        const wrappedText = (0, _wrapText.default)(node.textContent, maxWidth, {
          textWrap
        });
        const {
          width,
          height
        } = (0, _measureText.default)(wrappedText);
        yogaNode.setWidth(width);
        yogaNode.setHeight(height);
      }

      return;
    }

    if (Array.isArray(node.childNodes) && node.childNodes.length > 0) {
      for (const childNode of node.childNodes) {
        calculateWrappedText(childNode);
      }
    }
  }; // Since <Static> components can be placed anywhere in the tree, this helper finds and returns them


  const getStaticNodes = element => {
    const staticNodes = [];

    for (const childNode of element.childNodes) {
      if (childNode.unstable__static) {
        staticNodes.push(childNode);
      }

      if (Array.isArray(childNode.childNodes) && childNode.childNodes.length > 0) {
        staticNodes.push(...getStaticNodes(childNode));
      }
    }

    return staticNodes;
  }; // Build layout, apply styles, build text output of all nodes and return it


  var _default = ({
    terminalWidth
  }) => {
    const config = _yogaLayoutPrebuilt.default.Config.create(); // Used to free up memory used by last Yoga node tree


    let lastYogaNode;
    let lastStaticYogaNode;
    return node => {
      if (lastYogaNode) {
        lastYogaNode.freeRecursive();
      }

      if (lastStaticYogaNode) {
        lastStaticYogaNode.freeRecursive();
      }

      const staticElements = getStaticNodes(node);

      if (staticElements.length > 1) {
        if (true) {
          console.error('Warning: There can only be one <Static> component');
        }
      } // <Static> component must be built and rendered separately, so that the layout of the other output is unaffected


      let staticOutput;

      if (staticElements.length === 1) {
        const rootNode = (0, _dom.createNode)('root');
        (0, _dom.appendStaticNode)(rootNode, staticElements[0]);
        const {
          yogaNode: staticYogaNode
        } = (0, _buildLayout.default)(rootNode, {
          config,
          terminalWidth,
          skipStaticElements: false
        });
        staticYogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR);
        calculateWrappedText(rootNode);
        staticYogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR); // Save current Yoga node tree to free up memory later

        lastStaticYogaNode = staticYogaNode;
        staticOutput = new _output.default({
          width: staticYogaNode.getComputedWidth(),
          height: staticYogaNode.getComputedHeight()
        });
        (0, _renderNodeToOutput.default)(rootNode, staticOutput, {
          skipStaticElements: false
        });
      }

      const {
        yogaNode
      } = (0, _buildLayout.default)(node, {
        config,
        terminalWidth,
        skipStaticElements: true
      });
      yogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR);
      calculateWrappedText(node);
      yogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR); // Save current node tree to free up memory later

      lastYogaNode = yogaNode;
      const output = new _output.default({
        width: yogaNode.getComputedWidth(),
        height: yogaNode.getComputedHeight()
      });
      (0, _renderNodeToOutput.default)(node, output, {
        skipStaticElements: true
      });
      return {
        output: output.get(),
        staticOutput: staticOutput ? `${staticOutput.get()}\n` : undefined
      };
    };
  };

  exports.default = _default;

  /***/ }),
  /* 57 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  /**
   * Copyright (c) 2014-present, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   *
   * @format
   */

  var Yoga = __webpack_require__(58);
  var nbind = __webpack_require__(60);

  var ran = false;
  var ret = null;

  nbind({}, function (err, result) {
    if (ran) {
      return;
    }

    ran = true;

    if (err) {
      throw err;
    }

    ret = result;
  });

  if (!ran) {
    throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");
  }

  // $FlowFixMe ret will not be null here
  module.exports = Yoga(ret.bind, ret.lib);

  /***/ }),
  /* 58 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  /**
   * Copyright (c) 2014-present, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   *
   * @format
   */

  var CONSTANTS = __webpack_require__(59);

  var Layout = function () {
    function Layout(left, right, top, bottom, width, height) {
      _classCallCheck(this, Layout);

      this.left = left;
      this.right = right;
      this.top = top;
      this.bottom = bottom;
      this.width = width;
      this.height = height;
    }

    _createClass(Layout, [{
      key: 'fromJS',
      value: function fromJS(expose) {
        expose(this.left, this.right, this.top, this.bottom, this.width, this.height);
      }
    }, {
      key: 'toString',
      value: function toString() {
        return '<Layout#' + this.left + ':' + this.right + ';' + this.top + ':' + this.bottom + ';' + this.width + ':' + this.height + '>';
      }
    }]);

    return Layout;
  }();

  var Size = function () {
    _createClass(Size, null, [{
      key: 'fromJS',
      value: function fromJS(_ref) {
        var width = _ref.width,
            height = _ref.height;

        return new Size(width, height);
      }
    }]);

    function Size(width, height) {
      _classCallCheck(this, Size);

      this.width = width;
      this.height = height;
    }

    _createClass(Size, [{
      key: 'fromJS',
      value: function fromJS(expose) {
        expose(this.width, this.height);
      }
    }, {
      key: 'toString',
      value: function toString() {
        return '<Size#' + this.width + 'x' + this.height + '>';
      }
    }]);

    return Size;
  }();

  var Value = function () {
    function Value(unit, value) {
      _classCallCheck(this, Value);

      this.unit = unit;
      this.value = value;
    }

    _createClass(Value, [{
      key: 'fromJS',
      value: function fromJS(expose) {
        expose(this.unit, this.value);
      }
    }, {
      key: 'toString',
      value: function toString() {
        switch (this.unit) {
          case CONSTANTS.UNIT_POINT:
            return String(this.value);
          case CONSTANTS.UNIT_PERCENT:
            return this.value + '%';
          case CONSTANTS.UNIT_AUTO:
            return 'auto';
          default:
            {
              return this.value + '?';
            }
        }
      }
    }, {
      key: 'valueOf',
      value: function valueOf() {
        return this.value;
      }
    }]);

    return Value;
  }();

  module.exports = function (bind, lib) {
    function patch(prototype, name, fn) {
      var original = prototype[name];

      prototype[name] = function () {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }

        return fn.call.apply(fn, [this, original].concat(args));
      };
    }

    var _arr = ['setPosition', 'setMargin', 'setFlexBasis', 'setWidth', 'setHeight', 'setMinWidth', 'setMinHeight', 'setMaxWidth', 'setMaxHeight', 'setPadding'];

    var _loop = function _loop() {
      var _methods;

      var fnName = _arr[_i];
      var methods = (_methods = {}, _defineProperty(_methods, CONSTANTS.UNIT_POINT, lib.Node.prototype[fnName]), _defineProperty(_methods, CONSTANTS.UNIT_PERCENT, lib.Node.prototype[fnName + 'Percent']), _defineProperty(_methods, CONSTANTS.UNIT_AUTO, lib.Node.prototype[fnName + 'Auto']), _methods);

      patch(lib.Node.prototype, fnName, function (original) {
        for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
          args[_key2 - 1] = arguments[_key2];
        }

        // We patch all these functions to add support for the following calls:
        // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto")

        var value = args.pop();
        var unit = void 0,
            asNumber = void 0;

        if (value === 'auto') {
          unit = CONSTANTS.UNIT_AUTO;
          asNumber = undefined;
        } else if (value instanceof Value) {
          unit = value.unit;
          asNumber = value.valueOf();
        } else {
          unit = typeof value === 'string' && value.endsWith('%') ? CONSTANTS.UNIT_PERCENT : CONSTANTS.UNIT_POINT;
          asNumber = parseFloat(value);
          if (!Number.isNaN(value) && Number.isNaN(asNumber)) {
            throw new Error('Invalid value ' + value + ' for ' + fnName);
          }
        }

        if (!methods[unit]) throw new Error('Failed to execute "' + fnName + '": Unsupported unit \'' + value + '\'');

        if (asNumber !== undefined) {
          var _methods$unit;

          return (_methods$unit = methods[unit]).call.apply(_methods$unit, [this].concat(args, [asNumber]));
        } else {
          var _methods$unit2;

          return (_methods$unit2 = methods[unit]).call.apply(_methods$unit2, [this].concat(args));
        }
      });
    };

    for (var _i = 0; _i < _arr.length; _i++) {
      _loop();
    }

    patch(lib.Config.prototype, 'free', function () {
      // Since we handle the memory allocation ourselves (via lib.Config.create),
      // we also need to handle the deallocation
      lib.Config.destroy(this);
    });

    patch(lib.Node, 'create', function (_, config) {
      // We decide the constructor we want to call depending on the parameters
      return config ? lib.Node.createWithConfig(config) : lib.Node.createDefault();
    });

    patch(lib.Node.prototype, 'free', function () {
      // Since we handle the memory allocation ourselves (via lib.Node.create),
      // we also need to handle the deallocation
      lib.Node.destroy(this);
    });

    patch(lib.Node.prototype, 'freeRecursive', function () {
      for (var t = 0, T = this.getChildCount(); t < T; ++t) {
        this.getChild(0).freeRecursive();
      }
      this.free();
    });

    patch(lib.Node.prototype, 'setMeasureFunc', function (original, measureFunc) {
      // This patch is just a convenience patch, since it helps write more
      // idiomatic source code (such as .setMeasureFunc(null))
      // We also automatically convert the return value of the measureFunc
      // to a Size object, so that we can return anything that has .width and
      // .height properties
      if (measureFunc) {
        return original.call(this, function () {
          return Size.fromJS(measureFunc.apply(undefined, arguments));
        });
      } else {
        return this.unsetMeasureFunc();
      }
    });

    patch(lib.Node.prototype, 'calculateLayout', function (original) {
      var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN;
      var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NaN;
      var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : CONSTANTS.DIRECTION_LTR;

      // Just a small patch to add support for the function default parameters
      return original.call(this, width, height, direction);
    });

    return _extends({
      Config: lib.Config,
      Node: lib.Node,
      Layout: bind('Layout', Layout),
      Size: bind('Size', Size),
      Value: bind('Value', Value),
      getInstanceCount: function getInstanceCount() {
        return lib.getInstanceCount.apply(lib, arguments);
      }
    }, CONSTANTS);
  };

  /***/ }),
  /* 59 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  /**
   * Copyright (c) 2014-present, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   *
   * @format
   */

  var CONSTANTS = {
    ALIGN_COUNT: 8,
    ALIGN_AUTO: 0,
    ALIGN_FLEX_START: 1,
    ALIGN_CENTER: 2,
    ALIGN_FLEX_END: 3,
    ALIGN_STRETCH: 4,
    ALIGN_BASELINE: 5,
    ALIGN_SPACE_BETWEEN: 6,
    ALIGN_SPACE_AROUND: 7,

    DIMENSION_COUNT: 2,
    DIMENSION_WIDTH: 0,
    DIMENSION_HEIGHT: 1,

    DIRECTION_COUNT: 3,
    DIRECTION_INHERIT: 0,
    DIRECTION_LTR: 1,
    DIRECTION_RTL: 2,

    DISPLAY_COUNT: 2,
    DISPLAY_FLEX: 0,
    DISPLAY_NONE: 1,

    EDGE_COUNT: 9,
    EDGE_LEFT: 0,
    EDGE_TOP: 1,
    EDGE_RIGHT: 2,
    EDGE_BOTTOM: 3,
    EDGE_START: 4,
    EDGE_END: 5,
    EDGE_HORIZONTAL: 6,
    EDGE_VERTICAL: 7,
    EDGE_ALL: 8,

    EXPERIMENTAL_FEATURE_COUNT: 1,
    EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0,

    FLEX_DIRECTION_COUNT: 4,
    FLEX_DIRECTION_COLUMN: 0,
    FLEX_DIRECTION_COLUMN_REVERSE: 1,
    FLEX_DIRECTION_ROW: 2,
    FLEX_DIRECTION_ROW_REVERSE: 3,

    JUSTIFY_COUNT: 6,
    JUSTIFY_FLEX_START: 0,
    JUSTIFY_CENTER: 1,
    JUSTIFY_FLEX_END: 2,
    JUSTIFY_SPACE_BETWEEN: 3,
    JUSTIFY_SPACE_AROUND: 4,
    JUSTIFY_SPACE_EVENLY: 5,

    LOG_LEVEL_COUNT: 6,
    LOG_LEVEL_ERROR: 0,
    LOG_LEVEL_WARN: 1,
    LOG_LEVEL_INFO: 2,
    LOG_LEVEL_DEBUG: 3,
    LOG_LEVEL_VERBOSE: 4,
    LOG_LEVEL_FATAL: 5,

    MEASURE_MODE_COUNT: 3,
    MEASURE_MODE_UNDEFINED: 0,
    MEASURE_MODE_EXACTLY: 1,
    MEASURE_MODE_AT_MOST: 2,

    NODE_TYPE_COUNT: 2,
    NODE_TYPE_DEFAULT: 0,
    NODE_TYPE_TEXT: 1,

    OVERFLOW_COUNT: 3,
    OVERFLOW_VISIBLE: 0,
    OVERFLOW_HIDDEN: 1,
    OVERFLOW_SCROLL: 2,

    POSITION_TYPE_COUNT: 2,
    POSITION_TYPE_RELATIVE: 0,
    POSITION_TYPE_ABSOLUTE: 1,

    PRINT_OPTIONS_COUNT: 3,
    PRINT_OPTIONS_LAYOUT: 1,
    PRINT_OPTIONS_STYLE: 2,
    PRINT_OPTIONS_CHILDREN: 4,

    UNIT_COUNT: 4,
    UNIT_UNDEFINED: 0,
    UNIT_POINT: 1,
    UNIT_PERCENT: 2,
    UNIT_AUTO: 3,

    WRAP_COUNT: 3,
    WRAP_NO_WRAP: 0,
    WRAP_WRAP: 1,
    WRAP_WRAP_REVERSE: 2
  };

  module.exports = CONSTANTS;

  /***/ }),
  /* 60 */
  /***/ (function(module, exports, __webpack_require__) {

  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, wrapper) {
    if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
      return wrapper;
    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
  })(this, function (Module, cb) {
    if (typeof Module == "function") {
      cb = Module;Module = {};
    }Module.onRuntimeInitialized = function (init, cb) {
      return function () {
        if (init) init.apply(this, arguments);try {
          Module.ccall("nbind_init");
        } catch (err) {
          cb(err);return;
        }cb(null, { bind: Module._nbind_value, reflect: Module.NBind.reflect, queryType: Module.NBind.queryType, toggleLightGC: Module.toggleLightGC, lib: Module });
      };
    }(Module.onRuntimeInitialized, cb);var Module;if (!Module) Module = (typeof Module !== "undefined" ? Module : null) || {};var moduleOverrides = {};for (var key in Module) {
      if (Module.hasOwnProperty(key)) {
        moduleOverrides[key] = Module[key];
      }
    }var ENVIRONMENT_IS_WEB = false;var ENVIRONMENT_IS_WORKER = false;var ENVIRONMENT_IS_NODE = false;var ENVIRONMENT_IS_SHELL = false;if (Module["ENVIRONMENT"]) {
      if (Module["ENVIRONMENT"] === "WEB") {
        ENVIRONMENT_IS_WEB = true;
      } else if (Module["ENVIRONMENT"] === "WORKER") {
        ENVIRONMENT_IS_WORKER = true;
      } else if (Module["ENVIRONMENT"] === "NODE") {
        ENVIRONMENT_IS_NODE = true;
      } else if (Module["ENVIRONMENT"] === "SHELL") {
        ENVIRONMENT_IS_SHELL = true;
      } else {
        throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");
      }
    } else {
      ENVIRONMENT_IS_WEB = typeof window === "object";ENVIRONMENT_IS_WORKER = typeof importScripts === "function";ENVIRONMENT_IS_NODE = typeof process === "object" && "function" === "function" && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
    }if (ENVIRONMENT_IS_NODE) {
      if (!Module["print"]) Module["print"] = console.log;if (!Module["printErr"]) Module["printErr"] = console.warn;var nodeFS;var nodePath;Module["read"] = function shell_read(filename, binary) {
        if (!nodeFS) nodeFS = {}("");if (!nodePath) nodePath = {}("");filename = nodePath["normalize"](filename);var ret = nodeFS["readFileSync"](filename);return binary ? ret : ret.toString();
      };Module["readBinary"] = function readBinary(filename) {
        var ret = Module["read"](filename, true);if (!ret.buffer) {
          ret = new Uint8Array(ret);
        }assert(ret.buffer);return ret;
      };Module["load"] = function load(f) {
        globalEval(read(f));
      };if (!Module["thisProgram"]) {
        if (process["argv"].length > 1) {
          Module["thisProgram"] = process["argv"][1].replace(/\\/g, "/");
        } else {
          Module["thisProgram"] = "unknown-program";
        }
      }Module["arguments"] = process["argv"].slice(2);if (true) {
        module["exports"] = Module;
      }process["on"]("uncaughtException", function (ex) {
        if (!(ex instanceof ExitStatus)) {
          throw ex;
        }
      });Module["inspect"] = function () {
        return "[Emscripten Module object]";
      };
    } else if (ENVIRONMENT_IS_SHELL) {
      if (!Module["print"]) Module["print"] = print;if (typeof printErr != "undefined") Module["printErr"] = printErr;if (typeof read != "undefined") {
        Module["read"] = read;
      } else {
        Module["read"] = function shell_read() {
          throw "no read() available";
        };
      }Module["readBinary"] = function readBinary(f) {
        if (typeof readbuffer === "function") {
          return new Uint8Array(readbuffer(f));
        }var data = read(f, "binary");assert(typeof data === "object");return data;
      };if (typeof scriptArgs != "undefined") {
        Module["arguments"] = scriptArgs;
      } else if (typeof arguments != "undefined") {
        Module["arguments"] = arguments;
      }if (typeof quit === "function") {
        Module["quit"] = function (status, toThrow) {
          quit(status);
        };
      }
    } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
      Module["read"] = function shell_read(url) {
        var xhr = new XMLHttpRequest();xhr.open("GET", url, false);xhr.send(null);return xhr.responseText;
      };if (ENVIRONMENT_IS_WORKER) {
        Module["readBinary"] = function readBinary(url) {
          var xhr = new XMLHttpRequest();xhr.open("GET", url, false);xhr.responseType = "arraybuffer";xhr.send(null);return new Uint8Array(xhr.response);
        };
      }Module["readAsync"] = function readAsync(url, onload, onerror) {
        var xhr = new XMLHttpRequest();xhr.open("GET", url, true);xhr.responseType = "arraybuffer";xhr.onload = function xhr_onload() {
          if (xhr.status == 200 || xhr.status == 0 && xhr.response) {
            onload(xhr.response);
          } else {
            onerror();
          }
        };xhr.onerror = onerror;xhr.send(null);
      };if (typeof arguments != "undefined") {
        Module["arguments"] = arguments;
      }if (typeof console !== "undefined") {
        if (!Module["print"]) Module["print"] = function shell_print(x) {
          console.log(x);
        };if (!Module["printErr"]) Module["printErr"] = function shell_printErr(x) {
          console.warn(x);
        };
      } else {
        var TRY_USE_DUMP = false;if (!Module["print"]) Module["print"] = TRY_USE_DUMP && typeof dump !== "undefined" ? function (x) {
          dump(x);
        } : function (x) {};
      }if (ENVIRONMENT_IS_WORKER) {
        Module["load"] = importScripts;
      }if (typeof Module["setWindowTitle"] === "undefined") {
        Module["setWindowTitle"] = function (title) {
          document.title = title;
        };
      }
    } else {
      throw "Unknown runtime environment. Where are we?";
    }function globalEval(x) {
      eval.call(null, x);
    }if (!Module["load"] && Module["read"]) {
      Module["load"] = function load(f) {
        globalEval(Module["read"](f));
      };
    }if (!Module["print"]) {
      Module["print"] = function () {};
    }if (!Module["printErr"]) {
      Module["printErr"] = Module["print"];
    }if (!Module["arguments"]) {
      Module["arguments"] = [];
    }if (!Module["thisProgram"]) {
      Module["thisProgram"] = "./this.program";
    }if (!Module["quit"]) {
      Module["quit"] = function (status, toThrow) {
        throw toThrow;
      };
    }Module.print = Module["print"];Module.printErr = Module["printErr"];Module["preRun"] = [];Module["postRun"] = [];for (var key in moduleOverrides) {
      if (moduleOverrides.hasOwnProperty(key)) {
        Module[key] = moduleOverrides[key];
      }
    }moduleOverrides = undefined;var Runtime = { setTempRet0: function (value) {
        tempRet0 = value;return value;
      }, getTempRet0: function () {
        return tempRet0;
      }, stackSave: function () {
        return STACKTOP;
      }, stackRestore: function (stackTop) {
        STACKTOP = stackTop;
      }, getNativeTypeSize: function (type) {
        switch (type) {case "i1":case "i8":
            return 1;case "i16":
            return 2;case "i32":
            return 4;case "i64":
            return 8;case "float":
            return 4;case "double":
            return 8;default:
            {
              if (type[type.length - 1] === "*") {
                return Runtime.QUANTUM_SIZE;
              } else if (type[0] === "i") {
                var bits = parseInt(type.substr(1));assert(bits % 8 === 0);return bits / 8;
              } else {
                return 0;
              }
            }}
      }, getNativeFieldSize: function (type) {
        return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE);
      }, STACK_ALIGN: 16, prepVararg: function (ptr, type) {
        if (type === "double" || type === "i64") {
          if (ptr & 7) {
            assert((ptr & 7) === 4);ptr += 4;
          }
        } else {
          assert((ptr & 3) === 0);
        }return ptr;
      }, getAlignSize: function (type, size, vararg) {
        if (!vararg && (type == "i64" || type == "double")) return 8;if (!type) return Math.min(size, 8);return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
      }, dynCall: function (sig, ptr, args) {
        if (args && args.length) {
          return Module["dynCall_" + sig].apply(null, [ptr].concat(args));
        } else {
          return Module["dynCall_" + sig].call(null, ptr);
        }
      }, functionPointers: [], addFunction: function (func) {
        for (var i = 0; i < Runtime.functionPointers.length; i++) {
          if (!Runtime.functionPointers[i]) {
            Runtime.functionPointers[i] = func;return 2 * (1 + i);
          }
        }throw "Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";
      }, removeFunction: function (index) {
        Runtime.functionPointers[(index - 2) / 2] = null;
      }, warnOnce: function (text) {
        if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};if (!Runtime.warnOnce.shown[text]) {
          Runtime.warnOnce.shown[text] = 1;Module.printErr(text);
        }
      }, funcWrappers: {}, getFuncWrapper: function (func, sig) {
        if (!func) return;assert(sig);if (!Runtime.funcWrappers[sig]) {
          Runtime.funcWrappers[sig] = {};
        }var sigCache = Runtime.funcWrappers[sig];if (!sigCache[func]) {
          if (sig.length === 1) {
            sigCache[func] = function dynCall_wrapper() {
              return Runtime.dynCall(sig, func);
            };
          } else if (sig.length === 2) {
            sigCache[func] = function dynCall_wrapper(arg) {
              return Runtime.dynCall(sig, func, [arg]);
            };
          } else {
            sigCache[func] = function dynCall_wrapper() {
              return Runtime.dynCall(sig, func, Array.prototype.slice.call(arguments));
            };
          }
        }return sigCache[func];
      }, getCompilerSetting: function (name) {
        throw "You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work";
      }, stackAlloc: function (size) {
        var ret = STACKTOP;STACKTOP = STACKTOP + size | 0;STACKTOP = STACKTOP + 15 & -16;return ret;
      }, staticAlloc: function (size) {
        var ret = STATICTOP;STATICTOP = STATICTOP + size | 0;STATICTOP = STATICTOP + 15 & -16;return ret;
      }, dynamicAlloc: function (size) {
        var ret = HEAP32[DYNAMICTOP_PTR >> 2];var end = (ret + size + 15 | 0) & -16;HEAP32[DYNAMICTOP_PTR >> 2] = end;if (end >= TOTAL_MEMORY) {
          var success = enlargeMemory();if (!success) {
            HEAP32[DYNAMICTOP_PTR >> 2] = ret;return 0;
          }
        }return ret;
      }, alignMemory: function (size, quantum) {
        var ret = size = Math.ceil(size / (quantum ? quantum : 16)) * (quantum ? quantum : 16);return ret;
      }, makeBigInt: function (low, high, unsigned) {
        var ret = unsigned ? +(low >>> 0) + +(high >>> 0) * +4294967296 : +(low >>> 0) + +(high | 0) * +4294967296;return ret;
      }, GLOBAL_BASE: 8, QUANTUM_SIZE: 4, __dummy__: 0 };Module["Runtime"] = Runtime;var ABORT = 0;var EXITSTATUS = 0;function assert(condition, text) {
      if (!condition) {
        abort("Assertion failed: " + text);
      }
    }function getCFunc(ident) {
      var func = Module["_" + ident];if (!func) {
        try {
          func = eval("_" + ident);
        } catch (e) {}
      }assert(func, "Cannot call unknown function " + ident + " (perhaps LLVM optimizations or closure removed it?)");return func;
    }var cwrap, ccall;(function () {
      var JSfuncs = { "stackSave": function () {
          Runtime.stackSave();
        }, "stackRestore": function () {
          Runtime.stackRestore();
        }, "arrayToC": function (arr) {
          var ret = Runtime.stackAlloc(arr.length);writeArrayToMemory(arr, ret);return ret;
        }, "stringToC": function (str) {
          var ret = 0;if (str !== null && str !== undefined && str !== 0) {
            var len = (str.length << 2) + 1;ret = Runtime.stackAlloc(len);stringToUTF8(str, ret, len);
          }return ret;
        } };var toC = { "string": JSfuncs["stringToC"], "array": JSfuncs["arrayToC"] };ccall = function ccallFunc(ident, returnType, argTypes, args, opts) {
        var func = getCFunc(ident);var cArgs = [];var stack = 0;if (args) {
          for (var i = 0; i < args.length; i++) {
            var converter = toC[argTypes[i]];if (converter) {
              if (stack === 0) stack = Runtime.stackSave();cArgs[i] = converter(args[i]);
            } else {
              cArgs[i] = args[i];
            }
          }
        }var ret = func.apply(null, cArgs);if (returnType === "string") ret = Pointer_stringify(ret);if (stack !== 0) {
          if (opts && opts.async) {
            EmterpreterAsync.asyncFinalizers.push(function () {
              Runtime.stackRestore(stack);
            });return;
          }Runtime.stackRestore(stack);
        }return ret;
      };var sourceRegex = /^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(jsfunc) {
        var parsed = jsfunc.toString().match(sourceRegex).slice(1);return { arguments: parsed[0], body: parsed[1], returnValue: parsed[2] };
      }var JSsource = null;function ensureJSsource() {
        if (!JSsource) {
          JSsource = {};for (var fun in JSfuncs) {
            if (JSfuncs.hasOwnProperty(fun)) {
              JSsource[fun] = parseJSFunc(JSfuncs[fun]);
            }
          }
        }
      }cwrap = function cwrap(ident, returnType, argTypes) {
        argTypes = argTypes || [];var cfunc = getCFunc(ident);var numericArgs = argTypes.every(function (type) {
          return type === "number";
        });var numericRet = returnType !== "string";if (numericRet && numericArgs) {
          return cfunc;
        }var argNames = argTypes.map(function (x, i) {
          return "$" + i;
        });var funcstr = "(function(" + argNames.join(",") + ") {";var nargs = argTypes.length;if (!numericArgs) {
          ensureJSsource();funcstr += "var stack = " + JSsource["stackSave"].body + ";";for (var i = 0; i < nargs; i++) {
            var arg = argNames[i],
                type = argTypes[i];if (type === "number") continue;var convertCode = JSsource[type + "ToC"];funcstr += "var " + convertCode.arguments + " = " + arg + ";";funcstr += convertCode.body + ";";funcstr += arg + "=(" + convertCode.returnValue + ");";
          }
        }var cfuncname = parseJSFunc(function () {
          return cfunc;
        }).returnValue;funcstr += "var ret = " + cfuncname + "(" + argNames.join(",") + ");";if (!numericRet) {
          var strgfy = parseJSFunc(function () {
            return Pointer_stringify;
          }).returnValue;funcstr += "ret = " + strgfy + "(ret);";
        }if (!numericArgs) {
          ensureJSsource();funcstr += JSsource["stackRestore"].body.replace("()", "(stack)") + ";";
        }funcstr += "return ret})";return eval(funcstr);
      };
    })();Module["ccall"] = ccall;Module["cwrap"] = cwrap;function setValue(ptr, value, type, noSafe) {
      type = type || "i8";if (type.charAt(type.length - 1) === "*") type = "i32";switch (type) {case "i1":
          HEAP8[ptr >> 0] = value;break;case "i8":
          HEAP8[ptr >> 0] = value;break;case "i16":
          HEAP16[ptr >> 1] = value;break;case "i32":
          HEAP32[ptr >> 2] = value;break;case "i64":
          tempI64 = [value >>> 0, (tempDouble = value, +Math_abs(tempDouble) >= +1 ? tempDouble > +0 ? (Math_min(+Math_floor(tempDouble / +4294967296), +4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / +4294967296) >>> 0 : 0)], HEAP32[ptr >> 2] = tempI64[0], HEAP32[ptr + 4 >> 2] = tempI64[1];break;case "float":
          HEAPF32[ptr >> 2] = value;break;case "double":
          HEAPF64[ptr >> 3] = value;break;default:
          abort("invalid type for setValue: " + type);}
    }Module["setValue"] = setValue;function getValue(ptr, type, noSafe) {
      type = type || "i8";if (type.charAt(type.length - 1) === "*") type = "i32";switch (type) {case "i1":
          return HEAP8[ptr >> 0];case "i8":
          return HEAP8[ptr >> 0];case "i16":
          return HEAP16[ptr >> 1];case "i32":
          return HEAP32[ptr >> 2];case "i64":
          return HEAP32[ptr >> 2];case "float":
          return HEAPF32[ptr >> 2];case "double":
          return HEAPF64[ptr >> 3];default:
          abort("invalid type for setValue: " + type);}return null;
    }Module["getValue"] = getValue;var ALLOC_NORMAL = 0;var ALLOC_STACK = 1;var ALLOC_STATIC = 2;var ALLOC_DYNAMIC = 3;var ALLOC_NONE = 4;Module["ALLOC_NORMAL"] = ALLOC_NORMAL;Module["ALLOC_STACK"] = ALLOC_STACK;Module["ALLOC_STATIC"] = ALLOC_STATIC;Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC;Module["ALLOC_NONE"] = ALLOC_NONE;function allocate(slab, types, allocator, ptr) {
      var zeroinit, size;if (typeof slab === "number") {
        zeroinit = true;size = slab;
      } else {
        zeroinit = false;size = slab.length;
      }var singleType = typeof types === "string" ? types : null;var ret;if (allocator == ALLOC_NONE) {
        ret = ptr;
      } else {
        ret = [typeof _malloc === "function" ? _malloc : Runtime.staticAlloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));
      }if (zeroinit) {
        var ptr = ret,
            stop;assert((ret & 3) == 0);stop = ret + (size & ~3);for (; ptr < stop; ptr += 4) {
          HEAP32[ptr >> 2] = 0;
        }stop = ret + size;while (ptr < stop) {
          HEAP8[ptr++ >> 0] = 0;
        }return ret;
      }if (singleType === "i8") {
        if (slab.subarray || slab.slice) {
          HEAPU8.set(slab, ret);
        } else {
          HEAPU8.set(new Uint8Array(slab), ret);
        }return ret;
      }var i = 0,
          type,
          typeSize,
          previousType;while (i < size) {
        var curr = slab[i];if (typeof curr === "function") {
          curr = Runtime.getFunctionIndex(curr);
        }type = singleType || types[i];if (type === 0) {
          i++;continue;
        }if (type == "i64") type = "i32";setValue(ret + i, curr, type);if (previousType !== type) {
          typeSize = Runtime.getNativeTypeSize(type);previousType = type;
        }i += typeSize;
      }return ret;
    }Module["allocate"] = allocate;function getMemory(size) {
      if (!staticSealed) return Runtime.staticAlloc(size);if (!runtimeInitialized) return Runtime.dynamicAlloc(size);return _malloc(size);
    }Module["getMemory"] = getMemory;function Pointer_stringify(ptr, length) {
      if (length === 0 || !ptr) return "";var hasUtf = 0;var t;var i = 0;while (1) {
        t = HEAPU8[ptr + i >> 0];hasUtf |= t;if (t == 0 && !length) break;i++;if (length && i == length) break;
      }if (!length) length = i;var ret = "";if (hasUtf < 128) {
        var MAX_CHUNK = 1024;var curr;while (length > 0) {
          curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));ret = ret ? ret + curr : curr;ptr += MAX_CHUNK;length -= MAX_CHUNK;
        }return ret;
      }return Module["UTF8ToString"](ptr);
    }Module["Pointer_stringify"] = Pointer_stringify;function AsciiToString(ptr) {
      var str = "";while (1) {
        var ch = HEAP8[ptr++ >> 0];if (!ch) return str;str += String.fromCharCode(ch);
      }
    }Module["AsciiToString"] = AsciiToString;function stringToAscii(str, outPtr) {
      return writeAsciiToMemory(str, outPtr, false);
    }Module["stringToAscii"] = stringToAscii;var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined;function UTF8ArrayToString(u8Array, idx) {
      var endPtr = idx;while (u8Array[endPtr]) ++endPtr;if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) {
        return UTF8Decoder.decode(u8Array.subarray(idx, endPtr));
      } else {
        var u0, u1, u2, u3, u4, u5;var str = "";while (1) {
          u0 = u8Array[idx++];if (!u0) return str;if (!(u0 & 128)) {
            str += String.fromCharCode(u0);continue;
          }u1 = u8Array[idx++] & 63;if ((u0 & 224) == 192) {
            str += String.fromCharCode((u0 & 31) << 6 | u1);continue;
          }u2 = u8Array[idx++] & 63;if ((u0 & 240) == 224) {
            u0 = (u0 & 15) << 12 | u1 << 6 | u2;
          } else {
            u3 = u8Array[idx++] & 63;if ((u0 & 248) == 240) {
              u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | u3;
            } else {
              u4 = u8Array[idx++] & 63;if ((u0 & 252) == 248) {
                u0 = (u0 & 3) << 24 | u1 << 18 | u2 << 12 | u3 << 6 | u4;
              } else {
                u5 = u8Array[idx++] & 63;u0 = (u0 & 1) << 30 | u1 << 24 | u2 << 18 | u3 << 12 | u4 << 6 | u5;
              }
            }
          }if (u0 < 65536) {
            str += String.fromCharCode(u0);
          } else {
            var ch = u0 - 65536;str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
          }
        }
      }
    }Module["UTF8ArrayToString"] = UTF8ArrayToString;function UTF8ToString(ptr) {
      return UTF8ArrayToString(HEAPU8, ptr);
    }Module["UTF8ToString"] = UTF8ToString;function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) {
      if (!(maxBytesToWrite > 0)) return 0;var startIdx = outIdx;var endIdx = outIdx + maxBytesToWrite - 1;for (var i = 0; i < str.length; ++i) {
        var u = str.charCodeAt(i);if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;if (u <= 127) {
          if (outIdx >= endIdx) break;outU8Array[outIdx++] = u;
        } else if (u <= 2047) {
          if (outIdx + 1 >= endIdx) break;outU8Array[outIdx++] = 192 | u >> 6;outU8Array[outIdx++] = 128 | u & 63;
        } else if (u <= 65535) {
          if (outIdx + 2 >= endIdx) break;outU8Array[outIdx++] = 224 | u >> 12;outU8Array[outIdx++] = 128 | u >> 6 & 63;outU8Array[outIdx++] = 128 | u & 63;
        } else if (u <= 2097151) {
          if (outIdx + 3 >= endIdx) break;outU8Array[outIdx++] = 240 | u >> 18;outU8Array[outIdx++] = 128 | u >> 12 & 63;outU8Array[outIdx++] = 128 | u >> 6 & 63;outU8Array[outIdx++] = 128 | u & 63;
        } else if (u <= 67108863) {
          if (outIdx + 4 >= endIdx) break;outU8Array[outIdx++] = 248 | u >> 24;outU8Array[outIdx++] = 128 | u >> 18 & 63;outU8Array[outIdx++] = 128 | u >> 12 & 63;outU8Array[outIdx++] = 128 | u >> 6 & 63;outU8Array[outIdx++] = 128 | u & 63;
        } else {
          if (outIdx + 5 >= endIdx) break;outU8Array[outIdx++] = 252 | u >> 30;outU8Array[outIdx++] = 128 | u >> 24 & 63;outU8Array[outIdx++] = 128 | u >> 18 & 63;outU8Array[outIdx++] = 128 | u >> 12 & 63;outU8Array[outIdx++] = 128 | u >> 6 & 63;outU8Array[outIdx++] = 128 | u & 63;
        }
      }outU8Array[outIdx] = 0;return outIdx - startIdx;
    }Module["stringToUTF8Array"] = stringToUTF8Array;function stringToUTF8(str, outPtr, maxBytesToWrite) {
      return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
    }Module["stringToUTF8"] = stringToUTF8;function lengthBytesUTF8(str) {
      var len = 0;for (var i = 0; i < str.length; ++i) {
        var u = str.charCodeAt(i);if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;if (u <= 127) {
          ++len;
        } else if (u <= 2047) {
          len += 2;
        } else if (u <= 65535) {
          len += 3;
        } else if (u <= 2097151) {
          len += 4;
        } else if (u <= 67108863) {
          len += 5;
        } else {
          len += 6;
        }
      }return len;
    }Module["lengthBytesUTF8"] = lengthBytesUTF8;var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : undefined;function demangle(func) {
      var __cxa_demangle_func = Module["___cxa_demangle"] || Module["__cxa_demangle"];if (__cxa_demangle_func) {
        try {
          var s = func.substr(1);var len = lengthBytesUTF8(s) + 1;var buf = _malloc(len);stringToUTF8(s, buf, len);var status = _malloc(4);var ret = __cxa_demangle_func(buf, 0, 0, status);if (getValue(status, "i32") === 0 && ret) {
            return Pointer_stringify(ret);
          }
        } catch (e) {} finally {
          if (buf) _free(buf);if (status) _free(status);if (ret) _free(ret);
        }return func;
      }Runtime.warnOnce("warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling");return func;
    }function demangleAll(text) {
      var regex = /__Z[\w\d_]+/g;return text.replace(regex, function (x) {
        var y = demangle(x);return x === y ? x : x + " [" + y + "]";
      });
    }function jsStackTrace() {
      var err = new Error();if (!err.stack) {
        try {
          throw new Error(0);
        } catch (e) {
          err = e;
        }if (!err.stack) {
          return "(no stack trace available)";
        }
      }return err.stack.toString();
    }function stackTrace() {
      var js = jsStackTrace();if (Module["extraStackTrace"]) js += "\n" + Module["extraStackTrace"]();return demangleAll(js);
    }Module["stackTrace"] = stackTrace;var HEAP, buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;function updateGlobalBufferViews() {
      Module["HEAP8"] = HEAP8 = new Int8Array(buffer);Module["HEAP16"] = HEAP16 = new Int16Array(buffer);Module["HEAP32"] = HEAP32 = new Int32Array(buffer);Module["HEAPU8"] = HEAPU8 = new Uint8Array(buffer);Module["HEAPU16"] = HEAPU16 = new Uint16Array(buffer);Module["HEAPU32"] = HEAPU32 = new Uint32Array(buffer);Module["HEAPF32"] = HEAPF32 = new Float32Array(buffer);Module["HEAPF64"] = HEAPF64 = new Float64Array(buffer);
    }var STATIC_BASE, STATICTOP, staticSealed;var STACK_BASE, STACKTOP, STACK_MAX;var DYNAMIC_BASE, DYNAMICTOP_PTR;STATIC_BASE = STATICTOP = STACK_BASE = STACKTOP = STACK_MAX = DYNAMIC_BASE = DYNAMICTOP_PTR = 0;staticSealed = false;function abortOnCannotGrowMemory() {
      abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value " + TOTAL_MEMORY + ", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ");
    }function enlargeMemory() {
      abortOnCannotGrowMemory();
    }var TOTAL_STACK = Module["TOTAL_STACK"] || 5242880;var TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 134217728;if (TOTAL_MEMORY < TOTAL_STACK) Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was " + TOTAL_MEMORY + "! (TOTAL_STACK=" + TOTAL_STACK + ")");if (Module["buffer"]) {
      buffer = Module["buffer"];
    } else {
      {
        buffer = new ArrayBuffer(TOTAL_MEMORY);
      }
    }updateGlobalBufferViews();function getTotalMemory() {
      return TOTAL_MEMORY;
    }HEAP32[0] = 1668509029;HEAP16[1] = 25459;if (HEAPU8[2] !== 115 || HEAPU8[3] !== 99) throw "Runtime error: expected the system to be little-endian!";Module["HEAP"] = HEAP;Module["buffer"] = buffer;Module["HEAP8"] = HEAP8;Module["HEAP16"] = HEAP16;Module["HEAP32"] = HEAP32;Module["HEAPU8"] = HEAPU8;Module["HEAPU16"] = HEAPU16;Module["HEAPU32"] = HEAPU32;Module["HEAPF32"] = HEAPF32;Module["HEAPF64"] = HEAPF64;function callRuntimeCallbacks(callbacks) {
      while (callbacks.length > 0) {
        var callback = callbacks.shift();if (typeof callback == "function") {
          callback();continue;
        }var func = callback.func;if (typeof func === "number") {
          if (callback.arg === undefined) {
            Module["dynCall_v"](func);
          } else {
            Module["dynCall_vi"](func, callback.arg);
          }
        } else {
          func(callback.arg === undefined ? null : callback.arg);
        }
      }
    }var __ATPRERUN__ = [];var __ATINIT__ = [];var __ATMAIN__ = [];var __ATEXIT__ = [];var __ATPOSTRUN__ = [];var runtimeInitialized = false;var runtimeExited = false;function preRun() {
      if (Module["preRun"]) {
        if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]];while (Module["preRun"].length) {
          addOnPreRun(Module["preRun"].shift());
        }
      }callRuntimeCallbacks(__ATPRERUN__);
    }function ensureInitRuntime() {
      if (runtimeInitialized) return;runtimeInitialized = true;callRuntimeCallbacks(__ATINIT__);
    }function preMain() {
      callRuntimeCallbacks(__ATMAIN__);
    }function exitRuntime() {
      callRuntimeCallbacks(__ATEXIT__);runtimeExited = true;
    }function postRun() {
      if (Module["postRun"]) {
        if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]];while (Module["postRun"].length) {
          addOnPostRun(Module["postRun"].shift());
        }
      }callRuntimeCallbacks(__ATPOSTRUN__);
    }function addOnPreRun(cb) {
      __ATPRERUN__.unshift(cb);
    }Module["addOnPreRun"] = addOnPreRun;function addOnInit(cb) {
      __ATINIT__.unshift(cb);
    }Module["addOnInit"] = addOnInit;function addOnPreMain(cb) {
      __ATMAIN__.unshift(cb);
    }Module["addOnPreMain"] = addOnPreMain;function addOnExit(cb) {
      __ATEXIT__.unshift(cb);
    }Module["addOnExit"] = addOnExit;function addOnPostRun(cb) {
      __ATPOSTRUN__.unshift(cb);
    }Module["addOnPostRun"] = addOnPostRun;function intArrayFromString(stringy, dontAddNull, length) {
      var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;var u8array = new Array(len);var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);if (dontAddNull) u8array.length = numBytesWritten;return u8array;
    }Module["intArrayFromString"] = intArrayFromString;function intArrayToString(array) {
      var ret = [];for (var i = 0; i < array.length; i++) {
        var chr = array[i];if (chr > 255) {
          chr &= 255;
        }ret.push(String.fromCharCode(chr));
      }return ret.join("");
    }Module["intArrayToString"] = intArrayToString;function writeStringToMemory(string, buffer, dontAddNull) {
      Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar, end;if (dontAddNull) {
        end = buffer + lengthBytesUTF8(string);lastChar = HEAP8[end];
      }stringToUTF8(string, buffer, Infinity);if (dontAddNull) HEAP8[end] = lastChar;
    }Module["writeStringToMemory"] = writeStringToMemory;function writeArrayToMemory(array, buffer) {
      HEAP8.set(array, buffer);
    }Module["writeArrayToMemory"] = writeArrayToMemory;function writeAsciiToMemory(str, buffer, dontAddNull) {
      for (var i = 0; i < str.length; ++i) {
        HEAP8[buffer++ >> 0] = str.charCodeAt(i);
      }if (!dontAddNull) HEAP8[buffer >> 0] = 0;
    }Module["writeAsciiToMemory"] = writeAsciiToMemory;if (!Math["imul"] || Math["imul"](4294967295, 5) !== -5) Math["imul"] = function imul(a, b) {
      var ah = a >>> 16;var al = a & 65535;var bh = b >>> 16;var bl = b & 65535;return al * bl + (ah * bl + al * bh << 16) | 0;
    };Math.imul = Math["imul"];if (!Math["fround"]) {
      var froundBuffer = new Float32Array(1);Math["fround"] = function (x) {
        froundBuffer[0] = x;return froundBuffer[0];
      };
    }Math.fround = Math["fround"];if (!Math["clz32"]) Math["clz32"] = function (x) {
      x = x >>> 0;for (var i = 0; i < 32; i++) {
        if (x & 1 << 31 - i) return i;
      }return 32;
    };Math.clz32 = Math["clz32"];if (!Math["trunc"]) Math["trunc"] = function (x) {
      return x < 0 ? Math.ceil(x) : Math.floor(x);
    };Math.trunc = Math["trunc"];var Math_abs = Math.abs;var Math_cos = Math.cos;var Math_sin = Math.sin;var Math_tan = Math.tan;var Math_acos = Math.acos;var Math_asin = Math.asin;var Math_atan = Math.atan;var Math_atan2 = Math.atan2;var Math_exp = Math.exp;var Math_log = Math.log;var Math_sqrt = Math.sqrt;var Math_ceil = Math.ceil;var Math_floor = Math.floor;var Math_pow = Math.pow;var Math_imul = Math.imul;var Math_fround = Math.fround;var Math_round = Math.round;var Math_min = Math.min;var Math_clz32 = Math.clz32;var Math_trunc = Math.trunc;var runDependencies = 0;var runDependencyWatcher = null;var dependenciesFulfilled = null;function getUniqueRunDependency(id) {
      return id;
    }function addRunDependency(id) {
      runDependencies++;if (Module["monitorRunDependencies"]) {
        Module["monitorRunDependencies"](runDependencies);
      }
    }Module["addRunDependency"] = addRunDependency;function removeRunDependency(id) {
      runDependencies--;if (Module["monitorRunDependencies"]) {
        Module["monitorRunDependencies"](runDependencies);
      }if (runDependencies == 0) {
        if (runDependencyWatcher !== null) {
          clearInterval(runDependencyWatcher);runDependencyWatcher = null;
        }if (dependenciesFulfilled) {
          var callback = dependenciesFulfilled;dependenciesFulfilled = null;callback();
        }
      }
    }Module["removeRunDependency"] = removeRunDependency;Module["preloadedImages"] = {};Module["preloadedAudios"] = {};var ASM_CONSTS = [function ($0, $1, $2, $3, $4, $5, $6, $7) {
      return _nbind.callbackSignatureList[$0].apply(this, arguments);
    }];function _emscripten_asm_const_iiiiiiii(code, a0, a1, a2, a3, a4, a5, a6) {
      return ASM_CONSTS[code](a0, a1, a2, a3, a4, a5, a6);
    }function _emscripten_asm_const_iiiii(code, a0, a1, a2, a3) {
      return ASM_CONSTS[code](a0, a1, a2, a3);
    }function _emscripten_asm_const_iiidddddd(code, a0, a1, a2, a3, a4, a5, a6, a7) {
      return ASM_CONSTS[code](a0, a1, a2, a3, a4, a5, a6, a7);
    }function _emscripten_asm_const_iiididi(code, a0, a1, a2, a3, a4, a5) {
      return ASM_CONSTS[code](a0, a1, a2, a3, a4, a5);
    }function _emscripten_asm_const_iiii(code, a0, a1, a2) {
      return ASM_CONSTS[code](a0, a1, a2);
    }function _emscripten_asm_const_iiiid(code, a0, a1, a2, a3) {
      return ASM_CONSTS[code](a0, a1, a2, a3);
    }function _emscripten_asm_const_iiiiii(code, a0, a1, a2, a3, a4) {
      return ASM_CONSTS[code](a0, a1, a2, a3, a4);
    }STATIC_BASE = Runtime.GLOBAL_BASE;STATICTOP = STATIC_BASE + 12800;__ATINIT__.push({ func: function () {
        __GLOBAL__sub_I_Yoga_cpp();
      } }, { func: function () {
        __GLOBAL__sub_I_nbind_cc();
      } }, { func: function () {
        __GLOBAL__sub_I_common_cc();
      } }, { func: function () {
        __GLOBAL__sub_I_Binding_cc();
      } });allocate([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 3, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 3, 0, 0, 0, 0, 0, 192, 127, 3, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 190, 12, 0, 0, 200, 12, 0, 0, 208, 12, 0, 0, 216, 12, 0, 0, 230, 12, 0, 0, 242, 12, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 192, 127, 3, 0, 0, 0, 180, 45, 0, 0, 181, 45, 0, 0, 182, 45, 0, 0, 181, 45, 0, 0, 182, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 183, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 184, 45, 0, 0, 185, 45, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 182, 45, 0, 0, 186, 45, 0, 0, 185, 45, 0, 0, 148, 4, 0, 0, 3, 0, 0, 0, 187, 45, 0, 0, 164, 4, 0, 0, 188, 45, 0, 0, 2, 0, 0, 0, 189, 45, 0, 0, 164, 4, 0, 0, 188, 45, 0, 0, 185, 45, 0, 0, 164, 4, 0, 0, 185, 45, 0, 0, 164, 4, 0, 0, 188, 45, 0, 0, 181, 45, 0, 0, 182, 45, 0, 0, 181, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 183, 45, 0, 0, 182, 45, 0, 0, 181, 45, 0, 0, 190, 45, 0, 0, 190, 45, 0, 0, 182, 45, 0, 0, 182, 45, 0, 0, 185, 45, 0, 0, 181, 45, 0, 0, 185, 45, 0, 0, 182, 45, 0, 0, 181, 45, 0, 0, 185, 45, 0, 0, 182, 45, 0, 0, 185, 45, 0, 0, 48, 5, 0, 0, 3, 0, 0, 0, 56, 5, 0, 0, 1, 0, 0, 0, 189, 45, 0, 0, 185, 45, 0, 0, 164, 4, 0, 0, 76, 5, 0, 0, 2, 0, 0, 0, 191, 45, 0, 0, 186, 45, 0, 0, 182, 45, 0, 0, 185, 45, 0, 0, 192, 45, 0, 0, 185, 45, 0, 0, 182, 45, 0, 0, 186, 45, 0, 0, 185, 45, 0, 0, 76, 5, 0, 0, 76, 5, 0, 0, 136, 5, 0, 0, 182, 45, 0, 0, 181, 45, 0, 0, 2, 0, 0, 0, 190, 45, 0, 0, 136, 5, 0, 0, 56, 19, 0, 0, 156, 5, 0, 0, 2, 0, 0, 0, 184, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 204, 5, 0, 0, 181, 45, 0, 0, 181, 45, 0, 0, 2, 0, 0, 0, 180, 45, 0, 0, 204, 5, 0, 0, 2, 0, 0, 0, 195, 45, 0, 0, 236, 5, 0, 0, 97, 19, 0, 0, 198, 45, 0, 0, 211, 45, 0, 0, 212, 45, 0, 0, 213, 45, 0, 0, 214, 45, 0, 0, 215, 45, 0, 0, 188, 45, 0, 0, 182, 45, 0, 0, 216, 45, 0, 0, 217, 45, 0, 0, 218, 45, 0, 0, 219, 45, 0, 0, 192, 45, 0, 0, 181, 45, 0, 0, 0, 0, 0, 0, 185, 45, 0, 0, 110, 19, 0, 0, 186, 45, 0, 0, 115, 19, 0, 0, 221, 45, 0, 0, 120, 19, 0, 0, 148, 4, 0, 0, 132, 19, 0, 0, 96, 6, 0, 0, 145, 19, 0, 0, 222, 45, 0, 0, 164, 19, 0, 0, 223, 45, 0, 0, 173, 19, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 104, 6, 0, 0, 1, 0, 0, 0, 187, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 185, 45, 0, 0, 224, 45, 0, 0, 164, 6, 0, 0, 188, 45, 0, 0, 172, 6, 0, 0, 180, 6, 0, 0, 2, 0, 0, 0, 188, 6, 0, 0, 7, 0, 0, 0, 224, 45, 0, 0, 7, 0, 0, 0, 164, 6, 0, 0, 1, 0, 0, 0, 213, 45, 0, 0, 185, 45, 0, 0, 224, 45, 0, 0, 172, 6, 0, 0, 185, 45, 0, 0, 224, 45, 0, 0, 164, 6, 0, 0, 185, 45, 0, 0, 224, 45, 0, 0, 211, 45, 0, 0, 211, 45, 0, 0, 222, 45, 0, 0, 211, 45, 0, 0, 224, 45, 0, 0, 222, 45, 0, 0, 211, 45, 0, 0, 224, 45, 0, 0, 172, 6, 0, 0, 222, 45, 0, 0, 211, 45, 0, 0, 224, 45, 0, 0, 188, 45, 0, 0, 222, 45, 0, 0, 211, 45, 0, 0, 40, 7, 0, 0, 188, 45, 0, 0, 2, 0, 0, 0, 224, 45, 0, 0, 185, 45, 0, 0, 188, 45, 0, 0, 188, 45, 0, 0, 188, 45, 0, 0, 188, 45, 0, 0, 222, 45, 0, 0, 224, 45, 0, 0, 148, 4, 0, 0, 185, 45, 0, 0, 148, 4, 0, 0, 148, 4, 0, 0, 148, 4, 0, 0, 148, 4, 0, 0, 148, 4, 0, 0, 185, 45, 0, 0, 164, 6, 0, 0, 148, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 148, 7, 0, 0, 2, 0, 0, 0, 225, 45, 0, 0, 183, 45, 0, 0, 188, 45, 0, 0, 168, 7, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 234, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 9, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 242, 45, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 111, 117, 108, 100, 32, 110, 111, 116, 32, 97, 108, 108, 111, 99, 97, 116, 101, 32, 109, 101, 109, 111, 114, 121, 32, 102, 111, 114, 32, 110, 111, 100, 101, 0, 67, 97, 110, 110, 111, 116, 32, 114, 101, 115, 101, 116, 32, 97, 32, 110, 111, 100, 101, 32, 119, 104, 105, 99, 104, 32, 115, 116, 105, 108, 108, 32, 104, 97, 115, 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 97, 116, 116, 97, 99, 104, 101, 100, 0, 67, 97, 110, 110, 111, 116, 32, 114, 101, 115, 101, 116, 32, 97, 32, 110, 111, 100, 101, 32, 115, 116, 105, 108, 108, 32, 97, 116, 116, 97, 99, 104, 101, 100, 32, 116, 111, 32, 97, 32, 112, 97, 114, 101, 110, 116, 0, 67, 111, 117, 108, 100, 32, 110, 111, 116, 32, 97, 108, 108, 111, 99, 97, 116, 101, 32, 109, 101, 109, 111, 114, 121, 32, 102, 111, 114, 32, 99, 111, 110, 102, 105, 103, 0, 67, 97, 110, 110, 111, 116, 32, 115, 101, 116, 32, 109, 101, 97, 115, 117, 114, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 58, 32, 78, 111, 100, 101, 115, 32, 119, 105, 116, 104, 32, 109, 101, 97, 115, 117, 114, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 115, 32, 99, 97, 110, 110, 111, 116, 32, 104, 97, 118, 101, 32, 99, 104, 105, 108, 100, 114, 101, 110, 46, 0, 67, 104, 105, 108, 100, 32, 97, 108, 114, 101, 97, 100, 121, 32, 104, 97, 115, 32, 97, 32, 112, 97, 114, 101, 110, 116, 44, 32, 105, 116, 32, 109, 117, 115, 116, 32, 98, 101, 32, 114, 101, 109, 111, 118, 101, 100, 32, 102, 105, 114, 115, 116, 46, 0, 67, 97, 110, 110, 111, 116, 32, 97, 100, 100, 32, 99, 104, 105, 108, 100, 58, 32, 78, 111, 100, 101, 115, 32, 119, 105, 116, 104, 32, 109, 101, 97, 115, 117, 114, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 115, 32, 99, 97, 110, 110, 111, 116, 32, 104, 97, 118, 101, 32, 99, 104, 105, 108, 100, 114, 101, 110, 46, 0, 79, 110, 108, 121, 32, 108, 101, 97, 102, 32, 110, 111, 100, 101, 115, 32, 119, 105, 116, 104, 32, 99, 117, 115, 116, 111, 109, 32, 109, 101, 97, 115, 117, 114, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 115, 115, 104, 111, 117, 108, 100, 32, 109, 97, 110, 117, 97, 108, 108, 121, 32, 109, 97, 114, 107, 32, 116, 104, 101, 109, 115, 101, 108, 118, 101, 115, 32, 97, 115, 32, 100, 105, 114, 116, 121, 0, 67, 97, 110, 110, 111, 116, 32, 103, 101, 116, 32, 108, 97, 121, 111, 117, 116, 32, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 32, 111, 102, 32, 109, 117, 108, 116, 105, 45, 101, 100, 103, 101, 32, 115, 104, 111, 114, 116, 104, 97, 110, 100, 115, 0, 37, 115, 37, 100, 46, 123, 91, 115, 107, 105, 112, 112, 101, 100, 93, 32, 0, 119, 109, 58, 32, 37, 115, 44, 32, 104, 109, 58, 32, 37, 115, 44, 32, 97, 119, 58, 32, 37, 102, 32, 97, 104, 58, 32, 37, 102, 32, 61, 62, 32, 100, 58, 32, 40, 37, 102, 44, 32, 37, 102, 41, 32, 37, 115, 10, 0, 37, 115, 37, 100, 46, 123, 37, 115, 0, 42, 0, 119, 109, 58, 32, 37, 115, 44, 32, 104, 109, 58, 32, 37, 115, 44, 32, 97, 119, 58, 32, 37, 102, 32, 97, 104, 58, 32, 37, 102, 32, 37, 115, 10, 0, 37, 115, 37, 100, 46, 125, 37, 115, 0, 119, 109, 58, 32, 37, 115, 44, 32, 104, 109, 58, 32, 37, 115, 44, 32, 100, 58, 32, 40, 37, 102, 44, 32, 37, 102, 41, 32, 37, 115, 10, 0, 79, 117, 116, 32, 111, 102, 32, 99, 97, 99, 104, 101, 32, 101, 110, 116, 114, 105, 101, 115, 33, 10, 0, 83, 99, 97, 108, 101, 32, 102, 97, 99, 116, 111, 114, 32, 115, 104, 111, 117, 108, 100, 32, 110, 111, 116, 32, 98, 101, 32, 108, 101, 115, 115, 32, 116, 104, 97, 110, 32, 122, 101, 114, 111, 0, 105, 110, 105, 116, 105, 97, 108, 0, 37, 115, 10, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 85, 78, 68, 69, 70, 73, 78, 69, 68, 0, 69, 88, 65, 67, 84, 76, 89, 0, 65, 84, 95, 77, 79, 83, 84, 0, 76, 65, 89, 95, 85, 78, 68, 69, 70, 73, 78, 69, 68, 0, 76, 65, 89, 95, 69, 88, 65, 67, 84, 76, 89, 0, 76, 65, 89, 95, 65, 84, 95, 77, 79, 83, 84, 0, 97, 118, 97, 105, 108, 97, 98, 108, 101, 87, 105, 100, 116, 104, 32, 105, 115, 32, 105, 110, 100, 101, 102, 105, 110, 105, 116, 101, 32, 115, 111, 32, 119, 105, 100, 116, 104, 77, 101, 97, 115, 117, 114, 101, 77, 111, 100, 101, 32, 109, 117, 115, 116, 32, 98, 101, 32, 89, 71, 77, 101, 97, 115, 117, 114, 101, 77, 111, 100, 101, 85, 110, 100, 101, 102, 105, 110, 101, 100, 0, 97, 118, 97, 105, 108, 97, 98, 108, 101, 72, 101, 105, 103, 104, 116, 32, 105, 115, 32, 105, 110, 100, 101, 102, 105, 110, 105, 116, 101, 32, 115, 111, 32, 104, 101, 105, 103, 104, 116, 77, 101, 97, 115, 117, 114, 101, 77, 111, 100, 101, 32, 109, 117, 115, 116, 32, 98, 101, 32, 89, 71, 77, 101, 97, 115, 117, 114, 101, 77, 111, 100, 101, 85, 110, 100, 101, 102, 105, 110, 101, 100, 0, 102, 108, 101, 120, 0, 115, 116, 114, 101, 116, 99, 104, 0, 109, 117, 108, 116, 105, 108, 105, 110, 101, 45, 115, 116, 114, 101, 116, 99, 104, 0, 69, 120, 112, 101, 99, 116, 101, 100, 32, 110, 111, 100, 101, 32, 116, 111, 32, 104, 97, 118, 101, 32, 99, 117, 115, 116, 111, 109, 32, 109, 101, 97, 115, 117, 114, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 0, 109, 101, 97, 115, 117, 114, 101, 0, 69, 120, 112, 101, 99, 116, 32, 99, 117, 115, 116, 111, 109, 32, 98, 97, 115, 101, 108, 105, 110, 101, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 111, 32, 110, 111, 116, 32, 114, 101, 116, 117, 114, 110, 32, 78, 97, 78, 0, 97, 98, 115, 45, 109, 101, 97, 115, 117, 114, 101, 0, 97, 98, 115, 45, 108, 97, 121, 111, 117, 116, 0, 78, 111, 100, 101, 0, 99, 114, 101, 97, 116, 101, 68, 101, 102, 97, 117, 108, 116, 0, 99, 114, 101, 97, 116, 101, 87, 105, 116, 104, 67, 111, 110, 102, 105, 103, 0, 100, 101, 115, 116, 114, 111, 121, 0, 114, 101, 115, 101, 116, 0, 99, 111, 112, 121, 83, 116, 121, 108, 101, 0, 115, 101, 116, 80, 111, 115, 105, 116, 105, 111, 110, 84, 121, 112, 101, 0, 115, 101, 116, 80, 111, 115, 105, 116, 105, 111, 110, 0, 115, 101, 116, 80, 111, 115, 105, 116, 105, 111, 110, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 65, 108, 105, 103, 110, 67, 111, 110, 116, 101, 110, 116, 0, 115, 101, 116, 65, 108, 105, 103, 110, 73, 116, 101, 109, 115, 0, 115, 101, 116, 65, 108, 105, 103, 110, 83, 101, 108, 102, 0, 115, 101, 116, 70, 108, 101, 120, 68, 105, 114, 101, 99, 116, 105, 111, 110, 0, 115, 101, 116, 70, 108, 101, 120, 87, 114, 97, 112, 0, 115, 101, 116, 74, 117, 115, 116, 105, 102, 121, 67, 111, 110, 116, 101, 110, 116, 0, 115, 101, 116, 77, 97, 114, 103, 105, 110, 0, 115, 101, 116, 77, 97, 114, 103, 105, 110, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 77, 97, 114, 103, 105, 110, 65, 117, 116, 111, 0, 115, 101, 116, 79, 118, 101, 114, 102, 108, 111, 119, 0, 115, 101, 116, 68, 105, 115, 112, 108, 97, 121, 0, 115, 101, 116, 70, 108, 101, 120, 0, 115, 101, 116, 70, 108, 101, 120, 66, 97, 115, 105, 115, 0, 115, 101, 116, 70, 108, 101, 120, 66, 97, 115, 105, 115, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 70, 108, 101, 120, 71, 114, 111, 119, 0, 115, 101, 116, 70, 108, 101, 120, 83, 104, 114, 105, 110, 107, 0, 115, 101, 116, 87, 105, 100, 116, 104, 0, 115, 101, 116, 87, 105, 100, 116, 104, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 87, 105, 100, 116, 104, 65, 117, 116, 111, 0, 115, 101, 116, 72, 101, 105, 103, 104, 116, 0, 115, 101, 116, 72, 101, 105, 103, 104, 116, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 72, 101, 105, 103, 104, 116, 65, 117, 116, 111, 0, 115, 101, 116, 77, 105, 110, 87, 105, 100, 116, 104, 0, 115, 101, 116, 77, 105, 110, 87, 105, 100, 116, 104, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 77, 105, 110, 72, 101, 105, 103, 104, 116, 0, 115, 101, 116, 77, 105, 110, 72, 101, 105, 103, 104, 116, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 77, 97, 120, 87, 105, 100, 116, 104, 0, 115, 101, 116, 77, 97, 120, 87, 105, 100, 116, 104, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 77, 97, 120, 72, 101, 105, 103, 104, 116, 0, 115, 101, 116, 77, 97, 120, 72, 101, 105, 103, 104, 116, 80, 101, 114, 99, 101, 110, 116, 0, 115, 101, 116, 65, 115, 112, 101, 99, 116, 82, 97, 116, 105, 111, 0, 115, 101, 116, 66, 111, 114, 100, 101, 114, 0, 115, 101, 116, 80, 97, 100, 100, 105, 110, 103, 0, 115, 101, 116, 80, 97, 100, 100, 105, 110, 103, 80, 101, 114, 99, 101, 110, 116, 0, 103, 101, 116, 80, 111, 115, 105, 116, 105, 111, 110, 84, 121, 112, 101, 0, 103, 101, 116, 80, 111, 115, 105, 116, 105, 111, 110, 0, 103, 101, 116, 65, 108, 105, 103, 110, 67, 111, 110, 116, 101, 110, 116, 0, 103, 101, 116, 65, 108, 105, 103, 110, 73, 116, 101, 109, 115, 0, 103, 101, 116, 65, 108, 105, 103, 110, 83, 101, 108, 102, 0, 103, 101, 116, 70, 108, 101, 120, 68, 105, 114, 101, 99, 116, 105, 111, 110, 0, 103, 101, 116, 70, 108, 101, 120, 87, 114, 97, 112, 0, 103, 101, 116, 74, 117, 115, 116, 105, 102, 121, 67, 111, 110, 116, 101, 110, 116, 0, 103, 101, 116, 77, 97, 114, 103, 105, 110, 0, 103, 101, 116, 70, 108, 101, 120, 66, 97, 115, 105, 115, 0, 103, 101, 116, 70, 108, 101, 120, 71, 114, 111, 119, 0, 103, 101, 116, 70, 108, 101, 120, 83, 104, 114, 105, 110, 107, 0, 103, 101, 116, 87, 105, 100, 116, 104, 0, 103, 101, 116, 72, 101, 105, 103, 104, 116, 0, 103, 101, 116, 77, 105, 110, 87, 105, 100, 116, 104, 0, 103, 101, 116, 77, 105, 110, 72, 101, 105, 103, 104, 116, 0, 103, 101, 116, 77, 97, 120, 87, 105, 100, 116, 104, 0, 103, 101, 116, 77, 97, 120, 72, 101, 105, 103, 104, 116, 0, 103, 101, 116, 65, 115, 112, 101, 99, 116, 82, 97, 116, 105, 111, 0, 103, 101, 116, 66, 111, 114, 100, 101, 114, 0, 103, 101, 116, 79, 118, 101, 114, 102, 108, 111, 119, 0, 103, 101, 116, 68, 105, 115, 112, 108, 97, 121, 0, 103, 101, 116, 80, 97, 100, 100, 105, 110, 103, 0, 105, 110, 115, 101, 114, 116, 67, 104, 105, 108, 100, 0, 114, 101, 109, 111, 118, 101, 67, 104, 105, 108, 100, 0, 103, 101, 116, 67, 104, 105, 108, 100, 67, 111, 117, 110, 116, 0, 103, 101, 116, 80, 97, 114, 101, 110, 116, 0, 103, 101, 116, 67, 104, 105, 108, 100, 0, 115, 101, 116, 77, 101, 97, 115, 117, 114, 101, 70, 117, 110, 99, 0, 117, 110, 115, 101, 116, 77, 101, 97, 115, 117, 114, 101, 70, 117, 110, 99, 0, 109, 97, 114, 107, 68, 105, 114, 116, 121, 0, 105, 115, 68, 105, 114, 116, 121, 0, 99, 97, 108, 99, 117, 108, 97, 116, 101, 76, 97, 121, 111, 117, 116, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 76, 101, 102, 116, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 82, 105, 103, 104, 116, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 84, 111, 112, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 66, 111, 116, 116, 111, 109, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 87, 105, 100, 116, 104, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 72, 101, 105, 103, 104, 116, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 76, 97, 121, 111, 117, 116, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 77, 97, 114, 103, 105, 110, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 66, 111, 114, 100, 101, 114, 0, 103, 101, 116, 67, 111, 109, 112, 117, 116, 101, 100, 80, 97, 100, 100, 105, 110, 103, 0, 67, 111, 110, 102, 105, 103, 0, 99, 114, 101, 97, 116, 101, 0, 115, 101, 116, 69, 120, 112, 101, 114, 105, 109, 101, 110, 116, 97, 108, 70, 101, 97, 116, 117, 114, 101, 69, 110, 97, 98, 108, 101, 100, 0, 115, 101, 116, 80, 111, 105, 110, 116, 83, 99, 97, 108, 101, 70, 97, 99, 116, 111, 114, 0, 105, 115, 69, 120, 112, 101, 114, 105, 109, 101, 110, 116, 97, 108, 70, 101, 97, 116, 117, 114, 101, 69, 110, 97, 98, 108, 101, 100, 0, 86, 97, 108, 117, 101, 0, 76, 97, 121, 111, 117, 116, 0, 83, 105, 122, 101, 0, 103, 101, 116, 73, 110, 115, 116, 97, 110, 99, 101, 67, 111, 117, 110, 116, 0, 73, 110, 116, 54, 52, 0, 1, 1, 1, 2, 2, 4, 4, 4, 4, 8, 8, 4, 8, 118, 111, 105, 100, 0, 98, 111, 111, 108, 0, 115, 116, 100, 58, 58, 115, 116, 114, 105, 110, 103, 0, 99, 98, 70, 117, 110, 99, 116, 105, 111, 110, 32, 38, 0, 99, 111, 110, 115, 116, 32, 99, 98, 70, 117, 110, 99, 116, 105, 111, 110, 32, 38, 0, 69, 120, 116, 101, 114, 110, 97, 108, 0, 66, 117, 102, 102, 101, 114, 0, 78, 66, 105, 110, 100, 73, 68, 0, 78, 66, 105, 110, 100, 0, 98, 105, 110, 100, 95, 118, 97, 108, 117, 101, 0, 114, 101, 102, 108, 101, 99, 116, 0, 113, 117, 101, 114, 121, 84, 121, 112, 101, 0, 108, 97, 108, 108, 111, 99, 0, 108, 114, 101, 115, 101, 116, 0, 123, 114, 101, 116, 117, 114, 110, 40, 95, 110, 98, 105, 110, 100, 46, 99, 97, 108, 108, 98, 97, 99, 107, 83, 105, 103, 110, 97, 116, 117, 114, 101, 76, 105, 115, 116, 91, 36, 48, 93, 46, 97, 112, 112, 108, 121, 40, 116, 104, 105, 115, 44, 97, 114, 103, 117, 109, 101, 110, 116, 115, 41, 41, 59, 125, 0, 95, 110, 98, 105, 110, 100, 95, 110, 101, 119, 0, 17, 0, 10, 0, 17, 17, 17, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 15, 10, 17, 17, 17, 3, 10, 7, 0, 1, 19, 9, 11, 11, 0, 0, 9, 6, 11, 0, 0, 11, 0, 6, 17, 0, 0, 0, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 10, 10, 17, 17, 17, 0, 10, 0, 0, 2, 0, 9, 11, 0, 0, 0, 9, 0, 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 9, 12, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 4, 13, 0, 0, 0, 0, 9, 14, 0, 0, 0, 0, 0, 14, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 9, 16, 0, 0, 0, 0, 0, 16, 0, 0, 16, 0, 0, 18, 0, 0, 0, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 18, 18, 18, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 9, 11, 0, 0, 0, 0, 0, 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 9, 12, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 0, 45, 43, 32, 32, 32, 48, 88, 48, 120, 0, 40, 110, 117, 108, 108, 41, 0, 45, 48, 88, 43, 48, 88, 32, 48, 88, 45, 48, 120, 43, 48, 120, 32, 48, 120, 0, 105, 110, 102, 0, 73, 78, 70, 0, 110, 97, 110, 0, 78, 65, 78, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 46, 0, 84, 33, 34, 25, 13, 1, 2, 3, 17, 75, 28, 12, 16, 4, 11, 29, 18, 30, 39, 104, 110, 111, 112, 113, 98, 32, 5, 6, 15, 19, 20, 21, 26, 8, 22, 7, 40, 36, 23, 24, 9, 10, 14, 27, 31, 37, 35, 131, 130, 125, 38, 42, 43, 60, 61, 62, 63, 67, 71, 74, 77, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 114, 115, 116, 121, 122, 123, 124, 0, 73, 108, 108, 101, 103, 97, 108, 32, 98, 121, 116, 101, 32, 115, 101, 113, 117, 101, 110, 99, 101, 0, 68, 111, 109, 97, 105, 110, 32, 101, 114, 114, 111, 114, 0, 82, 101, 115, 117, 108, 116, 32, 110, 111, 116, 32, 114, 101, 112, 114, 101, 115, 101, 110, 116, 97, 98, 108, 101, 0, 78, 111, 116, 32, 97, 32, 116, 116, 121, 0, 80, 101, 114, 109, 105, 115, 115, 105, 111, 110, 32, 100, 101, 110, 105, 101, 100, 0, 79, 112, 101, 114, 97, 116, 105, 111, 110, 32, 110, 111, 116, 32, 112, 101, 114, 109, 105, 116, 116, 101, 100, 0, 78, 111, 32, 115, 117, 99, 104, 32, 102, 105, 108, 101, 32, 111, 114, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 0, 78, 111, 32, 115, 117, 99, 104, 32, 112, 114, 111, 99, 101, 115, 115, 0, 70, 105, 108, 101, 32, 101, 120, 105, 115, 116, 115, 0, 86, 97, 108, 117, 101, 32, 116, 111, 111, 32, 108, 97, 114, 103, 101, 32, 102, 111, 114, 32, 100, 97, 116, 97, 32, 116, 121, 112, 101, 0, 78, 111, 32, 115, 112, 97, 99, 101, 32, 108, 101, 102, 116, 32, 111, 110, 32, 100, 101, 118, 105, 99, 101, 0, 79, 117, 116, 32, 111, 102, 32, 109, 101, 109, 111, 114, 121, 0, 82, 101, 115, 111, 117, 114, 99, 101, 32, 98, 117, 115, 121, 0, 73, 110, 116, 101, 114, 114, 117, 112, 116, 101, 100, 32, 115, 121, 115, 116, 101, 109, 32, 99, 97, 108, 108, 0, 82, 101, 115, 111, 117, 114, 99, 101, 32, 116, 101, 109, 112, 111, 114, 97, 114, 105, 108, 121, 32, 117, 110, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 73, 110, 118, 97, 108, 105, 100, 32, 115, 101, 101, 107, 0, 67, 114, 111, 115, 115, 45, 100, 101, 118, 105, 99, 101, 32, 108, 105, 110, 107, 0, 82, 101, 97, 100, 45, 111, 110, 108, 121, 32, 102, 105, 108, 101, 32, 115, 121, 115, 116, 101, 109, 0, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 110, 111, 116, 32, 101, 109, 112, 116, 121, 0, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 114, 101, 115, 101, 116, 32, 98, 121, 32, 112, 101, 101, 114, 0, 79, 112, 101, 114, 97, 116, 105, 111, 110, 32, 116, 105, 109, 101, 100, 32, 111, 117, 116, 0, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 114, 101, 102, 117, 115, 101, 100, 0, 72, 111, 115, 116, 32, 105, 115, 32, 100, 111, 119, 110, 0, 72, 111, 115, 116, 32, 105, 115, 32, 117, 110, 114, 101, 97, 99, 104, 97, 98, 108, 101, 0, 65, 100, 100, 114, 101, 115, 115, 32, 105, 110, 32, 117, 115, 101, 0, 66, 114, 111, 107, 101, 110, 32, 112, 105, 112, 101, 0, 73, 47, 79, 32, 101, 114, 114, 111, 114, 0, 78, 111, 32, 115, 117, 99, 104, 32, 100, 101, 118, 105, 99, 101, 32, 111, 114, 32, 97, 100, 100, 114, 101, 115, 115, 0, 66, 108, 111, 99, 107, 32, 100, 101, 118, 105, 99, 101, 32, 114, 101, 113, 117, 105, 114, 101, 100, 0, 78, 111, 32, 115, 117, 99, 104, 32, 100, 101, 118, 105, 99, 101, 0, 78, 111, 116, 32, 97, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 0, 73, 115, 32, 97, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 0, 84, 101, 120, 116, 32, 102, 105, 108, 101, 32, 98, 117, 115, 121, 0, 69, 120, 101, 99, 32, 102, 111, 114, 109, 97, 116, 32, 101, 114, 114, 111, 114, 0, 73, 110, 118, 97, 108, 105, 100, 32, 97, 114, 103, 117, 109, 101, 110, 116, 0, 65, 114, 103, 117, 109, 101, 110, 116, 32, 108, 105, 115, 116, 32, 116, 111, 111, 32, 108, 111, 110, 103, 0, 83, 121, 109, 98, 111, 108, 105, 99, 32, 108, 105, 110, 107, 32, 108, 111, 111, 112, 0, 70, 105, 108, 101, 110, 97, 109, 101, 32, 116, 111, 111, 32, 108, 111, 110, 103, 0, 84, 111, 111, 32, 109, 97, 110, 121, 32, 111, 112, 101, 110, 32, 102, 105, 108, 101, 115, 32, 105, 110, 32, 115, 121, 115, 116, 101, 109, 0, 78, 111, 32, 102, 105, 108, 101, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 66, 97, 100, 32, 102, 105, 108, 101, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 0, 78, 111, 32, 99, 104, 105, 108, 100, 32, 112, 114, 111, 99, 101, 115, 115, 0, 66, 97, 100, 32, 97, 100, 100, 114, 101, 115, 115, 0, 70, 105, 108, 101, 32, 116, 111, 111, 32, 108, 97, 114, 103, 101, 0, 84, 111, 111, 32, 109, 97, 110, 121, 32, 108, 105, 110, 107, 115, 0, 78, 111, 32, 108, 111, 99, 107, 115, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 82, 101, 115, 111, 117, 114, 99, 101, 32, 100, 101, 97, 100, 108, 111, 99, 107, 32, 119, 111, 117, 108, 100, 32, 111, 99, 99, 117, 114, 0, 83, 116, 97, 116, 101, 32, 110, 111, 116, 32, 114, 101, 99, 111, 118, 101, 114, 97, 98, 108, 101, 0, 80, 114, 101, 118, 105, 111, 117, 115, 32, 111, 119, 110, 101, 114, 32, 100, 105, 101, 100, 0, 79, 112, 101, 114, 97, 116, 105, 111, 110, 32, 99, 97, 110, 99, 101, 108, 101, 100, 0, 70, 117, 110, 99, 116, 105, 111, 110, 32, 110, 111, 116, 32, 105, 109, 112, 108, 101, 109, 101, 110, 116, 101, 100, 0, 78, 111, 32, 109, 101, 115, 115, 97, 103, 101, 32, 111, 102, 32, 100, 101, 115, 105, 114, 101, 100, 32, 116, 121, 112, 101, 0, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 114, 101, 109, 111, 118, 101, 100, 0, 68, 101, 118, 105, 99, 101, 32, 110, 111, 116, 32, 97, 32, 115, 116, 114, 101, 97, 109, 0, 78, 111, 32, 100, 97, 116, 97, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 68, 101, 118, 105, 99, 101, 32, 116, 105, 109, 101, 111, 117, 116, 0, 79, 117, 116, 32, 111, 102, 32, 115, 116, 114, 101, 97, 109, 115, 32, 114, 101, 115, 111, 117, 114, 99, 101, 115, 0, 76, 105, 110, 107, 32, 104, 97, 115, 32, 98, 101, 101, 110, 32, 115, 101, 118, 101, 114, 101, 100, 0, 80, 114, 111, 116, 111, 99, 111, 108, 32, 101, 114, 114, 111, 114, 0, 66, 97, 100, 32, 109, 101, 115, 115, 97, 103, 101, 0, 70, 105, 108, 101, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 32, 105, 110, 32, 98, 97, 100, 32, 115, 116, 97, 116, 101, 0, 78, 111, 116, 32, 97, 32, 115, 111, 99, 107, 101, 116, 0, 68, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 32, 97, 100, 100, 114, 101, 115, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 0, 77, 101, 115, 115, 97, 103, 101, 32, 116, 111, 111, 32, 108, 97, 114, 103, 101, 0, 80, 114, 111, 116, 111, 99, 111, 108, 32, 119, 114, 111, 110, 103, 32, 116, 121, 112, 101, 32, 102, 111, 114, 32, 115, 111, 99, 107, 101, 116, 0, 80, 114, 111, 116, 111, 99, 111, 108, 32, 110, 111, 116, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 80, 114, 111, 116, 111, 99, 111, 108, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 0, 83, 111, 99, 107, 101, 116, 32, 116, 121, 112, 101, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 0, 78, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 0, 80, 114, 111, 116, 111, 99, 111, 108, 32, 102, 97, 109, 105, 108, 121, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 0, 65, 100, 100, 114, 101, 115, 115, 32, 102, 97, 109, 105, 108, 121, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 98, 121, 32, 112, 114, 111, 116, 111, 99, 111, 108, 0, 65, 100, 100, 114, 101, 115, 115, 32, 110, 111, 116, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 78, 101, 116, 119, 111, 114, 107, 32, 105, 115, 32, 100, 111, 119, 110, 0, 78, 101, 116, 119, 111, 114, 107, 32, 117, 110, 114, 101, 97, 99, 104, 97, 98, 108, 101, 0, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 114, 101, 115, 101, 116, 32, 98, 121, 32, 110, 101, 116, 119, 111, 114, 107, 0, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 97, 98, 111, 114, 116, 101, 100, 0, 78, 111, 32, 98, 117, 102, 102, 101, 114, 32, 115, 112, 97, 99, 101, 32, 97, 118, 97, 105, 108, 97, 98, 108, 101, 0, 83, 111, 99, 107, 101, 116, 32, 105, 115, 32, 99, 111, 110, 110, 101, 99, 116, 101, 100, 0, 83, 111, 99, 107, 101, 116, 32, 110, 111, 116, 32, 99, 111, 110, 110, 101, 99, 116, 101, 100, 0, 67, 97, 110, 110, 111, 116, 32, 115, 101, 110, 100, 32, 97, 102, 116, 101, 114, 32, 115, 111, 99, 107, 101, 116, 32, 115, 104, 117, 116, 100, 111, 119, 110, 0, 79, 112, 101, 114, 97, 116, 105, 111, 110, 32, 97, 108, 114, 101, 97, 100, 121, 32, 105, 110, 32, 112, 114, 111, 103, 114, 101, 115, 115, 0, 79, 112, 101, 114, 97, 116, 105, 111, 110, 32, 105, 110, 32, 112, 114, 111, 103, 114, 101, 115, 115, 0, 83, 116, 97, 108, 101, 32, 102, 105, 108, 101, 32, 104, 97, 110, 100, 108, 101, 0, 82, 101, 109, 111, 116, 101, 32, 73, 47, 79, 32, 101, 114, 114, 111, 114, 0, 81, 117, 111, 116, 97, 32, 101, 120, 99, 101, 101, 100, 101, 100, 0, 78, 111, 32, 109, 101, 100, 105, 117, 109, 32, 102, 111, 117, 110, 100, 0, 87, 114, 111, 110, 103, 32, 109, 101, 100, 105, 117, 109, 32, 116, 121, 112, 101, 0, 78, 111, 32, 101, 114, 114, 111, 114, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 0, 0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE);var tempDoublePtr = STATICTOP;STATICTOP += 16;function _atexit(func, arg) {
      __ATEXIT__.unshift({ func: func, arg: arg });
    }function ___cxa_atexit() {
      return _atexit.apply(null, arguments);
    }function _abort() {
      Module["abort"]();
    }function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj() {
      Module["printErr"]("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj");abort(-1);
    }function __decorate(decorators, target, key, desc) {
      var c = arguments.length,
          r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
          d;if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;return c > 3 && r && Object.defineProperty(target, key, r), r;
    }function _defineHidden(value) {
      return function (target, key) {
        Object.defineProperty(target, key, { configurable: false, enumerable: false, value: value, writable: true });
      };
    }var _nbind = {};function __nbind_free_external(num) {
      _nbind.externalList[num].dereference(num);
    }function __nbind_reference_external(num) {
      _nbind.externalList[num].reference();
    }function _llvm_stackrestore(p) {
      var self = _llvm_stacksave;var ret = self.LLVM_SAVEDSTACKS[p];self.LLVM_SAVEDSTACKS.splice(p, 1);Runtime.stackRestore(ret);
    }function __nbind_register_pool(pageSize, usedPtr, rootPtr, pagePtr) {
      _nbind.Pool.pageSize = pageSize;_nbind.Pool.usedPtr = usedPtr / 4;_nbind.Pool.rootPtr = rootPtr;_nbind.Pool.pagePtr = pagePtr / 4;HEAP32[usedPtr / 4] = 16909060;if (HEAP8[usedPtr] == 1) _nbind.bigEndian = true;HEAP32[usedPtr / 4] = 0;_nbind.makeTypeKindTbl = (_a = {}, _a[1024] = _nbind.PrimitiveType, _a[64] = _nbind.Int64Type, _a[2048] = _nbind.BindClass, _a[3072] = _nbind.BindClassPtr, _a[4096] = _nbind.SharedClassPtr, _a[5120] = _nbind.ArrayType, _a[6144] = _nbind.ArrayType, _a[7168] = _nbind.CStringType, _a[9216] = _nbind.CallbackType, _a[10240] = _nbind.BindType, _a);_nbind.makeTypeNameTbl = { "Buffer": _nbind.BufferType, "External": _nbind.ExternalType, "Int64": _nbind.Int64Type, "_nbind_new": _nbind.CreateValueType, "bool": _nbind.BooleanType, "cbFunction &": _nbind.CallbackType, "const cbFunction &": _nbind.CallbackType, "const std::string &": _nbind.StringType, "std::string": _nbind.StringType };Module["toggleLightGC"] = _nbind.toggleLightGC;_nbind.callUpcast = Module["dynCall_ii"];var globalScope = _nbind.makeType(_nbind.constructType, { flags: 2048, id: 0, name: "" });globalScope.proto = Module;_nbind.BindClass.list.push(globalScope);var _a;
    }function _emscripten_set_main_loop_timing(mode, value) {
      Browser.mainLoop.timingMode = mode;Browser.mainLoop.timingValue = value;if (!Browser.mainLoop.func) {
        return 1;
      }if (mode == 0) {
        Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() {
          var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now()) | 0;setTimeout(Browser.mainLoop.runner, timeUntilNextTick);
        };Browser.mainLoop.method = "timeout";
      } else if (mode == 1) {
        Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() {
          Browser.requestAnimationFrame(Browser.mainLoop.runner);
        };Browser.mainLoop.method = "rAF";
      } else if (mode == 2) {
        if (!window["setImmediate"]) {
          var setImmediates = [];var emscriptenMainLoopMessageId = "setimmediate";function Browser_setImmediate_messageHandler(event) {
            if (event.source === window && event.data === emscriptenMainLoopMessageId) {
              event.stopPropagation();setImmediates.shift()();
            }
          }window.addEventListener("message", Browser_setImmediate_messageHandler, true);window["setImmediate"] = function Browser_emulated_setImmediate(func) {
            setImmediates.push(func);if (ENVIRONMENT_IS_WORKER) {
              if (Module["setImmediates"] === undefined) Module["setImmediates"] = [];Module["setImmediates"].push(func);window.postMessage({ target: emscriptenMainLoopMessageId });
            } else window.postMessage(emscriptenMainLoopMessageId, "*");
          };
        }Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() {
          window["setImmediate"](Browser.mainLoop.runner);
        };Browser.mainLoop.method = "immediate";
      }return 0;
    }function _emscripten_get_now() {
      abort();
    }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) {
      Module["noExitRuntime"] = true;assert(!Browser.mainLoop.func, "emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func = func;Browser.mainLoop.arg = arg;var browserIterationFunc;if (typeof arg !== "undefined") {
        browserIterationFunc = function () {
          Module["dynCall_vi"](func, arg);
        };
      } else {
        browserIterationFunc = function () {
          Module["dynCall_v"](func);
        };
      }var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner = function Browser_mainLoop_runner() {
        if (ABORT) return;if (Browser.mainLoop.queue.length > 0) {
          var start = Date.now();var blocker = Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if (Browser.mainLoop.remainingBlockers) {
            var remaining = Browser.mainLoop.remainingBlockers;var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining);if (blocker.counted) {
              Browser.mainLoop.remainingBlockers = next;
            } else {
              next = next + .5;Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9;
            }
          }console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + " ms");Browser.mainLoop.updateStatus();if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;setTimeout(Browser.mainLoop.runner, 0);return;
        }if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0;if (Browser.mainLoop.timingMode == 1 && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) {
          Browser.mainLoop.scheduler();return;
        } else if (Browser.mainLoop.timingMode == 0) {
          Browser.mainLoop.tickStartTime = _emscripten_get_now();
        }if (Browser.mainLoop.method === "timeout" && Module.ctx) {
          Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method = "";
        }Browser.mainLoop.runIter(browserIterationFunc);if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;if (typeof SDL === "object" && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler();
      };if (!noSetTiming) {
        if (fps && fps > 0) _emscripten_set_main_loop_timing(0, 1e3 / fps);else _emscripten_set_main_loop_timing(1, 1);Browser.mainLoop.scheduler();
      }if (simulateInfiniteLoop) {
        throw "SimulateInfiniteLoop";
      }
    }var Browser = { mainLoop: { scheduler: null, method: "", currentlyRunningMainloop: 0, func: null, arg: 0, timingMode: 0, timingValue: 0, currentFrameNumber: 0, queue: [], pause: function () {
          Browser.mainLoop.scheduler = null;Browser.mainLoop.currentlyRunningMainloop++;
        }, resume: function () {
          Browser.mainLoop.currentlyRunningMainloop++;var timingMode = Browser.mainLoop.timingMode;var timingValue = Browser.mainLoop.timingValue;var func = Browser.mainLoop.func;Browser.mainLoop.func = null;_emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true);_emscripten_set_main_loop_timing(timingMode, timingValue);Browser.mainLoop.scheduler();
        }, updateStatus: function () {
          if (Module["setStatus"]) {
            var message = Module["statusMessage"] || "Please wait...";var remaining = Browser.mainLoop.remainingBlockers;var expected = Browser.mainLoop.expectedBlockers;if (remaining) {
              if (remaining < expected) {
                Module["setStatus"](message + " (" + (expected - remaining) + "/" + expected + ")");
              } else {
                Module["setStatus"](message);
              }
            } else {
              Module["setStatus"]("");
            }
          }
        }, runIter: function (func) {
          if (ABORT) return;if (Module["preMainLoop"]) {
            var preRet = Module["preMainLoop"]();if (preRet === false) {
              return;
            }
          }try {
            func();
          } catch (e) {
            if (e instanceof ExitStatus) {
              return;
            } else {
              if (e && typeof e === "object" && e.stack) Module.printErr("exception thrown: " + [e, e.stack]);throw e;
            }
          }if (Module["postMainLoop"]) Module["postMainLoop"]();
        } }, isFullscreen: false, pointerLock: false, moduleContextCreatedCallbacks: [], workers: [], init: function () {
        if (!Module["preloadPlugins"]) Module["preloadPlugins"] = [];if (Browser.initted) return;Browser.initted = true;try {
          new Blob();Browser.hasBlobConstructor = true;
        } catch (e) {
          Browser.hasBlobConstructor = false;console.log("warning: no blob constructor, cannot create blobs with mimetypes");
        }Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : !Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null;Browser.URLObject = typeof window != "undefined" ? window.URL ? window.URL : window.webkitURL : undefined;if (!Module.noImageDecoding && typeof Browser.URLObject === "undefined") {
          console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");Module.noImageDecoding = true;
        }var imagePlugin = {};imagePlugin["canHandle"] = function imagePlugin_canHandle(name) {
          return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name);
        };imagePlugin["handle"] = function imagePlugin_handle(byteArray, name, onload, onerror) {
          var b = null;if (Browser.hasBlobConstructor) {
            try {
              b = new Blob([byteArray], { type: Browser.getMimetype(name) });if (b.size !== byteArray.length) {
                b = new Blob([new Uint8Array(byteArray).buffer], { type: Browser.getMimetype(name) });
              }
            } catch (e) {
              Runtime.warnOnce("Blob constructor present but fails: " + e + "; falling back to blob builder");
            }
          }if (!b) {
            var bb = new Browser.BlobBuilder();bb.append(new Uint8Array(byteArray).buffer);b = bb.getBlob();
          }var url = Browser.URLObject.createObjectURL(b);var img = new Image();img.onload = function img_onload() {
            assert(img.complete, "Image " + name + " could not be decoded");var canvas = document.createElement("canvas");canvas.width = img.width;canvas.height = img.height;var ctx = canvas.getContext("2d");ctx.drawImage(img, 0, 0);Module["preloadedImages"][name] = canvas;Browser.URLObject.revokeObjectURL(url);if (onload) onload(byteArray);
          };img.onerror = function img_onerror(event) {
            console.log("Image " + url + " could not be decoded");if (onerror) onerror();
          };img.src = url;
        };Module["preloadPlugins"].push(imagePlugin);var audioPlugin = {};audioPlugin["canHandle"] = function audioPlugin_canHandle(name) {
          return !Module.noAudioDecoding && name.substr(-4) in { ".ogg": 1, ".wav": 1, ".mp3": 1 };
        };audioPlugin["handle"] = function audioPlugin_handle(byteArray, name, onload, onerror) {
          var done = false;function finish(audio) {
            if (done) return;done = true;Module["preloadedAudios"][name] = audio;if (onload) onload(byteArray);
          }function fail() {
            if (done) return;done = true;Module["preloadedAudios"][name] = new Audio();if (onerror) onerror();
          }if (Browser.hasBlobConstructor) {
            try {
              var b = new Blob([byteArray], { type: Browser.getMimetype(name) });
            } catch (e) {
              return fail();
            }var url = Browser.URLObject.createObjectURL(b);var audio = new Audio();audio.addEventListener("canplaythrough", function () {
              finish(audio);
            }, false);audio.onerror = function audio_onerror(event) {
              if (done) return;console.log("warning: browser could not fully decode audio " + name + ", trying slower base64 approach");function encode64(data) {
                var BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD = "=";var ret = "";var leftchar = 0;var leftbits = 0;for (var i = 0; i < data.length; i++) {
                  leftchar = leftchar << 8 | data[i];leftbits += 8;while (leftbits >= 6) {
                    var curr = leftchar >> leftbits - 6 & 63;leftbits -= 6;ret += BASE[curr];
                  }
                }if (leftbits == 2) {
                  ret += BASE[(leftchar & 3) << 4];ret += PAD + PAD;
                } else if (leftbits == 4) {
                  ret += BASE[(leftchar & 15) << 2];ret += PAD;
                }return ret;
              }audio.src = "data:audio/x-" + name.substr(-3) + ";base64," + encode64(byteArray);finish(audio);
            };audio.src = url;Browser.safeSetTimeout(function () {
              finish(audio);
            }, 1e4);
          } else {
            return fail();
          }
        };Module["preloadPlugins"].push(audioPlugin);function pointerLockChange() {
          Browser.pointerLock = document["pointerLockElement"] === Module["canvas"] || document["mozPointerLockElement"] === Module["canvas"] || document["webkitPointerLockElement"] === Module["canvas"] || document["msPointerLockElement"] === Module["canvas"];
        }var canvas = Module["canvas"];if (canvas) {
          canvas.requestPointerLock = canvas["requestPointerLock"] || canvas["mozRequestPointerLock"] || canvas["webkitRequestPointerLock"] || canvas["msRequestPointerLock"] || function () {};canvas.exitPointerLock = document["exitPointerLock"] || document["mozExitPointerLock"] || document["webkitExitPointerLock"] || document["msExitPointerLock"] || function () {};canvas.exitPointerLock = canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange", pointerLockChange, false);document.addEventListener("mozpointerlockchange", pointerLockChange, false);document.addEventListener("webkitpointerlockchange", pointerLockChange, false);document.addEventListener("mspointerlockchange", pointerLockChange, false);if (Module["elementPointerLock"]) {
            canvas.addEventListener("click", function (ev) {
              if (!Browser.pointerLock && Module["canvas"].requestPointerLock) {
                Module["canvas"].requestPointerLock();ev.preventDefault();
              }
            }, false);
          }
        }
      }, createContext: function (canvas, useWebGL, setInModule, webGLContextAttributes) {
        if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx;var ctx;var contextHandle;if (useWebGL) {
          var contextAttributes = { antialias: false, alpha: false };if (webGLContextAttributes) {
            for (var attribute in webGLContextAttributes) {
              contextAttributes[attribute] = webGLContextAttributes[attribute];
            }
          }contextHandle = GL.createContext(canvas, contextAttributes);if (contextHandle) {
            ctx = GL.getContext(contextHandle).GLctx;
          }
        } else {
          ctx = canvas.getContext("2d");
        }if (!ctx) return null;if (setInModule) {
          if (!useWebGL) assert(typeof GLctx === "undefined", "cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx = ctx;if (useWebGL) GL.makeContextCurrent(contextHandle);Module.useWebGL = useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function (callback) {
            callback();
          });Browser.init();
        }return ctx;
      }, destroyContext: function (canvas, useWebGL, setInModule) {}, fullscreenHandlersInstalled: false, lockPointer: undefined, resizeCanvas: undefined, requestFullscreen: function (lockPointer, resizeCanvas, vrDevice) {
        Browser.lockPointer = lockPointer;Browser.resizeCanvas = resizeCanvas;Browser.vrDevice = vrDevice;if (typeof Browser.lockPointer === "undefined") Browser.lockPointer = true;if (typeof Browser.resizeCanvas === "undefined") Browser.resizeCanvas = false;if (typeof Browser.vrDevice === "undefined") Browser.vrDevice = null;var canvas = Module["canvas"];function fullscreenChange() {
          Browser.isFullscreen = false;var canvasContainer = canvas.parentNode;if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvasContainer) {
            canvas.exitFullscreen = document["exitFullscreen"] || document["cancelFullScreen"] || document["mozCancelFullScreen"] || document["msExitFullscreen"] || document["webkitCancelFullScreen"] || function () {};canvas.exitFullscreen = canvas.exitFullscreen.bind(document);if (Browser.lockPointer) canvas.requestPointerLock();Browser.isFullscreen = true;if (Browser.resizeCanvas) Browser.setFullscreenCanvasSize();
          } else {
            canvasContainer.parentNode.insertBefore(canvas, canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if (Browser.resizeCanvas) Browser.setWindowedCanvasSize();
          }if (Module["onFullScreen"]) Module["onFullScreen"](Browser.isFullscreen);if (Module["onFullscreen"]) Module["onFullscreen"](Browser.isFullscreen);Browser.updateCanvasDimensions(canvas);
        }if (!Browser.fullscreenHandlersInstalled) {
          Browser.fullscreenHandlersInstalled = true;document.addEventListener("fullscreenchange", fullscreenChange, false);document.addEventListener("mozfullscreenchange", fullscreenChange, false);document.addEventListener("webkitfullscreenchange", fullscreenChange, false);document.addEventListener("MSFullscreenChange", fullscreenChange, false);
        }var canvasContainer = document.createElement("div");canvas.parentNode.insertBefore(canvasContainer, canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen = canvasContainer["requestFullscreen"] || canvasContainer["mozRequestFullScreen"] || canvasContainer["msRequestFullscreen"] || (canvasContainer["webkitRequestFullscreen"] ? function () {
          canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]);
        } : null) || (canvasContainer["webkitRequestFullScreen"] ? function () {
          canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]);
        } : null);if (vrDevice) {
          canvasContainer.requestFullscreen({ vrDisplay: vrDevice });
        } else {
          canvasContainer.requestFullscreen();
        }
      }, requestFullScreen: function (lockPointer, resizeCanvas, vrDevice) {
        Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen = function (lockPointer, resizeCanvas, vrDevice) {
          return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice);
        };return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice);
      }, nextRAF: 0, fakeRequestAnimationFrame: function (func) {
        var now = Date.now();if (Browser.nextRAF === 0) {
          Browser.nextRAF = now + 1e3 / 60;
        } else {
          while (now + 2 >= Browser.nextRAF) {
            Browser.nextRAF += 1e3 / 60;
          }
        }var delay = Math.max(Browser.nextRAF - now, 0);setTimeout(func, delay);
      }, requestAnimationFrame: function requestAnimationFrame(func) {
        if (typeof window === "undefined") {
          Browser.fakeRequestAnimationFrame(func);
        } else {
          if (!window.requestAnimationFrame) {
            window.requestAnimationFrame = window["requestAnimationFrame"] || window["mozRequestAnimationFrame"] || window["webkitRequestAnimationFrame"] || window["msRequestAnimationFrame"] || window["oRequestAnimationFrame"] || Browser.fakeRequestAnimationFrame;
          }window.requestAnimationFrame(func);
        }
      }, safeCallback: function (func) {
        return function () {
          if (!ABORT) return func.apply(null, arguments);
        };
      }, allowAsyncCallbacks: true, queuedAsyncCallbacks: [], pauseAsyncCallbacks: function () {
        Browser.allowAsyncCallbacks = false;
      }, resumeAsyncCallbacks: function () {
        Browser.allowAsyncCallbacks = true;if (Browser.queuedAsyncCallbacks.length > 0) {
          var callbacks = Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks = [];callbacks.forEach(function (func) {
            func();
          });
        }
      }, safeRequestAnimationFrame: function (func) {
        return Browser.requestAnimationFrame(function () {
          if (ABORT) return;if (Browser.allowAsyncCallbacks) {
            func();
          } else {
            Browser.queuedAsyncCallbacks.push(func);
          }
        });
      }, safeSetTimeout: function (func, timeout) {
        Module["noExitRuntime"] = true;return setTimeout(function () {
          if (ABORT) return;if (Browser.allowAsyncCallbacks) {
            func();
          } else {
            Browser.queuedAsyncCallbacks.push(func);
          }
        }, timeout);
      }, safeSetInterval: function (func, timeout) {
        Module["noExitRuntime"] = true;return setInterval(function () {
          if (ABORT) return;if (Browser.allowAsyncCallbacks) {
            func();
          }
        }, timeout);
      }, getMimetype: function (name) {
        return { "jpg": "image/jpeg", "jpeg": "image/jpeg", "png": "image/png", "bmp": "image/bmp", "ogg": "audio/ogg", "wav": "audio/wav", "mp3": "audio/mpeg" }[name.substr(name.lastIndexOf(".") + 1)];
      }, getUserMedia: function (func) {
        if (!window.getUserMedia) {
          window.getUserMedia = navigator["getUserMedia"] || navigator["mozGetUserMedia"];
        }window.getUserMedia(func);
      }, getMovementX: function (event) {
        return event["movementX"] || event["mozMovementX"] || event["webkitMovementX"] || 0;
      }, getMovementY: function (event) {
        return event["movementY"] || event["mozMovementY"] || event["webkitMovementY"] || 0;
      }, getMouseWheelDelta: function (event) {
        var delta = 0;switch (event.type) {case "DOMMouseScroll":
            delta = event.detail;break;case "mousewheel":
            delta = event.wheelDelta;break;case "wheel":
            delta = event["deltaY"];break;default:
            throw "unrecognized mouse wheel event: " + event.type;}return delta;
      }, mouseX: 0, mouseY: 0, mouseMovementX: 0, mouseMovementY: 0, touches: {}, lastTouches: {}, calculateMouseEvent: function (event) {
        if (Browser.pointerLock) {
          if (event.type != "mousemove" && "mozMovementX" in event) {
            Browser.mouseMovementX = Browser.mouseMovementY = 0;
          } else {
            Browser.mouseMovementX = Browser.getMovementX(event);Browser.mouseMovementY = Browser.getMovementY(event);
          }if (typeof SDL != "undefined") {
            Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;
          } else {
            Browser.mouseX += Browser.mouseMovementX;Browser.mouseY += Browser.mouseMovementY;
          }
        } else {
          var rect = Module["canvas"].getBoundingClientRect();var cw = Module["canvas"].width;var ch = Module["canvas"].height;var scrollX = typeof window.scrollX !== "undefined" ? window.scrollX : window.pageXOffset;var scrollY = typeof window.scrollY !== "undefined" ? window.scrollY : window.pageYOffset;if (event.type === "touchstart" || event.type === "touchend" || event.type === "touchmove") {
            var touch = event.touch;if (touch === undefined) {
              return;
            }var adjustedX = touch.pageX - (scrollX + rect.left);var adjustedY = touch.pageY - (scrollY + rect.top);adjustedX = adjustedX * (cw / rect.width);adjustedY = adjustedY * (ch / rect.height);var coords = { x: adjustedX, y: adjustedY };if (event.type === "touchstart") {
              Browser.lastTouches[touch.identifier] = coords;Browser.touches[touch.identifier] = coords;
            } else if (event.type === "touchend" || event.type === "touchmove") {
              var last = Browser.touches[touch.identifier];if (!last) last = coords;Browser.lastTouches[touch.identifier] = last;Browser.touches[touch.identifier] = coords;
            }return;
          }var x = event.pageX - (scrollX + rect.left);var y = event.pageY - (scrollY + rect.top);x = x * (cw / rect.width);y = y * (ch / rect.height);Browser.mouseMovementX = x - Browser.mouseX;Browser.mouseMovementY = y - Browser.mouseY;Browser.mouseX = x;Browser.mouseY = y;
        }
      }, asyncLoad: function (url, onload, onerror, noRunDep) {
        var dep = !noRunDep ? getUniqueRunDependency("al " + url) : "";Module["readAsync"](url, function (arrayBuffer) {
          assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if (dep) removeRunDependency(dep);
        }, function (event) {
          if (onerror) {
            onerror();
          } else {
            throw 'Loading data file "' + url + '" failed.';
          }
        });if (dep) addRunDependency(dep);
      }, resizeListeners: [], updateResizeListeners: function () {
        var canvas = Module["canvas"];Browser.resizeListeners.forEach(function (listener) {
          listener(canvas.width, canvas.height);
        });
      }, setCanvasSize: function (width, height, noUpdates) {
        var canvas = Module["canvas"];Browser.updateCanvasDimensions(canvas, width, height);if (!noUpdates) Browser.updateResizeListeners();
      }, windowedWidth: 0, windowedHeight: 0, setFullscreenCanvasSize: function () {
        if (typeof SDL != "undefined") {
          var flags = HEAPU32[SDL.screen + Runtime.QUANTUM_SIZE * 0 >> 2];flags = flags | 8388608;HEAP32[SDL.screen + Runtime.QUANTUM_SIZE * 0 >> 2] = flags;
        }Browser.updateResizeListeners();
      }, setWindowedCanvasSize: function () {
        if (typeof SDL != "undefined") {
          var flags = HEAPU32[SDL.screen + Runtime.QUANTUM_SIZE * 0 >> 2];flags = flags & ~8388608;HEAP32[SDL.screen + Runtime.QUANTUM_SIZE * 0 >> 2] = flags;
        }Browser.updateResizeListeners();
      }, updateCanvasDimensions: function (canvas, wNative, hNative) {
        if (wNative && hNative) {
          canvas.widthNative = wNative;canvas.heightNative = hNative;
        } else {
          wNative = canvas.widthNative;hNative = canvas.heightNative;
        }var w = wNative;var h = hNative;if (Module["forcedAspectRatio"] && Module["forcedAspectRatio"] > 0) {
          if (w / h < Module["forcedAspectRatio"]) {
            w = Math.round(h * Module["forcedAspectRatio"]);
          } else {
            h = Math.round(w / Module["forcedAspectRatio"]);
          }
        }if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvas.parentNode && typeof screen != "undefined") {
          var factor = Math.min(screen.width / w, screen.height / h);w = Math.round(w * factor);h = Math.round(h * factor);
        }if (Browser.resizeCanvas) {
          if (canvas.width != w) canvas.width = w;if (canvas.height != h) canvas.height = h;if (typeof canvas.style != "undefined") {
            canvas.style.removeProperty("width");canvas.style.removeProperty("height");
          }
        } else {
          if (canvas.width != wNative) canvas.width = wNative;if (canvas.height != hNative) canvas.height = hNative;if (typeof canvas.style != "undefined") {
            if (w != wNative || h != hNative) {
              canvas.style.setProperty("width", w + "px", "important");canvas.style.setProperty("height", h + "px", "important");
            } else {
              canvas.style.removeProperty("width");canvas.style.removeProperty("height");
            }
          }
        }
      }, wgetRequests: {}, nextWgetRequestHandle: 0, getNextWgetRequestHandle: function () {
        var handle = Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return handle;
      } };var SYSCALLS = { varargs: 0, get: function (varargs) {
        SYSCALLS.varargs += 4;var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];return ret;
      }, getStr: function () {
        var ret = Pointer_stringify(SYSCALLS.get());return ret;
      }, get64: function () {
        var low = SYSCALLS.get(),
            high = SYSCALLS.get();if (low >= 0) assert(high === 0);else assert(high === -1);return low;
      }, getZero: function () {
        assert(SYSCALLS.get() === 0);
      } };function ___syscall6(which, varargs) {
      SYSCALLS.varargs = varargs;try {
        var stream = SYSCALLS.getStreamFromFD();FS.close(stream);return 0;
      } catch (e) {
        if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);return -e.errno;
      }
    }function ___syscall54(which, varargs) {
      SYSCALLS.varargs = varargs;try {
        return 0;
      } catch (e) {
        if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);return -e.errno;
      }
    }function _typeModule(self) {
      var structureList = [[0, 1, "X"], [1, 1, "const X"], [128, 1, "X *"], [256, 1, "X &"], [384, 1, "X &&"], [512, 1, "std::shared_ptr<X>"], [640, 1, "std::unique_ptr<X>"], [5120, 1, "std::vector<X>"], [6144, 2, "std::array<X, Y>"], [9216, -1, "std::function<X (Y)>"]];function applyStructure(outerName, outerFlags, innerName, innerFlags, param, flip) {
        if (outerFlags == 1) {
          var ref = innerFlags & 896;if (ref == 128 || ref == 256 || ref == 384) outerName = "X const";
        }var name;if (flip) {
          name = innerName.replace("X", outerName).replace("Y", param);
        } else {
          name = outerName.replace("X", innerName).replace("Y", param);
        }return name.replace(/([*&]) (?=[*&])/g, "$1");
      }function reportProblem(problem, id, kind, structureType, place) {
        throw new Error(problem + " type " + kind.replace("X", id + "?") + (structureType ? " with flag " + structureType : "") + " in " + place);
      }function getComplexType(id, constructType, getType, queryType, place, kind, prevStructure, depth) {
        if (kind === void 0) {
          kind = "X";
        }if (depth === void 0) {
          depth = 1;
        }var result = getType(id);if (result) return result;var query = queryType(id);var structureType = query.placeholderFlag;var structure = structureList[structureType];if (prevStructure && structure) {
          kind = applyStructure(prevStructure[2], prevStructure[0], kind, structure[0], "?", true);
        }var problem;if (structureType == 0) problem = "Unbound";if (structureType >= 10) problem = "Corrupt";if (depth > 20) problem = "Deeply nested";if (problem) reportProblem(problem, id, kind, structureType, place || "?");var subId = query.paramList[0];var subType = getComplexType(subId, constructType, getType, queryType, place, kind, structure, depth + 1);var srcSpec;var spec = { flags: structure[0], id: id, name: "", paramList: [subType] };var argList = [];var structureParam = "?";switch (query.placeholderFlag) {case 1:
            srcSpec = subType.spec;break;case 2:
            if ((subType.flags & 15360) == 1024 && subType.spec.ptrSize == 1) {
              spec.flags = 7168;break;
            };case 3:case 6:case 5:
            srcSpec = subType.spec;if ((subType.flags & 15360) != 2048) {}break;case 8:
            structureParam = "" + query.paramList[1];spec.paramList.push(query.paramList[1]);break;case 9:
            for (var _i = 0, _a = query.paramList[1]; _i < _a.length; _i++) {
              var paramId = _a[_i];var paramType = getComplexType(paramId, constructType, getType, queryType, place, kind, structure, depth + 1);argList.push(paramType.name);spec.paramList.push(paramType);
            }structureParam = argList.join(", ");break;default:
            break;}spec.name = applyStructure(structure[2], structure[0], subType.name, subType.flags, structureParam);if (srcSpec) {
          for (var _b = 0, _c = Object.keys(srcSpec); _b < _c.length; _b++) {
            var key = _c[_b];spec[key] = spec[key] || srcSpec[key];
          }spec.flags |= srcSpec.flags;
        }return makeType(constructType, spec);
      }function makeType(constructType, spec) {
        var flags = spec.flags;var refKind = flags & 896;var kind = flags & 15360;if (!spec.name && kind == 1024) {
          if (spec.ptrSize == 1) {
            spec.name = (flags & 16 ? "" : (flags & 8 ? "un" : "") + "signed ") + "char";
          } else {
            spec.name = (flags & 8 ? "u" : "") + (flags & 32 ? "float" : "int") + (spec.ptrSize * 8 + "_t");
          }
        }if (spec.ptrSize == 8 && !(flags & 32)) kind = 64;if (kind == 2048) {
          if (refKind == 512 || refKind == 640) {
            kind = 4096;
          } else if (refKind) kind = 3072;
        }return constructType(kind, spec);
      }var Type = function () {
        function Type(spec) {
          this.id = spec.id;this.name = spec.name;this.flags = spec.flags;this.spec = spec;
        }Type.prototype.toString = function () {
          return this.name;
        };return Type;
      }();var output = { Type: Type, getComplexType: getComplexType, makeType: makeType, structureList: structureList };self.output = output;return self.output || output;
    }function __nbind_register_type(id, namePtr) {
      var name = _nbind.readAsciiString(namePtr);var spec = { flags: 10240, id: id, name: name };_nbind.makeType(_nbind.constructType, spec);
    }function __nbind_register_callback_signature(typeListPtr, typeCount) {
      var typeList = _nbind.readTypeIdList(typeListPtr, typeCount);var num = _nbind.callbackSignatureList.length;_nbind.callbackSignatureList[num] = _nbind.makeJSCaller(typeList);return num;
    }function __extends(Class, Parent) {
      for (var key in Parent) if (Parent.hasOwnProperty(key)) Class[key] = Parent[key];function Base() {
        this.constructor = Class;
      }Base.prototype = Parent.prototype;Class.prototype = new Base();
    }function __nbind_register_class(idListPtr, policyListPtr, superListPtr, upcastListPtr, superCount, destructorPtr, namePtr) {
      var name = _nbind.readAsciiString(namePtr);var policyTbl = _nbind.readPolicyList(policyListPtr);var idList = HEAPU32.subarray(idListPtr / 4, idListPtr / 4 + 2);var spec = { flags: 2048 | (policyTbl["Value"] ? 2 : 0), id: idList[0], name: name };var bindClass = _nbind.makeType(_nbind.constructType, spec);bindClass.ptrType = _nbind.getComplexType(idList[1], _nbind.constructType, _nbind.getType, _nbind.queryType);bindClass.destroy = _nbind.makeMethodCaller(bindClass.ptrType, { boundID: spec.id, flags: 0, name: "destroy", num: 0, ptr: destructorPtr, title: bindClass.name + ".free", typeList: ["void", "uint32_t", "uint32_t"] });if (superCount) {
        bindClass.superIdList = Array.prototype.slice.call(HEAPU32.subarray(superListPtr / 4, superListPtr / 4 + superCount));bindClass.upcastList = Array.prototype.slice.call(HEAPU32.subarray(upcastListPtr / 4, upcastListPtr / 4 + superCount));
      }Module[bindClass.name] = bindClass.makeBound(policyTbl);_nbind.BindClass.list.push(bindClass);
    }function _removeAccessorPrefix(name) {
      var prefixMatcher = /^[Gg]et_?([A-Z]?([A-Z]?))/;return name.replace(prefixMatcher, function (match, initial, second) {
        return second ? initial : initial.toLowerCase();
      });
    }function __nbind_register_function(boundID, policyListPtr, typeListPtr, typeCount, ptr, direct, signatureType, namePtr, num, flags) {
      var bindClass = _nbind.getType(boundID);var policyTbl = _nbind.readPolicyList(policyListPtr);var typeList = _nbind.readTypeIdList(typeListPtr, typeCount);var specList;if (signatureType == 5) {
        specList = [{ direct: ptr, name: "__nbindConstructor", ptr: 0, title: bindClass.name + " constructor", typeList: ["uint32_t"].concat(typeList.slice(1)) }, { direct: direct, name: "__nbindValueConstructor", ptr: 0, title: bindClass.name + " value constructor", typeList: ["void", "uint32_t"].concat(typeList.slice(1)) }];
      } else {
        var name_1 = _nbind.readAsciiString(namePtr);var title = (bindClass.name && bindClass.name + ".") + name_1;if (signatureType == 3 || signatureType == 4) {
          name_1 = _removeAccessorPrefix(name_1);
        }specList = [{ boundID: boundID, direct: direct, name: name_1, ptr: ptr, title: title, typeList: typeList }];
      }for (var _i = 0, specList_1 = specList; _i < specList_1.length; _i++) {
        var spec = specList_1[_i];spec.signatureType = signatureType;spec.policyTbl = policyTbl;spec.num = num;spec.flags = flags;bindClass.addMethod(spec);
      }
    }function _nbind_value(name, proto) {
      if (!_nbind.typeNameTbl[name]) _nbind.throwError("Unknown value type " + name);Module["NBind"].bind_value(name, proto);_defineHidden(_nbind.typeNameTbl[name].proto.prototype.__nbindValueConstructor)(proto.prototype, "__nbindValueConstructor");
    }Module["_nbind_value"] = _nbind_value;function __nbind_get_value_object(num, ptr) {
      var obj = _nbind.popValue(num);if (!obj.fromJS) {
        throw new Error("Object " + obj + " has no fromJS function");
      }obj.fromJS(function () {
        obj.__nbindValueConstructor.apply(this, Array.prototype.concat.apply([ptr], arguments));
      });
    }function _emscripten_memcpy_big(dest, src, num) {
      HEAPU8.set(HEAPU8.subarray(src, src + num), dest);return dest;
    }function __nbind_register_primitive(id, size, flags) {
      var spec = { flags: 1024 | flags, id: id, ptrSize: size };_nbind.makeType(_nbind.constructType, spec);
    }var cttz_i8 = allocate([8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0], "i8", ALLOC_STATIC);function ___setErrNo(value) {
      if (Module["___errno_location"]) HEAP32[Module["___errno_location"]() >> 2] = value;return value;
    }function _llvm_stacksave() {
      var self = _llvm_stacksave;if (!self.LLVM_SAVEDSTACKS) {
        self.LLVM_SAVEDSTACKS = [];
      }self.LLVM_SAVEDSTACKS.push(Runtime.stackSave());return self.LLVM_SAVEDSTACKS.length - 1;
    }function ___syscall140(which, varargs) {
      SYSCALLS.varargs = varargs;try {
        var stream = SYSCALLS.getStreamFromFD(),
            offset_high = SYSCALLS.get(),
            offset_low = SYSCALLS.get(),
            result = SYSCALLS.get(),
            whence = SYSCALLS.get();var offset = offset_low;FS.llseek(stream, offset, whence);HEAP32[result >> 2] = stream.position;if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null;return 0;
      } catch (e) {
        if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);return -e.errno;
      }
    }function ___syscall146(which, varargs) {
      SYSCALLS.varargs = varargs;try {
        var stream = SYSCALLS.get(),
            iov = SYSCALLS.get(),
            iovcnt = SYSCALLS.get();var ret = 0;if (!___syscall146.buffer) {
          ___syscall146.buffers = [null, [], []];___syscall146.printChar = function (stream, curr) {
            var buffer = ___syscall146.buffers[stream];assert(buffer);if (curr === 0 || curr === 10) {
              (stream === 1 ? Module["print"] : Module["printErr"])(UTF8ArrayToString(buffer, 0));buffer.length = 0;
            } else {
              buffer.push(curr);
            }
          };
        }for (var i = 0; i < iovcnt; i++) {
          var ptr = HEAP32[iov + i * 8 >> 2];var len = HEAP32[iov + (i * 8 + 4) >> 2];for (var j = 0; j < len; j++) {
            ___syscall146.printChar(stream, HEAPU8[ptr + j]);
          }ret += len;
        }return ret;
      } catch (e) {
        if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);return -e.errno;
      }
    }function __nbind_finish() {
      for (var _i = 0, _a = _nbind.BindClass.list; _i < _a.length; _i++) {
        var bindClass = _a[_i];bindClass.finish();
      }
    }var ___dso_handle = STATICTOP;STATICTOP += 16;(function (_nbind) {
      var typeIdTbl = {};_nbind.typeNameTbl = {};var Pool = function () {
        function Pool() {}Pool.lalloc = function (size) {
          size = size + 7 & ~7;var used = HEAPU32[Pool.usedPtr];if (size > Pool.pageSize / 2 || size > Pool.pageSize - used) {
            var NBind = _nbind.typeNameTbl["NBind"].proto;return NBind.lalloc(size);
          } else {
            HEAPU32[Pool.usedPtr] = used + size;return Pool.rootPtr + used;
          }
        };Pool.lreset = function (used, page) {
          var topPage = HEAPU32[Pool.pagePtr];if (topPage) {
            var NBind = _nbind.typeNameTbl["NBind"].proto;NBind.lreset(used, page);
          } else {
            HEAPU32[Pool.usedPtr] = used;
          }
        };return Pool;
      }();_nbind.Pool = Pool;function constructType(kind, spec) {
        var construct = kind == 10240 ? _nbind.makeTypeNameTbl[spec.name] || _nbind.BindType : _nbind.makeTypeKindTbl[kind];var bindType = new construct(spec);typeIdTbl[spec.id] = bindType;_nbind.typeNameTbl[spec.name] = bindType;return bindType;
      }_nbind.constructType = constructType;function getType(id) {
        return typeIdTbl[id];
      }_nbind.getType = getType;function queryType(id) {
        var placeholderFlag = HEAPU8[id];var paramCount = _nbind.structureList[placeholderFlag][1];id /= 4;if (paramCount < 0) {
          ++id;paramCount = HEAPU32[id] + 1;
        }var paramList = Array.prototype.slice.call(HEAPU32.subarray(id + 1, id + 1 + paramCount));if (placeholderFlag == 9) {
          paramList = [paramList[0], paramList.slice(1)];
        }return { paramList: paramList, placeholderFlag: placeholderFlag };
      }_nbind.queryType = queryType;function getTypes(idList, place) {
        return idList.map(function (id) {
          return typeof id == "number" ? _nbind.getComplexType(id, constructType, getType, queryType, place) : _nbind.typeNameTbl[id];
        });
      }_nbind.getTypes = getTypes;function readTypeIdList(typeListPtr, typeCount) {
        return Array.prototype.slice.call(HEAPU32, typeListPtr / 4, typeListPtr / 4 + typeCount);
      }_nbind.readTypeIdList = readTypeIdList;function readAsciiString(ptr) {
        var endPtr = ptr;while (HEAPU8[endPtr++]);return String.fromCharCode.apply("", HEAPU8.subarray(ptr, endPtr - 1));
      }_nbind.readAsciiString = readAsciiString;function readPolicyList(policyListPtr) {
        var policyTbl = {};if (policyListPtr) {
          while (1) {
            var namePtr = HEAPU32[policyListPtr / 4];if (!namePtr) break;policyTbl[readAsciiString(namePtr)] = true;policyListPtr += 4;
          }
        }return policyTbl;
      }_nbind.readPolicyList = readPolicyList;function getDynCall(typeList, name) {
        var mangleMap = { float32_t: "d", float64_t: "d", int64_t: "d", uint64_t: "d", "void": "v" };var signature = typeList.map(function (type) {
          return mangleMap[type.name] || "i";
        }).join("");var dynCall = Module["dynCall_" + signature];if (!dynCall) {
          throw new Error("dynCall_" + signature + " not found for " + name + "(" + typeList.map(function (type) {
            return type.name;
          }).join(", ") + ")");
        }return dynCall;
      }_nbind.getDynCall = getDynCall;function addMethod(obj, name, func, arity) {
        var overload = obj[name];if (obj.hasOwnProperty(name) && overload) {
          if (overload.arity || overload.arity === 0) {
            overload = _nbind.makeOverloader(overload, overload.arity);obj[name] = overload;
          }overload.addMethod(func, arity);
        } else {
          func.arity = arity;obj[name] = func;
        }
      }_nbind.addMethod = addMethod;function throwError(message) {
        throw new Error(message);
      }_nbind.throwError = throwError;_nbind.bigEndian = false;_a = _typeModule(_typeModule), _nbind.Type = _a.Type, _nbind.makeType = _a.makeType, _nbind.getComplexType = _a.getComplexType, _nbind.structureList = _a.structureList;var BindType = function (_super) {
        __extends(BindType, _super);function BindType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.heap = HEAPU32;_this.ptrSize = 4;return _this;
        }BindType.prototype.needsWireRead = function (policyTbl) {
          return !!this.wireRead || !!this.makeWireRead;
        };BindType.prototype.needsWireWrite = function (policyTbl) {
          return !!this.wireWrite || !!this.makeWireWrite;
        };return BindType;
      }(_nbind.Type);_nbind.BindType = BindType;var PrimitiveType = function (_super) {
        __extends(PrimitiveType, _super);function PrimitiveType(spec) {
          var _this = _super.call(this, spec) || this;var heapTbl = spec.flags & 32 ? { 32: HEAPF32, 64: HEAPF64 } : spec.flags & 8 ? { 8: HEAPU8, 16: HEAPU16, 32: HEAPU32 } : { 8: HEAP8, 16: HEAP16, 32: HEAP32 };_this.heap = heapTbl[spec.ptrSize * 8];_this.ptrSize = spec.ptrSize;return _this;
        }PrimitiveType.prototype.needsWireWrite = function (policyTbl) {
          return !!policyTbl && !!policyTbl["Strict"];
        };PrimitiveType.prototype.makeWireWrite = function (expr, policyTbl) {
          return policyTbl && policyTbl["Strict"] && function (arg) {
            if (typeof arg == "number") return arg;throw new Error("Type mismatch");
          };
        };return PrimitiveType;
      }(BindType);_nbind.PrimitiveType = PrimitiveType;function pushCString(str, policyTbl) {
        if (str === null || str === undefined) {
          if (policyTbl && policyTbl["Nullable"]) {
            return 0;
          } else throw new Error("Type mismatch");
        }if (policyTbl && policyTbl["Strict"]) {
          if (typeof str != "string") throw new Error("Type mismatch");
        } else str = str.toString();var length = Module.lengthBytesUTF8(str) + 1;var result = _nbind.Pool.lalloc(length);Module.stringToUTF8Array(str, HEAPU8, result, length);return result;
      }_nbind.pushCString = pushCString;function popCString(ptr) {
        if (ptr === 0) return null;return Module.Pointer_stringify(ptr);
      }_nbind.popCString = popCString;var CStringType = function (_super) {
        __extends(CStringType, _super);function CStringType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireRead = popCString;_this.wireWrite = pushCString;_this.readResources = [_nbind.resources.pool];_this.writeResources = [_nbind.resources.pool];return _this;
        }CStringType.prototype.makeWireWrite = function (expr, policyTbl) {
          return function (arg) {
            return pushCString(arg, policyTbl);
          };
        };return CStringType;
      }(BindType);_nbind.CStringType = CStringType;var BooleanType = function (_super) {
        __extends(BooleanType, _super);function BooleanType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireRead = function (arg) {
            return !!arg;
          };return _this;
        }BooleanType.prototype.needsWireWrite = function (policyTbl) {
          return !!policyTbl && !!policyTbl["Strict"];
        };BooleanType.prototype.makeWireRead = function (expr) {
          return "!!(" + expr + ")";
        };BooleanType.prototype.makeWireWrite = function (expr, policyTbl) {
          return policyTbl && policyTbl["Strict"] && function (arg) {
            if (typeof arg == "boolean") return arg;throw new Error("Type mismatch");
          } || expr;
        };return BooleanType;
      }(BindType);_nbind.BooleanType = BooleanType;var Wrapper = function () {
        function Wrapper() {}Wrapper.prototype.persist = function () {
          this.__nbindState |= 1;
        };return Wrapper;
      }();_nbind.Wrapper = Wrapper;function makeBound(policyTbl, bindClass) {
        var Bound = function (_super) {
          __extends(Bound, _super);function Bound(marker, flags, ptr, shared) {
            var _this = _super.call(this) || this;if (!(_this instanceof Bound)) {
              return new (Function.prototype.bind.apply(Bound, Array.prototype.concat.apply([null], arguments)))();
            }var nbindFlags = flags;var nbindPtr = ptr;var nbindShared = shared;if (marker !== _nbind.ptrMarker) {
              var wirePtr = _this.__nbindConstructor.apply(_this, arguments);nbindFlags = 4096 | 512;nbindShared = HEAPU32[wirePtr / 4];nbindPtr = HEAPU32[wirePtr / 4 + 1];
            }var spec = { configurable: true, enumerable: false, value: null, writable: false };var propTbl = { "__nbindFlags": nbindFlags, "__nbindPtr": nbindPtr };if (nbindShared) {
              propTbl["__nbindShared"] = nbindShared;_nbind.mark(_this);
            }for (var _i = 0, _a = Object.keys(propTbl); _i < _a.length; _i++) {
              var key = _a[_i];spec.value = propTbl[key];Object.defineProperty(_this, key, spec);
            }_defineHidden(0)(_this, "__nbindState");return _this;
          }Bound.prototype.free = function () {
            bindClass.destroy.call(this, this.__nbindShared, this.__nbindFlags);this.__nbindState |= 2;disableMember(this, "__nbindShared");disableMember(this, "__nbindPtr");
          };return Bound;
        }(Wrapper);__decorate([_defineHidden()], Bound.prototype, "__nbindConstructor", void 0);__decorate([_defineHidden()], Bound.prototype, "__nbindValueConstructor", void 0);__decorate([_defineHidden(policyTbl)], Bound.prototype, "__nbindPolicies", void 0);return Bound;
      }_nbind.makeBound = makeBound;function disableMember(obj, name) {
        function die() {
          throw new Error("Accessing deleted object");
        }Object.defineProperty(obj, name, { configurable: false, enumerable: false, get: die, set: die });
      }_nbind.ptrMarker = {};var BindClass = function (_super) {
        __extends(BindClass, _super);function BindClass(spec) {
          var _this = _super.call(this, spec) || this;_this.wireRead = function (arg) {
            return _nbind.popValue(arg, _this.ptrType);
          };_this.wireWrite = function (arg) {
            return pushPointer(arg, _this.ptrType, true);
          };_this.pendingSuperCount = 0;_this.ready = false;_this.methodTbl = {};if (spec.paramList) {
            _this.classType = spec.paramList[0].classType;_this.proto = _this.classType.proto;
          } else _this.classType = _this;return _this;
        }BindClass.prototype.makeBound = function (policyTbl) {
          var Bound = _nbind.makeBound(policyTbl, this);this.proto = Bound;this.ptrType.proto = Bound;return Bound;
        };BindClass.prototype.addMethod = function (spec) {
          var overloadList = this.methodTbl[spec.name] || [];overloadList.push(spec);this.methodTbl[spec.name] = overloadList;
        };BindClass.prototype.registerMethods = function (src, staticOnly) {
          var setter;for (var _i = 0, _a = Object.keys(src.methodTbl); _i < _a.length; _i++) {
            var name_1 = _a[_i];var overloadList = src.methodTbl[name_1];for (var _b = 0, overloadList_1 = overloadList; _b < overloadList_1.length; _b++) {
              var spec = overloadList_1[_b];var target = void 0;var caller = void 0;target = this.proto.prototype;if (staticOnly && spec.signatureType != 1) continue;switch (spec.signatureType) {case 1:
                  target = this.proto;case 5:
                  caller = _nbind.makeCaller(spec);_nbind.addMethod(target, spec.name, caller, spec.typeList.length - 1);break;case 4:
                  setter = _nbind.makeMethodCaller(src.ptrType, spec);break;case 3:
                  Object.defineProperty(target, spec.name, { configurable: true, enumerable: false, get: _nbind.makeMethodCaller(src.ptrType, spec), set: setter });break;case 2:
                  caller = _nbind.makeMethodCaller(src.ptrType, spec);_nbind.addMethod(target, spec.name, caller, spec.typeList.length - 1);break;default:
                  break;}
            }
          }
        };BindClass.prototype.registerSuperMethods = function (src, firstSuper, visitTbl) {
          if (visitTbl[src.name]) return;visitTbl[src.name] = true;var superNum = 0;var nextFirst;for (var _i = 0, _a = src.superIdList || []; _i < _a.length; _i++) {
            var superId = _a[_i];var superClass = _nbind.getType(superId);if (superNum++ < firstSuper || firstSuper < 0) {
              nextFirst = -1;
            } else {
              nextFirst = 0;
            }this.registerSuperMethods(superClass, nextFirst, visitTbl);
          }this.registerMethods(src, firstSuper < 0);
        };BindClass.prototype.finish = function () {
          if (this.ready) return this;this.ready = true;this.superList = (this.superIdList || []).map(function (superId) {
            return _nbind.getType(superId).finish();
          });var Bound = this.proto;if (this.superList.length) {
            var Proto = function () {
              this.constructor = Bound;
            };Proto.prototype = this.superList[0].proto.prototype;Bound.prototype = new Proto();
          }if (Bound != Module) Bound.prototype.__nbindType = this;this.registerSuperMethods(this, 1, {});return this;
        };BindClass.prototype.upcastStep = function (dst, ptr) {
          if (dst == this) return ptr;for (var i = 0; i < this.superList.length; ++i) {
            var superPtr = this.superList[i].upcastStep(dst, _nbind.callUpcast(this.upcastList[i], ptr));if (superPtr) return superPtr;
          }return 0;
        };return BindClass;
      }(_nbind.BindType);BindClass.list = [];_nbind.BindClass = BindClass;function popPointer(ptr, type) {
        return ptr ? new type.proto(_nbind.ptrMarker, type.flags, ptr) : null;
      }_nbind.popPointer = popPointer;function pushPointer(obj, type, tryValue) {
        if (!(obj instanceof _nbind.Wrapper)) {
          if (tryValue) {
            return _nbind.pushValue(obj);
          } else throw new Error("Type mismatch");
        }var ptr = obj.__nbindPtr;var objType = obj.__nbindType.classType;var classType = type.classType;if (obj instanceof type.proto) {
          while (objType != classType) {
            ptr = _nbind.callUpcast(objType.upcastList[0], ptr);objType = objType.superList[0];
          }
        } else {
          ptr = objType.upcastStep(classType, ptr);if (!ptr) throw new Error("Type mismatch");
        }return ptr;
      }_nbind.pushPointer = pushPointer;function pushMutablePointer(obj, type) {
        var ptr = pushPointer(obj, type);if (obj.__nbindFlags & 1) {
          throw new Error("Passing a const value as a non-const argument");
        }return ptr;
      }var BindClassPtr = function (_super) {
        __extends(BindClassPtr, _super);function BindClassPtr(spec) {
          var _this = _super.call(this, spec) || this;_this.classType = spec.paramList[0].classType;_this.proto = _this.classType.proto;var isConst = spec.flags & 1;var isValue = (_this.flags & 896) == 256 && spec.flags & 2;var push = isConst ? pushPointer : pushMutablePointer;var pop = isValue ? _nbind.popValue : popPointer;_this.makeWireWrite = function (expr, policyTbl) {
            return policyTbl["Nullable"] ? function (arg) {
              return arg ? push(arg, _this) : 0;
            } : function (arg) {
              return push(arg, _this);
            };
          };_this.wireRead = function (arg) {
            return pop(arg, _this);
          };_this.wireWrite = function (arg) {
            return push(arg, _this);
          };return _this;
        }return BindClassPtr;
      }(_nbind.BindType);_nbind.BindClassPtr = BindClassPtr;function popShared(ptr, type) {
        var shared = HEAPU32[ptr / 4];var unsafe = HEAPU32[ptr / 4 + 1];return unsafe ? new type.proto(_nbind.ptrMarker, type.flags, unsafe, shared) : null;
      }_nbind.popShared = popShared;function pushShared(obj, type) {
        if (!(obj instanceof type.proto)) throw new Error("Type mismatch");return obj.__nbindShared;
      }function pushMutableShared(obj, type) {
        if (!(obj instanceof type.proto)) throw new Error("Type mismatch");if (obj.__nbindFlags & 1) {
          throw new Error("Passing a const value as a non-const argument");
        }return obj.__nbindShared;
      }var SharedClassPtr = function (_super) {
        __extends(SharedClassPtr, _super);function SharedClassPtr(spec) {
          var _this = _super.call(this, spec) || this;_this.readResources = [_nbind.resources.pool];_this.classType = spec.paramList[0].classType;_this.proto = _this.classType.proto;var isConst = spec.flags & 1;var push = isConst ? pushShared : pushMutableShared;_this.wireRead = function (arg) {
            return popShared(arg, _this);
          };_this.wireWrite = function (arg) {
            return push(arg, _this);
          };return _this;
        }return SharedClassPtr;
      }(_nbind.BindType);_nbind.SharedClassPtr = SharedClassPtr;_nbind.externalList = [0];var firstFreeExternal = 0;var External = function () {
        function External(data) {
          this.refCount = 1;this.data = data;
        }External.prototype.register = function () {
          var num = firstFreeExternal;if (num) {
            firstFreeExternal = _nbind.externalList[num];
          } else num = _nbind.externalList.length;_nbind.externalList[num] = this;return num;
        };External.prototype.reference = function () {
          ++this.refCount;
        };External.prototype.dereference = function (num) {
          if (--this.refCount == 0) {
            if (this.free) this.free();_nbind.externalList[num] = firstFreeExternal;firstFreeExternal = num;
          }
        };return External;
      }();_nbind.External = External;function popExternal(num) {
        var obj = _nbind.externalList[num];obj.dereference(num);return obj.data;
      }function pushExternal(obj) {
        var external = new External(obj);external.reference();return external.register();
      }var ExternalType = function (_super) {
        __extends(ExternalType, _super);function ExternalType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireRead = popExternal;_this.wireWrite = pushExternal;return _this;
        }return ExternalType;
      }(_nbind.BindType);_nbind.ExternalType = ExternalType;_nbind.callbackSignatureList = [];var CallbackType = function (_super) {
        __extends(CallbackType, _super);function CallbackType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireWrite = function (func) {
            if (typeof func != "function") _nbind.throwError("Type mismatch");return new _nbind.External(func).register();
          };return _this;
        }return CallbackType;
      }(_nbind.BindType);_nbind.CallbackType = CallbackType;_nbind.valueList = [0];var firstFreeValue = 0;function pushValue(value) {
        var num = firstFreeValue;if (num) {
          firstFreeValue = _nbind.valueList[num];
        } else num = _nbind.valueList.length;_nbind.valueList[num] = value;return num * 2 + 1;
      }_nbind.pushValue = pushValue;function popValue(num, type) {
        if (!num) _nbind.throwError("Value type JavaScript class is missing or not registered");if (num & 1) {
          num >>= 1;var obj = _nbind.valueList[num];_nbind.valueList[num] = firstFreeValue;firstFreeValue = num;return obj;
        } else if (type) {
          return _nbind.popShared(num, type);
        } else throw new Error("Invalid value slot " + num);
      }_nbind.popValue = popValue;var valueBase = 0x10000000000000000;function push64(num) {
        if (typeof num == "number") return num;return pushValue(num) * 4096 + valueBase;
      }function pop64(num) {
        if (num < valueBase) return num;return popValue((num - valueBase) / 4096);
      }var CreateValueType = function (_super) {
        __extends(CreateValueType, _super);function CreateValueType() {
          return _super !== null && _super.apply(this, arguments) || this;
        }CreateValueType.prototype.makeWireWrite = function (expr) {
          return "(_nbind.pushValue(new " + expr + "))";
        };return CreateValueType;
      }(_nbind.BindType);_nbind.CreateValueType = CreateValueType;var Int64Type = function (_super) {
        __extends(Int64Type, _super);function Int64Type() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireWrite = push64;_this.wireRead = pop64;return _this;
        }return Int64Type;
      }(_nbind.BindType);_nbind.Int64Type = Int64Type;function pushArray(arr, type) {
        if (!arr) return 0;var length = arr.length;if ((type.size || type.size === 0) && length < type.size) {
          throw new Error("Type mismatch");
        }var ptrSize = type.memberType.ptrSize;var result = _nbind.Pool.lalloc(4 + length * ptrSize);HEAPU32[result / 4] = length;var heap = type.memberType.heap;var ptr = (result + 4) / ptrSize;var wireWrite = type.memberType.wireWrite;var num = 0;if (wireWrite) {
          while (num < length) {
            heap[ptr++] = wireWrite(arr[num++]);
          }
        } else {
          while (num < length) {
            heap[ptr++] = arr[num++];
          }
        }return result;
      }_nbind.pushArray = pushArray;function popArray(ptr, type) {
        if (ptr === 0) return null;var length = HEAPU32[ptr / 4];var arr = new Array(length);var heap = type.memberType.heap;ptr = (ptr + 4) / type.memberType.ptrSize;var wireRead = type.memberType.wireRead;var num = 0;if (wireRead) {
          while (num < length) {
            arr[num++] = wireRead(heap[ptr++]);
          }
        } else {
          while (num < length) {
            arr[num++] = heap[ptr++];
          }
        }return arr;
      }_nbind.popArray = popArray;var ArrayType = function (_super) {
        __extends(ArrayType, _super);function ArrayType(spec) {
          var _this = _super.call(this, spec) || this;_this.wireRead = function (arg) {
            return popArray(arg, _this);
          };_this.wireWrite = function (arg) {
            return pushArray(arg, _this);
          };_this.readResources = [_nbind.resources.pool];_this.writeResources = [_nbind.resources.pool];_this.memberType = spec.paramList[0];if (spec.paramList[1]) _this.size = spec.paramList[1];return _this;
        }return ArrayType;
      }(_nbind.BindType);_nbind.ArrayType = ArrayType;function pushString(str, policyTbl) {
        if (str === null || str === undefined) {
          if (policyTbl && policyTbl["Nullable"]) {
            str = "";
          } else throw new Error("Type mismatch");
        }if (policyTbl && policyTbl["Strict"]) {
          if (typeof str != "string") throw new Error("Type mismatch");
        } else str = str.toString();var length = Module.lengthBytesUTF8(str);var result = _nbind.Pool.lalloc(4 + length + 1);HEAPU32[result / 4] = length;Module.stringToUTF8Array(str, HEAPU8, result + 4, length + 1);return result;
      }_nbind.pushString = pushString;function popString(ptr) {
        if (ptr === 0) return null;var length = HEAPU32[ptr / 4];return Module.Pointer_stringify(ptr + 4, length);
      }_nbind.popString = popString;var StringType = function (_super) {
        __extends(StringType, _super);function StringType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireRead = popString;_this.wireWrite = pushString;_this.readResources = [_nbind.resources.pool];_this.writeResources = [_nbind.resources.pool];return _this;
        }StringType.prototype.makeWireWrite = function (expr, policyTbl) {
          return function (arg) {
            return pushString(arg, policyTbl);
          };
        };return StringType;
      }(_nbind.BindType);_nbind.StringType = StringType;function makeArgList(argCount) {
        return Array.apply(null, Array(argCount)).map(function (dummy, num) {
          return "a" + (num + 1);
        });
      }function anyNeedsWireWrite(typeList, policyTbl) {
        return typeList.reduce(function (result, type) {
          return result || type.needsWireWrite(policyTbl);
        }, false);
      }function anyNeedsWireRead(typeList, policyTbl) {
        return typeList.reduce(function (result, type) {
          return result || !!type.needsWireRead(policyTbl);
        }, false);
      }function makeWireRead(convertParamList, policyTbl, type, expr) {
        var paramNum = convertParamList.length;if (type.makeWireRead) {
          return type.makeWireRead(expr, convertParamList, paramNum);
        } else if (type.wireRead) {
          convertParamList[paramNum] = type.wireRead;return "(convertParamList[" + paramNum + "](" + expr + "))";
        } else return expr;
      }function makeWireWrite(convertParamList, policyTbl, type, expr) {
        var wireWrite;var paramNum = convertParamList.length;if (type.makeWireWrite) {
          wireWrite = type.makeWireWrite(expr, policyTbl, convertParamList, paramNum);
        } else wireWrite = type.wireWrite;if (wireWrite) {
          if (typeof wireWrite == "string") {
            return wireWrite;
          } else {
            convertParamList[paramNum] = wireWrite;return "(convertParamList[" + paramNum + "](" + expr + "))";
          }
        } else return expr;
      }function buildCallerFunction(dynCall, ptrType, ptr, num, policyTbl, needsWireWrite, prefix, returnType, argTypeList, mask, err) {
        var argList = makeArgList(argTypeList.length);var convertParamList = [];var callExpression = makeWireRead(convertParamList, policyTbl, returnType, "dynCall(" + [prefix].concat(argList.map(function (name, index) {
          return makeWireWrite(convertParamList, policyTbl, argTypeList[index], name);
        })).join(",") + ")");var resourceSet = _nbind.listResources([returnType], argTypeList);var sourceCode = "function(" + argList.join(",") + "){" + (mask ? "this.__nbindFlags&mask&&err();" : "") + resourceSet.makeOpen() + "var r=" + callExpression + ";" + resourceSet.makeClose() + "return r;" + "}";return eval("(" + sourceCode + ")");
      }function buildJSCallerFunction(returnType, argTypeList) {
        var argList = makeArgList(argTypeList.length);var convertParamList = [];var callExpression = makeWireWrite(convertParamList, null, returnType, "_nbind.externalList[num].data(" + argList.map(function (name, index) {
          return makeWireRead(convertParamList, null, argTypeList[index], name);
        }).join(",") + ")");var resourceSet = _nbind.listResources(argTypeList, [returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode = "function(" + ["dummy", "num"].concat(argList).join(",") + "){" + resourceSet.makeOpen() + "var r=" + callExpression + ";" + resourceSet.makeClose() + "return r;" + "}";return eval("(" + sourceCode + ")");
      }_nbind.buildJSCallerFunction = buildJSCallerFunction;function makeJSCaller(idList) {
        var argCount = idList.length - 1;var typeList = _nbind.getTypes(idList, "callback");var returnType = typeList[0];var argTypeList = typeList.slice(1);var needsWireRead = anyNeedsWireRead(argTypeList, null);var needsWireWrite = returnType.needsWireWrite(null);if (!needsWireWrite && !needsWireRead) {
          switch (argCount) {case 0:
              return function (dummy, num) {
                return _nbind.externalList[num].data();
              };case 1:
              return function (dummy, num, a1) {
                return _nbind.externalList[num].data(a1);
              };case 2:
              return function (dummy, num, a1, a2) {
                return _nbind.externalList[num].data(a1, a2);
              };case 3:
              return function (dummy, num, a1, a2, a3) {
                return _nbind.externalList[num].data(a1, a2, a3);
              };default:
              break;}
        }return buildJSCallerFunction(returnType, argTypeList);
      }_nbind.makeJSCaller = makeJSCaller;function makeMethodCaller(ptrType, spec) {
        var argCount = spec.typeList.length - 1;var typeIdList = spec.typeList.slice(0);typeIdList.splice(1, 0, "uint32_t", spec.boundID);var typeList = _nbind.getTypes(typeIdList, spec.title);var returnType = typeList[0];var argTypeList = typeList.slice(3);var needsWireRead = returnType.needsWireRead(spec.policyTbl);var needsWireWrite = anyNeedsWireWrite(argTypeList, spec.policyTbl);var ptr = spec.ptr;var num = spec.num;var dynCall = _nbind.getDynCall(typeList, spec.title);var mask = ~spec.flags & 1;function err() {
          throw new Error("Calling a non-const method on a const object");
        }if (!needsWireRead && !needsWireWrite) {
          switch (argCount) {case 0:
              return function () {
                return this.__nbindFlags & mask ? err() : dynCall(ptr, num, _nbind.pushPointer(this, ptrType));
              };case 1:
              return function (a1) {
                return this.__nbindFlags & mask ? err() : dynCall(ptr, num, _nbind.pushPointer(this, ptrType), a1);
              };case 2:
              return function (a1, a2) {
                return this.__nbindFlags & mask ? err() : dynCall(ptr, num, _nbind.pushPointer(this, ptrType), a1, a2);
              };case 3:
              return function (a1, a2, a3) {
                return this.__nbindFlags & mask ? err() : dynCall(ptr, num, _nbind.pushPointer(this, ptrType), a1, a2, a3);
              };default:
              break;}
        }return buildCallerFunction(dynCall, ptrType, ptr, num, spec.policyTbl, needsWireWrite, "ptr,num,pushPointer(this,ptrType)", returnType, argTypeList, mask, err);
      }_nbind.makeMethodCaller = makeMethodCaller;function makeCaller(spec) {
        var argCount = spec.typeList.length - 1;var typeList = _nbind.getTypes(spec.typeList, spec.title);var returnType = typeList[0];var argTypeList = typeList.slice(1);var needsWireRead = returnType.needsWireRead(spec.policyTbl);var needsWireWrite = anyNeedsWireWrite(argTypeList, spec.policyTbl);var direct = spec.direct;var ptr = spec.ptr;if (spec.direct && !needsWireRead && !needsWireWrite) {
          var dynCall_1 = _nbind.getDynCall(typeList, spec.title);switch (argCount) {case 0:
              return function () {
                return dynCall_1(direct);
              };case 1:
              return function (a1) {
                return dynCall_1(direct, a1);
              };case 2:
              return function (a1, a2) {
                return dynCall_1(direct, a1, a2);
              };case 3:
              return function (a1, a2, a3) {
                return dynCall_1(direct, a1, a2, a3);
              };default:
              break;}ptr = 0;
        }var prefix;if (ptr) {
          var typeIdList = spec.typeList.slice(0);typeIdList.splice(1, 0, "uint32_t");typeList = _nbind.getTypes(typeIdList, spec.title);prefix = "ptr,num";
        } else {
          ptr = direct;prefix = "ptr";
        }var dynCall = _nbind.getDynCall(typeList, spec.title);return buildCallerFunction(dynCall, null, ptr, spec.num, spec.policyTbl, needsWireWrite, prefix, returnType, argTypeList);
      }_nbind.makeCaller = makeCaller;function makeOverloader(func, arity) {
        var callerList = [];function call() {
          return callerList[arguments.length].apply(this, arguments);
        }call.addMethod = function (_func, _arity) {
          callerList[_arity] = _func;
        };call.addMethod(func, arity);return call;
      }_nbind.makeOverloader = makeOverloader;var Resource = function () {
        function Resource(open, close) {
          var _this = this;this.makeOpen = function () {
            return Object.keys(_this.openTbl).join("");
          };this.makeClose = function () {
            return Object.keys(_this.closeTbl).join("");
          };this.openTbl = {};this.closeTbl = {};if (open) this.openTbl[open] = true;if (close) this.closeTbl[close] = true;
        }Resource.prototype.add = function (other) {
          for (var _i = 0, _a = Object.keys(other.openTbl); _i < _a.length; _i++) {
            var key = _a[_i];this.openTbl[key] = true;
          }for (var _b = 0, _c = Object.keys(other.closeTbl); _b < _c.length; _b++) {
            var key = _c[_b];this.closeTbl[key] = true;
          }
        };Resource.prototype.remove = function (other) {
          for (var _i = 0, _a = Object.keys(other.openTbl); _i < _a.length; _i++) {
            var key = _a[_i];delete this.openTbl[key];
          }for (var _b = 0, _c = Object.keys(other.closeTbl); _b < _c.length; _b++) {
            var key = _c[_b];delete this.closeTbl[key];
          }
        };return Resource;
      }();_nbind.Resource = Resource;function listResources(readList, writeList) {
        var result = new Resource();for (var _i = 0, readList_1 = readList; _i < readList_1.length; _i++) {
          var bindType = readList_1[_i];for (var _a = 0, _b = bindType.readResources || []; _a < _b.length; _a++) {
            var resource = _b[_a];result.add(resource);
          }
        }for (var _c = 0, writeList_1 = writeList; _c < writeList_1.length; _c++) {
          var bindType = writeList_1[_c];for (var _d = 0, _e = bindType.writeResources || []; _d < _e.length; _d++) {
            var resource = _e[_d];result.add(resource);
          }
        }return result;
      }_nbind.listResources = listResources;_nbind.resources = { pool: new Resource("var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];", "_nbind.Pool.lreset(used,page);") };var ExternalBuffer = function (_super) {
        __extends(ExternalBuffer, _super);function ExternalBuffer(buf, ptr) {
          var _this = _super.call(this, buf) || this;_this.ptr = ptr;return _this;
        }ExternalBuffer.prototype.free = function () {
          _free(this.ptr);
        };return ExternalBuffer;
      }(_nbind.External);function getBuffer(buf) {
        if (buf instanceof ArrayBuffer) {
          return new Uint8Array(buf);
        } else if (buf instanceof DataView) {
          return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
        } else return buf;
      }function pushBuffer(buf, policyTbl) {
        if (buf === null || buf === undefined) {
          if (policyTbl && policyTbl["Nullable"]) buf = [];
        }if (typeof buf != "object") throw new Error("Type mismatch");var b = buf;var length = b.byteLength || b.length;if (!length && length !== 0 && b.byteLength !== 0) throw new Error("Type mismatch");var result = _nbind.Pool.lalloc(8);var data = _malloc(length);var ptr = result / 4;HEAPU32[ptr++] = length;HEAPU32[ptr++] = data;HEAPU32[ptr++] = new ExternalBuffer(buf, data).register();HEAPU8.set(getBuffer(buf), data);return result;
      }var BufferType = function (_super) {
        __extends(BufferType, _super);function BufferType() {
          var _this = _super !== null && _super.apply(this, arguments) || this;_this.wireWrite = pushBuffer;_this.readResources = [_nbind.resources.pool];_this.writeResources = [_nbind.resources.pool];return _this;
        }BufferType.prototype.makeWireWrite = function (expr, policyTbl) {
          return function (arg) {
            return pushBuffer(arg, policyTbl);
          };
        };return BufferType;
      }(_nbind.BindType);_nbind.BufferType = BufferType;function commitBuffer(num, data, length) {
        var buf = _nbind.externalList[num].data;var NodeBuffer = Buffer;if (typeof Buffer != "function") NodeBuffer = function () {};if (buf instanceof Array) {} else {
          var src = HEAPU8.subarray(data, data + length);if (buf instanceof NodeBuffer) {
            var srcBuf = void 0;if (typeof Buffer.from == "function" && Buffer.from.length >= 3) {
              srcBuf = Buffer.from(src);
            } else srcBuf = new Buffer(src);srcBuf.copy(buf);
          } else getBuffer(buf).set(src);
        }
      }_nbind.commitBuffer = commitBuffer;var dirtyList = [];var gcTimer = 0;function sweep() {
        for (var _i = 0, dirtyList_1 = dirtyList; _i < dirtyList_1.length; _i++) {
          var obj = dirtyList_1[_i];if (!(obj.__nbindState & (1 | 2))) {
            obj.free();
          }
        }dirtyList = [];gcTimer = 0;
      }_nbind.mark = function (obj) {};function toggleLightGC(enable) {
        if (enable) {
          _nbind.mark = function (obj) {
            dirtyList.push(obj);if (!gcTimer) gcTimer = setTimeout(sweep, 0);
          };
        } else {
          _nbind.mark = function (obj) {};
        }
      }_nbind.toggleLightGC = toggleLightGC;
    })(_nbind);Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) {
      Module.printErr("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"] = Module["requestFullscreen"];Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice);
    };Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) {
      Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice);
    };Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) {
      Browser.requestAnimationFrame(func);
    };Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) {
      Browser.setCanvasSize(width, height, noUpdates);
    };Module["pauseMainLoop"] = function Module_pauseMainLoop() {
      Browser.mainLoop.pause();
    };Module["resumeMainLoop"] = function Module_resumeMainLoop() {
      Browser.mainLoop.resume();
    };Module["getUserMedia"] = function Module_getUserMedia() {
      Browser.getUserMedia();
    };Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) {
      return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes);
    };if (ENVIRONMENT_IS_NODE) {
      _emscripten_get_now = function _emscripten_get_now_actual() {
        var t = process["hrtime"]();return t[0] * 1e3 + t[1] / 1e6;
      };
    } else if (typeof dateNow !== "undefined") {
      _emscripten_get_now = dateNow;
    } else if (typeof self === "object" && self["performance"] && typeof self["performance"]["now"] === "function") {
      _emscripten_get_now = function () {
        return self["performance"]["now"]();
      };
    } else if (typeof performance === "object" && typeof performance["now"] === "function") {
      _emscripten_get_now = function () {
        return performance["now"]();
      };
    } else {
      _emscripten_get_now = Date.now;
    }__ATEXIT__.push(function () {
      var fflush = Module["_fflush"];if (fflush) fflush(0);var printChar = ___syscall146.printChar;if (!printChar) return;var buffers = ___syscall146.buffers;if (buffers[1].length) printChar(1, 10);if (buffers[2].length) printChar(2, 10);
    });DYNAMICTOP_PTR = allocate(1, "i32", ALLOC_STATIC);STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);STACK_MAX = STACK_BASE + TOTAL_STACK;DYNAMIC_BASE = Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR >> 2] = DYNAMIC_BASE;staticSealed = true;function invoke_viiiii(index, a1, a2, a3, a4, a5) {
      try {
        Module["dynCall_viiiii"](index, a1, a2, a3, a4, a5);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_vif(index, a1, a2) {
      try {
        Module["dynCall_vif"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_vid(index, a1, a2) {
      try {
        Module["dynCall_vid"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_fiff(index, a1, a2, a3) {
      try {
        return Module["dynCall_fiff"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_vi(index, a1) {
      try {
        Module["dynCall_vi"](index, a1);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_vii(index, a1, a2) {
      try {
        Module["dynCall_vii"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_ii(index, a1) {
      try {
        return Module["dynCall_ii"](index, a1);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viddi(index, a1, a2, a3, a4) {
      try {
        Module["dynCall_viddi"](index, a1, a2, a3, a4);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_vidd(index, a1, a2, a3) {
      try {
        Module["dynCall_vidd"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_iiii(index, a1, a2, a3) {
      try {
        return Module["dynCall_iiii"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_diii(index, a1, a2, a3) {
      try {
        return Module["dynCall_diii"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_di(index, a1) {
      try {
        return Module["dynCall_di"](index, a1);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_iid(index, a1, a2) {
      try {
        return Module["dynCall_iid"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_iii(index, a1, a2) {
      try {
        return Module["dynCall_iii"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viiddi(index, a1, a2, a3, a4, a5) {
      try {
        Module["dynCall_viiddi"](index, a1, a2, a3, a4, a5);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) {
      try {
        Module["dynCall_viiiiii"](index, a1, a2, a3, a4, a5, a6);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_dii(index, a1, a2) {
      try {
        return Module["dynCall_dii"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_i(index) {
      try {
        return Module["dynCall_i"](index);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_iiiiii(index, a1, a2, a3, a4, a5) {
      try {
        return Module["dynCall_iiiiii"](index, a1, a2, a3, a4, a5);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viiid(index, a1, a2, a3, a4) {
      try {
        Module["dynCall_viiid"](index, a1, a2, a3, a4);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viififi(index, a1, a2, a3, a4, a5, a6) {
      try {
        Module["dynCall_viififi"](index, a1, a2, a3, a4, a5, a6);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viii(index, a1, a2, a3) {
      try {
        Module["dynCall_viii"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_v(index) {
      try {
        Module["dynCall_v"](index);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viid(index, a1, a2, a3) {
      try {
        Module["dynCall_viid"](index, a1, a2, a3);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_idd(index, a1, a2) {
      try {
        return Module["dynCall_idd"](index, a1, a2);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }function invoke_viiii(index, a1, a2, a3, a4) {
      try {
        Module["dynCall_viiii"](index, a1, a2, a3, a4);
      } catch (e) {
        if (typeof e !== "number" && e !== "longjmp") throw e;Module["setThrew"](1, 0);
      }
    }Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity };Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "invoke_viiiii": invoke_viiiii, "invoke_vif": invoke_vif, "invoke_vid": invoke_vid, "invoke_fiff": invoke_fiff, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viddi": invoke_viddi, "invoke_vidd": invoke_vidd, "invoke_iiii": invoke_iiii, "invoke_diii": invoke_diii, "invoke_di": invoke_di, "invoke_iid": invoke_iid, "invoke_iii": invoke_iii, "invoke_viiddi": invoke_viiddi, "invoke_viiiiii": invoke_viiiiii, "invoke_dii": invoke_dii, "invoke_i": invoke_i, "invoke_iiiiii": invoke_iiiiii, "invoke_viiid": invoke_viiid, "invoke_viififi": invoke_viififi, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_idd": invoke_idd, "invoke_viiii": invoke_viiii, "_emscripten_asm_const_iiiii": _emscripten_asm_const_iiiii, "_emscripten_asm_const_iiidddddd": _emscripten_asm_const_iiidddddd, "_emscripten_asm_const_iiiid": _emscripten_asm_const_iiiid, "__nbind_reference_external": __nbind_reference_external, "_emscripten_asm_const_iiiiiiii": _emscripten_asm_const_iiiiiiii, "_removeAccessorPrefix": _removeAccessorPrefix, "_typeModule": _typeModule, "__nbind_register_pool": __nbind_register_pool, "__decorate": __decorate, "_llvm_stackrestore": _llvm_stackrestore, "___cxa_atexit": ___cxa_atexit, "__extends": __extends, "__nbind_get_value_object": __nbind_get_value_object, "__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj": __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "__nbind_register_primitive": __nbind_register_primitive, "__nbind_register_type": __nbind_register_type, "_emscripten_memcpy_big": _emscripten_memcpy_big, "__nbind_register_function": __nbind_register_function, "___setErrNo": ___setErrNo, "__nbind_register_class": __nbind_register_class, "__nbind_finish": __nbind_finish, "_abort": _abort, "_nbind_value": _nbind_value, "_llvm_stacksave": _llvm_stacksave, "___syscall54": ___syscall54, "_defineHidden": _defineHidden, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_get_now": _emscripten_get_now, "__nbind_register_callback_signature": __nbind_register_callback_signature, "_emscripten_asm_const_iiiiii": _emscripten_asm_const_iiiiii, "__nbind_free_external": __nbind_free_external, "_emscripten_asm_const_iiii": _emscripten_asm_const_iiii, "_emscripten_asm_const_iiididi": _emscripten_asm_const_iiididi, "___syscall6": ___syscall6, "_atexit": _atexit, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8, "___dso_handle": ___dso_handle }; // EMSCRIPTEN_START_ASM
    var asm = function (global, env, buffer) {
      "use asm";
      var a = new global.Int8Array(buffer);var b = new global.Int16Array(buffer);var c = new global.Int32Array(buffer);var d = new global.Uint8Array(buffer);var e = new global.Uint16Array(buffer);var f = new global.Uint32Array(buffer);var g = new global.Float32Array(buffer);var h = new global.Float64Array(buffer);var i = env.DYNAMICTOP_PTR | 0;var j = env.tempDoublePtr | 0;var k = env.ABORT | 0;var l = env.STACKTOP | 0;var m = env.STACK_MAX | 0;var n = env.cttz_i8 | 0;var o = env.___dso_handle | 0;var p = 0;var q = 0;var r = 0;var s = 0;var t = global.NaN,
          u = global.Infinity;var v = 0,
          w = 0,
          x = 0,
          y = 0,
          z = 0.0;var A = 0;var B = global.Math.floor;var C = global.Math.abs;var D = global.Math.sqrt;var E = global.Math.pow;var F = global.Math.cos;var G = global.Math.sin;var H = global.Math.tan;var I = global.Math.acos;var J = global.Math.asin;var K = global.Math.atan;var L = global.Math.atan2;var M = global.Math.exp;var N = global.Math.log;var O = global.Math.ceil;var P = global.Math.imul;var Q = global.Math.min;var R = global.Math.max;var S = global.Math.clz32;var T = global.Math.fround;var U = env.abort;var V = env.assert;var W = env.enlargeMemory;var X = env.getTotalMemory;var Y = env.abortOnCannotGrowMemory;var Z = env.invoke_viiiii;var _ = env.invoke_vif;var $ = env.invoke_vid;var aa = env.invoke_fiff;var ba = env.invoke_vi;var ca = env.invoke_vii;var da = env.invoke_ii;var ea = env.invoke_viddi;var fa = env.invoke_vidd;var ga = env.invoke_iiii;var ha = env.invoke_diii;var ia = env.invoke_di;var ja = env.invoke_iid;var ka = env.invoke_iii;var la = env.invoke_viiddi;var ma = env.invoke_viiiiii;var na = env.invoke_dii;var oa = env.invoke_i;var pa = env.invoke_iiiiii;var qa = env.invoke_viiid;var ra = env.invoke_viififi;var sa = env.invoke_viii;var ta = env.invoke_v;var ua = env.invoke_viid;var va = env.invoke_idd;var wa = env.invoke_viiii;var xa = env._emscripten_asm_const_iiiii;var ya = env._emscripten_asm_const_iiidddddd;var za = env._emscripten_asm_const_iiiid;var Aa = env.__nbind_reference_external;var Ba = env._emscripten_asm_const_iiiiiiii;var Ca = env._removeAccessorPrefix;var Da = env._typeModule;var Ea = env.__nbind_register_pool;var Fa = env.__decorate;var Ga = env._llvm_stackrestore;var Ha = env.___cxa_atexit;var Ia = env.__extends;var Ja = env.__nbind_get_value_object;var Ka = env.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj;var La = env._emscripten_set_main_loop_timing;var Ma = env.__nbind_register_primitive;var Na = env.__nbind_register_type;var Oa = env._emscripten_memcpy_big;var Pa = env.__nbind_register_function;var Qa = env.___setErrNo;var Ra = env.__nbind_register_class;var Sa = env.__nbind_finish;var Ta = env._abort;var Ua = env._nbind_value;var Va = env._llvm_stacksave;var Wa = env.___syscall54;var Xa = env._defineHidden;var Ya = env._emscripten_set_main_loop;var Za = env._emscripten_get_now;var _a = env.__nbind_register_callback_signature;var $a = env._emscripten_asm_const_iiiiii;var ab = env.__nbind_free_external;var bb = env._emscripten_asm_const_iiii;var cb = env._emscripten_asm_const_iiididi;var db = env.___syscall6;var eb = env._atexit;var fb = env.___syscall140;var gb = env.___syscall146;var hb = T(0);const ib = T(0);
      // EMSCRIPTEN_START_FUNCS
      function Jb(a) {
        a = a | 0;var b = 0;b = l;l = l + a | 0;l = l + 15 & -16;return b | 0;
      }function Kb() {
        return l | 0;
      }function Lb(a) {
        a = a | 0;l = a;
      }function Mb(a, b) {
        a = a | 0;b = b | 0;l = a;m = b;
      }function Nb(a, b) {
        a = a | 0;b = b | 0;if (!p) {
          p = a;q = b;
        }
      }function Ob(a) {
        a = a | 0;A = a;
      }function Pb() {
        return A | 0;
      }function Qb() {
        var b = 0,
            d = 0;BC(8104, 8, 400) | 0;BC(8504, 408, 540) | 0;b = 9044;d = b + 44 | 0;do {
          c[b >> 2] = 0;b = b + 4 | 0;
        } while ((b | 0) < (d | 0));a[9088] = 0;a[9089] = 1;c[2273] = 0;c[2274] = 948;c[2275] = 948;Ha(17, 8104, o | 0) | 0;return;
      }function Rb(a) {
        a = a | 0;oc(a + 948 | 0);return;
      }function Sb(a) {
        a = T(a);return ((af(a) | 0) & 2147483647) >>> 0 > 2139095040 | 0;
      }function Tb(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;a: do if (!(c[a + (b << 3) + 4 >> 2] | 0)) {
          if ((b | 2 | 0) == 3 ? c[a + 60 >> 2] | 0 : 0) {
            a = a + 56 | 0;break;
          }switch (b | 0) {case 0:case 2:case 4:case 5:
              {
                if (c[a + 52 >> 2] | 0) {
                  a = a + 48 | 0;break a;
                }break;
              }default:
              {}}if (!(c[a + 68 >> 2] | 0)) {
            a = (b | 1 | 0) == 5 ? 948 : d;break;
          } else {
            a = a + 64 | 0;break;
          }
        } else a = a + (b << 3) | 0; while (0);return a | 0;
      }function Ub(b) {
        b = b | 0;var d = 0;d = oB(1e3) | 0;Vb(b, (d | 0) != 0, 2456);c[2276] = (c[2276] | 0) + 1;BC(d | 0, 8104, 1e3) | 0;if (a[b + 2 >> 0] | 0) {
          c[d + 4 >> 2] = 2;c[d + 12 >> 2] = 4;
        }c[d + 976 >> 2] = b;return d | 0;
      }function Vb(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;f = l;l = l + 16 | 0;e = f;if (!b) {
          c[e >> 2] = d;fe(a, 5, 3197, e);
        }l = f;return;
      }function Wb() {
        return Ub(956) | 0;
      }function Xb(a) {
        a = a | 0;var b = 0;b = qC(1e3) | 0;Yb(b, a);Vb(c[a + 976 >> 2] | 0, 1, 2456);c[2276] = (c[2276] | 0) + 1;c[b + 944 >> 2] = 0;return b | 0;
      }function Yb(a, b) {
        a = a | 0;b = b | 0;var d = 0;BC(a | 0, b | 0, 948) | 0;ie(a + 948 | 0, b + 948 | 0);d = a + 960 | 0;a = b + 960 | 0;b = d + 40 | 0;do {
          c[d >> 2] = c[a >> 2];d = d + 4 | 0;a = a + 4 | 0;
        } while ((d | 0) < (b | 0));return;
      }function Zb(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0;b = a + 944 | 0;d = c[b >> 2] | 0;if (d | 0) {
          _b(d + 948 | 0, a) | 0;c[b >> 2] = 0;
        }d = $b(a) | 0;if (d | 0) {
          b = 0;do {
            c[(ac(a, b) | 0) + 944 >> 2] = 0;b = b + 1 | 0;
          } while ((b | 0) != (d | 0));
        }d = a + 948 | 0;e = c[d >> 2] | 0;f = a + 952 | 0;b = c[f >> 2] | 0;if ((b | 0) != (e | 0)) c[f >> 2] = b + (~((b + -4 - e | 0) >>> 2) << 2);bc(d);pB(a);c[2276] = (c[2276] | 0) + -1;return;
      }function _b(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = c[a >> 2] | 0;i = a + 4 | 0;d = c[i >> 2] | 0;g = d;a: do if ((e | 0) == (d | 0)) {
          f = e;h = 4;
        } else {
          a = e;while (1) {
            if ((c[a >> 2] | 0) == (b | 0)) {
              f = a;h = 4;break a;
            }a = a + 4 | 0;if ((a | 0) == (d | 0)) {
              a = 0;break;
            }
          }
        } while (0);if ((h | 0) == 4) if ((f | 0) != (d | 0)) {
          e = f + 4 | 0;a = g - e | 0;b = a >> 2;if (b) {
            GC(f | 0, e | 0, a | 0) | 0;d = c[i >> 2] | 0;
          }a = f + (b << 2) | 0;if ((d | 0) == (a | 0)) a = 1;else {
            c[i >> 2] = d + (~((d + -4 - a | 0) >>> 2) << 2);a = 1;
          }
        } else a = 0;return a | 0;
      }function $b(a) {
        a = a | 0;return (c[a + 952 >> 2] | 0) - (c[a + 948 >> 2] | 0) >> 2 | 0;
      }function ac(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[a + 948 >> 2] | 0;if ((c[a + 952 >> 2] | 0) - d >> 2 >>> 0 > b >>> 0) a = c[d + (b << 2) >> 2] | 0;else a = 0;return a | 0;
      }function bc(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0;e = l;l = l + 32 | 0;b = e;f = c[a >> 2] | 0;d = (c[a + 4 >> 2] | 0) - f | 0;if (((c[a + 8 >> 2] | 0) - f | 0) >>> 0 > d >>> 0) {
          f = d >> 2;bf(b, f, f, a + 8 | 0);cf(a, b);df(b);
        }l = e;return;
      }function cc(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0;k = $b(a) | 0;do if (k | 0) {
          if ((c[(ac(a, 0) | 0) + 944 >> 2] | 0) == (a | 0)) {
            if (!(_b(a + 948 | 0, b) | 0)) break;BC(b + 400 | 0, 8504, 540) | 0;c[b + 944 >> 2] = 0;nc(a);break;
          }h = c[(c[a + 976 >> 2] | 0) + 12 >> 2] | 0;i = a + 948 | 0;j = (h | 0) == 0;d = 0;g = 0;do {
            e = c[(c[i >> 2] | 0) + (g << 2) >> 2] | 0;if ((e | 0) == (b | 0)) nc(a);else {
              f = Xb(e) | 0;c[(c[i >> 2] | 0) + (d << 2) >> 2] = f;c[f + 944 >> 2] = a;if (!j) Ib[h & 15](e, f, a, d);d = d + 1 | 0;
            }g = g + 1 | 0;
          } while ((g | 0) != (k | 0));if (d >>> 0 < k >>> 0) {
            j = a + 948 | 0;i = a + 952 | 0;h = d;d = c[i >> 2] | 0;do {
              g = (c[j >> 2] | 0) + (h << 2) | 0;e = g + 4 | 0;f = d - e | 0;b = f >> 2;if (!b) f = d;else {
                GC(g | 0, e | 0, f | 0) | 0;d = c[i >> 2] | 0;f = d;
              }e = g + (b << 2) | 0;if ((f | 0) != (e | 0)) {
                d = f + (~((f + -4 - e | 0) >>> 2) << 2) | 0;c[i >> 2] = d;
              }h = h + 1 | 0;
            } while ((h | 0) != (k | 0));
          }
        } while (0);return;
      }function dc(b) {
        b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;ec(b, ($b(b) | 0) == 0, 2491);ec(b, (c[b + 944 >> 2] | 0) == 0, 2545);d = b + 948 | 0;e = c[d >> 2] | 0;f = b + 952 | 0;g = c[f >> 2] | 0;if ((g | 0) != (e | 0)) c[f >> 2] = g + (~((g + -4 - e | 0) >>> 2) << 2);bc(d);d = b + 976 | 0;e = c[d >> 2] | 0;BC(b | 0, 8104, 1e3) | 0;if (a[e + 2 >> 0] | 0) {
          c[b + 4 >> 2] = 2;c[b + 12 >> 2] = 4;
        }c[d >> 2] = e;return;
      }function ec(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;f = l;l = l + 16 | 0;e = f;if (!b) {
          c[e >> 2] = d;Vd(a, 5, 3197, e);
        }l = f;return;
      }function fc() {
        return c[2276] | 0;
      }function gc() {
        var a = 0;a = oB(20) | 0;hc((a | 0) != 0, 2592);c[2277] = (c[2277] | 0) + 1;c[a >> 2] = c[239];c[a + 4 >> 2] = c[240];c[a + 8 >> 2] = c[241];c[a + 12 >> 2] = c[242];c[a + 16 >> 2] = c[243];return a | 0;
      }function hc(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = l;l = l + 16 | 0;d = e;if (!a) {
          c[d >> 2] = b;Vd(0, 5, 3197, d);
        }l = e;return;
      }function ic(a) {
        a = a | 0;pB(a);c[2277] = (c[2277] | 0) + -1;return;
      }function jc(a, b) {
        a = a | 0;b = b | 0;var d = 0;if (!b) {
          d = 0;b = 0;
        } else {
          ec(a, ($b(a) | 0) == 0, 2629);d = 1;
        }c[a + 964 >> 2] = b;c[a + 988 >> 2] = d;return;
      }function kc(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;g = e + 8 | 0;f = e + 4 | 0;h = e;c[f >> 2] = b;ec(a, (c[b + 944 >> 2] | 0) == 0, 2709);ec(a, (c[a + 964 >> 2] | 0) == 0, 2763);lc(a);b = a + 948 | 0;c[h >> 2] = (c[b >> 2] | 0) + (d << 2);c[g >> 2] = c[h >> 2];mc(b, g, f) | 0;c[(c[f >> 2] | 0) + 944 >> 2] = a;nc(a);l = e;return;
      }function lc(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;d = $b(a) | 0;if (d | 0 ? (c[(ac(a, 0) | 0) + 944 >> 2] | 0) != (a | 0) : 0) {
          e = c[(c[a + 976 >> 2] | 0) + 12 >> 2] | 0;f = a + 948 | 0;g = (e | 0) == 0;b = 0;do {
            h = c[(c[f >> 2] | 0) + (b << 2) >> 2] | 0;i = Xb(h) | 0;c[(c[f >> 2] | 0) + (b << 2) >> 2] = i;c[i + 944 >> 2] = a;if (!g) Ib[e & 15](h, i, a, b);b = b + 1 | 0;
          } while ((b | 0) != (d | 0));
        }return;
      }function mc(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0;s = l;l = l + 64 | 0;n = s + 52 | 0;i = s + 48 | 0;o = s + 28 | 0;p = s + 24 | 0;q = s + 20 | 0;r = s;e = c[a >> 2] | 0;g = e;b = e + ((c[b >> 2] | 0) - g >> 2 << 2) | 0;e = a + 4 | 0;f = c[e >> 2] | 0;h = a + 8 | 0;do if (f >>> 0 < (c[h >> 2] | 0) >>> 0) {
          if ((b | 0) == (f | 0)) {
            c[b >> 2] = c[d >> 2];c[e >> 2] = (c[e >> 2] | 0) + 4;break;
          }ef(a, b, f, b + 4 | 0);if (b >>> 0 <= d >>> 0) d = (c[e >> 2] | 0) >>> 0 > d >>> 0 ? d + 4 | 0 : d;c[b >> 2] = c[d >> 2];
        } else {
          e = (f - g >> 2) + 1 | 0;f = le(a) | 0;if (f >>> 0 < e >>> 0) jC(a);m = c[a >> 2] | 0;k = (c[h >> 2] | 0) - m | 0;g = k >> 1;bf(r, k >> 2 >>> 0 < f >>> 1 >>> 0 ? g >>> 0 < e >>> 0 ? e : g : f, b - m >> 2, a + 8 | 0);m = r + 8 | 0;e = c[m >> 2] | 0;g = r + 12 | 0;k = c[g >> 2] | 0;h = k;j = e;do if ((e | 0) == (k | 0)) {
            k = r + 4 | 0;e = c[k >> 2] | 0;t = c[r >> 2] | 0;f = t;if (e >>> 0 <= t >>> 0) {
              e = h - f >> 1;e = (e | 0) == 0 ? 1 : e;bf(o, e, e >>> 2, c[r + 16 >> 2] | 0);c[p >> 2] = c[k >> 2];c[q >> 2] = c[m >> 2];c[i >> 2] = c[p >> 2];c[n >> 2] = c[q >> 2];gf(o, i, n);e = c[r >> 2] | 0;c[r >> 2] = c[o >> 2];c[o >> 2] = e;e = o + 4 | 0;t = c[k >> 2] | 0;c[k >> 2] = c[e >> 2];c[e >> 2] = t;e = o + 8 | 0;t = c[m >> 2] | 0;c[m >> 2] = c[e >> 2];c[e >> 2] = t;e = o + 12 | 0;t = c[g >> 2] | 0;c[g >> 2] = c[e >> 2];c[e >> 2] = t;df(o);e = c[m >> 2] | 0;break;
            }g = e;h = ((g - f >> 2) + 1 | 0) / -2 | 0;i = e + (h << 2) | 0;f = j - g | 0;g = f >> 2;if (g) {
              GC(i | 0, e | 0, f | 0) | 0;e = c[k >> 2] | 0;
            }t = i + (g << 2) | 0;c[m >> 2] = t;c[k >> 2] = e + (h << 2);e = t;
          } while (0);c[e >> 2] = c[d >> 2];c[m >> 2] = (c[m >> 2] | 0) + 4;b = ff(a, r, b) | 0;df(r);
        } while (0);l = s;return b | 0;
      }function nc(b) {
        b = b | 0;var d = 0;do {
          d = b + 984 | 0;if (a[d >> 0] | 0) break;a[d >> 0] = 1;g[b + 504 >> 2] = T(t);b = c[b + 944 >> 2] | 0;
        } while ((b | 0) != 0);return;
      }function oc(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -4 - e | 0) >>> 2) << 2);sC(d);
        }return;
      }function pc(a) {
        a = a | 0;return c[a + 944 >> 2] | 0;
      }function qc(a) {
        a = a | 0;ec(a, (c[a + 964 >> 2] | 0) != 0, 2832);nc(a);return;
      }function rc(b) {
        b = b | 0;return (a[b + 984 >> 0] | 0) != 0 | 0;
      }function sc(a, b) {
        a = a | 0;b = b | 0;if (BB(a, b, 400) | 0) {
          BC(a | 0, b | 0, 400) | 0;nc(a);
        }return;
      }function tc(a) {
        a = a | 0;var b = ib;b = T(g[a + 44 >> 2]);a = Sb(b) | 0;return T(a ? T(0.0) : b);
      }function uc(b) {
        b = b | 0;var d = ib;d = T(g[b + 48 >> 2]);if (Sb(d) | 0) d = a[(c[b + 976 >> 2] | 0) + 2 >> 0] | 0 ? T(1.0) : T(0.0);return T(d);
      }function vc(a, b) {
        a = a | 0;b = b | 0;c[a + 980 >> 2] = b;return;
      }function wc(a) {
        a = a | 0;return c[a + 980 >> 2] | 0;
      }function xc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 4 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function yc(a) {
        a = a | 0;return c[a + 4 >> 2] | 0;
      }function zc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 8 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Ac(a) {
        a = a | 0;return c[a + 8 >> 2] | 0;
      }function Bc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 12 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Cc(a) {
        a = a | 0;return c[a + 12 >> 2] | 0;
      }function Dc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 16 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Ec(a) {
        a = a | 0;return c[a + 16 >> 2] | 0;
      }function Fc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 20 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Gc(a) {
        a = a | 0;return c[a + 20 >> 2] | 0;
      }function Hc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 24 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Ic(a) {
        a = a | 0;return c[a + 24 >> 2] | 0;
      }function Jc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 28 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Kc(a) {
        a = a | 0;return c[a + 28 >> 2] | 0;
      }function Lc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 32 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Mc(a) {
        a = a | 0;return c[a + 32 >> 2] | 0;
      }function Nc(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 36 | 0;if ((c[d >> 2] | 0) != (b | 0)) {
          c[d >> 2] = b;nc(a);
        }return;
      }function Oc(a) {
        a = a | 0;return c[a + 36 >> 2] | 0;
      }function Pc(a, b) {
        a = a | 0;b = T(b);var c = 0;c = a + 40 | 0;if (T(g[c >> 2]) != b) {
          g[c >> 2] = b;nc(a);
        }return;
      }function Qc(a, b) {
        a = a | 0;b = T(b);var c = 0;c = a + 44 | 0;if (T(g[c >> 2]) != b) {
          g[c >> 2] = b;nc(a);
        }return;
      }function Rc(a, b) {
        a = a | 0;b = T(b);var c = 0;c = a + 48 | 0;if (T(g[c >> 2]) != b) {
          g[c >> 2] = b;nc(a);
        }return;
      }function Sc(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 52 | 0;f = a + 56 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function Tc(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0;e = a + 52 | 0;d = a + 56 | 0;if (!(!(T(g[e >> 2]) != b) ? (c[d >> 2] | 0) == 2 : 0)) {
          g[e >> 2] = b;e = Sb(b) | 0;c[d >> 2] = e ? 3 : 2;nc(a);
        }return;
      }function Uc(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 52 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function Vc(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = (h ^ 1) & 1;f = a + 132 + (b << 3) | 0;b = a + 132 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function Wc(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = h ? 0 : 2;f = a + 132 + (b << 3) | 0;b = a + 132 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function Xc(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = b + 132 + (d << 3) | 0;b = c[e + 4 >> 2] | 0;d = a;c[d >> 2] = c[e >> 2];c[d + 4 >> 2] = b;return;
      }function Yc(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = (h ^ 1) & 1;f = a + 60 + (b << 3) | 0;b = a + 60 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function Zc(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = h ? 0 : 2;f = a + 60 + (b << 3) | 0;b = a + 60 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function _c(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = b + 60 + (d << 3) | 0;b = c[e + 4 >> 2] | 0;d = a;c[d >> 2] = c[e >> 2];c[d + 4 >> 2] = b;return;
      }function $c(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = a + 60 + (b << 3) + 4 | 0;if ((c[d >> 2] | 0) != 3) {
          g[a + 60 + (b << 3) >> 2] = T(t);c[d >> 2] = 3;nc(a);
        }return;
      }function ad(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = (h ^ 1) & 1;f = a + 204 + (b << 3) | 0;b = a + 204 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function bd(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = h ? 0 : 2;f = a + 204 + (b << 3) | 0;b = a + 204 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function cd(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = b + 204 + (d << 3) | 0;b = c[e + 4 >> 2] | 0;d = a;c[d >> 2] = c[e >> 2];c[d + 4 >> 2] = b;return;
      }function dd(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0,
            h = 0;h = Sb(d) | 0;e = (h ^ 1) & 1;f = a + 276 + (b << 3) | 0;b = a + 276 + (b << 3) + 4 | 0;if (!(h | T(g[f >> 2]) == d ? (c[b >> 2] | 0) == (e | 0) : 0)) {
          g[f >> 2] = d;c[b >> 2] = e;nc(a);
        }return;
      }function ed(a, b) {
        a = a | 0;b = b | 0;return T(g[a + 276 + (b << 3) >> 2]);
      }function fd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 348 | 0;f = a + 352 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function gd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0;e = a + 348 | 0;d = a + 352 | 0;if (!(!(T(g[e >> 2]) != b) ? (c[d >> 2] | 0) == 2 : 0)) {
          g[e >> 2] = b;e = Sb(b) | 0;c[d >> 2] = e ? 3 : 2;nc(a);
        }return;
      }function hd(a) {
        a = a | 0;var b = 0;b = a + 352 | 0;if ((c[b >> 2] | 0) != 3) {
          g[a + 348 >> 2] = T(t);c[b >> 2] = 3;nc(a);
        }return;
      }function id(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 348 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function jd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 356 | 0;f = a + 360 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function kd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0;e = a + 356 | 0;d = a + 360 | 0;if (!(!(T(g[e >> 2]) != b) ? (c[d >> 2] | 0) == 2 : 0)) {
          g[e >> 2] = b;e = Sb(b) | 0;c[d >> 2] = e ? 3 : 2;nc(a);
        }return;
      }function ld(a) {
        a = a | 0;var b = 0;b = a + 360 | 0;if ((c[b >> 2] | 0) != 3) {
          g[a + 356 >> 2] = T(t);c[b >> 2] = 3;nc(a);
        }return;
      }function md(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 356 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function nd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 364 | 0;f = a + 368 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function od(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = h ? 0 : 2;e = a + 364 | 0;f = a + 368 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function pd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 364 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function qd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 372 | 0;f = a + 376 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function rd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = h ? 0 : 2;e = a + 372 | 0;f = a + 376 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function sd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 372 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function td(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 380 | 0;f = a + 384 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function ud(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = h ? 0 : 2;e = a + 380 | 0;f = a + 384 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function vd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 380 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function wd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = (h ^ 1) & 1;e = a + 388 | 0;f = a + 392 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function xd(a, b) {
        a = a | 0;b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0;h = Sb(b) | 0;d = h ? 0 : 2;e = a + 388 | 0;f = a + 392 | 0;if (!(h | T(g[e >> 2]) == b ? (c[f >> 2] | 0) == (d | 0) : 0)) {
          g[e >> 2] = b;c[f >> 2] = d;nc(a);
        }return;
      }function yd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = b + 388 | 0;d = c[e + 4 >> 2] | 0;b = a;c[b >> 2] = c[e >> 2];c[b + 4 >> 2] = d;return;
      }function zd(a, b) {
        a = a | 0;b = T(b);var c = 0;c = a + 396 | 0;if (T(g[c >> 2]) != b) {
          g[c >> 2] = b;nc(a);
        }return;
      }function Ad(a) {
        a = a | 0;return T(g[a + 396 >> 2]);
      }function Bd(a) {
        a = a | 0;return T(g[a + 400 >> 2]);
      }function Cd(a) {
        a = a | 0;return T(g[a + 404 >> 2]);
      }function Dd(a) {
        a = a | 0;return T(g[a + 408 >> 2]);
      }function Ed(a) {
        a = a | 0;return T(g[a + 412 >> 2]);
      }function Fd(a) {
        a = a | 0;return T(g[a + 416 >> 2]);
      }function Gd(a) {
        a = a | 0;return T(g[a + 420 >> 2]);
      }function Hd(a, b) {
        a = a | 0;b = b | 0;ec(a, (b | 0) < 6, 2918);switch (b | 0) {case 0:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 5 : 4;break;
            }case 2:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 4 : 5;break;
            }default:
            {}}return T(g[a + 424 + (b << 2) >> 2]);
      }function Id(a, b) {
        a = a | 0;b = b | 0;ec(a, (b | 0) < 6, 2918);switch (b | 0) {case 0:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 5 : 4;break;
            }case 2:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 4 : 5;break;
            }default:
            {}}return T(g[a + 448 + (b << 2) >> 2]);
      }function Jd(a, b) {
        a = a | 0;b = b | 0;ec(a, (b | 0) < 6, 2918);switch (b | 0) {case 0:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 5 : 4;break;
            }case 2:
            {
              b = (c[a + 496 >> 2] | 0) == 2 ? 4 : 5;break;
            }default:
            {}}return T(g[a + 472 + (b << 2) >> 2]);
      }function Kd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = ib;d = c[a + 4 >> 2] | 0;if ((d | 0) == (c[b + 4 >> 2] | 0)) {
          if (!d) a = 1;else {
            e = T(g[a >> 2]);a = T(C(T(e - T(g[b >> 2])))) < T(.0000999999974);
          }
        } else a = 0;return a | 0;
      }function Ld(a, b) {
        a = T(a);b = T(b);var c = 0;if (Sb(a) | 0) c = Sb(b) | 0;else c = T(C(T(a - b))) < T(.0000999999974);return c | 0;
      }function Md(a, b) {
        a = a | 0;b = b | 0;Nd(a, b);return;
      }function Nd(b, d) {
        b = b | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e + 4 | 0;c[f >> 2] = 0;c[f + 4 >> 2] = 0;c[f + 8 >> 2] = 0;Ka(f | 0, b | 0, d | 0, 0);Vd(b, 3, (a[f + 11 >> 0] | 0) < 0 ? c[f >> 2] | 0 : f, e);tC(f);l = e;return;
      }function Od(a, b, c, d) {
        a = T(a);b = T(b);c = c | 0;d = d | 0;var e = ib;a = T(a * b);e = T(gC(a, T(1.0)));do if (!(Ld(e, T(0.0)) | 0)) {
          a = T(a - e);if (Ld(e, T(1.0)) | 0) {
            a = T(a + T(1.0));break;
          }if (c) {
            a = T(a + T(1.0));break;
          }if (!d) {
            if (e > T(.5)) e = T(1.0);else {
              d = Ld(e, T(.5)) | 0;e = d ? T(1.0) : T(0.0);
            }a = T(a + e);
          }
        } else a = T(a - e); while (0);return T(a / b);
      }function Pd(a, b, c, d, e, f, h, i, j, k, l, m, n) {
        a = a | 0;b = T(b);c = c | 0;d = T(d);e = e | 0;f = T(f);h = h | 0;i = T(i);j = T(j);k = T(k);l = T(l);m = T(m);n = n | 0;var o = 0,
            p = ib,
            q = ib,
            r = ib,
            s = ib,
            t = ib,
            u = ib;if (j < T(0.0) | k < T(0.0)) n = 0;else {
          if ((n | 0) != 0 ? (p = T(g[n + 4 >> 2]), p != T(0.0)) : 0) {
            r = T(Od(b, p, 0, 0));s = T(Od(d, p, 0, 0));q = T(Od(f, p, 0, 0));p = T(Od(i, p, 0, 0));
          } else {
            q = f;r = b;p = i;s = d;
          }if ((e | 0) == (a | 0)) o = Ld(q, r) | 0;else o = 0;if ((h | 0) == (c | 0)) n = Ld(p, s) | 0;else n = 0;if ((!o ? (t = T(b - l), !(Qd(a, t, j) | 0)) : 0) ? !(Rd(a, t, e, j) | 0) : 0) o = Sd(a, t, e, f, j) | 0;else o = 1;if ((!n ? (u = T(d - m), !(Qd(c, u, k) | 0)) : 0) ? !(Rd(c, u, h, k) | 0) : 0) n = Sd(c, u, h, i, k) | 0;else n = 1;n = o & n;
        }return n | 0;
      }function Qd(a, b, c) {
        a = a | 0;b = T(b);c = T(c);if ((a | 0) == 1) a = Ld(b, c) | 0;else a = 0;return a | 0;
      }function Rd(a, b, c, d) {
        a = a | 0;b = T(b);c = c | 0;d = T(d);if ((a | 0) == 2 & (c | 0) == 0) {
          if (!(b >= d)) a = Ld(b, d) | 0;else a = 1;
        } else a = 0;return a | 0;
      }function Sd(a, b, c, d, e) {
        a = a | 0;b = T(b);c = c | 0;d = T(d);e = T(e);if ((a | 0) == 2 & (c | 0) == 2 & d > b) {
          if (!(e <= b)) a = Ld(b, e) | 0;else a = 1;
        } else a = 0;return a | 0;
      }function Td(b, d, e, f, i, j, k, m, n, o, p) {
        b = b | 0;d = T(d);e = T(e);f = f | 0;i = i | 0;j = j | 0;k = T(k);m = T(m);n = n | 0;o = o | 0;p = p | 0;var q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = ib,
            v = ib,
            w = 0,
            x = 0,
            y = 0,
            z = 0,
            A = 0,
            B = 0,
            C = 0,
            D = 0,
            E = 0,
            F = 0,
            G = 0,
            H = ib,
            I = ib,
            J = ib,
            K = 0.0,
            L = 0.0;G = l;l = l + 160 | 0;D = G + 152 | 0;C = G + 120 | 0;B = G + 104 | 0;y = G + 72 | 0;t = G + 56 | 0;A = G + 8 | 0;x = G;z = (c[2279] | 0) + 1 | 0;c[2279] = z;E = b + 984 | 0;if ((a[E >> 0] | 0) != 0 ? (c[b + 512 >> 2] | 0) != (c[2278] | 0) : 0) w = 4;else if ((c[b + 516 >> 2] | 0) == (f | 0)) F = 0;else w = 4;if ((w | 0) == 4) {
          c[b + 520 >> 2] = 0;c[b + 924 >> 2] = -1;c[b + 928 >> 2] = -1;g[b + 932 >> 2] = T(-1.0);g[b + 936 >> 2] = T(-1.0);F = 1;
        }a: do if (!(c[b + 964 >> 2] | 0)) {
          if (n) {
            q = b + 916 | 0;if (!(Ld(T(g[q >> 2]), d) | 0)) {
              w = 21;break;
            }if (!(Ld(T(g[b + 920 >> 2]), e) | 0)) {
              w = 21;break;
            }if ((c[b + 924 >> 2] | 0) != (i | 0)) {
              w = 21;break;
            }q = (c[b + 928 >> 2] | 0) == (j | 0) ? q : 0;w = 22;break;
          }s = c[b + 520 >> 2] | 0;if (!s) w = 21;else {
            r = 0;while (1) {
              q = b + 524 + (r * 24 | 0) | 0;if (((Ld(T(g[q >> 2]), d) | 0 ? Ld(T(g[b + 524 + (r * 24 | 0) + 4 >> 2]), e) | 0 : 0) ? (c[b + 524 + (r * 24 | 0) + 8 >> 2] | 0) == (i | 0) : 0) ? (c[b + 524 + (r * 24 | 0) + 12 >> 2] | 0) == (j | 0) : 0) {
                w = 22;break a;
              }r = r + 1 | 0;if (r >>> 0 >= s >>> 0) {
                w = 21;break;
              }
            }
          }
        } else {
          u = T(Ud(b, 2, k));v = T(Ud(b, 0, k));q = b + 916 | 0;J = T(g[q >> 2]);I = T(g[b + 920 >> 2]);H = T(g[b + 932 >> 2]);if (!(Pd(i, d, j, e, c[b + 924 >> 2] | 0, J, c[b + 928 >> 2] | 0, I, H, T(g[b + 936 >> 2]), u, v, p) | 0)) {
            s = c[b + 520 >> 2] | 0;if (!s) w = 21;else {
              r = 0;while (1) {
                q = b + 524 + (r * 24 | 0) | 0;H = T(g[q >> 2]);I = T(g[b + 524 + (r * 24 | 0) + 4 >> 2]);J = T(g[b + 524 + (r * 24 | 0) + 16 >> 2]);if (Pd(i, d, j, e, c[b + 524 + (r * 24 | 0) + 8 >> 2] | 0, H, c[b + 524 + (r * 24 | 0) + 12 >> 2] | 0, I, J, T(g[b + 524 + (r * 24 | 0) + 20 >> 2]), u, v, p) | 0) {
                  w = 22;break a;
                }r = r + 1 | 0;if (r >>> 0 >= s >>> 0) {
                  w = 21;break;
                }
              }
            }
          } else w = 22;
        } while (0);do if ((w | 0) == 21) {
          if (!(a[11697] | 0)) {
            q = 0;w = 31;
          } else {
            q = 0;w = 28;
          }
        } else if ((w | 0) == 22) {
          r = (a[11697] | 0) != 0;if (!((q | 0) != 0 & (F ^ 1))) if (r) {
            w = 28;break;
          } else {
            w = 31;break;
          }t = q + 16 | 0;c[b + 908 >> 2] = c[t >> 2];s = q + 20 | 0;c[b + 912 >> 2] = c[s >> 2];if (!((a[11698] | 0) == 0 | r ^ 1)) {
            c[x >> 2] = Wd(z) | 0;c[x + 4 >> 2] = z;Vd(b, 4, 2972, x);r = c[b + 972 >> 2] | 0;if (r | 0) nb[r & 127](b);i = Xd(i, n) | 0;j = Xd(j, n) | 0;L = +T(g[t >> 2]);K = +T(g[s >> 2]);c[A >> 2] = i;c[A + 4 >> 2] = j;h[A + 8 >> 3] = +d;h[A + 16 >> 3] = +e;h[A + 24 >> 3] = L;h[A + 32 >> 3] = K;c[A + 40 >> 2] = o;Vd(b, 4, 2989, A);
          }
        } while (0);if ((w | 0) == 28) {
          r = Wd(z) | 0;c[t >> 2] = r;c[t + 4 >> 2] = z;c[t + 8 >> 2] = F ? 3047 : 11699;Vd(b, 4, 3038, t);r = c[b + 972 >> 2] | 0;if (r | 0) nb[r & 127](b);A = Xd(i, n) | 0;w = Xd(j, n) | 0;c[y >> 2] = A;c[y + 4 >> 2] = w;h[y + 8 >> 3] = +d;h[y + 16 >> 3] = +e;c[y + 24 >> 2] = o;Vd(b, 4, 3049, y);w = 31;
        }if ((w | 0) == 31) {
          Yd(b, d, e, f, i, j, k, m, n, p);if (a[11697] | 0) {
            r = c[2279] | 0;A = Wd(r) | 0;c[B >> 2] = A;c[B + 4 >> 2] = r;c[B + 8 >> 2] = F ? 3047 : 11699;Vd(b, 4, 3083, B);r = c[b + 972 >> 2] | 0;if (r | 0) nb[r & 127](b);A = Xd(i, n) | 0;B = Xd(j, n) | 0;K = +T(g[b + 908 >> 2]);L = +T(g[b + 912 >> 2]);c[C >> 2] = A;c[C + 4 >> 2] = B;h[C + 8 >> 3] = K;h[C + 16 >> 3] = L;c[C + 24 >> 2] = o;Vd(b, 4, 3092, C);
          }c[b + 516 >> 2] = f;if (!q) {
            r = b + 520 | 0;q = c[r >> 2] | 0;if ((q | 0) == 16) {
              if (a[11697] | 0) Vd(b, 4, 3124, D);c[r >> 2] = 0;q = 0;
            }if (n) q = b + 916 | 0;else {
              c[r >> 2] = q + 1;q = b + 524 + (q * 24 | 0) | 0;
            }g[q >> 2] = d;g[q + 4 >> 2] = e;c[q + 8 >> 2] = i;c[q + 12 >> 2] = j;c[q + 16 >> 2] = c[b + 908 >> 2];c[q + 20 >> 2] = c[b + 912 >> 2];q = 0;
          }
        }if (n) {
          c[b + 416 >> 2] = c[b + 908 >> 2];c[b + 420 >> 2] = c[b + 912 >> 2];a[b + 985 >> 0] = 1;a[E >> 0] = 0;
        }c[2279] = (c[2279] | 0) + -1;c[b + 512 >> 2] = c[2278];l = G;return F | (q | 0) == 0 | 0;
      }function Ud(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);var d = ib;d = T(me(a, b, c));return T(d + T(ne(a, b, c)));
      }function Vd(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;c[f >> 2] = e;if (!a) e = 0;else e = c[a + 976 >> 2] | 0;ge(e, a, b, d, f);l = g;return;
      }function Wd(a) {
        a = a | 0;return (a >>> 0 > 60 ? 3201 : 3201 + (60 - a) | 0) | 0;
      }function Xd(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 32 | 0;d = f + 12 | 0;e = f;c[d >> 2] = c[254];c[d + 4 >> 2] = c[255];c[d + 8 >> 2] = c[256];c[e >> 2] = c[257];c[e + 4 >> 2] = c[258];c[e + 8 >> 2] = c[259];if ((a | 0) > 2) a = 11699;else a = c[(b ? e : d) + (a << 2) >> 2] | 0;l = f;return a | 0;
      }function Yd(b, e, f, h, i, k, m, n, o, p) {
        b = b | 0;e = T(e);f = T(f);h = h | 0;i = i | 0;k = k | 0;m = T(m);n = T(n);o = o | 0;p = p | 0;var q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = ib,
            v = ib,
            w = ib,
            x = ib,
            y = ib,
            z = ib,
            A = ib,
            B = 0,
            C = 0,
            D = 0,
            E = ib,
            F = ib,
            G = 0,
            H = ib,
            I = 0,
            J = 0,
            K = 0,
            L = 0,
            M = 0,
            N = 0,
            O = 0,
            P = 0,
            Q = 0,
            R = 0,
            S = 0,
            U = 0,
            V = 0,
            W = 0,
            X = 0,
            Y = 0,
            Z = 0,
            _ = 0,
            $ = ib,
            aa = ib,
            ba = ib,
            ca = ib,
            da = ib,
            ea = 0,
            fa = 0,
            ga = 0,
            ha = 0,
            ia = 0,
            ja = ib,
            ka = ib,
            la = ib,
            ma = ib,
            na = ib,
            oa = ib,
            pa = 0,
            qa = ib,
            ra = ib,
            sa = ib,
            ta = ib,
            ua = ib,
            va = ib,
            wa = 0,
            xa = 0,
            ya = ib,
            za = ib,
            Aa = 0,
            Ba = 0,
            Ca = 0,
            Da = 0,
            Ea = ib,
            Fa = 0,
            Ga = 0,
            Ha = 0,
            Ia = 0,
            Ja = 0,
            Ka = 0,
            La = 0,
            Ma = ib,
            Na = 0,
            Oa = 0;La = l;l = l + 16 | 0;ea = La + 12 | 0;fa = La + 8 | 0;ga = La + 4 | 0;ha = La;ec(b, (i | 0) == 0 | (Sb(e) | 0) ^ 1, 3326);ec(b, (k | 0) == 0 | (Sb(f) | 0) ^ 1, 3406);Ga = qe(b, h) | 0;c[b + 496 >> 2] = Ga;Ja = re(2, Ga) | 0;Ka = re(0, Ga) | 0;g[b + 440 >> 2] = T(me(b, Ja, m));g[b + 444 >> 2] = T(ne(b, Ja, m));g[b + 428 >> 2] = T(me(b, Ka, m));g[b + 436 >> 2] = T(ne(b, Ka, m));g[b + 464 >> 2] = T(se(b, Ja));g[b + 468 >> 2] = T(te(b, Ja));g[b + 452 >> 2] = T(se(b, Ka));g[b + 460 >> 2] = T(te(b, Ka));g[b + 488 >> 2] = T(ue(b, Ja, m));g[b + 492 >> 2] = T(ve(b, Ja, m));g[b + 476 >> 2] = T(ue(b, Ka, m));g[b + 484 >> 2] = T(ve(b, Ka, m));do if (!(c[b + 964 >> 2] | 0)) {
          Ha = b + 948 | 0;Ia = (c[b + 952 >> 2] | 0) - (c[Ha >> 2] | 0) >> 2;if (!Ia) {
            xe(b, e, f, i, k, m, n);break;
          }if (!o ? ye(b, e, f, i, k, m, n) | 0 : 0) break;lc(b);Y = b + 508 | 0;a[Y >> 0] = 0;Ja = re(c[b + 4 >> 2] | 0, Ga) | 0;Ka = ze(Ja, Ga) | 0;Fa = oe(Ja) | 0;Z = c[b + 8 >> 2] | 0;Ba = b + 28 | 0;_ = (c[Ba >> 2] | 0) != 0;ua = Fa ? m : n;ya = Fa ? n : m;$ = T(Ae(b, Ja, m));aa = T(Be(b, Ja, m));u = T(Ae(b, Ka, m));va = T(Ce(b, Ja, m));za = T(Ce(b, Ka, m));D = Fa ? i : k;Aa = Fa ? k : i;Ea = Fa ? va : za;y = Fa ? za : va;ta = T(Ud(b, 2, m));x = T(Ud(b, 0, m));v = T(T(be(b + 364 | 0, m)) - Ea);w = T(T(be(b + 380 | 0, m)) - Ea);z = T(T(be(b + 372 | 0, n)) - y);A = T(T(be(b + 388 | 0, n)) - y);ba = Fa ? v : z;ca = Fa ? w : A;ta = T(e - ta);e = T(ta - Ea);if (Sb(e) | 0) Ea = e;else Ea = T(cC(T(eC(e, w)), v));ra = T(f - x);e = T(ra - y);if (Sb(e) | 0) sa = e;else sa = T(cC(T(eC(e, A)), z));v = Fa ? Ea : sa;qa = Fa ? sa : Ea;a: do if ((D | 0) == 1) {
            h = 0;r = 0;while (1) {
              q = ac(b, r) | 0;if (!h) {
                if (T(Ee(q)) > T(0.0) ? T(Fe(q)) > T(0.0) : 0) h = q;else h = 0;
              } else if (De(q) | 0) {
                t = 0;break a;
              }r = r + 1 | 0;if (r >>> 0 >= Ia >>> 0) {
                t = h;break;
              }
            }
          } else t = 0; while (0);B = t + 500 | 0;C = t + 504 | 0;h = 0;q = 0;e = T(0.0);s = 0;do {
            r = c[(c[Ha >> 2] | 0) + (s << 2) >> 2] | 0;if ((c[r + 36 >> 2] | 0) == 1) {
              Ge(r);a[r + 985 >> 0] = 1;a[r + 984 >> 0] = 0;
            } else {
              $d(r);if (o) ce(r, qe(r, Ga) | 0, v, qa, Ea);do if ((c[r + 24 >> 2] | 0) != 1) {
                if ((r | 0) == (t | 0)) {
                  c[B >> 2] = c[2278];g[C >> 2] = T(0.0);break;
                } else {
                  He(b, r, Ea, i, sa, Ea, sa, k, Ga, p);break;
                }
              } else {
                if (q | 0) c[q + 960 >> 2] = r;c[r + 960 >> 2] = 0;q = r;h = (h | 0) == 0 ? r : h;
              } while (0);oa = T(g[r + 504 >> 2]);e = T(e + T(oa + T(Ud(r, Ja, Ea))));
            }s = s + 1 | 0;
          } while ((s | 0) != (Ia | 0));K = e > v;pa = _ & ((D | 0) == 2 & K) ? 1 : D;I = (Aa | 0) == 1;M = I & (o ^ 1);N = (pa | 0) == 1;O = (pa | 0) == 2;P = 976 + (Ja << 2) | 0;Q = (Aa | 2 | 0) == 2;W = I & (_ ^ 1);R = 1040 + (Ka << 2) | 0;S = 1040 + (Ja << 2) | 0;U = 976 + (Ka << 2) | 0;V = (Aa | 0) != 1;K = _ & ((D | 0) != 0 & K);J = b + 976 | 0;I = I ^ 1;e = v;G = 0;L = 0;oa = T(0.0);da = T(0.0);while (1) {
            b: do if (G >>> 0 < Ia >>> 0) {
              C = c[Ha >> 2] | 0;s = 0;A = T(0.0);z = T(0.0);w = T(0.0);v = T(0.0);r = 0;q = 0;t = G;while (1) {
                B = c[C + (t << 2) >> 2] | 0;if ((c[B + 36 >> 2] | 0) != 1 ? (c[B + 940 >> 2] = L, (c[B + 24 >> 2] | 0) != 1) : 0) {
                  x = T(Ud(B, Ja, Ea));X = c[P >> 2] | 0;f = T(be(B + 380 + (X << 3) | 0, ua));y = T(g[B + 504 >> 2]);f = T(eC(f, y));f = T(cC(T(be(B + 364 + (X << 3) | 0, ua)), f));if (_ & (s | 0) != 0 & T(x + T(z + f)) > e) {
                    k = s;x = A;D = t;break b;
                  }x = T(x + f);f = T(z + x);x = T(A + x);if (De(B) | 0) {
                    w = T(w + T(Ee(B)));v = T(v - T(y * T(Fe(B))));
                  }if (q | 0) c[q + 960 >> 2] = B;c[B + 960 >> 2] = 0;s = s + 1 | 0;q = B;r = (r | 0) == 0 ? B : r;
                } else {
                  x = A;f = z;
                }t = t + 1 | 0;if (t >>> 0 < Ia >>> 0) {
                  A = x;z = f;
                } else {
                  k = s;D = t;break;
                }
              }
            } else {
              k = 0;x = T(0.0);w = T(0.0);v = T(0.0);r = 0;D = G;
            } while (0);X = w > T(0.0) & w < T(1.0);E = X ? T(1.0) : w;X = v > T(0.0) & v < T(1.0);A = X ? T(1.0) : v;do if (!N) {
              if (!(x < ba & ((Sb(ba) | 0) ^ 1))) {
                if (!(x > ca & ((Sb(ca) | 0) ^ 1))) {
                  if (!(a[(c[J >> 2] | 0) + 3 >> 0] | 0)) {
                    if (!(E == T(0.0)) ? !(T(Ee(b)) == T(0.0)) : 0) {
                      X = 53;break;
                    }e = x;X = 53;
                  } else X = 51;
                } else {
                  e = ca;X = 51;
                }
              } else {
                e = ba;X = 51;
              }
            } else X = 51; while (0);if ((X | 0) == 51) {
              X = 0;if (Sb(e) | 0) X = 53;else {
                F = T(e - x);H = e;
              }
            }if ((X | 0) == 53) {
              X = 0;if (x < T(0.0)) {
                F = T(-x);H = e;
              } else {
                F = T(0.0);H = e;
              }
            }if (!M ? (ia = (r | 0) == 0, !ia) : 0) {
              s = c[P >> 2] | 0;t = F < T(0.0);y = T(F / A);B = F > T(0.0);z = T(F / E);w = T(0.0);x = T(0.0);e = T(0.0);q = r;do {
                f = T(be(q + 380 + (s << 3) | 0, ua));v = T(be(q + 364 + (s << 3) | 0, ua));v = T(eC(f, T(cC(v, T(g[q + 504 >> 2])))));if (t) {
                  f = T(v * T(Fe(q)));if (f != T(-0.0) ? (Ma = T(v - T(y * f)), ja = T(Ie(q, Ja, Ma, H, Ea)), Ma != ja) : 0) {
                    w = T(w - T(ja - v));e = T(e + f);
                  }
                } else if ((B ? (ka = T(Ee(q)), ka != T(0.0)) : 0) ? (Ma = T(v + T(z * ka)), la = T(Ie(q, Ja, Ma, H, Ea)), Ma != la) : 0) {
                  w = T(w - T(la - v));x = T(x - ka);
                }q = c[q + 960 >> 2] | 0;
              } while ((q | 0) != 0);e = T(A + e);v = T(F + w);if (!ia) {
                y = T(E + x);t = c[P >> 2] | 0;B = v < T(0.0);C = e == T(0.0);z = T(v / e);s = v > T(0.0);y = T(v / y);e = T(0.0);do {
                  Ma = T(be(r + 380 + (t << 3) | 0, ua));w = T(be(r + 364 + (t << 3) | 0, ua));w = T(eC(Ma, T(cC(w, T(g[r + 504 >> 2])))));if (B) {
                    Ma = T(w * T(Fe(r)));v = T(-Ma);if (Ma != T(-0.0)) {
                      Ma = T(z * v);v = T(Ie(r, Ja, T(w + (C ? v : Ma)), H, Ea));
                    } else v = w;
                  } else if (s ? (ma = T(Ee(r)), ma != T(0.0)) : 0) v = T(Ie(r, Ja, T(w + T(y * ma)), H, Ea));else v = w;e = T(e - T(v - w));x = T(Ud(r, Ja, Ea));f = T(Ud(r, Ka, Ea));v = T(v + x);g[fa >> 2] = v;c[ha >> 2] = 1;w = T(g[r + 396 >> 2]);c: do if (Sb(w) | 0) {
                    q = Sb(qa) | 0;do if (!q) {
                      if (K | (ae(r, Ka, qa) | 0 | I)) break;if ((Je(b, r) | 0) != 4) break;if ((c[(Ke(r, Ka) | 0) + 4 >> 2] | 0) == 3) break;if ((c[(Le(r, Ka) | 0) + 4 >> 2] | 0) == 3) break;g[ea >> 2] = qa;c[ga >> 2] = 1;break c;
                    } while (0);if (ae(r, Ka, qa) | 0) {
                      q = c[r + 992 + (c[U >> 2] << 2) >> 2] | 0;Ma = T(f + T(be(q, qa)));g[ea >> 2] = Ma;q = V & (c[q + 4 >> 2] | 0) == 2;c[ga >> 2] = ((Sb(Ma) | 0 | q) ^ 1) & 1;break;
                    } else {
                      g[ea >> 2] = qa;c[ga >> 2] = q ? 0 : 2;break;
                    }
                  } else {
                    Ma = T(v - x);E = T(Ma / w);Ma = T(w * Ma);c[ga >> 2] = 1;g[ea >> 2] = T(f + (Fa ? E : Ma));
                  } while (0);Me(r, Ja, H, Ea, ha, fa);Me(r, Ka, qa, Ea, ga, ea);do if (!(ae(r, Ka, qa) | 0) ? (Je(b, r) | 0) == 4 : 0) {
                    if ((c[(Ke(r, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      q = 0;break;
                    }q = (c[(Le(r, Ka) | 0) + 4 >> 2] | 0) != 3;
                  } else q = 0; while (0);Ma = T(g[fa >> 2]);E = T(g[ea >> 2]);Na = c[ha >> 2] | 0;Oa = c[ga >> 2] | 0;Td(r, Fa ? Ma : E, Fa ? E : Ma, Ga, Fa ? Na : Oa, Fa ? Oa : Na, Ea, sa, o & (q ^ 1), 3488, p) | 0;a[Y >> 0] = a[Y >> 0] | a[r + 508 >> 0];r = c[r + 960 >> 2] | 0;
                } while ((r | 0) != 0);
              } else e = T(0.0);
            } else e = T(0.0);e = T(F + e);Oa = e < T(0.0) & 1;a[Y >> 0] = Oa | d[Y >> 0];if (O & e > T(0.0)) {
              q = c[P >> 2] | 0;if ((c[b + 364 + (q << 3) + 4 >> 2] | 0) != 0 ? (na = T(be(b + 364 + (q << 3) | 0, ua)), na >= T(0.0)) : 0) v = T(cC(T(0.0), T(na - T(H - e))));else v = T(0.0);
            } else v = e;B = G >>> 0 < D >>> 0;if (B) {
              t = c[Ha >> 2] | 0;s = G;q = 0;do {
                r = c[t + (s << 2) >> 2] | 0;if (!(c[r + 24 >> 2] | 0)) {
                  q = ((c[(Ke(r, Ja) | 0) + 4 >> 2] | 0) == 3 & 1) + q | 0;q = q + ((c[(Le(r, Ja) | 0) + 4 >> 2] | 0) == 3 & 1) | 0;
                }s = s + 1 | 0;
              } while ((s | 0) != (D | 0));if (q) {
                x = T(0.0);f = T(0.0);
              } else X = 101;
            } else X = 101;d: do if ((X | 0) == 101) {
              X = 0;switch (Z | 0) {case 1:
                  {
                    q = 0;x = T(v * T(.5));f = T(0.0);break d;
                  }case 2:
                  {
                    q = 0;x = v;f = T(0.0);break d;
                  }case 3:
                  {
                    if (k >>> 0 <= 1) {
                      q = 0;x = T(0.0);f = T(0.0);break d;
                    }f = T((k + -1 | 0) >>> 0);q = 0;x = T(0.0);f = T(T(cC(v, T(0.0))) / f);break d;
                  }case 5:
                  {
                    f = T(v / T((k + 1 | 0) >>> 0));q = 0;x = f;break d;
                  }case 4:
                  {
                    f = T(v / T(k >>> 0));q = 0;x = T(f * T(.5));break d;
                  }default:
                  {
                    q = 0;x = T(0.0);f = T(0.0);break d;
                  }}
            } while (0);e = T($ + x);if (B) {
              w = T(v / T(q | 0));s = c[Ha >> 2] | 0;r = G;v = T(0.0);do {
                q = c[s + (r << 2) >> 2] | 0;e: do if ((c[q + 36 >> 2] | 0) != 1) {
                  switch (c[q + 24 >> 2] | 0) {case 1:
                      {
                        if (Ne(q, Ja) | 0) {
                          if (!o) break e;Ma = T(Oe(q, Ja, H));Ma = T(Ma + T(se(b, Ja)));Ma = T(Ma + T(me(q, Ja, Ea)));g[q + 400 + (c[S >> 2] << 2) >> 2] = Ma;break e;
                        }break;
                      }case 0:
                      {
                        Oa = (c[(Ke(q, Ja) | 0) + 4 >> 2] | 0) == 3;Ma = T(w + e);e = Oa ? Ma : e;if (o) {
                          Oa = q + 400 + (c[S >> 2] << 2) | 0;g[Oa >> 2] = T(e + T(g[Oa >> 2]));
                        }Oa = (c[(Le(q, Ja) | 0) + 4 >> 2] | 0) == 3;Ma = T(w + e);e = Oa ? Ma : e;if (M) {
                          Ma = T(f + T(Ud(q, Ja, Ea)));v = qa;e = T(e + T(Ma + T(g[q + 504 >> 2])));break e;
                        } else {
                          e = T(e + T(f + T(Pe(q, Ja, Ea))));v = T(cC(v, T(Pe(q, Ka, Ea))));break e;
                        }
                      }default:
                      {}}if (o) {
                    Ma = T(x + T(se(b, Ja)));Oa = q + 400 + (c[S >> 2] << 2) | 0;g[Oa >> 2] = T(Ma + T(g[Oa >> 2]));
                  }
                } while (0);r = r + 1 | 0;
              } while ((r | 0) != (D | 0));
            } else v = T(0.0);f = T(aa + e);if (Q) x = T(T(Ie(b, Ka, T(za + v), ya, m)) - za);else x = qa;w = T(T(Ie(b, Ka, T(za + (W ? qa : v)), ya, m)) - za);if (B & o) {
              r = G;do {
                s = c[(c[Ha >> 2] | 0) + (r << 2) >> 2] | 0;do if ((c[s + 36 >> 2] | 0) != 1) {
                  if ((c[s + 24 >> 2] | 0) == 1) {
                    if (Ne(s, Ka) | 0) {
                      Ma = T(Oe(s, Ka, qa));Ma = T(Ma + T(se(b, Ka)));Ma = T(Ma + T(me(s, Ka, Ea)));q = c[R >> 2] | 0;g[s + 400 + (q << 2) >> 2] = Ma;if (!(Sb(Ma) | 0)) break;
                    } else q = c[R >> 2] | 0;Ma = T(se(b, Ka));g[s + 400 + (q << 2) >> 2] = T(Ma + T(me(s, Ka, Ea)));break;
                  }q = Je(b, s) | 0;do if ((q | 0) == 4) {
                    if ((c[(Ke(s, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      X = 139;break;
                    }if ((c[(Le(s, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      X = 139;break;
                    }if (ae(s, Ka, qa) | 0) {
                      e = u;break;
                    }Na = c[s + 908 + (c[P >> 2] << 2) >> 2] | 0;c[ea >> 2] = Na;e = T(g[s + 396 >> 2]);Oa = Sb(e) | 0;v = (c[j >> 2] = Na, T(g[j >> 2]));if (Oa) e = w;else {
                      F = T(Ud(s, Ka, Ea));Ma = T(v / e);e = T(e * v);e = T(F + (Fa ? Ma : e));
                    }g[fa >> 2] = e;g[ea >> 2] = T(T(Ud(s, Ja, Ea)) + v);c[ga >> 2] = 1;c[ha >> 2] = 1;Me(s, Ja, H, Ea, ga, ea);Me(s, Ka, qa, Ea, ha, fa);e = T(g[ea >> 2]);F = T(g[fa >> 2]);Ma = Fa ? e : F;e = Fa ? F : e;Oa = ((Sb(Ma) | 0) ^ 1) & 1;Td(s, Ma, e, Ga, Oa, ((Sb(e) | 0) ^ 1) & 1, Ea, sa, 1, 3493, p) | 0;e = u;
                  } else X = 139; while (0);f: do if ((X | 0) == 139) {
                    X = 0;e = T(x - T(Pe(s, Ka, Ea)));do if ((c[(Ke(s, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      if ((c[(Le(s, Ka) | 0) + 4 >> 2] | 0) != 3) break;e = T(u + T(cC(T(0.0), T(e * T(.5)))));break f;
                    } while (0);if ((c[(Le(s, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      e = u;break;
                    }if ((c[(Ke(s, Ka) | 0) + 4 >> 2] | 0) == 3) {
                      e = T(u + T(cC(T(0.0), e)));break;
                    }switch (q | 0) {case 1:
                        {
                          e = u;break f;
                        }case 2:
                        {
                          e = T(u + T(e * T(.5)));break f;
                        }default:
                        {
                          e = T(u + e);break f;
                        }}
                  } while (0);Ma = T(oa + e);Oa = s + 400 + (c[R >> 2] << 2) | 0;g[Oa >> 2] = T(Ma + T(g[Oa >> 2]));
                } while (0);r = r + 1 | 0;
              } while ((r | 0) != (D | 0));
            }oa = T(oa + w);da = T(cC(da, f));k = L + 1 | 0;if (D >>> 0 >= Ia >>> 0) break;else {
              e = H;G = D;L = k;
            }
          }do if (o) {
            q = k >>> 0 > 1;if (!q ? !(Qe(b) | 0) : 0) break;if (!(Sb(qa) | 0)) {
              e = T(qa - oa);g: do switch (c[b + 12 >> 2] | 0) {case 3:
                  {
                    u = T(u + e);z = T(0.0);break;
                  }case 2:
                  {
                    u = T(u + T(e * T(.5)));z = T(0.0);break;
                  }case 4:
                  {
                    if (qa > oa) z = T(e / T(k >>> 0));else z = T(0.0);break;
                  }case 7:
                  if (qa > oa) {
                    u = T(u + T(e / T(k << 1 >>> 0)));z = T(e / T(k >>> 0));z = q ? z : T(0.0);break g;
                  } else {
                    u = T(u + T(e * T(.5)));z = T(0.0);break g;
                  }case 6:
                  {
                    z = T(e / T(L >>> 0));z = qa > oa & q ? z : T(0.0);break;
                  }default:
                  z = T(0.0);} while (0);if (k | 0) {
                B = 1040 + (Ka << 2) | 0;C = 976 + (Ka << 2) | 0;t = 0;r = 0;while (1) {
                  h: do if (r >>> 0 < Ia >>> 0) {
                    v = T(0.0);w = T(0.0);e = T(0.0);s = r;while (1) {
                      q = c[(c[Ha >> 2] | 0) + (s << 2) >> 2] | 0;do if ((c[q + 36 >> 2] | 0) != 1 ? (c[q + 24 >> 2] | 0) == 0 : 0) {
                        if ((c[q + 940 >> 2] | 0) != (t | 0)) break h;if (Re(q, Ka) | 0) {
                          Ma = T(g[q + 908 + (c[C >> 2] << 2) >> 2]);e = T(cC(e, T(Ma + T(Ud(q, Ka, Ea)))));
                        }if ((Je(b, q) | 0) != 5) break;na = T(Se(q));na = T(na + T(me(q, 0, Ea)));Ma = T(g[q + 912 >> 2]);Ma = T(T(Ma + T(Ud(q, 0, Ea))) - na);na = T(cC(w, na));Ma = T(cC(v, Ma));v = Ma;w = na;e = T(cC(e, T(na + Ma)));
                      } while (0);q = s + 1 | 0;if (q >>> 0 < Ia >>> 0) s = q;else {
                        s = q;break;
                      }
                    }
                  } else {
                    w = T(0.0);e = T(0.0);s = r;
                  } while (0);y = T(z + e);f = u;u = T(u + y);if (r >>> 0 < s >>> 0) {
                    x = T(f + w);q = r;do {
                      r = c[(c[Ha >> 2] | 0) + (q << 2) >> 2] | 0;i: do if ((c[r + 36 >> 2] | 0) != 1 ? (c[r + 24 >> 2] | 0) == 0 : 0) switch (Je(b, r) | 0) {case 1:
                          {
                            Ma = T(f + T(me(r, Ka, Ea)));g[r + 400 + (c[B >> 2] << 2) >> 2] = Ma;break i;
                          }case 3:
                          {
                            Ma = T(T(u - T(ne(r, Ka, Ea))) - T(g[r + 908 + (c[C >> 2] << 2) >> 2]));g[r + 400 + (c[B >> 2] << 2) >> 2] = Ma;break i;
                          }case 2:
                          {
                            Ma = T(f + T(T(y - T(g[r + 908 + (c[C >> 2] << 2) >> 2])) * T(.5)));g[r + 400 + (c[B >> 2] << 2) >> 2] = Ma;break i;
                          }case 4:
                          {
                            Ma = T(f + T(me(r, Ka, Ea)));g[r + 400 + (c[B >> 2] << 2) >> 2] = Ma;if (ae(r, Ka, qa) | 0) break i;if (Fa) {
                              v = T(g[r + 908 >> 2]);e = T(v + T(Ud(r, Ja, Ea)));w = y;
                            } else {
                              w = T(g[r + 912 >> 2]);w = T(w + T(Ud(r, Ka, Ea)));e = y;v = T(g[r + 908 >> 2]);
                            }if (Ld(e, v) | 0 ? Ld(w, T(g[r + 912 >> 2])) | 0 : 0) break i;Td(r, e, w, Ga, 1, 1, Ea, sa, 1, 3501, p) | 0;break i;
                          }case 5:
                          {
                            g[r + 404 >> 2] = T(T(x - T(Se(r))) + T(Oe(r, 0, qa)));break i;
                          }default:
                          break i;} while (0);q = q + 1 | 0;
                    } while ((q | 0) != (s | 0));
                  }t = t + 1 | 0;if ((t | 0) == (k | 0)) break;else r = s;
                }
              }
            }
          } while (0);g[b + 908 >> 2] = T(Ie(b, 2, ta, m, m));g[b + 912 >> 2] = T(Ie(b, 0, ra, n, m));if ((pa | 0) != 0 ? (wa = c[b + 32 >> 2] | 0, xa = (pa | 0) == 2, !(xa & (wa | 0) != 2)) : 0) {
            if (xa & (wa | 0) == 2) {
              e = T(va + H);e = T(cC(T(eC(e, T(Te(b, Ja, da, ua)))), va));X = 198;
            }
          } else {
            e = T(Ie(b, Ja, da, ua, m));X = 198;
          }if ((X | 0) == 198) g[b + 908 + (c[976 + (Ja << 2) >> 2] << 2) >> 2] = e;if ((Aa | 0) != 0 ? (Ca = c[b + 32 >> 2] | 0, Da = (Aa | 0) == 2, !(Da & (Ca | 0) != 2)) : 0) {
            if (Da & (Ca | 0) == 2) {
              e = T(za + qa);e = T(cC(T(eC(e, T(Te(b, Ka, T(za + oa), ya)))), za));X = 204;
            }
          } else {
            e = T(Ie(b, Ka, T(za + oa), ya, m));X = 204;
          }if ((X | 0) == 204) g[b + 908 + (c[976 + (Ka << 2) >> 2] << 2) >> 2] = e;if (o) {
            if ((c[Ba >> 2] | 0) == 2) {
              r = 976 + (Ka << 2) | 0;s = 1040 + (Ka << 2) | 0;q = 0;do {
                t = ac(b, q) | 0;if (!(c[t + 24 >> 2] | 0)) {
                  Na = c[r >> 2] | 0;Ma = T(g[b + 908 + (Na << 2) >> 2]);Oa = t + 400 + (c[s >> 2] << 2) | 0;Ma = T(Ma - T(g[Oa >> 2]));g[Oa >> 2] = T(Ma - T(g[t + 908 + (Na << 2) >> 2]));
                }q = q + 1 | 0;
              } while ((q | 0) != (Ia | 0));
            }if (h | 0) {
              q = Fa ? pa : i;do {
                Ue(b, h, Ea, q, sa, Ga, p);h = c[h + 960 >> 2] | 0;
              } while ((h | 0) != 0);
            }q = (Ja | 2 | 0) == 3;r = (Ka | 2 | 0) == 3;if (q | r) {
              h = 0;do {
                s = c[(c[Ha >> 2] | 0) + (h << 2) >> 2] | 0;if ((c[s + 36 >> 2] | 0) != 1) {
                  if (q) Ve(b, s, Ja);if (r) Ve(b, s, Ka);
                }h = h + 1 | 0;
              } while ((h | 0) != (Ia | 0));
            }
          }
        } else we(b, e, f, i, k, m, n); while (0);l = La;return;
      }function Zd(a, b) {
        a = a | 0;b = T(b);var c = 0;Vb(a, b >= T(0.0), 3147);c = b == T(0.0);g[a + 4 >> 2] = c ? T(0.0) : b;return;
      }function _d(b, d, e, f) {
        b = b | 0;d = T(d);e = T(e);f = f | 0;var h = ib,
            i = ib,
            j = 0,
            k = 0,
            l = 0;c[2278] = (c[2278] | 0) + 1;$d(b);if (!(ae(b, 2, d) | 0)) {
          h = T(be(b + 380 | 0, d));if (!(h >= T(0.0))) {
            l = ((Sb(d) | 0) ^ 1) & 1;h = d;
          } else l = 2;
        } else {
          h = T(be(c[b + 992 >> 2] | 0, d));l = 1;h = T(h + T(Ud(b, 2, d)));
        }if (!(ae(b, 0, e) | 0)) {
          i = T(be(b + 388 | 0, e));if (!(i >= T(0.0))) {
            k = ((Sb(e) | 0) ^ 1) & 1;i = e;
          } else k = 2;
        } else {
          i = T(be(c[b + 996 >> 2] | 0, e));k = 1;i = T(i + T(Ud(b, 0, d)));
        }j = b + 976 | 0;if (Td(b, h, i, f, l, k, d, e, 1, 3189, c[j >> 2] | 0) | 0 ? (ce(b, c[b + 496 >> 2] | 0, d, e, d), de(b, T(g[(c[j >> 2] | 0) + 4 >> 2]), T(0.0), T(0.0)), a[11696] | 0) : 0) Md(b, 7);return;
      }function $d(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;h = i + 24 | 0;g = i + 16 | 0;e = i + 8 | 0;f = i;d = 0;do {
          b = a + 380 + (d << 3) | 0;if (!((c[a + 380 + (d << 3) + 4 >> 2] | 0) != 0 ? (j = b, k = c[j + 4 >> 2] | 0, m = e, c[m >> 2] = c[j >> 2], c[m + 4 >> 2] = k, m = a + 364 + (d << 3) | 0, k = c[m + 4 >> 2] | 0, j = f, c[j >> 2] = c[m >> 2], c[j + 4 >> 2] = k, c[g >> 2] = c[e >> 2], c[g + 4 >> 2] = c[e + 4 >> 2], c[h >> 2] = c[f >> 2], c[h + 4 >> 2] = c[f + 4 >> 2], Kd(g, h) | 0) : 0)) b = a + 348 + (d << 3) | 0;c[a + 992 + (d << 2) >> 2] = b;d = d + 1 | 0;
        } while ((d | 0) != 2);l = i;return;
      }function ae(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0;a = c[a + 992 + (c[976 + (b << 2) >> 2] << 2) >> 2] | 0;switch (c[a + 4 >> 2] | 0) {case 0:case 3:
            {
              a = 0;break;
            }case 1:
            {
              if (T(g[a >> 2]) < T(0.0)) a = 0;else e = 5;break;
            }case 2:
            {
              if (T(g[a >> 2]) < T(0.0)) a = 0;else a = (Sb(d) | 0) ^ 1;break;
            }default:
            e = 5;}if ((e | 0) == 5) a = 1;return a | 0;
      }function be(a, b) {
        a = a | 0;b = T(b);switch (c[a + 4 >> 2] | 0) {case 2:
            {
              b = T(T(T(g[a >> 2]) * b) / T(100.0));break;
            }case 1:
            {
              b = T(g[a >> 2]);break;
            }default:
            b = T(t);}return T(b);
      }function ce(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = T(d);e = T(e);f = T(f);var h = 0,
            i = ib;b = c[a + 944 >> 2] | 0 ? b : 1;h = re(c[a + 4 >> 2] | 0, b) | 0;b = ze(h, b) | 0;d = T($e(a, h, d));e = T($e(a, b, e));i = T(d + T(me(a, h, f)));g[a + 400 + (c[1040 + (h << 2) >> 2] << 2) >> 2] = i;d = T(d + T(ne(a, h, f)));g[a + 400 + (c[1e3 + (h << 2) >> 2] << 2) >> 2] = d;d = T(e + T(me(a, b, f)));g[a + 400 + (c[1040 + (b << 2) >> 2] << 2) >> 2] = d;f = T(e + T(ne(a, b, f)));g[a + 400 + (c[1e3 + (b << 2) >> 2] << 2) >> 2] = f;return;
      }function de(a, b, d, e) {
        a = a | 0;b = T(b);d = T(d);e = T(e);var f = 0,
            h = 0,
            i = ib,
            j = ib,
            k = 0,
            l = 0,
            m = ib,
            n = 0,
            o = ib,
            p = ib,
            q = ib,
            r = ib;if (!(b == T(0.0))) {
          f = a + 400 | 0;r = T(g[f >> 2]);h = a + 404 | 0;q = T(g[h >> 2]);n = a + 416 | 0;p = T(g[n >> 2]);l = a + 420 | 0;i = T(g[l >> 2]);o = T(r + d);m = T(q + e);e = T(o + p);j = T(m + i);k = (c[a + 988 >> 2] | 0) == 1;g[f >> 2] = T(Od(r, b, 0, k));g[h >> 2] = T(Od(q, b, 0, k));d = T(gC(T(p * b), T(1.0)));if (Ld(d, T(0.0)) | 0) h = 0;else h = (Ld(d, T(1.0)) | 0) ^ 1;d = T(gC(T(i * b), T(1.0)));if (Ld(d, T(0.0)) | 0) f = 0;else f = (Ld(d, T(1.0)) | 0) ^ 1;r = T(Od(e, b, k & h, k & (h ^ 1)));g[n >> 2] = T(r - T(Od(o, b, 0, k)));r = T(Od(j, b, k & f, k & (f ^ 1)));g[l >> 2] = T(r - T(Od(m, b, 0, k)));h = (c[a + 952 >> 2] | 0) - (c[a + 948 >> 2] | 0) >> 2;if (h | 0) {
            f = 0;do {
              de(ac(a, f) | 0, b, o, m);f = f + 1 | 0;
            } while ((f | 0) != (h | 0));
          }
        }return;
      }function ee(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;switch (d | 0) {case 5:case 0:
            {
              a = CB(c[489] | 0, e, f) | 0;break;
            }default:
            a = iC(e, f) | 0;}return a | 0;
      }function fe(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;f = l;l = l + 16 | 0;g = f;c[g >> 2] = e;ge(a, 0, b, d, g);l = f;return;
      }function ge(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;a = a | 0 ? a : 956;Bb[c[a + 8 >> 2] & 1](a, b, d, e, f) | 0;if ((d | 0) == 5) Ta();else return;
      }function he(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;a[b + c >> 0] = d & 1;return;
      }function ie(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;c[a >> 2] = 0;c[a + 4 >> 2] = 0;c[a + 8 >> 2] = 0;d = b + 4 | 0;e = (c[d >> 2] | 0) - (c[b >> 2] | 0) >> 2;if (e | 0) {
          je(a, e);ke(a, c[b >> 2] | 0, c[d >> 2] | 0, e);
        }return;
      }function je(a, b) {
        a = a | 0;b = b | 0;var d = 0;if ((le(a) | 0) >>> 0 < b >>> 0) jC(a);if (b >>> 0 > 1073741823) Ta();else {
          d = qC(b << 2) | 0;c[a + 4 >> 2] = d;c[a >> 2] = d;c[a + 8 >> 2] = d + (b << 2);return;
        }
      }function ke(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;e = a + 4 | 0;a = d - b | 0;if ((a | 0) > 0) {
          BC(c[e >> 2] | 0, b | 0, a | 0) | 0;c[e >> 2] = (c[e >> 2] | 0) + (a >>> 2 << 2);
        }return;
      }function le(a) {
        a = a | 0;return 1073741823;
      }function me(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);if (oe(b) | 0 ? (c[a + 96 >> 2] | 0) != 0 : 0) a = a + 92 | 0;else a = Tb(a + 60 | 0, c[1040 + (b << 2) >> 2] | 0, 992) | 0;return T(pe(a, d));
      }function ne(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);if (oe(b) | 0 ? (c[a + 104 >> 2] | 0) != 0 : 0) a = a + 100 | 0;else a = Tb(a + 60 | 0, c[1e3 + (b << 2) >> 2] | 0, 992) | 0;return T(pe(a, d));
      }function oe(a) {
        a = a | 0;return (a | 1 | 0) == 3 | 0;
      }function pe(a, b) {
        a = a | 0;b = T(b);if ((c[a + 4 >> 2] | 0) == 3) b = T(0.0);else b = T(be(a, b));return T(b);
      }function qe(a, b) {
        a = a | 0;b = b | 0;a = c[a >> 2] | 0;return ((a | 0) == 0 ? (b | 0) > 1 ? b : 1 : a) | 0;
      }function re(a, b) {
        a = a | 0;b = b | 0;var c = 0;a: do if ((b | 0) == 2) {
          switch (a | 0) {case 2:
              {
                a = 3;break a;
              }case 3:
              break;default:
              {
                c = 4;break a;
              }}a = 2;
        } else c = 4; while (0);return a | 0;
      }function se(a, b) {
        a = a | 0;b = b | 0;var d = ib;if (!((oe(b) | 0 ? (c[a + 312 >> 2] | 0) != 0 : 0) ? (d = T(g[a + 308 >> 2]), d >= T(0.0)) : 0)) d = T(cC(T(g[(Tb(a + 276 | 0, c[1040 + (b << 2) >> 2] | 0, 992) | 0) >> 2]), T(0.0)));return T(d);
      }function te(a, b) {
        a = a | 0;b = b | 0;var d = ib;if (!((oe(b) | 0 ? (c[a + 320 >> 2] | 0) != 0 : 0) ? (d = T(g[a + 316 >> 2]), d >= T(0.0)) : 0)) d = T(cC(T(g[(Tb(a + 276 | 0, c[1e3 + (b << 2) >> 2] | 0, 992) | 0) >> 2]), T(0.0)));return T(d);
      }function ue(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = ib;if (!((oe(b) | 0 ? (c[a + 240 >> 2] | 0) != 0 : 0) ? (e = T(be(a + 236 | 0, d)), e >= T(0.0)) : 0)) e = T(cC(T(be(Tb(a + 204 | 0, c[1040 + (b << 2) >> 2] | 0, 992) | 0, d)), T(0.0)));return T(e);
      }function ve(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = ib;if (!((oe(b) | 0 ? (c[a + 248 >> 2] | 0) != 0 : 0) ? (e = T(be(a + 244 | 0, d)), e >= T(0.0)) : 0)) e = T(cC(T(be(Tb(a + 204 | 0, c[1e3 + (b << 2) >> 2] | 0, 992) | 0, d)), T(0.0)));return T(e);
      }function we(a, b, d, e, f, h, i) {
        a = a | 0;b = T(b);d = T(d);e = e | 0;f = f | 0;h = T(h);i = T(i);var j = ib,
            k = ib,
            m = ib,
            n = ib,
            o = ib,
            p = ib,
            q = 0,
            r = 0,
            s = 0;s = l;l = l + 16 | 0;q = s;r = a + 964 | 0;ec(a, (c[r >> 2] | 0) != 0, 3519);j = T(Ce(a, 2, b));k = T(Ce(a, 0, b));m = T(Ud(a, 2, b));n = T(Ud(a, 0, b));if (Sb(b) | 0) o = b;else o = T(cC(T(0.0), T(T(b - m) - j)));if (Sb(d) | 0) p = d;else p = T(cC(T(0.0), T(T(d - n) - k)));if ((e | 0) == 1 & (f | 0) == 1) {
          g[a + 908 >> 2] = T(Ie(a, 2, T(b - m), h, h));b = T(Ie(a, 0, T(d - n), i, h));
        } else {
          Db[c[r >> 2] & 1](q, a, o, e, p, f);o = T(j + T(g[q >> 2]));p = T(b - m);g[a + 908 >> 2] = T(Ie(a, 2, (e | 2 | 0) == 2 ? o : p, h, h));p = T(k + T(g[q + 4 >> 2]));b = T(d - n);b = T(Ie(a, 0, (f | 2 | 0) == 2 ? p : b, i, h));
        }g[a + 912 >> 2] = b;l = s;return;
      }function xe(a, b, c, d, e, f, h) {
        a = a | 0;b = T(b);c = T(c);d = d | 0;e = e | 0;f = T(f);h = T(h);var i = ib,
            j = ib,
            k = ib,
            l = ib;k = T(Ce(a, 2, f));i = T(Ce(a, 0, f));l = T(Ud(a, 2, f));j = T(Ud(a, 0, f));b = T(b - l);g[a + 908 >> 2] = T(Ie(a, 2, (d | 2 | 0) == 2 ? k : b, f, f));c = T(c - j);g[a + 912 >> 2] = T(Ie(a, 0, (e | 2 | 0) == 2 ? i : c, h, f));return;
      }function ye(a, b, c, d, e, f, h) {
        a = a | 0;b = T(b);c = T(c);d = d | 0;e = e | 0;f = T(f);h = T(h);var i = 0,
            j = ib,
            k = ib;i = (d | 0) == 2;if ((!(b <= T(0.0) & i) ? !(c <= T(0.0) & (e | 0) == 2) : 0) ? !((d | 0) == 1 & (e | 0) == 1) : 0) a = 0;else {
          j = T(Ud(a, 0, f));k = T(Ud(a, 2, f));i = b < T(0.0) & i | (Sb(b) | 0);b = T(b - k);g[a + 908 >> 2] = T(Ie(a, 2, i ? T(0.0) : b, f, f));b = T(c - j);i = c < T(0.0) & (e | 0) == 2 | (Sb(c) | 0);g[a + 912 >> 2] = T(Ie(a, 0, i ? T(0.0) : b, h, f));a = 1;
        }return a | 0;
      }function ze(a, b) {
        a = a | 0;b = b | 0;if (We(a) | 0) a = re(2, b) | 0;else a = 0;return a | 0;
      }function Ae(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);c = T(ue(a, b, c));return T(c + T(se(a, b)));
      }function Be(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);c = T(ve(a, b, c));return T(c + T(te(a, b)));
      }function Ce(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);var d = ib;d = T(Ae(a, b, c));return T(d + T(Be(a, b, c)));
      }function De(a) {
        a = a | 0;if (!(c[a + 24 >> 2] | 0)) {
          if (T(Ee(a)) != T(0.0)) a = 1;else a = T(Fe(a)) != T(0.0);
        } else a = 0;return a | 0;
      }function Ee(a) {
        a = a | 0;var b = ib;if (c[a + 944 >> 2] | 0) {
          b = T(g[a + 44 >> 2]);if (Sb(b) | 0) {
            b = T(g[a + 40 >> 2]);a = b > T(0.0) & ((Sb(b) | 0) ^ 1);return T(a ? b : T(0.0));
          }
        } else b = T(0.0);return T(b);
      }function Fe(b) {
        b = b | 0;var d = ib,
            e = 0,
            f = ib;do if (c[b + 944 >> 2] | 0) {
          d = T(g[b + 48 >> 2]);if (Sb(d) | 0) {
            e = a[(c[b + 976 >> 2] | 0) + 2 >> 0] | 0;if (e << 24 >> 24 == 0 ? (f = T(g[b + 40 >> 2]), f < T(0.0) & ((Sb(f) | 0) ^ 1)) : 0) {
              d = T(-f);break;
            }d = e << 24 >> 24 ? T(1.0) : T(0.0);
          }
        } else d = T(0.0); while (0);return T(d);
      }function Ge(b) {
        b = b | 0;var d = 0,
            e = 0;yC(b + 400 | 0, 0, 540) | 0;a[b + 985 >> 0] = 1;lc(b);e = $b(b) | 0;if (e | 0) {
          d = b + 948 | 0;b = 0;do {
            Ge(c[(c[d >> 2] | 0) + (b << 2) >> 2] | 0);b = b + 1 | 0;
          } while ((b | 0) != (e | 0));
        }return;
      }function He(a, b, d, e, f, h, i, j, k, m) {
        a = a | 0;b = b | 0;d = T(d);e = e | 0;f = T(f);h = T(h);i = T(i);j = j | 0;k = k | 0;m = m | 0;var n = 0,
            o = ib,
            p = 0,
            q = 0,
            r = ib,
            s = ib,
            u = 0,
            v = ib,
            w = 0,
            x = ib,
            y = 0,
            z = 0,
            A = 0,
            B = 0,
            C = 0,
            D = 0,
            E = 0,
            F = 0,
            G = 0,
            H = 0;G = l;l = l + 16 | 0;A = G + 12 | 0;B = G + 8 | 0;C = G + 4 | 0;D = G;F = re(c[a + 4 >> 2] | 0, k) | 0;y = oe(F) | 0;o = T(be(Xe(b) | 0, y ? h : i));z = ae(b, 2, h) | 0;E = ae(b, 0, i) | 0;do if (!(Sb(o) | 0) ? !(Sb(y ? d : f) | 0) : 0) {
          n = b + 504 | 0;if (!(Sb(T(g[n >> 2])) | 0)) {
            if (!(Ye(c[b + 976 >> 2] | 0, 0) | 0)) break;if ((c[b + 500 >> 2] | 0) == (c[2278] | 0)) break;
          }g[n >> 2] = T(cC(o, T(Ce(b, F, h))));
        } else p = 7; while (0);do if ((p | 0) == 7) {
          w = y ^ 1;if (!(w | z ^ 1)) {
            i = T(be(c[b + 992 >> 2] | 0, h));g[b + 504 >> 2] = T(cC(i, T(Ce(b, 2, h))));break;
          }if (!(y | E ^ 1)) {
            i = T(be(c[b + 996 >> 2] | 0, i));g[b + 504 >> 2] = T(cC(i, T(Ce(b, 0, h))));break;
          }g[A >> 2] = T(t);g[B >> 2] = T(t);c[C >> 2] = 0;c[D >> 2] = 0;v = T(Ud(b, 2, h));x = T(Ud(b, 0, h));if (z) {
            r = T(v + T(be(c[b + 992 >> 2] | 0, h)));g[A >> 2] = r;c[C >> 2] = 1;q = 1;
          } else {
            q = 0;r = T(t);
          }if (E) {
            o = T(x + T(be(c[b + 996 >> 2] | 0, i)));g[B >> 2] = o;c[D >> 2] = 1;n = 1;
          } else {
            n = 0;o = T(t);
          }p = c[a + 32 >> 2] | 0;if (!(y & (p | 0) == 2)) {
            if (Sb(r) | 0 ? !(Sb(d) | 0) : 0) {
              g[A >> 2] = d;c[C >> 2] = 2;q = 2;r = d;
            }
          } else p = 2;if ((!((p | 0) == 2 & w) ? Sb(o) | 0 : 0) ? !(Sb(f) | 0) : 0) {
            g[B >> 2] = f;c[D >> 2] = 2;n = 2;o = f;
          }s = T(g[b + 396 >> 2]);u = Sb(s) | 0;do if (!u) {
            if ((q | 0) == 1 & w) {
              g[B >> 2] = T(T(r - v) / s);c[D >> 2] = 1;n = 1;p = 1;break;
            }if (y & (n | 0) == 1) {
              g[A >> 2] = T(s * T(o - x));c[C >> 2] = 1;n = 1;p = 1;
            } else p = q;
          } else p = q; while (0);H = Sb(d) | 0;q = (Je(a, b) | 0) != 4;if (!(y | z | ((e | 0) != 1 | H) | (q | (p | 0) == 1)) ? (g[A >> 2] = d, c[C >> 2] = 1, !u) : 0) {
            g[B >> 2] = T(T(d - v) / s);c[D >> 2] = 1;n = 1;
          }if (!(E | w | ((j | 0) != 1 | (Sb(f) | 0)) | (q | (n | 0) == 1)) ? (g[B >> 2] = f, c[D >> 2] = 1, !u) : 0) {
            g[A >> 2] = T(s * T(f - x));c[C >> 2] = 1;
          }Me(b, 2, h, h, C, A);Me(b, 0, i, h, D, B);d = T(g[A >> 2]);f = T(g[B >> 2]);Td(b, d, f, k, c[C >> 2] | 0, c[D >> 2] | 0, h, i, 0, 3565, m) | 0;i = T(g[b + 908 + (c[976 + (F << 2) >> 2] << 2) >> 2]);g[b + 504 >> 2] = T(cC(i, T(Ce(b, F, h))));
        } while (0);c[b + 500 >> 2] = c[2278];l = G;return;
      }function Ie(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = T(c);d = T(d);e = T(e);d = T(Te(a, b, c, d));return T(cC(d, T(Ce(a, b, e))));
      }function Je(a, b) {
        a = a | 0;b = b | 0;b = b + 20 | 0;b = c[((c[b >> 2] | 0) == 0 ? a + 16 | 0 : b) >> 2] | 0;if ((b | 0) == 5 ? We(c[a + 4 >> 2] | 0) | 0 : 0) b = 1;return b | 0;
      }function Ke(a, b) {
        a = a | 0;b = b | 0;if (oe(b) | 0 ? (c[a + 96 >> 2] | 0) != 0 : 0) b = 4;else b = c[1040 + (b << 2) >> 2] | 0;return a + 60 + (b << 3) | 0;
      }function Le(a, b) {
        a = a | 0;b = b | 0;if (oe(b) | 0 ? (c[a + 104 >> 2] | 0) != 0 : 0) b = 5;else b = c[1e3 + (b << 2) >> 2] | 0;return a + 60 + (b << 3) | 0;
      }function Me(a, b, d, e, f, h) {
        a = a | 0;b = b | 0;d = T(d);e = T(e);f = f | 0;h = h | 0;d = T(be(a + 380 + (c[976 + (b << 2) >> 2] << 3) | 0, d));d = T(d + T(Ud(a, b, e)));switch (c[f >> 2] | 0) {case 2:case 1:
            {
              f = Sb(d) | 0;e = T(g[h >> 2]);g[h >> 2] = f | e < d ? e : d;break;
            }case 0:
            {
              if (!(Sb(d) | 0)) {
                c[f >> 2] = 2;g[h >> 2] = d;
              }break;
            }default:
            {}}return;
      }function Ne(a, b) {
        a = a | 0;b = b | 0;a = a + 132 | 0;if (oe(b) | 0 ? (c[(Tb(a, 4, 948) | 0) + 4 >> 2] | 0) != 0 : 0) a = 1;else a = (c[(Tb(a, c[1040 + (b << 2) >> 2] | 0, 948) | 0) + 4 >> 2] | 0) != 0;return a | 0;
      }function Oe(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0;a = a + 132 | 0;if (oe(b) | 0 ? (e = Tb(a, 4, 948) | 0, (c[e + 4 >> 2] | 0) != 0) : 0) f = 4;else {
          e = Tb(a, c[1040 + (b << 2) >> 2] | 0, 948) | 0;if (!(c[e + 4 >> 2] | 0)) d = T(0.0);else f = 4;
        }if ((f | 0) == 4) d = T(be(e, d));return T(d);
      }function Pe(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = ib;e = T(g[a + 908 + (c[976 + (b << 2) >> 2] << 2) >> 2]);e = T(e + T(me(a, b, d)));return T(e + T(ne(a, b, d)));
      }function Qe(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;a: do if (!(We(c[a + 4 >> 2] | 0) | 0)) {
          if ((c[a + 16 >> 2] | 0) != 5) {
            d = $b(a) | 0;if (!d) b = 0;else {
              b = 0;while (1) {
                e = ac(a, b) | 0;if ((c[e + 24 >> 2] | 0) == 0 ? (c[e + 20 >> 2] | 0) == 5 : 0) {
                  b = 1;break a;
                }b = b + 1 | 0;if (b >>> 0 >= d >>> 0) {
                  b = 0;break;
                }
              }
            }
          } else b = 1;
        } else b = 0; while (0);return b | 0;
      }function Re(a, b) {
        a = a | 0;b = b | 0;var d = ib;d = T(g[a + 908 + (c[976 + (b << 2) >> 2] << 2) >> 2]);return d >= T(0.0) & ((Sb(d) | 0) ^ 1) | 0;
      }function Se(a) {
        a = a | 0;var b = ib,
            d = 0,
            e = 0,
            f = 0,
            h = 0,
            i = 0,
            j = 0,
            k = ib;d = c[a + 968 >> 2] | 0;if (!d) {
          h = $b(a) | 0;do if (h | 0) {
            d = 0;f = 0;while (1) {
              e = ac(a, f) | 0;if (c[e + 940 >> 2] | 0) {
                i = 8;break;
              }if ((c[e + 24 >> 2] | 0) != 1) {
                j = (Je(a, e) | 0) == 5;if (j) {
                  d = e;break;
                } else d = (d | 0) == 0 ? e : d;
              }f = f + 1 | 0;if (f >>> 0 >= h >>> 0) {
                i = 8;break;
              }
            }if ((i | 0) == 8) if (!d) break;b = T(Se(d));return T(b + T(g[d + 404 >> 2]));
          } while (0);b = T(g[a + 912 >> 2]);
        } else {
          k = T(g[a + 908 >> 2]);b = T(g[a + 912 >> 2]);b = T(mb[d & 0](a, k, b));ec(a, (Sb(b) | 0) ^ 1, 3573);
        }return T(b);
      }function Te(a, b, c, d) {
        a = a | 0;b = b | 0;c = T(c);d = T(d);var e = ib,
            f = 0;if (!(We(b) | 0)) {
          if (oe(b) | 0) {
            b = 0;f = 3;
          } else {
            d = T(t);e = T(t);
          }
        } else {
          b = 1;f = 3;
        }if ((f | 0) == 3) {
          e = T(be(a + 364 + (b << 3) | 0, d));d = T(be(a + 380 + (b << 3) | 0, d));
        }f = d < c & (d >= T(0.0) & ((Sb(d) | 0) ^ 1));c = f ? d : c;f = e >= T(0.0) & ((Sb(e) | 0) ^ 1) & c < e;return T(f ? e : c);
      }function Ue(a, b, d, e, f, h, i) {
        a = a | 0;b = b | 0;d = T(d);e = e | 0;f = T(f);h = h | 0;i = i | 0;var j = ib,
            k = ib,
            l = 0,
            m = 0,
            n = ib,
            o = ib,
            p = ib,
            q = 0,
            r = 0,
            s = 0,
            u = 0,
            v = ib,
            w = 0;s = re(c[a + 4 >> 2] | 0, h) | 0;q = ze(s, h) | 0;r = oe(s) | 0;n = T(Ud(b, 2, d));o = T(Ud(b, 0, d));if (!(ae(b, 2, d) | 0)) {
          if (Ne(b, 2) | 0 ? Ze(b, 2) | 0 : 0) {
            j = T(g[a + 908 >> 2]);k = T(se(a, 2));k = T(j - T(k + T(te(a, 2))));j = T(Oe(b, 2, d));j = T(Ie(b, 2, T(k - T(j + T(_e(b, 2, d)))), d, d));
          } else j = T(t);
        } else j = T(n + T(be(c[b + 992 >> 2] | 0, d)));if (!(ae(b, 0, f) | 0)) {
          if (Ne(b, 0) | 0 ? Ze(b, 0) | 0 : 0) {
            k = T(g[a + 912 >> 2]);v = T(se(a, 0));v = T(k - T(v + T(te(a, 0))));k = T(Oe(b, 0, f));k = T(Ie(b, 0, T(v - T(k + T(_e(b, 0, f)))), f, d));
          } else k = T(t);
        } else k = T(o + T(be(c[b + 996 >> 2] | 0, f)));l = Sb(j) | 0;m = Sb(k) | 0;do if (l ^ m ? (p = T(g[b + 396 >> 2]), !(Sb(p) | 0)) : 0) if (l) {
          j = T(n + T(T(k - o) * p));break;
        } else {
          v = T(o + T(T(j - n) / p));k = m ? v : k;break;
        } while (0);m = Sb(j) | 0;l = Sb(k) | 0;if (m | l) {
          w = (m ^ 1) & 1;e = d > T(0.0) & ((e | 0) != 0 & m);j = r ? j : e ? d : j;Td(b, j, k, h, r ? w : e ? 2 : w, m & (l ^ 1) & 1, j, k, 0, 3623, i) | 0;j = T(g[b + 908 >> 2]);j = T(j + T(Ud(b, 2, d)));k = T(g[b + 912 >> 2]);k = T(k + T(Ud(b, 0, d)));
        }Td(b, j, k, h, 1, 1, j, k, 1, 3635, i) | 0;if (Ze(b, s) | 0 ? !(Ne(b, s) | 0) : 0) {
          w = c[976 + (s << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(v - T(g[b + 908 + (w << 2) >> 2]));v = T(v - T(te(a, s)));v = T(v - T(ne(b, s, d)));v = T(v - T(_e(b, s, r ? d : f)));g[b + 400 + (c[1040 + (s << 2) >> 2] << 2) >> 2] = v;
        } else u = 21;do if ((u | 0) == 21) {
          if (!(Ne(b, s) | 0) ? (c[a + 8 >> 2] | 0) == 1 : 0) {
            w = c[976 + (s << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(T(v - T(g[b + 908 + (w << 2) >> 2])) * T(.5));g[b + 400 + (c[1040 + (s << 2) >> 2] << 2) >> 2] = v;break;
          }if (!(Ne(b, s) | 0) ? (c[a + 8 >> 2] | 0) == 2 : 0) {
            w = c[976 + (s << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(v - T(g[b + 908 + (w << 2) >> 2]));g[b + 400 + (c[1040 + (s << 2) >> 2] << 2) >> 2] = v;
          }
        } while (0);if (Ze(b, q) | 0 ? !(Ne(b, q) | 0) : 0) {
          w = c[976 + (q << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(v - T(g[b + 908 + (w << 2) >> 2]));v = T(v - T(te(a, q)));v = T(v - T(ne(b, q, d)));v = T(v - T(_e(b, q, r ? f : d)));g[b + 400 + (c[1040 + (q << 2) >> 2] << 2) >> 2] = v;
        } else u = 30;do if ((u | 0) == 30 ? !(Ne(b, q) | 0) : 0) {
          if ((Je(a, b) | 0) == 2) {
            w = c[976 + (q << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(T(v - T(g[b + 908 + (w << 2) >> 2])) * T(.5));g[b + 400 + (c[1040 + (q << 2) >> 2] << 2) >> 2] = v;break;
          }w = (Je(a, b) | 0) == 3;if (w ^ (c[a + 28 >> 2] | 0) == 2) {
            w = c[976 + (q << 2) >> 2] | 0;v = T(g[a + 908 + (w << 2) >> 2]);v = T(v - T(g[b + 908 + (w << 2) >> 2]));g[b + 400 + (c[1040 + (q << 2) >> 2] << 2) >> 2] = v;
          }
        } while (0);return;
      }function Ve(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = ib,
            f = 0;f = c[976 + (d << 2) >> 2] | 0;e = T(g[b + 908 + (f << 2) >> 2]);e = T(T(g[a + 908 + (f << 2) >> 2]) - e);e = T(e - T(g[b + 400 + (c[1040 + (d << 2) >> 2] << 2) >> 2]));g[b + 400 + (c[1e3 + (d << 2) >> 2] << 2) >> 2] = e;return;
      }function We(a) {
        a = a | 0;return (a | 1 | 0) == 1 | 0;
      }function Xe(b) {
        b = b | 0;var d = ib;switch (c[b + 56 >> 2] | 0) {case 0:case 3:
            {
              d = T(g[b + 40 >> 2]);if (d > T(0.0) & ((Sb(d) | 0) ^ 1)) b = a[(c[b + 976 >> 2] | 0) + 2 >> 0] | 0 ? 1056 : 992;else b = 1056;break;
            }default:
            b = b + 52 | 0;}return b | 0;
      }function Ye(b, c) {
        b = b | 0;c = c | 0;return (a[b + c >> 0] | 0) != 0 | 0;
      }function Ze(a, b) {
        a = a | 0;b = b | 0;a = a + 132 | 0;if (oe(b) | 0 ? (c[(Tb(a, 5, 948) | 0) + 4 >> 2] | 0) != 0 : 0) a = 1;else a = (c[(Tb(a, c[1e3 + (b << 2) >> 2] | 0, 948) | 0) + 4 >> 2] | 0) != 0;return a | 0;
      }function _e(a, b, d) {
        a = a | 0;b = b | 0;d = T(d);var e = 0,
            f = 0;a = a + 132 | 0;if (oe(b) | 0 ? (e = Tb(a, 5, 948) | 0, (c[e + 4 >> 2] | 0) != 0) : 0) f = 4;else {
          e = Tb(a, c[1e3 + (b << 2) >> 2] | 0, 948) | 0;if (!(c[e + 4 >> 2] | 0)) d = T(0.0);else f = 4;
        }if ((f | 0) == 4) d = T(be(e, d));return T(d);
      }function $e(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);if (Ne(a, b) | 0) c = T(Oe(a, b, c));else c = T(-T(_e(a, b, c)));return T(c);
      }function af(a) {
        a = T(a);return (g[j >> 2] = a, c[j >> 2] | 0) | 0;
      }function bf(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 1073741823) Ta();else {
            f = qC(b << 2) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 2) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 2);return;
      }function cf(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 2) << 2) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function df(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -4 - b | 0) >>> 2) << 2);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function ef(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;h = a + 4 | 0;i = c[h >> 2] | 0;f = i - e | 0;g = f >> 2;a = b + (g << 2) | 0;if (a >>> 0 < d >>> 0) {
          e = i;do {
            c[e >> 2] = c[a >> 2];a = a + 4 | 0;e = (c[h >> 2] | 0) + 4 | 0;c[h >> 2] = e;
          } while (a >>> 0 < d >>> 0);
        }if (g | 0) GC(i + (0 - g << 2) | 0, b | 0, f | 0) | 0;return;
      }function ff(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = b + 4 | 0;j = c[i >> 2] | 0;f = c[a >> 2] | 0;h = d;g = h - f | 0;e = j + (0 - (g >> 2) << 2) | 0;c[i >> 2] = e;if ((g | 0) > 0) BC(e | 0, f | 0, g | 0) | 0;f = a + 4 | 0;g = b + 8 | 0;e = (c[f >> 2] | 0) - h | 0;if ((e | 0) > 0) {
          BC(c[g >> 2] | 0, d | 0, e | 0) | 0;c[g >> 2] = (c[g >> 2] | 0) + (e >>> 2 << 2);
        }h = c[a >> 2] | 0;c[a >> 2] = c[i >> 2];c[i >> 2] = h;h = c[f >> 2] | 0;c[f >> 2] = c[g >> 2];c[g >> 2] = h;h = a + 8 | 0;d = b + 12 | 0;a = c[h >> 2] | 0;c[h >> 2] = c[d >> 2];c[d >> 2] = a;c[b >> 2] = c[i >> 2];return j | 0;
      }function gf(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;h = c[b >> 2] | 0;g = c[d >> 2] | 0;if ((h | 0) != (g | 0)) {
          f = a + 8 | 0;d = ((g + -4 - h | 0) >>> 2) + 1 | 0;a = h;e = c[f >> 2] | 0;do {
            c[e >> 2] = c[a >> 2];e = (c[f >> 2] | 0) + 4 | 0;c[f >> 2] = e;a = a + 4 | 0;
          } while ((a | 0) != (g | 0));c[b >> 2] = h + (d << 2);
        }return;
      }function hf() {
        Qb();return;
      }function jf() {
        var a = 0;a = qC(4) | 0;kf(a);return a | 0;
      }function kf(a) {
        a = a | 0;c[a >> 2] = gc() | 0;return;
      }function lf(a) {
        a = a | 0;if (a | 0) {
          mf(a);sC(a);
        }return;
      }function mf(a) {
        a = a | 0;ic(c[a >> 2] | 0);return;
      }function nf(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;he(c[a >> 2] | 0, b, d);return;
      }function of(a, b) {
        a = a | 0;b = T(b);Zd(c[a >> 2] | 0, b);return;
      }function pf(a, b) {
        a = a | 0;b = b | 0;return Ye(c[a >> 2] | 0, b) | 0;
      }function qf() {
        var a = 0;a = qC(8) | 0;rf(a, 0);return a | 0;
      }function rf(a, b) {
        a = a | 0;b = b | 0;if (!b) b = Wb() | 0;else b = Ub(c[b >> 2] | 0) | 0;c[a >> 2] = b;c[a + 4 >> 2] = 0;vc(b, a);return;
      }function sf(a) {
        a = a | 0;var b = 0;b = qC(8) | 0;rf(b, a);return b | 0;
      }function tf(a) {
        a = a | 0;if (a | 0) {
          uf(a);sC(a);
        }return;
      }function uf(a) {
        a = a | 0;var b = 0;Zb(c[a >> 2] | 0);b = a + 4 | 0;a = c[b >> 2] | 0;c[b >> 2] = 0;if (a | 0) {
          vf(a);sC(a);
        }return;
      }function vf(a) {
        a = a | 0;wf(a);return;
      }function wf(a) {
        a = a | 0;a = c[a >> 2] | 0;if (a | 0) ab(a | 0);return;
      }function xf(a) {
        a = a | 0;return wc(a) | 0;
      }function yf(a) {
        a = a | 0;var b = 0,
            d = 0;d = a + 4 | 0;b = c[d >> 2] | 0;c[d >> 2] = 0;if (b | 0) {
          vf(b);sC(b);
        }dc(c[a >> 2] | 0);return;
      }function zf(a, b) {
        a = a | 0;b = b | 0;sc(c[a >> 2] | 0, c[b >> 2] | 0);return;
      }function Af(a, b) {
        a = a | 0;b = b | 0;Hc(c[a >> 2] | 0, b);return;
      }function Bf(a, b, d) {
        a = a | 0;b = b | 0;d = +d;Vc(c[a >> 2] | 0, b, T(d));return;
      }function Cf(a, b, d) {
        a = a | 0;b = b | 0;d = +d;Wc(c[a >> 2] | 0, b, T(d));return;
      }function Df(a, b) {
        a = a | 0;b = b | 0;Bc(c[a >> 2] | 0, b);return;
      }function Ef(a, b) {
        a = a | 0;b = b | 0;Dc(c[a >> 2] | 0, b);return;
      }function Ff(a, b) {
        a = a | 0;b = b | 0;Fc(c[a >> 2] | 0, b);return;
      }function Gf(a, b) {
        a = a | 0;b = b | 0;xc(c[a >> 2] | 0, b);return;
      }function Hf(a, b) {
        a = a | 0;b = b | 0;Jc(c[a >> 2] | 0, b);return;
      }function If(a, b) {
        a = a | 0;b = b | 0;zc(c[a >> 2] | 0, b);return;
      }function Jf(a, b, d) {
        a = a | 0;b = b | 0;d = +d;Yc(c[a >> 2] | 0, b, T(d));return;
      }function Kf(a, b, d) {
        a = a | 0;b = b | 0;d = +d;Zc(c[a >> 2] | 0, b, T(d));return;
      }function Lf(a, b) {
        a = a | 0;b = b | 0;$c(c[a >> 2] | 0, b);return;
      }function Mf(a, b) {
        a = a | 0;b = b | 0;Lc(c[a >> 2] | 0, b);return;
      }function Nf(a, b) {
        a = a | 0;b = b | 0;Nc(c[a >> 2] | 0, b);return;
      }function Of(a, b) {
        a = a | 0;b = +b;Pc(c[a >> 2] | 0, T(b));return;
      }function Pf(a, b) {
        a = a | 0;b = +b;Sc(c[a >> 2] | 0, T(b));return;
      }function Qf(a, b) {
        a = a | 0;b = +b;Tc(c[a >> 2] | 0, T(b));return;
      }function Rf(a, b) {
        a = a | 0;b = +b;Qc(c[a >> 2] | 0, T(b));return;
      }function Sf(a, b) {
        a = a | 0;b = +b;Rc(c[a >> 2] | 0, T(b));return;
      }function Tf(a, b) {
        a = a | 0;b = +b;fd(c[a >> 2] | 0, T(b));return;
      }function Uf(a, b) {
        a = a | 0;b = +b;gd(c[a >> 2] | 0, T(b));return;
      }function Vf(a) {
        a = a | 0;hd(c[a >> 2] | 0);return;
      }function Wf(a, b) {
        a = a | 0;b = +b;jd(c[a >> 2] | 0, T(b));return;
      }function Xf(a, b) {
        a = a | 0;b = +b;kd(c[a >> 2] | 0, T(b));return;
      }function Yf(a) {
        a = a | 0;ld(c[a >> 2] | 0);return;
      }function Zf(a, b) {
        a = a | 0;b = +b;nd(c[a >> 2] | 0, T(b));return;
      }function _f(a, b) {
        a = a | 0;b = +b;od(c[a >> 2] | 0, T(b));return;
      }function $f(a, b) {
        a = a | 0;b = +b;qd(c[a >> 2] | 0, T(b));return;
      }function ag(a, b) {
        a = a | 0;b = +b;rd(c[a >> 2] | 0, T(b));return;
      }function bg(a, b) {
        a = a | 0;b = +b;td(c[a >> 2] | 0, T(b));return;
      }function cg(a, b) {
        a = a | 0;b = +b;ud(c[a >> 2] | 0, T(b));return;
      }function dg(a, b) {
        a = a | 0;b = +b;wd(c[a >> 2] | 0, T(b));return;
      }function eg(a, b) {
        a = a | 0;b = +b;xd(c[a >> 2] | 0, T(b));return;
      }function fg(a, b) {
        a = a | 0;b = +b;zd(c[a >> 2] | 0, T(b));return;
      }function gg(a, b, d) {
        a = a | 0;b = b | 0;d = +d;dd(c[a >> 2] | 0, b, T(d));return;
      }function hg(a, b, d) {
        a = a | 0;b = b | 0;d = +d;ad(c[a >> 2] | 0, b, T(d));return;
      }function ig(a, b, d) {
        a = a | 0;b = b | 0;d = +d;bd(c[a >> 2] | 0, b, T(d));return;
      }function jg(a) {
        a = a | 0;return Ic(c[a >> 2] | 0) | 0;
      }function kg(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e;Xc(f, c[b >> 2] | 0, d);lg(a, f);l = e;return;
      }function lg(a, b) {
        a = a | 0;b = b | 0;mg(a, c[b + 4 >> 2] | 0, +T(g[b >> 2]));return;
      }function mg(a, b, d) {
        a = a | 0;b = b | 0;d = +d;c[a >> 2] = b;h[a + 8 >> 3] = d;return;
      }function ng(a) {
        a = a | 0;return Cc(c[a >> 2] | 0) | 0;
      }function og(a) {
        a = a | 0;return Ec(c[a >> 2] | 0) | 0;
      }function pg(a) {
        a = a | 0;return Gc(c[a >> 2] | 0) | 0;
      }function qg(a) {
        a = a | 0;return yc(c[a >> 2] | 0) | 0;
      }function rg(a) {
        a = a | 0;return Kc(c[a >> 2] | 0) | 0;
      }function sg(a) {
        a = a | 0;return Ac(c[a >> 2] | 0) | 0;
      }function tg(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e;_c(f, c[b >> 2] | 0, d);lg(a, f);l = e;return;
      }function ug(a) {
        a = a | 0;return Mc(c[a >> 2] | 0) | 0;
      }function vg(a) {
        a = a | 0;return Oc(c[a >> 2] | 0) | 0;
      }function wg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;Uc(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function xg(a) {
        a = a | 0;return + +T(tc(c[a >> 2] | 0));
      }function yg(a) {
        a = a | 0;return + +T(uc(c[a >> 2] | 0));
      }function zg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;id(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Ag(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;md(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Bg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;pd(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Cg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;sd(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Dg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;vd(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Eg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;yd(e, c[b >> 2] | 0);lg(a, e);l = d;return;
      }function Fg(a) {
        a = a | 0;return + +T(Ad(c[a >> 2] | 0));
      }function Gg(a, b) {
        a = a | 0;b = b | 0;return + +T(ed(c[a >> 2] | 0, b));
      }function Hg(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e;cd(f, c[b >> 2] | 0, d);lg(a, f);l = e;return;
      }function Ig(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;kc(c[a >> 2] | 0, c[b >> 2] | 0, d);return;
      }function Jg(a, b) {
        a = a | 0;b = b | 0;cc(c[a >> 2] | 0, c[b >> 2] | 0);return;
      }function Kg(a) {
        a = a | 0;return $b(c[a >> 2] | 0) | 0;
      }function Lg(a) {
        a = a | 0;a = pc(c[a >> 2] | 0) | 0;if (!a) a = 0;else a = xf(a) | 0;return a | 0;
      }function Mg(a, b) {
        a = a | 0;b = b | 0;a = ac(c[a >> 2] | 0, b) | 0;if (!a) a = 0;else a = xf(a) | 0;return a | 0;
      }function Ng(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;e = qC(4) | 0;Og(e, b);d = a + 4 | 0;b = c[d >> 2] | 0;c[d >> 2] = e;if (b | 0) {
          vf(b);sC(b);
        }jc(c[a >> 2] | 0, 1);return;
      }function Og(a, b) {
        a = a | 0;b = b | 0;gh(a, b);return;
      }function Pg(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = T(c);d = d | 0;e = T(e);f = f | 0;var i = 0,
            j = 0;i = l;l = l + 16 | 0;j = i;Qg(j, wc(b) | 0, +c, d, +e, f);g[a >> 2] = T(+h[j >> 3]);g[a + 4 >> 2] = T(+h[j + 8 >> 3]);l = i;return;
      }function Qg(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = +d;e = e | 0;f = +f;g = g | 0;var i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;i = l;l = l + 32 | 0;n = i + 8 | 0;m = i + 20 | 0;k = i;j = i + 16 | 0;h[n >> 3] = d;c[m >> 2] = e;h[k >> 3] = f;c[j >> 2] = g;Rg(a, c[b + 4 >> 2] | 0, n, m, k, j);l = i;return;
      }function Rg(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var i = 0,
            j = 0;i = l;l = l + 16 | 0;j = i;UA(j);b = Sg(b) | 0;Tg(a, b, +h[d >> 3], c[e >> 2] | 0, +h[f >> 3], c[g >> 2] | 0);WA(j);l = i;return;
      }function Sg(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function Tg(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = +c;d = d | 0;e = +e;f = f | 0;var g = 0;g = Vg(Ug() | 0) | 0;c = +Wg(c);d = Xg(d) | 0;e = +Wg(e);Yg(a, cb(0, g | 0, b | 0, +c, d | 0, +e, Xg(f) | 0) | 0);return;
      }function Ug() {
        var b = 0;if (!(a[7608] | 0)) {
          dh(9120);b = 7608;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 9120;
      }function Vg(a) {
        a = a | 0;return c[a + 8 >> 2] | 0;
      }function Wg(a) {
        a = +a;return + +ch(a);
      }function Xg(a) {
        a = a | 0;return bh(a) | 0;
      }function Yg(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 32 | 0;d = f;e = b;if (!(e & 1)) {
          c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = c[b + 4 >> 2];c[a + 8 >> 2] = c[b + 8 >> 2];c[a + 12 >> 2] = c[b + 12 >> 2];
        } else {
          Zg(d, 0);Ja(e | 0, d | 0) | 0;_g(a, d);$g(d);
        }l = f;return;
      }function Zg(b, d) {
        b = b | 0;d = d | 0;ah(b, d);c[b + 8 >> 2] = 0;a[b + 24 >> 0] = 0;return;
      }function _g(a, b) {
        a = a | 0;b = b | 0;b = b + 8 | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = c[b + 4 >> 2];c[a + 8 >> 2] = c[b + 8 >> 2];c[a + 12 >> 2] = c[b + 12 >> 2];return;
      }function $g(b) {
        b = b | 0;a[b + 24 >> 0] = 0;return;
      }function ah(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = b;return;
      }function bh(a) {
        a = a | 0;return a | 0;
      }function ch(a) {
        a = +a;return +a;
      }function dh(a) {
        a = a | 0;fh(a, eh() | 0, 4);return;
      }function eh() {
        return 1064;
      }function fh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;c[a + 8 >> 2] = _a(b | 0, d + 1 | 0) | 0;return;
      }function gh(a, b) {
        a = a | 0;b = b | 0;b = c[b >> 2] | 0;c[a >> 2] = b;Aa(b | 0);return;
      }function hh(a) {
        a = a | 0;var b = 0,
            d = 0;d = a + 4 | 0;b = c[d >> 2] | 0;c[d >> 2] = 0;if (b | 0) {
          vf(b);sC(b);
        }jc(c[a >> 2] | 0, 0);return;
      }function ih(a) {
        a = a | 0;qc(c[a >> 2] | 0);return;
      }function jh(a) {
        a = a | 0;return rc(c[a >> 2] | 0) | 0;
      }function kh(a, b, d, e) {
        a = a | 0;b = +b;d = +d;e = e | 0;_d(c[a >> 2] | 0, T(b), T(d), e);return;
      }function lh(a) {
        a = a | 0;return + +T(Bd(c[a >> 2] | 0));
      }function mh(a) {
        a = a | 0;return + +T(Dd(c[a >> 2] | 0));
      }function nh(a) {
        a = a | 0;return + +T(Cd(c[a >> 2] | 0));
      }function oh(a) {
        a = a | 0;return + +T(Ed(c[a >> 2] | 0));
      }function ph(a) {
        a = a | 0;return + +T(Fd(c[a >> 2] | 0));
      }function qh(a) {
        a = a | 0;return + +T(Gd(c[a >> 2] | 0));
      }function rh(a, b) {
        a = a | 0;b = b | 0;h[a >> 3] = +T(Bd(c[b >> 2] | 0));h[a + 8 >> 3] = +T(Dd(c[b >> 2] | 0));h[a + 16 >> 3] = +T(Cd(c[b >> 2] | 0));h[a + 24 >> 3] = +T(Ed(c[b >> 2] | 0));h[a + 32 >> 3] = +T(Fd(c[b >> 2] | 0));h[a + 40 >> 3] = +T(Gd(c[b >> 2] | 0));return;
      }function sh(a, b) {
        a = a | 0;b = b | 0;return + +T(Hd(c[a >> 2] | 0, b));
      }function th(a, b) {
        a = a | 0;b = b | 0;return + +T(Id(c[a >> 2] | 0, b));
      }function uh(a, b) {
        a = a | 0;b = b | 0;return + +T(Jd(c[a >> 2] | 0, b));
      }function vh() {
        return fc() | 0;
      }function wh() {
        xh();yh();zh();Ah();Bh();Ch();return;
      }function xh() {
        kv(11713, 4938, 1);return;
      }function yh() {
        yu(10448);return;
      }function zh() {
        eu(10408);return;
      }function Ah() {
        vt(10324);return;
      }function Bh() {
        or(10096);return;
      }function Ch() {
        Dh(9132);return;
      }function Dh(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = 0,
            v = 0,
            w = 0,
            x = 0,
            y = 0,
            z = 0,
            A = 0,
            B = 0,
            C = 0,
            D = 0,
            E = 0,
            F = 0,
            G = 0,
            H = 0,
            I = 0,
            J = 0,
            K = 0,
            L = 0,
            M = 0,
            N = 0,
            O = 0,
            P = 0,
            Q = 0,
            R = 0,
            S = 0,
            T = 0,
            U = 0,
            V = 0,
            W = 0,
            X = 0,
            Y = 0,
            Z = 0,
            _ = 0,
            $ = 0,
            aa = 0,
            ba = 0,
            ca = 0,
            da = 0,
            ea = 0,
            fa = 0,
            ga = 0,
            ha = 0,
            ia = 0,
            ja = 0,
            ka = 0,
            la = 0,
            ma = 0,
            na = 0,
            oa = 0,
            pa = 0,
            qa = 0,
            ra = 0,
            sa = 0,
            ta = 0,
            ua = 0,
            va = 0,
            wa = 0,
            xa = 0,
            ya = 0,
            za = 0,
            Aa = 0,
            Ba = 0,
            Ca = 0,
            Da = 0,
            Ea = 0,
            Fa = 0,
            Ga = 0;b = l;l = l + 672 | 0;d = b + 656 | 0;Ga = b + 648 | 0;Fa = b + 640 | 0;Ea = b + 632 | 0;Da = b + 624 | 0;Ca = b + 616 | 0;Ba = b + 608 | 0;Aa = b + 600 | 0;za = b + 592 | 0;ya = b + 584 | 0;xa = b + 576 | 0;wa = b + 568 | 0;va = b + 560 | 0;ua = b + 552 | 0;ta = b + 544 | 0;sa = b + 536 | 0;ra = b + 528 | 0;qa = b + 520 | 0;pa = b + 512 | 0;oa = b + 504 | 0;na = b + 496 | 0;ma = b + 488 | 0;la = b + 480 | 0;ka = b + 472 | 0;ja = b + 464 | 0;ia = b + 456 | 0;ha = b + 448 | 0;ga = b + 440 | 0;fa = b + 432 | 0;ea = b + 424 | 0;da = b + 416 | 0;ca = b + 408 | 0;ba = b + 400 | 0;aa = b + 392 | 0;$ = b + 384 | 0;_ = b + 376 | 0;Z = b + 368 | 0;Y = b + 360 | 0;X = b + 352 | 0;W = b + 344 | 0;V = b + 336 | 0;U = b + 328 | 0;T = b + 320 | 0;S = b + 312 | 0;R = b + 304 | 0;Q = b + 296 | 0;P = b + 288 | 0;O = b + 280 | 0;N = b + 272 | 0;M = b + 264 | 0;L = b + 256 | 0;K = b + 248 | 0;J = b + 240 | 0;I = b + 232 | 0;H = b + 224 | 0;G = b + 216 | 0;F = b + 208 | 0;E = b + 200 | 0;D = b + 192 | 0;C = b + 184 | 0;B = b + 176 | 0;A = b + 168 | 0;z = b + 160 | 0;y = b + 152 | 0;x = b + 144 | 0;w = b + 136 | 0;v = b + 128 | 0;u = b + 120 | 0;t = b + 112 | 0;s = b + 104 | 0;r = b + 96 | 0;q = b + 88 | 0;p = b + 80 | 0;o = b + 72 | 0;n = b + 64 | 0;m = b + 56 | 0;k = b + 48 | 0;j = b + 40 | 0;i = b + 32 | 0;h = b + 24 | 0;g = b + 16 | 0;f = b + 8 | 0;e = b;Eh(a, 3646);Fh(a, 3651, 2) | 0;Gh(a, 3665, 2) | 0;Hh(a, 3682, 18) | 0;c[Ga >> 2] = 19;c[Ga + 4 >> 2] = 0;c[d >> 2] = c[Ga >> 2];c[d + 4 >> 2] = c[Ga + 4 >> 2];Ih(a, 3690, d) | 0;c[Fa >> 2] = 1;c[Fa + 4 >> 2] = 0;c[d >> 2] = c[Fa >> 2];c[d + 4 >> 2] = c[Fa + 4 >> 2];Jh(a, 3696, d) | 0;c[Ea >> 2] = 2;c[Ea + 4 >> 2] = 0;c[d >> 2] = c[Ea >> 2];c[d + 4 >> 2] = c[Ea + 4 >> 2];Kh(a, 3706, d) | 0;c[Da >> 2] = 1;c[Da + 4 >> 2] = 0;c[d >> 2] = c[Da >> 2];c[d + 4 >> 2] = c[Da + 4 >> 2];Lh(a, 3722, d) | 0;c[Ca >> 2] = 2;c[Ca + 4 >> 2] = 0;c[d >> 2] = c[Ca >> 2];c[d + 4 >> 2] = c[Ca + 4 >> 2];Lh(a, 3734, d) | 0;c[Ba >> 2] = 3;c[Ba + 4 >> 2] = 0;c[d >> 2] = c[Ba >> 2];c[d + 4 >> 2] = c[Ba + 4 >> 2];Kh(a, 3753, d) | 0;c[Aa >> 2] = 4;c[Aa + 4 >> 2] = 0;c[d >> 2] = c[Aa >> 2];c[d + 4 >> 2] = c[Aa + 4 >> 2];Kh(a, 3769, d) | 0;c[za >> 2] = 5;c[za + 4 >> 2] = 0;c[d >> 2] = c[za >> 2];c[d + 4 >> 2] = c[za + 4 >> 2];Kh(a, 3783, d) | 0;c[ya >> 2] = 6;c[ya + 4 >> 2] = 0;c[d >> 2] = c[ya >> 2];c[d + 4 >> 2] = c[ya + 4 >> 2];Kh(a, 3796, d) | 0;c[xa >> 2] = 7;c[xa + 4 >> 2] = 0;c[d >> 2] = c[xa >> 2];c[d + 4 >> 2] = c[xa + 4 >> 2];Kh(a, 3813, d) | 0;c[wa >> 2] = 8;c[wa + 4 >> 2] = 0;c[d >> 2] = c[wa >> 2];c[d + 4 >> 2] = c[wa + 4 >> 2];Kh(a, 3825, d) | 0;c[va >> 2] = 3;c[va + 4 >> 2] = 0;c[d >> 2] = c[va >> 2];c[d + 4 >> 2] = c[va + 4 >> 2];Lh(a, 3843, d) | 0;c[ua >> 2] = 4;c[ua + 4 >> 2] = 0;c[d >> 2] = c[ua >> 2];c[d + 4 >> 2] = c[ua + 4 >> 2];Lh(a, 3853, d) | 0;c[ta >> 2] = 9;c[ta + 4 >> 2] = 0;c[d >> 2] = c[ta >> 2];c[d + 4 >> 2] = c[ta + 4 >> 2];Kh(a, 3870, d) | 0;c[sa >> 2] = 10;c[sa + 4 >> 2] = 0;c[d >> 2] = c[sa >> 2];c[d + 4 >> 2] = c[sa + 4 >> 2];Kh(a, 3884, d) | 0;c[ra >> 2] = 11;c[ra + 4 >> 2] = 0;c[d >> 2] = c[ra >> 2];c[d + 4 >> 2] = c[ra + 4 >> 2];Kh(a, 3896, d) | 0;c[qa >> 2] = 1;c[qa + 4 >> 2] = 0;c[d >> 2] = c[qa >> 2];c[d + 4 >> 2] = c[qa + 4 >> 2];Mh(a, 3907, d) | 0;c[pa >> 2] = 2;c[pa + 4 >> 2] = 0;c[d >> 2] = c[pa >> 2];c[d + 4 >> 2] = c[pa + 4 >> 2];Mh(a, 3915, d) | 0;c[oa >> 2] = 3;c[oa + 4 >> 2] = 0;c[d >> 2] = c[oa >> 2];c[d + 4 >> 2] = c[oa + 4 >> 2];Mh(a, 3928, d) | 0;c[na >> 2] = 4;c[na + 4 >> 2] = 0;c[d >> 2] = c[na >> 2];c[d + 4 >> 2] = c[na + 4 >> 2];Mh(a, 3948, d) | 0;c[ma >> 2] = 5;c[ma + 4 >> 2] = 0;c[d >> 2] = c[ma >> 2];c[d + 4 >> 2] = c[ma + 4 >> 2];Mh(a, 3960, d) | 0;c[la >> 2] = 6;c[la + 4 >> 2] = 0;c[d >> 2] = c[la >> 2];c[d + 4 >> 2] = c[la + 4 >> 2];Mh(a, 3974, d) | 0;c[ka >> 2] = 7;c[ka + 4 >> 2] = 0;c[d >> 2] = c[ka >> 2];c[d + 4 >> 2] = c[ka + 4 >> 2];Mh(a, 3983, d) | 0;c[ja >> 2] = 20;c[ja + 4 >> 2] = 0;c[d >> 2] = c[ja >> 2];c[d + 4 >> 2] = c[ja + 4 >> 2];Ih(a, 3999, d) | 0;c[ia >> 2] = 8;c[ia + 4 >> 2] = 0;c[d >> 2] = c[ia >> 2];c[d + 4 >> 2] = c[ia + 4 >> 2];Mh(a, 4012, d) | 0;c[ha >> 2] = 9;c[ha + 4 >> 2] = 0;c[d >> 2] = c[ha >> 2];c[d + 4 >> 2] = c[ha + 4 >> 2];Mh(a, 4022, d) | 0;c[ga >> 2] = 21;c[ga + 4 >> 2] = 0;c[d >> 2] = c[ga >> 2];c[d + 4 >> 2] = c[ga + 4 >> 2];Ih(a, 4039, d) | 0;c[fa >> 2] = 10;c[fa + 4 >> 2] = 0;c[d >> 2] = c[fa >> 2];c[d + 4 >> 2] = c[fa + 4 >> 2];Mh(a, 4053, d) | 0;c[ea >> 2] = 11;c[ea + 4 >> 2] = 0;c[d >> 2] = c[ea >> 2];c[d + 4 >> 2] = c[ea + 4 >> 2];Mh(a, 4065, d) | 0;c[da >> 2] = 12;c[da + 4 >> 2] = 0;c[d >> 2] = c[da >> 2];c[d + 4 >> 2] = c[da + 4 >> 2];Mh(a, 4084, d) | 0;c[ca >> 2] = 13;c[ca + 4 >> 2] = 0;c[d >> 2] = c[ca >> 2];c[d + 4 >> 2] = c[ca + 4 >> 2];Mh(a, 4097, d) | 0;c[ba >> 2] = 14;c[ba + 4 >> 2] = 0;c[d >> 2] = c[ba >> 2];c[d + 4 >> 2] = c[ba + 4 >> 2];Mh(a, 4117, d) | 0;c[aa >> 2] = 15;c[aa + 4 >> 2] = 0;c[d >> 2] = c[aa >> 2];c[d + 4 >> 2] = c[aa + 4 >> 2];Mh(a, 4129, d) | 0;c[$ >> 2] = 16;c[$ + 4 >> 2] = 0;c[d >> 2] = c[$ >> 2];c[d + 4 >> 2] = c[$ + 4 >> 2];Mh(a, 4148, d) | 0;c[_ >> 2] = 17;c[_ + 4 >> 2] = 0;c[d >> 2] = c[_ >> 2];c[d + 4 >> 2] = c[_ + 4 >> 2];Mh(a, 4161, d) | 0;c[Z >> 2] = 18;c[Z + 4 >> 2] = 0;c[d >> 2] = c[Z >> 2];c[d + 4 >> 2] = c[Z + 4 >> 2];Mh(a, 4181, d) | 0;c[Y >> 2] = 5;c[Y + 4 >> 2] = 0;c[d >> 2] = c[Y >> 2];c[d + 4 >> 2] = c[Y + 4 >> 2];Lh(a, 4196, d) | 0;c[X >> 2] = 6;c[X + 4 >> 2] = 0;c[d >> 2] = c[X >> 2];c[d + 4 >> 2] = c[X + 4 >> 2];Lh(a, 4206, d) | 0;c[W >> 2] = 7;c[W + 4 >> 2] = 0;c[d >> 2] = c[W >> 2];c[d + 4 >> 2] = c[W + 4 >> 2];Lh(a, 4217, d) | 0;c[V >> 2] = 3;c[V + 4 >> 2] = 0;c[d >> 2] = c[V >> 2];c[d + 4 >> 2] = c[V + 4 >> 2];Nh(a, 4235, d) | 0;c[U >> 2] = 1;c[U + 4 >> 2] = 0;c[d >> 2] = c[U >> 2];c[d + 4 >> 2] = c[U + 4 >> 2];Oh(a, 4251, d) | 0;c[T >> 2] = 4;c[T + 4 >> 2] = 0;c[d >> 2] = c[T >> 2];c[d + 4 >> 2] = c[T + 4 >> 2];Nh(a, 4263, d) | 0;c[S >> 2] = 5;c[S + 4 >> 2] = 0;c[d >> 2] = c[S >> 2];c[d + 4 >> 2] = c[S + 4 >> 2];Nh(a, 4279, d) | 0;c[R >> 2] = 6;c[R + 4 >> 2] = 0;c[d >> 2] = c[R >> 2];c[d + 4 >> 2] = c[R + 4 >> 2];Nh(a, 4293, d) | 0;c[Q >> 2] = 7;c[Q + 4 >> 2] = 0;c[d >> 2] = c[Q >> 2];c[d + 4 >> 2] = c[Q + 4 >> 2];Nh(a, 4306, d) | 0;c[P >> 2] = 8;c[P + 4 >> 2] = 0;c[d >> 2] = c[P >> 2];c[d + 4 >> 2] = c[P + 4 >> 2];Nh(a, 4323, d) | 0;c[O >> 2] = 9;c[O + 4 >> 2] = 0;c[d >> 2] = c[O >> 2];c[d + 4 >> 2] = c[O + 4 >> 2];Nh(a, 4335, d) | 0;c[N >> 2] = 2;c[N + 4 >> 2] = 0;c[d >> 2] = c[N >> 2];c[d + 4 >> 2] = c[N + 4 >> 2];Oh(a, 4353, d) | 0;c[M >> 2] = 12;c[M + 4 >> 2] = 0;c[d >> 2] = c[M >> 2];c[d + 4 >> 2] = c[M + 4 >> 2];Ph(a, 4363, d) | 0;c[L >> 2] = 1;c[L + 4 >> 2] = 0;c[d >> 2] = c[L >> 2];c[d + 4 >> 2] = c[L + 4 >> 2];Qh(a, 4376, d) | 0;c[K >> 2] = 2;c[K + 4 >> 2] = 0;c[d >> 2] = c[K >> 2];c[d + 4 >> 2] = c[K + 4 >> 2];Qh(a, 4388, d) | 0;c[J >> 2] = 13;c[J + 4 >> 2] = 0;c[d >> 2] = c[J >> 2];c[d + 4 >> 2] = c[J + 4 >> 2];Ph(a, 4402, d) | 0;c[I >> 2] = 14;c[I + 4 >> 2] = 0;c[d >> 2] = c[I >> 2];c[d + 4 >> 2] = c[I + 4 >> 2];Ph(a, 4411, d) | 0;c[H >> 2] = 15;c[H + 4 >> 2] = 0;c[d >> 2] = c[H >> 2];c[d + 4 >> 2] = c[H + 4 >> 2];Ph(a, 4421, d) | 0;c[G >> 2] = 16;c[G + 4 >> 2] = 0;c[d >> 2] = c[G >> 2];c[d + 4 >> 2] = c[G + 4 >> 2];Ph(a, 4433, d) | 0;c[F >> 2] = 17;c[F + 4 >> 2] = 0;c[d >> 2] = c[F >> 2];c[d + 4 >> 2] = c[F + 4 >> 2];Ph(a, 4446, d) | 0;c[E >> 2] = 18;c[E + 4 >> 2] = 0;c[d >> 2] = c[E >> 2];c[d + 4 >> 2] = c[E + 4 >> 2];Ph(a, 4458, d) | 0;c[D >> 2] = 3;c[D + 4 >> 2] = 0;c[d >> 2] = c[D >> 2];c[d + 4 >> 2] = c[D + 4 >> 2];Qh(a, 4471, d) | 0;c[C >> 2] = 1;c[C + 4 >> 2] = 0;c[d >> 2] = c[C >> 2];c[d + 4 >> 2] = c[C + 4 >> 2];Rh(a, 4486, d) | 0;c[B >> 2] = 10;c[B + 4 >> 2] = 0;c[d >> 2] = c[B >> 2];c[d + 4 >> 2] = c[B + 4 >> 2];Nh(a, 4496, d) | 0;c[A >> 2] = 11;c[A + 4 >> 2] = 0;c[d >> 2] = c[A >> 2];c[d + 4 >> 2] = c[A + 4 >> 2];Nh(a, 4508, d) | 0;c[z >> 2] = 3;c[z + 4 >> 2] = 0;c[d >> 2] = c[z >> 2];c[d + 4 >> 2] = c[z + 4 >> 2];Oh(a, 4519, d) | 0;c[y >> 2] = 4;c[y + 4 >> 2] = 0;c[d >> 2] = c[y >> 2];c[d + 4 >> 2] = c[y + 4 >> 2];Sh(a, 4530, d) | 0;c[x >> 2] = 19;c[x + 4 >> 2] = 0;c[d >> 2] = c[x >> 2];c[d + 4 >> 2] = c[x + 4 >> 2];Th(a, 4542, d) | 0;c[w >> 2] = 12;c[w + 4 >> 2] = 0;c[d >> 2] = c[w >> 2];c[d + 4 >> 2] = c[w + 4 >> 2];Uh(a, 4554, d) | 0;c[v >> 2] = 13;c[v + 4 >> 2] = 0;c[d >> 2] = c[v >> 2];c[d + 4 >> 2] = c[v + 4 >> 2];Vh(a, 4568, d) | 0;c[u >> 2] = 2;c[u + 4 >> 2] = 0;c[d >> 2] = c[u >> 2];c[d + 4 >> 2] = c[u + 4 >> 2];Wh(a, 4578, d) | 0;c[t >> 2] = 20;c[t + 4 >> 2] = 0;c[d >> 2] = c[t >> 2];c[d + 4 >> 2] = c[t + 4 >> 2];Xh(a, 4587, d) | 0;c[s >> 2] = 22;c[s + 4 >> 2] = 0;c[d >> 2] = c[s >> 2];c[d + 4 >> 2] = c[s + 4 >> 2];Ih(a, 4602, d) | 0;c[r >> 2] = 23;c[r + 4 >> 2] = 0;c[d >> 2] = c[r >> 2];c[d + 4 >> 2] = c[r + 4 >> 2];Ih(a, 4619, d) | 0;c[q >> 2] = 14;c[q + 4 >> 2] = 0;c[d >> 2] = c[q >> 2];c[d + 4 >> 2] = c[q + 4 >> 2];Yh(a, 4629, d) | 0;c[p >> 2] = 1;c[p + 4 >> 2] = 0;c[d >> 2] = c[p >> 2];c[d + 4 >> 2] = c[p + 4 >> 2];Zh(a, 4637, d) | 0;c[o >> 2] = 4;c[o + 4 >> 2] = 0;c[d >> 2] = c[o >> 2];c[d + 4 >> 2] = c[o + 4 >> 2];Qh(a, 4653, d) | 0;c[n >> 2] = 5;c[n + 4 >> 2] = 0;c[d >> 2] = c[n >> 2];c[d + 4 >> 2] = c[n + 4 >> 2];Qh(a, 4669, d) | 0;c[m >> 2] = 6;c[m + 4 >> 2] = 0;c[d >> 2] = c[m >> 2];c[d + 4 >> 2] = c[m + 4 >> 2];Qh(a, 4686, d) | 0;c[k >> 2] = 7;c[k + 4 >> 2] = 0;c[d >> 2] = c[k >> 2];c[d + 4 >> 2] = c[k + 4 >> 2];Qh(a, 4701, d) | 0;c[j >> 2] = 8;c[j + 4 >> 2] = 0;c[d >> 2] = c[j >> 2];c[d + 4 >> 2] = c[j + 4 >> 2];Qh(a, 4719, d) | 0;c[i >> 2] = 9;c[i + 4 >> 2] = 0;c[d >> 2] = c[i >> 2];c[d + 4 >> 2] = c[i + 4 >> 2];Qh(a, 4736, d) | 0;c[h >> 2] = 21;c[h + 4 >> 2] = 0;c[d >> 2] = c[h >> 2];c[d + 4 >> 2] = c[h + 4 >> 2];_h(a, 4754, d) | 0;c[g >> 2] = 2;c[g + 4 >> 2] = 0;c[d >> 2] = c[g >> 2];c[d + 4 >> 2] = c[g + 4 >> 2];Rh(a, 4772, d) | 0;c[f >> 2] = 3;c[f + 4 >> 2] = 0;c[d >> 2] = c[f >> 2];c[d + 4 >> 2] = c[f + 4 >> 2];Rh(a, 4790, d) | 0;c[e >> 2] = 4;c[e + 4 >> 2] = 0;c[d >> 2] = c[e >> 2];c[d + 4 >> 2] = c[e + 4 >> 2];Rh(a, 4808, d) | 0;l = b;return;
      }function Eh(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = dr() | 0;c[a >> 2] = d;er(d, b);Hv(c[a >> 2] | 0);return;
      }function Fh(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Oq(a, ai(b) | 0, c, 0);return a | 0;
      }function Gh(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;tq(a, ai(b) | 0, c, 0);return a | 0;
      }function Hh(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;cq(a, ai(b) | 0, c, 0);return a | 0;
      }function Ih(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Lp(a, b, f);l = e;return a | 0;
      }function Jh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];pp(a, b, f);l = e;return a | 0;
      }function Kh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Yo(a, b, f);l = e;return a | 0;
      }function Lh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Fo(a, b, f);l = e;return a | 0;
      }function Mh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];mo(a, b, f);l = e;return a | 0;
      }function Nh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Un(a, b, f);l = e;return a | 0;
      }function Oh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Bn(a, b, f);l = e;return a | 0;
      }function Ph(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Um(a, b, f);l = e;return a | 0;
      }function Qh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Bm(a, b, f);l = e;return a | 0;
      }function Rh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];im(a, b, f);l = e;return a | 0;
      }function Sh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Rl(a, b, f);l = e;return a | 0;
      }function Th(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];vl(a, b, f);l = e;return a | 0;
      }function Uh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];bl(a, b, f);l = e;return a | 0;
      }function Vh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Kk(a, b, f);l = e;return a | 0;
      }function Wh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];nk(a, b, f);l = e;return a | 0;
      }function Xh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Rj(a, b, f);l = e;return a | 0;
      }function Yh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];xj(a, b, f);l = e;return a | 0;
      }function Zh(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];_i(a, b, f);l = e;return a | 0;
      }function _h(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];$h(a, b, f);l = e;return a | 0;
      }function $h(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];bi(a, d, f, 1);l = e;return;
      }function ai(a) {
        a = a | 0;return a | 0;
      }function bi(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = ci() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = di(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, ei(g, e) | 0, e);l = f;return;
      }function ci() {
        var b = 0,
            d = 0;if (!(a[7616] | 0)) {
          qi(9136);Ha(24, 9136, o | 0) | 0;d = 7616;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9136) | 0)) {
          b = 9136;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));qi(9136);
        }return 9136;
      }function di(a) {
        a = a | 0;return 0;
      }function ei(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = ci() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];ki(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          li(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function fi(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0;h = l;l = l + 32 | 0;o = h + 24 | 0;n = h + 20 | 0;j = h + 16 | 0;m = h + 12 | 0;k = h + 8 | 0;i = h + 4 | 0;p = h;c[n >> 2] = b;c[j >> 2] = d;c[m >> 2] = e;c[k >> 2] = f;c[i >> 2] = g;g = a + 28 | 0;c[p >> 2] = c[g >> 2];c[o >> 2] = c[p >> 2];gi(a + 24 | 0, o, n, m, k, j, i) | 0;c[g >> 2] = c[c[g >> 2] >> 2];l = h;return;
      }function gi(a, b, d, e, f, g, h) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;h = h | 0;a = hi(b) | 0;b = qC(24) | 0;ii(b + 4 | 0, c[d >> 2] | 0, c[e >> 2] | 0, c[f >> 2] | 0, c[g >> 2] | 0, c[h >> 2] | 0);c[b >> 2] = c[a >> 2];c[a >> 2] = b;return b | 0;
      }function hi(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function ii(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;c[a + 8 >> 2] = e;c[a + 12 >> 2] = f;c[a + 16 >> 2] = g;return;
      }function ji(a, b) {
        a = a | 0;b = b | 0;return b | a | 0;
      }function ki(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function li(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = mi(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;ni(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];ki(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;oi(a, i);pi(i);l = k;return;
        }
      }function mi(a) {
        a = a | 0;return 357913941;
      }function ni(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function oi(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function pi(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function qi(a) {
        a = a | 0;ui(a);return;
      }function ri(a) {
        a = a | 0;ti(a + 24 | 0);return;
      }function si(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function ti(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function ui(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 3, b, wi() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function vi() {
        return 9228;
      }function wi() {
        return 1140;
      }function xi(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = zi(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = Ai(b, e) | 0;l = d;return b | 0;
      }function yi(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;c[a + 8 >> 2] = e;c[a + 12 >> 2] = f;c[a + 16 >> 2] = g;return;
      }function zi(a) {
        a = a | 0;return (c[(ci() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Ai(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 48 | 0;e = f;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;ob[d & 31](e, a);e = Bi(e) | 0;l = f;return e | 0;
      }function Bi(a) {
        a = a | 0;var b = 0,
            c = 0,
            d = 0,
            e = 0;e = l;l = l + 32 | 0;b = e + 12 | 0;c = e;d = Di(Ci() | 0) | 0;if (!d) a = Ii(a) | 0;else {
          Ei(b, d);Fi(c, b);Gi(a, c);a = Hi(b) | 0;
        }l = e;return a | 0;
      }function Ci() {
        var b = 0;if (!(a[7632] | 0)) {
          Ti(9184);Ha(25, 9184, o | 0) | 0;b = 7632;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 9184;
      }function Di(a) {
        a = a | 0;return c[a + 36 >> 2] | 0;
      }function Ei(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = b;c[a + 4 >> 2] = a;c[a + 8 >> 2] = 0;return;
      }function Fi(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = c[b + 4 >> 2];c[a + 8 >> 2] = 0;return;
      }function Gi(a, b) {
        a = a | 0;b = b | 0;Ni(b, a, a + 8 | 0, a + 16 | 0, a + 24 | 0, a + 32 | 0, a + 40 | 0) | 0;return;
      }function Hi(a) {
        a = a | 0;return c[(c[a + 4 >> 2] | 0) + 8 >> 2] | 0;
      }function Ii(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;j = l;l = l + 16 | 0;d = j + 4 | 0;e = j;f = jy(8) | 0;g = f;h = qC(48) | 0;i = h;b = i + 48 | 0;do {
          c[i >> 2] = c[a >> 2];i = i + 4 | 0;a = a + 4 | 0;
        } while ((i | 0) < (b | 0));b = g + 4 | 0;c[b >> 2] = h;i = qC(8) | 0;h = c[b >> 2] | 0;c[e >> 2] = 0;c[d >> 2] = c[e >> 2];Ji(i, h, d);c[f >> 2] = i;l = j;return g | 0;
      }function Ji(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;d = qC(16) | 0;c[d + 4 >> 2] = 0;c[d + 8 >> 2] = 0;c[d >> 2] = 1092;c[d + 12 >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Ki(a) {
        a = a | 0;kC(a);sC(a);return;
      }function Li(a) {
        a = a | 0;a = c[a + 12 >> 2] | 0;if (a | 0) sC(a);return;
      }function Mi(a) {
        a = a | 0;sC(a);return;
      }function Ni(a, b, d, e, f, g, h) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;h = h | 0;g = Oi(c[a >> 2] | 0, b, d, e, f, g, h) | 0;h = a + 4 | 0;c[(c[h >> 2] | 0) + 8 >> 2] = g;return c[(c[h >> 2] | 0) + 8 >> 2] | 0;
      }function Oi(a, b, c, d, e, f, g) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var i = 0,
            j = 0;i = l;l = l + 16 | 0;j = i;UA(j);a = Sg(a) | 0;g = Pi(a, +h[b >> 3], +h[c >> 3], +h[d >> 3], +h[e >> 3], +h[f >> 3], +h[g >> 3]) | 0;WA(j);l = i;return g | 0;
      }function Pi(a, b, c, d, e, f, g) {
        a = a | 0;b = +b;c = +c;d = +d;e = +e;f = +f;g = +g;var h = 0;h = Vg(Qi() | 0) | 0;b = +Wg(b);c = +Wg(c);d = +Wg(d);e = +Wg(e);f = +Wg(f);return ya(0, h | 0, a | 0, +b, +c, +d, +e, +f, + +Wg(g)) | 0;
      }function Qi() {
        var b = 0;if (!(a[7624] | 0)) {
          Ri(9172);b = 7624;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 9172;
      }function Ri(a) {
        a = a | 0;fh(a, Si() | 0, 6);return;
      }function Si() {
        return 1112;
      }function Ti(a) {
        a = a | 0;Zi(a);return;
      }function Ui(a) {
        a = a | 0;Vi(a + 24 | 0);Wi(a + 16 | 0);return;
      }function Vi(a) {
        a = a | 0;Yi(a);return;
      }function Wi(a) {
        a = a | 0;Xi(a);return;
      }function Xi(a) {
        a = a | 0;var b = 0,
            d = 0;b = c[a >> 2] | 0;if (b | 0) do {
          d = b;b = c[b >> 2] | 0;sC(d);
        } while ((b | 0) != 0);c[a >> 2] = 0;return;
      }function Yi(a) {
        a = a | 0;var b = 0,
            d = 0;b = c[a >> 2] | 0;if (b | 0) do {
          d = b;b = c[b >> 2] | 0;sC(d);
        } while ((b | 0) != 0);c[a >> 2] = 0;return;
      }function Zi(b) {
        b = b | 0;var d = 0;c[b + 16 >> 2] = 0;c[b + 20 >> 2] = 0;d = b + 24 | 0;c[d >> 2] = 0;c[b + 28 >> 2] = d;c[b + 36 >> 2] = 0;a[b + 40 >> 0] = 0;a[b + 41 >> 0] = 0;return;
      }function _i(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];$i(a, d, f, 0);l = e;return;
      }function $i(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = aj() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = bj(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, cj(g, e) | 0, e);l = f;return;
      }function aj() {
        var b = 0,
            d = 0;if (!(a[7640] | 0)) {
          jj(9232);Ha(26, 9232, o | 0) | 0;d = 7640;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9232) | 0)) {
          b = 9232;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));jj(9232);
        }return 9232;
      }function bj(a) {
        a = a | 0;return 0;
      }function cj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = aj() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];dj(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          ej(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function dj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function ej(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = fj(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;gj(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];dj(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;hj(a, i);ij(i);l = k;return;
        }
      }function fj(a) {
        a = a | 0;return 357913941;
      }function gj(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function hj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function ij(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function jj(a) {
        a = a | 0;mj(a);return;
      }function kj(a) {
        a = a | 0;lj(a + 24 | 0);return;
      }function lj(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function mj(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 1, b, nj() | 0, 3);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function nj() {
        return 1144;
      }function oj(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = +d;e = +e;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0;g = l;l = l + 16 | 0;h = g + 8 | 0;i = g;j = pj(a) | 0;a = c[j + 4 >> 2] | 0;c[i >> 2] = c[j >> 2];c[i + 4 >> 2] = a;c[h >> 2] = c[i >> 2];c[h + 4 >> 2] = c[i + 4 >> 2];qj(b, h, d, e, f);l = g;return;
      }function pj(a) {
        a = a | 0;return (c[(aj() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function qj(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = +d;e = +e;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0;k = l;l = l + 16 | 0;h = k + 2 | 0;i = k + 1 | 0;j = k;g = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) g = c[(c[a >> 2] | 0) + g >> 2] | 0;rj(h, d);d = +sj(h, d);rj(i, e);e = +sj(i, e);tj(j, f);j = uj(j, f) | 0;qb[g & 1](a, d, e, j);l = k;return;
      }function rj(a, b) {
        a = a | 0;b = +b;return;
      }function sj(a, b) {
        a = a | 0;b = +b;return + +wj(b);
      }function tj(a, b) {
        a = a | 0;b = b | 0;return;
      }function uj(a, b) {
        a = a | 0;b = b | 0;return vj(b) | 0;
      }function vj(a) {
        a = a | 0;return a | 0;
      }function wj(a) {
        a = +a;return +a;
      }function xj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];yj(a, d, f, 1);l = e;return;
      }function yj(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = zj() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Aj(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Bj(g, e) | 0, e);l = f;return;
      }function zj() {
        var b = 0,
            d = 0;if (!(a[7648] | 0)) {
          Ij(9268);Ha(27, 9268, o | 0) | 0;d = 7648;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9268) | 0)) {
          b = 9268;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Ij(9268);
        }return 9268;
      }function Aj(a) {
        a = a | 0;return 0;
      }function Bj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = zj() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Cj(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Dj(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Cj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Dj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Ej(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Fj(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Cj(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Gj(a, i);Hj(i);l = k;return;
        }
      }function Ej(a) {
        a = a | 0;return 357913941;
      }function Fj(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Gj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Hj(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Ij(a) {
        a = a | 0;Lj(a);return;
      }function Jj(a) {
        a = a | 0;Kj(a + 24 | 0);return;
      }function Kj(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Lj(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 4, b, Mj() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Mj() {
        return 1160;
      }function Nj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = Oj(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = Pj(b, e) | 0;l = d;return b | 0;
      }function Oj(a) {
        a = a | 0;return (c[(zj() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Pj(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;return Qj(pb[d & 31](a) | 0) | 0;
      }function Qj(a) {
        a = a | 0;return a & 1 | 0;
      }function Rj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Sj(a, d, f, 0);l = e;return;
      }function Sj(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Tj() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Uj(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Vj(g, e) | 0, e);l = f;return;
      }function Tj() {
        var b = 0,
            d = 0;if (!(a[7656] | 0)) {
          ak(9304);Ha(28, 9304, o | 0) | 0;d = 7656;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9304) | 0)) {
          b = 9304;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));ak(9304);
        }return 9304;
      }function Uj(a) {
        a = a | 0;return 0;
      }function Vj(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Tj() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Wj(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Xj(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Wj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Xj(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Yj(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Zj(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Wj(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;_j(a, i);$j(i);l = k;return;
        }
      }function Yj(a) {
        a = a | 0;return 357913941;
      }function Zj(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function _j(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function $j(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function ak(a) {
        a = a | 0;dk(a);return;
      }function bk(a) {
        a = a | 0;ck(a + 24 | 0);return;
      }function ck(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function dk(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 5, b, ek() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function ek() {
        return 1164;
      }function fk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = gk(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];hk(b, f, d);l = e;return;
      }function gk(a) {
        a = a | 0;return (c[(Tj() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function hk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;ik(f, d);d = jk(f, d) | 0;ob[e & 31](a, d);kk(f);l = g;return;
      }function ik(a, b) {
        a = a | 0;b = b | 0;lk(a, b);return;
      }function jk(a, b) {
        a = a | 0;b = b | 0;return a | 0;
      }function kk(a) {
        a = a | 0;vf(a);return;
      }function lk(a, b) {
        a = a | 0;b = b | 0;mk(a, b);return;
      }function mk(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = b;return;
      }function nk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];ok(a, d, f, 0);l = e;return;
      }function ok(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = pk() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = qk(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, rk(g, e) | 0, e);l = f;return;
      }function pk() {
        var b = 0,
            d = 0;if (!(a[7664] | 0)) {
          yk(9340);Ha(29, 9340, o | 0) | 0;d = 7664;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9340) | 0)) {
          b = 9340;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));yk(9340);
        }return 9340;
      }function qk(a) {
        a = a | 0;return 0;
      }function rk(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = pk() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];sk(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          tk(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function sk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function tk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = uk(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;vk(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];sk(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;wk(a, i);xk(i);l = k;return;
        }
      }function uk(a) {
        a = a | 0;return 357913941;
      }function vk(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function wk(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function xk(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function yk(a) {
        a = a | 0;Bk(a);return;
      }function zk(a) {
        a = a | 0;Ak(a + 24 | 0);return;
      }function Ak(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Bk(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 4, b, Ck() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Ck() {
        return 1180;
      }function Dk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Ek(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];d = Fk(b, f, d) | 0;l = e;return d | 0;
      }function Ek(a) {
        a = a | 0;return (c[(pk() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Fk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;Gk(f, d);f = Hk(f, d) | 0;f = Ik(wb[e & 15](a, f) | 0) | 0;l = g;return f | 0;
      }function Gk(a, b) {
        a = a | 0;b = b | 0;return;
      }function Hk(a, b) {
        a = a | 0;b = b | 0;return Jk(b) | 0;
      }function Ik(a) {
        a = a | 0;return a | 0;
      }function Jk(a) {
        a = a | 0;return a | 0;
      }function Kk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Lk(a, d, f, 0);l = e;return;
      }function Lk(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Mk() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Nk(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Ok(g, e) | 0, e);l = f;return;
      }function Mk() {
        var b = 0,
            d = 0;if (!(a[7672] | 0)) {
          Vk(9376);Ha(30, 9376, o | 0) | 0;d = 7672;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9376) | 0)) {
          b = 9376;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Vk(9376);
        }return 9376;
      }function Nk(a) {
        a = a | 0;return 0;
      }function Ok(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Mk() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Pk(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Qk(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Pk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Qk(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Rk(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Sk(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Pk(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Tk(a, i);Uk(i);l = k;return;
        }
      }function Rk(a) {
        a = a | 0;return 357913941;
      }function Sk(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Tk(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Uk(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Vk(a) {
        a = a | 0;Yk(a);return;
      }function Wk(a) {
        a = a | 0;Xk(a + 24 | 0);return;
      }function Xk(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Yk(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 5, b, Zk() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Zk() {
        return 1196;
      }function _k(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = $k(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = al(b, e) | 0;l = d;return b | 0;
      }function $k(a) {
        a = a | 0;return (c[(Mk() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function al(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;return Ik(pb[d & 31](a) | 0) | 0;
      }function bl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];cl(a, d, f, 1);l = e;return;
      }function cl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = dl() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = el(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, fl(g, e) | 0, e);l = f;return;
      }function dl() {
        var b = 0,
            d = 0;if (!(a[7680] | 0)) {
          ml(9412);Ha(31, 9412, o | 0) | 0;d = 7680;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9412) | 0)) {
          b = 9412;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));ml(9412);
        }return 9412;
      }function el(a) {
        a = a | 0;return 0;
      }function fl(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = dl() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];gl(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          hl(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function gl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function hl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = il(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;jl(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];gl(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;kl(a, i);ll(i);l = k;return;
        }
      }function il(a) {
        a = a | 0;return 357913941;
      }function jl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function kl(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function ll(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function ml(a) {
        a = a | 0;pl(a);return;
      }function nl(a) {
        a = a | 0;ol(a + 24 | 0);return;
      }function ol(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function pl(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 6, b, ql() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function ql() {
        return 1200;
      }function rl(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = sl(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = tl(b, e) | 0;l = d;return b | 0;
      }function sl(a) {
        a = a | 0;return (c[(dl() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function tl(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;return ul(pb[d & 31](a) | 0) | 0;
      }function ul(a) {
        a = a | 0;return a | 0;
      }function vl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];wl(a, d, f, 0);l = e;return;
      }function wl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = xl() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = yl(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, zl(g, e) | 0, e);l = f;return;
      }function xl() {
        var b = 0,
            d = 0;if (!(a[7688] | 0)) {
          Gl(9448);Ha(32, 9448, o | 0) | 0;d = 7688;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9448) | 0)) {
          b = 9448;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Gl(9448);
        }return 9448;
      }function yl(a) {
        a = a | 0;return 0;
      }function zl(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = xl() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Al(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Bl(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Al(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Bl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Cl(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Dl(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Al(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;El(a, i);Fl(i);l = k;return;
        }
      }function Cl(a) {
        a = a | 0;return 357913941;
      }function Dl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function El(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Fl(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Gl(a) {
        a = a | 0;Jl(a);return;
      }function Hl(a) {
        a = a | 0;Il(a + 24 | 0);return;
      }function Il(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Jl(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 6, b, Kl() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Kl() {
        return 1204;
      }function Ll(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Ml(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Nl(b, f, d);l = e;return;
      }function Ml(a) {
        a = a | 0;return (c[(xl() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Nl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;Ol(f, d);f = Pl(f, d) | 0;ob[e & 31](a, f);l = g;return;
      }function Ol(a, b) {
        a = a | 0;b = b | 0;return;
      }function Pl(a, b) {
        a = a | 0;b = b | 0;return Ql(b) | 0;
      }function Ql(a) {
        a = a | 0;return a | 0;
      }function Rl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Sl(a, d, f, 0);l = e;return;
      }function Sl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Tl() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Ul(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Vl(g, e) | 0, e);l = f;return;
      }function Tl() {
        var b = 0,
            d = 0;if (!(a[7696] | 0)) {
          am(9484);Ha(33, 9484, o | 0) | 0;d = 7696;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9484) | 0)) {
          b = 9484;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));am(9484);
        }return 9484;
      }function Ul(a) {
        a = a | 0;return 0;
      }function Vl(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Tl() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Wl(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Xl(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Wl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Xl(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Yl(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Zl(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Wl(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;_l(a, i);$l(i);l = k;return;
        }
      }function Yl(a) {
        a = a | 0;return 357913941;
      }function Zl(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function _l(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function $l(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function am(a) {
        a = a | 0;dm(a);return;
      }function bm(a) {
        a = a | 0;cm(a + 24 | 0);return;
      }function cm(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function dm(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 1, b, em() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function em() {
        return 1212;
      }function fm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;g = f + 8 | 0;h = f;i = gm(a) | 0;a = c[i + 4 >> 2] | 0;c[h >> 2] = c[i >> 2];c[h + 4 >> 2] = a;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = c[h + 4 >> 2];hm(b, g, d, e);l = f;return;
      }function gm(a) {
        a = a | 0;return (c[(Tl() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function hm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;i = l;l = l + 16 | 0;g = i + 1 | 0;h = i;f = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) f = c[(c[a >> 2] | 0) + f >> 2] | 0;Ol(g, d);g = Pl(g, d) | 0;Gk(h, e);h = Hk(h, e) | 0;Eb[f & 15](a, g, h);l = i;return;
      }function im(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];jm(a, d, f, 1);l = e;return;
      }function jm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = km() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = lm(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, mm(g, e) | 0, e);l = f;return;
      }function km() {
        var b = 0,
            d = 0;if (!(a[7704] | 0)) {
          tm(9520);Ha(34, 9520, o | 0) | 0;d = 7704;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9520) | 0)) {
          b = 9520;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));tm(9520);
        }return 9520;
      }function lm(a) {
        a = a | 0;return 0;
      }function mm(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = km() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];nm(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          om(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function nm(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function om(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = pm(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;qm(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];nm(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;rm(a, i);sm(i);l = k;return;
        }
      }function pm(a) {
        a = a | 0;return 357913941;
      }function qm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function rm(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function sm(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function tm(a) {
        a = a | 0;wm(a);return;
      }function um(a) {
        a = a | 0;vm(a + 24 | 0);return;
      }function vm(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function wm(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 1, b, xm() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function xm() {
        return 1224;
      }function ym(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0.0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;g = f + 8 | 0;h = f;i = zm(a) | 0;a = c[i + 4 >> 2] | 0;c[h >> 2] = c[i >> 2];c[h + 4 >> 2] = a;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = c[h + 4 >> 2];e = +Am(b, g, d);l = f;return +e;
      }function zm(a) {
        a = a | 0;return (c[(km() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Am(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0.0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;tj(f, d);f = uj(f, d) | 0;h = +ch(+zb[e & 7](a, f));l = g;return +h;
      }function Bm(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Cm(a, d, f, 1);l = e;return;
      }function Cm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Dm() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Em(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Fm(g, e) | 0, e);l = f;return;
      }function Dm() {
        var b = 0,
            d = 0;if (!(a[7712] | 0)) {
          Mm(9556);Ha(35, 9556, o | 0) | 0;d = 7712;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9556) | 0)) {
          b = 9556;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Mm(9556);
        }return 9556;
      }function Em(a) {
        a = a | 0;return 0;
      }function Fm(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Dm() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Gm(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Hm(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Gm(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Hm(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Im(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Jm(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Gm(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Km(a, i);Lm(i);l = k;return;
        }
      }function Im(a) {
        a = a | 0;return 357913941;
      }function Jm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Km(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Lm(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Mm(a) {
        a = a | 0;Pm(a);return;
      }function Nm(a) {
        a = a | 0;Om(a + 24 | 0);return;
      }function Om(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Pm(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 5, b, Qm() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Qm() {
        return 1232;
      }function Rm(a, b) {
        a = a | 0;b = b | 0;var d = 0.0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Sm(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];d = +Tm(b, f);l = e;return +d;
      }function Sm(a) {
        a = a | 0;return (c[(Dm() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Tm(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;return + +ch(+ub[d & 15](a));
      }function Um(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Vm(a, d, f, 1);l = e;return;
      }function Vm(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Wm() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Xm(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Ym(g, e) | 0, e);l = f;return;
      }function Wm() {
        var b = 0,
            d = 0;if (!(a[7720] | 0)) {
          dn(9592);Ha(36, 9592, o | 0) | 0;d = 7720;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9592) | 0)) {
          b = 9592;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));dn(9592);
        }return 9592;
      }function Xm(a) {
        a = a | 0;return 0;
      }function Ym(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Wm() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Zm(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          _m(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Zm(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function _m(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = $m(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;an(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Zm(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;bn(a, i);cn(i);l = k;return;
        }
      }function $m(a) {
        a = a | 0;return 357913941;
      }function an(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function bn(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function cn(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function dn(a) {
        a = a | 0;gn(a);return;
      }function en(a) {
        a = a | 0;fn(a + 24 | 0);return;
      }function fn(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function gn(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 7, b, hn() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function hn() {
        return 1276;
      }function jn(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = kn(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = ln(b, e) | 0;l = d;return b | 0;
      }function kn(a) {
        a = a | 0;return (c[(Wm() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function ln(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 16 | 0;e = f;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;ob[d & 31](e, a);e = mn(e) | 0;l = f;return e | 0;
      }function mn(a) {
        a = a | 0;var b = 0,
            c = 0,
            d = 0,
            e = 0;e = l;l = l + 32 | 0;b = e + 12 | 0;c = e;d = Di(nn() | 0) | 0;if (!d) a = pn(a) | 0;else {
          Ei(b, d);Fi(c, b);on(a, c);a = Hi(b) | 0;
        }l = e;return a | 0;
      }function nn() {
        var b = 0;if (!(a[7736] | 0)) {
          An(9640);Ha(25, 9640, o | 0) | 0;b = 7736;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 9640;
      }function on(a, b) {
        a = a | 0;b = b | 0;un(b, a, a + 8 | 0) | 0;return;
      }
      function pn(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;d = l;l = l + 16 | 0;f = d + 4 | 0;h = d;e = jy(8) | 0;b = e;i = qC(16) | 0;c[i >> 2] = c[a >> 2];c[i + 4 >> 2] = c[a + 4 >> 2];c[i + 8 >> 2] = c[a + 8 >> 2];c[i + 12 >> 2] = c[a + 12 >> 2];g = b + 4 | 0;c[g >> 2] = i;a = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];qn(a, g, f);c[e >> 2] = a;l = d;return b | 0;
      }function qn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;d = qC(16) | 0;c[d + 4 >> 2] = 0;c[d + 8 >> 2] = 0;c[d >> 2] = 1244;c[d + 12 >> 2] = b;c[a + 4 >> 2] = d;return;
      }function rn(a) {
        a = a | 0;kC(a);sC(a);return;
      }function sn(a) {
        a = a | 0;a = c[a + 12 >> 2] | 0;if (a | 0) sC(a);return;
      }function tn(a) {
        a = a | 0;sC(a);return;
      }function un(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;b = vn(c[a >> 2] | 0, b, d) | 0;d = a + 4 | 0;c[(c[d >> 2] | 0) + 8 >> 2] = b;return c[(c[d >> 2] | 0) + 8 >> 2] | 0;
      }function vn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e;UA(f);a = Sg(a) | 0;d = wn(a, c[b >> 2] | 0, +h[d >> 3]) | 0;WA(f);l = e;return d | 0;
      }function wn(a, b, c) {
        a = a | 0;b = b | 0;c = +c;var d = 0;d = Vg(xn() | 0) | 0;b = Xg(b) | 0;return za(0, d | 0, a | 0, b | 0, + +Wg(c)) | 0;
      }function xn() {
        var b = 0;if (!(a[7728] | 0)) {
          yn(9628);b = 7728;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 9628;
      }function yn(a) {
        a = a | 0;fh(a, zn() | 0, 2);return;
      }function zn() {
        return 1264;
      }function An(a) {
        a = a | 0;Zi(a);return;
      }function Bn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Cn(a, d, f, 1);l = e;return;
      }function Cn(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Dn() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = En(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Fn(g, e) | 0, e);l = f;return;
      }function Dn() {
        var b = 0,
            d = 0;if (!(a[7744] | 0)) {
          Mn(9684);Ha(37, 9684, o | 0) | 0;d = 7744;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9684) | 0)) {
          b = 9684;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Mn(9684);
        }return 9684;
      }function En(a) {
        a = a | 0;return 0;
      }function Fn(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Dn() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Gn(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Hn(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Gn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Hn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = In(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Jn(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Gn(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Kn(a, i);Ln(i);l = k;return;
        }
      }function In(a) {
        a = a | 0;return 357913941;
      }function Jn(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Kn(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Ln(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Mn(a) {
        a = a | 0;Pn(a);return;
      }function Nn(a) {
        a = a | 0;On(a + 24 | 0);return;
      }function On(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Pn(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 5, b, Qn() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Qn() {
        return 1280;
      }function Rn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Sn(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];d = Tn(b, f, d) | 0;l = e;return d | 0;
      }function Sn(a) {
        a = a | 0;return (c[(Dn() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Tn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;h = l;l = l + 32 | 0;f = h;g = h + 16 | 0;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;tj(g, d);g = uj(g, d) | 0;Eb[e & 15](f, a, g);g = mn(f) | 0;l = h;return g | 0;
      }function Un(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Vn(a, d, f, 1);l = e;return;
      }function Vn(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Wn() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Xn(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Yn(g, e) | 0, e);l = f;return;
      }function Wn() {
        var b = 0,
            d = 0;if (!(a[7752] | 0)) {
          eo(9720);Ha(38, 9720, o | 0) | 0;d = 7752;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9720) | 0)) {
          b = 9720;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));eo(9720);
        }return 9720;
      }function Xn(a) {
        a = a | 0;return 0;
      }function Yn(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Wn() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Zn(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          _n(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Zn(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function _n(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = $n(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;ao(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Zn(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;bo(a, i);co(i);l = k;return;
        }
      }function $n(a) {
        a = a | 0;return 357913941;
      }function ao(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function bo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function co(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function eo(a) {
        a = a | 0;ho(a);return;
      }function fo(a) {
        a = a | 0;go(a + 24 | 0);return;
      }function go(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function ho(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 8, b, io() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function io() {
        return 1288;
      }function jo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = ko(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];b = lo(b, e) | 0;l = d;return b | 0;
      }function ko(a) {
        a = a | 0;return (c[(Wn() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function lo(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;return bh(pb[d & 31](a) | 0) | 0;
      }function mo(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];no(a, d, f, 0);l = e;return;
      }function no(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = oo() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = po(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, qo(g, e) | 0, e);l = f;return;
      }function oo() {
        var b = 0,
            d = 0;if (!(a[7760] | 0)) {
          xo(9756);Ha(39, 9756, o | 0) | 0;d = 7760;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9756) | 0)) {
          b = 9756;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));xo(9756);
        }return 9756;
      }function po(a) {
        a = a | 0;return 0;
      }function qo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = oo() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];ro(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          so(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function ro(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function so(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = to(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;uo(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];ro(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;vo(a, i);wo(i);l = k;return;
        }
      }function to(a) {
        a = a | 0;return 357913941;
      }function uo(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function vo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function wo(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function xo(a) {
        a = a | 0;Ao(a);return;
      }function yo(a) {
        a = a | 0;zo(a + 24 | 0);return;
      }function zo(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Ao(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 8, b, Bo() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Bo() {
        return 1292;
      }function Co(a, b, d) {
        a = a | 0;b = b | 0;d = +d;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Do(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Eo(b, f, d);l = e;return;
      }function Do(a) {
        a = a | 0;return (c[(oo() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Eo(a, b, d) {
        a = a | 0;b = b | 0;d = +d;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;rj(f, d);d = +sj(f, d);lb[e & 31](a, d);l = g;return;
      }function Fo(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Go(a, d, f, 0);l = e;return;
      }function Go(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Ho() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Io(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Jo(g, e) | 0, e);l = f;return;
      }function Ho() {
        var b = 0,
            d = 0;if (!(a[7768] | 0)) {
          Qo(9792);Ha(40, 9792, o | 0) | 0;d = 7768;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9792) | 0)) {
          b = 9792;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Qo(9792);
        }return 9792;
      }function Io(a) {
        a = a | 0;return 0;
      }function Jo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Ho() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Ko(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Lo(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Ko(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Lo(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Mo(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;No(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Ko(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Oo(a, i);Po(i);l = k;return;
        }
      }function Mo(a) {
        a = a | 0;return 357913941;
      }function No(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Oo(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Po(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Qo(a) {
        a = a | 0;To(a);return;
      }function Ro(a) {
        a = a | 0;So(a + 24 | 0);return;
      }function So(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function To(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 1, b, Uo() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Uo() {
        return 1300;
      }function Vo(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = +e;var f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;g = f + 8 | 0;h = f;i = Wo(a) | 0;a = c[i + 4 >> 2] | 0;c[h >> 2] = c[i >> 2];c[h + 4 >> 2] = a;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = c[h + 4 >> 2];Xo(b, g, d, e);l = f;return;
      }function Wo(a) {
        a = a | 0;return (c[(Ho() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Xo(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = +e;var f = 0,
            g = 0,
            h = 0,
            i = 0;i = l;l = l + 16 | 0;g = i + 1 | 0;h = i;f = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) f = c[(c[a >> 2] | 0) + f >> 2] | 0;tj(g, d);g = uj(g, d) | 0;rj(h, e);e = +sj(h, e);Gb[f & 15](a, g, e);l = i;return;
      }function Yo(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Zo(a, d, f, 0);l = e;return;
      }function Zo(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = _o() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = $o(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, ap(g, e) | 0, e);l = f;return;
      }function _o() {
        var b = 0,
            d = 0;if (!(a[7776] | 0)) {
          hp(9828);Ha(41, 9828, o | 0) | 0;d = 7776;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9828) | 0)) {
          b = 9828;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));hp(9828);
        }return 9828;
      }function $o(a) {
        a = a | 0;return 0;
      }function ap(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = _o() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];bp(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          cp(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function bp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function cp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = dp(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;ep(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];bp(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;fp(a, i);gp(i);l = k;return;
        }
      }function dp(a) {
        a = a | 0;return 357913941;
      }function ep(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function fp(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function gp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function hp(a) {
        a = a | 0;kp(a);return;
      }function ip(a) {
        a = a | 0;jp(a + 24 | 0);return;
      }function jp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function kp(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 7, b, lp() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function lp() {
        return 1312;
      }function mp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = np(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];op(b, f, d);l = e;return;
      }function np(a) {
        a = a | 0;return (c[(_o() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function op(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;tj(f, d);f = uj(f, d) | 0;ob[e & 31](a, f);l = g;return;
      }function pp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];qp(a, d, f, 0);l = e;return;
      }function qp(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = rp() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = sp(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, tp(g, e) | 0, e);l = f;return;
      }function rp() {
        var b = 0,
            d = 0;if (!(a[7784] | 0)) {
          Ap(9864);Ha(42, 9864, o | 0) | 0;d = 7784;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9864) | 0)) {
          b = 9864;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Ap(9864);
        }return 9864;
      }function sp(a) {
        a = a | 0;return 0;
      }function tp(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = rp() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];up(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          vp(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function up(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function vp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = wp(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;xp(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];up(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;yp(a, i);zp(i);l = k;return;
        }
      }function wp(a) {
        a = a | 0;return 357913941;
      }function xp(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function yp(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function zp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Ap(a) {
        a = a | 0;Dp(a);return;
      }function Bp(a) {
        a = a | 0;Cp(a + 24 | 0);return;
      }function Cp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Dp(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 8, b, Ep() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Ep() {
        return 1320;
      }function Fp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Gp(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Hp(b, f, d);l = e;return;
      }function Gp(a) {
        a = a | 0;return (c[(rp() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Hp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;Ip(f, d);f = Jp(f, d) | 0;ob[e & 31](a, f);l = g;return;
      }function Ip(a, b) {
        a = a | 0;b = b | 0;return;
      }function Jp(a, b) {
        a = a | 0;b = b | 0;return Kp(b) | 0;
      }function Kp(a) {
        a = a | 0;return a | 0;
      }function Lp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Mp(a, d, f, 0);l = e;return;
      }function Mp(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Np() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Op(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Pp(g, e) | 0, e);l = f;return;
      }function Np() {
        var b = 0,
            d = 0;if (!(a[7792] | 0)) {
          Wp(9900);Ha(43, 9900, o | 0) | 0;d = 7792;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9900) | 0)) {
          b = 9900;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Wp(9900);
        }return 9900;
      }function Op(a) {
        a = a | 0;return 0;
      }function Pp(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Np() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Qp(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Rp(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Qp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Rp(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Sp(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Tp(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Qp(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Up(a, i);Vp(i);l = k;return;
        }
      }function Sp(a) {
        a = a | 0;return 357913941;
      }function Tp(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Up(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Vp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Wp(a) {
        a = a | 0;Zp(a);return;
      }function Xp(a) {
        a = a | 0;Yp(a + 24 | 0);return;
      }function Yp(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Zp(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 22, b, _p() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function _p() {
        return 1344;
      }function $p(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0;d = l;l = l + 16 | 0;e = d + 8 | 0;f = d;g = aq(a) | 0;a = c[g + 4 >> 2] | 0;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = a;c[e >> 2] = c[f >> 2];c[e + 4 >> 2] = c[f + 4 >> 2];bq(b, e);l = d;return;
      }function aq(a) {
        a = a | 0;return (c[(Np() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function bq(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) d = c[(c[a >> 2] | 0) + d >> 2] | 0;nb[d & 127](a);return;
      }function cq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = dq() | 0;a = eq(d) | 0;fi(g, b, f, a, fq(d, e) | 0, e);return;
      }function dq() {
        var b = 0,
            d = 0;if (!(a[7800] | 0)) {
          mq(9936);Ha(44, 9936, o | 0) | 0;d = 7800;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9936) | 0)) {
          b = 9936;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));mq(9936);
        }return 9936;
      }function eq(a) {
        a = a | 0;return a | 0;
      }function fq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = dq() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          gq(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          hq(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function gq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function hq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = iq(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;jq(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;gq(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;kq(a, f);lq(f);l = i;return;
        }
      }function iq(a) {
        a = a | 0;return 536870911;
      }function jq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function kq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function lq(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function mq(a) {
        a = a | 0;pq(a);return;
      }function nq(a) {
        a = a | 0;oq(a + 24 | 0);return;
      }function oq(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function pq(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 23, b, Kl() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function qq(a, b) {
        a = a | 0;b = b | 0;sq(c[(rq(a) | 0) >> 2] | 0, b);return;
      }function rq(a) {
        a = a | 0;return (c[(dq() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function sq(a, b) {
        a = a | 0;b = b | 0;var c = 0,
            d = 0;c = l;l = l + 16 | 0;d = c;Ol(d, b);b = Pl(d, b) | 0;nb[a & 127](b);l = c;return;
      }function tq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = uq() | 0;a = vq(d) | 0;fi(g, b, f, a, wq(d, e) | 0, e);return;
      }function uq() {
        var b = 0,
            d = 0;if (!(a[7808] | 0)) {
          Dq(9972);Ha(45, 9972, o | 0) | 0;d = 7808;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(9972) | 0)) {
          b = 9972;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Dq(9972);
        }return 9972;
      }function vq(a) {
        a = a | 0;return a | 0;
      }function wq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = uq() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          xq(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          yq(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function xq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function yq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = zq(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Aq(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;xq(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Bq(a, f);Cq(f);l = i;return;
        }
      }function zq(a) {
        a = a | 0;return 536870911;
      }function Aq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Bq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Cq(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Dq(a) {
        a = a | 0;Gq(a);return;
      }function Eq(a) {
        a = a | 0;Fq(a + 24 | 0);return;
      }function Fq(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Gq(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 9, b, Hq() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Hq() {
        return 1348;
      }function Iq(a, b) {
        a = a | 0;b = b | 0;return Kq(c[(Jq(a) | 0) >> 2] | 0, b) | 0;
      }function Jq(a) {
        a = a | 0;return (c[(uq() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function Kq(a, b) {
        a = a | 0;b = b | 0;var c = 0,
            d = 0;c = l;l = l + 16 | 0;d = c;Lq(d, b);b = Mq(d, b) | 0;b = Ik(pb[a & 31](b) | 0) | 0;l = c;return b | 0;
      }function Lq(a, b) {
        a = a | 0;b = b | 0;return;
      }function Mq(a, b) {
        a = a | 0;b = b | 0;return Nq(b) | 0;
      }function Nq(a) {
        a = a | 0;return a | 0;
      }function Oq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Pq() | 0;a = Qq(d) | 0;fi(g, b, f, a, Rq(d, e) | 0, e);return;
      }function Pq() {
        var b = 0,
            d = 0;if (!(a[7816] | 0)) {
          Yq(10008);Ha(46, 10008, o | 0) | 0;d = 7816;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10008) | 0)) {
          b = 10008;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Yq(10008);
        }return 10008;
      }function Qq(a) {
        a = a | 0;return a | 0;
      }function Rq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Pq() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          Sq(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          Tq(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function Sq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Tq(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = Uq(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Vq(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;Sq(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Wq(a, f);Xq(f);l = i;return;
        }
      }function Uq(a) {
        a = a | 0;return 536870911;
      }function Vq(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Wq(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Xq(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Yq(a) {
        a = a | 0;$q(a);return;
      }function Zq(a) {
        a = a | 0;_q(a + 24 | 0);return;
      }function _q(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function $q(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 15, b, Zk() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function ar(a) {
        a = a | 0;return cr(c[(br(a) | 0) >> 2] | 0) | 0;
      }function br(a) {
        a = a | 0;return (c[(Pq() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function cr(a) {
        a = a | 0;return Ik(Ab[a & 7]() | 0) | 0;
      }function dr() {
        var b = 0;if (!(a[7832] | 0)) {
          nr(10052);Ha(25, 10052, o | 0) | 0;b = 7832;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10052;
      }function er(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = fr() | 0;c[a + 4 >> 2] = gr() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = hr() | 0;c[a + 32 >> 2] = 2;return;
      }function fr() {
        return 11709;
      }function gr() {
        return 1188;
      }function hr() {
        return lr() | 0;
      }function ir(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            kr(c);sC(c);
          }
        } else if (b | 0) {
          uf(b);sC(b);
        }return;
      }function jr(a, b) {
        a = a | 0;b = b | 0;return b & a | 0;
      }function kr(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function lr() {
        var b = 0;if (!(a[7824] | 0)) {
          c[2511] = mr() | 0;c[2512] = 0;b = 7824;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10044;
      }function mr() {
        return 0;
      }function nr(a) {
        a = a | 0;Zi(a);return;
      }function or(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0;b = l;l = l + 32 | 0;d = b + 24 | 0;g = b + 16 | 0;f = b + 8 | 0;e = b;pr(a, 4827);qr(a, 4834, 3) | 0;rr(a, 3682, 47) | 0;c[g >> 2] = 9;c[g + 4 >> 2] = 0;c[d >> 2] = c[g >> 2];c[d + 4 >> 2] = c[g + 4 >> 2];sr(a, 4841, d) | 0;c[f >> 2] = 1;c[f + 4 >> 2] = 0;c[d >> 2] = c[f >> 2];c[d + 4 >> 2] = c[f + 4 >> 2];tr(a, 4871, d) | 0;c[e >> 2] = 10;c[e + 4 >> 2] = 0;c[d >> 2] = c[e >> 2];c[d + 4 >> 2] = c[e + 4 >> 2];ur(a, 4891, d) | 0;l = b;return;
      }function pr(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = nt() | 0;c[a >> 2] = d;ot(d, b);Hv(c[a >> 2] | 0);return;
      }function qr(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Ws(a, ai(b) | 0, c, 0);return a | 0;
      }function rr(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Es(a, ai(b) | 0, c, 0);return a | 0;
      }function sr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];is(a, b, f);l = e;return a | 0;
      }function tr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Or(a, b, f);l = e;return a | 0;
      }function ur(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = c[d + 4 >> 2] | 0;c[g >> 2] = c[d >> 2];c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];vr(a, b, f);l = e;return a | 0;
      }function vr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];wr(a, d, f, 1);l = e;return;
      }function wr(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = xr() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = yr(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, zr(g, e) | 0, e);l = f;return;
      }function xr() {
        var b = 0,
            d = 0;if (!(a[7840] | 0)) {
          Gr(10100);Ha(48, 10100, o | 0) | 0;d = 7840;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10100) | 0)) {
          b = 10100;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Gr(10100);
        }return 10100;
      }function yr(a) {
        a = a | 0;return 0;
      }function zr(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = xr() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Ar(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Br(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Ar(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Br(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Cr(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Dr(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Ar(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Er(a, i);Fr(i);l = k;return;
        }
      }function Cr(a) {
        a = a | 0;return 357913941;
      }function Dr(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Er(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Fr(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Gr(a) {
        a = a | 0;Jr(a);return;
      }function Hr(a) {
        a = a | 0;Ir(a + 24 | 0);return;
      }function Ir(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function Jr(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 6, b, Kr() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Kr() {
        return 1364;
      }function Lr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = Mr(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];d = Nr(b, f, d) | 0;l = e;return d | 0;
      }function Mr(a) {
        a = a | 0;return (c[(xr() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function Nr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;tj(f, d);f = uj(f, d) | 0;f = Qj(wb[e & 15](a, f) | 0) | 0;l = g;return f | 0;
      }function Or(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];Pr(a, d, f, 0);l = e;return;
      }function Pr(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = Qr() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = Rr(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, Sr(g, e) | 0, e);l = f;return;
      }function Qr() {
        var b = 0,
            d = 0;if (!(a[7848] | 0)) {
          Zr(10136);Ha(49, 10136, o | 0) | 0;d = 7848;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10136) | 0)) {
          b = 10136;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Zr(10136);
        }return 10136;
      }function Rr(a) {
        a = a | 0;return 0;
      }function Sr(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = Qr() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];Tr(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          Ur(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function Tr(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function Ur(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = Vr(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;Wr(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];Tr(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;Xr(a, i);Yr(i);l = k;return;
        }
      }function Vr(a) {
        a = a | 0;return 357913941;
      }function Wr(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function Xr(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Yr(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Zr(a) {
        a = a | 0;as(a);return;
      }function _r(a) {
        a = a | 0;$r(a + 24 | 0);return;
      }function $r(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function as(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 9, b, bs() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function bs() {
        return 1372;
      }function cs(a, b, d) {
        a = a | 0;b = b | 0;d = +d;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;h = ds(a) | 0;a = c[h + 4 >> 2] | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = a;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];es(b, f, d);l = e;return;
      }function ds(a) {
        a = a | 0;return (c[(Qr() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function es(a, b, d) {
        a = a | 0;b = b | 0;d = +d;var e = 0,
            f = 0,
            g = 0,
            h = ib;g = l;l = l + 16 | 0;f = g;e = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) e = c[(c[a >> 2] | 0) + e >> 2] | 0;fs(f, d);h = T(gs(f, d));kb[e & 1](a, h);l = g;return;
      }function fs(a, b) {
        a = a | 0;b = +b;return;
      }function gs(a, b) {
        a = a | 0;b = +b;return T(hs(b));
      }function hs(a) {
        a = +a;return T(a);
      }function is(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 16 | 0;f = e + 8 | 0;g = e;i = c[d >> 2] | 0;h = c[d + 4 >> 2] | 0;d = ai(b) | 0;c[g >> 2] = i;c[g + 4 >> 2] = h;c[f >> 2] = c[g >> 2];c[f + 4 >> 2] = c[g + 4 >> 2];js(a, d, f, 0);l = e;return;
      }function js(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;f = l;l = l + 32 | 0;g = f + 16 | 0;m = f + 8 | 0;i = f;k = c[d >> 2] | 0;j = c[d + 4 >> 2] | 0;h = c[a >> 2] | 0;a = ks() | 0;c[m >> 2] = k;c[m + 4 >> 2] = j;c[g >> 2] = c[m >> 2];c[g + 4 >> 2] = c[m + 4 >> 2];d = ls(g) | 0;c[i >> 2] = k;c[i + 4 >> 2] = j;c[g >> 2] = c[i >> 2];c[g + 4 >> 2] = c[i + 4 >> 2];fi(h, b, a, d, ms(g, e) | 0, e);l = f;return;
      }function ks() {
        var b = 0,
            d = 0;if (!(a[7856] | 0)) {
          ts(10172);Ha(50, 10172, o | 0) | 0;d = 7856;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10172) | 0)) {
          b = 10172;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));ts(10172);
        }return 10172;
      }function ls(a) {
        a = a | 0;return 0;
      }function ms(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;m = l;l = l + 32 | 0;f = m + 24 | 0;h = m + 16 | 0;i = m;j = m + 8 | 0;g = c[a >> 2] | 0;e = c[a + 4 >> 2] | 0;c[i >> 2] = g;c[i + 4 >> 2] = e;n = ks() | 0;k = n + 24 | 0;a = ji(b, 4) | 0;c[j >> 2] = a;b = n + 28 | 0;d = c[b >> 2] | 0;if (d >>> 0 < (c[n + 32 >> 2] | 0) >>> 0) {
          c[h >> 2] = g;c[h + 4 >> 2] = e;c[f >> 2] = c[h >> 2];c[f + 4 >> 2] = c[h + 4 >> 2];ns(d, f, a);a = (c[b >> 2] | 0) + 12 | 0;c[b >> 2] = a;
        } else {
          os(k, i, j);a = c[b >> 2] | 0;
        }l = m;return ((a - (c[k >> 2] | 0) | 0) / 12 | 0) + -1 | 0;
      }function ns(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0;e = c[b + 4 >> 2] | 0;c[a >> 2] = c[b >> 2];c[a + 4 >> 2] = e;c[a + 8 >> 2] = d;return;
      }function os(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0;k = l;l = l + 48 | 0;e = k + 32 | 0;h = k + 24 | 0;i = k;j = a + 4 | 0;f = (((c[j >> 2] | 0) - (c[a >> 2] | 0) | 0) / 12 | 0) + 1 | 0;g = ps(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          m = c[a >> 2] | 0;o = ((c[a + 8 >> 2] | 0) - m | 0) / 12 | 0;n = o << 1;qs(i, o >>> 0 < g >>> 1 >>> 0 ? n >>> 0 < f >>> 0 ? f : n : g, ((c[j >> 2] | 0) - m | 0) / 12 | 0, a + 8 | 0);j = i + 8 | 0;g = c[j >> 2] | 0;f = c[b + 4 >> 2] | 0;d = c[d >> 2] | 0;c[h >> 2] = c[b >> 2];c[h + 4 >> 2] = f;c[e >> 2] = c[h >> 2];c[e + 4 >> 2] = c[h + 4 >> 2];ns(g, e, d);c[j >> 2] = (c[j >> 2] | 0) + 12;rs(a, i);ss(i);l = k;return;
        }
      }function ps(a) {
        a = a | 0;return 357913941;
      }function qs(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 357913941) Ta();else {
            f = qC(b * 12 | 0) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d * 12 | 0) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b * 12 | 0);return;
      }function rs(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (((f | 0) / -12 | 0) * 12 | 0) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function ss(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~(((e + -12 - b | 0) >>> 0) / 12 | 0) * 12 | 0);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function ts(a) {
        a = a | 0;ws(a);return;
      }function us(a) {
        a = a | 0;vs(a + 24 | 0);return;
      }function vs(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~(((b + -12 - e | 0) >>> 0) / 12 | 0) * 12 | 0);sC(d);
        }return;
      }function ws(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 2, 3, b, xs() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function xs() {
        return 1380;
      }function ys(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;g = f + 8 | 0;h = f;i = zs(a) | 0;a = c[i + 4 >> 2] | 0;c[h >> 2] = c[i >> 2];c[h + 4 >> 2] = a;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = c[h + 4 >> 2];As(b, g, d, e);l = f;return;
      }function zs(a) {
        a = a | 0;return (c[(ks() | 0) + 24 >> 2] | 0) + (a * 12 | 0) | 0;
      }function As(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;i = l;l = l + 16 | 0;g = i + 1 | 0;h = i;f = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;a = a + (b >> 1) | 0;if (b & 1) f = c[(c[a >> 2] | 0) + f >> 2] | 0;tj(g, d);g = uj(g, d) | 0;Bs(h, e);h = Cs(h, e) | 0;Eb[f & 15](a, g, h);l = i;return;
      }function Bs(a, b) {
        a = a | 0;b = b | 0;return;
      }function Cs(a, b) {
        a = a | 0;b = b | 0;return Ds(b) | 0;
      }function Ds(a) {
        a = a | 0;return (a | 0) != 0 | 0;
      }function Es(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Fs() | 0;a = Gs(d) | 0;fi(g, b, f, a, Hs(d, e) | 0, e);return;
      }function Fs() {
        var b = 0,
            d = 0;if (!(a[7864] | 0)) {
          Os(10208);Ha(51, 10208, o | 0) | 0;d = 7864;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10208) | 0)) {
          b = 10208;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Os(10208);
        }return 10208;
      }function Gs(a) {
        a = a | 0;return a | 0;
      }function Hs(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Fs() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          Is(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          Js(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function Is(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Js(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = Ks(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Ls(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;Is(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Ms(a, f);Ns(f);l = i;return;
        }
      }function Ks(a) {
        a = a | 0;return 536870911;
      }function Ls(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Ms(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Ns(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Os(a) {
        a = a | 0;Rs(a);return;
      }function Ps(a) {
        a = a | 0;Qs(a + 24 | 0);return;
      }function Qs(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Rs(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 24, b, Ss() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Ss() {
        return 1392;
      }function Ts(a, b) {
        a = a | 0;b = b | 0;Vs(c[(Us(a) | 0) >> 2] | 0, b);return;
      }function Us(a) {
        a = a | 0;return (c[(Fs() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function Vs(a, b) {
        a = a | 0;b = b | 0;var c = 0,
            d = 0;c = l;l = l + 16 | 0;d = c;Lq(d, b);b = Mq(d, b) | 0;nb[a & 127](b);l = c;return;
      }function Ws(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Xs() | 0;a = Ys(d) | 0;fi(g, b, f, a, Zs(d, e) | 0, e);return;
      }function Xs() {
        var b = 0,
            d = 0;if (!(a[7872] | 0)) {
          et(10244);Ha(52, 10244, o | 0) | 0;d = 7872;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10244) | 0)) {
          b = 10244;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));et(10244);
        }return 10244;
      }function Ys(a) {
        a = a | 0;return a | 0;
      }function Zs(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Xs() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          _s(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          $s(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function _s(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function $s(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = at(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;bt(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;_s(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;ct(a, f);dt(f);l = i;return;
        }
      }function at(a) {
        a = a | 0;return 536870911;
      }function bt(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function ct(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function dt(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function et(a) {
        a = a | 0;ht(a);return;
      }function ft(a) {
        a = a | 0;gt(a + 24 | 0);return;
      }function gt(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function ht(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 16, b, it() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function it() {
        return 1400;
      }function jt(a) {
        a = a | 0;return lt(c[(kt(a) | 0) >> 2] | 0) | 0;
      }function kt(a) {
        a = a | 0;return (c[(Xs() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function lt(a) {
        a = a | 0;return mt(Ab[a & 7]() | 0) | 0;
      }function mt(a) {
        a = a | 0;return a | 0;
      }function nt() {
        var b = 0;if (!(a[7880] | 0)) {
          ut(10280);Ha(25, 10280, o | 0) | 0;b = 7880;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10280;
      }function ot(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = pt() | 0;c[a + 4 >> 2] = qt() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = rt() | 0;c[a + 32 >> 2] = 4;return;
      }function pt() {
        return 11711;
      }function qt() {
        return 1356;
      }function rt() {
        return lr() | 0;
      }function st(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            tt(c);sC(c);
          }
        } else if (b | 0) {
          mf(b);sC(b);
        }return;
      }function tt(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function ut(a) {
        a = a | 0;Zi(a);return;
      }function vt(a) {
        a = a | 0;wt(a, 4920);xt(a) | 0;yt(a) | 0;return;
      }function wt(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = nn() | 0;c[a >> 2] = d;Yt(d, b);Hv(c[a >> 2] | 0);return;
      }function xt(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, Mt() | 0);return a | 0;
      }function yt(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, zt() | 0);return a | 0;
      }function zt() {
        var b = 0;if (!(a[7888] | 0)) {
          Bt(10328);Ha(53, 10328, o | 0) | 0;b = 7888;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10328) | 0)) Bt(10328);return 10328;
      }function At(a, b) {
        a = a | 0;b = b | 0;fi(a, 0, b, 0, 0, 0);return;
      }function Bt(a) {
        a = a | 0;Et(a);Gt(a, 10);return;
      }function Ct(a) {
        a = a | 0;Dt(a + 24 | 0);return;
      }function Dt(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Et(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 1, b, Jt() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Ft(a, b, c) {
        a = a | 0;b = b | 0;c = +c;Ht(a, b, c);return;
      }function Gt(a, b) {
        a = a | 0;b = b | 0;c[a + 20 >> 2] = b;return;
      }function Ht(a, b, d) {
        a = a | 0;b = b | 0;d = +d;var e = 0,
            f = 0,
            g = 0,
            i = 0,
            j = 0;e = l;l = l + 16 | 0;g = e + 8 | 0;j = e + 13 | 0;f = e;i = e + 12 | 0;tj(j, b);c[g >> 2] = uj(j, b) | 0;rj(i, d);h[f >> 3] = +sj(i, d);It(a, g, f);l = e;return;
      }function It(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;mg(b + 8 | 0, c[d >> 2] | 0, +h[e >> 3]);a[b + 24 >> 0] = 1;return;
      }function Jt() {
        return 1404;
      }function Kt(a, b) {
        a = a | 0;b = +b;return Lt(a, b) | 0;
      }function Lt(a, b) {
        a = a | 0;b = +b;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;e = l;l = l + 16 | 0;g = e + 4 | 0;h = e + 8 | 0;i = e;f = jy(8) | 0;d = f;j = qC(16) | 0;tj(g, a);a = uj(g, a) | 0;rj(h, b);mg(j, a, +sj(h, b));h = d + 4 | 0;c[h >> 2] = j;a = qC(8) | 0;h = c[h >> 2] | 0;c[i >> 2] = 0;c[g >> 2] = c[i >> 2];qn(a, h, g);c[f >> 2] = a;l = e;return d | 0;
      }function Mt() {
        var b = 0;if (!(a[7896] | 0)) {
          Nt(10364);Ha(54, 10364, o | 0) | 0;b = 7896;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10364) | 0)) Nt(10364);return 10364;
      }function Nt(a) {
        a = a | 0;Qt(a);Gt(a, 55);return;
      }function Ot(a) {
        a = a | 0;Pt(a + 24 | 0);return;
      }function Pt(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Qt(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 4, b, Vt() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Rt(a) {
        a = a | 0;St(a);return;
      }function St(a) {
        a = a | 0;Tt(a);return;
      }function Tt(b) {
        b = b | 0;Ut(b + 8 | 0);a[b + 24 >> 0] = 1;return;
      }function Ut(a) {
        a = a | 0;c[a >> 2] = 0;h[a + 8 >> 3] = 0.0;return;
      }function Vt() {
        return 1424;
      }function Wt() {
        return Xt() | 0;
      }function Xt() {
        var a = 0,
            b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;b = l;l = l + 16 | 0;f = b + 4 | 0;h = b;d = jy(8) | 0;a = d;e = qC(16) | 0;Ut(e);g = a + 4 | 0;c[g >> 2] = e;e = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];qn(e, g, f);c[d >> 2] = e;l = b;return a | 0;
      }function Yt(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = Zt() | 0;c[a + 4 >> 2] = _t() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = $t() | 0;c[a + 32 >> 2] = 5;return;
      }function Zt() {
        return 11710;
      }function _t() {
        return 1416;
      }function $t() {
        return cu() | 0;
      }function au(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            bu(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function bu(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function cu() {
        var b = 0;if (!(a[7904] | 0)) {
          c[2600] = du() | 0;c[2601] = 0;b = 7904;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10400;
      }function du() {
        return c[357] | 0;
      }function eu(a) {
        a = a | 0;fu(a, 4926);gu(a) | 0;return;
      }function fu(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = Ci() | 0;c[a >> 2] = d;su(d, b);Hv(c[a >> 2] | 0);return;
      }function gu(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, hu() | 0);return a | 0;
      }function hu() {
        var b = 0;if (!(a[7912] | 0)) {
          iu(10412);Ha(56, 10412, o | 0) | 0;b = 7912;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10412) | 0)) iu(10412);return 10412;
      }function iu(a) {
        a = a | 0;lu(a);Gt(a, 57);return;
      }function ju(a) {
        a = a | 0;ku(a + 24 | 0);return;
      }function ku(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function lu(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 5, b, pu() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function mu(a) {
        a = a | 0;nu(a);return;
      }function nu(a) {
        a = a | 0;ou(a);return;
      }function ou(b) {
        b = b | 0;var d = 0,
            e = 0;d = b + 8 | 0;e = d + 48 | 0;do {
          c[d >> 2] = 0;d = d + 4 | 0;
        } while ((d | 0) < (e | 0));a[b + 56 >> 0] = 1;return;
      }function pu() {
        return 1432;
      }function qu() {
        return ru() | 0;
      }function ru() {
        var a = 0,
            b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;h = l;l = l + 16 | 0;a = h + 4 | 0;b = h;d = jy(8) | 0;e = d;f = qC(48) | 0;g = f;i = g + 48 | 0;do {
          c[g >> 2] = 0;g = g + 4 | 0;
        } while ((g | 0) < (i | 0));g = e + 4 | 0;c[g >> 2] = f;i = qC(8) | 0;g = c[g >> 2] | 0;c[b >> 2] = 0;c[a >> 2] = c[b >> 2];Ji(i, g, a);c[d >> 2] = i;l = h;return e | 0;
      }function su(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = tu() | 0;c[a + 4 >> 2] = uu() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = vu() | 0;c[a + 32 >> 2] = 6;return;
      }function tu() {
        return 11704;
      }function uu() {
        return 1436;
      }function vu() {
        return cu() | 0;
      }function wu(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            xu(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function xu(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function yu(a) {
        a = a | 0;zu(a, 4933);Au(a) | 0;Bu(a) | 0;return;
      }function zu(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = cv() | 0;c[a >> 2] = d;dv(d, b);Hv(c[a >> 2] | 0);return;
      }function Au(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, Su() | 0);return a | 0;
      }function Bu(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, Cu() | 0);return a | 0;
      }function Cu() {
        var b = 0;if (!(a[7920] | 0)) {
          Du(10452);Ha(58, 10452, o | 0) | 0;b = 7920;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10452) | 0)) Du(10452);return 10452;
      }function Du(a) {
        a = a | 0;Gu(a);Gt(a, 1);return;
      }function Eu(a) {
        a = a | 0;Fu(a + 24 | 0);return;
      }function Fu(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Gu(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 1, b, Lu() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Hu(a, b, c) {
        a = a | 0;b = +b;c = +c;Iu(a, b, c);return;
      }function Iu(a, b, c) {
        a = a | 0;b = +b;c = +c;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            i = 0;d = l;l = l + 32 | 0;f = d + 8 | 0;i = d + 17 | 0;e = d;g = d + 16 | 0;rj(i, b);h[f >> 3] = +sj(i, b);rj(g, c);h[e >> 3] = +sj(g, c);Ju(a, f, e);l = d;return;
      }function Ju(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;Ku(b + 8 | 0, +h[c >> 3], +h[d >> 3]);a[b + 24 >> 0] = 1;return;
      }function Ku(a, b, c) {
        a = a | 0;b = +b;c = +c;h[a >> 3] = b;h[a + 8 >> 3] = c;return;
      }function Lu() {
        return 1472;
      }function Mu(a, b) {
        a = +a;b = +b;return Nu(a, b) | 0;
      }function Nu(a, b) {
        a = +a;b = +b;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;e = l;l = l + 16 | 0;h = e + 4 | 0;i = e + 8 | 0;j = e;f = jy(8) | 0;d = f;g = qC(16) | 0;rj(h, a);a = +sj(h, a);rj(i, b);Ku(g, a, +sj(i, b));i = d + 4 | 0;c[i >> 2] = g;g = qC(8) | 0;i = c[i >> 2] | 0;c[j >> 2] = 0;c[h >> 2] = c[j >> 2];Ou(g, i, h);c[f >> 2] = g;l = e;return d | 0;
      }function Ou(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;d = qC(16) | 0;c[d + 4 >> 2] = 0;c[d + 8 >> 2] = 0;c[d >> 2] = 1452;c[d + 12 >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Pu(a) {
        a = a | 0;kC(a);sC(a);return;
      }function Qu(a) {
        a = a | 0;a = c[a + 12 >> 2] | 0;if (a | 0) sC(a);return;
      }function Ru(a) {
        a = a | 0;sC(a);return;
      }function Su() {
        var b = 0;if (!(a[7928] | 0)) {
          Tu(10488);Ha(59, 10488, o | 0) | 0;b = 7928;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10488) | 0)) Tu(10488);return 10488;
      }function Tu(a) {
        a = a | 0;Wu(a);Gt(a, 60);return;
      }function Uu(a) {
        a = a | 0;Vu(a + 24 | 0);return;
      }function Vu(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Wu(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 6, b, $u() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Xu(a) {
        a = a | 0;Yu(a);return;
      }function Yu(a) {
        a = a | 0;Zu(a);return;
      }function Zu(b) {
        b = b | 0;_u(b + 8 | 0);a[b + 24 >> 0] = 1;return;
      }function _u(a) {
        a = a | 0;c[a >> 2] = 0;c[a + 4 >> 2] = 0;c[a + 8 >> 2] = 0;c[a + 12 >> 2] = 0;return;
      }function $u() {
        return 1492;
      }function av() {
        return bv() | 0;
      }function bv() {
        var a = 0,
            b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;b = l;l = l + 16 | 0;f = b + 4 | 0;h = b;d = jy(8) | 0;a = d;e = qC(16) | 0;_u(e);g = a + 4 | 0;c[g >> 2] = e;e = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];Ou(e, g, f);c[d >> 2] = e;l = b;return a | 0;
      }function cv() {
        var b = 0;if (!(a[7936] | 0)) {
          jv(10524);Ha(25, 10524, o | 0) | 0;b = 7936;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10524;
      }function dv(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = ev() | 0;c[a + 4 >> 2] = fv() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = gv() | 0;c[a + 32 >> 2] = 7;return;
      }function ev() {
        return 11700;
      }function fv() {
        return 1484;
      }function gv() {
        return cu() | 0;
      }function hv(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            iv(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function iv(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function jv(a) {
        a = a | 0;Zi(a);return;
      }function kv(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;a = ai(b) | 0;b = lv(c) | 0;c = mv(c, 0) | 0;Zv(a, b, c, nv() | 0, 0);return;
      }function lv(a) {
        a = a | 0;return a | 0;
      }function mv(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = nv() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          vv(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          wv(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function nv() {
        var b = 0,
            d = 0;if (!(a[7944] | 0)) {
          ov(10568);Ha(61, 10568, o | 0) | 0;d = 7944;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10568) | 0)) {
          b = 10568;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));ov(10568);
        }return 10568;
      }function ov(a) {
        a = a | 0;rv(a);return;
      }function pv(a) {
        a = a | 0;qv(a + 24 | 0);return;
      }function qv(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function rv(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 17, b, ql() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function sv(a) {
        a = a | 0;return uv(c[(tv(a) | 0) >> 2] | 0) | 0;
      }function tv(a) {
        a = a | 0;return (c[(nv() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function uv(a) {
        a = a | 0;return ul(Ab[a & 7]() | 0) | 0;
      }function vv(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function wv(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = xv(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;yv(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;vv(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;zv(a, f);Av(f);l = i;return;
        }
      }function xv(a) {
        a = a | 0;return 536870911;
      }function yv(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function zv(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Av(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Bv() {
        Cv();return;
      }function Cv() {
        Dv(10604);return;
      }function Dv(a) {
        a = a | 0;Ev(a, 4955);return;
      }function Ev(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = Fv() | 0;c[a >> 2] = d;Gv(d, b);Hv(c[a >> 2] | 0);return;
      }function Fv() {
        var b = 0;if (!(a[7952] | 0)) {
          Rv(10612);Ha(25, 10612, o | 0) | 0;b = 7952;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10612;
      }function Gv(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = Mv() | 0;c[a + 4 >> 2] = Nv() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = Ov() | 0;c[a + 32 >> 2] = 8;return;
      }function Hv(a) {
        a = a | 0;var b = 0,
            d = 0;b = l;l = l + 16 | 0;d = b;Iv() | 0;c[d >> 2] = a;Jv(10608, d);l = b;return;
      }function Iv() {
        if (!(a[11714] | 0)) {
          c[2652] = 0;Ha(62, 10608, o | 0) | 0;a[11714] = 1;
        }return 10608;
      }function Jv(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = qC(8) | 0;c[d + 4 >> 2] = c[b >> 2];c[d >> 2] = c[a >> 2];c[a >> 2] = d;return;
      }function Kv(a) {
        a = a | 0;Lv(a);return;
      }function Lv(a) {
        a = a | 0;var b = 0,
            d = 0;b = c[a >> 2] | 0;if (b | 0) do {
          d = b;b = c[b >> 2] | 0;sC(d);
        } while ((b | 0) != 0);c[a >> 2] = 0;return;
      }function Mv() {
        return 11715;
      }function Nv() {
        return 1496;
      }function Ov() {
        return lr() | 0;
      }function Pv(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            Qv(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function Qv(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function Rv(a) {
        a = a | 0;Zi(a);return;
      }function Sv(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;Iv() | 0;d = c[2652] | 0;a: do if (d | 0) {
          while (1) {
            e = c[d + 4 >> 2] | 0;if (e | 0 ? (AB(Tv(e) | 0, a) | 0) == 0 : 0) break;d = c[d >> 2] | 0;if (!d) break a;
          }Uv(e, b);
        } while (0);return;
      }function Tv(a) {
        a = a | 0;return c[a + 12 >> 2] | 0;
      }function Uv(a, b) {
        a = a | 0;b = b | 0;var d = 0;a = a + 36 | 0;d = c[a >> 2] | 0;if (d | 0) {
          vf(d);sC(d);
        }d = qC(4) | 0;Og(d, b);c[a >> 2] = d;return;
      }function Vv() {
        if (!(a[11716] | 0)) {
          c[2664] = 0;Ha(63, 10656, o | 0) | 0;a[11716] = 1;
        }return 10656;
      }function Wv() {
        var b = 0;if (!(a[11717] | 0)) {
          Xv();c[2665] = 1504;a[11717] = 1;b = 1504;
        } else b = c[2665] | 0;return b | 0;
      }function Xv() {
        if (!(a[11740] | 0)) {
          a[11718] = ji(ji(8, 0) | 0, 0) | 0;a[11719] = ji(ji(0, 0) | 0, 0) | 0;a[11720] = ji(ji(0, 16) | 0, 0) | 0;a[11721] = ji(ji(8, 0) | 0, 0) | 0;a[11722] = ji(ji(0, 0) | 0, 0) | 0;a[11723] = ji(ji(8, 0) | 0, 0) | 0;a[11724] = ji(ji(0, 0) | 0, 0) | 0;a[11725] = ji(ji(8, 0) | 0, 0) | 0;a[11726] = ji(ji(0, 0) | 0, 0) | 0;a[11727] = ji(ji(8, 0) | 0, 0) | 0;a[11728] = ji(ji(0, 0) | 0, 0) | 0;a[11729] = ji(ji(0, 0) | 0, 32) | 0;a[11730] = ji(ji(0, 0) | 0, 32) | 0;a[11740] = 1;
        }return;
      }function Yv() {
        return 1572;
      }function Zv(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;g = l;l = l + 32 | 0;m = g + 16 | 0;k = g + 12 | 0;j = g + 8 | 0;i = g + 4 | 0;h = g;c[m >> 2] = a;c[k >> 2] = b;c[j >> 2] = d;c[i >> 2] = e;c[h >> 2] = f;Vv() | 0;_v(10656, m, k, j, i, h);l = g;return;
      }function _v(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0;h = qC(24) | 0;ii(h + 4 | 0, c[b >> 2] | 0, c[d >> 2] | 0, c[e >> 2] | 0, c[f >> 2] | 0, c[g >> 2] | 0);c[h >> 2] = c[a >> 2];c[a >> 2] = h;return;
      }function $v(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = 0;u = l;l = l + 32 | 0;q = u + 20 | 0;r = u + 8 | 0;s = u + 4 | 0;t = u;b = c[b >> 2] | 0;if (b | 0) {
          p = q + 4 | 0;j = q + 8 | 0;k = r + 4 | 0;m = r + 8 | 0;n = r + 8 | 0;o = q + 8 | 0;do {
            h = b + 4 | 0;i = aw(h) | 0;if (i | 0) {
              f = bw(i) | 0;c[q >> 2] = 0;c[p >> 2] = 0;c[j >> 2] = 0;e = (cw(i) | 0) + 1 | 0;dw(q, e);if (e | 0) while (1) {
                e = e + -1 | 0;OA(r, c[f >> 2] | 0);g = c[p >> 2] | 0;if (g >>> 0 < (c[o >> 2] | 0) >>> 0) {
                  c[g >> 2] = c[r >> 2];c[p >> 2] = (c[p >> 2] | 0) + 4;
                } else ew(q, r);if (!e) break;else f = f + 4 | 0;
              }e = fw(i) | 0;c[r >> 2] = 0;c[k >> 2] = 0;c[m >> 2] = 0;a: do if (c[e >> 2] | 0) {
                f = 0;g = 0;while (1) {
                  if ((f | 0) == (g | 0)) gw(r, e);else {
                    c[f >> 2] = c[e >> 2];c[k >> 2] = (c[k >> 2] | 0) + 4;
                  }e = e + 4 | 0;if (!(c[e >> 2] | 0)) break a;f = c[k >> 2] | 0;g = c[n >> 2] | 0;
                }
              } while (0);c[s >> 2] = hw(h) | 0;c[t >> 2] = si(i) | 0;iw(d, a, s, t, q, r);jw(r);kw(q);
            }b = c[b >> 2] | 0;
          } while ((b | 0) != 0);
        }l = u;return;
      }function aw(a) {
        a = a | 0;return c[a + 12 >> 2] | 0;
      }function bw(a) {
        a = a | 0;return c[a + 12 >> 2] | 0;
      }function cw(a) {
        a = a | 0;return c[a + 16 >> 2] | 0;
      }function dw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 32 | 0;d = f;e = c[a >> 2] | 0;if ((c[a + 8 >> 2] | 0) - e >> 2 >>> 0 < b >>> 0) {
          Rw(d, b, (c[a + 4 >> 2] | 0) - e >> 2, a + 8 | 0);Sw(a, d);Tw(d);
        }l = f;return;
      }function ew(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0;h = l;l = l + 32 | 0;d = h;e = a + 4 | 0;f = ((c[e >> 2] | 0) - (c[a >> 2] | 0) >> 2) + 1 | 0;g = Nw(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          i = c[a >> 2] | 0;k = (c[a + 8 >> 2] | 0) - i | 0;j = k >> 1;Rw(d, k >> 2 >>> 0 < g >>> 1 >>> 0 ? j >>> 0 < f >>> 0 ? f : j : g, (c[e >> 2] | 0) - i >> 2, a + 8 | 0);g = d + 8 | 0;c[c[g >> 2] >> 2] = c[b >> 2];c[g >> 2] = (c[g >> 2] | 0) + 4;Sw(a, d);Tw(d);l = h;return;
        }
      }function fw(a) {
        a = a | 0;return c[a + 8 >> 2] | 0;
      }function gw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0;h = l;l = l + 32 | 0;d = h;e = a + 4 | 0;f = ((c[e >> 2] | 0) - (c[a >> 2] | 0) >> 2) + 1 | 0;g = Kw(a) | 0;if (g >>> 0 < f >>> 0) jC(a);else {
          i = c[a >> 2] | 0;k = (c[a + 8 >> 2] | 0) - i | 0;j = k >> 1;Ow(d, k >> 2 >>> 0 < g >>> 1 >>> 0 ? j >>> 0 < f >>> 0 ? f : j : g, (c[e >> 2] | 0) - i >> 2, a + 8 | 0);g = d + 8 | 0;c[c[g >> 2] >> 2] = c[b >> 2];c[g >> 2] = (c[g >> 2] | 0) + 4;Pw(a, d);Qw(d);l = h;return;
        }
      }function hw(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function iw(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;lw(a, b, c, d, e, f);return;
      }function jw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -4 - e | 0) >>> 2) << 2);sC(d);
        }return;
      }function kw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -4 - e | 0) >>> 2) << 2);sC(d);
        }return;
      }function lw(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;h = l;l = l + 48 | 0;m = h + 40 | 0;i = h + 32 | 0;n = h + 24 | 0;j = h + 12 | 0;k = h;UA(i);a = Sg(a) | 0;c[n >> 2] = c[b >> 2];d = c[d >> 2] | 0;e = c[e >> 2] | 0;mw(j, f);nw(k, g);c[m >> 2] = c[n >> 2];ow(a, m, d, e, j, k);jw(k);kw(j);WA(i);l = h;return;
      }function mw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;c[a >> 2] = 0;c[a + 4 >> 2] = 0;c[a + 8 >> 2] = 0;d = b + 4 | 0;e = (c[d >> 2] | 0) - (c[b >> 2] | 0) >> 2;if (e | 0) {
          Lw(a, e);Mw(a, c[b >> 2] | 0, c[d >> 2] | 0, e);
        }return;
      }function nw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;c[a >> 2] = 0;c[a + 4 >> 2] = 0;c[a + 8 >> 2] = 0;d = b + 4 | 0;e = (c[d >> 2] | 0) - (c[b >> 2] | 0) >> 2;if (e | 0) {
          Iw(a, e);Jw(a, c[b >> 2] | 0, c[d >> 2] | 0, e);
        }return;
      }function ow(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0;h = l;l = l + 32 | 0;m = h + 28 | 0;n = h + 24 | 0;i = h + 12 | 0;j = h;k = Vg(pw() | 0) | 0;c[n >> 2] = c[b >> 2];c[m >> 2] = c[n >> 2];b = qw(m) | 0;d = rw(d) | 0;e = sw(e) | 0;c[i >> 2] = c[f >> 2];m = f + 4 | 0;c[i + 4 >> 2] = c[m >> 2];n = f + 8 | 0;c[i + 8 >> 2] = c[n >> 2];c[n >> 2] = 0;c[m >> 2] = 0;c[f >> 2] = 0;f = tw(i) | 0;c[j >> 2] = c[g >> 2];m = g + 4 | 0;c[j + 4 >> 2] = c[m >> 2];n = g + 8 | 0;c[j + 8 >> 2] = c[n >> 2];c[n >> 2] = 0;c[m >> 2] = 0;c[g >> 2] = 0;Ba(0, k | 0, a | 0, b | 0, d | 0, e | 0, f | 0, uw(j) | 0) | 0;jw(j);kw(i);l = h;return;
      }function pw() {
        var b = 0;if (!(a[7968] | 0)) {
          Gw(10708);b = 7968;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10708;
      }function qw(a) {
        a = a | 0;return yw(a) | 0;
      }function rw(a) {
        a = a | 0;return ww(a) | 0;
      }function sw(a) {
        a = a | 0;return ul(a) | 0;
      }function tw(a) {
        a = a | 0;return xw(a) | 0;
      }function uw(a) {
        a = a | 0;return vw(a) | 0;
      }function vw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;e = (c[a + 4 >> 2] | 0) - (c[a >> 2] | 0) | 0;d = e >> 2;e = jy(e + 4 | 0) | 0;c[e >> 2] = d;if (d | 0) {
          b = 0;do {
            c[e + 4 + (b << 2) >> 2] = ww(c[(c[a >> 2] | 0) + (b << 2) >> 2] | 0) | 0;b = b + 1 | 0;
          } while ((b | 0) != (d | 0));
        }return e | 0;
      }function ww(a) {
        a = a | 0;return a | 0;
      }function xw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;e = (c[a + 4 >> 2] | 0) - (c[a >> 2] | 0) | 0;d = e >> 2;e = jy(e + 4 | 0) | 0;c[e >> 2] = d;if (d | 0) {
          b = 0;do {
            c[e + 4 + (b << 2) >> 2] = yw((c[a >> 2] | 0) + (b << 2) | 0) | 0;b = b + 1 | 0;
          } while ((b | 0) != (d | 0));
        }return e | 0;
      }function yw(a) {
        a = a | 0;var b = 0,
            c = 0,
            d = 0,
            e = 0;e = l;l = l + 32 | 0;b = e + 12 | 0;c = e;d = Di(zw() | 0) | 0;if (!d) a = Aw(a) | 0;else {
          Ei(b, d);Fi(c, b);RA(a, c);a = Hi(b) | 0;
        }l = e;return a | 0;
      }function zw() {
        var b = 0;if (!(a[7960] | 0)) {
          Fw(10664);Ha(25, 10664, o | 0) | 0;b = 7960;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10664;
      }function Aw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;d = l;l = l + 16 | 0;f = d + 4 | 0;h = d;e = jy(8) | 0;b = e;i = qC(4) | 0;c[i >> 2] = c[a >> 2];g = b + 4 | 0;c[g >> 2] = i;a = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];Bw(a, g, f);c[e >> 2] = a;l = d;return b | 0;
      }function Bw(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;d = qC(16) | 0;c[d + 4 >> 2] = 0;c[d + 8 >> 2] = 0;c[d >> 2] = 1656;c[d + 12 >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Cw(a) {
        a = a | 0;kC(a);sC(a);return;
      }function Dw(a) {
        a = a | 0;a = c[a + 12 >> 2] | 0;if (a | 0) sC(a);return;
      }function Ew(a) {
        a = a | 0;sC(a);return;
      }function Fw(a) {
        a = a | 0;Zi(a);return;
      }function Gw(a) {
        a = a | 0;fh(a, Hw() | 0, 5);return;
      }function Hw() {
        return 1676;
      }function Iw(a, b) {
        a = a | 0;b = b | 0;var d = 0;if ((Kw(a) | 0) >>> 0 < b >>> 0) jC(a);if (b >>> 0 > 1073741823) Ta();else {
          d = qC(b << 2) | 0;c[a + 4 >> 2] = d;c[a >> 2] = d;c[a + 8 >> 2] = d + (b << 2);return;
        }
      }function Jw(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;e = a + 4 | 0;a = d - b | 0;if ((a | 0) > 0) {
          BC(c[e >> 2] | 0, b | 0, a | 0) | 0;c[e >> 2] = (c[e >> 2] | 0) + (a >>> 2 << 2);
        }return;
      }function Kw(a) {
        a = a | 0;return 1073741823;
      }function Lw(a, b) {
        a = a | 0;b = b | 0;var d = 0;if ((Nw(a) | 0) >>> 0 < b >>> 0) jC(a);if (b >>> 0 > 1073741823) Ta();else {
          d = qC(b << 2) | 0;c[a + 4 >> 2] = d;c[a >> 2] = d;c[a + 8 >> 2] = d + (b << 2);return;
        }
      }function Mw(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;e = a + 4 | 0;a = d - b | 0;if ((a | 0) > 0) {
          BC(c[e >> 2] | 0, b | 0, a | 0) | 0;c[e >> 2] = (c[e >> 2] | 0) + (a >>> 2 << 2);
        }return;
      }function Nw(a) {
        a = a | 0;return 1073741823;
      }function Ow(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 1073741823) Ta();else {
            f = qC(b << 2) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 2) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 2);return;
      }function Pw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 2) << 2) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Qw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -4 - b | 0) >>> 2) << 2);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Rw(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 1073741823) Ta();else {
            f = qC(b << 2) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 2) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 2);return;
      }function Sw(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 2) << 2) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Tw(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -4 - b | 0) >>> 2) << 2);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Uw(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0;r = l;l = l + 32 | 0;m = r + 20 | 0;n = r + 12 | 0;k = r + 16 | 0;o = r + 4 | 0;p = r;q = r + 8 | 0;i = Wv() | 0;g = c[i >> 2] | 0;h = c[g >> 2] | 0;if (h | 0) {
          j = c[i + 8 >> 2] | 0;i = c[i + 4 >> 2] | 0;while (1) {
            OA(m, h);Vw(a, m, i, j);g = g + 4 | 0;h = c[g >> 2] | 0;if (!h) break;else {
              j = j + 1 | 0;i = i + 1 | 0;
            }
          }
        }g = Yv() | 0;h = c[g >> 2] | 0;if (h | 0) do {
          OA(m, h);c[n >> 2] = c[g + 4 >> 2];Ww(b, m, n);g = g + 8 | 0;h = c[g >> 2] | 0;
        } while ((h | 0) != 0);g = c[(Iv() | 0) >> 2] | 0;if (g | 0) do {
          b = c[g + 4 >> 2] | 0;OA(m, c[(Xw(b) | 0) >> 2] | 0);c[n >> 2] = Tv(b) | 0;Yw(d, m, n);g = c[g >> 2] | 0;
        } while ((g | 0) != 0);OA(k, 0);g = Vv() | 0;c[m >> 2] = c[k >> 2];$v(m, g, f);g = c[(Iv() | 0) >> 2] | 0;if (g | 0) {
          a = m + 4 | 0;b = m + 8 | 0;d = m + 8 | 0;do {
            j = c[g + 4 >> 2] | 0;OA(n, c[(Xw(j) | 0) >> 2] | 0);_w(o, Zw(j) | 0);h = c[o >> 2] | 0;if (h | 0) {
              c[m >> 2] = 0;c[a >> 2] = 0;c[b >> 2] = 0;do {
                OA(p, c[(Xw(c[h + 4 >> 2] | 0) | 0) >> 2] | 0);i = c[a >> 2] | 0;if (i >>> 0 < (c[d >> 2] | 0) >>> 0) {
                  c[i >> 2] = c[p >> 2];c[a >> 2] = (c[a >> 2] | 0) + 4;
                } else ew(m, p);h = c[h >> 2] | 0;
              } while ((h | 0) != 0);$w(e, n, m);kw(m);
            }c[q >> 2] = c[n >> 2];k = ax(j) | 0;c[m >> 2] = c[q >> 2];$v(m, k, f);Wi(o);g = c[g >> 2] | 0;
          } while ((g | 0) != 0);
        }l = r;return;
      }function Vw(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;ox(a, b, c, d);return;
      }function Ww(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;nx(a, b, c);return;
      }function Xw(a) {
        a = a | 0;return a | 0;
      }function Yw(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;ix(a, b, c);return;
      }function Zw(a) {
        a = a | 0;return a + 16 | 0;
      }function _w(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;g = l;l = l + 16 | 0;f = g + 8 | 0;d = g;c[a >> 2] = 0;e = c[b >> 2] | 0;c[f >> 2] = e;c[d >> 2] = a;d = gx(d) | 0;if (e | 0) {
          e = qC(12) | 0;h = (hx(f) | 0) + 4 | 0;a = c[h + 4 >> 2] | 0;b = e + 4 | 0;c[b >> 2] = c[h >> 2];c[b + 4 >> 2] = a;b = c[c[f >> 2] >> 2] | 0;c[f >> 2] = b;if (!b) a = e;else {
            b = e;while (1) {
              a = qC(12) | 0;j = (hx(f) | 0) + 4 | 0;i = c[j + 4 >> 2] | 0;h = a + 4 | 0;c[h >> 2] = c[j >> 2];c[h + 4 >> 2] = i;c[b >> 2] = a;h = c[c[f >> 2] >> 2] | 0;c[f >> 2] = h;if (!h) break;else b = a;
            }
          }c[a >> 2] = c[d >> 2];c[d >> 2] = e;
        }l = g;return;
      }function $w(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;bx(a, b, c);return;
      }function ax(a) {
        a = a | 0;return a + 24 | 0;
      }function bx(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 32 | 0;h = e + 24 | 0;f = e + 16 | 0;i = e + 12 | 0;g = e;UA(f);a = Sg(a) | 0;c[i >> 2] = c[b >> 2];mw(g, d);c[h >> 2] = c[i >> 2];cx(a, h, g);kw(g);WA(f);l = e;return;
      }function cx(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;e = l;l = l + 32 | 0;h = e + 16 | 0;i = e + 12 | 0;f = e;g = Vg(dx() | 0) | 0;c[i >> 2] = c[b >> 2];c[h >> 2] = c[i >> 2];b = qw(h) | 0;c[f >> 2] = c[d >> 2];h = d + 4 | 0;c[f + 4 >> 2] = c[h >> 2];i = d + 8 | 0;c[f + 8 >> 2] = c[i >> 2];c[i >> 2] = 0;c[h >> 2] = 0;c[d >> 2] = 0;xa(0, g | 0, a | 0, b | 0, tw(f) | 0) | 0;kw(f);l = e;return;
      }function dx() {
        var b = 0;if (!(a[7976] | 0)) {
          ex(10720);b = 7976;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10720;
      }function ex(a) {
        a = a | 0;fh(a, fx() | 0, 2);return;
      }function fx() {
        return 1732;
      }function gx(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function hx(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function ix(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 32 | 0;g = e + 16 | 0;f = e + 8 | 0;h = e;UA(f);a = Sg(a) | 0;c[h >> 2] = c[b >> 2];d = c[d >> 2] | 0;c[g >> 2] = c[h >> 2];jx(a, g, d);WA(f);l = e;return;
      }function jx(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 16 | 0;g = e + 4 | 0;h = e;f = Vg(kx() | 0) | 0;c[h >> 2] = c[b >> 2];c[g >> 2] = c[h >> 2];b = qw(g) | 0;xa(0, f | 0, a | 0, b | 0, rw(d) | 0) | 0;l = e;return;
      }function kx() {
        var b = 0;if (!(a[7984] | 0)) {
          lx(10732);b = 7984;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10732;
      }function lx(a) {
        a = a | 0;fh(a, mx() | 0, 2);return;
      }function mx() {
        return 1744;
      }function nx(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0;e = l;l = l + 32 | 0;g = e + 16 | 0;f = e + 8 | 0;h = e;UA(f);a = Sg(a) | 0;c[h >> 2] = c[b >> 2];d = c[d >> 2] | 0;c[g >> 2] = c[h >> 2];jx(a, g, d);WA(f);l = e;return;
      }function ox(b, d, e, f) {
        b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0;g = l;l = l + 32 | 0;i = g + 16 | 0;h = g + 8 | 0;j = g;UA(h);b = Sg(b) | 0;c[j >> 2] = c[d >> 2];e = a[e >> 0] | 0;f = a[f >> 0] | 0;c[i >> 2] = c[j >> 2];px(b, i, e, f);WA(h);l = g;return;
      }function px(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;h = f + 4 | 0;i = f;g = Vg(qx() | 0) | 0;c[i >> 2] = c[b >> 2];c[h >> 2] = c[i >> 2];b = qw(h) | 0;d = rx(d) | 0;$a(0, g | 0, a | 0, b | 0, d | 0, rx(e) | 0) | 0;l = f;return;
      }function qx() {
        var b = 0;if (!(a[7992] | 0)) {
          tx(10744);b = 7992;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10744;
      }function rx(a) {
        a = a | 0;return sx(a) | 0;
      }function sx(a) {
        a = a | 0;return a & 255 | 0;
      }function tx(a) {
        a = a | 0;fh(a, ux() | 0, 3);return;
      }function ux() {
        return 1756;
      }function vx(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0;p = l;l = l + 32 | 0;j = p + 8 | 0;k = p + 4 | 0;m = p + 20 | 0;n = p;mk(b, 0);f = QA(d) | 0;c[j >> 2] = 0;o = j + 4 | 0;c[o >> 2] = 0;c[j + 8 >> 2] = 0;switch (f << 24 >> 24) {case 0:
            {
              a[m >> 0] = 0;wx(k, e, m);xx(b, k) | 0;wf(k);break;
            }case 8:
            {
              o = PA(d) | 0;a[m >> 0] = 8;OA(n, c[o + 4 >> 2] | 0);yx(k, e, m, n, o + 8 | 0);xx(b, k) | 0;wf(k);break;
            }case 9:
            {
              h = PA(d) | 0;d = c[h + 4 >> 2] | 0;if (d | 0) {
                i = j + 8 | 0;g = h + 12 | 0;while (1) {
                  d = d + -1 | 0;OA(k, c[g >> 2] | 0);f = c[o >> 2] | 0;if (f >>> 0 < (c[i >> 2] | 0) >>> 0) {
                    c[f >> 2] = c[k >> 2];c[o >> 2] = (c[o >> 2] | 0) + 4;
                  } else ew(j, k);if (!d) break;else g = g + 4 | 0;
                }
              }a[m >> 0] = 9;OA(n, c[h + 8 >> 2] | 0);zx(k, e, m, n, j);xx(b, k) | 0;wf(k);break;
            }default:
            {
              o = PA(d) | 0;a[m >> 0] = f;OA(n, c[o + 4 >> 2] | 0);Ax(k, e, m, n);xx(b, k) | 0;wf(k);
            }}kw(j);l = p;return;
      }function wx(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;var e = 0,
            f = 0;e = l;l = l + 16 | 0;f = e;UA(f);c = Sg(c) | 0;Ox(b, c, a[d >> 0] | 0);WA(f);l = e;return;
      }function xx(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = c[a >> 2] | 0;if (d | 0) ab(d | 0);c[a >> 2] = c[b >> 2];c[b >> 2] = 0;return a | 0;
      }function yx(b, d, e, f, g) {
        b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0,
            i = 0,
            j = 0,
            k = 0;h = l;l = l + 32 | 0;j = h + 16 | 0;i = h + 8 | 0;k = h;UA(i);d = Sg(d) | 0;e = a[e >> 0] | 0;c[k >> 2] = c[f >> 2];g = c[g >> 2] | 0;c[j >> 2] = c[k >> 2];Kx(b, d, e, j, g);WA(i);l = h;return;
      }function zx(b, d, e, f, g) {
        b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;var h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;h = l;l = l + 32 | 0;k = h + 24 | 0;i = h + 16 | 0;m = h + 12 | 0;j = h;UA(i);d = Sg(d) | 0;e = a[e >> 0] | 0;c[m >> 2] = c[f >> 2];mw(j, g);c[k >> 2] = c[m >> 2];Gx(b, d, e, k, j);kw(j);WA(i);l = h;return;
      }function Ax(b, d, e, f) {
        b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0;g = l;l = l + 32 | 0;i = g + 16 | 0;h = g + 8 | 0;j = g;UA(h);d = Sg(d) | 0;e = a[e >> 0] | 0;c[j >> 2] = c[f >> 2];c[i >> 2] = c[j >> 2];Bx(b, d, e, i);WA(h);l = g;return;
      }function Bx(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;f = l;l = l + 16 | 0;g = f + 4 | 0;i = f;h = Vg(Cx() | 0) | 0;d = rx(d) | 0;c[i >> 2] = c[e >> 2];c[g >> 2] = c[i >> 2];Dx(a, xa(0, h | 0, b | 0, d | 0, qw(g) | 0) | 0);l = f;return;
      }function Cx() {
        var b = 0;if (!(a[8e3] | 0)) {
          Ex(10756);b = 8e3;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10756;
      }function Dx(a, b) {
        a = a | 0;b = b | 0;mk(a, b);return;
      }function Ex(a) {
        a = a | 0;fh(a, Fx() | 0, 2);return;
      }function Fx() {
        return 1772;
      }function Gx(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0;g = l;l = l + 32 | 0;j = g + 16 | 0;k = g + 12 | 0;h = g;i = Vg(Hx() | 0) | 0;d = rx(d) | 0;c[k >> 2] = c[e >> 2];c[j >> 2] = c[k >> 2];e = qw(j) | 0;c[h >> 2] = c[f >> 2];j = f + 4 | 0;c[h + 4 >> 2] = c[j >> 2];k = f + 8 | 0;c[h + 8 >> 2] = c[k >> 2];c[k >> 2] = 0;c[j >> 2] = 0;c[f >> 2] = 0;Dx(a, $a(0, i | 0, b | 0, d | 0, e | 0, tw(h) | 0) | 0);kw(h);l = g;return;
      }function Hx() {
        var b = 0;if (!(a[8008] | 0)) {
          Ix(10768);b = 8008;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10768;
      }function Ix(a) {
        a = a | 0;fh(a, Jx() | 0, 3);return;
      }function Jx() {
        return 1784;
      }function Kx(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0;g = l;l = l + 16 | 0;i = g + 4 | 0;j = g;h = Vg(Lx() | 0) | 0;d = rx(d) | 0;c[j >> 2] = c[e >> 2];c[i >> 2] = c[j >> 2];e = qw(i) | 0;Dx(a, $a(0, h | 0, b | 0, d | 0, e | 0, sw(f) | 0) | 0);l = g;return;
      }function Lx() {
        var b = 0;if (!(a[8016] | 0)) {
          Mx(10780);b = 8016;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10780;
      }function Mx(a) {
        a = a | 0;fh(a, Nx() | 0, 3);return;
      }function Nx() {
        return 1800;
      }function Ox(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;var d = 0;d = Vg(Px() | 0) | 0;Dx(a, bb(0, d | 0, b | 0, rx(c) | 0) | 0);return;
      }function Px() {
        var b = 0;if (!(a[8024] | 0)) {
          Qx(10792);b = 8024;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 10792;
      }function Qx(a) {
        a = a | 0;fh(a, Rx() | 0, 1);return;
      }function Rx() {
        return 1816;
      }function Sx() {
        Tx();Ux();Vx();return;
      }function Tx() {
        c[2702] = rC(65536) | 0;return;
      }function Ux() {
        qy(10856);return;
      }function Vx() {
        Wx(10816);return;
      }function Wx(a) {
        a = a | 0;Xx(a, 5044);Yx(a) | 0;return;
      }function Xx(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = zw() | 0;c[a >> 2] = d;ky(d, b);Hv(c[a >> 2] | 0);return;
      }function Yx(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, Zx() | 0);return a | 0;
      }function Zx() {
        var b = 0;if (!(a[8032] | 0)) {
          _x(10820);Ha(64, 10820, o | 0) | 0;b = 8032;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(10820) | 0)) _x(10820);return 10820;
      }function _x(a) {
        a = a | 0;by(a);Gt(a, 25);return;
      }function $x(a) {
        a = a | 0;ay(a + 24 | 0);return;
      }function ay(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function by(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 18, b, gy() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function cy(a, b) {
        a = a | 0;b = b | 0;dy(a, b);return;
      }function dy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;d = l;l = l + 16 | 0;e = d;f = d + 4 | 0;Gk(f, b);c[e >> 2] = Hk(f, b) | 0;ey(a, e);l = d;return;
      }function ey(b, d) {
        b = b | 0;d = d | 0;fy(b + 4 | 0, c[d >> 2] | 0);a[b + 8 >> 0] = 1;return;
      }function fy(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = b;return;
      }function gy() {
        return 1824;
      }function hy(a) {
        a = a | 0;return iy(a) | 0;
      }function iy(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0;d = l;l = l + 16 | 0;f = d + 4 | 0;h = d;e = jy(8) | 0;b = e;i = qC(4) | 0;Gk(f, a);fy(i, Hk(f, a) | 0);g = b + 4 | 0;c[g >> 2] = i;a = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];Bw(a, g, f);c[e >> 2] = a;l = d;return b | 0;
      }function jy(a) {
        a = a | 0;var b = 0,
            d = 0;a = a + 7 & -8;if (a >>> 0 <= 32768 ? (b = c[2701] | 0, a >>> 0 <= (65536 - b | 0) >>> 0) : 0) {
          d = (c[2702] | 0) + b | 0;c[2701] = b + a;a = d;
        } else {
          a = rC(a + 8 | 0) | 0;c[a >> 2] = c[2703];c[2703] = a;a = a + 8 | 0;
        }return a | 0;
      }function ky(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = ly() | 0;c[a + 4 >> 2] = my() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = ny() | 0;c[a + 32 >> 2] = 9;return;
      }function ly() {
        return 11744;
      }function my() {
        return 1832;
      }function ny() {
        return cu() | 0;
      }function oy(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            py(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function py(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function qy(a) {
        a = a | 0;ry(a, 5052);sy(a) | 0;ty(a, 5058, 26) | 0;uy(a, 5069, 1) | 0;vy(a, 5077, 10) | 0;wy(a, 5087, 19) | 0;yy(a, 5094, 27) | 0;return;
      }function ry(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = GA() | 0;c[a >> 2] = d;HA(d, b);Hv(c[a >> 2] | 0);return;
      }function sy(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;At(b, rA() | 0);return a | 0;
      }function ty(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Yz(a, ai(b) | 0, c, 0);return a | 0;
      }function uy(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Gz(a, ai(b) | 0, c, 0);return a | 0;
      }function vy(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;hz(a, ai(b) | 0, c, 0);return a | 0;
      }function wy(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Ry(a, ai(b) | 0, c, 0);return a | 0;
      }function xy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;a: while (1) {
          d = c[2703] | 0;while (1) {
            if ((d | 0) == (b | 0)) break a;e = c[d >> 2] | 0;c[2703] = e;if (!d) d = e;else break;
          }sC(d);
        }c[2701] = a;return;
      }function yy(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;zy(a, ai(b) | 0, c, 0);return a | 0;
      }function zy(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Ay() | 0;a = By(d) | 0;fi(g, b, f, a, Cy(d, e) | 0, e);return;
      }function Ay() {
        var b = 0,
            d = 0;if (!(a[8040] | 0)) {
          Jy(10860);Ha(65, 10860, o | 0) | 0;d = 8040;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10860) | 0)) {
          b = 10860;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Jy(10860);
        }return 10860;
      }function By(a) {
        a = a | 0;return a | 0;
      }function Cy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Ay() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          Dy(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          Ey(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function Dy(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Ey(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = Fy(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Gy(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;Dy(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Hy(a, f);Iy(f);l = i;return;
        }
      }function Fy(a) {
        a = a | 0;return 536870911;
      }function Gy(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Hy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Iy(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Jy(a) {
        a = a | 0;My(a);return;
      }function Ky(a) {
        a = a | 0;Ly(a + 24 | 0);return;
      }function Ly(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function My(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 11, b, Ny() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Ny() {
        return 1840;
      }function Oy(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;Qy(c[(Py(a) | 0) >> 2] | 0, b, d);return;
      }function Py(a) {
        a = a | 0;return (c[(Ay() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function Qy(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;var d = 0,
            e = 0,
            f = 0;d = l;l = l + 16 | 0;f = d + 1 | 0;e = d;Gk(f, b);b = Hk(f, b) | 0;Gk(e, c);c = Hk(e, c) | 0;ob[a & 31](b, c);l = d;return;
      }function Ry(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Sy() | 0;a = Ty(d) | 0;fi(g, b, f, a, Uy(d, e) | 0, e);return;
      }function Sy() {
        var b = 0,
            d = 0;if (!(a[8048] | 0)) {
          $y(10896);Ha(66, 10896, o | 0) | 0;d = 8048;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10896) | 0)) {
          b = 10896;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));$y(10896);
        }return 10896;
      }function Ty(a) {
        a = a | 0;return a | 0;
      }function Uy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Sy() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          Vy(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          Wy(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function Vy(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Wy(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = Xy(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Yy(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;Vy(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Zy(a, f);_y(f);l = i;return;
        }
      }function Xy(a) {
        a = a | 0;return 536870911;
      }function Yy(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Zy(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function _y(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function $y(a) {
        a = a | 0;cz(a);return;
      }function az(a) {
        a = a | 0;bz(a + 24 | 0);return;
      }function bz(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function cz(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 11, b, dz() | 0, 1);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function dz() {
        return 1852;
      }function ez(a, b) {
        a = a | 0;b = b | 0;return gz(c[(fz(a) | 0) >> 2] | 0, b) | 0;
      }function fz(a) {
        a = a | 0;return (c[(Sy() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function gz(a, b) {
        a = a | 0;b = b | 0;var c = 0,
            d = 0;c = l;l = l + 16 | 0;d = c;Gk(d, b);b = Hk(d, b) | 0;b = ul(pb[a & 31](b) | 0) | 0;l = c;return b | 0;
      }function hz(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = iz() | 0;a = jz(d) | 0;fi(g, b, f, a, kz(d, e) | 0, e);return;
      }function iz() {
        var b = 0,
            d = 0;if (!(a[8056] | 0)) {
          rz(10932);Ha(67, 10932, o | 0) | 0;d = 8056;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10932) | 0)) {
          b = 10932;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));rz(10932);
        }return 10932;
      }function jz(a) {
        a = a | 0;return a | 0;
      }function kz(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = iz() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          lz(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          mz(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function lz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function mz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = nz(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;oz(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;lz(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;pz(a, f);qz(f);l = i;return;
        }
      }function nz(a) {
        a = a | 0;return 536870911;
      }function oz(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function pz(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function qz(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function rz(a) {
        a = a | 0;uz(a);return;
      }function sz(a) {
        a = a | 0;tz(a + 24 | 0);return;
      }function tz(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function uz(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 7, b, vz() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function vz() {
        return 1860;
      }function wz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;return yz(c[(xz(a) | 0) >> 2] | 0, b, d) | 0;
      }function xz(a) {
        a = a | 0;return (c[(iz() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function yz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;e = l;l = l + 32 | 0;h = e + 12 | 0;g = e + 8 | 0;i = e;j = e + 16 | 0;f = e + 4 | 0;zz(j, b);Az(i, j, b);ik(f, d);d = jk(f, d) | 0;c[h >> 2] = c[i >> 2];Eb[a & 15](g, h, d);d = Bz(g) | 0;wf(g);kk(f);l = e;return d | 0;
      }function zz(a, b) {
        a = a | 0;b = b | 0;return;
      }function Az(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;Cz(a, c);return;
      }function Bz(a) {
        a = a | 0;return Sg(a) | 0;
      }function Cz(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0;f = l;l = l + 16 | 0;d = f;e = b;if (!(e & 1)) c[a >> 2] = c[b >> 2];else {
          Dz(d, 0);Ja(e | 0, d | 0) | 0;Ez(a, d);Fz(d);
        }l = f;return;
      }function Dz(b, d) {
        b = b | 0;d = d | 0;ah(b, d);c[b + 4 >> 2] = 0;a[b + 8 >> 0] = 0;return;
      }function Ez(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = c[b + 4 >> 2];return;
      }function Fz(b) {
        b = b | 0;a[b + 8 >> 0] = 0;return;
      }function Gz(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Hz() | 0;a = Iz(d) | 0;fi(g, b, f, a, Jz(d, e) | 0, e);return;
      }function Hz() {
        var b = 0,
            d = 0;if (!(a[8064] | 0)) {
          Qz(10968);Ha(68, 10968, o | 0) | 0;d = 8064;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(10968) | 0)) {
          b = 10968;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));Qz(10968);
        }return 10968;
      }function Iz(a) {
        a = a | 0;return a | 0;
      }function Jz(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Hz() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          Kz(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          Lz(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function Kz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function Lz(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = Mz(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;Nz(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;Kz(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;Oz(a, f);Pz(f);l = i;return;
        }
      }function Mz(a) {
        a = a | 0;return 536870911;
      }function Nz(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function Oz(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function Pz(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function Qz(a) {
        a = a | 0;Tz(a);return;
      }function Rz(a) {
        a = a | 0;Sz(a + 24 | 0);return;
      }function Sz(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function Tz(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 1, b, Uz() | 0, 5);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function Uz() {
        return 1872;
      }function Vz(a, b, d, e, f, g) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;Xz(c[(Wz(a) | 0) >> 2] | 0, b, d, e, f, g);return;
      }function Wz(a) {
        a = a | 0;return (c[(Hz() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function Xz(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;g = l;l = l + 32 | 0;h = g + 16 | 0;i = g + 12 | 0;j = g + 8 | 0;k = g + 4 | 0;m = g;ik(h, b);b = jk(h, b) | 0;ik(i, c);c = jk(i, c) | 0;ik(j, d);d = jk(j, d) | 0;ik(k, e);e = jk(k, e) | 0;ik(m, f);f = jk(m, f) | 0;jb[a & 1](b, c, d, e, f);kk(m);kk(k);kk(j);kk(i);kk(h);l = g;return;
      }function Yz(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = c[a >> 2] | 0;f = Zz() | 0;a = _z(d) | 0;fi(g, b, f, a, $z(d, e) | 0, e);return;
      }function Zz() {
        var b = 0,
            d = 0;if (!(a[8072] | 0)) {
          gA(11004);Ha(69, 11004, o | 0) | 0;d = 8072;c[d >> 2] = 1;c[d + 4 >> 2] = 0;
        }if (!(si(11004) | 0)) {
          b = 11004;d = b + 36 | 0;do {
            c[b >> 2] = 0;b = b + 4 | 0;
          } while ((b | 0) < (d | 0));gA(11004);
        }return 11004;
      }function _z(a) {
        a = a | 0;return a | 0;
      }function $z(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;i = l;l = l + 16 | 0;f = i;g = i + 4 | 0;c[f >> 2] = a;j = Zz() | 0;h = j + 24 | 0;b = ji(b, 4) | 0;c[g >> 2] = b;d = j + 28 | 0;e = c[d >> 2] | 0;if (e >>> 0 < (c[j + 32 >> 2] | 0) >>> 0) {
          aA(e, a, b);b = (c[d >> 2] | 0) + 8 | 0;c[d >> 2] = b;
        } else {
          bA(h, f, g);b = c[d >> 2] | 0;
        }l = i;return (b - (c[h >> 2] | 0) >> 3) + -1 | 0;
      }function aA(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;c[a + 4 >> 2] = d;return;
      }function bA(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0;i = l;l = l + 32 | 0;f = i;g = a + 4 | 0;h = ((c[g >> 2] | 0) - (c[a >> 2] | 0) >> 3) + 1 | 0;e = cA(a) | 0;if (e >>> 0 < h >>> 0) jC(a);else {
          j = c[a >> 2] | 0;m = (c[a + 8 >> 2] | 0) - j | 0;k = m >> 2;dA(f, m >> 3 >>> 0 < e >>> 1 >>> 0 ? k >>> 0 < h >>> 0 ? h : k : e, (c[g >> 2] | 0) - j >> 3, a + 8 | 0);h = f + 8 | 0;aA(c[h >> 2] | 0, c[b >> 2] | 0, c[d >> 2] | 0);c[h >> 2] = (c[h >> 2] | 0) + 8;eA(a, f);fA(f);l = i;return;
        }
      }function cA(a) {
        a = a | 0;return 536870911;
      }function dA(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0;c[a + 12 >> 2] = 0;c[a + 16 >> 2] = e;do if (b) {
          if (b >>> 0 > 536870911) Ta();else {
            f = qC(b << 3) | 0;break;
          }
        } else f = 0; while (0);c[a >> 2] = f;e = f + (d << 3) | 0;c[a + 8 >> 2] = e;c[a + 4 >> 2] = e;c[a + 12 >> 2] = f + (b << 3);return;
      }function eA(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;e = c[a >> 2] | 0;h = a + 4 | 0;g = b + 4 | 0;f = (c[h >> 2] | 0) - e | 0;d = (c[g >> 2] | 0) + (0 - (f >> 3) << 3) | 0;c[g >> 2] = d;if ((f | 0) > 0) {
          BC(d | 0, e | 0, f | 0) | 0;e = g;d = c[g >> 2] | 0;
        } else e = g;g = c[a >> 2] | 0;c[a >> 2] = d;c[e >> 2] = g;g = b + 8 | 0;f = c[h >> 2] | 0;c[h >> 2] = c[g >> 2];c[g >> 2] = f;g = a + 8 | 0;h = b + 12 | 0;a = c[g >> 2] | 0;c[g >> 2] = c[h >> 2];c[h >> 2] = a;c[b >> 2] = c[e >> 2];return;
      }function fA(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;b = c[a + 4 >> 2] | 0;d = a + 8 | 0;e = c[d >> 2] | 0;if ((e | 0) != (b | 0)) c[d >> 2] = e + (~((e + -8 - b | 0) >>> 3) << 3);a = c[a >> 2] | 0;if (a | 0) sC(a);return;
      }function gA(a) {
        a = a | 0;jA(a);return;
      }function hA(a) {
        a = a | 0;iA(a + 24 | 0);return;
      }function iA(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function jA(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 1, 12, b, kA() | 0, 2);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function kA() {
        return 1896;
      }function lA(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;nA(c[(mA(a) | 0) >> 2] | 0, b, d);return;
      }function mA(a) {
        a = a | 0;return (c[(Zz() | 0) + 24 >> 2] | 0) + (a << 3) | 0;
      }function nA(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;var d = 0,
            e = 0,
            f = 0;d = l;l = l + 16 | 0;f = d + 4 | 0;e = d;oA(f, b);b = pA(f, b) | 0;ik(e, c);c = jk(e, c) | 0;ob[a & 31](b, c);kk(e);l = d;return;
      }function oA(a, b) {
        a = a | 0;b = b | 0;return;
      }function pA(a, b) {
        a = a | 0;b = b | 0;return qA(b) | 0;
      }function qA(a) {
        a = a | 0;return a | 0;
      }function rA() {
        var b = 0;if (!(a[8080] | 0)) {
          sA(11040);Ha(70, 11040, o | 0) | 0;b = 8080;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }if (!(si(11040) | 0)) sA(11040);return 11040;
      }function sA(a) {
        a = a | 0;vA(a);Gt(a, 71);return;
      }function tA(a) {
        a = a | 0;uA(a + 24 | 0);return;
      }function uA(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0;d = c[a >> 2] | 0;e = d;if (d | 0) {
          a = a + 4 | 0;b = c[a >> 2] | 0;if ((b | 0) != (d | 0)) c[a >> 2] = b + (~((b + -8 - e | 0) >>> 3) << 3);sC(d);
        }return;
      }function vA(a) {
        a = a | 0;var b = 0;b = vi() | 0;yi(a, 5, 7, b, zA() | 0, 0);c[a + 24 >> 2] = 0;c[a + 28 >> 2] = 0;c[a + 32 >> 2] = 0;return;
      }function wA(a) {
        a = a | 0;xA(a);return;
      }function xA(a) {
        a = a | 0;yA(a);return;
      }function yA(b) {
        b = b | 0;a[b + 8 >> 0] = 1;return;
      }function zA() {
        return 1936;
      }function AA() {
        return BA() | 0;
      }function BA() {
        var a = 0,
            b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0;b = l;l = l + 16 | 0;f = b + 4 | 0;h = b;d = jy(8) | 0;a = d;g = a + 4 | 0;c[g >> 2] = qC(1) | 0;e = qC(8) | 0;g = c[g >> 2] | 0;c[h >> 2] = 0;c[f >> 2] = c[h >> 2];CA(e, g, f);c[d >> 2] = e;l = b;return a | 0;
      }function CA(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;c[a >> 2] = b;d = qC(16) | 0;c[d + 4 >> 2] = 0;c[d + 8 >> 2] = 0;c[d >> 2] = 1916;c[d + 12 >> 2] = b;c[a + 4 >> 2] = d;return;
      }function DA(a) {
        a = a | 0;kC(a);sC(a);return;
      }function EA(a) {
        a = a | 0;a = c[a + 12 >> 2] | 0;if (a | 0) sC(a);return;
      }function FA(a) {
        a = a | 0;sC(a);return;
      }function GA() {
        var b = 0;if (!(a[8088] | 0)) {
          NA(11076);Ha(25, 11076, o | 0) | 0;b = 8088;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 11076;
      }function HA(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = IA() | 0;c[a + 4 >> 2] = JA() | 0;c[a + 12 >> 2] = b;c[a + 8 >> 2] = KA() | 0;c[a + 32 >> 2] = 10;return;
      }function IA() {
        return 11745;
      }function JA() {
        return 1940;
      }function KA() {
        return lr() | 0;
      }function LA(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;if ((jr(d, 896) | 0) == 512) {
          if (c | 0) {
            MA(c);sC(c);
          }
        } else if (b | 0) sC(b);return;
      }function MA(a) {
        a = a | 0;a = c[a + 4 >> 2] | 0;if (a | 0) oC(a);return;
      }function NA(a) {
        a = a | 0;Zi(a);return;
      }function OA(a, b) {
        a = a | 0;b = b | 0;c[a >> 2] = b;return;
      }function PA(a) {
        a = a | 0;return c[a >> 2] | 0;
      }function QA(b) {
        b = b | 0;return a[c[b >> 2] >> 0] | 0;
      }function RA(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;c[e >> 2] = c[a >> 2];SA(b, e) | 0;l = d;return;
      }function SA(a, b) {
        a = a | 0;b = b | 0;var d = 0;d = TA(c[a >> 2] | 0, b) | 0;b = a + 4 | 0;c[(c[b >> 2] | 0) + 8 >> 2] = d;return c[(c[b >> 2] | 0) + 8 >> 2] | 0;
      }function TA(a, b) {
        a = a | 0;b = b | 0;var d = 0,
            e = 0;d = l;l = l + 16 | 0;e = d;UA(e);a = Sg(a) | 0;b = VA(a, c[b >> 2] | 0) | 0;WA(e);l = d;return b | 0;
      }function UA(a) {
        a = a | 0;c[a >> 2] = c[2701];c[a + 4 >> 2] = c[2703];return;
      }function VA(a, b) {
        a = a | 0;b = b | 0;var c = 0;c = Vg(XA() | 0) | 0;return bb(0, c | 0, a | 0, sw(b) | 0) | 0;
      }function WA(a) {
        a = a | 0;xy(c[a >> 2] | 0, c[a + 4 >> 2] | 0);return;
      }function XA() {
        var b = 0;if (!(a[8096] | 0)) {
          YA(11120);b = 8096;c[b >> 2] = 1;c[b + 4 >> 2] = 0;
        }return 11120;
      }function YA(a) {
        a = a | 0;fh(a, ZA() | 0, 1);return;
      }function ZA() {
        return 1948;
      }function _A() {
        $A();return;
      }function $A() {
        var b = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0;s = l;l = l + 16 | 0;o = s + 4 | 0;p = s;Ea(65536, 10804, c[2702] | 0, 10812);f = Wv() | 0;e = c[f >> 2] | 0;b = c[e >> 2] | 0;if (b | 0) {
          g = c[f + 8 >> 2] | 0;f = c[f + 4 >> 2] | 0;while (1) {
            Ma(b | 0, d[f >> 0] | 0 | 0, a[g >> 0] | 0);e = e + 4 | 0;b = c[e >> 2] | 0;if (!b) break;else {
              g = g + 1 | 0;f = f + 1 | 0;
            }
          }
        }b = Yv() | 0;e = c[b >> 2] | 0;if (e | 0) do {
          Na(e | 0, c[b + 4 >> 2] | 0);b = b + 8 | 0;e = c[b >> 2] | 0;
        } while ((e | 0) != 0);Na(aB() | 0, 5167);n = Iv() | 0;b = c[n >> 2] | 0;a: do if (b | 0) {
          do {
            bB(c[b + 4 >> 2] | 0);b = c[b >> 2] | 0;
          } while ((b | 0) != 0);b = c[n >> 2] | 0;if (b | 0) {
            m = n;do {
              while (1) {
                h = b;b = c[b >> 2] | 0;h = c[h + 4 >> 2] | 0;if (!(cB(h) | 0)) break;c[p >> 2] = m;c[o >> 2] = c[p >> 2];dB(n, o) | 0;if (!b) break a;
              }eB(h);m = c[m >> 2] | 0;e = fB(h) | 0;i = Va() | 0;j = l;l = l + ((1 * (e << 2) | 0) + 15 & -16) | 0;k = l;l = l + ((1 * (e << 2) | 0) + 15 & -16) | 0;e = c[(Zw(h) | 0) >> 2] | 0;if (e | 0) {
                f = j;g = k;while (1) {
                  c[f >> 2] = c[(Xw(c[e + 4 >> 2] | 0) | 0) >> 2];c[g >> 2] = c[e + 8 >> 2];e = c[e >> 2] | 0;if (!e) break;else {
                    f = f + 4 | 0;g = g + 4 | 0;
                  }
                }
              }t = Xw(h) | 0;e = gB(h) | 0;f = fB(h) | 0;g = hB(h) | 0;Ra(t | 0, e | 0, j | 0, k | 0, f | 0, g | 0, Tv(h) | 0);Ga(i | 0);
            } while ((b | 0) != 0);
          }
        } while (0);b = c[(Vv() | 0) >> 2] | 0;if (b | 0) do {
          t = b + 4 | 0;n = aw(t) | 0;h = fw(n) | 0;i = bw(n) | 0;j = (cw(n) | 0) + 1 | 0;k = iB(n) | 0;m = jB(t) | 0;n = si(n) | 0;o = hw(t) | 0;p = kB(t) | 0;Pa(0, h | 0, i | 0, j | 0, k | 0, m | 0, n | 0, o | 0, p | 0, lB(t) | 0);b = c[b >> 2] | 0;
        } while ((b | 0) != 0);b = c[(Iv() | 0) >> 2] | 0;b: do if (b | 0) {
          c: while (1) {
            e = c[b + 4 >> 2] | 0;if (e | 0 ? (q = c[(Xw(e) | 0) >> 2] | 0, r = c[(ax(e) | 0) >> 2] | 0, r | 0) : 0) {
              f = r;do {
                e = f + 4 | 0;g = aw(e) | 0;d: do if (g | 0) switch (si(g) | 0) {case 0:
                    break c;case 4:case 3:case 2:
                    {
                      k = fw(g) | 0;m = bw(g) | 0;n = (cw(g) | 0) + 1 | 0;o = iB(g) | 0;p = si(g) | 0;t = hw(e) | 0;Pa(q | 0, k | 0, m | 0, n | 0, o | 0, 0, p | 0, t | 0, kB(e) | 0, lB(e) | 0);break d;
                    }case 1:
                    {
                      j = fw(g) | 0;k = bw(g) | 0;m = (cw(g) | 0) + 1 | 0;n = iB(g) | 0;o = jB(e) | 0;p = si(g) | 0;t = hw(e) | 0;Pa(q | 0, j | 0, k | 0, m | 0, n | 0, o | 0, p | 0, t | 0, kB(e) | 0, lB(e) | 0);break d;
                    }case 5:
                    {
                      n = fw(g) | 0;o = bw(g) | 0;p = (cw(g) | 0) + 1 | 0;t = iB(g) | 0;Pa(q | 0, n | 0, o | 0, p | 0, t | 0, mB(g) | 0, si(g) | 0, 0, 0, 0);break d;
                    }default:
                    break d;} while (0);f = c[f >> 2] | 0;
              } while ((f | 0) != 0);
            }b = c[b >> 2] | 0;if (!b) break b;
          }Ta();
        } while (0);Sa();l = s;return;
      }function aB() {
        return 11703;
      }function bB(b) {
        b = b | 0;a[b + 40 >> 0] = 0;return;
      }function cB(b) {
        b = b | 0;return (a[b + 40 >> 0] | 0) != 0 | 0;
      }function dB(a, b) {
        a = a | 0;b = b | 0;b = nB(b) | 0;a = c[b >> 2] | 0;c[b >> 2] = c[a >> 2];sC(a);return c[b >> 2] | 0;
      }function eB(b) {
        b = b | 0;a[b + 40 >> 0] = 1;return;
      }function fB(a) {
        a = a | 0;return c[a + 20 >> 2] | 0;
      }function gB(a) {
        a = a | 0;return c[a + 8 >> 2] | 0;
      }function hB(a) {
        a = a | 0;return c[a + 32 >> 2] | 0;
      }function iB(a) {
        a = a | 0;return c[a + 4 >> 2] | 0;
      }function jB(a) {
        a = a | 0;return c[a + 4 >> 2] | 0;
      }function kB(a) {
        a = a | 0;return c[a + 8 >> 2] | 0;
      }function lB(a) {
        a = a | 0;return c[a + 16 >> 2] | 0;
      }function mB(a) {
        a = a | 0;return c[a + 20 >> 2] | 0;
      }function nB(a) {
        a = a | 0;return c[a >> 2] | 0;
      }
      function oB(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = 0,
            v = 0,
            w = 0,
            x = 0;x = l;l = l + 16 | 0;o = x;do if (a >>> 0 < 245) {
          k = a >>> 0 < 11 ? 16 : a + 11 & -8;a = k >>> 3;n = c[2783] | 0;d = n >>> a;if (d & 3 | 0) {
            b = (d & 1 ^ 1) + a | 0;a = 11172 + (b << 1 << 2) | 0;d = a + 8 | 0;e = c[d >> 2] | 0;f = e + 8 | 0;g = c[f >> 2] | 0;if ((a | 0) == (g | 0)) c[2783] = n & ~(1 << b);else {
              c[g + 12 >> 2] = a;c[d >> 2] = g;
            }w = b << 3;c[e + 4 >> 2] = w | 3;w = e + w + 4 | 0;c[w >> 2] = c[w >> 2] | 1;w = f;l = x;return w | 0;
          }m = c[2785] | 0;if (k >>> 0 > m >>> 0) {
            if (d | 0) {
              b = 2 << a;b = d << a & (b | 0 - b);b = (b & 0 - b) + -1 | 0;h = b >>> 12 & 16;b = b >>> h;d = b >>> 5 & 8;b = b >>> d;f = b >>> 2 & 4;b = b >>> f;a = b >>> 1 & 2;b = b >>> a;e = b >>> 1 & 1;e = (d | h | f | a | e) + (b >>> e) | 0;b = 11172 + (e << 1 << 2) | 0;a = b + 8 | 0;f = c[a >> 2] | 0;h = f + 8 | 0;d = c[h >> 2] | 0;if ((b | 0) == (d | 0)) {
                a = n & ~(1 << e);c[2783] = a;
              } else {
                c[d + 12 >> 2] = b;c[a >> 2] = d;a = n;
              }g = (e << 3) - k | 0;c[f + 4 >> 2] = k | 3;e = f + k | 0;c[e + 4 >> 2] = g | 1;c[e + g >> 2] = g;if (m | 0) {
                f = c[2788] | 0;b = m >>> 3;d = 11172 + (b << 1 << 2) | 0;b = 1 << b;if (!(a & b)) {
                  c[2783] = a | b;b = d;a = d + 8 | 0;
                } else {
                  a = d + 8 | 0;b = c[a >> 2] | 0;
                }c[a >> 2] = f;c[b + 12 >> 2] = f;c[f + 8 >> 2] = b;c[f + 12 >> 2] = d;
              }c[2785] = g;c[2788] = e;w = h;l = x;return w | 0;
            }i = c[2784] | 0;if (i) {
              d = (i & 0 - i) + -1 | 0;h = d >>> 12 & 16;d = d >>> h;g = d >>> 5 & 8;d = d >>> g;j = d >>> 2 & 4;d = d >>> j;e = d >>> 1 & 2;d = d >>> e;a = d >>> 1 & 1;a = c[11436 + ((g | h | j | e | a) + (d >>> a) << 2) >> 2] | 0;d = (c[a + 4 >> 2] & -8) - k | 0;e = c[a + 16 + (((c[a + 16 >> 2] | 0) == 0 & 1) << 2) >> 2] | 0;if (!e) {
                j = a;g = d;
              } else {
                do {
                  h = (c[e + 4 >> 2] & -8) - k | 0;j = h >>> 0 < d >>> 0;d = j ? h : d;a = j ? e : a;e = c[e + 16 + (((c[e + 16 >> 2] | 0) == 0 & 1) << 2) >> 2] | 0;
                } while ((e | 0) != 0);j = a;g = d;
              }h = j + k | 0;if (j >>> 0 < h >>> 0) {
                f = c[j + 24 >> 2] | 0;b = c[j + 12 >> 2] | 0;do if ((b | 0) == (j | 0)) {
                  a = j + 20 | 0;b = c[a >> 2] | 0;if (!b) {
                    a = j + 16 | 0;b = c[a >> 2] | 0;if (!b) {
                      d = 0;break;
                    }
                  }while (1) {
                    d = b + 20 | 0;e = c[d >> 2] | 0;if (e | 0) {
                      b = e;a = d;continue;
                    }d = b + 16 | 0;e = c[d >> 2] | 0;if (!e) break;else {
                      b = e;a = d;
                    }
                  }c[a >> 2] = 0;d = b;
                } else {
                  d = c[j + 8 >> 2] | 0;c[d + 12 >> 2] = b;c[b + 8 >> 2] = d;d = b;
                } while (0);do if (f | 0) {
                  b = c[j + 28 >> 2] | 0;a = 11436 + (b << 2) | 0;if ((j | 0) == (c[a >> 2] | 0)) {
                    c[a >> 2] = d;if (!d) {
                      c[2784] = i & ~(1 << b);break;
                    }
                  } else {
                    c[f + 16 + (((c[f + 16 >> 2] | 0) != (j | 0) & 1) << 2) >> 2] = d;if (!d) break;
                  }c[d + 24 >> 2] = f;b = c[j + 16 >> 2] | 0;if (b | 0) {
                    c[d + 16 >> 2] = b;c[b + 24 >> 2] = d;
                  }b = c[j + 20 >> 2] | 0;if (b | 0) {
                    c[d + 20 >> 2] = b;c[b + 24 >> 2] = d;
                  }
                } while (0);if (g >>> 0 < 16) {
                  w = g + k | 0;c[j + 4 >> 2] = w | 3;w = j + w + 4 | 0;c[w >> 2] = c[w >> 2] | 1;
                } else {
                  c[j + 4 >> 2] = k | 3;c[h + 4 >> 2] = g | 1;c[h + g >> 2] = g;if (m | 0) {
                    e = c[2788] | 0;b = m >>> 3;d = 11172 + (b << 1 << 2) | 0;b = 1 << b;if (!(n & b)) {
                      c[2783] = n | b;b = d;a = d + 8 | 0;
                    } else {
                      a = d + 8 | 0;b = c[a >> 2] | 0;
                    }c[a >> 2] = e;c[b + 12 >> 2] = e;c[e + 8 >> 2] = b;c[e + 12 >> 2] = d;
                  }c[2785] = g;c[2788] = h;
                }w = j + 8 | 0;l = x;return w | 0;
              } else n = k;
            } else n = k;
          } else n = k;
        } else if (a >>> 0 <= 4294967231) {
          a = a + 11 | 0;k = a & -8;j = c[2784] | 0;if (j) {
            e = 0 - k | 0;a = a >>> 8;if (a) {
              if (k >>> 0 > 16777215) i = 31;else {
                n = (a + 1048320 | 0) >>> 16 & 8;v = a << n;m = (v + 520192 | 0) >>> 16 & 4;v = v << m;i = (v + 245760 | 0) >>> 16 & 2;i = 14 - (m | n | i) + (v << i >>> 15) | 0;i = k >>> (i + 7 | 0) & 1 | i << 1;
              }
            } else i = 0;d = c[11436 + (i << 2) >> 2] | 0;a: do if (!d) {
              d = 0;a = 0;v = 57;
            } else {
              a = 0;h = k << ((i | 0) == 31 ? 0 : 25 - (i >>> 1) | 0);g = 0;while (1) {
                f = (c[d + 4 >> 2] & -8) - k | 0;if (f >>> 0 < e >>> 0) if (!f) {
                  a = d;e = 0;f = d;v = 61;break a;
                } else {
                  a = d;e = f;
                }f = c[d + 20 >> 2] | 0;d = c[d + 16 + (h >>> 31 << 2) >> 2] | 0;g = (f | 0) == 0 | (f | 0) == (d | 0) ? g : f;f = (d | 0) == 0;if (f) {
                  d = g;v = 57;break;
                } else h = h << ((f ^ 1) & 1);
              }
            } while (0);if ((v | 0) == 57) {
              if ((d | 0) == 0 & (a | 0) == 0) {
                a = 2 << i;a = j & (a | 0 - a);if (!a) {
                  n = k;break;
                }n = (a & 0 - a) + -1 | 0;h = n >>> 12 & 16;n = n >>> h;g = n >>> 5 & 8;n = n >>> g;i = n >>> 2 & 4;n = n >>> i;m = n >>> 1 & 2;n = n >>> m;d = n >>> 1 & 1;a = 0;d = c[11436 + ((g | h | i | m | d) + (n >>> d) << 2) >> 2] | 0;
              }if (!d) {
                i = a;h = e;
              } else {
                f = d;v = 61;
              }
            }if ((v | 0) == 61) while (1) {
              v = 0;d = (c[f + 4 >> 2] & -8) - k | 0;n = d >>> 0 < e >>> 0;d = n ? d : e;a = n ? f : a;f = c[f + 16 + (((c[f + 16 >> 2] | 0) == 0 & 1) << 2) >> 2] | 0;if (!f) {
                i = a;h = d;break;
              } else {
                e = d;v = 61;
              }
            }if ((i | 0) != 0 ? h >>> 0 < ((c[2785] | 0) - k | 0) >>> 0 : 0) {
              g = i + k | 0;if (i >>> 0 >= g >>> 0) {
                w = 0;l = x;return w | 0;
              }f = c[i + 24 >> 2] | 0;b = c[i + 12 >> 2] | 0;do if ((b | 0) == (i | 0)) {
                a = i + 20 | 0;b = c[a >> 2] | 0;if (!b) {
                  a = i + 16 | 0;b = c[a >> 2] | 0;if (!b) {
                    b = 0;break;
                  }
                }while (1) {
                  d = b + 20 | 0;e = c[d >> 2] | 0;if (e | 0) {
                    b = e;a = d;continue;
                  }d = b + 16 | 0;e = c[d >> 2] | 0;if (!e) break;else {
                    b = e;a = d;
                  }
                }c[a >> 2] = 0;
              } else {
                w = c[i + 8 >> 2] | 0;c[w + 12 >> 2] = b;c[b + 8 >> 2] = w;
              } while (0);do if (f) {
                a = c[i + 28 >> 2] | 0;d = 11436 + (a << 2) | 0;if ((i | 0) == (c[d >> 2] | 0)) {
                  c[d >> 2] = b;if (!b) {
                    e = j & ~(1 << a);c[2784] = e;break;
                  }
                } else {
                  c[f + 16 + (((c[f + 16 >> 2] | 0) != (i | 0) & 1) << 2) >> 2] = b;if (!b) {
                    e = j;break;
                  }
                }c[b + 24 >> 2] = f;a = c[i + 16 >> 2] | 0;if (a | 0) {
                  c[b + 16 >> 2] = a;c[a + 24 >> 2] = b;
                }a = c[i + 20 >> 2] | 0;if (a) {
                  c[b + 20 >> 2] = a;c[a + 24 >> 2] = b;e = j;
                } else e = j;
              } else e = j; while (0);do if (h >>> 0 >= 16) {
                c[i + 4 >> 2] = k | 3;c[g + 4 >> 2] = h | 1;c[g + h >> 2] = h;b = h >>> 3;if (h >>> 0 < 256) {
                  d = 11172 + (b << 1 << 2) | 0;a = c[2783] | 0;b = 1 << b;if (!(a & b)) {
                    c[2783] = a | b;b = d;a = d + 8 | 0;
                  } else {
                    a = d + 8 | 0;b = c[a >> 2] | 0;
                  }c[a >> 2] = g;c[b + 12 >> 2] = g;c[g + 8 >> 2] = b;c[g + 12 >> 2] = d;break;
                }b = h >>> 8;if (b) {
                  if (h >>> 0 > 16777215) b = 31;else {
                    v = (b + 1048320 | 0) >>> 16 & 8;w = b << v;u = (w + 520192 | 0) >>> 16 & 4;w = w << u;b = (w + 245760 | 0) >>> 16 & 2;b = 14 - (u | v | b) + (w << b >>> 15) | 0;b = h >>> (b + 7 | 0) & 1 | b << 1;
                  }
                } else b = 0;d = 11436 + (b << 2) | 0;c[g + 28 >> 2] = b;a = g + 16 | 0;c[a + 4 >> 2] = 0;c[a >> 2] = 0;a = 1 << b;if (!(e & a)) {
                  c[2784] = e | a;c[d >> 2] = g;c[g + 24 >> 2] = d;c[g + 12 >> 2] = g;c[g + 8 >> 2] = g;break;
                }a = h << ((b | 0) == 31 ? 0 : 25 - (b >>> 1) | 0);d = c[d >> 2] | 0;while (1) {
                  if ((c[d + 4 >> 2] & -8 | 0) == (h | 0)) {
                    v = 97;break;
                  }e = d + 16 + (a >>> 31 << 2) | 0;b = c[e >> 2] | 0;if (!b) {
                    v = 96;break;
                  } else {
                    a = a << 1;d = b;
                  }
                }if ((v | 0) == 96) {
                  c[e >> 2] = g;c[g + 24 >> 2] = d;c[g + 12 >> 2] = g;c[g + 8 >> 2] = g;break;
                } else if ((v | 0) == 97) {
                  v = d + 8 | 0;w = c[v >> 2] | 0;c[w + 12 >> 2] = g;c[v >> 2] = g;c[g + 8 >> 2] = w;c[g + 12 >> 2] = d;c[g + 24 >> 2] = 0;break;
                }
              } else {
                w = h + k | 0;c[i + 4 >> 2] = w | 3;w = i + w + 4 | 0;c[w >> 2] = c[w >> 2] | 1;
              } while (0);w = i + 8 | 0;l = x;return w | 0;
            } else n = k;
          } else n = k;
        } else n = -1; while (0);d = c[2785] | 0;if (d >>> 0 >= n >>> 0) {
          b = d - n | 0;a = c[2788] | 0;if (b >>> 0 > 15) {
            w = a + n | 0;c[2788] = w;c[2785] = b;c[w + 4 >> 2] = b | 1;c[w + b >> 2] = b;c[a + 4 >> 2] = n | 3;
          } else {
            c[2785] = 0;c[2788] = 0;c[a + 4 >> 2] = d | 3;w = a + d + 4 | 0;c[w >> 2] = c[w >> 2] | 1;
          }w = a + 8 | 0;l = x;return w | 0;
        }h = c[2786] | 0;if (h >>> 0 > n >>> 0) {
          u = h - n | 0;c[2786] = u;w = c[2789] | 0;v = w + n | 0;c[2789] = v;c[v + 4 >> 2] = u | 1;c[w + 4 >> 2] = n | 3;w = w + 8 | 0;l = x;return w | 0;
        }if (!(c[2901] | 0)) {
          c[2903] = 4096;c[2902] = 4096;c[2904] = -1;c[2905] = -1;c[2906] = 0;c[2894] = 0;a = o & -16 ^ 1431655768;c[o >> 2] = a;c[2901] = a;a = 4096;
        } else a = c[2903] | 0;i = n + 48 | 0;j = n + 47 | 0;g = a + j | 0;f = 0 - a | 0;k = g & f;if (k >>> 0 <= n >>> 0) {
          w = 0;l = x;return w | 0;
        }a = c[2893] | 0;if (a | 0 ? (m = c[2891] | 0, o = m + k | 0, o >>> 0 <= m >>> 0 | o >>> 0 > a >>> 0) : 0) {
          w = 0;l = x;return w | 0;
        }b: do if (!(c[2894] & 4)) {
          d = c[2789] | 0;c: do if (d) {
            e = 11580;while (1) {
              a = c[e >> 2] | 0;if (a >>> 0 <= d >>> 0 ? (r = e + 4 | 0, (a + (c[r >> 2] | 0) | 0) >>> 0 > d >>> 0) : 0) break;a = c[e + 8 >> 2] | 0;if (!a) {
                v = 118;break c;
              } else e = a;
            }b = g - h & f;if (b >>> 0 < 2147483647) {
              a = FC(b | 0) | 0;if ((a | 0) == ((c[e >> 2] | 0) + (c[r >> 2] | 0) | 0)) {
                if ((a | 0) != (-1 | 0)) {
                  h = b;g = a;v = 135;break b;
                }
              } else {
                e = a;v = 126;
              }
            } else b = 0;
          } else v = 118; while (0);do if ((v | 0) == 118) {
            d = FC(0) | 0;if ((d | 0) != (-1 | 0) ? (b = d, p = c[2902] | 0, q = p + -1 | 0, b = ((q & b | 0) == 0 ? 0 : (q + b & 0 - p) - b | 0) + k | 0, p = c[2891] | 0, q = b + p | 0, b >>> 0 > n >>> 0 & b >>> 0 < 2147483647) : 0) {
              r = c[2893] | 0;if (r | 0 ? q >>> 0 <= p >>> 0 | q >>> 0 > r >>> 0 : 0) {
                b = 0;break;
              }a = FC(b | 0) | 0;if ((a | 0) == (d | 0)) {
                h = b;g = d;v = 135;break b;
              } else {
                e = a;v = 126;
              }
            } else b = 0;
          } while (0);do if ((v | 0) == 126) {
            d = 0 - b | 0;if (!(i >>> 0 > b >>> 0 & (b >>> 0 < 2147483647 & (e | 0) != (-1 | 0)))) if ((e | 0) == (-1 | 0)) {
              b = 0;break;
            } else {
              h = b;g = e;v = 135;break b;
            }a = c[2903] | 0;a = j - b + a & 0 - a;if (a >>> 0 >= 2147483647) {
              h = b;g = e;v = 135;break b;
            }if ((FC(a | 0) | 0) == (-1 | 0)) {
              FC(d | 0) | 0;b = 0;break;
            } else {
              h = a + b | 0;g = e;v = 135;break b;
            }
          } while (0);c[2894] = c[2894] | 4;v = 133;
        } else {
          b = 0;v = 133;
        } while (0);if (((v | 0) == 133 ? k >>> 0 < 2147483647 : 0) ? (u = FC(k | 0) | 0, r = FC(0) | 0, s = r - u | 0, t = s >>> 0 > (n + 40 | 0) >>> 0, !((u | 0) == (-1 | 0) | t ^ 1 | u >>> 0 < r >>> 0 & ((u | 0) != (-1 | 0) & (r | 0) != (-1 | 0)) ^ 1)) : 0) {
          h = t ? s : b;g = u;v = 135;
        }if ((v | 0) == 135) {
          b = (c[2891] | 0) + h | 0;c[2891] = b;if (b >>> 0 > (c[2892] | 0) >>> 0) c[2892] = b;j = c[2789] | 0;do if (j) {
            b = 11580;while (1) {
              a = c[b >> 2] | 0;d = b + 4 | 0;e = c[d >> 2] | 0;if ((g | 0) == (a + e | 0)) {
                v = 145;break;
              }f = c[b + 8 >> 2] | 0;if (!f) break;else b = f;
            }if (((v | 0) == 145 ? (c[b + 12 >> 2] & 8 | 0) == 0 : 0) ? j >>> 0 < g >>> 0 & j >>> 0 >= a >>> 0 : 0) {
              c[d >> 2] = e + h;w = j + 8 | 0;w = (w & 7 | 0) == 0 ? 0 : 0 - w & 7;v = j + w | 0;w = (c[2786] | 0) + (h - w) | 0;c[2789] = v;c[2786] = w;c[v + 4 >> 2] = w | 1;c[v + w + 4 >> 2] = 40;c[2790] = c[2905];break;
            }if (g >>> 0 < (c[2787] | 0) >>> 0) c[2787] = g;d = g + h | 0;b = 11580;while (1) {
              if ((c[b >> 2] | 0) == (d | 0)) {
                v = 153;break;
              }a = c[b + 8 >> 2] | 0;if (!a) break;else b = a;
            }if ((v | 0) == 153 ? (c[b + 12 >> 2] & 8 | 0) == 0 : 0) {
              c[b >> 2] = g;m = b + 4 | 0;c[m >> 2] = (c[m >> 2] | 0) + h;m = g + 8 | 0;m = g + ((m & 7 | 0) == 0 ? 0 : 0 - m & 7) | 0;b = d + 8 | 0;b = d + ((b & 7 | 0) == 0 ? 0 : 0 - b & 7) | 0;k = m + n | 0;i = b - m - n | 0;c[m + 4 >> 2] = n | 3;do if ((b | 0) != (j | 0)) {
                if ((b | 0) == (c[2788] | 0)) {
                  w = (c[2785] | 0) + i | 0;c[2785] = w;c[2788] = k;c[k + 4 >> 2] = w | 1;c[k + w >> 2] = w;break;
                }a = c[b + 4 >> 2] | 0;if ((a & 3 | 0) == 1) {
                  h = a & -8;e = a >>> 3;d: do if (a >>> 0 < 256) {
                    a = c[b + 8 >> 2] | 0;d = c[b + 12 >> 2] | 0;if ((d | 0) == (a | 0)) {
                      c[2783] = c[2783] & ~(1 << e);break;
                    } else {
                      c[a + 12 >> 2] = d;c[d + 8 >> 2] = a;break;
                    }
                  } else {
                    g = c[b + 24 >> 2] | 0;a = c[b + 12 >> 2] | 0;do if ((a | 0) == (b | 0)) {
                      e = b + 16 | 0;d = e + 4 | 0;a = c[d >> 2] | 0;if (!a) {
                        a = c[e >> 2] | 0;if (!a) {
                          a = 0;break;
                        } else d = e;
                      }while (1) {
                        e = a + 20 | 0;f = c[e >> 2] | 0;if (f | 0) {
                          a = f;d = e;continue;
                        }e = a + 16 | 0;f = c[e >> 2] | 0;if (!f) break;else {
                          a = f;d = e;
                        }
                      }c[d >> 2] = 0;
                    } else {
                      w = c[b + 8 >> 2] | 0;c[w + 12 >> 2] = a;c[a + 8 >> 2] = w;
                    } while (0);if (!g) break;d = c[b + 28 >> 2] | 0;e = 11436 + (d << 2) | 0;do if ((b | 0) != (c[e >> 2] | 0)) {
                      c[g + 16 + (((c[g + 16 >> 2] | 0) != (b | 0) & 1) << 2) >> 2] = a;if (!a) break d;
                    } else {
                      c[e >> 2] = a;if (a | 0) break;c[2784] = c[2784] & ~(1 << d);break d;
                    } while (0);c[a + 24 >> 2] = g;d = b + 16 | 0;e = c[d >> 2] | 0;if (e | 0) {
                      c[a + 16 >> 2] = e;c[e + 24 >> 2] = a;
                    }d = c[d + 4 >> 2] | 0;if (!d) break;c[a + 20 >> 2] = d;c[d + 24 >> 2] = a;
                  } while (0);b = b + h | 0;f = h + i | 0;
                } else f = i;b = b + 4 | 0;c[b >> 2] = c[b >> 2] & -2;c[k + 4 >> 2] = f | 1;c[k + f >> 2] = f;b = f >>> 3;if (f >>> 0 < 256) {
                  d = 11172 + (b << 1 << 2) | 0;a = c[2783] | 0;b = 1 << b;if (!(a & b)) {
                    c[2783] = a | b;b = d;a = d + 8 | 0;
                  } else {
                    a = d + 8 | 0;b = c[a >> 2] | 0;
                  }c[a >> 2] = k;c[b + 12 >> 2] = k;c[k + 8 >> 2] = b;c[k + 12 >> 2] = d;break;
                }b = f >>> 8;do if (!b) b = 0;else {
                  if (f >>> 0 > 16777215) {
                    b = 31;break;
                  }v = (b + 1048320 | 0) >>> 16 & 8;w = b << v;u = (w + 520192 | 0) >>> 16 & 4;w = w << u;b = (w + 245760 | 0) >>> 16 & 2;b = 14 - (u | v | b) + (w << b >>> 15) | 0;b = f >>> (b + 7 | 0) & 1 | b << 1;
                } while (0);e = 11436 + (b << 2) | 0;c[k + 28 >> 2] = b;a = k + 16 | 0;c[a + 4 >> 2] = 0;c[a >> 2] = 0;a = c[2784] | 0;d = 1 << b;if (!(a & d)) {
                  c[2784] = a | d;c[e >> 2] = k;c[k + 24 >> 2] = e;c[k + 12 >> 2] = k;c[k + 8 >> 2] = k;break;
                }a = f << ((b | 0) == 31 ? 0 : 25 - (b >>> 1) | 0);d = c[e >> 2] | 0;while (1) {
                  if ((c[d + 4 >> 2] & -8 | 0) == (f | 0)) {
                    v = 194;break;
                  }e = d + 16 + (a >>> 31 << 2) | 0;b = c[e >> 2] | 0;if (!b) {
                    v = 193;break;
                  } else {
                    a = a << 1;d = b;
                  }
                }if ((v | 0) == 193) {
                  c[e >> 2] = k;c[k + 24 >> 2] = d;c[k + 12 >> 2] = k;c[k + 8 >> 2] = k;break;
                } else if ((v | 0) == 194) {
                  v = d + 8 | 0;w = c[v >> 2] | 0;c[w + 12 >> 2] = k;c[v >> 2] = k;c[k + 8 >> 2] = w;c[k + 12 >> 2] = d;c[k + 24 >> 2] = 0;break;
                }
              } else {
                w = (c[2786] | 0) + i | 0;c[2786] = w;c[2789] = k;c[k + 4 >> 2] = w | 1;
              } while (0);w = m + 8 | 0;l = x;return w | 0;
            }b = 11580;while (1) {
              a = c[b >> 2] | 0;if (a >>> 0 <= j >>> 0 ? (w = a + (c[b + 4 >> 2] | 0) | 0, w >>> 0 > j >>> 0) : 0) break;b = c[b + 8 >> 2] | 0;
            }f = w + -47 | 0;a = f + 8 | 0;a = f + ((a & 7 | 0) == 0 ? 0 : 0 - a & 7) | 0;f = j + 16 | 0;a = a >>> 0 < f >>> 0 ? j : a;b = a + 8 | 0;d = g + 8 | 0;d = (d & 7 | 0) == 0 ? 0 : 0 - d & 7;v = g + d | 0;d = h + -40 - d | 0;c[2789] = v;c[2786] = d;c[v + 4 >> 2] = d | 1;c[v + d + 4 >> 2] = 40;c[2790] = c[2905];d = a + 4 | 0;c[d >> 2] = 27;c[b >> 2] = c[2895];c[b + 4 >> 2] = c[2896];c[b + 8 >> 2] = c[2897];c[b + 12 >> 2] = c[2898];c[2895] = g;c[2896] = h;c[2898] = 0;c[2897] = b;b = a + 24 | 0;do {
              v = b;b = b + 4 | 0;c[b >> 2] = 7;
            } while ((v + 8 | 0) >>> 0 < w >>> 0);if ((a | 0) != (j | 0)) {
              g = a - j | 0;c[d >> 2] = c[d >> 2] & -2;c[j + 4 >> 2] = g | 1;c[a >> 2] = g;b = g >>> 3;if (g >>> 0 < 256) {
                d = 11172 + (b << 1 << 2) | 0;a = c[2783] | 0;b = 1 << b;if (!(a & b)) {
                  c[2783] = a | b;b = d;a = d + 8 | 0;
                } else {
                  a = d + 8 | 0;b = c[a >> 2] | 0;
                }c[a >> 2] = j;c[b + 12 >> 2] = j;c[j + 8 >> 2] = b;c[j + 12 >> 2] = d;break;
              }b = g >>> 8;if (b) {
                if (g >>> 0 > 16777215) d = 31;else {
                  v = (b + 1048320 | 0) >>> 16 & 8;w = b << v;u = (w + 520192 | 0) >>> 16 & 4;w = w << u;d = (w + 245760 | 0) >>> 16 & 2;d = 14 - (u | v | d) + (w << d >>> 15) | 0;d = g >>> (d + 7 | 0) & 1 | d << 1;
                }
              } else d = 0;e = 11436 + (d << 2) | 0;c[j + 28 >> 2] = d;c[j + 20 >> 2] = 0;c[f >> 2] = 0;b = c[2784] | 0;a = 1 << d;if (!(b & a)) {
                c[2784] = b | a;c[e >> 2] = j;c[j + 24 >> 2] = e;c[j + 12 >> 2] = j;c[j + 8 >> 2] = j;break;
              }a = g << ((d | 0) == 31 ? 0 : 25 - (d >>> 1) | 0);d = c[e >> 2] | 0;while (1) {
                if ((c[d + 4 >> 2] & -8 | 0) == (g | 0)) {
                  v = 216;break;
                }e = d + 16 + (a >>> 31 << 2) | 0;b = c[e >> 2] | 0;if (!b) {
                  v = 215;break;
                } else {
                  a = a << 1;d = b;
                }
              }if ((v | 0) == 215) {
                c[e >> 2] = j;c[j + 24 >> 2] = d;c[j + 12 >> 2] = j;c[j + 8 >> 2] = j;break;
              } else if ((v | 0) == 216) {
                v = d + 8 | 0;w = c[v >> 2] | 0;c[w + 12 >> 2] = j;c[v >> 2] = j;c[j + 8 >> 2] = w;c[j + 12 >> 2] = d;c[j + 24 >> 2] = 0;break;
              }
            }
          } else {
            w = c[2787] | 0;if ((w | 0) == 0 | g >>> 0 < w >>> 0) c[2787] = g;c[2895] = g;c[2896] = h;c[2898] = 0;c[2792] = c[2901];c[2791] = -1;b = 0;do {
              w = 11172 + (b << 1 << 2) | 0;c[w + 12 >> 2] = w;c[w + 8 >> 2] = w;b = b + 1 | 0;
            } while ((b | 0) != 32);w = g + 8 | 0;w = (w & 7 | 0) == 0 ? 0 : 0 - w & 7;v = g + w | 0;w = h + -40 - w | 0;c[2789] = v;c[2786] = w;c[v + 4 >> 2] = w | 1;c[v + w + 4 >> 2] = 40;c[2790] = c[2905];
          } while (0);b = c[2786] | 0;if (b >>> 0 > n >>> 0) {
            u = b - n | 0;c[2786] = u;w = c[2789] | 0;v = w + n | 0;c[2789] = v;c[v + 4 >> 2] = u | 1;c[w + 4 >> 2] = n | 3;w = w + 8 | 0;l = x;return w | 0;
          }
        }c[(vB() | 0) >> 2] = 12;w = 0;l = x;return w | 0;
      }function pB(a) {
        a = a | 0;var b = 0,
            d = 0,
            e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;if (!a) return;d = a + -8 | 0;f = c[2787] | 0;a = c[a + -4 >> 2] | 0;b = a & -8;j = d + b | 0;do if (!(a & 1)) {
          e = c[d >> 2] | 0;if (!(a & 3)) return;h = d + (0 - e) | 0;g = e + b | 0;if (h >>> 0 < f >>> 0) return;if ((h | 0) == (c[2788] | 0)) {
            a = j + 4 | 0;b = c[a >> 2] | 0;if ((b & 3 | 0) != 3) {
              i = h;b = g;break;
            }c[2785] = g;c[a >> 2] = b & -2;c[h + 4 >> 2] = g | 1;c[h + g >> 2] = g;return;
          }d = e >>> 3;if (e >>> 0 < 256) {
            a = c[h + 8 >> 2] | 0;b = c[h + 12 >> 2] | 0;if ((b | 0) == (a | 0)) {
              c[2783] = c[2783] & ~(1 << d);i = h;b = g;break;
            } else {
              c[a + 12 >> 2] = b;c[b + 8 >> 2] = a;i = h;b = g;break;
            }
          }f = c[h + 24 >> 2] | 0;a = c[h + 12 >> 2] | 0;do if ((a | 0) == (h | 0)) {
            d = h + 16 | 0;b = d + 4 | 0;a = c[b >> 2] | 0;if (!a) {
              a = c[d >> 2] | 0;if (!a) {
                a = 0;break;
              } else b = d;
            }while (1) {
              d = a + 20 | 0;e = c[d >> 2] | 0;if (e | 0) {
                a = e;b = d;continue;
              }d = a + 16 | 0;e = c[d >> 2] | 0;if (!e) break;else {
                a = e;b = d;
              }
            }c[b >> 2] = 0;
          } else {
            i = c[h + 8 >> 2] | 0;c[i + 12 >> 2] = a;c[a + 8 >> 2] = i;
          } while (0);if (f) {
            b = c[h + 28 >> 2] | 0;d = 11436 + (b << 2) | 0;if ((h | 0) == (c[d >> 2] | 0)) {
              c[d >> 2] = a;if (!a) {
                c[2784] = c[2784] & ~(1 << b);i = h;b = g;break;
              }
            } else {
              c[f + 16 + (((c[f + 16 >> 2] | 0) != (h | 0) & 1) << 2) >> 2] = a;if (!a) {
                i = h;b = g;break;
              }
            }c[a + 24 >> 2] = f;b = h + 16 | 0;d = c[b >> 2] | 0;if (d | 0) {
              c[a + 16 >> 2] = d;c[d + 24 >> 2] = a;
            }b = c[b + 4 >> 2] | 0;if (b) {
              c[a + 20 >> 2] = b;c[b + 24 >> 2] = a;i = h;b = g;
            } else {
              i = h;b = g;
            }
          } else {
            i = h;b = g;
          }
        } else {
          i = d;h = d;
        } while (0);if (h >>> 0 >= j >>> 0) return;a = j + 4 | 0;e = c[a >> 2] | 0;if (!(e & 1)) return;if (!(e & 2)) {
          a = c[2788] | 0;if ((j | 0) == (c[2789] | 0)) {
            j = (c[2786] | 0) + b | 0;c[2786] = j;c[2789] = i;c[i + 4 >> 2] = j | 1;if ((i | 0) != (a | 0)) return;c[2788] = 0;c[2785] = 0;return;
          }if ((j | 0) == (a | 0)) {
            j = (c[2785] | 0) + b | 0;c[2785] = j;c[2788] = h;c[i + 4 >> 2] = j | 1;c[h + j >> 2] = j;return;
          }f = (e & -8) + b | 0;d = e >>> 3;do if (e >>> 0 < 256) {
            b = c[j + 8 >> 2] | 0;a = c[j + 12 >> 2] | 0;if ((a | 0) == (b | 0)) {
              c[2783] = c[2783] & ~(1 << d);break;
            } else {
              c[b + 12 >> 2] = a;c[a + 8 >> 2] = b;break;
            }
          } else {
            g = c[j + 24 >> 2] | 0;a = c[j + 12 >> 2] | 0;do if ((a | 0) == (j | 0)) {
              d = j + 16 | 0;b = d + 4 | 0;a = c[b >> 2] | 0;if (!a) {
                a = c[d >> 2] | 0;if (!a) {
                  d = 0;break;
                } else b = d;
              }while (1) {
                d = a + 20 | 0;e = c[d >> 2] | 0;if (e | 0) {
                  a = e;b = d;continue;
                }d = a + 16 | 0;e = c[d >> 2] | 0;if (!e) break;else {
                  a = e;b = d;
                }
              }c[b >> 2] = 0;d = a;
            } else {
              d = c[j + 8 >> 2] | 0;c[d + 12 >> 2] = a;c[a + 8 >> 2] = d;d = a;
            } while (0);if (g | 0) {
              a = c[j + 28 >> 2] | 0;b = 11436 + (a << 2) | 0;if ((j | 0) == (c[b >> 2] | 0)) {
                c[b >> 2] = d;if (!d) {
                  c[2784] = c[2784] & ~(1 << a);break;
                }
              } else {
                c[g + 16 + (((c[g + 16 >> 2] | 0) != (j | 0) & 1) << 2) >> 2] = d;if (!d) break;
              }c[d + 24 >> 2] = g;a = j + 16 | 0;b = c[a >> 2] | 0;if (b | 0) {
                c[d + 16 >> 2] = b;c[b + 24 >> 2] = d;
              }a = c[a + 4 >> 2] | 0;if (a | 0) {
                c[d + 20 >> 2] = a;c[a + 24 >> 2] = d;
              }
            }
          } while (0);c[i + 4 >> 2] = f | 1;c[h + f >> 2] = f;if ((i | 0) == (c[2788] | 0)) {
            c[2785] = f;return;
          }
        } else {
          c[a >> 2] = e & -2;c[i + 4 >> 2] = b | 1;c[h + b >> 2] = b;f = b;
        }a = f >>> 3;if (f >>> 0 < 256) {
          d = 11172 + (a << 1 << 2) | 0;b = c[2783] | 0;a = 1 << a;if (!(b & a)) {
            c[2783] = b | a;a = d;b = d + 8 | 0;
          } else {
            b = d + 8 | 0;a = c[b >> 2] | 0;
          }c[b >> 2] = i;c[a + 12 >> 2] = i;c[i + 8 >> 2] = a;c[i + 12 >> 2] = d;return;
        }a = f >>> 8;if (a) {
          if (f >>> 0 > 16777215) a = 31;else {
            h = (a + 1048320 | 0) >>> 16 & 8;j = a << h;g = (j + 520192 | 0) >>> 16 & 4;j = j << g;a = (j + 245760 | 0) >>> 16 & 2;a = 14 - (g | h | a) + (j << a >>> 15) | 0;a = f >>> (a + 7 | 0) & 1 | a << 1;
          }
        } else a = 0;e = 11436 + (a << 2) | 0;c[i + 28 >> 2] = a;c[i + 20 >> 2] = 0;c[i + 16 >> 2] = 0;b = c[2784] | 0;d = 1 << a;do if (b & d) {
          b = f << ((a | 0) == 31 ? 0 : 25 - (a >>> 1) | 0);d = c[e >> 2] | 0;while (1) {
            if ((c[d + 4 >> 2] & -8 | 0) == (f | 0)) {
              a = 73;break;
            }e = d + 16 + (b >>> 31 << 2) | 0;a = c[e >> 2] | 0;if (!a) {
              a = 72;break;
            } else {
              b = b << 1;d = a;
            }
          }if ((a | 0) == 72) {
            c[e >> 2] = i;c[i + 24 >> 2] = d;c[i + 12 >> 2] = i;c[i + 8 >> 2] = i;break;
          } else if ((a | 0) == 73) {
            h = d + 8 | 0;j = c[h >> 2] | 0;c[j + 12 >> 2] = i;c[h >> 2] = i;c[i + 8 >> 2] = j;c[i + 12 >> 2] = d;c[i + 24 >> 2] = 0;break;
          }
        } else {
          c[2784] = b | d;c[e >> 2] = i;c[i + 24 >> 2] = e;c[i + 12 >> 2] = i;c[i + 8 >> 2] = i;
        } while (0);j = (c[2791] | 0) + -1 | 0;c[2791] = j;if (!j) a = 11588;else return;while (1) {
          a = c[a >> 2] | 0;if (!a) break;else a = a + 8 | 0;
        }c[2791] = -1;return;
      }function qB() {
        return 11628;
      }function rB(a) {
        a = a | 0;var b = 0,
            d = 0;b = l;l = l + 16 | 0;d = b;c[d >> 2] = yB(c[a + 60 >> 2] | 0) | 0;a = uB(db(6, d | 0) | 0) | 0;l = b;return a | 0;
      }function sB(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0;n = l;l = l + 48 | 0;k = n + 16 | 0;g = n;f = n + 32 | 0;i = a + 28 | 0;e = c[i >> 2] | 0;c[f >> 2] = e;j = a + 20 | 0;e = (c[j >> 2] | 0) - e | 0;c[f + 4 >> 2] = e;c[f + 8 >> 2] = b;c[f + 12 >> 2] = d;e = e + d | 0;h = a + 60 | 0;c[g >> 2] = c[h >> 2];c[g + 4 >> 2] = f;c[g + 8 >> 2] = 2;g = uB(gb(146, g | 0) | 0) | 0;a: do if ((e | 0) != (g | 0)) {
          b = 2;while (1) {
            if ((g | 0) < 0) break;e = e - g | 0;p = c[f + 4 >> 2] | 0;o = g >>> 0 > p >>> 0;f = o ? f + 8 | 0 : f;b = (o << 31 >> 31) + b | 0;p = g - (o ? p : 0) | 0;c[f >> 2] = (c[f >> 2] | 0) + p;o = f + 4 | 0;c[o >> 2] = (c[o >> 2] | 0) - p;c[k >> 2] = c[h >> 2];c[k + 4 >> 2] = f;c[k + 8 >> 2] = b;g = uB(gb(146, k | 0) | 0) | 0;if ((e | 0) == (g | 0)) {
              m = 3;break a;
            }
          }c[a + 16 >> 2] = 0;c[i >> 2] = 0;c[j >> 2] = 0;c[a >> 2] = c[a >> 2] | 32;if ((b | 0) == 2) d = 0;else d = d - (c[f + 4 >> 2] | 0) | 0;
        } else m = 3; while (0);if ((m | 0) == 3) {
          p = c[a + 44 >> 2] | 0;c[a + 16 >> 2] = p + (c[a + 48 >> 2] | 0);c[i >> 2] = p;c[j >> 2] = p;
        }l = n;return d | 0;
      }function tB(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0;f = l;l = l + 32 | 0;g = f;e = f + 20 | 0;c[g >> 2] = c[a + 60 >> 2];c[g + 4 >> 2] = 0;c[g + 8 >> 2] = b;c[g + 12 >> 2] = e;c[g + 16 >> 2] = d;if ((uB(fb(140, g | 0) | 0) | 0) < 0) {
          c[e >> 2] = -1;a = -1;
        } else a = c[e >> 2] | 0;l = f;return a | 0;
      }function uB(a) {
        a = a | 0;if (a >>> 0 > 4294963200) {
          c[(vB() | 0) >> 2] = 0 - a;a = -1;
        }return a | 0;
      }function vB() {
        return (wB() | 0) + 64 | 0;
      }function wB() {
        return xB() | 0;
      }function xB() {
        return 2084;
      }function yB(a) {
        a = a | 0;return a | 0;
      }function zB(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = l;l = l + 32 | 0;f = g;c[b + 36 >> 2] = 1;if ((c[b >> 2] & 64 | 0) == 0 ? (c[f >> 2] = c[b + 60 >> 2], c[f + 4 >> 2] = 21523, c[f + 8 >> 2] = g + 16, Wa(54, f | 0) | 0) : 0) a[b + 75 >> 0] = -1;f = sB(b, d, e) | 0;l = g;return f | 0;
      }function AB(b, c) {
        b = b | 0;c = c | 0;var d = 0,
            e = 0;d = a[b >> 0] | 0;e = a[c >> 0] | 0;if (d << 24 >> 24 == 0 ? 1 : d << 24 >> 24 != e << 24 >> 24) b = e;else {
          do {
            b = b + 1 | 0;c = c + 1 | 0;d = a[b >> 0] | 0;e = a[c >> 0] | 0;
          } while (!(d << 24 >> 24 == 0 ? 1 : d << 24 >> 24 != e << 24 >> 24));b = e;
        }return (d & 255) - (b & 255) | 0;
      }function BB(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;var e = 0,
            f = 0;a: do if (!d) b = 0;else {
          while (1) {
            e = a[b >> 0] | 0;f = a[c >> 0] | 0;if (e << 24 >> 24 != f << 24 >> 24) break;d = d + -1 | 0;if (!d) {
              b = 0;break a;
            } else {
              b = b + 1 | 0;c = c + 1 | 0;
            }
          }b = (e & 255) - (f & 255) | 0;
        } while (0);return b | 0;
      }function CB(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0;s = l;l = l + 224 | 0;n = s + 120 | 0;o = s + 80 | 0;q = s;r = s + 136 | 0;f = o;g = f + 40 | 0;do {
          c[f >> 2] = 0;f = f + 4 | 0;
        } while ((f | 0) < (g | 0));c[n >> 2] = c[e >> 2];if ((DB(0, d, n, q, o) | 0) < 0) e = -1;else {
          if ((c[b + 76 >> 2] | 0) > -1) p = EB(b) | 0;else p = 0;e = c[b >> 2] | 0;m = e & 32;if ((a[b + 74 >> 0] | 0) < 1) c[b >> 2] = e & -33;f = b + 48 | 0;if (!(c[f >> 2] | 0)) {
            g = b + 44 | 0;h = c[g >> 2] | 0;c[g >> 2] = r;i = b + 28 | 0;c[i >> 2] = r;j = b + 20 | 0;c[j >> 2] = r;c[f >> 2] = 80;k = b + 16 | 0;c[k >> 2] = r + 80;e = DB(b, d, n, q, o) | 0;if (h) {
              sb[c[b + 36 >> 2] & 7](b, 0, 0) | 0;e = (c[j >> 2] | 0) == 0 ? -1 : e;c[g >> 2] = h;c[f >> 2] = 0;c[k >> 2] = 0;c[i >> 2] = 0;c[j >> 2] = 0;
            }
          } else e = DB(b, d, n, q, o) | 0;f = c[b >> 2] | 0;c[b >> 2] = f | m;if (p | 0) FB(b);e = (f & 32 | 0) == 0 ? e : -1;
        }l = s;return e | 0;
      }function DB(d, e, f, g, i) {
        d = d | 0;e = e | 0;f = f | 0;g = g | 0;i = i | 0;var j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0,
            s = 0,
            t = 0,
            u = 0,
            v = 0,
            w = 0,
            x = 0,
            y = 0,
            z = 0,
            B = 0,
            C = 0,
            D = 0,
            E = 0,
            F = 0,
            G = 0,
            H = 0;H = l;l = l + 64 | 0;D = H + 16 | 0;E = H;B = H + 24 | 0;F = H + 8 | 0;G = H + 20 | 0;c[D >> 2] = e;x = (d | 0) != 0;y = B + 40 | 0;z = y;B = B + 39 | 0;C = F + 4 | 0;k = 0;j = 0;p = 0;a: while (1) {
          do if ((j | 0) > -1) if ((k | 0) > (2147483647 - j | 0)) {
            c[(vB() | 0) >> 2] = 75;j = -1;break;
          } else {
            j = k + j | 0;break;
          } while (0);k = a[e >> 0] | 0;if (!(k << 24 >> 24)) {
            w = 87;break;
          } else m = e;b: while (1) {
            switch (k << 24 >> 24) {case 37:
                {
                  k = m;w = 9;break b;
                }case 0:
                {
                  k = m;break b;
                }default:
                {}}v = m + 1 | 0;c[D >> 2] = v;k = a[v >> 0] | 0;m = v;
          }c: do if ((w | 0) == 9) while (1) {
            w = 0;if ((a[m + 1 >> 0] | 0) != 37) break c;k = k + 1 | 0;m = m + 2 | 0;c[D >> 2] = m;if ((a[m >> 0] | 0) == 37) w = 9;else break;
          } while (0);k = k - e | 0;if (x) GB(d, e, k);if (k | 0) {
            e = m;continue;
          }n = m + 1 | 0;k = (a[n >> 0] | 0) + -48 | 0;if (k >>> 0 < 10) {
            v = (a[m + 2 >> 0] | 0) == 36;u = v ? k : -1;p = v ? 1 : p;n = v ? m + 3 | 0 : n;
          } else u = -1;c[D >> 2] = n;k = a[n >> 0] | 0;m = (k << 24 >> 24) + -32 | 0;d: do if (m >>> 0 < 32) {
            o = 0;q = k;while (1) {
              k = 1 << m;if (!(k & 75913)) {
                k = q;break d;
              }o = k | o;n = n + 1 | 0;c[D >> 2] = n;k = a[n >> 0] | 0;m = (k << 24 >> 24) + -32 | 0;if (m >>> 0 >= 32) break;else q = k;
            }
          } else o = 0; while (0);if (k << 24 >> 24 == 42) {
            m = n + 1 | 0;k = (a[m >> 0] | 0) + -48 | 0;if (k >>> 0 < 10 ? (a[n + 2 >> 0] | 0) == 36 : 0) {
              c[i + (k << 2) >> 2] = 10;k = c[g + ((a[m >> 0] | 0) + -48 << 3) >> 2] | 0;p = 1;n = n + 3 | 0;
            } else {
              if (p | 0) {
                j = -1;break;
              }if (x) {
                p = (c[f >> 2] | 0) + (4 - 1) & ~(4 - 1);k = c[p >> 2] | 0;c[f >> 2] = p + 4;p = 0;n = m;
              } else {
                k = 0;p = 0;n = m;
              }
            }c[D >> 2] = n;v = (k | 0) < 0;k = v ? 0 - k | 0 : k;o = v ? o | 8192 : o;
          } else {
            k = HB(D) | 0;if ((k | 0) < 0) {
              j = -1;break;
            }n = c[D >> 2] | 0;
          }do if ((a[n >> 0] | 0) == 46) {
            if ((a[n + 1 >> 0] | 0) != 42) {
              c[D >> 2] = n + 1;m = HB(D) | 0;n = c[D >> 2] | 0;break;
            }q = n + 2 | 0;m = (a[q >> 0] | 0) + -48 | 0;if (m >>> 0 < 10 ? (a[n + 3 >> 0] | 0) == 36 : 0) {
              c[i + (m << 2) >> 2] = 10;m = c[g + ((a[q >> 0] | 0) + -48 << 3) >> 2] | 0;n = n + 4 | 0;c[D >> 2] = n;break;
            }if (p | 0) {
              j = -1;break a;
            }if (x) {
              v = (c[f >> 2] | 0) + (4 - 1) & ~(4 - 1);m = c[v >> 2] | 0;c[f >> 2] = v + 4;
            } else m = 0;c[D >> 2] = q;n = q;
          } else m = -1; while (0);t = 0;while (1) {
            if (((a[n >> 0] | 0) + -65 | 0) >>> 0 > 57) {
              j = -1;break a;
            }v = n + 1 | 0;c[D >> 2] = v;q = a[(a[n >> 0] | 0) + -65 + (5178 + (t * 58 | 0)) >> 0] | 0;r = q & 255;if ((r + -1 | 0) >>> 0 < 8) {
              t = r;n = v;
            } else break;
          }if (!(q << 24 >> 24)) {
            j = -1;break;
          }s = (u | 0) > -1;do if (q << 24 >> 24 == 19) {
            if (s) {
              j = -1;break a;
            } else w = 49;
          } else {
            if (s) {
              c[i + (u << 2) >> 2] = r;s = g + (u << 3) | 0;u = c[s + 4 >> 2] | 0;w = E;c[w >> 2] = c[s >> 2];c[w + 4 >> 2] = u;w = 49;break;
            }if (!x) {
              j = 0;break a;
            }IB(E, r, f);
          } while (0);if ((w | 0) == 49 ? (w = 0, !x) : 0) {
            k = 0;e = v;continue;
          }n = a[n >> 0] | 0;n = (t | 0) != 0 & (n & 15 | 0) == 3 ? n & -33 : n;s = o & -65537;u = (o & 8192 | 0) == 0 ? o : s;e: do switch (n | 0) {case 110:
              switch ((t & 255) << 24 >> 24) {case 0:
                  {
                    c[c[E >> 2] >> 2] = j;k = 0;e = v;continue a;
                  }case 1:
                  {
                    c[c[E >> 2] >> 2] = j;k = 0;e = v;continue a;
                  }case 2:
                  {
                    k = c[E >> 2] | 0;c[k >> 2] = j;c[k + 4 >> 2] = ((j | 0) < 0) << 31 >> 31;k = 0;e = v;continue a;
                  }case 3:
                  {
                    b[c[E >> 2] >> 1] = j;k = 0;e = v;continue a;
                  }case 4:
                  {
                    a[c[E >> 2] >> 0] = j;k = 0;e = v;continue a;
                  }case 6:
                  {
                    c[c[E >> 2] >> 2] = j;k = 0;e = v;continue a;
                  }case 7:
                  {
                    k = c[E >> 2] | 0;c[k >> 2] = j;c[k + 4 >> 2] = ((j | 0) < 0) << 31 >> 31;k = 0;e = v;continue a;
                  }default:
                  {
                    k = 0;e = v;continue a;
                  }}case 112:
              {
                n = 120;m = m >>> 0 > 8 ? m : 8;e = u | 8;w = 61;break;
              }case 88:case 120:
              {
                e = u;w = 61;break;
              }case 111:
              {
                n = E;e = c[n >> 2] | 0;n = c[n + 4 >> 2] | 0;r = KB(e, n, y) | 0;s = z - r | 0;o = 0;q = 5642;m = (u & 8 | 0) == 0 | (m | 0) > (s | 0) ? m : s + 1 | 0;s = u;w = 67;break;
              }case 105:case 100:
              {
                n = E;e = c[n >> 2] | 0;n = c[n + 4 >> 2] | 0;if ((n | 0) < 0) {
                  e = wC(0, 0, e | 0, n | 0) | 0;n = A;o = E;c[o >> 2] = e;c[o + 4 >> 2] = n;o = 1;q = 5642;w = 66;break e;
                } else {
                  o = (u & 2049 | 0) != 0 & 1;q = (u & 2048 | 0) == 0 ? (u & 1 | 0) == 0 ? 5642 : 5644 : 5643;w = 66;break e;
                }
              }case 117:
              {
                n = E;o = 0;q = 5642;e = c[n >> 2] | 0;n = c[n + 4 >> 2] | 0;w = 66;break;
              }case 99:
              {
                a[B >> 0] = c[E >> 2];e = B;o = 0;q = 5642;r = y;n = 1;m = s;break;
              }case 109:
              {
                n = MB(c[(vB() | 0) >> 2] | 0) | 0;w = 71;break;
              }case 115:
              {
                n = c[E >> 2] | 0;n = n | 0 ? n : 5652;w = 71;break;
              }case 67:
              {
                c[F >> 2] = c[E >> 2];c[C >> 2] = 0;c[E >> 2] = F;r = -1;n = F;w = 75;break;
              }case 83:
              {
                e = c[E >> 2] | 0;if (!m) {
                  OB(d, 32, k, 0, u);e = 0;w = 84;
                } else {
                  r = m;n = e;w = 75;
                }break;
              }case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:
              {
                k = QB(d, +h[E >> 3], k, m, u, n) | 0;e = v;continue a;
              }default:
              {
                o = 0;q = 5642;r = y;n = m;m = u;
              }} while (0);f: do if ((w | 0) == 61) {
            u = E;t = c[u >> 2] | 0;u = c[u + 4 >> 2] | 0;r = JB(t, u, y, n & 32) | 0;q = (e & 8 | 0) == 0 | (t | 0) == 0 & (u | 0) == 0;o = q ? 0 : 2;q = q ? 5642 : 5642 + (n >> 4) | 0;s = e;e = t;n = u;w = 67;
          } else if ((w | 0) == 66) {
            r = LB(e, n, y) | 0;s = u;w = 67;
          } else if ((w | 0) == 71) {
            w = 0;u = NB(n, 0, m) | 0;t = (u | 0) == 0;e = n;o = 0;q = 5642;r = t ? n + m | 0 : u;n = t ? m : u - n | 0;m = s;
          } else if ((w | 0) == 75) {
            w = 0;q = n;e = 0;m = 0;while (1) {
              o = c[q >> 2] | 0;if (!o) break;m = PB(G, o) | 0;if ((m | 0) < 0 | m >>> 0 > (r - e | 0) >>> 0) break;e = m + e | 0;if (r >>> 0 > e >>> 0) q = q + 4 | 0;else break;
            }if ((m | 0) < 0) {
              j = -1;break a;
            }OB(d, 32, k, e, u);if (!e) {
              e = 0;w = 84;
            } else {
              o = 0;while (1) {
                m = c[n >> 2] | 0;if (!m) {
                  w = 84;break f;
                }m = PB(G, m) | 0;o = m + o | 0;if ((o | 0) > (e | 0)) {
                  w = 84;break f;
                }GB(d, G, m);if (o >>> 0 >= e >>> 0) {
                  w = 84;break;
                } else n = n + 4 | 0;
              }
            }
          } while (0);if ((w | 0) == 67) {
            w = 0;n = (e | 0) != 0 | (n | 0) != 0;u = (m | 0) != 0 | n;n = ((n ^ 1) & 1) + (z - r) | 0;e = u ? r : y;r = y;n = u ? (m | 0) > (n | 0) ? m : n : m;m = (m | 0) > -1 ? s & -65537 : s;
          } else if ((w | 0) == 84) {
            w = 0;OB(d, 32, k, e, u ^ 8192);k = (k | 0) > (e | 0) ? k : e;e = v;continue;
          }t = r - e | 0;s = (n | 0) < (t | 0) ? t : n;u = s + o | 0;k = (k | 0) < (u | 0) ? u : k;OB(d, 32, k, u, m);GB(d, q, o);OB(d, 48, k, u, m ^ 65536);OB(d, 48, s, t, 0);GB(d, e, t);OB(d, 32, k, u, m ^ 8192);e = v;
        }g: do if ((w | 0) == 87) if (!d) if (!p) j = 0;else {
          j = 1;while (1) {
            e = c[i + (j << 2) >> 2] | 0;if (!e) break;IB(g + (j << 3) | 0, e, f);j = j + 1 | 0;if ((j | 0) >= 10) {
              j = 1;break g;
            }
          }while (1) {
            if (c[i + (j << 2) >> 2] | 0) {
              j = -1;break g;
            }j = j + 1 | 0;if ((j | 0) >= 10) {
              j = 1;break;
            }
          }
        } while (0);l = H;return j | 0;
      }function EB(a) {
        a = a | 0;return 0;
      }function FB(a) {
        a = a | 0;return;
      }function GB(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;if (!(c[a >> 2] & 32)) aC(b, d, a) | 0;return;
      }function HB(b) {
        b = b | 0;var d = 0,
            e = 0,
            f = 0;e = c[b >> 2] | 0;f = (a[e >> 0] | 0) + -48 | 0;if (f >>> 0 < 10) {
          d = 0;do {
            d = f + (d * 10 | 0) | 0;e = e + 1 | 0;c[b >> 2] = e;f = (a[e >> 0] | 0) + -48 | 0;
          } while (f >>> 0 < 10);
        } else d = 0;return d | 0;
      }function IB(a, b, d) {
        a = a | 0;b = b | 0;d = d | 0;var e = 0,
            f = 0,
            g = 0.0;a: do if (b >>> 0 <= 20) do switch (b | 0) {case 9:
            {
              e = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);b = c[e >> 2] | 0;c[d >> 2] = e + 4;c[a >> 2] = b;break a;
            }case 10:
            {
              e = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);b = c[e >> 2] | 0;c[d >> 2] = e + 4;e = a;c[e >> 2] = b;c[e + 4 >> 2] = ((b | 0) < 0) << 31 >> 31;break a;
            }case 11:
            {
              e = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);b = c[e >> 2] | 0;c[d >> 2] = e + 4;e = a;c[e >> 2] = b;c[e + 4 >> 2] = 0;break a;
            }case 12:
            {
              e = (c[d >> 2] | 0) + (8 - 1) & ~(8 - 1);b = e;f = c[b >> 2] | 0;b = c[b + 4 >> 2] | 0;c[d >> 2] = e + 8;e = a;c[e >> 2] = f;c[e + 4 >> 2] = b;break a;
            }case 13:
            {
              f = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);e = c[f >> 2] | 0;c[d >> 2] = f + 4;e = (e & 65535) << 16 >> 16;f = a;c[f >> 2] = e;c[f + 4 >> 2] = ((e | 0) < 0) << 31 >> 31;break a;
            }case 14:
            {
              f = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);e = c[f >> 2] | 0;c[d >> 2] = f + 4;f = a;c[f >> 2] = e & 65535;c[f + 4 >> 2] = 0;break a;
            }case 15:
            {
              f = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);e = c[f >> 2] | 0;c[d >> 2] = f + 4;e = (e & 255) << 24 >> 24;f = a;c[f >> 2] = e;c[f + 4 >> 2] = ((e | 0) < 0) << 31 >> 31;break a;
            }case 16:
            {
              f = (c[d >> 2] | 0) + (4 - 1) & ~(4 - 1);e = c[f >> 2] | 0;c[d >> 2] = f + 4;f = a;c[f >> 2] = e & 255;c[f + 4 >> 2] = 0;break a;
            }case 17:
            {
              f = (c[d >> 2] | 0) + (8 - 1) & ~(8 - 1);g = +h[f >> 3];c[d >> 2] = f + 8;h[a >> 3] = g;break a;
            }case 18:
            {
              f = (c[d >> 2] | 0) + (8 - 1) & ~(8 - 1);g = +h[f >> 3];c[d >> 2] = f + 8;h[a >> 3] = g;break a;
            }default:
            break a;} while (0); while (0);return;
      }function JB(b, c, e, f) {
        b = b | 0;c = c | 0;e = e | 0;f = f | 0;if (!((b | 0) == 0 & (c | 0) == 0)) do {
          e = e + -1 | 0;a[e >> 0] = d[5694 + (b & 15) >> 0] | 0 | f;b = AC(b | 0, c | 0, 4) | 0;c = A;
        } while (!((b | 0) == 0 & (c | 0) == 0));return e | 0;
      }function KB(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;if (!((b | 0) == 0 & (c | 0) == 0)) do {
          d = d + -1 | 0;a[d >> 0] = b & 7 | 48;b = AC(b | 0, c | 0, 3) | 0;c = A;
        } while (!((b | 0) == 0 & (c | 0) == 0));return d | 0;
      }function LB(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;var e = 0;if (c >>> 0 > 0 | (c | 0) == 0 & b >>> 0 > 4294967295) {
          while (1) {
            e = HC(b | 0, c | 0, 10, 0) | 0;d = d + -1 | 0;a[d >> 0] = e & 255 | 48;e = b;b = EC(b | 0, c | 0, 10, 0) | 0;if (!(c >>> 0 > 9 | (c | 0) == 9 & e >>> 0 > 4294967295)) break;else c = A;
          }c = b;
        } else c = b;if (c) while (1) {
          d = d + -1 | 0;a[d >> 0] = (c >>> 0) % 10 | 0 | 48;if (c >>> 0 < 10) break;else c = (c >>> 0) / 10 | 0;
        }return d | 0;
      }function MB(a) {
        a = a | 0;return XB(a, c[(WB() | 0) + 188 >> 2] | 0) | 0;
      }function NB(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;h = d & 255;f = (e | 0) != 0;a: do if (f & (b & 3 | 0) != 0) {
          g = d & 255;while (1) {
            if ((a[b >> 0] | 0) == g << 24 >> 24) {
              i = 6;break a;
            }b = b + 1 | 0;e = e + -1 | 0;f = (e | 0) != 0;if (!(f & (b & 3 | 0) != 0)) {
              i = 5;break;
            }
          }
        } else i = 5; while (0);if ((i | 0) == 5) if (f) i = 6;else e = 0;b: do if ((i | 0) == 6) {
          g = d & 255;if ((a[b >> 0] | 0) != g << 24 >> 24) {
            f = P(h, 16843009) | 0;c: do if (e >>> 0 > 3) while (1) {
              h = c[b >> 2] ^ f;if ((h & -2139062144 ^ -2139062144) & h + -16843009 | 0) break;b = b + 4 | 0;e = e + -4 | 0;if (e >>> 0 <= 3) {
                i = 11;break c;
              }
            } else i = 11; while (0);if ((i | 0) == 11) if (!e) {
              e = 0;break;
            }while (1) {
              if ((a[b >> 0] | 0) == g << 24 >> 24) break b;b = b + 1 | 0;e = e + -1 | 0;if (!e) {
                e = 0;break;
              }
            }
          }
        } while (0);return (e | 0 ? b : 0) | 0;
      }function OB(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = l;l = l + 256 | 0;f = g;if ((c | 0) > (d | 0) & (e & 73728 | 0) == 0) {
          e = c - d | 0;yC(f | 0, b | 0, (e >>> 0 < 256 ? e : 256) | 0) | 0;if (e >>> 0 > 255) {
            b = c - d | 0;do {
              GB(a, f, 256);e = e + -256 | 0;
            } while (e >>> 0 > 255);e = b & 255;
          }GB(a, f, e);
        }l = g;return;
      }function PB(a, b) {
        a = a | 0;b = b | 0;if (!a) a = 0;else a = UB(a, b, 0) | 0;return a | 0;
      }function QB(b, e, f, g, h, i) {
        b = b | 0;e = +e;f = f | 0;g = g | 0;h = h | 0;i = i | 0;var j = 0,
            k = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0,
            q = 0,
            r = 0.0,
            s = 0,
            t = 0,
            u = 0,
            v = 0,
            w = 0,
            x = 0,
            y = 0,
            z = 0,
            B = 0,
            C = 0,
            D = 0,
            E = 0,
            F = 0,
            G = 0,
            H = 0;H = l;l = l + 560 | 0;m = H + 8 | 0;u = H;G = H + 524 | 0;F = G;n = H + 512 | 0;c[u >> 2] = 0;E = n + 12 | 0;RB(e) | 0;if ((A | 0) < 0) {
          e = -e;C = 1;B = 5659;
        } else {
          C = (h & 2049 | 0) != 0 & 1;B = (h & 2048 | 0) == 0 ? (h & 1 | 0) == 0 ? 5660 : 5665 : 5662;
        }RB(e) | 0;D = A & 2146435072;do if (D >>> 0 < 2146435072 | (D | 0) == 2146435072 & 0 < 0) {
          r = +SB(e, u) * 2.0;j = r != 0.0;if (j) c[u >> 2] = (c[u >> 2] | 0) + -1;w = i | 32;if ((w | 0) == 97) {
            s = i & 32;q = (s | 0) == 0 ? B : B + 9 | 0;p = C | 2;j = 12 - g | 0;do if (!(g >>> 0 > 11 | (j | 0) == 0)) {
              e = 8.0;do {
                j = j + -1 | 0;e = e * 16.0;
              } while ((j | 0) != 0);if ((a[q >> 0] | 0) == 45) {
                e = -(e + (-r - e));break;
              } else {
                e = r + e - e;break;
              }
            } else e = r; while (0);k = c[u >> 2] | 0;j = (k | 0) < 0 ? 0 - k | 0 : k;j = LB(j, ((j | 0) < 0) << 31 >> 31, E) | 0;if ((j | 0) == (E | 0)) {
              j = n + 11 | 0;a[j >> 0] = 48;
            }a[j + -1 >> 0] = (k >> 31 & 2) + 43;o = j + -2 | 0;a[o >> 0] = i + 15;n = (g | 0) < 1;m = (h & 8 | 0) == 0;j = G;do {
              D = ~~e;k = j + 1 | 0;a[j >> 0] = d[5694 + D >> 0] | s;e = (e - +(D | 0)) * 16.0;if ((k - F | 0) == 1 ? !(m & (n & e == 0.0)) : 0) {
                a[k >> 0] = 46;j = j + 2 | 0;
              } else j = k;
            } while (e != 0.0);D = j - F | 0;F = E - o | 0;E = (g | 0) != 0 & (D + -2 | 0) < (g | 0) ? g + 2 | 0 : D;j = F + p + E | 0;OB(b, 32, f, j, h);GB(b, q, p);OB(b, 48, f, j, h ^ 65536);GB(b, G, D);OB(b, 48, E - D | 0, 0, 0);GB(b, o, F);OB(b, 32, f, j, h ^ 8192);break;
          }k = (g | 0) < 0 ? 6 : g;if (j) {
            j = (c[u >> 2] | 0) + -28 | 0;c[u >> 2] = j;e = r * 268435456.0;
          } else {
            e = r;j = c[u >> 2] | 0;
          }D = (j | 0) < 0 ? m : m + 288 | 0;m = D;do {
            y = ~~e >>> 0;c[m >> 2] = y;m = m + 4 | 0;e = (e - +(y >>> 0)) * 1.0e9;
          } while (e != 0.0);if ((j | 0) > 0) {
            n = D;p = m;while (1) {
              o = (j | 0) < 29 ? j : 29;j = p + -4 | 0;if (j >>> 0 >= n >>> 0) {
                m = 0;do {
                  x = zC(c[j >> 2] | 0, 0, o | 0) | 0;x = xC(x | 0, A | 0, m | 0, 0) | 0;y = A;v = HC(x | 0, y | 0, 1e9, 0) | 0;c[j >> 2] = v;m = EC(x | 0, y | 0, 1e9, 0) | 0;j = j + -4 | 0;
                } while (j >>> 0 >= n >>> 0);if (m) {
                  n = n + -4 | 0;c[n >> 2] = m;
                }
              }m = p;while (1) {
                if (m >>> 0 <= n >>> 0) break;j = m + -4 | 0;if (!(c[j >> 2] | 0)) m = j;else break;
              }j = (c[u >> 2] | 0) - o | 0;c[u >> 2] = j;if ((j | 0) > 0) p = m;else break;
            }
          } else n = D;if ((j | 0) < 0) {
            g = ((k + 25 | 0) / 9 | 0) + 1 | 0;t = (w | 0) == 102;do {
              s = 0 - j | 0;s = (s | 0) < 9 ? s : 9;if (n >>> 0 < m >>> 0) {
                o = (1 << s) + -1 | 0;p = 1e9 >>> s;q = 0;j = n;do {
                  y = c[j >> 2] | 0;c[j >> 2] = (y >>> s) + q;q = P(y & o, p) | 0;j = j + 4 | 0;
                } while (j >>> 0 < m >>> 0);j = (c[n >> 2] | 0) == 0 ? n + 4 | 0 : n;if (!q) {
                  n = j;j = m;
                } else {
                  c[m >> 2] = q;n = j;j = m + 4 | 0;
                }
              } else {
                n = (c[n >> 2] | 0) == 0 ? n + 4 | 0 : n;j = m;
              }m = t ? D : n;m = (j - m >> 2 | 0) > (g | 0) ? m + (g << 2) | 0 : j;j = (c[u >> 2] | 0) + s | 0;c[u >> 2] = j;
            } while ((j | 0) < 0);j = n;g = m;
          } else {
            j = n;g = m;
          }y = D;if (j >>> 0 < g >>> 0) {
            m = (y - j >> 2) * 9 | 0;o = c[j >> 2] | 0;if (o >>> 0 >= 10) {
              n = 10;do {
                n = n * 10 | 0;m = m + 1 | 0;
              } while (o >>> 0 >= n >>> 0);
            }
          } else m = 0;t = (w | 0) == 103;v = (k | 0) != 0;n = k - ((w | 0) != 102 ? m : 0) + ((v & t) << 31 >> 31) | 0;if ((n | 0) < (((g - y >> 2) * 9 | 0) + -9 | 0)) {
            n = n + 9216 | 0;s = D + 4 + (((n | 0) / 9 | 0) + -1024 << 2) | 0;n = ((n | 0) % 9 | 0) + 1 | 0;if ((n | 0) < 9) {
              o = 10;do {
                o = o * 10 | 0;n = n + 1 | 0;
              } while ((n | 0) != 9);
            } else o = 10;p = c[s >> 2] | 0;q = (p >>> 0) % (o >>> 0) | 0;n = (s + 4 | 0) == (g | 0);if (!(n & (q | 0) == 0)) {
              r = (((p >>> 0) / (o >>> 0) | 0) & 1 | 0) == 0 ? 9007199254740992.0 : 9007199254740994.0;x = (o | 0) / 2 | 0;e = q >>> 0 < x >>> 0 ? .5 : n & (q | 0) == (x | 0) ? 1.0 : 1.5;if (C) {
                x = (a[B >> 0] | 0) == 45;e = x ? -e : e;r = x ? -r : r;
              }n = p - q | 0;c[s >> 2] = n;if (r + e != r) {
                x = n + o | 0;c[s >> 2] = x;if (x >>> 0 > 999999999) {
                  m = s;while (1) {
                    n = m + -4 | 0;c[m >> 2] = 0;if (n >>> 0 < j >>> 0) {
                      j = j + -4 | 0;c[j >> 2] = 0;
                    }x = (c[n >> 2] | 0) + 1 | 0;c[n >> 2] = x;if (x >>> 0 > 999999999) m = n;else break;
                  }
                } else n = s;m = (y - j >> 2) * 9 | 0;p = c[j >> 2] | 0;if (p >>> 0 >= 10) {
                  o = 10;do {
                    o = o * 10 | 0;m = m + 1 | 0;
                  } while (p >>> 0 >= o >>> 0);
                }
              } else n = s;
            } else n = s;n = n + 4 | 0;n = g >>> 0 > n >>> 0 ? n : g;x = j;
          } else {
            n = g;x = j;
          }w = n;while (1) {
            if (w >>> 0 <= x >>> 0) {
              u = 0;break;
            }j = w + -4 | 0;if (!(c[j >> 2] | 0)) w = j;else {
              u = 1;break;
            }
          }g = 0 - m | 0;do if (t) {
            j = ((v ^ 1) & 1) + k | 0;if ((j | 0) > (m | 0) & (m | 0) > -5) {
              o = i + -1 | 0;k = j + -1 - m | 0;
            } else {
              o = i + -2 | 0;k = j + -1 | 0;
            }j = h & 8;if (!j) {
              if (u ? (z = c[w + -4 >> 2] | 0, (z | 0) != 0) : 0) {
                if (!((z >>> 0) % 10 | 0)) {
                  n = 0;j = 10;do {
                    j = j * 10 | 0;n = n + 1 | 0;
                  } while (!((z >>> 0) % (j >>> 0) | 0 | 0));
                } else n = 0;
              } else n = 9;j = ((w - y >> 2) * 9 | 0) + -9 | 0;if ((o | 32 | 0) == 102) {
                s = j - n | 0;s = (s | 0) > 0 ? s : 0;k = (k | 0) < (s | 0) ? k : s;s = 0;break;
              } else {
                s = j + m - n | 0;s = (s | 0) > 0 ? s : 0;k = (k | 0) < (s | 0) ? k : s;s = 0;break;
              }
            } else s = j;
          } else {
            o = i;s = h & 8;
          } while (0);t = k | s;p = (t | 0) != 0 & 1;q = (o | 32 | 0) == 102;if (q) {
            v = 0;j = (m | 0) > 0 ? m : 0;
          } else {
            j = (m | 0) < 0 ? g : m;j = LB(j, ((j | 0) < 0) << 31 >> 31, E) | 0;n = E;if ((n - j | 0) < 2) do {
              j = j + -1 | 0;a[j >> 0] = 48;
            } while ((n - j | 0) < 2);a[j + -1 >> 0] = (m >> 31 & 2) + 43;j = j + -2 | 0;a[j >> 0] = o;v = j;j = n - j | 0;
          }j = C + 1 + k + p + j | 0;OB(b, 32, f, j, h);GB(b, B, C);OB(b, 48, f, j, h ^ 65536);if (q) {
            o = x >>> 0 > D >>> 0 ? D : x;s = G + 9 | 0;p = s;q = G + 8 | 0;n = o;do {
              m = LB(c[n >> 2] | 0, 0, s) | 0;if ((n | 0) == (o | 0)) {
                if ((m | 0) == (s | 0)) {
                  a[q >> 0] = 48;m = q;
                }
              } else if (m >>> 0 > G >>> 0) {
                yC(G | 0, 48, m - F | 0) | 0;do m = m + -1 | 0; while (m >>> 0 > G >>> 0);
              }GB(b, m, p - m | 0);n = n + 4 | 0;
            } while (n >>> 0 <= D >>> 0);if (t | 0) GB(b, 5710, 1);if (n >>> 0 < w >>> 0 & (k | 0) > 0) while (1) {
              m = LB(c[n >> 2] | 0, 0, s) | 0;if (m >>> 0 > G >>> 0) {
                yC(G | 0, 48, m - F | 0) | 0;do m = m + -1 | 0; while (m >>> 0 > G >>> 0);
              }GB(b, m, (k | 0) < 9 ? k : 9);n = n + 4 | 0;m = k + -9 | 0;if (!(n >>> 0 < w >>> 0 & (k | 0) > 9)) {
                k = m;break;
              } else k = m;
            }OB(b, 48, k + 9 | 0, 9, 0);
          } else {
            t = u ? w : x + 4 | 0;if ((k | 0) > -1) {
              u = G + 9 | 0;s = (s | 0) == 0;g = u;p = 0 - F | 0;q = G + 8 | 0;o = x;do {
                m = LB(c[o >> 2] | 0, 0, u) | 0;if ((m | 0) == (u | 0)) {
                  a[q >> 0] = 48;m = q;
                }do if ((o | 0) == (x | 0)) {
                  n = m + 1 | 0;GB(b, m, 1);if (s & (k | 0) < 1) {
                    m = n;break;
                  }GB(b, 5710, 1);m = n;
                } else {
                  if (m >>> 0 <= G >>> 0) break;yC(G | 0, 48, m + p | 0) | 0;do m = m + -1 | 0; while (m >>> 0 > G >>> 0);
                } while (0);F = g - m | 0;GB(b, m, (k | 0) > (F | 0) ? F : k);k = k - F | 0;o = o + 4 | 0;
              } while (o >>> 0 < t >>> 0 & (k | 0) > -1);
            }OB(b, 48, k + 18 | 0, 18, 0);GB(b, v, E - v | 0);
          }OB(b, 32, f, j, h ^ 8192);
        } else {
          G = (i & 32 | 0) != 0;j = C + 3 | 0;OB(b, 32, f, j, h & -65537);GB(b, B, C);GB(b, e != e | 0.0 != 0.0 ? G ? 5686 : 5690 : G ? 5678 : 5682, 3);OB(b, 32, f, j, h ^ 8192);
        } while (0);l = H;return ((j | 0) < (f | 0) ? f : j) | 0;
      }function RB(a) {
        a = +a;var b = 0;h[j >> 3] = a;b = c[j >> 2] | 0;A = c[j + 4 >> 2] | 0;return b | 0;
      }function SB(a, b) {
        a = +a;b = b | 0;return + +TB(a, b);
      }function TB(a, b) {
        a = +a;b = b | 0;var d = 0,
            e = 0,
            f = 0;h[j >> 3] = a;d = c[j >> 2] | 0;e = c[j + 4 >> 2] | 0;f = AC(d | 0, e | 0, 52) | 0;switch (f & 2047) {case 0:
            {
              if (a != 0.0) {
                a = +TB(a * 18446744073709551616.0, b);d = (c[b >> 2] | 0) + -64 | 0;
              } else d = 0;c[b >> 2] = d;break;
            }case 2047:
            break;default:
            {
              c[b >> 2] = (f & 2047) + -1022;c[j >> 2] = d;c[j + 4 >> 2] = e & -2146435073 | 1071644672;a = +h[j >> 3];
            }}return +a;
      }function UB(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;do if (b) {
          if (d >>> 0 < 128) {
            a[b >> 0] = d;b = 1;break;
          }if (!(c[c[(VB() | 0) + 188 >> 2] >> 2] | 0)) if ((d & -128 | 0) == 57216) {
            a[b >> 0] = d;b = 1;break;
          } else {
            c[(vB() | 0) >> 2] = 84;b = -1;break;
          }if (d >>> 0 < 2048) {
            a[b >> 0] = d >>> 6 | 192;a[b + 1 >> 0] = d & 63 | 128;b = 2;break;
          }if (d >>> 0 < 55296 | (d & -8192 | 0) == 57344) {
            a[b >> 0] = d >>> 12 | 224;a[b + 1 >> 0] = d >>> 6 & 63 | 128;a[b + 2 >> 0] = d & 63 | 128;b = 3;break;
          }if ((d + -65536 | 0) >>> 0 < 1048576) {
            a[b >> 0] = d >>> 18 | 240;a[b + 1 >> 0] = d >>> 12 & 63 | 128;a[b + 2 >> 0] = d >>> 6 & 63 | 128;a[b + 3 >> 0] = d & 63 | 128;b = 4;break;
          } else {
            c[(vB() | 0) >> 2] = 84;b = -1;break;
          }
        } else b = 1; while (0);return b | 0;
      }function VB() {
        return xB() | 0;
      }function WB() {
        return xB() | 0;
      }function XB(b, e) {
        b = b | 0;e = e | 0;var f = 0,
            g = 0;g = 0;while (1) {
          if ((d[5712 + g >> 0] | 0) == (b | 0)) {
            b = 2;break;
          }f = g + 1 | 0;if ((f | 0) == 87) {
            f = 5800;g = 87;b = 5;break;
          } else g = f;
        }if ((b | 0) == 2) if (!g) f = 5800;else {
          f = 5800;b = 5;
        }if ((b | 0) == 5) while (1) {
          do {
            b = f;f = f + 1 | 0;
          } while ((a[b >> 0] | 0) != 0);g = g + -1 | 0;if (!g) break;else b = 5;
        }return YB(f, c[e + 20 >> 2] | 0) | 0;
      }function YB(a, b) {
        a = a | 0;b = b | 0;return ZB(a, b) | 0;
      }function ZB(a, b) {
        a = a | 0;b = b | 0;if (!b) b = 0;else b = _B(c[b >> 2] | 0, c[b + 4 >> 2] | 0, a) | 0;return (b | 0 ? b : a) | 0;
      }function _B(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            l = 0,
            m = 0,
            n = 0,
            o = 0;o = (c[b >> 2] | 0) + 1794895138 | 0;h = $B(c[b + 8 >> 2] | 0, o) | 0;f = $B(c[b + 12 >> 2] | 0, o) | 0;g = $B(c[b + 16 >> 2] | 0, o) | 0;a: do if ((h >>> 0 < d >>> 2 >>> 0 ? (n = d - (h << 2) | 0, f >>> 0 < n >>> 0 & g >>> 0 < n >>> 0) : 0) ? ((g | f) & 3 | 0) == 0 : 0) {
          n = f >>> 2;m = g >>> 2;l = 0;while (1) {
            j = h >>> 1;k = l + j | 0;i = k << 1;g = i + n | 0;f = $B(c[b + (g << 2) >> 2] | 0, o) | 0;g = $B(c[b + (g + 1 << 2) >> 2] | 0, o) | 0;if (!(g >>> 0 < d >>> 0 & f >>> 0 < (d - g | 0) >>> 0)) {
              f = 0;break a;
            }if (a[b + (g + f) >> 0] | 0) {
              f = 0;break a;
            }f = AB(e, b + g | 0) | 0;if (!f) break;f = (f | 0) < 0;if ((h | 0) == 1) {
              f = 0;break a;
            } else {
              l = f ? l : k;h = f ? j : h - j | 0;
            }
          }f = i + m | 0;g = $B(c[b + (f << 2) >> 2] | 0, o) | 0;f = $B(c[b + (f + 1 << 2) >> 2] | 0, o) | 0;if (f >>> 0 < d >>> 0 & g >>> 0 < (d - f | 0) >>> 0) f = (a[b + (f + g) >> 0] | 0) == 0 ? b + f | 0 : 0;else f = 0;
        } else f = 0; while (0);return f | 0;
      }function $B(a, b) {
        a = a | 0;b = b | 0;var c = 0;c = IC(a | 0) | 0;return ((b | 0) == 0 ? a : c) | 0;
      }function aC(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0,
            j = 0;f = e + 16 | 0;g = c[f >> 2] | 0;if (!g) {
          if (!(bC(e) | 0)) {
            g = c[f >> 2] | 0;h = 5;
          } else f = 0;
        } else h = 5;a: do if ((h | 0) == 5) {
          j = e + 20 | 0;i = c[j >> 2] | 0;f = i;if ((g - i | 0) >>> 0 < d >>> 0) {
            f = sb[c[e + 36 >> 2] & 7](e, b, d) | 0;break;
          }b: do if ((a[e + 75 >> 0] | 0) > -1) {
            i = d;while (1) {
              if (!i) {
                h = 0;g = b;break b;
              }g = i + -1 | 0;if ((a[b + g >> 0] | 0) == 10) break;else i = g;
            }f = sb[c[e + 36 >> 2] & 7](e, b, i) | 0;if (f >>> 0 < i >>> 0) break a;h = i;g = b + i | 0;d = d - i | 0;f = c[j >> 2] | 0;
          } else {
            h = 0;g = b;
          } while (0);BC(f | 0, g | 0, d | 0) | 0;c[j >> 2] = (c[j >> 2] | 0) + d;f = h + d | 0;
        } while (0);return f | 0;
      }function bC(b) {
        b = b | 0;var d = 0,
            e = 0;d = b + 74 | 0;e = a[d >> 0] | 0;a[d >> 0] = e + 255 | e;d = c[b >> 2] | 0;if (!(d & 8)) {
          c[b + 8 >> 2] = 0;c[b + 4 >> 2] = 0;e = c[b + 44 >> 2] | 0;c[b + 28 >> 2] = e;c[b + 20 >> 2] = e;c[b + 16 >> 2] = e + (c[b + 48 >> 2] | 0);b = 0;
        } else {
          c[b >> 2] = d | 32;b = -1;
        }return b | 0;
      }function cC(a, b) {
        a = T(a);b = T(b);var c = 0,
            d = 0;c = dC(a) | 0;do if ((c & 2147483647) >>> 0 <= 2139095040) {
          d = dC(b) | 0;if ((d & 2147483647) >>> 0 <= 2139095040) if ((d ^ c | 0) < 0) {
            a = (c | 0) < 0 ? b : a;break;
          } else {
            a = a < b ? b : a;break;
          }
        } else a = b; while (0);return T(a);
      }function dC(a) {
        a = T(a);return (g[j >> 2] = a, c[j >> 2] | 0) | 0;
      }function eC(a, b) {
        a = T(a);b = T(b);var c = 0,
            d = 0;c = fC(a) | 0;do if ((c & 2147483647) >>> 0 <= 2139095040) {
          d = fC(b) | 0;if ((d & 2147483647) >>> 0 <= 2139095040) if ((d ^ c | 0) < 0) {
            a = (c | 0) < 0 ? a : b;break;
          } else {
            a = a < b ? a : b;break;
          }
        } else a = b; while (0);return T(a);
      }function fC(a) {
        a = T(a);return (g[j >> 2] = a, c[j >> 2] | 0) | 0;
      }function gC(a, b) {
        a = T(a);b = T(b);var d = 0,
            e = 0,
            f = 0,
            h = 0,
            i = 0,
            k = 0,
            l = 0,
            m = 0;h = (g[j >> 2] = a, c[j >> 2] | 0);k = (g[j >> 2] = b, c[j >> 2] | 0);d = h >>> 23 & 255;i = k >>> 23 & 255;l = h & -2147483648;f = k << 1;a: do if ((f | 0) != 0 ? !((d | 0) == 255 | ((hC(b) | 0) & 2147483647) >>> 0 > 2139095040) : 0) {
          e = h << 1;if (e >>> 0 <= f >>> 0) {
            b = T(a * T(0.0));return T((e | 0) == (f | 0) ? b : a);
          }if (!d) {
            d = h << 9;if ((d | 0) > -1) {
              e = d;d = 0;do {
                d = d + -1 | 0;e = e << 1;
              } while ((e | 0) > -1);
            } else d = 0;e = h << 1 - d;
          } else e = h & 8388607 | 8388608;if (!i) {
            h = k << 9;if ((h | 0) > -1) {
              f = 0;do {
                f = f + -1 | 0;h = h << 1;
              } while ((h | 0) > -1);
            } else f = 0;i = f;k = k << 1 - f;
          } else k = k & 8388607 | 8388608;f = e - k | 0;h = (f | 0) > -1;b: do if ((d | 0) > (i | 0)) {
            while (1) {
              if (h) if (!f) break;else e = f;e = e << 1;d = d + -1 | 0;f = e - k | 0;h = (f | 0) > -1;if ((d | 0) <= (i | 0)) break b;
            }b = T(a * T(0.0));break a;
          } while (0);if (h) if (!f) {
            b = T(a * T(0.0));break;
          } else e = f;if (e >>> 0 < 8388608) do {
            e = e << 1;d = d + -1 | 0;
          } while (e >>> 0 < 8388608);if ((d | 0) > 0) d = e + -8388608 | d << 23;else d = e >>> (1 - d | 0);b = (c[j >> 2] = d | l, T(g[j >> 2]));
        } else m = 3; while (0);if ((m | 0) == 3) {
          b = T(a * b);b = T(b / b);
        }return T(b);
      }function hC(a) {
        a = T(a);return (g[j >> 2] = a, c[j >> 2] | 0) | 0;
      }function iC(a, b) {
        a = a | 0;b = b | 0;return CB(c[582] | 0, a, b) | 0;
      }function jC(a) {
        a = a | 0;Ta();
      }function kC(a) {
        a = a | 0;return;
      }function lC(a, b) {
        a = a | 0;b = b | 0;return 0;
      }function mC(a) {
        a = a | 0;if ((nC(a + 4 | 0) | 0) == -1) {
          nb[c[(c[a >> 2] | 0) + 8 >> 2] & 127](a);a = 1;
        } else a = 0;return a | 0;
      }function nC(a) {
        a = a | 0;var b = 0;b = c[a >> 2] | 0;c[a >> 2] = b + -1;return b + -1 | 0;
      }function oC(a) {
        a = a | 0;if (mC(a) | 0) pC(a);return;
      }function pC(a) {
        a = a | 0;var b = 0;b = a + 8 | 0;if (!((c[b >> 2] | 0) != 0 ? (nC(b) | 0) != -1 : 0)) nb[c[(c[a >> 2] | 0) + 16 >> 2] & 127](a);return;
      }function qC(a) {
        a = a | 0;var b = 0;b = (a | 0) == 0 ? 1 : a;while (1) {
          a = oB(b) | 0;if (a | 0) break;a = uC() | 0;if (!a) {
            a = 0;break;
          }Fb[a & 0]();
        }return a | 0;
      }function rC(a) {
        a = a | 0;return qC(a) | 0;
      }function sC(a) {
        a = a | 0;pB(a);return;
      }function tC(b) {
        b = b | 0;if ((a[b + 11 >> 0] | 0) < 0) sC(c[b >> 2] | 0);return;
      }function uC() {
        var a = 0;a = c[2923] | 0;c[2923] = a + 0;return a | 0;
      }function vC() {}function wC(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;d = b - d - (c >>> 0 > a >>> 0 | 0) >>> 0;return (A = d, a - c >>> 0 | 0) | 0;
      }function xC(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;c = a + c >>> 0;return (A = b + d + (c >>> 0 < a >>> 0 | 0) >>> 0, c | 0) | 0;
      }function yC(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0,
            i = 0;h = b + e | 0;d = d & 255;if ((e | 0) >= 67) {
          while (b & 3) {
            a[b >> 0] = d;b = b + 1 | 0;
          }f = h & -4 | 0;g = f - 64 | 0;i = d | d << 8 | d << 16 | d << 24;while ((b | 0) <= (g | 0)) {
            c[b >> 2] = i;c[b + 4 >> 2] = i;c[b + 8 >> 2] = i;c[b + 12 >> 2] = i;c[b + 16 >> 2] = i;c[b + 20 >> 2] = i;c[b + 24 >> 2] = i;c[b + 28 >> 2] = i;c[b + 32 >> 2] = i;c[b + 36 >> 2] = i;c[b + 40 >> 2] = i;c[b + 44 >> 2] = i;c[b + 48 >> 2] = i;c[b + 52 >> 2] = i;c[b + 56 >> 2] = i;c[b + 60 >> 2] = i;b = b + 64 | 0;
          }while ((b | 0) < (f | 0)) {
            c[b >> 2] = i;b = b + 4 | 0;
          }
        }while ((b | 0) < (h | 0)) {
          a[b >> 0] = d;b = b + 1 | 0;
        }return h - e | 0;
      }function zC(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;if ((c | 0) < 32) {
          A = b << c | (a & (1 << c) - 1 << 32 - c) >>> 32 - c;return a << c;
        }A = a << c - 32;return 0;
      }function AC(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;if ((c | 0) < 32) {
          A = b >>> c;return a >>> c | (b & (1 << c) - 1) << 32 - c;
        }A = 0;return b >>> c - 32 | 0;
      }function BC(b, d, e) {
        b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0,
            h = 0;if ((e | 0) >= 8192) return Oa(b | 0, d | 0, e | 0) | 0;h = b | 0;g = b + e | 0;if ((b & 3) == (d & 3)) {
          while (b & 3) {
            if (!e) return h | 0;a[b >> 0] = a[d >> 0] | 0;b = b + 1 | 0;d = d + 1 | 0;e = e - 1 | 0;
          }e = g & -4 | 0;f = e - 64 | 0;while ((b | 0) <= (f | 0)) {
            c[b >> 2] = c[d >> 2];c[b + 4 >> 2] = c[d + 4 >> 2];c[b + 8 >> 2] = c[d + 8 >> 2];c[b + 12 >> 2] = c[d + 12 >> 2];c[b + 16 >> 2] = c[d + 16 >> 2];c[b + 20 >> 2] = c[d + 20 >> 2];c[b + 24 >> 2] = c[d + 24 >> 2];c[b + 28 >> 2] = c[d + 28 >> 2];c[b + 32 >> 2] = c[d + 32 >> 2];c[b + 36 >> 2] = c[d + 36 >> 2];c[b + 40 >> 2] = c[d + 40 >> 2];c[b + 44 >> 2] = c[d + 44 >> 2];c[b + 48 >> 2] = c[d + 48 >> 2];c[b + 52 >> 2] = c[d + 52 >> 2];c[b + 56 >> 2] = c[d + 56 >> 2];c[b + 60 >> 2] = c[d + 60 >> 2];b = b + 64 | 0;d = d + 64 | 0;
          }while ((b | 0) < (e | 0)) {
            c[b >> 2] = c[d >> 2];b = b + 4 | 0;d = d + 4 | 0;
          }
        } else {
          e = g - 4 | 0;while ((b | 0) < (e | 0)) {
            a[b >> 0] = a[d >> 0] | 0;a[b + 1 >> 0] = a[d + 1 >> 0] | 0;a[b + 2 >> 0] = a[d + 2 >> 0] | 0;a[b + 3 >> 0] = a[d + 3 >> 0] | 0;b = b + 4 | 0;d = d + 4 | 0;
          }
        }while ((b | 0) < (g | 0)) {
          a[b >> 0] = a[d >> 0] | 0;b = b + 1 | 0;d = d + 1 | 0;
        }return h | 0;
      }function CC(b) {
        b = b | 0;var c = 0;c = a[n + (b & 255) >> 0] | 0;if ((c | 0) < 8) return c | 0;c = a[n + (b >> 8 & 255) >> 0] | 0;if ((c | 0) < 8) return c + 8 | 0;c = a[n + (b >> 16 & 255) >> 0] | 0;if ((c | 0) < 8) return c + 16 | 0;return (a[n + (b >>> 24) >> 0] | 0) + 24 | 0;
      }function DC(a, b, d, e, f) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;f = f | 0;var g = 0,
            h = 0,
            i = 0,
            j = 0,
            k = 0,
            l = 0,
            m = 0,
            n = 0,
            o = 0,
            p = 0;l = a;j = b;k = j;h = d;n = e;i = n;if (!k) {
          g = (f | 0) != 0;if (!i) {
            if (g) {
              c[f >> 2] = (l >>> 0) % (h >>> 0);c[f + 4 >> 2] = 0;
            }n = 0;f = (l >>> 0) / (h >>> 0) >>> 0;return (A = n, f) | 0;
          } else {
            if (!g) {
              n = 0;f = 0;return (A = n, f) | 0;
            }c[f >> 2] = a | 0;c[f + 4 >> 2] = b & 0;n = 0;f = 0;return (A = n, f) | 0;
          }
        }g = (i | 0) == 0;do if (h) {
          if (!g) {
            g = (S(i | 0) | 0) - (S(k | 0) | 0) | 0;if (g >>> 0 <= 31) {
              m = g + 1 | 0;i = 31 - g | 0;b = g - 31 >> 31;h = m;a = l >>> (m >>> 0) & b | k << i;b = k >>> (m >>> 0) & b;g = 0;i = l << i;break;
            }if (!f) {
              n = 0;f = 0;return (A = n, f) | 0;
            }c[f >> 2] = a | 0;c[f + 4 >> 2] = j | b & 0;n = 0;f = 0;return (A = n, f) | 0;
          }g = h - 1 | 0;if (g & h | 0) {
            i = (S(h | 0) | 0) + 33 - (S(k | 0) | 0) | 0;p = 64 - i | 0;m = 32 - i | 0;j = m >> 31;o = i - 32 | 0;b = o >> 31;h = i;a = m - 1 >> 31 & k >>> (o >>> 0) | (k << m | l >>> (i >>> 0)) & b;b = b & k >>> (i >>> 0);g = l << p & j;i = (k << p | l >>> (o >>> 0)) & j | l << m & i - 33 >> 31;break;
          }if (f | 0) {
            c[f >> 2] = g & l;c[f + 4 >> 2] = 0;
          }if ((h | 0) == 1) {
            o = j | b & 0;p = a | 0 | 0;return (A = o, p) | 0;
          } else {
            p = CC(h | 0) | 0;o = k >>> (p >>> 0) | 0;p = k << 32 - p | l >>> (p >>> 0) | 0;return (A = o, p) | 0;
          }
        } else {
          if (g) {
            if (f | 0) {
              c[f >> 2] = (k >>> 0) % (h >>> 0);c[f + 4 >> 2] = 0;
            }o = 0;p = (k >>> 0) / (h >>> 0) >>> 0;return (A = o, p) | 0;
          }if (!l) {
            if (f | 0) {
              c[f >> 2] = 0;c[f + 4 >> 2] = (k >>> 0) % (i >>> 0);
            }o = 0;p = (k >>> 0) / (i >>> 0) >>> 0;return (A = o, p) | 0;
          }g = i - 1 | 0;if (!(g & i)) {
            if (f | 0) {
              c[f >> 2] = a | 0;c[f + 4 >> 2] = g & k | b & 0;
            }o = 0;p = k >>> ((CC(i | 0) | 0) >>> 0);return (A = o, p) | 0;
          }g = (S(i | 0) | 0) - (S(k | 0) | 0) | 0;if (g >>> 0 <= 30) {
            b = g + 1 | 0;i = 31 - g | 0;h = b;a = k << i | l >>> (b >>> 0);b = k >>> (b >>> 0);g = 0;i = l << i;break;
          }if (!f) {
            o = 0;p = 0;return (A = o, p) | 0;
          }c[f >> 2] = a | 0;c[f + 4 >> 2] = j | b & 0;o = 0;p = 0;return (A = o, p) | 0;
        } while (0);if (!h) {
          k = i;j = 0;i = 0;
        } else {
          m = d | 0 | 0;l = n | e & 0;k = xC(m | 0, l | 0, -1, -1) | 0;d = A;j = i;i = 0;do {
            e = j;j = g >>> 31 | j << 1;g = i | g << 1;e = a << 1 | e >>> 31 | 0;n = a >>> 31 | b << 1 | 0;wC(k | 0, d | 0, e | 0, n | 0) | 0;p = A;o = p >> 31 | ((p | 0) < 0 ? -1 : 0) << 1;i = o & 1;a = wC(e | 0, n | 0, o & m | 0, (((p | 0) < 0 ? -1 : 0) >> 31 | ((p | 0) < 0 ? -1 : 0) << 1) & l | 0) | 0;b = A;h = h - 1 | 0;
          } while ((h | 0) != 0);k = j;j = 0;
        }h = 0;if (f | 0) {
          c[f >> 2] = a;c[f + 4 >> 2] = b;
        }o = (g | 0) >>> 31 | (k | h) << 1 | (h << 1 | g >>> 31) & 0 | j;p = (g << 1 | 0 >>> 31) & -2 | i;return (A = o, p) | 0;
      }function EC(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;return DC(a, b, c, d, 0) | 0;
      }function FC(a) {
        a = a | 0;var b = 0,
            d = 0;d = a + 15 & -16 | 0;b = c[i >> 2] | 0;a = b + d | 0;if ((d | 0) > 0 & (a | 0) < (b | 0) | (a | 0) < 0) {
          Y() | 0;Qa(12);return -1;
        }c[i >> 2] = a;if ((a | 0) > (X() | 0) ? (W() | 0) == 0 : 0) {
          c[i >> 2] = b;Qa(12);return -1;
        }return b | 0;
      }function GC(b, c, d) {
        b = b | 0;c = c | 0;d = d | 0;var e = 0;if ((c | 0) < (b | 0) & (b | 0) < (c + d | 0)) {
          e = b;c = c + d | 0;b = b + d | 0;while ((d | 0) > 0) {
            b = b - 1 | 0;c = c - 1 | 0;d = d - 1 | 0;a[b >> 0] = a[c >> 0] | 0;
          }b = e;
        } else BC(b, c, d) | 0;return b | 0;
      }function HC(a, b, d, e) {
        a = a | 0;b = b | 0;d = d | 0;e = e | 0;var f = 0,
            g = 0;g = l;l = l + 16 | 0;f = g | 0;DC(a, b, d, e, f) | 0;l = g;return (A = c[f + 4 >> 2] | 0, c[f >> 2] | 0) | 0;
      }function IC(a) {
        a = a | 0;return (a & 255) << 24 | (a >> 8 & 255) << 16 | (a >> 16 & 255) << 8 | a >>> 24 | 0;
      }function JC(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;jb[a & 1](b | 0, c | 0, d | 0, e | 0, f | 0);
      }function KC(a, b, c) {
        a = a | 0;b = b | 0;c = T(c);kb[a & 1](b | 0, T(c));
      }function LC(a, b, c) {
        a = a | 0;b = b | 0;c = +c;lb[a & 31](b | 0, +c);
      }function MC(a, b, c, d) {
        a = a | 0;b = b | 0;c = T(c);d = T(d);return T(mb[a & 0](b | 0, T(c), T(d)));
      }function NC(a, b) {
        a = a | 0;b = b | 0;nb[a & 127](b | 0);
      }function OC(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;ob[a & 31](b | 0, c | 0);
      }function PC(a, b) {
        a = a | 0;b = b | 0;return pb[a & 31](b | 0) | 0;
      }function QC(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = +c;d = +d;e = e | 0;qb[a & 1](b | 0, +c, +d, e | 0);
      }function RC(a, b, c, d) {
        a = a | 0;b = b | 0;c = +c;d = +d;rb[a & 1](b | 0, +c, +d);
      }function SC(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;return sb[a & 7](b | 0, c | 0, d | 0) | 0;
      }function TC(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;return +tb[a & 1](b | 0, c | 0, d | 0);
      }function UC(a, b) {
        a = a | 0;b = b | 0;return +ub[a & 15](b | 0);
      }function VC(a, b, c) {
        a = a | 0;b = b | 0;c = +c;return vb[a & 1](b | 0, +c) | 0;
      }function WC(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;return wb[a & 15](b | 0, c | 0) | 0;
      }function XC(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = +d;e = +e;f = f | 0;xb[a & 1](b | 0, c | 0, +d, +e, f | 0);
      }function YC(a, b, c, d, e, f, g) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;g = g | 0;yb[a & 1](b | 0, c | 0, d | 0, e | 0, f | 0, g | 0);
      }function ZC(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;return +zb[a & 7](b | 0, c | 0);
      }function _C(a) {
        a = a | 0;return Ab[a & 7]() | 0;
      }function $C(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;return Bb[a & 1](b | 0, c | 0, d | 0, e | 0, f | 0) | 0;
      }function aD(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = +e;Cb[a & 1](b | 0, c | 0, d | 0, +e);
      }function bD(a, b, c, d, e, f, g) {
        a = a | 0;b = b | 0;c = c | 0;d = T(d);e = e | 0;f = T(f);g = g | 0;Db[a & 1](b | 0, c | 0, T(d), e | 0, T(f), g | 0);
      }function cD(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;Eb[a & 15](b | 0, c | 0, d | 0);
      }function dD(a) {
        a = a | 0;Fb[a & 0]();
      }function eD(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = +d;Gb[a & 15](b | 0, c | 0, +d);
      }function fD(a, b, c) {
        a = a | 0;b = +b;c = +c;return Hb[a & 1](+b, +c) | 0;
      }function gD(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;Ib[a & 15](b | 0, c | 0, d | 0, e | 0);
      }function hD(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;U(0);
      }function iD(a, b) {
        a = a | 0;b = T(b);U(1);
      }function jD(a, b) {
        a = a | 0;b = +b;U(2);
      }function kD(a, b, c) {
        a = a | 0;b = T(b);c = T(c);U(3);return ib;
      }function lD(a) {
        a = a | 0;U(4);
      }function mD(a, b) {
        a = a | 0;b = b | 0;U(5);
      }function nD(a) {
        a = a | 0;U(6);return 0;
      }function oD(a, b, c, d) {
        a = a | 0;b = +b;c = +c;d = d | 0;U(7);
      }function pD(a, b, c) {
        a = a | 0;b = +b;c = +c;U(8);
      }function qD(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;U(9);return 0;
      }function rD(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;U(10);return 0.0;
      }function sD(a) {
        a = a | 0;U(11);return 0.0;
      }function tD(a, b) {
        a = a | 0;b = +b;U(12);return 0;
      }function uD(a, b) {
        a = a | 0;b = b | 0;U(13);return 0;
      }function vD(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = +c;d = +d;e = e | 0;U(14);
      }function wD(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;f = f | 0;U(15);
      }function xD(a, b) {
        a = a | 0;b = b | 0;U(16);return 0.0;
      }function yD() {
        U(17);return 0;
      }function zD(a, b, c, d, e) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;e = e | 0;U(18);return 0;
      }function AD(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = +d;U(19);
      }function BD(a, b, c, d, e, f) {
        a = a | 0;b = b | 0;c = T(c);d = d | 0;e = T(e);f = f | 0;U(20);
      }function CD(a, b, c) {
        a = a | 0;b = b | 0;c = c | 0;U(21);
      }function DD() {
        U(22);
      }function ED(a, b, c) {
        a = a | 0;b = b | 0;c = +c;U(23);
      }function FD(a, b) {
        a = +a;b = +b;U(24);return 0;
      }function GD(a, b, c, d) {
        a = a | 0;b = b | 0;c = c | 0;d = d | 0;U(25);
      }

      // EMSCRIPTEN_END_FUNCS
      var jb = [hD, Uw];var kb = [iD, of];var lb = [jD, Of, Pf, Qf, Rf, Sf, Tf, Uf, Wf, Xf, Zf, _f, $f, ag, bg, cg, dg, eg, fg, jD, jD, jD, jD, jD, jD, jD, jD, jD, jD, jD, jD, jD];var mb = [kD];var nb = [lD, kC, Ki, Li, Mi, rn, sn, tn, Pu, Qu, Ru, Cw, Dw, Ew, DA, EA, FA, Rb, tf, yf, Vf, Yf, hh, ih, ri, Ui, kj, Jj, bk, zk, Wk, nl, Hl, bm, um, Nm, en, Nn, fo, yo, Ro, ip, Bp, Xp, nq, Eq, Zq, lf, Hr, _r, us, Ps, ft, Ct, Ot, Rt, ju, mu, Eu, Uu, Xu, pv, Kv, Vi, $x, Ky, az, sz, Rz, hA, tA, wA, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD, lD];var ob = [mD, zf, Af, Df, Ef, Ff, Gf, Hf, If, Lf, Mf, Nf, wg, zg, Ag, Bg, Cg, Dg, Eg, Jg, Ng, rh, $p, qq, Ts, cy, Sv, xy, mD, mD, mD, mD];var pb = [nD, rB, sf, jg, ng, og, pg, qg, rg, sg, ug, vg, Kg, Lg, jh, ar, jt, sv, hy, jy, nD, nD, nD, nD, nD, nD, nD, nD, nD, nD, nD, nD];var qb = [oD, kh];var rb = [pD, Hu];var sb = [qD, sB, tB, zB, Dk, Rn, Lr, wz];var tb = [rD, ym];var ub = [sD, xg, yg, Fg, lh, mh, nh, oh, ph, qh, sD, sD, sD, sD, sD, sD];var vb = [tD, Kt];var wb = [uD, lC, Mg, xi, Nj, _k, rl, jn, jo, Iq, pf, ez, uD, uD, uD, uD];var xb = [vD, oj];var yb = [wD, Vz];var zb = [xD, Gg, sh, th, uh, Rm, xD, xD];var Ab = [yD, vh, qf, jf, Wt, qu, av, AA];var Bb = [zD, ee];var Cb = [AD, Vo];var Db = [BD, Pg];var Eb = [CD, kg, tg, Hg, Ig, fk, Ll, mp, Fp, nf, vx, Oy, lA, CD, CD, CD];var Fb = [DD];var Gb = [ED, Bf, Cf, Jf, Kf, gg, hg, ig, Co, cs, Ft, ED, ED, ED, ED, ED];var Hb = [FD, Mu];var Ib = [GD, fm, ir, ys, st, au, wu, hv, Pv, oy, LA, GD, GD, GD, GD, GD];return { _llvm_bswap_i32: IC, dynCall_idd: fD, dynCall_i: _C, _i64Subtract: wC, ___udivdi3: EC, dynCall_vif: KC, setThrew: Nb, dynCall_viii: cD, _bitshift64Lshr: AC, _bitshift64Shl: zC, dynCall_vi: NC, dynCall_viiddi: XC, dynCall_diii: TC, dynCall_iii: WC, _memset: yC, _sbrk: FC, _memcpy: BC, __GLOBAL__sub_I_Yoga_cpp: hf, dynCall_vii: OC, ___uremdi3: HC, dynCall_vid: LC, stackAlloc: Jb, _nbind_init: _A, getTempRet0: Pb, dynCall_di: UC, dynCall_iid: VC, setTempRet0: Ob, _i64Add: xC, dynCall_fiff: MC, dynCall_iiii: SC, _emscripten_get_global_libc: qB, dynCall_viid: eD, dynCall_viiid: aD, dynCall_viififi: bD, dynCall_ii: PC, __GLOBAL__sub_I_Binding_cc: Sx, dynCall_viiii: gD, dynCall_iiiiii: $C, stackSave: Kb, dynCall_viiiii: JC, __GLOBAL__sub_I_nbind_cc: wh, dynCall_vidd: RC, _free: pB, runPostSets: vC, dynCall_viiiiii: YC, establishStackSpace: Mb, _memmove: GC, stackRestore: Lb, _malloc: oB, __GLOBAL__sub_I_common_cc: Bv, dynCall_viddi: QC, dynCall_dii: ZC, dynCall_v: dD };
    }(

    // EMSCRIPTEN_END_ASM
    Module.asmGlobalArg, Module.asmLibraryArg, buffer);var _llvm_bswap_i32 = Module["_llvm_bswap_i32"] = asm["_llvm_bswap_i32"];var getTempRet0 = Module["getTempRet0"] = asm["getTempRet0"];var ___udivdi3 = Module["___udivdi3"] = asm["___udivdi3"];var setThrew = Module["setThrew"] = asm["setThrew"];var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"];var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"];var _memset = Module["_memset"] = asm["_memset"];var _sbrk = Module["_sbrk"] = asm["_sbrk"];var _memcpy = Module["_memcpy"] = asm["_memcpy"];var stackAlloc = Module["stackAlloc"] = asm["stackAlloc"];var ___uremdi3 = Module["___uremdi3"] = asm["___uremdi3"];var _nbind_init = Module["_nbind_init"] = asm["_nbind_init"];var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"];var setTempRet0 = Module["setTempRet0"] = asm["setTempRet0"];var _i64Add = Module["_i64Add"] = asm["_i64Add"];var _emscripten_get_global_libc = Module["_emscripten_get_global_libc"] = asm["_emscripten_get_global_libc"];var __GLOBAL__sub_I_Yoga_cpp = Module["__GLOBAL__sub_I_Yoga_cpp"] = asm["__GLOBAL__sub_I_Yoga_cpp"];var __GLOBAL__sub_I_Binding_cc = Module["__GLOBAL__sub_I_Binding_cc"] = asm["__GLOBAL__sub_I_Binding_cc"];var stackSave = Module["stackSave"] = asm["stackSave"];var __GLOBAL__sub_I_nbind_cc = Module["__GLOBAL__sub_I_nbind_cc"] = asm["__GLOBAL__sub_I_nbind_cc"];var _free = Module["_free"] = asm["_free"];var runPostSets = Module["runPostSets"] = asm["runPostSets"];var establishStackSpace = Module["establishStackSpace"] = asm["establishStackSpace"];var _memmove = Module["_memmove"] = asm["_memmove"];var stackRestore = Module["stackRestore"] = asm["stackRestore"];var _malloc = Module["_malloc"] = asm["_malloc"];var __GLOBAL__sub_I_common_cc = Module["__GLOBAL__sub_I_common_cc"] = asm["__GLOBAL__sub_I_common_cc"];var dynCall_viiiii = Module["dynCall_viiiii"] = asm["dynCall_viiiii"];var dynCall_vif = Module["dynCall_vif"] = asm["dynCall_vif"];var dynCall_vid = Module["dynCall_vid"] = asm["dynCall_vid"];var dynCall_fiff = Module["dynCall_fiff"] = asm["dynCall_fiff"];var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"];var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"];var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"];var dynCall_viddi = Module["dynCall_viddi"] = asm["dynCall_viddi"];var dynCall_vidd = Module["dynCall_vidd"] = asm["dynCall_vidd"];var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"];var dynCall_diii = Module["dynCall_diii"] = asm["dynCall_diii"];var dynCall_di = Module["dynCall_di"] = asm["dynCall_di"];var dynCall_iid = Module["dynCall_iid"] = asm["dynCall_iid"];var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"];var dynCall_viiddi = Module["dynCall_viiddi"] = asm["dynCall_viiddi"];var dynCall_viiiiii = Module["dynCall_viiiiii"] = asm["dynCall_viiiiii"];var dynCall_dii = Module["dynCall_dii"] = asm["dynCall_dii"];var dynCall_i = Module["dynCall_i"] = asm["dynCall_i"];var dynCall_iiiiii = Module["dynCall_iiiiii"] = asm["dynCall_iiiiii"];var dynCall_viiid = Module["dynCall_viiid"] = asm["dynCall_viiid"];var dynCall_viififi = Module["dynCall_viififi"] = asm["dynCall_viififi"];var dynCall_viii = Module["dynCall_viii"] = asm["dynCall_viii"];var dynCall_v = Module["dynCall_v"] = asm["dynCall_v"];var dynCall_viid = Module["dynCall_viid"] = asm["dynCall_viid"];var dynCall_idd = Module["dynCall_idd"] = asm["dynCall_idd"];var dynCall_viiii = Module["dynCall_viiii"] = asm["dynCall_viiii"];Runtime.stackAlloc = Module["stackAlloc"];Runtime.stackSave = Module["stackSave"];Runtime.stackRestore = Module["stackRestore"];Runtime.establishStackSpace = Module["establishStackSpace"];Runtime.setTempRet0 = Module["setTempRet0"];Runtime.getTempRet0 = Module["getTempRet0"];Module["asm"] = asm;function ExitStatus(status) {
      this.name = "ExitStatus";this.message = "Program terminated with exit(" + status + ")";this.status = status;
    }ExitStatus.prototype = new Error();ExitStatus.prototype.constructor = ExitStatus;var initialStackTop;var preloadStartTime = null;var calledMain = false;dependenciesFulfilled = function runCaller() {
      if (!Module["calledRun"]) run();if (!Module["calledRun"]) dependenciesFulfilled = runCaller;
    };Module["callMain"] = Module.callMain = function callMain(args) {
      args = args || [];ensureInitRuntime();var argc = args.length + 1;function pad() {
        for (var i = 0; i < 4 - 1; i++) {
          argv.push(0);
        }
      }var argv = [allocate(intArrayFromString(Module["thisProgram"]), "i8", ALLOC_NORMAL)];pad();for (var i = 0; i < argc - 1; i = i + 1) {
        argv.push(allocate(intArrayFromString(args[i]), "i8", ALLOC_NORMAL));pad();
      }argv.push(0);argv = allocate(argv, "i32", ALLOC_NORMAL);try {
        var ret = Module["_main"](argc, argv, 0);exit(ret, true);
      } catch (e) {
        if (e instanceof ExitStatus) {
          return;
        } else if (e == "SimulateInfiniteLoop") {
          Module["noExitRuntime"] = true;return;
        } else {
          var toLog = e;if (e && typeof e === "object" && e.stack) {
            toLog = [e, e.stack];
          }Module.printErr("exception thrown: " + toLog);Module["quit"](1, e);
        }
      } finally {
        calledMain = true;
      }
    };function run(args) {
      args = args || Module["arguments"];if (preloadStartTime === null) preloadStartTime = Date.now();if (runDependencies > 0) {
        return;
      }preRun();if (runDependencies > 0) return;if (Module["calledRun"]) return;function doRun() {
        if (Module["calledRun"]) return;Module["calledRun"] = true;if (ABORT) return;ensureInitRuntime();preMain();if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"]();if (Module["_main"] && shouldRunNow) Module["callMain"](args);postRun();
      }if (Module["setStatus"]) {
        Module["setStatus"]("Running...");setTimeout(function () {
          setTimeout(function () {
            Module["setStatus"]("");
          }, 1);doRun();
        }, 1);
      } else {
        doRun();
      }
    }Module["run"] = Module.run = run;function exit(status, implicit) {
      if (implicit && Module["noExitRuntime"]) {
        return;
      }if (Module["noExitRuntime"]) {} else {
        ABORT = true;EXITSTATUS = status;STACKTOP = initialStackTop;exitRuntime();if (Module["onExit"]) Module["onExit"](status);
      }if (ENVIRONMENT_IS_NODE) {
        process["exit"](status);
      }Module["quit"](status, new ExitStatus(status));
    }Module["exit"] = Module.exit = exit;var abortDecorators = [];function abort(what) {
      if (Module["onAbort"]) {
        Module["onAbort"](what);
      }if (what !== undefined) {
        Module.print(what);Module.printErr(what);what = JSON.stringify(what);
      } else {
        what = "";
      }ABORT = true;EXITSTATUS = 1;var extra = "\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output = "abort(" + what + ") at " + stackTrace() + extra;if (abortDecorators) {
        abortDecorators.forEach(function (decorator) {
          output = decorator(output, what);
        });
      }throw output;
    }Module["abort"] = Module.abort = abort;if (Module["preInit"]) {
      if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]];while (Module["preInit"].length > 0) {
        Module["preInit"].pop()();
      }
    }var shouldRunNow = true;if (Module["noInitialRun"]) {
      shouldRunNow = false;
    }run();
  });


  /***/ }),
  /* 61 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _stringLength = _interopRequireDefault(__webpack_require__(62));

  var _sliceAnsi = _interopRequireDefault(__webpack_require__(66));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  /**
   * "Virtual" output class
   *
   * Handles the positioning and saving of the output of each node in the tree.
   * Also responsible for applying transformations to each character of the output.
   *
   * Used to generate the final output of all nodes before writing it to actual output stream (e.g. stdout)
   */
  class Output {
    constructor({
      width,
      height
    }) {
      // Initialize output array with a specific set of rows, so that margin/padding at the bottom is preserved
      const output = [];

      for (let y = 0; y < height; y++) {
        output.push(' '.repeat(width));
      }

      this.output = output;
    }

    write(x, y, text, {
      transformers
    }) {
      if (!text) {
        return;
      }

      const lines = text.split('\n');
      let offsetY = 0;

      for (let line of lines) {
        const length = (0, _stringLength.default)(line);
        const currentLine = this.output[y + offsetY]; // Line can be missing if `text` is taller than height of pre-initialized `this.output`

        if (!currentLine) {
          continue;
        }

        for (const transformer of transformers) {
          line = transformer(line);
        }

        this.output[y + offsetY] = (0, _sliceAnsi.default)(currentLine, 0, x) + line + (0, _sliceAnsi.default)(currentLine, x + length);
        offsetY++;
      }
    }

    get() {
      return this.output.map(line => line.trimRight()).join('\n');
    }

  }

  exports.default = Output;

  /***/ }),
  /* 62 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const stripAnsi = __webpack_require__(63);
  const astralRegex = __webpack_require__(65);

  module.exports = input => stripAnsi(input).replace(astralRegex(), ' ').length;


  /***/ }),
  /* 63 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const ansiRegex = __webpack_require__(64);

  module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;


  /***/ }),
  /* 64 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  module.exports = () => {
  	const pattern = [
  		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
  		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
  	].join('|');

  	return new RegExp(pattern, 'g');
  };


  /***/ }),
  /* 65 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]';

  module.exports = opts => opts && opts.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g');


  /***/ }),
  /* 66 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const isFullwidthCodePoint = __webpack_require__(35);

  const ESCAPES = [
  	'\u001B',
  	'\u009B'
  ];

  const END_CODE = 39;
  const ASTRAL_REGEX = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;

  const ESCAPE_CODES = new Map([
  	[0, 0],
  	[1, 22],
  	[2, 22],
  	[3, 23],
  	[4, 24],
  	[7, 27],
  	[8, 28],
  	[9, 29],
  	[30, 39],
  	[31, 39],
  	[32, 39],
  	[33, 39],
  	[34, 39],
  	[35, 39],
  	[36, 39],
  	[37, 39],
  	[90, 39],
  	[40, 49],
  	[41, 49],
  	[42, 49],
  	[43, 49],
  	[44, 49],
  	[45, 49],
  	[46, 49],
  	[47, 49]
  ]);

  const wrapAnsi = code => `${ESCAPES[0]}[${code}m`;

  module.exports = (str, begin, end) => {
  	const arr = Array.from(str.normalize());

  	end = typeof end === 'number' ? end : arr.length;

  	let insideEscape = false;
  	let escapeCode;
  	let visible = 0;
  	let output = '';

  	for (const item of arr.entries()) {
  		const i = item[0];
  		const x = item[1];

  		let leftEscape = false;

  		if (ESCAPES.indexOf(x) !== -1) {
  			insideEscape = true;
  			const code = /\d[^m]*/.exec(str.slice(i, i + 4));
  			escapeCode = code === END_CODE ? null : code;
  		} else if (insideEscape && x === 'm') {
  			insideEscape = false;
  			leftEscape = true;
  		}

  		if (!insideEscape && !leftEscape) {
  			++visible;
  		}

  		if (!ASTRAL_REGEX.test(x) && isFullwidthCodePoint(x.codePointAt())) {
  			++visible;
  		}

  		if (visible > begin && visible <= end) {
  			output += x;
  		} else if (visible === begin && !insideEscape && escapeCode !== undefined && escapeCode !== END_CODE) {
  			output += wrapAnsi(escapeCode);
  		} else if (visible >= end) {
  			if (escapeCode !== undefined) {
  				output += wrapAnsi(ESCAPE_CODES.get(parseInt(escapeCode, 10)) || END_CODE);
  			}
  			break;
  		}
  	}

  	return output;
  };


  /***/ }),
  /* 67 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _yogaLayoutPrebuilt = _interopRequireDefault(__webpack_require__(57));

  var _applyStyles = _interopRequireDefault(__webpack_require__(68));

  var _measureText = _interopRequireDefault(__webpack_require__(69));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  // Traverse the node tree, create Yoga nodes and assign styles to each Yoga node
  const buildLayout = (node, options) => {
    const {
      config,
      terminalWidth,
      skipStaticElements
    } = options;

    const yogaNode = _yogaLayoutPrebuilt.default.Node.create(config);

    node.yogaNode = yogaNode;
    const style = node.style || {}; // Root node of the tree

    if (node.nodeName === 'ROOT') {
      // `terminalWidth` can be `undefined` if env isn't a TTY
      yogaNode.setWidth(terminalWidth || 100);

      if (node.childNodes.length > 0) {
        const childNodes = node.childNodes.filter(childNode => {
          return skipStaticElements ? !childNode.unstable__static : true;
        });

        for (const [index, childNode] of Object.entries(childNodes)) {
          const childYogaNode = buildLayout(childNode, options).yogaNode;
          yogaNode.insertChild(childYogaNode, index);
        }
      }

      return node;
    } // Apply margin, padding, flex, etc styles


    (0, _applyStyles.default)(yogaNode, style); // Nodes with only text have a child Yoga node dedicated for that text

    if (node.textContent || node.nodeValue) {
      const {
        width,
        height
      } = (0, _measureText.default)(node.textContent || node.nodeValue);
      yogaNode.setWidth(style.width || width);
      yogaNode.setHeight(style.height || height);
      return node;
    }

    if (Array.isArray(node.childNodes) && node.childNodes.length > 0) {
      const childNodes = node.childNodes.filter(childNode => {
        return skipStaticElements ? !childNode.unstable__static : true;
      });

      for (const [index, childNode] of Object.entries(childNodes)) {
        const {
          yogaNode: childYogaNode
        } = buildLayout(childNode, options);
        yogaNode.insertChild(childYogaNode, index);
      }
    }

    return node;
  };

  var _default = buildLayout;
  exports.default = _default;

  /***/ }),
  /* 68 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _yogaLayoutPrebuilt = _interopRequireDefault(__webpack_require__(57));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  const hasOwnProperty = (obj, prop) => {
    return {}.hasOwnProperty.call(obj, prop);
  };

  const applyMarginStyles = (node, style) => {
    if (style.margin) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.margin);
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.margin);
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.margin);
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.margin);
    }

    if (style.marginX) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.marginX);
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.marginX);
    }

    if (style.marginY) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.marginY);
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.marginY);
    }

    if (style.marginTop) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.marginTop);
    }

    if (style.marginBottom) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.marginBottom);
    }

    if (style.marginLeft) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.marginLeft);
    }

    if (style.marginRight) {
      node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.marginRight);
    }
  };

  const applyPaddingStyles = (node, style) => {
    if (style.padding) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.padding);
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.padding);
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.padding);
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.padding);
    }

    if (style.paddingX) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.paddingX);
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.paddingX);
    }

    if (style.paddingY) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.paddingY);
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.paddingY);
    }

    if (style.paddingTop) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.paddingTop);
    }

    if (style.paddingBottom) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.paddingBottom);
    }

    if (style.paddingLeft) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.paddingLeft);
    }

    if (style.paddingRight) {
      node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.paddingRight);
    }
  };

  const applyFlexStyles = (node, style) => {
    if (style.flexGrow) {
      node.setFlexGrow(style.flexGrow);
    }

    if (style.flexShrink) {
      node.setFlexShrink(style.flexShrink);
    }

    if (style.flexDirection) {
      if (style.flexDirection === 'row') {
        node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW);
      }

      if (style.flexDirection === 'row-reverse') {
        node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW_REVERSE);
      }

      if (style.flexDirection === 'column') {
        node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN);
      }

      if (style.flexDirection === 'column-reverse') {
        node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN_REVERSE);
      }
    }

    if (hasOwnProperty(style, 'flexBasis')) {
      node.setFlexBasis(style.flexBasis);
    }

    if (style.alignItems) {
      if (style.alignItems === 'flex-start') {
        node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_START);
      }

      if (style.alignItems === 'center') {
        node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_CENTER);
      }

      if (style.alignItems === 'flex-end') {
        node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_END);
      }
    }

    if (style.justifyContent) {
      if (style.justifyContent === 'flex-start') {
        node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_START);
      }

      if (style.justifyContent === 'center') {
        node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_CENTER);
      }

      if (style.justifyContent === 'flex-end') {
        node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_END);
      }

      if (style.justifyContent === 'space-between') {
        node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_BETWEEN);
      }

      if (style.justifyContent === 'space-around') {
        node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_AROUND);
      }
    }
  };

  const applyDimensionStyles = (node, style) => {
    if (hasOwnProperty(style, 'width')) {
      node.setWidth(style.width);
    }

    if (hasOwnProperty(style, 'height')) {
      node.setHeight(style.height);
    }

    if (hasOwnProperty(style, 'minWidth')) {
      node.setMinWidth(style.minWidth);
    }

    if (hasOwnProperty(style, 'minHeight')) {
      node.setMinHeight(style.minHeight);
    }
  };

  var _default = (node, style = {}) => {
    applyMarginStyles(node, style);
    applyPaddingStyles(node, style);
    applyFlexStyles(node, style);
    applyDimensionStyles(node, style);
  };

  exports.default = _default;

  /***/ }),
  /* 69 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _widestLine = _interopRequireDefault(__webpack_require__(70));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  var _default = text => {
    const width = (0, _widestLine.default)(text);
    const height = text.split('\n').length;
    return {
      width,
      height
    };
  };

  exports.default = _default;

  /***/ }),
  /* 70 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const stringWidth = __webpack_require__(71);

  module.exports = input => {
  	let max = 0;
  	for (const s of input.split('\n')) max = Math.max(max, stringWidth(s));
  	return max;
  };


  /***/ }),
  /* 71 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const stripAnsi = __webpack_require__(63);
  const isFullwidthCodePoint = __webpack_require__(35);

  module.exports = str => {
  	if (typeof str !== 'string' || str.length === 0) {
  		return 0;
  	}

  	str = stripAnsi(str);

  	let width = 0;

  	for (let i = 0; i < str.length; i++) {
  		const code = str.codePointAt(i);

  		// Ignore control characters
  		if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
  			continue;
  		}

  		// Ignore combining characters
  		if (code >= 0x300 && code <= 0x36F) {
  			continue;
  		}

  		// Surrogates
  		if (code > 0xFFFF) {
  			i++;
  		}

  		width += isFullwidthCodePoint(code) ? 2 : 1;
  	}

  	return width;
  };


  /***/ }),
  /* 72 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _widestLine = _interopRequireDefault(__webpack_require__(70));

  var _wrapText = _interopRequireDefault(__webpack_require__(73));

  var _getMaxWidth = _interopRequireDefault(__webpack_require__(75));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  const isAllTextNodes = node => {
    if (node.nodeName === '#text') {
      return true;
    }

    if (node.nodeName === 'SPAN') {
      if (node.textContent) {
        return true;
      }

      if (Array.isArray(node.childNodes)) {
        return node.childNodes.every(isAllTextNodes);
      }
    }

    return false;
  }; // Squashing text nodes allows to combine multiple text nodes into one and write
  // to `Output` instance only once. For example, <Text>hello{' '}world</Text>
  // is actually 3 text nodes, which would result 3 writes to `Output`.
  //
  // Also, this is necessary for libraries like ink-link (https://github.com/sindresorhus/ink-link),
  // which need to wrap all children at once, instead of wrapping 3 text nodes separately.


  const squashTextNodes = node => {
    let text = '';

    for (const childNode of node.childNodes) {
      let nodeText;

      if (childNode.nodeName === '#text') {
        nodeText = childNode.nodeValue;
      }

      if (childNode.nodeName === 'SPAN') {
        nodeText = childNode.textContent || squashTextNodes(childNode);
      } // Since these text nodes are being concatenated, `Output` instance won't be able to
      // apply children transform, so we have to do it manually here for each text node


      if (childNode.unstable__transformChildren) {
        nodeText = childNode.unstable__transformChildren(nodeText);
      }

      text += nodeText;
    }

    return text;
  }; // After nodes are laid out, render each to output object, which later gets rendered to terminal


  const renderNodeToOutput = (node, output, {
    offsetX = 0,
    offsetY = 0,
    transformers = [],
    skipStaticElements
  }) => {
    if (node.unstable__static && skipStaticElements) {
      return;
    }

    const {
      yogaNode
    } = node; // Left and top positions in Yoga are relative to their parent node

    const x = offsetX + yogaNode.getComputedLeft();
    const y = offsetY + yogaNode.getComputedTop(); // Transformers are functions that transform final text output of each component
    // See Output class for logic that applies transformers

    let newTransformers = transformers;

    if (node.unstable__transformChildren) {
      newTransformers = [node.unstable__transformChildren, ...transformers];
    } // Nodes with only text inside


    if (node.textContent) {
      let text = node.textContent; // Since text nodes are always wrapped in an additional node, parent node
      // is where we should look for attributes

      if (node.parentNode.style.textWrap) {
        const currentWidth = (0, _widestLine.default)(text);
        const maxWidth = (0, _getMaxWidth.default)(node.parentNode.yogaNode);

        if (currentWidth > maxWidth) {
          text = (0, _wrapText.default)(text, maxWidth, {
            textWrap: node.parentNode.style.textWrap
          });
        }
      }

      output.write(x, y, text, {
        transformers: newTransformers
      });
      return;
    } // Text nodes


    if (node.nodeName === '#text') {
      output.write(x, y, node.nodeValue, {
        transformers: newTransformers
      });
      return;
    } // Nodes that have other nodes as children


    if (Array.isArray(node.childNodes) && node.childNodes.length > 0) {
      const isFlexDirectionRow = node.style.flexDirection === 'row';

      if (isFlexDirectionRow && node.childNodes.every(isAllTextNodes)) {
        let text = squashTextNodes(node);

        if (node.style.textWrap) {
          const currentWidth = (0, _widestLine.default)(text);
          const maxWidth = (0, _getMaxWidth.default)(yogaNode);

          if (currentWidth > maxWidth) {
            text = (0, _wrapText.default)(text, maxWidth, {
              textWrap: node.style.textWrap
            });
          }
        }

        output.write(x, y, text, {
          transformers: newTransformers
        });
        return;
      }

      for (const childNode of node.childNodes) {
        renderNodeToOutput(childNode, output, {
          offsetX: x,
          offsetY: y,
          transformers: newTransformers,
          skipStaticElements
        });
      }
    }
  };

  var _default = renderNodeToOutput;
  exports.default = _default;

  /***/ }),
  /* 73 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _wrapAnsi = _interopRequireDefault(__webpack_require__(31));

  var _cliTruncate = _interopRequireDefault(__webpack_require__(74));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  var _default = (text, maxWidth, {
    textWrap
  } = {}) => {
    if (textWrap === 'wrap') {
      return (0, _wrapAnsi.default)(text, maxWidth, {
        trim: false,
        hard: true
      });
    }

    if (String(textWrap).startsWith('truncate')) {
      let position;

      if (textWrap === 'truncate' || textWrap === 'truncate-end') {
        position = 'end';
      }

      if (textWrap === 'truncate-middle') {
        position = 'middle';
      }

      if (textWrap === 'truncate-start') {
        position = 'start';
      }

      return (0, _cliTruncate.default)(text, maxWidth, {
        position
      });
    }

    return text;
  };

  exports.default = _default;

  /***/ }),
  /* 74 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const sliceAnsi = __webpack_require__(66);
  const stringWidth = __webpack_require__(71);

  module.exports = (input, columns, opts) => {
  	opts = Object.assign({
  		position: 'end'
  	}, opts);

  	const position = opts.position;
  	const ellipsis = '…';

  	if (typeof input !== 'string') {
  		throw new TypeError(`Expected \`input\` to be a string, got ${typeof input}`);
  	}

  	if (typeof columns !== 'number') {
  		throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
  	}

  	if (columns < 1) {
  		return '';
  	}

  	if (columns === 1) {
  		return ellipsis;
  	}

  	const length = stringWidth(input);

  	if (length <= columns) {
  		return input;
  	}

  	if (position === 'start') {
  		return ellipsis + sliceAnsi(input, length - columns + 1, length);
  	} else if (position === 'middle') {
  		const half = Math.floor(columns / 2);
  		return sliceAnsi(input, 0, half) + ellipsis + sliceAnsi(input, length - (columns - half) + 1, length);
  	} else if (position === 'end') {
  		return sliceAnsi(input, 0, columns - 1) + ellipsis;
  	}

  	throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
  };


  /***/ }),
  /* 75 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _default = yogaNode => {
    return yogaNode.getComputedWidth() - yogaNode.getComputedPadding() * 2;
  };

  exports.default = _default;

  /***/ }),
  /* 76 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  // Store all instances of Ink (instance.js) to ensure that consecutive render() calls
  // use the same instance of Ink and don't create a new one
  //
  // This map has to be stored in a separate file, because render.js creates instances,
  // but instance.js should delete itself from the map on unmount
  var _default = new WeakMap();

  exports.default = _default;

  /***/ }),
  /* 77 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _readline = _interopRequireDefault(__webpack_require__(78));

  var _react = _interopRequireWildcard(__webpack_require__(14));

  var _propTypes = _interopRequireDefault(__webpack_require__(79));

  var _cliCursor = _interopRequireDefault(__webpack_require__(23));

  var _AppContext = _interopRequireDefault(__webpack_require__(81));

  var _StdinContext = _interopRequireDefault(__webpack_require__(82));

  var _StdoutContext = _interopRequireDefault(__webpack_require__(83));

  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  // Root component for all Ink apps
  // It renders stdin and stdout contexts, so that children can access them if needed
  // It also handles Ctrl+C exiting and cursor visibility
  class App extends _react.PureComponent {
    // Determines if TTY is supported on the provided stdin
    isRawModeSupported() {
      return this.props.stdin.isTTY;
    }

    constructor() {
      super(); // Count how many components enabled raw mode to avoid disabling
      // raw mode until all components don't need it anymore

      _defineProperty(this, "handleSetRawMode", isEnabled => {
        const {
          stdin
        } = this.props;

        if (!this.isRawModeSupported()) {
          if (stdin === process.stdin) {
            throw new Error('Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported');
          } else {
            throw new Error('Raw mode is not supported on the stdin provided to Ink.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported');
          }
        }

        stdin.setEncoding('utf8');

        if (isEnabled) {
          // Ensure raw mode is enabled only once
          if (this.rawModeEnabledCount === 0) {
            stdin.addListener('data', this.handleInput);
            stdin.resume();
            stdin.setRawMode(true);

            _readline.default.emitKeypressEvents(stdin);
          }

          this.rawModeEnabledCount++;
          return;
        } // Disable raw mode only when no components left that are using it


        if (--this.rawModeEnabledCount === 0) {
          stdin.setRawMode(false);
          stdin.removeListener('data', this.handleInput);
          stdin.pause();
        }
      });

      _defineProperty(this, "handleInput", input => {
        // Exit on Ctrl+C
        if (input === '\x03' && this.props.exitOnCtrlC) {
          // eslint-disable-line unicorn/no-hex-escape
          this.handleExit();
        }
      });

      _defineProperty(this, "handleExit", error => {
        if (this.isRawModeSupported()) {
          this.handleSetRawMode(false);
        }

        this.props.onExit(error);
      });

      this.rawModeEnabledCount = 0;
    }

    render() {
      return _react.default.createElement(_AppContext.default.Provider, {
        value: {
          exit: this.handleExit
        }
      }, _react.default.createElement(_StdinContext.default.Provider, {
        value: {
          stdin: this.props.stdin,
          setRawMode: this.handleSetRawMode,
          isRawModeSupported: this.isRawModeSupported()
        }
      }, _react.default.createElement(_StdoutContext.default.Provider, {
        value: {
          stdout: this.props.stdout
        }
      }, this.props.children)));
    }

    componentDidMount() {
      _cliCursor.default.hide(this.props.stdout);
    }

    componentWillUnmount() {
      _cliCursor.default.show(this.props.stdout); // ignore calling setRawMode on an handle stdin it cannot be called


      if (this.isRawModeSupported()) {
        this.handleSetRawMode(false);
      }
    }

    componentDidCatch(error) {
      this.handleExit(error);
    }

  }

  exports.default = App;

  _defineProperty(App, "propTypes", {
    children: _propTypes.default.node.isRequired,
    stdin: _propTypes.default.object.isRequired,
    stdout: _propTypes.default.object.isRequired,
    exitOnCtrlC: _propTypes.default.bool.isRequired,
    onExit: _propTypes.default.func.isRequired
  });

  /***/ }),
  /* 78 */
  /***/ (function(module, exports) {

  module.exports = require("readline");

  /***/ }),
  /* 79 */
  /***/ (function(module, exports, __webpack_require__) {

  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */

  if (true) {
    var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
      Symbol.for &&
      Symbol.for('react.element')) ||
      0xeac7;

    var isValidElement = function(object) {
      return typeof object === 'object' &&
        object !== null &&
        object.$$typeof === REACT_ELEMENT_TYPE;
    };

    // By explicitly using `prop-types` you are opting into new development behavior.
    // http://fb.me/prop-types-in-prod
    var throwOnDirectAccess = true;
    module.exports = __webpack_require__(80)(isValidElement, throwOnDirectAccess);
  } else {}


  /***/ }),
  /* 80 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */



  var assign = __webpack_require__(16);

  var ReactPropTypesSecret = __webpack_require__(18);
  var checkPropTypes = __webpack_require__(17);

  var printWarning = function() {};

  if (true) {
    printWarning = function(text) {
      var message = 'Warning: ' + text;
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  }

  function emptyFunctionThatReturnsNull() {
    return null;
  }

  module.exports = function(isValidElement, throwOnDirectAccess) {
    /* global Symbol */
    var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
    var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.

    /**
     * Returns the iterator method function contained on the iterable object.
     *
     * Be sure to invoke the function with the iterable as context:
     *
     *     var iteratorFn = getIteratorFn(myIterable);
     *     if (iteratorFn) {
     *       var iterator = iteratorFn.call(myIterable);
     *       ...
     *     }
     *
     * @param {?object} maybeIterable
     * @return {?function}
     */
    function getIteratorFn(maybeIterable) {
      var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
      if (typeof iteratorFn === 'function') {
        return iteratorFn;
      }
    }

    /**
     * Collection of methods that allow declaration and validation of props that are
     * supplied to React components. Example usage:
     *
     *   var Props = require('ReactPropTypes');
     *   var MyArticle = React.createClass({
     *     propTypes: {
     *       // An optional string prop named "description".
     *       description: Props.string,
     *
     *       // A required enum prop named "category".
     *       category: Props.oneOf(['News','Photos']).isRequired,
     *
     *       // A prop named "dialog" that requires an instance of Dialog.
     *       dialog: Props.instanceOf(Dialog).isRequired
     *     },
     *     render: function() { ... }
     *   });
     *
     * A more formal specification of how these methods are used:
     *
     *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
     *   decl := ReactPropTypes.{type}(.isRequired)?
     *
     * Each and every declaration produces a function with the same signature. This
     * allows the creation of custom validation functions. For example:
     *
     *  var MyLink = React.createClass({
     *    propTypes: {
     *      // An optional string or URI prop named "href".
     *      href: function(props, propName, componentName) {
     *        var propValue = props[propName];
     *        if (propValue != null && typeof propValue !== 'string' &&
     *            !(propValue instanceof URI)) {
     *          return new Error(
     *            'Expected a string or an URI for ' + propName + ' in ' +
     *            componentName
     *          );
     *        }
     *      }
     *    },
     *    render: function() {...}
     *  });
     *
     * @internal
     */

    var ANONYMOUS = '<<anonymous>>';

    // Important!
    // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
    var ReactPropTypes = {
      array: createPrimitiveTypeChecker('array'),
      bool: createPrimitiveTypeChecker('boolean'),
      func: createPrimitiveTypeChecker('function'),
      number: createPrimitiveTypeChecker('number'),
      object: createPrimitiveTypeChecker('object'),
      string: createPrimitiveTypeChecker('string'),
      symbol: createPrimitiveTypeChecker('symbol'),

      any: createAnyTypeChecker(),
      arrayOf: createArrayOfTypeChecker,
      element: createElementTypeChecker(),
      instanceOf: createInstanceTypeChecker,
      node: createNodeChecker(),
      objectOf: createObjectOfTypeChecker,
      oneOf: createEnumTypeChecker,
      oneOfType: createUnionTypeChecker,
      shape: createShapeTypeChecker,
      exact: createStrictShapeTypeChecker,
    };

    /**
     * inlined Object.is polyfill to avoid requiring consumers ship their own
     * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
     */
    /*eslint-disable no-self-compare*/
    function is(x, y) {
      // SameValue algorithm
      if (x === y) {
        // Steps 1-5, 7-10
        // Steps 6.b-6.e: +0 != -0
        return x !== 0 || 1 / x === 1 / y;
      } else {
        // Step 6.a: NaN == NaN
        return x !== x && y !== y;
      }
    }
    /*eslint-enable no-self-compare*/

    /**
     * We use an Error-like object for backward compatibility as people may call
     * PropTypes directly and inspect their output. However, we don't use real
     * Errors anymore. We don't inspect their stack anyway, and creating them
     * is prohibitively expensive if they are created too often, such as what
     * happens in oneOfType() for any type before the one that matched.
     */
    function PropTypeError(message) {
      this.message = message;
      this.stack = '';
    }
    // Make `instanceof Error` still work for returned errors.
    PropTypeError.prototype = Error.prototype;

    function createChainableTypeChecker(validate) {
      if (true) {
        var manualPropTypeCallCache = {};
        var manualPropTypeWarningCount = 0;
      }
      function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
        componentName = componentName || ANONYMOUS;
        propFullName = propFullName || propName;

        if (secret !== ReactPropTypesSecret) {
          if (throwOnDirectAccess) {
            // New behavior only for users of `prop-types` package
            var err = new Error(
              'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
              'Use `PropTypes.checkPropTypes()` to call them. ' +
              'Read more at http://fb.me/use-check-prop-types'
            );
            err.name = 'Invariant Violation';
            throw err;
          } else if ( true && typeof console !== 'undefined') {
            // Old behavior for people using React.PropTypes
            var cacheKey = componentName + ':' + propName;
            if (
              !manualPropTypeCallCache[cacheKey] &&
              // Avoid spamming the console because they are often not actionable except for lib authors
              manualPropTypeWarningCount < 3
            ) {
              printWarning(
                'You are manually calling a React.PropTypes validation ' +
                'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +
                'and will throw in the standalone `prop-types` package. ' +
                'You may be seeing this warning due to a third-party PropTypes ' +
                'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
              );
              manualPropTypeCallCache[cacheKey] = true;
              manualPropTypeWarningCount++;
            }
          }
        }
        if (props[propName] == null) {
          if (isRequired) {
            if (props[propName] === null) {
              return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
            }
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
          }
          return null;
        } else {
          return validate(props, propName, componentName, location, propFullName);
        }
      }

      var chainedCheckType = checkType.bind(null, false);
      chainedCheckType.isRequired = checkType.bind(null, true);

      return chainedCheckType;
    }

    function createPrimitiveTypeChecker(expectedType) {
      function validate(props, propName, componentName, location, propFullName, secret) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== expectedType) {
          // `propValue` being instance of, say, date/regexp, pass the 'object'
          // check, but we can offer a more precise error message here rather than
          // 'of type `object`'.
          var preciseType = getPreciseType(propValue);

          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createAnyTypeChecker() {
      return createChainableTypeChecker(emptyFunctionThatReturnsNull);
    }

    function createArrayOfTypeChecker(typeChecker) {
      function validate(props, propName, componentName, location, propFullName) {
        if (typeof typeChecker !== 'function') {
          return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
        }
        var propValue = props[propName];
        if (!Array.isArray(propValue)) {
          var propType = getPropType(propValue);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
        }
        for (var i = 0; i < propValue.length; i++) {
          var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
          if (error instanceof Error) {
            return error;
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createElementTypeChecker() {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        if (!isValidElement(propValue)) {
          var propType = getPropType(propValue);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createInstanceTypeChecker(expectedClass) {
      function validate(props, propName, componentName, location, propFullName) {
        if (!(props[propName] instanceof expectedClass)) {
          var expectedClassName = expectedClass.name || ANONYMOUS;
          var actualClassName = getClassName(props[propName]);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createEnumTypeChecker(expectedValues) {
      if (!Array.isArray(expectedValues)) {
         true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
        return emptyFunctionThatReturnsNull;
      }

      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        for (var i = 0; i < expectedValues.length; i++) {
          if (is(propValue, expectedValues[i])) {
            return null;
          }
        }

        var valuesString = JSON.stringify(expectedValues);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
      }
      return createChainableTypeChecker(validate);
    }

    function createObjectOfTypeChecker(typeChecker) {
      function validate(props, propName, componentName, location, propFullName) {
        if (typeof typeChecker !== 'function') {
          return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
        }
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
        }
        for (var key in propValue) {
          if (propValue.hasOwnProperty(key)) {
            var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
            if (error instanceof Error) {
              return error;
            }
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createUnionTypeChecker(arrayOfTypeCheckers) {
      if (!Array.isArray(arrayOfTypeCheckers)) {
         true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
        return emptyFunctionThatReturnsNull;
      }

      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
        var checker = arrayOfTypeCheckers[i];
        if (typeof checker !== 'function') {
          printWarning(
            'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
            'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
          );
          return emptyFunctionThatReturnsNull;
        }
      }

      function validate(props, propName, componentName, location, propFullName) {
        for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
          var checker = arrayOfTypeCheckers[i];
          if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
            return null;
          }
        }

        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
      }
      return createChainableTypeChecker(validate);
    }

    function createNodeChecker() {
      function validate(props, propName, componentName, location, propFullName) {
        if (!isNode(props[propName])) {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createShapeTypeChecker(shapeTypes) {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
        }
        for (var key in shapeTypes) {
          var checker = shapeTypes[key];
          if (!checker) {
            continue;
          }
          var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
          if (error) {
            return error;
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }

    function createStrictShapeTypeChecker(shapeTypes) {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
        }
        // We need to check all keys in case some are required but missing from
        // props.
        var allKeys = assign({}, props[propName], shapeTypes);
        for (var key in allKeys) {
          var checker = shapeTypes[key];
          if (!checker) {
            return new PropTypeError(
              'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
              '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
              '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
            );
          }
          var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
          if (error) {
            return error;
          }
        }
        return null;
      }

      return createChainableTypeChecker(validate);
    }

    function isNode(propValue) {
      switch (typeof propValue) {
        case 'number':
        case 'string':
        case 'undefined':
          return true;
        case 'boolean':
          return !propValue;
        case 'object':
          if (Array.isArray(propValue)) {
            return propValue.every(isNode);
          }
          if (propValue === null || isValidElement(propValue)) {
            return true;
          }

          var iteratorFn = getIteratorFn(propValue);
          if (iteratorFn) {
            var iterator = iteratorFn.call(propValue);
            var step;
            if (iteratorFn !== propValue.entries) {
              while (!(step = iterator.next()).done) {
                if (!isNode(step.value)) {
                  return false;
                }
              }
            } else {
              // Iterator will provide entry [k,v] tuples rather than values.
              while (!(step = iterator.next()).done) {
                var entry = step.value;
                if (entry) {
                  if (!isNode(entry[1])) {
                    return false;
                  }
                }
              }
            }
          } else {
            return false;
          }

          return true;
        default:
          return false;
      }
    }

    function isSymbol(propType, propValue) {
      // Native Symbol.
      if (propType === 'symbol') {
        return true;
      }

      // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
      if (propValue['@@toStringTag'] === 'Symbol') {
        return true;
      }

      // Fallback for non-spec compliant Symbols which are polyfilled.
      if (typeof Symbol === 'function' && propValue instanceof Symbol) {
        return true;
      }

      return false;
    }

    // Equivalent of `typeof` but with special handling for array and regexp.
    function getPropType(propValue) {
      var propType = typeof propValue;
      if (Array.isArray(propValue)) {
        return 'array';
      }
      if (propValue instanceof RegExp) {
        // Old webkits (at least until Android 4.0) return 'function' rather than
        // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
        // passes PropTypes.object.
        return 'object';
      }
      if (isSymbol(propType, propValue)) {
        return 'symbol';
      }
      return propType;
    }

    // This handles more types than `getPropType`. Only used for error messages.
    // See `createPrimitiveTypeChecker`.
    function getPreciseType(propValue) {
      if (typeof propValue === 'undefined' || propValue === null) {
        return '' + propValue;
      }
      var propType = getPropType(propValue);
      if (propType === 'object') {
        if (propValue instanceof Date) {
          return 'date';
        } else if (propValue instanceof RegExp) {
          return 'regexp';
        }
      }
      return propType;
    }

    // Returns a string that is postfixed to a warning about an invalid type.
    // For example, "undefined" or "of type array"
    function getPostfixForTypeWarning(value) {
      var type = getPreciseType(value);
      switch (type) {
        case 'array':
        case 'object':
          return 'an ' + type;
        case 'boolean':
        case 'date':
        case 'regexp':
          return 'a ' + type;
        default:
          return type;
      }
    }

    // Returns class name of the object, if any.
    function getClassName(propValue) {
      if (!propValue.constructor || !propValue.constructor.name) {
        return ANONYMOUS;
      }
      return propValue.constructor.name;
    }

    ReactPropTypes.checkPropTypes = checkPropTypes;
    ReactPropTypes.PropTypes = ReactPropTypes;

    return ReactPropTypes;
  };


  /***/ }),
  /* 81 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  var _default = _react.default.createContext({
    exit() {}

  });

  exports.default = _default;

  /***/ }),
  /* 82 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  var _default = _react.default.createContext({
    stdin: undefined,
    setRawMode: undefined
  });

  exports.default = _default;

  /***/ }),
  /* 83 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  var _default = _react.default.createContext({
    stdout: undefined
  });

  exports.default = _default;

  /***/ }),
  /* 84 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireWildcard(__webpack_require__(14));

  var _propTypes = _interopRequireDefault(__webpack_require__(79));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  class Box extends _react.PureComponent {
    constructor() {
      super();
      this.nodeRef = _react.default.createRef();
    }

    render() {
      const _this$props = this.props,
            {
        children,
        unstable__transformChildren
      } = _this$props,
            style = _objectWithoutProperties(_this$props, ["children", "unstable__transformChildren"]);

      return _react.default.createElement("div", {
        ref: this.nodeRef,
        style: style,
        unstable__transformChildren: unstable__transformChildren
      }, children);
    }

    unstable__getComputedWidth() {
      return this.nodeRef.current.yogaNode.getComputedWidth();
    }

  }

  exports.default = Box;

  _defineProperty(Box, "propTypes", {
    margin: _propTypes.default.number,
    marginX: _propTypes.default.number,
    marginY: _propTypes.default.number,
    marginTop: _propTypes.default.number,
    marginBottom: _propTypes.default.number,
    marginLeft: _propTypes.default.number,
    marginRight: _propTypes.default.number,
    padding: _propTypes.default.number,
    paddingX: _propTypes.default.number,
    paddingY: _propTypes.default.number,
    paddingTop: _propTypes.default.number,
    paddingBottom: _propTypes.default.number,
    paddingLeft: _propTypes.default.number,
    paddingRight: _propTypes.default.number,
    width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
    minWidth: _propTypes.default.number,
    height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
    minHeight: _propTypes.default.number,
    flexGrow: _propTypes.default.number,
    flexShrink: _propTypes.default.number,
    flexDirection: _propTypes.default.oneOf(['row', 'row-reverse', 'column', 'column-reverse']),
    flexBasis: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
    alignItems: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
    justifyContent: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around']),
    textWrap: _propTypes.default.oneOf(['wrap', 'truncate', 'truncate-start', 'truncate-middle', 'truncate-end']),
    unstable__transformChildren: _propTypes.default.func,
    children: _propTypes.default.node
  });

  _defineProperty(Box, "defaultProps", {
    flexDirection: 'row',
    flexGrow: 0,
    flexShrink: 1
  });

  /***/ }),
  /* 85 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  var _propTypes = _interopRequireDefault(__webpack_require__(79));

  var _chalk = _interopRequireDefault(__webpack_require__(86));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  /* eslint-disable camelcase */
  const Text = ({
    bold,
    italic,
    underline,
    strikethrough,
    children,
    unstable__transformChildren
  }) => {
    const transformChildren = children => {
      if (bold) {
        children = _chalk.default.bold(children);
      }

      if (italic) {
        children = _chalk.default.italic(children);
      }

      if (underline) {
        children = _chalk.default.underline(children);
      }

      if (strikethrough) {
        children = _chalk.default.strikethrough(children);
      }

      if (unstable__transformChildren) {
        children = unstable__transformChildren(children);
      }

      return children;
    };

    return _react.default.createElement("span", {
      style: {
        flexDirection: 'row'
      },
      unstable__transformChildren: transformChildren
    }, children);
  };

  Text.propTypes = {
    bold: _propTypes.default.bool,
    italic: _propTypes.default.bool,
    underline: _propTypes.default.bool,
    strikethrough: _propTypes.default.bool,
    children: _propTypes.default.node.isRequired,
    unstable__transformChildren: _propTypes.default.func
  };
  Text.defaultProps = {
    bold: false,
    italic: false,
    underline: false,
    strikethrough: false,
    unstable__transformChildren: undefined
  };
  var _default = Text;
  exports.default = _default;

  /***/ }),
  /* 86 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const escapeStringRegexp = __webpack_require__(87);
  const ansiStyles = __webpack_require__(37);
  const stdoutColor = __webpack_require__(88).stdout;

  const template = __webpack_require__(91);

  const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');

  // `supportsColor.level` → `ansiStyles.color[name]` mapping
  const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];

  // `color-convert` models to exclude from the Chalk API due to conflicts and such
  const skipModels = new Set(['gray']);

  const styles = Object.create(null);

  function applyOptions(obj, options) {
  	options = options || {};

  	// Detect level if not set manually
  	const scLevel = stdoutColor ? stdoutColor.level : 0;
  	obj.level = options.level === undefined ? scLevel : options.level;
  	obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
  }

  function Chalk(options) {
  	// We check for this.template here since calling `chalk.constructor()`
  	// by itself will have a `this` of a previously constructed chalk object
  	if (!this || !(this instanceof Chalk) || this.template) {
  		const chalk = {};
  		applyOptions(chalk, options);

  		chalk.template = function () {
  			const args = [].slice.call(arguments);
  			return chalkTag.apply(null, [chalk.template].concat(args));
  		};

  		Object.setPrototypeOf(chalk, Chalk.prototype);
  		Object.setPrototypeOf(chalk.template, chalk);

  		chalk.template.constructor = Chalk;

  		return chalk.template;
  	}

  	applyOptions(this, options);
  }

  // Use bright blue on Windows as the normal blue color is illegible
  if (isSimpleWindowsTerm) {
  	ansiStyles.blue.open = '\u001B[94m';
  }

  for (const key of Object.keys(ansiStyles)) {
  	ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');

  	styles[key] = {
  		get() {
  			const codes = ansiStyles[key];
  			return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  		}
  	};
  }

  styles.visible = {
  	get() {
  		return build.call(this, this._styles || [], true, 'visible');
  	}
  };

  ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
  for (const model of Object.keys(ansiStyles.color.ansi)) {
  	if (skipModels.has(model)) {
  		continue;
  	}

  	styles[model] = {
  		get() {
  			const level = this.level;
  			return function () {
  				const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  				const codes = {
  					open,
  					close: ansiStyles.color.close,
  					closeRe: ansiStyles.color.closeRe
  				};
  				return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  			};
  		}
  	};
  }

  ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
  for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  	if (skipModels.has(model)) {
  		continue;
  	}

  	const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  	styles[bgModel] = {
  		get() {
  			const level = this.level;
  			return function () {
  				const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  				const codes = {
  					open,
  					close: ansiStyles.bgColor.close,
  					closeRe: ansiStyles.bgColor.closeRe
  				};
  				return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  			};
  		}
  	};
  }

  const proto = Object.defineProperties(() => {}, styles);

  function build(_styles, _empty, key) {
  	const builder = function () {
  		return applyStyle.apply(builder, arguments);
  	};

  	builder._styles = _styles;
  	builder._empty = _empty;

  	const self = this;

  	Object.defineProperty(builder, 'level', {
  		enumerable: true,
  		get() {
  			return self.level;
  		},
  		set(level) {
  			self.level = level;
  		}
  	});

  	Object.defineProperty(builder, 'enabled', {
  		enumerable: true,
  		get() {
  			return self.enabled;
  		},
  		set(enabled) {
  			self.enabled = enabled;
  		}
  	});

  	// See below for fix regarding invisible grey/dim combination on Windows
  	builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';

  	// `__proto__` is used because we must return a function, but there is
  	// no way to create a function with a different prototype
  	builder.__proto__ = proto; // eslint-disable-line no-proto

  	return builder;
  }

  function applyStyle() {
  	// Support varags, but simply cast to string in case there's only one arg
  	const args = arguments;
  	const argsLen = args.length;
  	let str = String(arguments[0]);

  	if (argsLen === 0) {
  		return '';
  	}

  	if (argsLen > 1) {
  		// Don't slice `arguments`, it prevents V8 optimizations
  		for (let a = 1; a < argsLen; a++) {
  			str += ' ' + args[a];
  		}
  	}

  	if (!this.enabled || this.level <= 0 || !str) {
  		return this._empty ? '' : str;
  	}

  	// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
  	// see https://github.com/chalk/chalk/issues/58
  	// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
  	const originalDim = ansiStyles.dim.open;
  	if (isSimpleWindowsTerm && this.hasGrey) {
  		ansiStyles.dim.open = '';
  	}

  	for (const code of this._styles.slice().reverse()) {
  		// Replace any instances already present with a re-opening code
  		// otherwise only the part of the string until said closing code
  		// will be colored, and the rest will simply be 'plain'.
  		str = code.open + str.replace(code.closeRe, code.open) + code.close;

  		// Close the styling before a linebreak and reopen
  		// after next line to fix a bleed issue on macOS
  		// https://github.com/chalk/chalk/pull/92
  		str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
  	}

  	// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
  	ansiStyles.dim.open = originalDim;

  	return str;
  }

  function chalkTag(chalk, strings) {
  	if (!Array.isArray(strings)) {
  		// If chalk() was called by itself or with a string,
  		// return the string itself as a string.
  		return [].slice.call(arguments, 1).join(' ');
  	}

  	const args = [].slice.call(arguments, 2);
  	const parts = [strings.raw[0]];

  	for (let i = 1; i < strings.length; i++) {
  		parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
  		parts.push(String(strings.raw[i]));
  	}

  	return template(chalk, parts.join(''));
  }

  Object.defineProperties(Chalk.prototype, styles);

  module.exports = Chalk(); // eslint-disable-line new-cap
  module.exports.supportsColor = stdoutColor;
  module.exports.default = module.exports; // For TypeScript


  /***/ }),
  /* 87 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;

  module.exports = function (str) {
  	if (typeof str !== 'string') {
  		throw new TypeError('Expected a string');
  	}

  	return str.replace(matchOperatorsRe, '\\$&');
  };


  /***/ }),
  /* 88 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const os = __webpack_require__(89);
  const hasFlag = __webpack_require__(90);

  const env = process.env;

  let forceColor;
  if (hasFlag('no-color') ||
  	hasFlag('no-colors') ||
  	hasFlag('color=false')) {
  	forceColor = false;
  } else if (hasFlag('color') ||
  	hasFlag('colors') ||
  	hasFlag('color=true') ||
  	hasFlag('color=always')) {
  	forceColor = true;
  }
  if ('FORCE_COLOR' in env) {
  	forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  }

  function translateLevel(level) {
  	if (level === 0) {
  		return false;
  	}

  	return {
  		level,
  		hasBasic: true,
  		has256: level >= 2,
  		has16m: level >= 3
  	};
  }

  function supportsColor(stream) {
  	if (forceColor === false) {
  		return 0;
  	}

  	if (hasFlag('color=16m') ||
  		hasFlag('color=full') ||
  		hasFlag('color=truecolor')) {
  		return 3;
  	}

  	if (hasFlag('color=256')) {
  		return 2;
  	}

  	if (stream && !stream.isTTY && forceColor !== true) {
  		return 0;
  	}

  	const min = forceColor ? 1 : 0;

  	if (process.platform === 'win32') {
  		// Node.js 7.5.0 is the first version of Node.js to include a patch to
  		// libuv that enables 256 color output on Windows. Anything earlier and it
  		// won't work. However, here we target Node.js 8 at minimum as it is an LTS
  		// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
  		// release that supports 256 colors. Windows 10 build 14931 is the first release
  		// that supports 16m/TrueColor.
  		const osRelease = os.release().split('.');
  		if (
  			Number(process.versions.node.split('.')[0]) >= 8 &&
  			Number(osRelease[0]) >= 10 &&
  			Number(osRelease[2]) >= 10586
  		) {
  			return Number(osRelease[2]) >= 14931 ? 3 : 2;
  		}

  		return 1;
  	}

  	if ('CI' in env) {
  		if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
  			return 1;
  		}

  		return min;
  	}

  	if ('TEAMCITY_VERSION' in env) {
  		return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  	}

  	if (env.COLORTERM === 'truecolor') {
  		return 3;
  	}

  	if ('TERM_PROGRAM' in env) {
  		const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);

  		switch (env.TERM_PROGRAM) {
  			case 'iTerm.app':
  				return version >= 3 ? 3 : 2;
  			case 'Apple_Terminal':
  				return 2;
  			// No default
  		}
  	}

  	if (/-256(color)?$/i.test(env.TERM)) {
  		return 2;
  	}

  	if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  		return 1;
  	}

  	if ('COLORTERM' in env) {
  		return 1;
  	}

  	if (env.TERM === 'dumb') {
  		return min;
  	}

  	return min;
  }

  function getSupportLevel(stream) {
  	const level = supportsColor(stream);
  	return translateLevel(level);
  }

  module.exports = {
  	supportsColor: getSupportLevel,
  	stdout: getSupportLevel(process.stdout),
  	stderr: getSupportLevel(process.stderr)
  };


  /***/ }),
  /* 89 */
  /***/ (function(module, exports) {

  module.exports = require("os");

  /***/ }),
  /* 90 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  module.exports = (flag, argv) => {
  	argv = argv || process.argv;
  	const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
  	const pos = argv.indexOf(prefix + flag);
  	const terminatorPos = argv.indexOf('--');
  	return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  };


  /***/ }),
  /* 91 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;

  const ESCAPES = new Map([
  	['n', '\n'],
  	['r', '\r'],
  	['t', '\t'],
  	['b', '\b'],
  	['f', '\f'],
  	['v', '\v'],
  	['0', '\0'],
  	['\\', '\\'],
  	['e', '\u001B'],
  	['a', '\u0007']
  ]);

  function unescape(c) {
  	if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
  		return String.fromCharCode(parseInt(c.slice(1), 16));
  	}

  	return ESCAPES.get(c) || c;
  }

  function parseArguments(name, args) {
  	const results = [];
  	const chunks = args.trim().split(/\s*,\s*/g);
  	let matches;

  	for (const chunk of chunks) {
  		if (!isNaN(chunk)) {
  			results.push(Number(chunk));
  		} else if ((matches = chunk.match(STRING_REGEX))) {
  			results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  		} else {
  			throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
  		}
  	}

  	return results;
  }

  function parseStyle(style) {
  	STYLE_REGEX.lastIndex = 0;

  	const results = [];
  	let matches;

  	while ((matches = STYLE_REGEX.exec(style)) !== null) {
  		const name = matches[1];

  		if (matches[2]) {
  			const args = parseArguments(name, matches[2]);
  			results.push([name].concat(args));
  		} else {
  			results.push([name]);
  		}
  	}

  	return results;
  }

  function buildStyle(chalk, styles) {
  	const enabled = {};

  	for (const layer of styles) {
  		for (const style of layer.styles) {
  			enabled[style[0]] = layer.inverse ? null : style.slice(1);
  		}
  	}

  	let current = chalk;
  	for (const styleName of Object.keys(enabled)) {
  		if (Array.isArray(enabled[styleName])) {
  			if (!(styleName in current)) {
  				throw new Error(`Unknown Chalk style: ${styleName}`);
  			}

  			if (enabled[styleName].length > 0) {
  				current = current[styleName].apply(current, enabled[styleName]);
  			} else {
  				current = current[styleName];
  			}
  		}
  	}

  	return current;
  }

  module.exports = (chalk, tmp) => {
  	const styles = [];
  	const chunks = [];
  	let chunk = [];

  	// eslint-disable-next-line max-params
  	tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
  		if (escapeChar) {
  			chunk.push(unescape(escapeChar));
  		} else if (style) {
  			const str = chunk.join('');
  			chunk = [];
  			chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  			styles.push({inverse, styles: parseStyle(style)});
  		} else if (close) {
  			if (styles.length === 0) {
  				throw new Error('Found extraneous } in Chalk template literal');
  			}

  			chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  			chunk = [];
  			styles.pop();
  		} else {
  			chunk.push(chr);
  		}
  	});

  	chunks.push(chunk.join(''));

  	if (styles.length > 0) {
  		const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
  		throw new Error(errMsg);
  	}

  	return chunks.join('');
  };


  /***/ }),
  /* 92 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireDefault(__webpack_require__(14));

  var _propTypes = _interopRequireDefault(__webpack_require__(79));

  var _arrify = _interopRequireDefault(__webpack_require__(93));

  var _chalk = _interopRequireDefault(__webpack_require__(86));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

  const methods = ['hex', 'hsl', 'hsv', 'hwb', 'rgb', 'keyword', 'bgHex', 'bgHsl', 'bgHsv', 'bgHwb', 'bgRgb', 'bgKeyword'];

  const Color = (_ref) => {
    let {
      children
    } = _ref,
        colorProps = _objectWithoutProperties(_ref, ["children"]);

    const transformChildren = children => {
      Object.keys(colorProps).forEach(method => {
        if (colorProps[method]) {
          if (methods.includes(method)) {
            children = _chalk.default[method](...(0, _arrify.default)(colorProps[method]))(children);
          } else if (typeof _chalk.default[method] === 'function') {
            children = _chalk.default[method](children);
          }
        }
      });
      return children;
    };

    return _react.default.createElement("span", {
      style: {
        flexDirection: 'row'
      },
      unstable__transformChildren: transformChildren
    }, children);
  };

  Color.propTypes = {
    children: _propTypes.default.node.isRequired
  };
  var _default = Color;
  exports.default = _default;

  /***/ }),
  /* 93 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";

  module.exports = function (val) {
  	if (val === null || val === undefined) {
  		return [];
  	}

  	return Array.isArray(val) ? val : [val];
  };


  /***/ }),
  /* 94 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;

  var _react = _interopRequireWildcard(__webpack_require__(14));

  var _propTypes = _interopRequireDefault(__webpack_require__(79));

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  const childrenToArray = children => Array.isArray(children) ? children : [children]; // This component allows developers to render output before main output from all the other components.
  // The reason it's called <Static> is it's append-only output. Output from <Static> components
  // is written permantently to stdout and is never updated afterwards. If <Static> component
  // receives new children, Ink will detect the changes and write them to stdout.
  // In order for this mechanism to work perfectly, <Static> children must never update their output
  // once they've been appended to <Static>.
  //
  // A good example of where this component might be useful is interface like Jest's.
  // When running tests, Jest keeps writing completed tests to output, while continuously
  // rendering test stats at the end of the output.


  class Static extends _react.Component {
    constructor(...args) {
      super(...args);

      _defineProperty(this, "state", {
        lastIndex: null
      });
    }

    render() {
      const _this$props = this.props,
            {
        children
      } = _this$props,
            otherProps = _objectWithoutProperties(_this$props, ["children"]);

      const {
        lastIndex
      } = this.state;
      let newChildren = children;

      if (typeof lastIndex === 'number') {
        newChildren = childrenToArray(children).slice(lastIndex);
      }

      return _react.default.createElement("div", {
        unstable__static: true,
        style: otherProps
      }, newChildren);
    }

    componentDidMount() {
      this.saveLastIndex(this.props.children);
    }

    componentDidUpdate(prevProps, prevState) {
      if (prevState.lastIndex === this.state.lastIndex) {
        this.saveLastIndex(this.props.children);
      }
    }

    saveLastIndex(children) {
      const nextIndex = childrenToArray(children).length;

      if (this.state.lastIndex !== nextIndex) {
        this.setState({
          lastIndex: nextIndex
        });
      }
    }

  }

  exports.default = Static;

  _defineProperty(Static, "propTypes", {
    children: _propTypes.default.node
  });

  /***/ }),
  /* 95 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const ink_1 = __webpack_require__(11);

  const react_1 = __webpack_require__(14);

  var FocusRequest;

  (function (FocusRequest) {
    FocusRequest["BEFORE"] = "before";
    FocusRequest["AFTER"] = "after";
  })(FocusRequest = exports.FocusRequest || (exports.FocusRequest = {}));

  ;

  exports.useFocusRequest = function ({
    active,
    handler
  }) {
    const {
      stdin
    } = react_1.useContext(ink_1.StdinContext);
    react_1.useEffect(() => {
      if (!active || typeof handler === `undefined`) return;

      const cb = (ch, key) => {
        if (key.name === `tab`) {
          if (key.shift) {
            handler(FocusRequest.BEFORE);
          } else {
            handler(FocusRequest.AFTER);
          }
        }
      };

      stdin.on(`keypress`, cb);
      return () => {
        stdin.off(`keypress`, cb);
      };
    }, [active, handler]);
  };

  /***/ }),
  /* 96 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const ink_1 = __webpack_require__(11);

  const react_1 = __webpack_require__(14);

  exports.useListInput = function (value, values, {
    active,
    minus,
    plus,
    set
  }) {
    const {
      stdin
    } = react_1.useContext(ink_1.StdinContext);
    react_1.useEffect(() => {
      if (!active) return;

      const cb = (ch, key) => {
        const index = values.indexOf(value);

        switch (key.name) {
          case minus:
            {
              set(values[(values.length + index - 1) % values.length]);
            }
            break;

          case plus:
            {
              set(values[(index + 1) % values.length]);
            }
            break;
        }
      };

      stdin.on(`keypress`, cb);
      return () => {
        stdin.off(`keypress`, cb);
      };
    }, [values, value, active]);
  };

  /***/ }),
  /* 97 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const ink_1 = __webpack_require__(11);

  const react_1 = __importStar(__webpack_require__(14));

  const Application_1 = __webpack_require__(98);

  exports.renderForm = async function (UserComponent, props) {
    let returnedValue;

    const useSubmit = value => {
      const {
        exit
      } = react_1.useContext(ink_1.AppContext);
      const {
        stdin
      } = react_1.useContext(ink_1.StdinContext);
      react_1.useEffect(() => {
        const cb = (ch, key) => {
          if (key.name === `return`) {
            returnedValue = value;
            exit();
          }
        };

        stdin.on(`keypress`, cb);
        return () => {
          stdin.off(`keypress`, cb);
        };
      }, [stdin, exit, value]);
    };

    const {
      waitUntilExit
    } = ink_1.render(react_1.default.createElement(Application_1.Application, null, react_1.default.createElement(UserComponent, Object.assign({}, props, {
      useSubmit: useSubmit
    }))));
    await waitUntilExit();
    return returnedValue;
  };

  /***/ }),
  /* 98 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const ink_1 = __webpack_require__(11);

  const react_1 = __importStar(__webpack_require__(14));

  exports.MinistoreContext = react_1.default.createContext(null);

  exports.Application = function ({
    children
  }) {
    const {
      setRawMode
    } = react_1.useContext(ink_1.StdinContext);
    react_1.useEffect(() => {
      setRawMode && setRawMode(true);
    }, []);
    const [data, setData] = react_1.useState(new Map());
    const ministore = react_1.useMemo(() => ({
      getAll: () => data,
      get: key => data.get(key),
      set: (key, value) => setData(new Map([...data, [key, value]]))
    }), [data, setData]);
    return react_1.default.createElement(exports.MinistoreContext.Provider, {
      value: ministore,
      children: children
    });
  };

  /***/ }),
  /* 99 */
  /***/ (function(module, exports, __webpack_require__) {

  "use strict";


  var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
    var c = arguments.length,
        r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
        d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
  };

  var __importDefault = this && this.__importDefault || function (mod) {
    return mod && mod.__esModule ? mod : {
      "default": mod
    };
  };

  var __importStar = this && this.__importStar || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
  };

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  const cli_1 = __webpack_require__(3);

  const core_1 = __webpack_require__(1);

  const clipanion_1 = __webpack_require__(4);

  const semver_1 = __importDefault(__webpack_require__(8));

  const yup = __importStar(__webpack_require__(100));

  const versionUtils = __importStar(__webpack_require__(5));

  const acceptedStrategies = new Set(Object.values(versionUtils.Decision).filter(decision => {
    return decision !== versionUtils.Decision.UNDECIDED;
  })); // eslint-disable-next-line arca/no-default-export

  class VersionCommand extends cli_1.BaseCommand {
    constructor() {
      super(...arguments);
      this.force = false;
    }

    async execute() {
      const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
      const {
        project,
        workspace
      } = await core_1.Project.find(configuration, this.context.cwd);
      if (!workspace) throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
      let deferred = configuration.get(`preferDeferredVersions`);
      if (this.deferred) deferred = true;
      if (this.immediate) deferred = false;
      const isSemver = semver_1.default.valid(this.strategy);
      const isDeclined = this.strategy === versionUtils.Decision.DECLINE;
      let releaseStrategy;

      if (isSemver) {
        if (workspace.manifest.version !== null) {
          const suggestedStrategy = versionUtils.suggestStrategy(workspace.manifest.version, this.strategy);

          if (suggestedStrategy !== null) {
            releaseStrategy = suggestedStrategy;
          } else {
            releaseStrategy = this.strategy;
          }
        } else {
          releaseStrategy = this.strategy;
        }
      } else {
        let currentVersion = workspace.manifest.version;

        if (!isDeclined) {
          if (currentVersion === null) throw new clipanion_1.UsageError(`Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.`);

          if (typeof currentVersion !== `string` || !semver_1.default.valid(currentVersion)) {
            throw new clipanion_1.UsageError(`Can't bump the version (${currentVersion}) if it's not valid semver`);
          }
        }

        releaseStrategy = this.strategy;
      }

      if (!deferred) {
        const releases = await versionUtils.resolveVersionFiles(project);
        const storedVersion = releases.get(workspace);

        if (typeof storedVersion !== `undefined`) {
          const thisVersion = versionUtils.applyStrategy(workspace.manifest.version, releaseStrategy);

          if (semver_1.default.lt(thisVersion, storedVersion)) {
            throw new clipanion_1.UsageError(`Can't bump the version to one that would be lower than the current deferred one (${storedVersion})`);
          }
        }
      }

      const versionFile = await versionUtils.openVersionFile(project, {
        allowEmpty: true
      });
      await versionFile.releases.set(workspace, releaseStrategy);
      await versionFile.saveAll();

      if (!deferred) {
        await this.cli.run([`version`, `apply`]);
      }
    }

  }

  VersionCommand.schema = yup.object().shape({
    strategy: yup.string().test({
      name: `strategy`,
      message: '${path} must be a semver range or one of ${strategies}',
      params: {
        strategies: [...acceptedStrategies].join(`, `)
      },
      test: range => {
        return semver_1.default.valid(range) !== null || acceptedStrategies.has(range);
      }
    })
  });
  VersionCommand.usage = clipanion_1.Command.Usage({
    category: `Release-related commands`,
    description: `apply a new version to the current package`,
    details: `
        This command will bump the version number for the given package, following the specified strategy:

        - If \`major\`, the first number from the semver range will be increased (\`X.0.0\`).
        - If \`minor\`, the second number from the semver range will be increased (\`0.X.0\`).
        - If \`patch\`, the third number from the semver range will be increased (\`0.0.X\`).
        - If prefixed by \`pre\` (\`premajor\`, ...), a \`-0\` suffix will be set (\`0.0.0-0\`).
        - If \`prerelease\`, the suffix will be increased (\`0.0.0-X\`); the third number from the semver range will also be increased if there was no suffix in the previous version.
        - If \`decline\`, the nonce will be increased for \`yarn version check\` to pass without version bump.
        - If a valid semver range, it will be used as new version.
        - If unspecified, Yarn will ask you for guidance.

        For more information about the \`--deferred\` flag, consult our documentation ("Managing Releases").
      `,
    examples: [[`Immediatly bump the version to the next major`, `yarn version major`], [`Prepare the version to be bumped to the next major`, `yarn version major --deferred`]]
  });

  __decorate([clipanion_1.Command.String()], VersionCommand.prototype, "strategy", void 0);

  __decorate([clipanion_1.Command.Boolean(`-d,--deferred`)], VersionCommand.prototype, "deferred", void 0);

  __decorate([clipanion_1.Command.Boolean(`-i,--immediate`)], VersionCommand.prototype, "immediate", void 0);

  __decorate([clipanion_1.Command.Boolean(`-f,--force`)], VersionCommand.prototype, "force", void 0);

  __decorate([clipanion_1.Command.Path(`version`)], VersionCommand.prototype, "execute", null);

  exports.default = VersionCommand;

  /***/ }),
  /* 100 */
  /***/ (function(module, exports) {

  module.exports = require("yup");

  /***/ })
  /******/ ]);
    return plugin;
  },
};
